@chaoswise/ui 3.0.22 → 3.1.0
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/lib/Alert/index.js +48 -2
- package/lib/Alert/index.style.js +36 -0
- package/lib/Antd5/_util/ActionButton.js +4 -2
- package/lib/Antd5/_util/ContextIsolator.js +27 -0
- package/lib/Antd5/_util/easings.js +2 -2
- package/lib/Antd5/_util/getScroll.js +9 -8
- package/lib/Antd5/_util/hooks/useClosable.js +3 -2
- package/lib/Antd5/_util/hooks/useUniqueMemo.js +123 -0
- package/lib/Antd5/_util/hooks/useZIndex.js +31 -15
- package/lib/Antd5/_util/motion.js +3 -2
- package/lib/Antd5/_util/placements.js +2 -2
- package/lib/Antd5/_util/scrollTo.js +1 -1
- package/lib/Antd5/_util/statusUtils.js +1 -1
- package/lib/Antd5/_util/toList.js +5 -0
- package/lib/Antd5/_util/warning.js +0 -1
- package/lib/Antd5/_util/wave/WaveEffect.js +2 -2
- package/lib/Antd5/_util/wave/interface.js +2 -1
- package/lib/Antd5/_util/wave/useWave.js +1 -1
- package/lib/Antd5/_util/wave/util.js +1 -9
- package/lib/Antd5/alert/Alert.js +1 -2
- package/lib/Antd5/alert/ErrorBoundary.js +1 -1
- package/lib/Antd5/alert/design/behavior-pattern.js +3 -3
- package/lib/Antd5/alert/style/index.js +6 -4
- package/lib/Antd5/anchor/Anchor.js +8 -7
- package/lib/Antd5/anchor/AnchorLink.js +4 -4
- package/lib/Antd5/app/index.js +2 -1
- package/lib/Antd5/app/style/index.js +5 -4
- package/lib/Antd5/auto-complete/index.js +1 -1
- package/lib/Antd5/avatar/group.js +35 -17
- package/lib/Antd5/avatar/style/index.js +18 -13
- package/lib/Antd5/back-top/index.js +3 -2
- package/lib/Antd5/badge/ScrollNumber.js +1 -1
- package/lib/Antd5/badge/SingleNumber.js +17 -16
- package/lib/Antd5/badge/style/index.js +6 -7
- package/lib/Antd5/badge/style/ribbon.js +3 -3
- package/lib/Antd5/breadcrumb/design/behavior-pattern.js +4 -4
- package/lib/Antd5/breadcrumb/style/index.js +2 -2
- package/lib/Antd5/button/LoadingIcon.js +5 -10
- package/lib/Antd5/button/button-group.js +0 -1
- package/lib/Antd5/button/button.js +70 -41
- package/lib/Antd5/button/buttonHelpers.js +7 -5
- package/lib/Antd5/button/style/{compactCmp.js → compact.js} +20 -27
- package/lib/Antd5/button/style/group.js +9 -7
- package/lib/Antd5/button/style/index.js +150 -110
- package/lib/Antd5/button/style/token.js +8 -1
- package/lib/Antd5/calendar/generateCalendar.js +25 -28
- package/lib/Antd5/calendar/style/index.js +4 -4
- package/lib/Antd5/card/Card.js +3 -3
- package/lib/Antd5/card/style/index.js +6 -9
- package/lib/Antd5/carousel/index.js +3 -3
- package/lib/Antd5/carousel/style/index.js +1 -1
- package/lib/Antd5/cascader/Panel.js +7 -2
- package/lib/Antd5/cascader/hooks/useBase.js +3 -2
- package/lib/Antd5/cascader/hooks/useColumnIcons.js +6 -3
- package/lib/Antd5/cascader/index.js +1 -1
- package/lib/Antd5/cascader/style/columns.js +6 -4
- package/lib/Antd5/checkbox/Checkbox.js +11 -5
- package/lib/Antd5/checkbox/style/index.js +6 -3
- package/lib/Antd5/collapse/Collapse.js +2 -1
- package/lib/Antd5/collapse/style/index.js +20 -13
- package/lib/Antd5/color-picker/ColorPicker.js +120 -78
- package/lib/Antd5/color-picker/ColorPickerPanel.js +44 -26
- package/lib/Antd5/color-picker/color.js +82 -10
- package/lib/Antd5/color-picker/components/ColorAlphaInput.js +2 -2
- package/lib/Antd5/color-picker/components/ColorClear.js +2 -2
- package/lib/Antd5/color-picker/components/ColorHexInput.js +5 -4
- package/lib/Antd5/color-picker/components/ColorInput.js +4 -3
- package/lib/Antd5/color-picker/components/ColorPresets.js +1 -1
- package/lib/Antd5/color-picker/components/ColorSlider.js +139 -0
- package/lib/Antd5/color-picker/components/ColorTrigger.js +52 -26
- package/lib/Antd5/color-picker/components/PanelPicker/GradientColorBar.js +130 -0
- package/lib/Antd5/color-picker/components/PanelPicker/index.js +194 -0
- package/lib/Antd5/color-picker/context.js +1 -5
- package/lib/Antd5/color-picker/hooks/useModeColor.js +87 -0
- package/lib/Antd5/color-picker/style/color-block.js +3 -2
- package/lib/Antd5/color-picker/style/index.js +33 -15
- package/lib/Antd5/color-picker/style/input.js +1 -1
- package/lib/Antd5/color-picker/style/picker.js +6 -33
- package/lib/Antd5/color-picker/style/slider.js +87 -0
- package/lib/Antd5/color-picker/util.js +53 -7
- package/lib/Antd5/config-provider/context.js +3 -1
- package/lib/Antd5/config-provider/cssVariables.js +0 -1
- package/lib/Antd5/config-provider/defaultRenderEmpty.js +8 -1
- package/lib/Antd5/config-provider/index.js +13 -5
- package/lib/Antd5/config-provider/style/index.js +0 -1
- package/lib/Antd5/date-picker/PickerButton.js +3 -2
- package/lib/Antd5/date-picker/design/behavior-pattern.js +15 -15
- package/lib/Antd5/date-picker/generatePicker/constant.js +15 -0
- package/lib/Antd5/date-picker/generatePicker/generateRangePicker.js +16 -11
- package/lib/Antd5/date-picker/generatePicker/generateSinglePicker.js +19 -15
- package/lib/Antd5/date-picker/generatePicker/index.js +2 -2
- package/lib/Antd5/date-picker/generatePicker/interface.js +1 -1
- package/lib/Antd5/date-picker/index.js +2 -17
- package/lib/Antd5/date-picker/locale/ar_EG.js +9 -1
- package/lib/Antd5/date-picker/locale/az_AZ.js +9 -1
- package/lib/Antd5/date-picker/locale/el_GR.js +9 -1
- package/lib/Antd5/date-picker/locale/ja_JP.js +11 -1
- package/lib/Antd5/date-picker/locale/kn_IN.js +9 -1
- package/lib/Antd5/date-picker/locale/pl_PL.js +9 -1
- package/lib/Antd5/date-picker/locale/uk_UA.js +10 -1
- package/lib/Antd5/date-picker/style/index.js +13 -10
- package/lib/Antd5/date-picker/style/panel.js +36 -32
- package/lib/Antd5/date-picker/style/token.js +1 -1
- package/lib/Antd5/date-picker/util.js +0 -48
- package/lib/Antd5/descriptions/hooks/useItems.js +5 -0
- package/lib/Antd5/descriptions/hooks/useRow.js +42 -34
- package/lib/Antd5/descriptions/style/index.js +20 -8
- package/lib/Antd5/divider/index.js +4 -3
- package/lib/Antd5/divider/style/index.js +19 -4
- package/lib/Antd5/drawer/DrawerPanel.js +11 -20
- package/lib/Antd5/drawer/index.js +39 -42
- package/lib/Antd5/drawer/style/index.js +10 -11
- package/lib/Antd5/dropdown/dropdown.js +5 -7
- package/lib/Antd5/dropdown/style/index.js +27 -11
- package/lib/Antd5/empty/empty.js +9 -3
- package/lib/Antd5/empty/simple.js +9 -3
- package/lib/Antd5/empty/style/index.js +1 -1
- package/lib/Antd5/float-button/BackTop.js +3 -2
- package/lib/Antd5/float-button/FloatButton.js +16 -5
- package/lib/Antd5/float-button/FloatButtonGroup.js +76 -52
- package/lib/Antd5/float-button/style/index.js +117 -76
- package/lib/Antd5/float-button/style/keyframes.js +118 -0
- package/lib/Antd5/form/ErrorList.js +14 -2
- package/lib/Antd5/form/Form.js +11 -3
- package/lib/Antd5/form/FormItem/ItemHolder.js +8 -4
- package/lib/Antd5/form/FormItem/index.js +6 -4
- package/lib/Antd5/form/FormItemInput.js +68 -28
- package/lib/Antd5/form/FormItemLabel.js +3 -3
- package/lib/Antd5/form/hooks/useForm.js +8 -1
- package/lib/Antd5/form/hooks/useVariants.js +10 -4
- package/lib/Antd5/form/style/explain.js +9 -8
- package/lib/Antd5/form/style/index.js +30 -18
- package/lib/Antd5/grid/row.js +2 -2
- package/lib/Antd5/image/index.js +3 -1
- package/lib/Antd5/image/style/index.js +17 -20
- package/lib/Antd5/index.js +2 -1
- package/lib/Antd5/input/Input.js +18 -38
- package/lib/Antd5/input/OTP/OTPInput.js +10 -5
- package/lib/Antd5/input/OTP/index.js +12 -4
- package/lib/Antd5/input/Password.js +6 -2
- package/lib/Antd5/input/Search.js +2 -4
- package/lib/Antd5/input/TextArea.js +1 -1
- package/lib/Antd5/input/style/index.js +72 -63
- package/lib/Antd5/input/style/otp.js +1 -1
- package/lib/Antd5/input/style/variants.js +38 -23
- package/lib/Antd5/input/utils.js +0 -1
- package/lib/Antd5/input-number/index.js +19 -22
- package/lib/Antd5/input-number/style/index.js +26 -16
- package/lib/Antd5/layout/Sider.js +15 -8
- package/lib/Antd5/layout/style/index.js +6 -96
- package/lib/Antd5/layout/style/sider.js +115 -0
- package/lib/Antd5/list/Item.js +18 -5
- package/lib/Antd5/list/index.js +15 -10
- package/lib/Antd5/list/style/index.js +40 -41
- package/lib/Antd5/locale/ar_EG.js +14 -1
- package/lib/Antd5/locale/az_AZ.js +78 -28
- package/lib/Antd5/locale/bn_BD.js +0 -1
- package/lib/Antd5/locale/by_BY.js +0 -1
- package/lib/Antd5/locale/ca_ES.js +0 -1
- package/lib/Antd5/locale/cs_CZ.js +0 -1
- package/lib/Antd5/locale/de_DE.js +0 -1
- package/lib/Antd5/locale/el_GR.js +104 -3
- package/lib/Antd5/locale/en_GB.js +0 -1
- package/lib/Antd5/locale/en_US.js +4 -2
- package/lib/Antd5/locale/es_ES.js +10 -6
- package/lib/Antd5/locale/et_EE.js +0 -1
- package/lib/Antd5/locale/eu_ES.js +4 -2
- package/lib/Antd5/locale/fa_IR.js +0 -1
- package/lib/Antd5/locale/fr_BE.js +5 -1
- package/lib/Antd5/locale/fr_CA.js +0 -1
- package/lib/Antd5/locale/fr_FR.js +5 -6
- package/lib/Antd5/locale/ga_IE.js +0 -1
- package/lib/Antd5/locale/gl_ES.js +0 -1
- package/lib/Antd5/locale/he_IL.js +0 -1
- package/lib/Antd5/locale/hi_IN.js +0 -1
- package/lib/Antd5/locale/hr_HR.js +0 -1
- package/lib/Antd5/locale/id_ID.js +4 -2
- package/lib/Antd5/locale/index.js +1 -1
- package/lib/Antd5/locale/it_IT.js +0 -1
- package/lib/Antd5/locale/ja_JP.js +4 -2
- package/lib/Antd5/locale/ka_GE.js +0 -1
- package/lib/Antd5/locale/kk_KZ.js +0 -1
- package/lib/Antd5/locale/km_KH.js +0 -1
- package/lib/Antd5/locale/kn_IN.js +82 -4
- package/lib/Antd5/locale/ko_KR.js +4 -2
- package/lib/Antd5/locale/lt_LT.js +4 -2
- package/lib/Antd5/locale/ml_IN.js +0 -1
- package/lib/Antd5/locale/mn_MN.js +86 -2
- package/lib/Antd5/locale/ms_MY.js +101 -18
- package/lib/Antd5/locale/my_MM.js +0 -1
- package/lib/Antd5/locale/nb_NO.js +0 -1
- package/lib/Antd5/locale/ne_NP.js +104 -2
- package/lib/Antd5/locale/nl_BE.js +5 -1
- package/lib/Antd5/locale/nl_NL.js +5 -1
- package/lib/Antd5/locale/pl_PL.js +0 -1
- package/lib/Antd5/locale/pt_BR.js +0 -1
- package/lib/Antd5/locale/pt_PT.js +55 -38
- package/lib/Antd5/locale/ro_RO.js +0 -1
- package/lib/Antd5/locale/ru_RU.js +9 -2
- package/lib/Antd5/locale/si_LK.js +0 -1
- package/lib/Antd5/locale/sk_SK.js +0 -1
- package/lib/Antd5/locale/sr_RS.js +0 -1
- package/lib/Antd5/locale/sv_SE.js +0 -1
- package/lib/Antd5/locale/th_TH.js +11 -3
- package/lib/Antd5/locale/tk_TK.js +0 -1
- package/lib/Antd5/locale/tr_TR.js +2 -1
- package/lib/Antd5/locale/uk_UA.js +1 -1
- package/lib/Antd5/locale/ur_PK.js +0 -1
- package/lib/Antd5/locale/uz_UZ.js +6 -7
- package/lib/Antd5/locale/zh_CN.js +4 -2
- package/lib/Antd5/locale/zh_HK.js +0 -1
- package/lib/Antd5/locale/zh_TW.js +0 -1
- package/lib/Antd5/mentions/index.js +4 -4
- package/lib/Antd5/menu/MenuItem.js +6 -5
- package/lib/Antd5/menu/OverrideContext.js +4 -3
- package/lib/Antd5/menu/SubMenu.js +2 -2
- package/lib/Antd5/menu/menu.js +2 -2
- package/lib/Antd5/menu/style/index.js +58 -40
- package/lib/Antd5/menu/style/theme.js +24 -20
- package/lib/Antd5/menu/style/vertical.js +10 -7
- package/lib/Antd5/message/PurePanel.js +22 -40
- package/lib/Antd5/message/style/index.js +8 -47
- package/lib/Antd5/message/useMessage.js +3 -15
- package/lib/Antd5/modal/Modal.js +50 -38
- package/lib/Antd5/modal/PurePanel.js +0 -1
- package/lib/Antd5/modal/confirm.js +4 -5
- package/lib/Antd5/modal/style/confirm.js +1 -2
- package/lib/Antd5/modal/style/index.js +13 -3
- package/lib/Antd5/modal/useModal/HookModal.js +4 -3
- package/lib/Antd5/modal/useModal/index.js +0 -1
- package/lib/Antd5/notification/index.js +6 -3
- package/lib/Antd5/notification/style/index.js +35 -3
- package/lib/Antd5/notification/useNotification.js +6 -1
- package/lib/Antd5/pagination/Pagination.js +10 -5
- package/lib/Antd5/pagination/design/behavior-pattern.js +3 -3
- package/lib/Antd5/pagination/style/bordered.js +1 -1
- package/lib/Antd5/pagination/style/index.js +27 -18
- package/lib/Antd5/popconfirm/PurePanel.js +7 -7
- package/lib/Antd5/popover/PurePanel.js +16 -6
- package/lib/Antd5/popover/index.js +7 -19
- package/lib/Antd5/popover/style/index.js +3 -1
- package/lib/Antd5/progress/Line.js +27 -19
- package/lib/Antd5/progress/design/behavior-pattern.js +3 -3
- package/lib/Antd5/progress/progress.js +37 -11
- package/lib/Antd5/progress/style/index.js +46 -11
- package/lib/Antd5/progress/utils.js +20 -18
- package/lib/Antd5/qr-code/QrcodeStatus.js +42 -0
- package/lib/Antd5/qr-code/index.js +31 -31
- package/lib/Antd5/rate/index.js +8 -2
- package/lib/Antd5/result/noFound.js +3 -1
- package/lib/Antd5/result/serverError.js +3 -1
- package/lib/Antd5/result/unauthorized.js +5 -3
- package/lib/Antd5/segmented/index.js +5 -3
- package/lib/Antd5/segmented/style/index.js +11 -3
- package/lib/Antd5/select/index.js +4 -2
- package/lib/Antd5/select/style/dropdown.js +1 -1
- package/lib/Antd5/select/style/index.js +21 -8
- package/lib/Antd5/select/style/multiple.js +18 -9
- package/lib/Antd5/select/style/single.js +8 -10
- package/lib/Antd5/select/style/token.js +9 -2
- package/lib/Antd5/select/style/variants.js +20 -11
- package/lib/Antd5/skeleton/Image.js +6 -4
- package/lib/Antd5/skeleton/Node.js +1 -3
- package/lib/Antd5/skeleton/Paragraph.js +1 -1
- package/lib/Antd5/skeleton/Title.js +9 -6
- package/lib/Antd5/skeleton/style/index.js +13 -13
- package/lib/Antd5/slider/Context.js +4 -0
- package/lib/Antd5/slider/SliderTooltip.js +9 -5
- package/lib/Antd5/slider/index.js +32 -31
- package/lib/Antd5/slider/style/index.js +60 -44
- package/lib/Antd5/space/Compact.js +1 -1
- package/lib/Antd5/space/index.js +3 -3
- package/lib/Antd5/spin/Indicator/Looper.js +29 -0
- package/lib/Antd5/spin/Indicator/Progress.js +78 -0
- package/lib/Antd5/spin/Indicator/index.js +21 -0
- package/lib/Antd5/spin/index.js +27 -45
- package/lib/Antd5/spin/style/index.js +54 -17
- package/lib/Antd5/spin/usePercent.js +40 -0
- package/lib/Antd5/splitter/Panel.js +36 -0
- package/lib/Antd5/splitter/SplitBar.js +124 -0
- package/lib/Antd5/splitter/Splitter.js +194 -0
- package/lib/Antd5/{_util/transButton.js → splitter/hooks/useItems.js} +28 -54
- package/lib/Antd5/splitter/hooks/useResizable.js +43 -0
- package/lib/Antd5/splitter/hooks/useResize.js +138 -0
- package/lib/Antd5/splitter/hooks/useSizes.js +109 -0
- package/lib/Antd5/splitter/index.js +5 -0
- package/lib/Antd5/splitter/interface.js +1 -0
- package/lib/Antd5/splitter/style/index.js +219 -0
- package/lib/Antd5/statistic/style/index.js +1 -1
- package/lib/Antd5/steps/style/custom-icon.js +1 -1
- package/lib/Antd5/steps/style/index.js +11 -8
- package/lib/Antd5/steps/style/inline.js +5 -4
- package/lib/Antd5/steps/style/progress-dot.js +2 -2
- package/lib/Antd5/steps/style/small.js +3 -3
- package/lib/Antd5/steps/style/vertical.js +2 -2
- package/lib/Antd5/style/index.js +37 -13
- package/lib/Antd5/style/motion/slide.js +6 -5
- package/lib/Antd5/style/placementArrow.js +15 -6
- package/lib/Antd5/switch/style/index.js +1 -1
- package/lib/Antd5/table/Column.js +2 -3
- package/lib/Antd5/table/ColumnGroup.js +2 -3
- package/lib/Antd5/table/ExpandIcon.js +6 -6
- package/lib/Antd5/table/InternalTable.js +6 -6
- package/lib/Antd5/table/RcTable/VirtualTable.js +3 -2
- package/lib/Antd5/table/RcTable/index.js +3 -2
- package/lib/Antd5/table/hooks/useFilter/FilterDropdown.js +82 -61
- package/lib/Antd5/table/hooks/useFilter/FilterSearch.js +7 -7
- package/lib/Antd5/table/hooks/useFilter/index.js +28 -26
- package/lib/Antd5/table/hooks/useLazyKVMap.js +5 -5
- package/lib/Antd5/table/hooks/useSelection.js +21 -11
- package/lib/Antd5/table/hooks/useSorter.js +66 -42
- package/lib/Antd5/table/hooks/useTitleColumns.js +9 -7
- package/lib/Antd5/table/interface.js +1 -1
- package/lib/Antd5/table/style/bordered.js +5 -3
- package/lib/Antd5/table/style/expand.js +44 -38
- package/lib/Antd5/table/style/filter.js +1 -1
- package/lib/Antd5/table/style/index.js +26 -21
- package/lib/Antd5/table/style/selection.js +3 -1
- package/lib/Antd5/table/style/sorter.js +3 -1
- package/lib/Antd5/table/style/virtual.js +2 -2
- package/lib/Antd5/table/util.js +9 -8
- package/lib/Antd5/tabs/style/index.js +2 -2
- package/lib/Antd5/tag/style/index.js +2 -2
- package/lib/Antd5/theme/index.js +12 -5
- package/lib/Antd5/theme/interface/cssinjs-utils.js +1 -0
- package/lib/Antd5/theme/internal.js +10 -5
- package/lib/Antd5/theme/themes/dark/colors.js +3 -0
- package/lib/Antd5/theme/themes/dark/index.js +1 -0
- package/lib/Antd5/theme/themes/default/colors.js +3 -0
- package/lib/Antd5/theme/themes/default/index.js +6 -2
- package/lib/Antd5/theme/themes/seed.js +5 -2
- package/lib/Antd5/theme/themes/shared/genColorMapToken.js +2 -0
- package/lib/Antd5/theme/themes/shared/genFontSizes.js +1 -1
- package/lib/Antd5/theme/useToken.js +2 -1
- package/lib/Antd5/theme/util/alias.js +1 -1
- package/lib/Antd5/theme/util/genStyleUtils.js +61 -0
- package/lib/Antd5/time-picker/index.js +15 -2
- package/lib/Antd5/time-picker/locale/az_AZ.js +2 -1
- package/lib/Antd5/time-picker/locale/it_IT.js +2 -1
- package/lib/Antd5/time-picker/locale/uk_UA.js +2 -1
- package/lib/Antd5/timeline/TimelineItemList.js +0 -1
- package/lib/Antd5/timeline/style/index.js +1 -1
- package/lib/Antd5/tooltip/index.js +3 -2
- package/lib/Antd5/tooltip/style/index.js +3 -1
- package/lib/Antd5/tooltip/util.js +0 -1
- package/lib/Antd5/tour/panelRender.js +7 -13
- package/lib/Antd5/tour/style/index.js +6 -13
- package/lib/Antd5/transfer/ListItem.js +3 -3
- package/lib/Antd5/transfer/hooks/useData.js +1 -1
- package/lib/Antd5/transfer/hooks/useSelection.js +26 -21
- package/lib/Antd5/transfer/style/index.js +12 -22
- package/lib/Antd5/tree/Tree.js +2 -0
- package/lib/Antd5/tree/style/directory.js +39 -0
- package/lib/Antd5/tree/style/index.js +115 -166
- package/lib/Antd5/tree/utils/dropIndicator.js +3 -2
- package/lib/Antd5/tree/utils/iconUtil.js +5 -1
- package/lib/Antd5/tree-select/index.js +47 -43
- package/lib/Antd5/typography/Base/CopyBtn.js +17 -17
- package/lib/Antd5/typography/Base/Ellipsis.js +48 -40
- package/lib/Antd5/typography/Base/index.js +20 -60
- package/lib/Antd5/typography/Base/util.js +31 -1
- package/lib/Antd5/typography/Editable.js +11 -10
- package/lib/Antd5/typography/Title.js +1 -6
- package/lib/Antd5/typography/Typography.js +2 -6
- package/lib/Antd5/typography/hooks/useCopyClick.js +3 -2
- package/lib/Antd5/typography/hooks/usePrevious.js +1 -1
- package/lib/Antd5/{message/assets/Close.js → typography/hooks/useTooltipProps.js} +24 -16
- package/lib/Antd5/typography/style/mixins.js +3 -9
- package/lib/Antd5/upload/Upload.js +55 -83
- package/lib/Antd5/upload/UploadList/ListItem.js +15 -9
- package/lib/Antd5/upload/UploadList/index.js +33 -47
- package/lib/Antd5/upload/style/dragger.js +5 -26
- package/lib/Antd5/upload/style/list.js +2 -7
- package/lib/Antd5/version/version.js +1 -1
- package/lib/Antd5/watermark/context.js +1 -1
- package/lib/Antd5/watermark/index.js +35 -18
- package/lib/Antd5/watermark/useClips.js +2 -1
- package/lib/Antd5/watermark/useRafDebounce.js +1 -1
- package/lib/Antd5/watermark/utils.js +1 -1
- package/lib/Button/index.style.js +1 -3
- package/lib/CWSelect/index.js +39 -1
- package/lib/CWSelect/index.style.js +39 -0
- package/lib/CWTree/index.js +3 -9
- package/lib/CWTree/index.style.js +2 -0
- package/lib/ConfigProvider/ConfigProvider.js +9 -10
- package/lib/ConfigProvider/customTheme.js +9 -2
- package/lib/ConfigProvider/theme/common.js +140 -0
- package/lib/ConfigProvider/theme/dark.js +2 -0
- package/lib/ConfigProvider/theme/default.js +115 -0
- package/lib/ConfigProvider/theme/utils.js +49 -0
- package/lib/QuickTransfer/index.js +44 -48
- package/lib/RangePicker/components/ExtraQuickSelect.js +1 -4
- package/lib/RangePicker/index.js +38 -26
- package/lib/RangePicker/utils/generate/dayjs.js +1 -1
- package/lib/Splitter/index.js +2 -0
- package/package.json +37 -35
- package/lib/Antd5/color-picker/components/PanelPicker.js +0 -53
- package/lib/Antd5/color-picker/hooks/useColorState.js +0 -53
- package/lib/Antd5/layout/style/light.js +0 -24
- package/lib/Antd5/style/operationUnit.js +0 -18
- package/lib/Antd5/theme/util/calc/CSSCalculator.js +0 -119
- package/lib/Antd5/theme/util/calc/NumCalculator.js +0 -81
- package/lib/Antd5/theme/util/calc/calculator.js +0 -10
- package/lib/Antd5/theme/util/calc/index.js +0 -9
- package/lib/Antd5/theme/util/genComponentStyleHook.js +0 -243
- package/lib/Antd5/theme/util/maxmin.js +0 -27
- package/lib/Antd5/theme/util/statistic.js +0 -74
- package/lib/Antd5/typography/hooks/useUpdatedEffect.js +0 -13
- package/lib/Antd5/version/token-meta.json +0 -1
- package/lib/Antd5/version/token.json +0 -1
- package/lib/ConfigProvider/customTheme.json +0 -163
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
6
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
|
+
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
|
|
8
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
9
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
10
|
+
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
|
|
11
|
+
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
|
|
12
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
13
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
|
+
import * as React from 'react';
|
|
15
|
+
import { AggregationColor } from '../../color';
|
|
16
|
+
import { getGradientPercentColor } from '../../util';
|
|
17
|
+
import { GradientColorSlider } from '../ColorSlider';
|
|
18
|
+
function sortColors(colors) {
|
|
19
|
+
return _toConsumableArray(colors).sort(function (a, b) {
|
|
20
|
+
return a.percent - b.percent;
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* GradientColorBar will auto show when the mode is `gradient`.
|
|
25
|
+
*/
|
|
26
|
+
var GradientColorBar = function GradientColorBar(props) {
|
|
27
|
+
var prefixCls = props.prefixCls,
|
|
28
|
+
mode = props.mode,
|
|
29
|
+
onChange = props.onChange,
|
|
30
|
+
onChangeComplete = props.onChangeComplete,
|
|
31
|
+
onActive = props.onActive,
|
|
32
|
+
activeIndex = props.activeIndex,
|
|
33
|
+
onGradientDragging = props.onGradientDragging,
|
|
34
|
+
colors = props.colors;
|
|
35
|
+
var isGradient = mode === 'gradient';
|
|
36
|
+
// ============================= Colors =============================
|
|
37
|
+
var colorList = React.useMemo(function () {
|
|
38
|
+
return colors.map(function (info) {
|
|
39
|
+
return {
|
|
40
|
+
percent: info.percent,
|
|
41
|
+
color: info.color.toRgbString()
|
|
42
|
+
};
|
|
43
|
+
});
|
|
44
|
+
}, [colors]);
|
|
45
|
+
var values = React.useMemo(function () {
|
|
46
|
+
return colorList.map(function (info) {
|
|
47
|
+
return info.percent;
|
|
48
|
+
});
|
|
49
|
+
}, [colorList]);
|
|
50
|
+
// ============================== Drag ==============================
|
|
51
|
+
var colorsRef = React.useRef(colorList);
|
|
52
|
+
// Record current colors
|
|
53
|
+
var onDragStart = function onDragStart(_ref) {
|
|
54
|
+
var rawValues = _ref.rawValues,
|
|
55
|
+
draggingIndex = _ref.draggingIndex,
|
|
56
|
+
draggingValue = _ref.draggingValue;
|
|
57
|
+
if (rawValues.length > colorList.length) {
|
|
58
|
+
// Add new node
|
|
59
|
+
var newPointColor = getGradientPercentColor(colorList, draggingValue);
|
|
60
|
+
var nextColors = _toConsumableArray(colorList);
|
|
61
|
+
nextColors.splice(draggingIndex, 0, {
|
|
62
|
+
percent: draggingValue,
|
|
63
|
+
color: newPointColor
|
|
64
|
+
});
|
|
65
|
+
colorsRef.current = nextColors;
|
|
66
|
+
} else {
|
|
67
|
+
colorsRef.current = colorList;
|
|
68
|
+
}
|
|
69
|
+
onGradientDragging(true);
|
|
70
|
+
onChange(new AggregationColor(sortColors(colorsRef.current)), true);
|
|
71
|
+
};
|
|
72
|
+
// Adjust color when dragging
|
|
73
|
+
var onDragChange = function onDragChange(_ref2) {
|
|
74
|
+
var deleteIndex = _ref2.deleteIndex,
|
|
75
|
+
draggingIndex = _ref2.draggingIndex,
|
|
76
|
+
draggingValue = _ref2.draggingValue;
|
|
77
|
+
var nextColors = _toConsumableArray(colorsRef.current);
|
|
78
|
+
if (deleteIndex !== -1) {
|
|
79
|
+
nextColors.splice(deleteIndex, 1);
|
|
80
|
+
} else {
|
|
81
|
+
nextColors[draggingIndex] = _objectSpread(_objectSpread({}, nextColors[draggingIndex]), {}, {
|
|
82
|
+
percent: draggingValue
|
|
83
|
+
});
|
|
84
|
+
nextColors = sortColors(nextColors);
|
|
85
|
+
}
|
|
86
|
+
onChange(new AggregationColor(nextColors), true);
|
|
87
|
+
};
|
|
88
|
+
// ============================== Key ===============================
|
|
89
|
+
var onKeyDelete = function onKeyDelete(index) {
|
|
90
|
+
var nextColors = _toConsumableArray(colorList);
|
|
91
|
+
nextColors.splice(index, 1);
|
|
92
|
+
var nextColor = new AggregationColor(nextColors);
|
|
93
|
+
onChange(nextColor);
|
|
94
|
+
onChangeComplete(nextColor);
|
|
95
|
+
};
|
|
96
|
+
// ============================= Change =============================
|
|
97
|
+
var onInternalChangeComplete = function onInternalChangeComplete(nextValues) {
|
|
98
|
+
onChangeComplete(new AggregationColor(colorList));
|
|
99
|
+
// Reset `activeIndex` if out of range
|
|
100
|
+
if (activeIndex >= nextValues.length) {
|
|
101
|
+
onActive(nextValues.length - 1);
|
|
102
|
+
}
|
|
103
|
+
onGradientDragging(false);
|
|
104
|
+
};
|
|
105
|
+
// ============================= Render =============================
|
|
106
|
+
if (!isGradient) {
|
|
107
|
+
return null;
|
|
108
|
+
}
|
|
109
|
+
return _jsx(GradientColorSlider, {
|
|
110
|
+
min: 0,
|
|
111
|
+
max: 100,
|
|
112
|
+
prefixCls: prefixCls,
|
|
113
|
+
className: "".concat(prefixCls, "-gradient-slider"),
|
|
114
|
+
colors: colorList,
|
|
115
|
+
color: null,
|
|
116
|
+
value: values,
|
|
117
|
+
range: true,
|
|
118
|
+
onChangeComplete: onInternalChangeComplete,
|
|
119
|
+
disabled: false,
|
|
120
|
+
type: "gradient",
|
|
121
|
+
// Active
|
|
122
|
+
activeIndex: activeIndex,
|
|
123
|
+
onActive: onActive,
|
|
124
|
+
// Drag
|
|
125
|
+
onDragStart: onDragStart,
|
|
126
|
+
onDragChange: onDragChange,
|
|
127
|
+
onKeyDelete: onKeyDelete
|
|
128
|
+
});
|
|
129
|
+
};
|
|
130
|
+
export default /*#__PURE__*/React.memo(GradientColorBar);
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
var _excluded = ["mode", "onModeChange", "modeOptions", "prefixCls", "allowClear", "value", "disabledAlpha", "onChange", "onClear", "onChangeComplete", "activeIndex", "gradientDragging"];
|
|
3
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
6
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
7
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
8
|
+
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
|
|
9
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
10
|
+
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
|
|
11
|
+
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
|
|
12
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
13
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
14
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
15
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
16
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
17
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
18
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var s = Object.getOwnPropertySymbols(e); for (r = 0; r < s.length; r++) o = s[r], t.includes(o) || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
19
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
|
|
20
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
21
|
+
import React, { useContext } from 'react';
|
|
22
|
+
import RcColorPicker from '@rc-component/color-picker';
|
|
23
|
+
import useLayoutEffect from 'rc-util/lib/hooks/useLayoutEffect';
|
|
24
|
+
import Segmented from '../../../segmented';
|
|
25
|
+
import { AggregationColor } from '../../color';
|
|
26
|
+
import { PanelPickerContext } from '../../context';
|
|
27
|
+
import { genAlphaColor, generateColor } from '../../util';
|
|
28
|
+
import ColorClear from '../ColorClear';
|
|
29
|
+
import ColorInput from '../ColorInput';
|
|
30
|
+
import ColorSlider from '../ColorSlider';
|
|
31
|
+
import GradientColorBar from './GradientColorBar';
|
|
32
|
+
var components = {
|
|
33
|
+
slider: ColorSlider
|
|
34
|
+
};
|
|
35
|
+
var PanelPicker = function PanelPicker() {
|
|
36
|
+
var panelPickerContext = useContext(PanelPickerContext);
|
|
37
|
+
var mode = panelPickerContext.mode,
|
|
38
|
+
onModeChange = panelPickerContext.onModeChange,
|
|
39
|
+
modeOptions = panelPickerContext.modeOptions,
|
|
40
|
+
prefixCls = panelPickerContext.prefixCls,
|
|
41
|
+
allowClear = panelPickerContext.allowClear,
|
|
42
|
+
value = panelPickerContext.value,
|
|
43
|
+
disabledAlpha = panelPickerContext.disabledAlpha,
|
|
44
|
+
_onChange = panelPickerContext.onChange,
|
|
45
|
+
onClear = panelPickerContext.onClear,
|
|
46
|
+
onChangeComplete = panelPickerContext.onChangeComplete,
|
|
47
|
+
activeIndex = panelPickerContext.activeIndex,
|
|
48
|
+
gradientDragging = panelPickerContext.gradientDragging,
|
|
49
|
+
injectProps = _objectWithoutProperties(panelPickerContext, _excluded);
|
|
50
|
+
// ============================ Colors ============================
|
|
51
|
+
var colors = React.useMemo(function () {
|
|
52
|
+
if (!value.cleared) {
|
|
53
|
+
return value.getColors();
|
|
54
|
+
}
|
|
55
|
+
return [{
|
|
56
|
+
percent: 0,
|
|
57
|
+
color: new AggregationColor('')
|
|
58
|
+
}, {
|
|
59
|
+
percent: 100,
|
|
60
|
+
color: new AggregationColor('')
|
|
61
|
+
}];
|
|
62
|
+
}, [value]);
|
|
63
|
+
// ========================= Single Color =========================
|
|
64
|
+
var isSingle = !value.isGradient();
|
|
65
|
+
// We cache the point color in case user drag the gradient point across another one
|
|
66
|
+
var _React$useState = React.useState(value),
|
|
67
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
68
|
+
lockedColor = _React$useState2[0],
|
|
69
|
+
setLockedColor = _React$useState2[1];
|
|
70
|
+
// Use layout effect here since `useEffect` will cause a blink when mouseDown
|
|
71
|
+
useLayoutEffect(function () {
|
|
72
|
+
if (!isSingle) {
|
|
73
|
+
var _colors$activeIndex;
|
|
74
|
+
setLockedColor((_colors$activeIndex = colors[activeIndex]) === null || _colors$activeIndex === void 0 ? void 0 : _colors$activeIndex.color);
|
|
75
|
+
}
|
|
76
|
+
}, [gradientDragging, activeIndex]);
|
|
77
|
+
var activeColor = React.useMemo(function () {
|
|
78
|
+
var _colors$activeIndex2;
|
|
79
|
+
if (isSingle) {
|
|
80
|
+
return value;
|
|
81
|
+
}
|
|
82
|
+
// Use cache when dragging. User can not operation panel when dragging.
|
|
83
|
+
if (gradientDragging) {
|
|
84
|
+
return lockedColor;
|
|
85
|
+
}
|
|
86
|
+
return (_colors$activeIndex2 = colors[activeIndex]) === null || _colors$activeIndex2 === void 0 ? void 0 : _colors$activeIndex2.color;
|
|
87
|
+
}, [value, activeIndex, isSingle, lockedColor, gradientDragging]);
|
|
88
|
+
// ========================= Picker Color =========================
|
|
89
|
+
var _React$useState3 = React.useState(activeColor),
|
|
90
|
+
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
91
|
+
pickerColor = _React$useState4[0],
|
|
92
|
+
setPickerColor = _React$useState4[1];
|
|
93
|
+
var _React$useState5 = React.useState(0),
|
|
94
|
+
_React$useState6 = _slicedToArray(_React$useState5, 2),
|
|
95
|
+
forceSync = _React$useState6[0],
|
|
96
|
+
setForceSync = _React$useState6[1];
|
|
97
|
+
var mergedPickerColor = pickerColor !== null && pickerColor !== void 0 && pickerColor.equals(activeColor) ? activeColor : pickerColor;
|
|
98
|
+
useLayoutEffect(function () {
|
|
99
|
+
setPickerColor(activeColor);
|
|
100
|
+
}, [forceSync, activeColor === null || activeColor === void 0 ? void 0 : activeColor.toHexString()]);
|
|
101
|
+
// ============================ Change ============================
|
|
102
|
+
var fillColor = function fillColor(nextColor, info) {
|
|
103
|
+
var submitColor = generateColor(nextColor);
|
|
104
|
+
// Fill alpha color to 100% if origin is cleared color
|
|
105
|
+
if (value.cleared) {
|
|
106
|
+
var rgb = submitColor.toRgb();
|
|
107
|
+
// Auto fill color if origin is `0/0/0` to enhance user experience
|
|
108
|
+
if (!rgb.r && !rgb.g && !rgb.b && info) {
|
|
109
|
+
var infoType = info.type,
|
|
110
|
+
_info$value = info.value,
|
|
111
|
+
infoValue = _info$value === void 0 ? 0 : _info$value;
|
|
112
|
+
submitColor = new AggregationColor({
|
|
113
|
+
h: infoType === 'hue' ? infoValue : 0,
|
|
114
|
+
s: 1,
|
|
115
|
+
b: 1,
|
|
116
|
+
a: infoType === 'alpha' ? infoValue / 100 : 1
|
|
117
|
+
});
|
|
118
|
+
} else {
|
|
119
|
+
submitColor = genAlphaColor(submitColor);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
if (mode === 'single') {
|
|
123
|
+
return submitColor;
|
|
124
|
+
}
|
|
125
|
+
var nextColors = _toConsumableArray(colors);
|
|
126
|
+
nextColors[activeIndex] = _objectSpread(_objectSpread({}, nextColors[activeIndex]), {}, {
|
|
127
|
+
color: submitColor
|
|
128
|
+
});
|
|
129
|
+
return new AggregationColor(nextColors);
|
|
130
|
+
};
|
|
131
|
+
var onPickerChange = function onPickerChange(colorValue, fromPicker, info) {
|
|
132
|
+
var nextColor = fillColor(colorValue, info);
|
|
133
|
+
setPickerColor(nextColor.isGradient() ? nextColor.getColors()[activeIndex].color : nextColor);
|
|
134
|
+
_onChange(nextColor, fromPicker);
|
|
135
|
+
};
|
|
136
|
+
var onInternalChangeComplete = function onInternalChangeComplete(nextColor, info) {
|
|
137
|
+
// Trigger complete event
|
|
138
|
+
onChangeComplete(fillColor(nextColor, info));
|
|
139
|
+
// Back of origin color in case in controlled
|
|
140
|
+
// This will set after `onChangeComplete` to avoid `setState` trigger rerender
|
|
141
|
+
// which will make `fillColor` get wrong `color.cleared` state
|
|
142
|
+
setForceSync(function (ori) {
|
|
143
|
+
return ori + 1;
|
|
144
|
+
});
|
|
145
|
+
};
|
|
146
|
+
var onInputChange = function onInputChange(colorValue) {
|
|
147
|
+
_onChange(fillColor(colorValue));
|
|
148
|
+
};
|
|
149
|
+
// ============================ Render ============================
|
|
150
|
+
// Operation bar
|
|
151
|
+
var operationNode = null;
|
|
152
|
+
var showMode = modeOptions.length > 1;
|
|
153
|
+
if (allowClear || showMode) {
|
|
154
|
+
operationNode = _jsxs("div", {
|
|
155
|
+
className: "".concat(prefixCls, "-operation"),
|
|
156
|
+
children: [showMode && _jsx(Segmented, {
|
|
157
|
+
size: "small",
|
|
158
|
+
options: modeOptions,
|
|
159
|
+
value: mode,
|
|
160
|
+
onChange: onModeChange
|
|
161
|
+
}), _jsx(ColorClear, _objectSpread({
|
|
162
|
+
prefixCls: prefixCls,
|
|
163
|
+
value: value,
|
|
164
|
+
onChange: function onChange(clearColor) {
|
|
165
|
+
_onChange(clearColor);
|
|
166
|
+
onClear === null || onClear === void 0 || onClear();
|
|
167
|
+
}
|
|
168
|
+
}, injectProps))]
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
// Return
|
|
172
|
+
return _jsxs(_Fragment, {
|
|
173
|
+
children: [operationNode, _jsx(GradientColorBar, _objectSpread(_objectSpread({}, panelPickerContext), {}, {
|
|
174
|
+
colors: colors
|
|
175
|
+
})), _jsx(RcColorPicker, {
|
|
176
|
+
prefixCls: prefixCls,
|
|
177
|
+
value: mergedPickerColor === null || mergedPickerColor === void 0 ? void 0 : mergedPickerColor.toHsb(),
|
|
178
|
+
disabledAlpha: disabledAlpha,
|
|
179
|
+
onChange: function onChange(colorValue, info) {
|
|
180
|
+
onPickerChange(colorValue, true, info);
|
|
181
|
+
},
|
|
182
|
+
onChangeComplete: function onChangeComplete(colorValue, info) {
|
|
183
|
+
onInternalChangeComplete(colorValue, info);
|
|
184
|
+
},
|
|
185
|
+
components: components
|
|
186
|
+
}), _jsx(ColorInput, _objectSpread({
|
|
187
|
+
value: activeColor,
|
|
188
|
+
onChange: onInputChange,
|
|
189
|
+
prefixCls: prefixCls,
|
|
190
|
+
disabledAlpha: disabledAlpha
|
|
191
|
+
}, injectProps))]
|
|
192
|
+
});
|
|
193
|
+
};
|
|
194
|
+
export default PanelPicker;
|
|
@@ -1,7 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
export var PanelPickerContext = /*#__PURE__*/React.createContext({});
|
|
3
|
-
export var PanelPresetsContext = /*#__PURE__*/React.createContext({});
|
|
4
|
-
var PanelPickerProvider = PanelPickerContext.Provider;
|
|
5
|
-
export { PanelPickerProvider };
|
|
6
|
-
var PanelPresetsProvider = PanelPresetsContext.Provider;
|
|
7
|
-
export { PanelPresetsProvider };
|
|
3
|
+
export var PanelPresetsContext = /*#__PURE__*/React.createContext({});
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
2
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
3
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
4
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
5
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
6
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
7
|
+
import * as React from 'react';
|
|
8
|
+
import useEvent from 'rc-util/lib/hooks/useEvent';
|
|
9
|
+
import useMergedState from 'rc-util/lib/hooks/useMergedState';
|
|
10
|
+
import { useLocale } from '../../locale';
|
|
11
|
+
import { generateColor } from '../util';
|
|
12
|
+
/**
|
|
13
|
+
* Combine the `color` and `mode` to make sure sync of state.
|
|
14
|
+
*/
|
|
15
|
+
export default function useModeColor(defaultValue, value, mode) {
|
|
16
|
+
var _useLocale = useLocale('ColorPicker'),
|
|
17
|
+
_useLocale2 = _slicedToArray(_useLocale, 1),
|
|
18
|
+
locale = _useLocale2[0];
|
|
19
|
+
// ======================== Base ========================
|
|
20
|
+
// Color
|
|
21
|
+
var _useMergedState = useMergedState(defaultValue, {
|
|
22
|
+
value: value
|
|
23
|
+
}),
|
|
24
|
+
_useMergedState2 = _slicedToArray(_useMergedState, 2),
|
|
25
|
+
mergedColor = _useMergedState2[0],
|
|
26
|
+
setMergedColor = _useMergedState2[1];
|
|
27
|
+
// Mode
|
|
28
|
+
var _React$useState = React.useState('single'),
|
|
29
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
30
|
+
modeState = _React$useState2[0],
|
|
31
|
+
setModeState = _React$useState2[1];
|
|
32
|
+
var _React$useMemo = React.useMemo(function () {
|
|
33
|
+
var list = (Array.isArray(mode) ? mode : [mode]).filter(function (m) {
|
|
34
|
+
return m;
|
|
35
|
+
});
|
|
36
|
+
if (!list.length) {
|
|
37
|
+
list.push('single');
|
|
38
|
+
}
|
|
39
|
+
var modes = new Set(list);
|
|
40
|
+
var optionList = [];
|
|
41
|
+
var pushOption = function pushOption(modeType, localeTxt) {
|
|
42
|
+
if (modes.has(modeType)) {
|
|
43
|
+
optionList.push({
|
|
44
|
+
label: localeTxt,
|
|
45
|
+
value: modeType
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
pushOption('single', locale.singleColor);
|
|
50
|
+
pushOption('gradient', locale.gradientColor);
|
|
51
|
+
return [optionList, modes];
|
|
52
|
+
}, [mode]),
|
|
53
|
+
_React$useMemo2 = _slicedToArray(_React$useMemo, 2),
|
|
54
|
+
modeOptionList = _React$useMemo2[0],
|
|
55
|
+
modeSet = _React$useMemo2[1];
|
|
56
|
+
// ======================== Post ========================
|
|
57
|
+
// We need align `mode` with `color` state
|
|
58
|
+
// >>>>> Color
|
|
59
|
+
var _React$useState3 = React.useState(null),
|
|
60
|
+
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
61
|
+
cacheColor = _React$useState4[0],
|
|
62
|
+
setCacheColor = _React$useState4[1];
|
|
63
|
+
var setColor = useEvent(function (nextColor) {
|
|
64
|
+
setCacheColor(nextColor);
|
|
65
|
+
setMergedColor(nextColor);
|
|
66
|
+
});
|
|
67
|
+
var postColor = React.useMemo(function () {
|
|
68
|
+
var colorObj = generateColor(mergedColor || '');
|
|
69
|
+
// Use `cacheColor` in case the color is `cleared`
|
|
70
|
+
return colorObj.equals(cacheColor) ? cacheColor : colorObj;
|
|
71
|
+
}, [mergedColor, cacheColor]);
|
|
72
|
+
// >>>>> Mode
|
|
73
|
+
var postMode = React.useMemo(function () {
|
|
74
|
+
var _modeOptionList$;
|
|
75
|
+
if (modeSet.has(modeState)) {
|
|
76
|
+
return modeState;
|
|
77
|
+
}
|
|
78
|
+
return (_modeOptionList$ = modeOptionList[0]) === null || _modeOptionList$ === void 0 ? void 0 : _modeOptionList$.value;
|
|
79
|
+
}, [modeSet, modeState, modeOptionList]);
|
|
80
|
+
// ======================= Effect =======================
|
|
81
|
+
// Dynamic update mode when color change
|
|
82
|
+
React.useEffect(function () {
|
|
83
|
+
setModeState(postColor.isGradient() ? 'gradient' : 'single');
|
|
84
|
+
}, [postColor]);
|
|
85
|
+
// ======================= Return =======================
|
|
86
|
+
return [postColor, setColor, postMode, setModeState, modeOptionList];
|
|
87
|
+
}
|
|
@@ -25,11 +25,12 @@ var genColorBlockStyle = function genColorBlockStyle(token, size) {
|
|
|
25
25
|
borderRadius: borderRadiusSM,
|
|
26
26
|
width: size,
|
|
27
27
|
height: size,
|
|
28
|
-
boxShadow: colorPickerInsetShadow
|
|
28
|
+
boxShadow: colorPickerInsetShadow,
|
|
29
|
+
flex: 'none'
|
|
29
30
|
}, getTransBg('50%', token.colorFillSecondary)), {}, _defineProperty({}, "".concat(componentCls, "-color-block-inner"), {
|
|
30
31
|
width: '100%',
|
|
31
32
|
height: '100%',
|
|
32
|
-
|
|
33
|
+
boxShadow: "inset 0 0 0 ".concat(unit(lineWidth), " ").concat(colorFillSecondary),
|
|
33
34
|
borderRadius: 'inherit'
|
|
34
35
|
})));
|
|
35
36
|
};
|
|
@@ -5,11 +5,13 @@ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object
|
|
|
5
5
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
6
6
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
7
|
import { unit } from '@ant-design/cssinjs';
|
|
8
|
+
import { genCompactItemStyle } from '../../style/compact-item';
|
|
8
9
|
import { genStyleHooks, mergeToken } from '../../theme/internal';
|
|
9
10
|
import genColorBlockStyle from './color-block';
|
|
10
11
|
import genInputStyle from './input';
|
|
11
12
|
import genPickerStyle from './picker';
|
|
12
13
|
import genPresetsStyle from './presets';
|
|
14
|
+
import genSliderStyle from './slider';
|
|
13
15
|
export var genActiveStyle = function genActiveStyle(token, borderColor, outlineColor) {
|
|
14
16
|
return {
|
|
15
17
|
borderInlineEndWidth: token.lineWidth,
|
|
@@ -46,20 +48,20 @@ var genClearStyle = function genClearStyle(token, size, extraStyle) {
|
|
|
46
48
|
border: "".concat(unit(lineWidth), " solid ").concat(colorSplit),
|
|
47
49
|
position: 'relative',
|
|
48
50
|
overflow: 'hidden',
|
|
49
|
-
cursor: '
|
|
51
|
+
cursor: 'inherit',
|
|
50
52
|
transition: "all ".concat(token.motionDurationFast)
|
|
51
53
|
}, extraStyle), {}, {
|
|
52
54
|
'&::after': {
|
|
53
55
|
content: '""',
|
|
54
56
|
position: 'absolute',
|
|
55
|
-
insetInlineEnd: lineWidth,
|
|
56
|
-
top:
|
|
57
|
+
insetInlineEnd: token.calc(lineWidth).mul(-1).equal(),
|
|
58
|
+
top: token.calc(lineWidth).mul(-1).equal(),
|
|
57
59
|
display: 'block',
|
|
58
60
|
width: 40,
|
|
59
61
|
// maximum
|
|
60
62
|
height: 2,
|
|
61
63
|
// fixed
|
|
62
|
-
transformOrigin:
|
|
64
|
+
transformOrigin: "calc(100% - 1px) 1px",
|
|
63
65
|
transform: 'rotate(-45deg)',
|
|
64
66
|
backgroundColor: red6
|
|
65
67
|
},
|
|
@@ -101,7 +103,7 @@ var genSizeStyle = function genSizeStyle(token) {
|
|
|
101
103
|
fontSizeLG = token.fontSizeLG;
|
|
102
104
|
return _defineProperty(_defineProperty({}, "&".concat(componentCls, "-lg"), _defineProperty(_defineProperty({
|
|
103
105
|
minWidth: controlHeightLG,
|
|
104
|
-
|
|
106
|
+
minHeight: controlHeightLG,
|
|
105
107
|
borderRadius: borderRadiusLG
|
|
106
108
|
}, "".concat(componentCls, "-color-block, ").concat(componentCls, "-clear"), {
|
|
107
109
|
width: controlHeight,
|
|
@@ -109,14 +111,16 @@ var genSizeStyle = function genSizeStyle(token) {
|
|
|
109
111
|
borderRadius: borderRadius
|
|
110
112
|
}), "".concat(componentCls, "-trigger-text"), {
|
|
111
113
|
fontSize: fontSizeLG
|
|
112
|
-
})), "&".concat(componentCls, "-sm"), _defineProperty({
|
|
114
|
+
})), "&".concat(componentCls, "-sm"), _defineProperty(_defineProperty({
|
|
113
115
|
minWidth: controlHeightSM,
|
|
114
|
-
|
|
116
|
+
minHeight: controlHeightSM,
|
|
115
117
|
borderRadius: borderRadiusSM
|
|
116
118
|
}, "".concat(componentCls, "-color-block, ").concat(componentCls, "-clear"), {
|
|
117
119
|
width: controlHeightXS,
|
|
118
120
|
height: controlHeightXS,
|
|
119
121
|
borderRadius: borderRadiusXS
|
|
122
|
+
}), "".concat(componentCls, "-trigger-text"), {
|
|
123
|
+
lineHeight: unit(controlHeightXS)
|
|
120
124
|
}));
|
|
121
125
|
};
|
|
122
126
|
var genColorPickerStyle = function genColorPickerStyle(token) {
|
|
@@ -143,7 +147,7 @@ var genColorPickerStyle = function genColorPickerStyle(token) {
|
|
|
143
147
|
fontSize = token.fontSize,
|
|
144
148
|
colorPrimaryHover = token.colorPrimaryHover,
|
|
145
149
|
controlOutline = token.controlOutline;
|
|
146
|
-
return [_defineProperty({}, componentCls, _objectSpread(_defineProperty(_defineProperty({}, "".concat(componentCls, "-inner"), _objectSpread(_objectSpread(_objectSpread(_objectSpread(_defineProperty({
|
|
150
|
+
return [_defineProperty({}, componentCls, _objectSpread(_defineProperty(_defineProperty({}, "".concat(componentCls, "-inner"), _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_defineProperty({
|
|
147
151
|
'&-content': _defineProperty({
|
|
148
152
|
display: 'flex',
|
|
149
153
|
flexDirection: 'column',
|
|
@@ -151,17 +155,20 @@ var genColorPickerStyle = function genColorPickerStyle(token) {
|
|
|
151
155
|
}, "& > ".concat(antCls, "-divider"), {
|
|
152
156
|
margin: "".concat(unit(marginSM), " 0 ").concat(unit(marginXS))
|
|
153
157
|
})
|
|
154
|
-
}, "".concat(componentCls, "-panel"), _objectSpread({}, genPickerStyle(token))), genColorBlockStyle(token, colorPickerPreviewSize)), genInputStyle(token)), genPresetsStyle(token)), genClearStyle(token, colorPickerPresetColorSize, {
|
|
155
|
-
marginInlineStart: 'auto'
|
|
158
|
+
}, "".concat(componentCls, "-panel"), _objectSpread({}, genPickerStyle(token))), genSliderStyle(token)), genColorBlockStyle(token, colorPickerPreviewSize)), genInputStyle(token)), genPresetsStyle(token)), genClearStyle(token, colorPickerPresetColorSize, {
|
|
159
|
+
marginInlineStart: 'auto'
|
|
160
|
+
})), {}, _defineProperty({}, "".concat(componentCls, "-operation"), {
|
|
161
|
+
display: 'flex',
|
|
162
|
+
justifyContent: 'space-between',
|
|
156
163
|
marginBottom: marginXS
|
|
157
164
|
}))), '&-trigger', _objectSpread(_objectSpread(_objectSpread(_objectSpread(_defineProperty(_defineProperty(_defineProperty(_defineProperty({
|
|
158
165
|
minWidth: controlHeight,
|
|
159
|
-
|
|
166
|
+
minHeight: controlHeight,
|
|
160
167
|
borderRadius: borderRadius,
|
|
161
168
|
border: "".concat(unit(lineWidth), " solid ").concat(colorBorder),
|
|
162
169
|
cursor: 'pointer',
|
|
163
170
|
display: 'inline-flex',
|
|
164
|
-
alignItems: '
|
|
171
|
+
alignItems: 'flex-start',
|
|
165
172
|
justifyContent: 'center',
|
|
166
173
|
transition: "all ".concat(motionDurationMid),
|
|
167
174
|
background: colorBgElevated,
|
|
@@ -170,7 +177,16 @@ var genColorPickerStyle = function genColorPickerStyle(token) {
|
|
|
170
177
|
marginInlineStart: marginXS,
|
|
171
178
|
marginInlineEnd: token.calc(marginXS).sub(token.calc(paddingXXS).sub(lineWidth)).equal(),
|
|
172
179
|
fontSize: fontSize,
|
|
173
|
-
color: colorText
|
|
180
|
+
color: colorText,
|
|
181
|
+
alignSelf: 'center',
|
|
182
|
+
'&-cell': {
|
|
183
|
+
'&:not(:last-child):after': {
|
|
184
|
+
content: '", "'
|
|
185
|
+
},
|
|
186
|
+
'&-inactive': {
|
|
187
|
+
color: colorTextDisabled
|
|
188
|
+
}
|
|
189
|
+
}
|
|
174
190
|
}), '&:hover', {
|
|
175
191
|
borderColor: colorPrimaryHover
|
|
176
192
|
}), "&".concat(componentCls, "-trigger-active"), _objectSpread({}, genActiveStyle(token, colorPrimary, controlOutline))), '&-disabled', _defineProperty({
|
|
@@ -182,7 +198,9 @@ var genColorPickerStyle = function genColorPickerStyle(token) {
|
|
|
182
198
|
}
|
|
183
199
|
}, "".concat(componentCls, "-trigger-text"), {
|
|
184
200
|
color: colorTextDisabled
|
|
185
|
-
})), genClearStyle(token, controlHeightSM)), genColorBlockStyle(token, controlHeightSM)), genStatusStyle(token)), genSizeStyle(token))), genRtlStyle(token)))
|
|
201
|
+
})), genClearStyle(token, controlHeightSM)), genColorBlockStyle(token, controlHeightSM)), genStatusStyle(token)), genSizeStyle(token))), genRtlStyle(token))), genCompactItemStyle(token, {
|
|
202
|
+
focusElCls: "".concat(componentCls, "-trigger-active")
|
|
203
|
+
})];
|
|
186
204
|
};
|
|
187
205
|
export default genStyleHooks('ColorPicker', function (token) {
|
|
188
206
|
var colorTextQuaternary = token.colorTextQuaternary,
|
|
@@ -194,7 +212,7 @@ export default genStyleHooks('ColorPicker', function (token) {
|
|
|
194
212
|
colorPickerHandlerSizeSM: 12,
|
|
195
213
|
colorPickerAlphaInputWidth: 44,
|
|
196
214
|
colorPickerInputNumberHandleWidth: 16,
|
|
197
|
-
colorPickerPresetColorSize:
|
|
215
|
+
colorPickerPresetColorSize: 24,
|
|
198
216
|
colorPickerInsetShadow: "inset 0 0 1px 0 ".concat(colorTextQuaternary),
|
|
199
217
|
colorPickerSliderHeight: colorPickerSliderHeight,
|
|
200
218
|
colorPickerPreviewSize: token.calc(colorPickerSliderHeight).mul(2).add(marginSM).equal()
|
|
@@ -42,7 +42,7 @@ var genInputStyle = function genInputStyle(token) {
|
|
|
42
42
|
}), "".concat(antCls, "-select-selection-item"), {
|
|
43
43
|
paddingInlineEnd: token.calc(fontSizeIcon).add(marginXXS).equal(),
|
|
44
44
|
fontSize: fontSizeSM,
|
|
45
|
-
lineHeight:
|
|
45
|
+
lineHeight: unit(controlHeightSM)
|
|
46
46
|
}), "".concat(antCls, "-select-item-option-content"), {
|
|
47
47
|
fontSize: fontSizeSM,
|
|
48
48
|
lineHeight: lineHeightSM
|
|
@@ -3,7 +3,6 @@ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object
|
|
|
3
3
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
4
4
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
5
5
|
import { unit } from '@ant-design/cssinjs';
|
|
6
|
-
import { getTransBg } from './color-block';
|
|
7
6
|
var genPickerStyle = function genPickerStyle(token) {
|
|
8
7
|
var componentCls = token.componentCls,
|
|
9
8
|
controlHeightLG = token.controlHeightLG,
|
|
@@ -13,10 +12,10 @@ var genPickerStyle = function genPickerStyle(token) {
|
|
|
13
12
|
colorBgElevated = token.colorBgElevated,
|
|
14
13
|
colorFillSecondary = token.colorFillSecondary,
|
|
15
14
|
lineWidthBold = token.lineWidthBold,
|
|
16
|
-
colorPickerHandlerSize = token.colorPickerHandlerSize
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
15
|
+
colorPickerHandlerSize = token.colorPickerHandlerSize;
|
|
16
|
+
return _defineProperty(_defineProperty({
|
|
17
|
+
userSelect: 'none'
|
|
18
|
+
}, "".concat(componentCls, "-select"), _defineProperty(_defineProperty(_defineProperty({}, "".concat(componentCls, "-palette"), {
|
|
20
19
|
minHeight: token.calc(controlHeightLG).mul(4).equal(),
|
|
21
20
|
overflow: 'hidden',
|
|
22
21
|
borderRadius: borderRadiusSM
|
|
@@ -32,33 +31,7 @@ var genPickerStyle = function genPickerStyle(token) {
|
|
|
32
31
|
position: 'relative',
|
|
33
32
|
borderRadius: '50%',
|
|
34
33
|
cursor: 'pointer',
|
|
35
|
-
boxShadow: "".concat(colorPickerInsetShadow, ", 0 0 0 1px ").concat(colorFillSecondary)
|
|
36
|
-
|
|
37
|
-
width: colorPickerHandlerSizeSM,
|
|
38
|
-
height: colorPickerHandlerSizeSM
|
|
39
|
-
}
|
|
40
|
-
}), "".concat(componentCls, "-slider"), _defineProperty(_defineProperty(_defineProperty(_defineProperty({
|
|
41
|
-
borderRadius: token.calc(colorPickerSliderHeight).div(2).equal()
|
|
42
|
-
}, "".concat(componentCls, "-palette"), {
|
|
43
|
-
height: colorPickerSliderHeight
|
|
44
|
-
}), "".concat(componentCls, "-gradient"), {
|
|
45
|
-
borderRadius: token.calc(colorPickerSliderHeight).div(2).equal(),
|
|
46
|
-
boxShadow: colorPickerInsetShadow
|
|
47
|
-
}), '&-alpha', getTransBg("".concat(unit(colorPickerSliderHeight)), token.colorFillSecondary)), '&-hue', {
|
|
48
|
-
marginBottom: marginSM
|
|
49
|
-
})), "".concat(componentCls, "-slider-container"), _defineProperty({
|
|
50
|
-
display: 'flex',
|
|
51
|
-
gap: marginSM,
|
|
52
|
-
marginBottom: marginSM
|
|
53
|
-
}, "".concat(componentCls, "-slider-group"), {
|
|
54
|
-
flex: 1,
|
|
55
|
-
'&-disabled-alpha': _defineProperty({
|
|
56
|
-
display: 'flex',
|
|
57
|
-
alignItems: 'center'
|
|
58
|
-
}, "".concat(componentCls, "-slider"), {
|
|
59
|
-
flex: 1,
|
|
60
|
-
marginBottom: 0
|
|
61
|
-
})
|
|
62
|
-
}));
|
|
34
|
+
boxShadow: "".concat(colorPickerInsetShadow, ", 0 0 0 1px ").concat(colorFillSecondary)
|
|
35
|
+
});
|
|
63
36
|
};
|
|
64
37
|
export default genPickerStyle;
|