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} /> 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/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/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" /> ), diff --git a/packages/icon/src/icons/docs.tsx b/packages/icon/src/icons/docs.tsx index 90e07659c..14610b6e3 100644 --- a/packages/icon/src/icons/docs.tsx +++ b/packages/icon/src/icons/docs.tsx @@ -2,12 +2,12 @@ import { createIcon } from "../create-icon" export const DocsIcon = createIcon({ title: "DocsIcon", - viewBox: "0 0 12 12", + viewBox: "0 0 16 16", path: ( ), 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"