@tendaui/react 1.1.5 → 1.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +1 -1
- package/es/_chunks/dep-5U9UjDaf.js.map +1 -1
- package/es/_chunks/dep-CD_4-1Xb.js.map +1 -1
- package/es/_chunks/{dep-CRURwzDj.js → dep-CsSvR9wN.js} +9 -3
- package/es/_chunks/dep-CsSvR9wN.js.map +1 -0
- package/es/_chunks/dep-DJmE940f.js.map +1 -1
- package/es/_chunks/dep-DbVHGoUC.js.map +1 -1
- package/es/_chunks/{dep-D8jki30S.js → dep-aX8qrQpB.js} +2 -2
- package/es/_chunks/{dep-D8jki30S.js.map → dep-aX8qrQpB.js.map} +1 -1
- package/es/alert/Alert.js +9 -2
- package/es/alert/Alert.js.map +1 -1
- package/es/alert/index.js +4 -1
- package/es/alert/index.js.map +1 -1
- package/es/alert/style/index.css +7 -30
- package/es/badge/style/index.css +5 -10
- package/es/button/_example/base.js +1 -158
- package/es/button/_example/base.js.map +1 -1
- package/es/button/_example/icon.js +1 -157
- package/es/button/_example/icon.js.map +1 -1
- package/es/button/style/index.css +4 -19
- package/es/checkbox/style/index.css +9 -26
- package/es/color-picker/ColorPicker.js +3 -3
- package/es/color-picker/components/panel/format/index.js +4 -1
- package/es/color-picker/components/panel/format/index.js.map +1 -1
- package/es/color-picker/components/panel/format/inputs.js +3 -0
- package/es/color-picker/components/panel/format/inputs.js.map +1 -1
- package/es/color-picker/components/trigger.js +3 -0
- package/es/color-picker/components/trigger.js.map +1 -1
- package/es/color-picker/style/index.css +43 -138
- package/es/color-picker/utils/color-picker/index.js.map +1 -1
- package/es/dialog/Dialog.js +4 -1
- package/es/dialog/Dialog.js.map +1 -1
- package/es/dialog/DialogCard.js +5 -2
- package/es/dialog/DialogCard.js.map +1 -1
- package/es/dialog/index.js +4 -3
- package/es/dialog/index.js.map +1 -1
- package/es/dialog/plugin.js +3 -2
- package/es/dialog/plugin.js.map +1 -1
- package/es/dialog/style/index.css +51 -188
- package/es/drawer/Drawer.js +15 -8
- package/es/drawer/Drawer.js.map +1 -1
- package/es/drawer/index.js +5 -2
- package/es/drawer/index.js.map +1 -1
- package/es/drawer/style/index.css +12 -41
- package/es/form/Form.js +3 -0
- package/es/form/Form.js.map +1 -1
- package/es/form/FormItem.js +3 -0
- package/es/form/FormItem.js.map +1 -1
- package/es/form/index.js +3 -0
- package/es/form/index.js.map +1 -1
- package/es/form/style/index.css +13 -33
- package/es/index.js +3 -3
- package/es/input/Input.js +10 -2
- package/es/input/Input.js.map +1 -1
- package/es/input/index.js +4 -1
- package/es/input/index.js.map +1 -1
- package/es/input/style/index.css +17 -63
- package/es/input-number/InputNumber.js +4 -1
- package/es/input-number/InputNumber.js.map +1 -1
- package/es/input-number/index.js +4 -1
- package/es/input-number/index.js.map +1 -1
- package/es/input-number/style/css.js +1 -1
- package/es/input-number/style/index.css +7 -39
- package/es/input-number/useInputNumber.js.map +1 -1
- package/es/ip-input/style/index.css +21 -87
- package/es/layout/style/index.css +5 -19
- package/es/list/List.js.map +1 -1
- package/es/list/ListItem.js.map +1 -1
- package/es/list/ListItemMeta.js.map +1 -1
- package/es/list/style/css.js +1 -1
- package/es/list/style/index.css +11 -39
- package/es/loading/style/index.css +10 -65
- package/es/notification/style/index.css +6 -24
- package/es/popup/style/index.css +9 -20
- package/es/radio/style/index.css +11 -36
- package/es/select/Select.js +4 -1
- package/es/select/Select.js.map +1 -1
- package/es/select/index.js +4 -1
- package/es/select/index.js.map +1 -1
- package/es/select/style/index.css +17 -52
- package/es/select-input/SelectInput.js +3 -0
- package/es/select-input/SelectInput.js.map +1 -1
- package/es/select-input/hook/useMultiple.js +3 -0
- package/es/select-input/hook/useMultiple.js.map +1 -1
- package/es/select-input/hook/useSingle.js +3 -0
- package/es/select-input/hook/useSingle.js.map +1 -1
- package/es/select-input/index.js +3 -0
- package/es/select-input/index.js.map +1 -1
- package/es/slider/Slider.js +3 -0
- package/es/slider/Slider.js.map +1 -1
- package/es/slider/SliderHandleButton.js.map +1 -1
- package/es/slider/index.js +3 -0
- package/es/slider/index.js.map +1 -1
- package/es/slider/style/css.js +1 -1
- package/es/slider/style/index.css +18 -59
- package/es/style/index.css +0 -2
- package/es/switch/Switch.js +1 -1
- package/es/switch/index.js +1 -1
- package/es/switch/style/index.css +10 -37
- package/es/tab/style/index.css +6 -31
- package/es/table/TBody.js +10 -1
- package/es/table/TBody.js.map +1 -1
- package/es/table/Table.js +4 -0
- package/es/table/Table.js.map +1 -1
- package/es/table/index.js +4 -0
- package/es/table/index.js.map +1 -1
- package/es/table/style/index.css +5 -15
- package/es/tag/style/index.css +4 -16
- package/es/tag-input/TagInput.js +3 -0
- package/es/tag-input/TagInput.js.map +1 -1
- package/es/tag-input/index.js +3 -0
- package/es/tag-input/index.js.map +1 -1
- package/es/tag-input/style/index.css +7 -53
- package/es/utils/log/index.js.map +1 -1
- package/package.json +3 -3
- package/es/_chunks/dep-CRURwzDj.js.map +0 -1
- package/es/alert/Alert.d.ts +0 -7
- package/es/alert/defaultProps.d.ts +0 -2
- package/es/alert/index.d.ts +0 -5
- package/es/alert/style/css.d.ts +0 -1
- package/es/alert/style/index.d.ts +0 -1
- package/es/alert/type.d.ts +0 -45
- package/es/badge/Badge.d.ts +0 -7
- package/es/badge/defaultProps.d.ts +0 -2
- package/es/badge/index.d.ts +0 -5
- package/es/badge/style/css.d.ts +0 -1
- package/es/badge/style/index.d.ts +0 -1
- package/es/badge/type.d.ts +0 -50
- package/es/button/Button.d.ts +0 -6
- package/es/button/defaultProps.d.ts +0 -2
- package/es/button/index.d.ts +0 -5
- package/es/button/style/css.d.ts +0 -1
- package/es/button/style/index.d.ts +0 -1
- package/es/button/type.d.ts +0 -81
- package/es/checkbox/Checkbox.d.ts +0 -10
- package/es/checkbox/CheckboxGroup.d.ts +0 -14
- package/es/checkbox/defaultProps.d.ts +0 -3
- package/es/checkbox/index.d.ts +0 -11
- package/es/checkbox/style/css.d.ts +0 -1
- package/es/checkbox/style/index.d.ts +0 -1
- package/es/checkbox/type.d.ts +0 -115
- package/es/color-picker/ColorPickPanel.d.ts +0 -4
- package/es/color-picker/ColorPicker.d.ts +0 -4
- package/es/color-picker/components/panel/alpha.d.ts +0 -4
- package/es/color-picker/components/panel/format/index.d.ts +0 -10
- package/es/color-picker/components/panel/format/inputs.d.ts +0 -4
- package/es/color-picker/components/panel/header.d.ts +0 -13
- package/es/color-picker/components/panel/hue.d.ts +0 -4
- package/es/color-picker/components/panel/index.d.ts +0 -4
- package/es/color-picker/components/panel/saturation.d.ts +0 -4
- package/es/color-picker/components/panel/slider.d.ts +0 -11
- package/es/color-picker/components/panel/swatches.d.ts +0 -11
- package/es/color-picker/components/trigger.d.ts +0 -9
- package/es/color-picker/defaultProps.d.ts +0 -2
- package/es/color-picker/helpers.d.ts +0 -5
- package/es/color-picker/hooks/useClassNames.d.ts +0 -2
- package/es/color-picker/hooks/useStyles.d.ts +0 -14
- package/es/color-picker/index.d.ts +0 -6
- package/es/color-picker/style/css.d.ts +0 -1
- package/es/color-picker/style/index.d.ts +0 -1
- package/es/color-picker/type.d.ts +0 -135
- package/es/color-picker/utils/color-picker/cmyk.d.ts +0 -27
- package/es/color-picker/utils/color-picker/color.d.ts +0 -144
- package/es/color-picker/utils/color-picker/constants.d.ts +0 -30
- package/es/color-picker/utils/color-picker/draggable.d.ts +0 -23
- package/es/color-picker/utils/color-picker/format.d.ts +0 -64
- package/es/color-picker/utils/color-picker/gradient.d.ts +0 -22
- package/es/color-picker/utils/color-picker/index.d.ts +0 -7
- package/es/color-picker/utils/color-picker/types.d.ts +0 -28
- package/es/common/Check.d.ts +0 -22
- package/es/common/FakeArrow.d.ts +0 -9
- package/es/common/PluginContainer.d.ts +0 -9
- package/es/common/Portal.d.ts +0 -16
- package/es/common/observe.d.ts +0 -1
- package/es/common.d.ts +0 -81
- package/es/config-provider/ConfigContext.d.ts +0 -13
- package/es/config-provider/ConfigProvider.d.ts +0 -25
- package/es/config-provider/index.d.ts +0 -7
- package/es/config-provider/type.d.ts +0 -1029
- package/es/dialog/Dialog.d.ts +0 -8
- package/es/dialog/DialogCard.d.ts +0 -8
- package/es/dialog/defaultProps.d.ts +0 -6
- package/es/dialog/hooks/useDialogDrag.d.ts +0 -7
- package/es/dialog/hooks/useDialogEsc.d.ts +0 -3
- package/es/dialog/hooks/useDialogPosition.d.ts +0 -2
- package/es/dialog/hooks/useLockStyle.d.ts +0 -2
- package/es/dialog/index.d.ts +0 -8
- package/es/dialog/plugin.d.ts +0 -6
- package/es/dialog/style/css.d.ts +0 -1
- package/es/dialog/style/index.d.ts +0 -1
- package/es/dialog/type.d.ts +0 -227
- package/es/dialog/utils.d.ts +0 -1
- package/es/drawer/Drawer.d.ts +0 -11
- package/es/drawer/defaultProps.d.ts +0 -2
- package/es/drawer/hooks/useDrag.d.ts +0 -8
- package/es/drawer/hooks/useLockStyle.d.ts +0 -1
- package/es/drawer/index.d.ts +0 -4
- package/es/drawer/style/css.d.ts +0 -1
- package/es/drawer/style/index.d.ts +0 -1
- package/es/drawer/type.d.ts +0 -199
- package/es/drawer/utils/index.d.ts +0 -23
- package/es/fireworks/Fireworks.d.ts +0 -7
- package/es/fireworks/index.d.ts +0 -5
- package/es/fireworks/style/css.d.ts +0 -0
- package/es/fireworks/style/index.d.ts +0 -0
- package/es/fireworks/type.d.ts +0 -69
- package/es/form/Form.d.ts +0 -8
- package/es/form/FormContext.d.ts +0 -59
- package/es/form/FormItem.d.ts +0 -23
- package/es/form/FormList.d.ts +0 -4
- package/es/form/const.d.ts +0 -6
- package/es/form/defaultProps.d.ts +0 -3
- package/es/form/easing.d.ts +0 -2
- package/es/form/formModel.d.ts +0 -37
- package/es/form/hooks/interface.d.ts +0 -16
- package/es/form/hooks/useForm.d.ts +0 -3
- package/es/form/hooks/useFormItemInitialData.d.ts +0 -9
- package/es/form/hooks/useFormItemStyle.d.ts +0 -10
- package/es/form/hooks/useInstance.d.ts +0 -16
- package/es/form/hooks/useWatch.d.ts +0 -3
- package/es/form/index.d.ts +0 -7
- package/es/form/scroll.d.ts +0 -39
- package/es/form/style/css.d.ts +0 -1
- package/es/form/style/index.d.ts +0 -1
- package/es/form/type.d.ts +0 -486
- package/es/form/utils/index.d.ts +0 -5
- package/es/global-config/default-config.d.ts +0 -84
- package/es/global-config/locale/ar_KW.d.ts +0 -239
- package/es/global-config/locale/en_US.d.ts +0 -263
- package/es/global-config/locale/it_IT.d.ts +0 -263
- package/es/global-config/locale/ja_JP.d.ts +0 -263
- package/es/global-config/locale/ko_KR.d.ts +0 -263
- package/es/global-config/locale/ru_RU.d.ts +0 -263
- package/es/global-config/locale/zh_CN.d.ts +0 -263
- package/es/global-config/locale/zh_TW.d.ts +0 -263
- package/es/global-config/mobile/default-config.d.ts +0 -7
- package/es/global-config/mobile/locale/ar_KW.d.ts +0 -98
- package/es/global-config/mobile/locale/en_US.d.ts +0 -99
- package/es/global-config/mobile/locale/it_IT.d.ts +0 -99
- package/es/global-config/mobile/locale/ja_JP.d.ts +0 -99
- package/es/global-config/mobile/locale/ko_KR.d.ts +0 -99
- package/es/global-config/mobile/locale/ru_RU.d.ts +0 -99
- package/es/global-config/mobile/locale/zh_CN.d.ts +0 -99
- package/es/global-config/mobile/locale/zh_TW.d.ts +0 -99
- package/es/global-config/t.d.ts +0 -25
- package/es/hooks/useAttach.d.ts +0 -10
- package/es/hooks/useCommonClassName.d.ts +0 -54
- package/es/hooks/useConfig.d.ts +0 -2
- package/es/hooks/useControlled.d.ts +0 -9
- package/es/hooks/useDeepEffect.d.ts +0 -7
- package/es/hooks/useDefaultProps.d.ts +0 -1
- package/es/hooks/useDomCallback.d.ts +0 -1
- package/es/hooks/useDomRefCallback.d.ts +0 -1
- package/es/hooks/useDragSorter.d.ts +0 -28
- package/es/hooks/useEventCallback.d.ts +0 -9
- package/es/hooks/useGlobalConfig.d.ts +0 -1
- package/es/hooks/useGlobalIcon.d.ts +0 -5
- package/es/hooks/useLastest.d.ts +0 -2
- package/es/hooks/useLayoutEffect.d.ts +0 -3
- package/es/hooks/useMouseEvent.d.ts +0 -25
- package/es/hooks/useMutationObserver.d.ts +0 -4
- package/es/hooks/usePopper.d.ts +0 -19
- package/es/hooks/useResizeObserve.d.ts +0 -1
- package/es/hooks/useRipple.d.ts +0 -0
- package/es/hooks/useSetState.d.ts +0 -7
- package/es/hooks/useVirtualScroll.d.ts +0 -30
- package/es/hooks/useWindowSize.d.ts +0 -6
- package/es/index.d.ts +0 -25
- package/es/input/Input.d.ts +0 -16
- package/es/input/InputGroup.d.ts +0 -10
- package/es/input/defaultProps.d.ts +0 -17
- package/es/input/index.d.ts +0 -6
- package/es/input/style/css.d.ts +0 -1
- package/es/input/style/index.d.ts +0 -1
- package/es/input/type.d.ts +0 -237
- package/es/input-number/InputNumber.d.ts +0 -17
- package/es/input-number/defaultProps.d.ts +0 -2
- package/es/input-number/index.d.ts +0 -5
- package/es/input-number/style/css.d.ts +0 -1
- package/es/input-number/style/index.d.ts +0 -1
- package/es/input-number/type.d.ts +0 -156
- package/es/input-number/useInputNumber.d.ts +0 -51
- package/es/ip-input/IPInput.d.ts +0 -5
- package/es/ip-input/defaultProps.d.ts +0 -2
- package/es/ip-input/index.d.ts +0 -3
- package/es/ip-input/style/css.d.ts +0 -1
- package/es/ip-input/style/index.d.ts +0 -1
- package/es/ip-input/type.d.ts +0 -113
- package/es/ip-input/utils.d.ts +0 -35
- package/es/layout/Aside.d.ts +0 -11
- package/es/layout/Layout.d.ts +0 -26
- package/es/layout/defaultProps.d.ts +0 -5
- package/es/layout/index.d.ts +0 -10
- package/es/layout/style/css.d.ts +0 -1
- package/es/layout/style/index.d.ts +0 -1
- package/es/layout/type.d.ts +0 -38
- package/es/list/List.d.ts +0 -17
- package/es/list/ListItem.d.ts +0 -15
- package/es/list/ListItemMeta.d.ts +0 -10
- package/es/list/defaultProps.d.ts +0 -7
- package/es/list/hooks/useListVirtualScroll.d.ts +0 -24
- package/es/list/index.d.ts +0 -10
- package/es/list/style/css.d.ts +0 -1
- package/es/list/style/index.d.ts +0 -1
- package/es/list/type.d.ts +0 -92
- package/es/loading/Gradient.d.ts +0 -6
- package/es/loading/Loading.d.ts +0 -7
- package/es/loading/circleAdapter.d.ts +0 -1
- package/es/loading/defaultProps.d.ts +0 -2
- package/es/loading/index.d.ts +0 -5
- package/es/loading/style/css.d.ts +0 -1
- package/es/loading/style/index.d.ts +0 -1
- package/es/loading/type.d.ts +0 -68
- package/es/loading/utils/setStyle.d.ts +0 -7
- package/es/locale/LocalReceiver.d.ts +0 -6
- package/es/locale/ar_KW.d.ts +0 -3
- package/es/locale/en_US.d.ts +0 -3
- package/es/locale/it_IT.d.ts +0 -3
- package/es/locale/ja_JP.d.ts +0 -3
- package/es/locale/ko_KR.d.ts +0 -3
- package/es/locale/ru_RU.d.ts +0 -3
- package/es/locale/zh_CN.d.ts +0 -3
- package/es/locale/zh_TW.d.ts +0 -3
- package/es/myform/index.d.ts +0 -0
- package/es/notification/Notify.d.ts +0 -11
- package/es/notification/NotifyContainer.d.ts +0 -13
- package/es/notification/NotifyContext.d.ts +0 -23
- package/es/notification/NotifyItem.d.ts +0 -4
- package/es/notification/index.d.ts +0 -3
- package/es/notification/style/css.d.ts +0 -1
- package/es/notification/style/index.d.ts +0 -1
- package/es/notification/type.d.ts +0 -22
- package/es/popup/Popup.d.ts +0 -21
- package/es/popup/defaultProps.d.ts +0 -5
- package/es/popup/hooks/useTrigger.d.ts +0 -20
- package/es/popup/index.d.ts +0 -5
- package/es/popup/style/css.d.ts +0 -1
- package/es/popup/style/index.d.ts +0 -1
- package/es/popup/type.d.ts +0 -109
- package/es/portal/Portal.d.ts +0 -16
- package/es/portal/index.d.ts +0 -1
- package/es/radio/Radio.d.ts +0 -8
- package/es/radio/RadioGroup.d.ts +0 -14
- package/es/radio/defaultProps.d.ts +0 -3
- package/es/radio/index.d.ts +0 -10
- package/es/radio/style/css.d.ts +0 -0
- package/es/radio/style/index.d.ts +0 -1
- package/es/radio/type.d.ts +0 -117
- package/es/radio/useKeyboard.d.ts +0 -4
- package/es/select/Option.d.ts +0 -24
- package/es/select/OptionGroup.d.ts +0 -7
- package/es/select/PopupContent.d.ts +0 -24
- package/es/select/Select.d.ts +0 -13
- package/es/select/defaultProps.d.ts +0 -4
- package/es/select/hooks/useOptions.d.ts +0 -16
- package/es/select/hooks/usePanelVirtualScroll.d.ts +0 -24
- package/es/select/index.d.ts +0 -8
- package/es/select/style/css.d.ts +0 -1
- package/es/select/style/index.d.ts +0 -1
- package/es/select/type.d.ts +0 -344
- package/es/select/utils/helper.d.ts +0 -18
- package/es/select-input/SelectInput.d.ts +0 -11
- package/es/select-input/defaultProps.d.ts +0 -2
- package/es/select-input/hook/useMultiple.d.ts +0 -23
- package/es/select-input/hook/useOverlayInnerStyle.d.ts +0 -11
- package/es/select-input/hook/useSingle.d.ts +0 -16
- package/es/select-input/index.d.ts +0 -5
- package/es/select-input/interface.d.ts +0 -17
- package/es/select-input/style/css.d.ts +0 -1
- package/es/select-input/style/index.d.ts +0 -1
- package/es/select-input/type.d.ts +0 -243
- package/es/slider/Slider.d.ts +0 -7
- package/es/slider/SliderHandleButton.d.ts +0 -11
- package/es/slider/defaultProps.d.ts +0 -5
- package/es/slider/index.d.ts +0 -5
- package/es/slider/style/css.d.ts +0 -1
- package/es/slider/style/index.d.ts +0 -1
- package/es/slider/type.d.ts +0 -78
- package/es/space/defaultProps.d.ts +0 -0
- package/es/space/index.d.ts +0 -0
- package/es/space/type.d.ts +0 -0
- package/es/style/index.d.ts +0 -1
- package/es/switch/Switch.d.ts +0 -9
- package/es/switch/defaultProps.d.ts +0 -2
- package/es/switch/index.d.ts +0 -4
- package/es/switch/style/css.d.ts +0 -1
- package/es/switch/style/index.d.ts +0 -1
- package/es/switch/type.d.ts +0 -48
- package/es/tab/TabBar.d.ts +0 -9
- package/es/tab/TabNav.d.ts +0 -10
- package/es/tab/TabNavItem.d.ts +0 -15
- package/es/tab/TabPanel.d.ts +0 -9
- package/es/tab/Tabs.d.ts +0 -10
- package/es/tab/defaultProps.d.ts +0 -3
- package/es/tab/index.d.ts +0 -8
- package/es/tab/style/index.d.ts +0 -1
- package/es/tab/type.d.ts +0 -130
- package/es/tab/useTabClass.d.ts +0 -8
- package/es/table/Cell.d.ts +0 -18
- package/es/table/TBody.d.ts +0 -28
- package/es/table/THead.d.ts +0 -10
- package/es/table/TR.d.ts +0 -28
- package/es/table/Table.d.ts +0 -6
- package/es/table/defaultProps.d.ts +0 -2
- package/es/table/hooks/index.d.ts +0 -4
- package/es/table/hooks/useTableClassName.d.ts +0 -26
- package/es/table/hooks/useTableStyle.d.ts +0 -11
- package/es/table/index.d.ts +0 -5
- package/es/table/style/css.d.ts +0 -1
- package/es/table/style/index.d.ts +0 -1
- package/es/table/type.d.ts +0 -195
- package/es/tag/Tag.d.ts +0 -14
- package/es/tag/defaultProps.d.ts +0 -7
- package/es/tag/index.d.ts +0 -4
- package/es/tag/style/css.d.ts +0 -1
- package/es/tag/style/index.d.ts +0 -1
- package/es/tag/type.d.ts +0 -169
- package/es/tag-input/TagInput.d.ts +0 -9
- package/es/tag-input/defaultProps.d.ts +0 -2
- package/es/tag-input/hooks/useHover.d.ts +0 -17
- package/es/tag-input/hooks/useTagList.d.ts +0 -30
- package/es/tag-input/hooks/useTagScroll.d.ts +0 -25
- package/es/tag-input/index.d.ts +0 -5
- package/es/tag-input/style/css.d.ts +0 -1
- package/es/tag-input/style/index.d.ts +0 -1
- package/es/tag-input/type.d.ts +0 -235
- package/es/tag-input/useTagList.d.ts +0 -30
- package/es/utils/composeRefs.d.ts +0 -2
- package/es/utils/dom.d.ts +0 -7
- package/es/utils/forwardRefWithStatics.d.ts +0 -2
- package/es/utils/getScrollbarWidth.d.ts +0 -6
- package/es/utils/helper.d.ts +0 -46
- package/es/utils/input-number/large-number.d.ts +0 -85
- package/es/utils/input-number/number.d.ts +0 -81
- package/es/utils/isFragment.d.ts +0 -4
- package/es/utils/listener.d.ts +0 -4
- package/es/utils/log/index.d.ts +0 -2
- package/es/utils/log/log.d.ts +0 -3
- package/es/utils/log/types.d.ts +0 -8
- package/es/utils/noop.d.ts +0 -2
- package/es/utils/number.d.ts +0 -7
- package/es/utils/parentTNode.d.ts +0 -10
- package/es/utils/parseTNode.d.ts +0 -10
- package/es/utils/react-render.d.ts +0 -16
- package/es/utils/ref.d.ts +0 -1
- package/es/utils/refs.d.ts +0 -13
- package/es/utils/scroll.d.ts +0 -3
- package/es/utils/style.d.ts +0 -4
- package/es/utils/transition.d.ts +0 -20
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
.t-button {
|
|
2
2
|
font: var(--td-font-body-medium);
|
|
3
3
|
color: var(--td-text-color-primary);
|
|
4
|
-
|
|
5
|
-
box-sizing: border-box;
|
|
4
|
+
box-sizing: border-box;
|
|
6
5
|
margin: 0;
|
|
7
6
|
padding: 0;
|
|
8
7
|
list-style: none;
|
|
@@ -16,30 +15,20 @@
|
|
|
16
15
|
border-color: transparent;
|
|
17
16
|
background-color: transparent;
|
|
18
17
|
cursor: pointer;
|
|
19
|
-
display: -webkit-inline-box;
|
|
20
|
-
display: -ms-inline-flexbox;
|
|
21
18
|
display: inline-flex;
|
|
22
|
-
-
|
|
23
|
-
|
|
24
|
-
align-items: center;
|
|
25
|
-
-webkit-box-pack: center;
|
|
26
|
-
-ms-flex-pack: center;
|
|
27
|
-
justify-content: center;
|
|
19
|
+
align-items: center;
|
|
20
|
+
justify-content: center;
|
|
28
21
|
vertical-align: middle;
|
|
29
22
|
white-space: nowrap;
|
|
30
23
|
border-radius: var(--td-radius-default);
|
|
31
|
-
-webkit-transition: all 0.2s linear;
|
|
32
24
|
transition: all 0.2s linear;
|
|
33
|
-
|
|
34
|
-
touch-action: manipulation;
|
|
25
|
+
touch-action: manipulation;
|
|
35
26
|
text-decoration: none;
|
|
36
27
|
}
|
|
37
28
|
.t-button .t-button__text,
|
|
38
29
|
.t-button .t-icon {
|
|
39
30
|
position: relative;
|
|
40
31
|
z-index: 1;
|
|
41
|
-
display: -webkit-inline-box;
|
|
42
|
-
display: -ms-inline-flexbox;
|
|
43
32
|
display: inline-flex;
|
|
44
33
|
}
|
|
45
34
|
.t-button .t-icon {
|
|
@@ -55,8 +44,6 @@
|
|
|
55
44
|
margin-left: 8px;
|
|
56
45
|
}
|
|
57
46
|
.t-button .t-button__suffix:not(:empty) {
|
|
58
|
-
display: -webkit-inline-box;
|
|
59
|
-
display: -ms-inline-flexbox;
|
|
60
47
|
display: inline-flex;
|
|
61
48
|
margin-left: 8px;
|
|
62
49
|
}
|
|
@@ -1171,8 +1158,6 @@
|
|
|
1171
1158
|
border-radius: calc(var(--td-comp-size-xl) / 2);
|
|
1172
1159
|
}
|
|
1173
1160
|
.t-button.t-size-full-width {
|
|
1174
|
-
display: -webkit-box;
|
|
1175
|
-
display: -ms-flexbox;
|
|
1176
1161
|
display: flex;
|
|
1177
1162
|
width: 100%;
|
|
1178
1163
|
}
|
|
@@ -1,33 +1,24 @@
|
|
|
1
1
|
.t-checkbox-group {
|
|
2
2
|
font: var(--td-font-body-medium);
|
|
3
3
|
color: var(--td-text-color-primary);
|
|
4
|
-
|
|
5
|
-
box-sizing: border-box;
|
|
4
|
+
box-sizing: border-box;
|
|
6
5
|
margin: 0;
|
|
7
6
|
padding: 0;
|
|
8
7
|
list-style: none;
|
|
9
|
-
display: -webkit-inline-box;
|
|
10
|
-
display: -ms-inline-flexbox;
|
|
11
8
|
display: inline-flex;
|
|
12
|
-
|
|
13
|
-
flex-wrap: wrap;
|
|
9
|
+
flex-wrap: wrap;
|
|
14
10
|
gap: 16px;
|
|
15
11
|
}
|
|
16
12
|
|
|
17
13
|
.t-checkbox {
|
|
18
14
|
font: var(--td-font-body-medium);
|
|
19
15
|
color: var(--td-text-color-primary);
|
|
20
|
-
|
|
21
|
-
box-sizing: border-box;
|
|
16
|
+
box-sizing: border-box;
|
|
22
17
|
margin: 0;
|
|
23
18
|
padding: 0;
|
|
24
19
|
list-style: none;
|
|
25
|
-
display: -webkit-inline-box;
|
|
26
|
-
display: -ms-inline-flexbox;
|
|
27
20
|
display: inline-flex;
|
|
28
|
-
-
|
|
29
|
-
-ms-flex-align: center;
|
|
30
|
-
align-items: center;
|
|
21
|
+
align-items: center;
|
|
31
22
|
position: relative;
|
|
32
23
|
cursor: pointer;
|
|
33
24
|
color: var(--td-text-color-primary);
|
|
@@ -58,17 +49,14 @@
|
|
|
58
49
|
border: 1px solid var(--td-border-level-2-color);
|
|
59
50
|
border-radius: var(--td-radius-default);
|
|
60
51
|
background-color: var(--td-bg-color-container);
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
-ms-flex-negative: 0;
|
|
64
|
-
flex-shrink: 0;
|
|
52
|
+
box-sizing: border-box;
|
|
53
|
+
flex-shrink: 0;
|
|
65
54
|
}
|
|
66
55
|
.t-checkbox__input::after {
|
|
67
56
|
content: "";
|
|
68
57
|
position: absolute;
|
|
69
58
|
opacity: 0;
|
|
70
|
-
|
|
71
|
-
box-sizing: border-box;
|
|
59
|
+
box-sizing: border-box;
|
|
72
60
|
}
|
|
73
61
|
.t-checkbox__label {
|
|
74
62
|
display: inline-block;
|
|
@@ -78,13 +66,11 @@
|
|
|
78
66
|
}
|
|
79
67
|
.t-checkbox:hover .t-checkbox__input {
|
|
80
68
|
border-color: var(--td-brand-color);
|
|
81
|
-
-webkit-transition: border-color 0.2s linear;
|
|
82
69
|
transition: border-color 0.2s linear;
|
|
83
70
|
}
|
|
84
71
|
.t-checkbox.t-is-checked .t-checkbox__input {
|
|
85
72
|
border-color: var(--td-brand-color);
|
|
86
73
|
background-color: var(--td-brand-color);
|
|
87
|
-
-webkit-transition: background-color 0.2s cubic-bezier(0.82, 0, 1, 0.9);
|
|
88
74
|
transition: background-color 0.2s cubic-bezier(0.82, 0, 1, 0.9);
|
|
89
75
|
}
|
|
90
76
|
.t-checkbox.t-is-checked .t-checkbox__input::after {
|
|
@@ -97,14 +83,12 @@
|
|
|
97
83
|
border-radius: 0 0 1px;
|
|
98
84
|
border-top: 0;
|
|
99
85
|
border-left: 0;
|
|
100
|
-
|
|
101
|
-
transform: rotate(45deg) scale(1) translate(-50%, -50%);
|
|
86
|
+
transform: rotate(45deg) scale(1) translate(-50%, -50%);
|
|
102
87
|
background: transparent;
|
|
103
88
|
}
|
|
104
89
|
.t-checkbox.t-is-indeterminate .t-checkbox__input {
|
|
105
90
|
border-color: var(--td-brand-color);
|
|
106
91
|
background-color: var(--td-brand-color);
|
|
107
|
-
-webkit-transition: background-color 0.2s cubic-bezier(0.82, 0, 1, 0.9);
|
|
108
92
|
transition: background-color 0.2s cubic-bezier(0.82, 0, 1, 0.9);
|
|
109
93
|
}
|
|
110
94
|
.t-checkbox.t-is-indeterminate .t-checkbox__input::after {
|
|
@@ -115,8 +99,7 @@
|
|
|
115
99
|
right: 0;
|
|
116
100
|
top: 5px;
|
|
117
101
|
border: unset;
|
|
118
|
-
|
|
119
|
-
transform: scale(0.5);
|
|
102
|
+
transform: scale(0.5);
|
|
120
103
|
background-color: var(--td-font-white-1);
|
|
121
104
|
}
|
|
122
105
|
.t-checkbox.t-is-disabled {
|
|
@@ -36,14 +36,14 @@ import '../input/index.js';
|
|
|
36
36
|
import '../input/Input.js';
|
|
37
37
|
import '@tendaui/icons';
|
|
38
38
|
import '../_chunks/dep-D6YxJv-F.js';
|
|
39
|
+
import '../_chunks/dep-CD_4-1Xb.js';
|
|
40
|
+
import '../config-provider/index.js';
|
|
41
|
+
import '../config-provider/ConfigProvider.js';
|
|
39
42
|
import '../input/InputGroup.js';
|
|
40
43
|
import '../input/style/css.js';
|
|
41
44
|
import '../_chunks/dep-U1T8CQY9.js';
|
|
42
45
|
import './utils/color-picker/index.js';
|
|
43
46
|
import '../_chunks/dep-DTlQ2dCA.js';
|
|
44
|
-
import '../_chunks/dep-CD_4-1Xb.js';
|
|
45
|
-
import '../config-provider/index.js';
|
|
46
|
-
import '../config-provider/ConfigProvider.js';
|
|
47
47
|
import './components/panel/alpha.js';
|
|
48
48
|
import './components/panel/slider.js';
|
|
49
49
|
import '../_chunks/dep-BbeHB7S3.js';
|
|
@@ -44,6 +44,9 @@ import '../../../../input/index.js';
|
|
|
44
44
|
import '../../../../input/Input.js';
|
|
45
45
|
import '@tendaui/icons';
|
|
46
46
|
import '../../../../_chunks/dep-D6YxJv-F.js';
|
|
47
|
+
import '../../../../_chunks/dep-CD_4-1Xb.js';
|
|
48
|
+
import '../../../../config-provider/index.js';
|
|
49
|
+
import '../../../../config-provider/ConfigProvider.js';
|
|
47
50
|
import '../../../../input/InputGroup.js';
|
|
48
51
|
import '../../../../input/style/css.js';
|
|
49
52
|
import '../../../../select-input/hook/useMultiple.js';
|
|
@@ -68,7 +71,7 @@ import 'react-fast-compare';
|
|
|
68
71
|
import 'react-transition-group';
|
|
69
72
|
import '../../../../popup/style/css.js';
|
|
70
73
|
import '../../../../select-input/style/css.js';
|
|
71
|
-
import '../../../../_chunks/dep-
|
|
74
|
+
import '../../../../_chunks/dep-aX8qrQpB.js';
|
|
72
75
|
import '../../../../select/style/css.js';
|
|
73
76
|
import '../../../../input-number/index.js';
|
|
74
77
|
import '../../../../input-number/InputNumber.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../../components/color-picker/components/panel/format/index.tsx"],"sourcesContent":["import React, { useState } from \"react\";\nimport { Color, getColorFormatOptions } from \"../../../utils/color-picker\";\nimport Select from \"../../../../select\";\nimport type { TdColorPickerProps } from \"../../../type\";\nimport FormatInputs from \"./inputs\";\n\nexport interface TdColorFormatProps extends TdColorPickerProps {\n onInputChange: () => void;\n baseClassName: string;\n color: Color;\n}\n\nconst FormatPanel = (props: TdColorFormatProps) => {\n const { enableAlpha, baseClassName, format, selectInputProps } = props;\n const [formatMode, setFormatMode] = useState(format);\n\n const handleModeChange = (v: TdColorPickerProps[\"format\"]) => {\n setFormatMode(v);\n };\n\n return (\n <div className={`${baseClassName}__format`}>\n <div className={`${baseClassName}__format--item`}>\n <Select\n size=\"small\"\n className={`${baseClassName}__format-mode-select`}\n popupProps={{\n overlayClassName: `${baseClassName}__select-options`,\n ...selectInputProps?.popupProps\n }}\n autoWidth\n value={formatMode}\n onChange={handleModeChange}\n >\n {getColorFormatOptions(enableAlpha).map((item) => (\n <Select.Option key={item} value={item} label={item} style={{ fontSize: \"12px\" }} />\n ))}\n </Select>\n </div>\n <div className={`${baseClassName}__format--item`}>\n <FormatInputs {...props} format={formatMode} />\n </div>\n </div>\n );\n};\n\nexport default React.memo(FormatPanel);\n"],"names":["FormatPanel","props","enableAlpha","baseClassName","format","selectInputProps","_useState","useState","_useState2","_slicedToArray","formatMode","setFormatMode","handleModeChange","v","React","createElement","className","concat","Select","size","popupProps","_objectSpread","overlayClassName","autoWidth","value","onChange","getColorFormatOptions","map","item","Option","key","label","style","fontSize","FormatInputs","memo"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../../components/color-picker/components/panel/format/index.tsx"],"sourcesContent":["import React, { useState } from \"react\";\nimport { Color, getColorFormatOptions } from \"../../../utils/color-picker\";\nimport Select from \"../../../../select\";\nimport type { TdColorPickerProps } from \"../../../type\";\nimport FormatInputs from \"./inputs\";\n\nexport interface TdColorFormatProps extends TdColorPickerProps {\n onInputChange: () => void;\n baseClassName: string;\n color: Color;\n}\n\nconst FormatPanel = (props: TdColorFormatProps) => {\n const { enableAlpha, baseClassName, format, selectInputProps } = props;\n const [formatMode, setFormatMode] = useState(format);\n\n const handleModeChange = (v: TdColorPickerProps[\"format\"]) => {\n setFormatMode(v);\n };\n\n return (\n <div className={`${baseClassName}__format`}>\n <div className={`${baseClassName}__format--item`}>\n <Select\n size=\"small\"\n className={`${baseClassName}__format-mode-select`}\n popupProps={{\n overlayClassName: `${baseClassName}__select-options`,\n ...selectInputProps?.popupProps\n }}\n autoWidth\n value={formatMode}\n onChange={handleModeChange}\n >\n {getColorFormatOptions(enableAlpha).map((item) => (\n <Select.Option key={item} value={item} label={item} style={{ fontSize: \"12px\" }} />\n ))}\n </Select>\n </div>\n <div className={`${baseClassName}__format--item`}>\n <FormatInputs {...props} format={formatMode} />\n </div>\n </div>\n );\n};\n\nexport default React.memo(FormatPanel);\n"],"names":["FormatPanel","props","enableAlpha","baseClassName","format","selectInputProps","_useState","useState","_useState2","_slicedToArray","formatMode","setFormatMode","handleModeChange","v","React","createElement","className","concat","Select","size","popupProps","_objectSpread","overlayClassName","autoWidth","value","onChange","getColorFormatOptions","map","item","Option","key","label","style","fontSize","FormatInputs","memo"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAYA,IAAMA,WAAA,GAAc,SAAdA,WAAAA,CAAeC,KAAA,EAA8B;AACjD,EAAA,IAAQC,WAAA,GAAyDD,KAAA,CAAzDC,WAAA;IAAaC,aAAA,GAA4CF,KAAA,CAA5CE,aAAA;IAAeC,MAAA,GAA6BH,KAAA,CAA7BG,MAAA;IAAQC,mBAAqBJ,KAAA,CAArBI;AAC5C,EAAA,IAAAC,SAAA,GAAoCC,SAASH,MAAM,CAAA;IAAAI,UAAA,GAAAC,cAAA,CAAAH,SAAA,EAAA,CAAA,CAAA;AAA5CI,IAAAA,UAAA,GAAAF,UAAA,CAAA,CAAA,CAAA;AAAYG,IAAAA,aAAa,GAAAH,UAAA,CAAA,CAAA,CAAA;AAEhC,EAAA,IAAMI,gBAAA,GAAmB,SAAnBA,gBAAAA,CAAoBC,CAAA,EAAoC;IAC5DF,aAAA,CAAcE,CAAC,CAAA;EACjB,CAAA;AAEA,EAAA,sBACEC,KAAA,CAAAC,aAAA,CAAC,KAAA,EAAA;IAAIC,SAAA,EAAA,EAAA,CAAAC,MAAA,CAAcd,aAAa,EAAA,UAAA;AAAA,GAAA,iBAC9BW,KAAA,CAAAC,aAAA,CAAC,KAAA,EAAA;IAAIC,SAAA,EAAA,EAAA,CAAAC,MAAA,CAAcd,aAAa,EAAA,gBAAA;AAAA,G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
import 'dayjs';
|
|
25
|
+
import '../../../../_chunks/dep-CD_4-1Xb.js';
|
|
26
|
+
import '../../../../config-provider/index.js';
|
|
27
|
+
import '../../../../config-provider/ConfigProvider.js';
|
|
25
28
|
import '../../../../input/InputGroup.js';
|
|
26
29
|
import '../../../../input/style/css.js';
|
|
27
30
|
import '../../../../input-number/InputNumber.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inputs.js","sources":["../../../../../../components/color-picker/components/panel/format/inputs.tsx"],"sourcesContent":["import React, { useRef, useEffect } from \"react\";\nimport { throttle } from \"lodash-es\";\nimport { Color, getColorFormatInputs, getColorFormatMap } from \"../../../utils/color-picker\";\nimport type { TdColorFormatProps } from \".\";\nimport Input from \"../../../../input\";\nimport InputNumber from \"../../../../input-number\";\n\nconst FormatInputs = (props: TdColorFormatProps) => {\n const { format, enableAlpha, inputProps, disabled, onInputChange, color } = props;\n const modelValueRef = useRef<Record<string, number | string>>({});\n const lastModelValue = useRef<Record<string, number | string>>({});\n const inputKey = useRef<number>(0);\n\n const updateModelValue = () => {\n const value = getColorFormatMap(color, \"encode\")[format];\n if (!value || typeof value === \"string\") return;\n\n const valueObj = value as Record<string, number | string>;\n if (enableAlpha && \"a\" in valueObj) {\n valueObj.a = Math.round(color.alpha * 100);\n }\n\n const changedFormatValue: Record<string, number | string> = {};\n Object.keys(valueObj).forEach((key) => {\n if (valueObj[key] !== modelValueRef.current[key]) {\n changedFormatValue[key] = valueObj[key];\n }\n lastModelValue.current[key] = valueObj[key];\n });\n\n if (Object.keys(changedFormatValue).length > 0) {\n modelValueRef.current = valueObj;\n }\n };\n\n const handleInputChange = (key: string, v: number | string, max: number) => {\n inputKey.current = performance.now();\n\n if (v.toString().trim() === \"\") {\n const lastValue = lastModelValue.current[key];\n color.update(lastValue as string);\n onInputChange();\n return;\n }\n\n if (!v || v === lastModelValue.current[key] || Number(v) < 0 || Number(v) > max) return;\n lastModelValue.current[key] = v;\n\n const newFormatValue = {\n ...modelValueRef.current,\n [key]: v\n };\n modelValueRef.current = newFormatValue;\n if (key === \"a\") {\n color.alpha = (v as number) / 100;\n } else if (key === \"hex\" || key === \"css\") {\n color.update(v as string);\n } else {\n color.update(Color.object2color(newFormatValue, format));\n }\n onInputChange();\n };\n\n updateModelValue();\n useEffect(() => {\n const throttleUpdate = throttle(updateModelValue, 100);\n throttleUpdate();\n return () => throttleUpdate.cancel();\n }, [color.saturation, color.hue, color.value, color.alpha, format]);\n\n return (\n <div className=\"input-group\">\n {getColorFormatInputs(format, enableAlpha).map((config) => {\n const currentValue = modelValueRef.current[config.key];\n const commonProps = {\n ...inputProps,\n disabled,\n title: currentValue,\n align: \"center\" as const,\n size: \"small\" as const,\n onBlur: (v: string) => handleInputChange(config.key, v, config.max),\n onEnter: (v: string) => handleInputChange(config.key, v, config.max)\n };\n\n return (\n <div\n className=\"input-group__item\"\n key={config.key}\n style={{\n flex: config.flex || 1\n }}\n >\n {config.type === \"input\" ? (\n <Input\n {...commonProps}\n defaultValue={currentValue as string}\n key={`${inputKey.current}-${currentValue}`}\n maxlength={format === \"HEX\" ? 9 : undefined}\n />\n ) : (\n <InputNumber\n {...commonProps}\n min={config.min}\n max={config.max}\n format={config.format as (value: number) => string}\n step={1}\n value={currentValue as number}\n onChange={(v) => handleInputChange(config.key, v ?? (config.min as number), config.max)}\n theme=\"normal\"\n />\n )}\n </div>\n );\n })}\n </div>\n );\n};\n\nexport default React.memo(FormatInputs);\n"],"names":["FormatInputs","props","format","enableAlpha","inputProps","disabled","onInputChange","color","modelValueRef","useRef","lastModelValue","inputKey","updateModelValue","value","getColorFormatMap","valueObj","a","Math","round","alpha","changedFormatValue","Object","keys","forEach","key","current","length","handleInputChange","v","max","performance","now","toString","trim","lastValue","update","Number","newFormatValue","_objectSpread","_defineProperty","Color","object2color","useEffect","throttleUpdate","throttle","cancel","saturation","hue","React","createElement","className","getColorFormatInputs","map","config","currentValue","commonProps","title","align","size","onBlur","onEnter","style","flex","type","Input","defaultValue","concat","maxlength","InputNumber","min","step","onChange","theme","memo"],"mappings":"
|
|
1
|
+
{"version":3,"file":"inputs.js","sources":["../../../../../../components/color-picker/components/panel/format/inputs.tsx"],"sourcesContent":["import React, { useRef, useEffect } from \"react\";\nimport { throttle } from \"lodash-es\";\nimport { Color, getColorFormatInputs, getColorFormatMap } from \"../../../utils/color-picker\";\nimport type { TdColorFormatProps } from \".\";\nimport Input from \"../../../../input\";\nimport InputNumber from \"../../../../input-number\";\n\nconst FormatInputs = (props: TdColorFormatProps) => {\n const { format, enableAlpha, inputProps, disabled, onInputChange, color } = props;\n const modelValueRef = useRef<Record<string, number | string>>({});\n const lastModelValue = useRef<Record<string, number | string>>({});\n const inputKey = useRef<number>(0);\n\n const updateModelValue = () => {\n const value = getColorFormatMap(color, \"encode\")[format];\n if (!value || typeof value === \"string\") return;\n\n const valueObj = value as Record<string, number | string>;\n if (enableAlpha && \"a\" in valueObj) {\n valueObj.a = Math.round(color.alpha * 100);\n }\n\n const changedFormatValue: Record<string, number | string> = {};\n Object.keys(valueObj).forEach((key) => {\n if (valueObj[key] !== modelValueRef.current[key]) {\n changedFormatValue[key] = valueObj[key];\n }\n lastModelValue.current[key] = valueObj[key];\n });\n\n if (Object.keys(changedFormatValue).length > 0) {\n modelValueRef.current = valueObj;\n }\n };\n\n const handleInputChange = (key: string, v: number | string, max: number) => {\n inputKey.current = performance.now();\n\n if (v.toString().trim() === \"\") {\n const lastValue = lastModelValue.current[key];\n color.update(lastValue as string);\n onInputChange();\n return;\n }\n\n if (!v || v === lastModelValue.current[key] || Number(v) < 0 || Number(v) > max) return;\n lastModelValue.current[key] = v;\n\n const newFormatValue = {\n ...modelValueRef.current,\n [key]: v\n };\n modelValueRef.current = newFormatValue;\n if (key === \"a\") {\n color.alpha = (v as number) / 100;\n } else if (key === \"hex\" || key === \"css\") {\n color.update(v as string);\n } else {\n color.update(Color.object2color(newFormatValue, format));\n }\n onInputChange();\n };\n\n updateModelValue();\n useEffect(() => {\n const throttleUpdate = throttle(updateModelValue, 100);\n throttleUpdate();\n return () => throttleUpdate.cancel();\n }, [color.saturation, color.hue, color.value, color.alpha, format]);\n\n return (\n <div className=\"input-group\">\n {getColorFormatInputs(format, enableAlpha).map((config) => {\n const currentValue = modelValueRef.current[config.key];\n const commonProps = {\n ...inputProps,\n disabled,\n title: currentValue,\n align: \"center\" as const,\n size: \"small\" as const,\n onBlur: (v: string) => handleInputChange(config.key, v, config.max),\n onEnter: (v: string) => handleInputChange(config.key, v, config.max)\n };\n\n return (\n <div\n className=\"input-group__item\"\n key={config.key}\n style={{\n flex: config.flex || 1\n }}\n >\n {config.type === \"input\" ? (\n <Input\n {...commonProps}\n defaultValue={currentValue as string}\n key={`${inputKey.current}-${currentValue}`}\n maxlength={format === \"HEX\" ? 9 : undefined}\n />\n ) : (\n <InputNumber\n {...commonProps}\n min={config.min}\n max={config.max}\n format={config.format as (value: number) => string}\n step={1}\n value={currentValue as number}\n onChange={(v) => handleInputChange(config.key, v ?? (config.min as number), config.max)}\n theme=\"normal\"\n />\n )}\n </div>\n );\n })}\n </div>\n );\n};\n\nexport default React.memo(FormatInputs);\n"],"names":["FormatInputs","props","format","enableAlpha","inputProps","disabled","onInputChange","color","modelValueRef","useRef","lastModelValue","inputKey","updateModelValue","value","getColorFormatMap","valueObj","a","Math","round","alpha","changedFormatValue","Object","keys","forEach","key","current","length","handleInputChange","v","max","performance","now","toString","trim","lastValue","update","Number","newFormatValue","_objectSpread","_defineProperty","Color","object2color","useEffect","throttleUpdate","throttle","cancel","saturation","hue","React","createElement","className","getColorFormatInputs","map","config","currentValue","commonProps","title","align","size","onBlur","onEnter","style","flex","type","Input","defaultValue","concat","maxlength","InputNumber","min","step","onChange","theme","memo"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA,IAAMA,YAAA,GAAe,SAAfA,YAAAA,CAAgBC,KAAA,EAA8B;AAClD,EAAA,IAAQC,MAAA,GAAoED,KAAA,C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;AAEA,qBAAA,aAAexB,KAAA,CAAMyB,KAAKzE,YAAY,CAAA;;;;"}
|
|
@@ -21,6 +21,9 @@ import '../../_chunks/dep-DGvfel3I.js';
|
|
|
21
21
|
import '../../_chunks/dep-gy8uvBaS.js';
|
|
22
22
|
import '../../_chunks/dep-5U9UjDaf.js';
|
|
23
23
|
import 'dayjs';
|
|
24
|
+
import '../../_chunks/dep-CD_4-1Xb.js';
|
|
25
|
+
import '../../config-provider/index.js';
|
|
26
|
+
import '../../config-provider/ConfigProvider.js';
|
|
24
27
|
import '../../input/InputGroup.js';
|
|
25
28
|
import '../../input/style/css.js';
|
|
26
29
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trigger.js","sources":["../../../../components/color-picker/components/trigger.tsx"],"sourcesContent":["import React from \"react\";\nimport classNames from \"classnames\";\nimport { Color, getColorObject } from \"../utils/color-picker/color\";\nimport { Input } from \"../../input\";\nimport { TdColorPickerProps } from \"../type\";\nimport useClassName from \"../hooks/useClassNames\";\nimport { TdColorContext } from \"../type\";\nimport noop from \"../../utils/noop\";\n\nexport interface ColorTriggerProps\n extends Pick<TdColorPickerProps, \"disabled\" | \"inputProps\" | \"borderless\" | \"clearable\" | \"onClear\"> {\n value?: string;\n onChange?: (v?: string, context?: TdColorContext) => void;\n}\n\nconst ColorPickerTrigger = (props: ColorTriggerProps) => {\n const baseClassName = useClassName();\n const { disabled = false, borderless = false, inputProps = { autoWidth: true }, clearable, onClear } = props;\n\n const handleChange = (input: string) => {\n if (input !== props.value) {\n props.onChange?.(input, {\n color: getColorObject(new Color(input)),\n trigger: \"input\"\n });\n }\n };\n\n return (\n <div className={`${baseClassName}__trigger--default`}>\n <Input\n borderless={borderless}\n clearable={clearable}\n {...inputProps}\n value={props.value}\n disabled={disabled}\n label={\n <div className={classNames(`${baseClassName}__trigger--default__color`, `${baseClassName}--bg-alpha`)}>\n <span className={\"color-inner\"} style={{ background: props.value }}></span>\n </div>\n }\n onChange={handleChange}\n onClear={onClear || noop}\n />\n </div>\n );\n};\n\nexport default React.memo(ColorPickerTrigger);\n"],"names":["ColorPickerTrigger","props","baseClassName","useClassName","_props$disabled","disabled","_props$borderless","borderless","_props$inputProps","inputProps","autoWidth","clearable","onClear","handleChange","input","value","_props$onChange","onChange","call","color","getColorObject","Color","trigger","React","createElement","className","concat","Input","_objectSpread","label","classNames","style","background","noop","memo"],"mappings":"
|
|
1
|
+
{"version":3,"file":"trigger.js","sources":["../../../../components/color-picker/components/trigger.tsx"],"sourcesContent":["import React from \"react\";\nimport classNames from \"classnames\";\nimport { Color, getColorObject } from \"../utils/color-picker/color\";\nimport { Input } from \"../../input\";\nimport { TdColorPickerProps } from \"../type\";\nimport useClassName from \"../hooks/useClassNames\";\nimport { TdColorContext } from \"../type\";\nimport noop from \"../../utils/noop\";\n\nexport interface ColorTriggerProps\n extends Pick<TdColorPickerProps, \"disabled\" | \"inputProps\" | \"borderless\" | \"clearable\" | \"onClear\"> {\n value?: string;\n onChange?: (v?: string, context?: TdColorContext) => void;\n}\n\nconst ColorPickerTrigger = (props: ColorTriggerProps) => {\n const baseClassName = useClassName();\n const { disabled = false, borderless = false, inputProps = { autoWidth: true }, clearable, onClear } = props;\n\n const handleChange = (input: string) => {\n if (input !== props.value) {\n props.onChange?.(input, {\n color: getColorObject(new Color(input)),\n trigger: \"input\"\n });\n }\n };\n\n return (\n <div className={`${baseClassName}__trigger--default`}>\n <Input\n borderless={borderless}\n clearable={clearable}\n {...inputProps}\n value={props.value}\n disabled={disabled}\n label={\n <div className={classNames(`${baseClassName}__trigger--default__color`, `${baseClassName}--bg-alpha`)}>\n <span className={\"color-inner\"} style={{ background: props.value }}></span>\n </div>\n }\n onChange={handleChange}\n onClear={onClear || noop}\n />\n </div>\n );\n};\n\nexport default React.memo(ColorPickerTrigger);\n"],"names":["ColorPickerTrigger","props","baseClassName","useClassName","_props$disabled","disabled","_props$borderless","borderless","_props$inputProps","inputProps","autoWidth","clearable","onClear","handleChange","input","value","_props$onChange","onChange","call","color","getColorObject","Color","trigger","React","createElement","className","concat","Input","_objectSpread","label","classNames","style","background","noop","memo"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAeA,IAAMA,kBAAA,GAAqB,SAArBA,kBAAAA,CAAsBC,KAAA,EAA6B;AACvD,EAAA,IAAMC,gBAAgBC,aAAA,EAAa;AACnC,EAAA,IAAAC,eAAA,GAAuGH,KAAA,CAA/FI,QAAA;AAAAA,IAAAA,QAAA,GAAAD,eAAA,KAAA,KAAA,CAAA,GAAW,KAAA,GAAAA,eAAA;IAAAE,iBAAA,GAAoFL,KAAA,CAA7EM,UAAA;AAAAA,IAAAA,UAAA,GAAAD,iBAAA,KAAA,KAAA,CAAA,GAAa,KAAA,GAAAA,iBAAA;IAAAE,iBAAA,GAAgEP,KAAA,CAAzDQ,UAAA;IAAAA,UAAA,GAAAD,iBAAA,KAAA,KAAA,CAAA,GAAa;AAAEE,MAAAA,SAAA,EAAW;AAAK,KAAA,GAAAF,iBAAA;IAAGG,SAAA,GAAuBV,KAAA,CAAvBU,SAAA;IAAWC,OAAA,GAAYX,KAAA,CAAZW,OAAA;AAE3F,EAAA,IAAMC,YAAA,GAAe,SAAfA,YAAAA,CAAgBC,KAAA,EAAkB;AACtC,IAAA,IAAIA,KAAA,KAAUb,MAAMc,KAAA,EAAO;AAAA,MAAA,IAAAC,eAAA;AACzB,MAAA,CAAAA,eAAA,GAAAf,KAAA,CAAMgB,oDAAND,eAAA,CAAAE,IAAA,CAAAjB,KAAA,EAAiBa,KAAA,EAAO;QACtBK,KAAA,EAAOC,cAAA,CAAe,IAAIC,KAAA,CAAMP,KAAK,CAAC,CAAA;AACtCQ,QAAAA,OAAA,EAAS;AACX,OAAC,CAAA;AACH,IAAA;EACF,CAAA;AAEA,EAAA,sBACEC,KAAA,CAAAC,aAAA,CAAC,KAAA,EAAA;IAAIC,SAAA,EAAA,EAAA,CAAAC,MAAA,CAAcxB,aAAa,EAAA,oBAAA;GAAA,iB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