From 6fb671883aa94a09ce8b4ea190850582b3239794 Mon Sep 17 00:00:00 2001 From: AruSeito Date: Thu, 26 Oct 2023 16:10:09 +0800 Subject: [PATCH 1/5] =?UTF-8?q?feat:=20=E2=9C=A8=20add=20configuration=20i?= =?UTF-8?q?con?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/icon/src/icons/configuration.tsx | 48 +++++++++++++++++++++++ packages/icon/src/index.ts | 1 + 2 files changed, 49 insertions(+) create mode 100644 packages/icon/src/icons/configuration.tsx diff --git a/packages/icon/src/icons/configuration.tsx b/packages/icon/src/icons/configuration.tsx new file mode 100644 index 000000000..eb5175a44 --- /dev/null +++ b/packages/icon/src/icons/configuration.tsx @@ -0,0 +1,48 @@ +import { createIcon } from "../create-icon" + +export const ConfigurationIcon = createIcon({ + title: "configuration", + viewBox: "0 0 16 16", + path: ( + <> + + + + + + + + ), +}) + +ConfigurationIcon.displayName = "ConfigurationIcon" diff --git a/packages/icon/src/index.ts b/packages/icon/src/index.ts index d86348974..08cf2a647 100644 --- a/packages/icon/src/index.ts +++ b/packages/icon/src/index.ts @@ -9,6 +9,7 @@ export * from "./icons/image-default" export * from "./icons/image-error" export * from "./icons/loading" export * from "./icons/copy" +export * from "./icons/configuration" export * from "./icons/eye-on" export * from "./icons/eye-off" export * from "./icons/error-circle" From a68b75e7ea3bc239b519667f273a3015c06df977 Mon Sep 17 00:00:00 2001 From: AruSeito Date: Thu, 26 Oct 2023 19:31:27 +0800 Subject: [PATCH 2/5] =?UTF-8?q?feat:=20=E2=9C=A8=20update=20icon?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/icon/src/icons/caret-right.tsx | 9 +-------- packages/icon/src/icons/copy.tsx | 3 +-- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/packages/icon/src/icons/caret-right.tsx b/packages/icon/src/icons/caret-right.tsx index fcbd11bcb..45a334bc0 100644 --- a/packages/icon/src/icons/caret-right.tsx +++ b/packages/icon/src/icons/caret-right.tsx @@ -3,14 +3,7 @@ import { createIcon } from "../create-icon" export const CaretRightIcon = createIcon({ title: "CaretRightIcon", viewBox: "0 0 8 8", - path: ( - - ), + path: , }) CaretRightIcon.displayName = "CaretRightIcon" diff --git a/packages/icon/src/icons/copy.tsx b/packages/icon/src/icons/copy.tsx index 898326e33..7495672aa 100644 --- a/packages/icon/src/icons/copy.tsx +++ b/packages/icon/src/icons/copy.tsx @@ -14,9 +14,8 @@ export const CopyIcon = createIcon({ stroke="currentColor" /> ), From de75d4ad9959a678d112d33662d5022c4567cb6e Mon Sep 17 00:00:00 2001 From: AruSeito Date: Fri, 27 Oct 2023 17:22:13 +0800 Subject: [PATCH 3/5] chore: update icon --- packages/icon/src/icons/docs.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/icon/src/icons/docs.tsx b/packages/icon/src/icons/docs.tsx index 90e07659c..2208b8c73 100644 --- a/packages/icon/src/icons/docs.tsx +++ b/packages/icon/src/icons/docs.tsx @@ -7,7 +7,7 @@ export const DocsIcon = createIcon({ ), From 373bc69025f77e9f262ac9815619695749f618ed Mon Sep 17 00:00:00 2001 From: AruSeito Date: Fri, 27 Oct 2023 18:25:45 +0800 Subject: [PATCH 4/5] chore: update icon --- packages/icon/src/icons/docs.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/icon/src/icons/docs.tsx b/packages/icon/src/icons/docs.tsx index 2208b8c73..14610b6e3 100644 --- a/packages/icon/src/icons/docs.tsx +++ b/packages/icon/src/icons/docs.tsx @@ -2,7 +2,7 @@ import { createIcon } from "../create-icon" export const DocsIcon = createIcon({ title: "DocsIcon", - viewBox: "0 0 12 12", + viewBox: "0 0 16 16", path: ( Date: Fri, 27 Oct 2023 18:36:15 +0800 Subject: [PATCH 5/5] =?UTF-8?q?feat:=20=E2=9C=A8=20add=20readOnly?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/date-picker/src/interface.ts | 1 + packages/date-picker/src/range-date-picker.tsx | 5 +++-- packages/date-picker/src/signle-date-picker.tsx | 5 +++-- packages/date-picker/src/signle-year-picker.tsx | 5 +++-- packages/date-picker/src/single-month-picker.tsx | 5 +++-- packages/date-picker/src/single-quarter-picker.tsx | 5 +++-- packages/date-picker/src/single-week-picker.tsx | 5 +++-- 7 files changed, 19 insertions(+), 12 deletions(-) diff --git a/packages/date-picker/src/interface.ts b/packages/date-picker/src/interface.ts index 4b02b7de4..087122401 100644 --- a/packages/date-picker/src/interface.ts +++ b/packages/date-picker/src/interface.ts @@ -62,6 +62,7 @@ export interface PublicDatePickerProps extends BoxProps { utcOffset?: number timezone?: string inputSuffix?: ReactNode + readonly?: boolean } export interface SinglePickerProps extends PublicDatePickerProps { diff --git a/packages/date-picker/src/range-date-picker.tsx b/packages/date-picker/src/range-date-picker.tsx index 3343f94fa..624e8af46 100644 --- a/packages/date-picker/src/range-date-picker.tsx +++ b/packages/date-picker/src/range-date-picker.tsx @@ -74,6 +74,7 @@ export const RangeDatePicker = forwardRef( size = "medium", colorScheme = "blue", extra, + readonly = false, } = props const weekStart = 0 @@ -764,7 +765,7 @@ export const RangeDatePicker = forwardRef( } trigger="click" position={position} - disabled={triggerDisabled} + disabled={triggerDisabled || readonly} onVisibleChange={visibleChange} popupVisible={mergedPopupVisible} colorScheme="white" @@ -793,7 +794,7 @@ export const RangeDatePicker = forwardRef( onPressEnter={onPressEnter} onClear={onClear} allowClear={allowClear} - editable={editable} + editable={editable || !readonly} suffixIcon={suffixIcon} /> diff --git a/packages/date-picker/src/signle-date-picker.tsx b/packages/date-picker/src/signle-date-picker.tsx index a839deaa5..2579e61fa 100644 --- a/packages/date-picker/src/signle-date-picker.tsx +++ b/packages/date-picker/src/signle-date-picker.tsx @@ -64,6 +64,7 @@ export const SingleDatePicker = forwardRef< showTime, showNowBtn = true, onOk, + readonly = false, } = props const refInput = useRef(null) @@ -438,7 +439,7 @@ export const SingleDatePicker = forwardRef< } trigger="click" position={position} - disabled={disabled} + disabled={disabled || readonly} onVisibleChange={visibleChange} popupVisible={mergedPopupVisible} colorScheme="white" @@ -463,7 +464,7 @@ export const SingleDatePicker = forwardRef< onPressEnter={onPressEnter} onClear={onClear} allowClear={allowClear} - editable={editable} + editable={editable || !readonly} suffixIcon={suffixIcon} /> diff --git a/packages/date-picker/src/signle-year-picker.tsx b/packages/date-picker/src/signle-year-picker.tsx index 99eb0b5f5..f835409dc 100644 --- a/packages/date-picker/src/signle-year-picker.tsx +++ b/packages/date-picker/src/signle-year-picker.tsx @@ -55,6 +55,7 @@ export const SingleYearPicker = forwardRef< size = "medium", colorScheme = "blue", inputSuffix, + readonly = false, } = props const refInput = useRef(null) @@ -295,7 +296,7 @@ export const SingleYearPicker = forwardRef< } trigger="click" position={position} - disabled={disabled} + disabled={disabled || readonly} onVisibleChange={visibleChange} popupVisible={mergedPopupVisible} colorScheme="white" @@ -320,7 +321,7 @@ export const SingleYearPicker = forwardRef< onPressEnter={onPressEnter} onClear={onClear} allowClear={allowClear} - editable={editable} + editable={editable || !readonly} suffixIcon={suffixIcon} /> diff --git a/packages/date-picker/src/single-month-picker.tsx b/packages/date-picker/src/single-month-picker.tsx index 9871489de..647071da7 100644 --- a/packages/date-picker/src/single-month-picker.tsx +++ b/packages/date-picker/src/single-month-picker.tsx @@ -60,6 +60,7 @@ export const SingleMonthPicker = forwardRef< colorScheme = "blue", inputSuffix, onOk, + readonly = false, } = props const refInput = useRef(null) @@ -345,7 +346,7 @@ export const SingleMonthPicker = forwardRef< } trigger="click" position={position} - disabled={disabled} + disabled={disabled || readonly} onVisibleChange={visibleChange} popupVisible={mergedPopupVisible} colorScheme="white" @@ -370,7 +371,7 @@ export const SingleMonthPicker = forwardRef< onPressEnter={onPressEnter} onClear={onClear} allowClear={allowClear} - editable={editable} + editable={editable || !readonly} suffixIcon={suffixIcon} /> diff --git a/packages/date-picker/src/single-quarter-picker.tsx b/packages/date-picker/src/single-quarter-picker.tsx index 86617d219..c58a06461 100644 --- a/packages/date-picker/src/single-quarter-picker.tsx +++ b/packages/date-picker/src/single-quarter-picker.tsx @@ -60,6 +60,7 @@ export const SingleQuarterPicker = forwardRef< colorScheme = "blue", inputSuffix, onOk, + readonly = false, } = props const refInput = useRef(null) @@ -345,7 +346,7 @@ export const SingleQuarterPicker = forwardRef< } trigger="click" position={position} - disabled={disabled} + disabled={disabled || readonly} onVisibleChange={visibleChange} popupVisible={mergedPopupVisible} colorScheme="white" @@ -370,7 +371,7 @@ export const SingleQuarterPicker = forwardRef< onPressEnter={onPressEnter} onClear={onClear} allowClear={allowClear} - editable={editable} + editable={editable || !readonly} suffixIcon={suffixIcon} /> diff --git a/packages/date-picker/src/single-week-picker.tsx b/packages/date-picker/src/single-week-picker.tsx index 91f89d71a..fdb248603 100644 --- a/packages/date-picker/src/single-week-picker.tsx +++ b/packages/date-picker/src/single-week-picker.tsx @@ -60,6 +60,7 @@ export const SingleWeekPicker = forwardRef< colorScheme = "blue", inputSuffix, onOk, + readonly = false, } = props const refInput = useRef(null) @@ -343,7 +344,7 @@ export const SingleWeekPicker = forwardRef< } trigger="click" position={position} - disabled={disabled} + disabled={disabled || readonly} onVisibleChange={visibleChange} popupVisible={mergedPopupVisible} colorScheme="white" @@ -368,7 +369,7 @@ export const SingleWeekPicker = forwardRef< onPressEnter={onPressEnter} onClear={onClear} allowClear={allowClear} - editable={editable} + editable={editable || !readonly} suffixIcon={suffixIcon} />