@chaoswise/ui 3.1.6 → 3.1.8
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/Antd5/_util/PurePanel.js +9 -1
- package/lib/Antd5/_util/convertToTooltipProps.js +15 -0
- package/lib/Antd5/_util/extendsObject.js +14 -23
- package/lib/Antd5/_util/hooks/useClosable.js +25 -31
- package/lib/Antd5/_util/hooks/useMergeSemantic/index.js +89 -0
- package/lib/Antd5/_util/hooks/useMergeSemantic/interface.js +1 -0
- package/lib/Antd5/_util/isPrimitive.js +5 -0
- package/lib/Antd5/_util/mediaQueryUtil.js +16 -0
- package/lib/Antd5/_util/responsiveObserver.js +41 -33
- package/lib/Antd5/_util/toList.js +6 -3
- package/lib/Antd5/_util/warning.js +0 -1
- package/lib/Antd5/_util/wave/WaveEffect.js +29 -16
- package/lib/Antd5/_util/wave/index.js +2 -2
- package/lib/Antd5/_util/wave/useWave.js +1 -1
- package/lib/Antd5/affix/index.js +13 -11
- package/lib/Antd5/alert/Alert.js +19 -18
- package/lib/Antd5/anchor/Anchor.js +9 -7
- package/lib/Antd5/anchor/AnchorLink.js +16 -3
- package/lib/Antd5/app/App.js +90 -0
- package/lib/Antd5/app/index.js +3 -92
- package/lib/Antd5/app/useApp.js +6 -0
- package/lib/Antd5/auto-complete/AutoComplete.js +142 -0
- package/lib/Antd5/auto-complete/index.js +8 -106
- package/lib/Antd5/avatar/{avatar.js → Avatar.js} +25 -29
- package/lib/Antd5/avatar/{group.js → AvatarGroup.js} +14 -9
- package/lib/Antd5/avatar/index.js +3 -4
- package/lib/Antd5/breadcrumb/Breadcrumb.js +1 -0
- package/lib/Antd5/breadcrumb/style/index.js +1 -1
- package/lib/Antd5/button/{LoadingIcon.js → DefaultLoadingIcon.js} +12 -9
- package/lib/Antd5/button/button-group.js +11 -11
- package/lib/Antd5/button/button.js +60 -26
- package/lib/Antd5/button/buttonHelpers.js +8 -1
- package/lib/Antd5/button/style/compact.js +9 -10
- package/lib/Antd5/button/style/index.js +127 -41
- package/lib/Antd5/button/style/token.js +19 -8
- package/lib/Antd5/calendar/Header.js +4 -4
- package/lib/Antd5/calendar/generateCalendar.js +17 -12
- package/lib/Antd5/calendar/style/index.js +8 -2
- package/lib/Antd5/card/Card.js +9 -5
- package/lib/Antd5/card/style/index.js +22 -15
- package/lib/Antd5/carousel/index.js +21 -11
- package/lib/Antd5/carousel/style/index.js +39 -12
- package/lib/Antd5/cascader/index.js +54 -18
- package/lib/Antd5/cascader/style/columns.js +4 -2
- package/lib/Antd5/cascader/style/index.js +2 -1
- package/lib/Antd5/collapse/Collapse.js +32 -25
- package/lib/Antd5/collapse/style/index.js +14 -10
- package/lib/Antd5/color-picker/ColorPicker.js +13 -8
- package/lib/Antd5/color-picker/components/ColorAlphaInput.js +8 -13
- package/lib/Antd5/color-picker/components/ColorHexInput.js +1 -1
- package/lib/Antd5/color-picker/components/ColorHsbInput.js +8 -13
- package/lib/Antd5/color-picker/components/ColorInput.js +7 -7
- package/lib/Antd5/color-picker/components/ColorPresets.js +15 -12
- package/lib/Antd5/color-picker/components/ColorRgbInput.js +8 -13
- package/lib/Antd5/color-picker/components/ColorSteppers.js +6 -13
- package/lib/Antd5/color-picker/interface.js +3 -6
- package/lib/Antd5/color-picker/style/color-block.js +2 -1
- package/lib/Antd5/config-provider/MotionWrapper.js +12 -4
- package/lib/Antd5/config-provider/UnstableContext.js +29 -0
- package/lib/Antd5/config-provider/context.js +32 -2
- package/lib/Antd5/config-provider/cssVariables.js +7 -7
- package/lib/Antd5/config-provider/hooks/useSize.js +1 -1
- package/lib/Antd5/config-provider/index.js +12 -3
- package/lib/Antd5/date-picker/generatePicker/generateRangePicker.js +33 -12
- package/lib/Antd5/date-picker/generatePicker/generateSinglePicker.js +32 -13
- package/lib/Antd5/date-picker/hooks/useMergedPickerSemantic.js +47 -0
- package/lib/Antd5/date-picker/index.js +2 -2
- package/lib/Antd5/date-picker/locale/ar_EG.js +1 -8
- package/lib/Antd5/date-picker/locale/example.json +5 -8
- package/lib/Antd5/date-picker/locale/ko_KR.js +11 -1
- package/lib/Antd5/date-picker/locale/pl_PL.js +0 -3
- package/lib/Antd5/date-picker/locale/pt_PT.js +0 -3
- package/lib/Antd5/date-picker/locale/sl_SI.js +1 -3
- package/lib/Antd5/date-picker/style/index.js +9 -6
- package/lib/Antd5/date-picker/style/panel.js +12 -8
- package/lib/Antd5/date-picker/style/token.js +3 -3
- package/lib/Antd5/date-picker/style/variants.js +6 -2
- package/lib/Antd5/descriptions/Cell.js +14 -8
- package/lib/Antd5/descriptions/Item.js +2 -0
- package/lib/Antd5/descriptions/Row.js +10 -6
- package/lib/Antd5/descriptions/hooks/useRow.js +1 -1
- package/lib/Antd5/descriptions/index.js +45 -18
- package/lib/Antd5/descriptions/style/index.js +11 -2
- package/lib/Antd5/divider/index.js +32 -15
- package/lib/Antd5/divider/style/index.js +20 -7
- package/lib/Antd5/drawer/DrawerPanel.js +8 -10
- package/lib/Antd5/drawer/index.js +20 -17
- package/lib/Antd5/dropdown/dropdown-button.js +9 -3
- package/lib/Antd5/dropdown/dropdown.js +33 -35
- package/lib/Antd5/dropdown/style/index.js +1 -1
- package/lib/Antd5/empty/empty.js +2 -2
- package/lib/Antd5/empty/index.js +41 -23
- package/lib/Antd5/empty/simple.js +4 -4
- package/lib/Antd5/flex/style/index.js +2 -0
- package/lib/Antd5/float-button/FloatButton.js +12 -15
- package/lib/Antd5/float-button/FloatButtonContent.js +13 -7
- package/lib/Antd5/float-button/FloatButtonGroup.js +6 -6
- package/lib/Antd5/float-button/style/keyframes.js +4 -4
- package/lib/Antd5/form/ErrorList.js +1 -3
- package/lib/Antd5/form/Form.js +19 -19
- package/lib/Antd5/form/FormItem/index.js +1 -1
- package/lib/Antd5/form/FormItemLabel.js +12 -14
- package/lib/Antd5/form/context.js +3 -4
- package/lib/Antd5/form/hooks/useForm.js +16 -5
- package/lib/Antd5/form/hooks/useFormInstance.js +3 -3
- package/lib/Antd5/form/hooks/useFormItemStatus.js +7 -7
- package/lib/Antd5/form/hooks/useFormWarning.js +2 -2
- package/lib/Antd5/form/hooks/useFrameState.js +3 -4
- package/lib/Antd5/form/hooks/useItemRef.js +3 -2
- package/lib/Antd5/form/hooks/useVariants.js +5 -5
- package/lib/Antd5/form/style/index.js +22 -15
- package/lib/Antd5/grid/hooks/useBreakpoint.js +2 -1
- package/lib/Antd5/grid/hooks/useGutter.js +29 -0
- package/lib/Antd5/grid/row.js +8 -63
- package/lib/Antd5/grid/style/index.js +14 -8
- package/lib/Antd5/image/PreviewGroup.js +9 -2
- package/lib/Antd5/image/index.js +26 -17
- package/lib/Antd5/image/style/index.js +10 -10
- package/lib/Antd5/index.js +3 -1
- package/lib/Antd5/input/Group.js +5 -3
- package/lib/Antd5/input/Input.js +27 -20
- package/lib/Antd5/input/OTP/OTPInput.js +36 -19
- package/lib/Antd5/input/OTP/index.js +40 -19
- package/lib/Antd5/input/Password.js +7 -9
- package/lib/Antd5/input/Search.js +16 -9
- package/lib/Antd5/input/TextArea.js +90 -33
- package/lib/Antd5/input/style/index.js +31 -82
- package/lib/Antd5/input/style/otp.js +22 -6
- package/lib/Antd5/input/style/textarea.js +80 -0
- package/lib/Antd5/input/style/token.js +16 -7
- package/lib/Antd5/input/style/variants.js +67 -12
- package/lib/Antd5/input-number/index.js +1 -1
- package/lib/Antd5/input-number/style/index.js +10 -7
- package/lib/Antd5/input-number/style/token.js +6 -4
- package/lib/Antd5/layout/Sider.js +58 -68
- package/lib/Antd5/layout/layout.js +7 -5
- package/lib/Antd5/layout/style/sider.js +33 -42
- package/lib/Antd5/list/index.js +45 -45
- package/lib/Antd5/locale/ar_EG.js +7 -1
- package/lib/Antd5/locale/az_AZ.js +3 -2
- package/lib/Antd5/locale/bg_BG.js +8 -0
- package/lib/Antd5/locale/bn_BD.js +7 -1
- package/lib/Antd5/locale/by_BY.js +8 -2
- package/lib/Antd5/locale/ca_ES.js +7 -1
- package/lib/Antd5/locale/cs_CZ.js +19 -2
- package/lib/Antd5/locale/da_DK.js +8 -0
- package/lib/Antd5/locale/de_DE.js +4 -2
- package/lib/Antd5/locale/el_GR.js +3 -2
- package/lib/Antd5/locale/en_GB.js +8 -2
- package/lib/Antd5/locale/en_US.js +3 -2
- package/lib/Antd5/locale/es_ES.js +3 -2
- package/lib/Antd5/locale/et_EE.js +8 -2
- package/lib/Antd5/locale/eu_ES.js +3 -2
- package/lib/Antd5/locale/fa_IR.js +17 -7
- package/lib/Antd5/locale/fi_FI.js +8 -0
- package/lib/Antd5/locale/fr_BE.js +4 -1
- package/lib/Antd5/locale/fr_CA.js +9 -1
- package/lib/Antd5/locale/fr_FR.js +4 -1
- package/lib/Antd5/locale/ga_IE.js +7 -1
- package/lib/Antd5/locale/gl_ES.js +7 -1
- package/lib/Antd5/locale/he_IL.js +10 -1
- package/lib/Antd5/locale/hi_IN.js +7 -1
- package/lib/Antd5/locale/hr_HR.js +7 -1
- package/lib/Antd5/locale/hu_HU.js +8 -0
- package/lib/Antd5/locale/hy_AM.js +8 -3
- package/lib/Antd5/locale/id_ID.js +3 -2
- package/lib/Antd5/locale/is_IS.js +8 -0
- package/lib/Antd5/locale/it_IT.js +3 -2
- package/lib/Antd5/locale/ja_JP.js +3 -2
- package/lib/Antd5/locale/ka_GE.js +7 -1
- package/lib/Antd5/locale/kk_KZ.js +7 -1
- package/lib/Antd5/locale/km_KH.js +3 -0
- package/lib/Antd5/locale/kmr_IQ.js +8 -0
- package/lib/Antd5/locale/kn_IN.js +8 -2
- package/lib/Antd5/locale/ko_KR.js +3 -2
- package/lib/Antd5/locale/ku_IQ.js +8 -0
- package/lib/Antd5/locale/lt_LT.js +3 -2
- package/lib/Antd5/locale/lv_LV.js +8 -0
- package/lib/Antd5/locale/mk_MK.js +7 -1
- package/lib/Antd5/locale/ml_IN.js +7 -1
- package/lib/Antd5/locale/mn_MN.js +8 -2
- package/lib/Antd5/locale/ms_MY.js +3 -2
- package/lib/Antd5/locale/my_MM.js +3 -2
- package/lib/Antd5/locale/nb_NO.js +7 -1
- package/lib/Antd5/locale/ne_NP.js +3 -2
- package/lib/Antd5/locale/nl_BE.js +2 -1
- package/lib/Antd5/locale/nl_NL.js +2 -1
- package/lib/Antd5/locale/pl_PL.js +3 -2
- package/lib/Antd5/locale/pt_BR.js +3 -2
- package/lib/Antd5/locale/pt_PT.js +3 -2
- package/lib/Antd5/locale/ro_RO.js +7 -1
- package/lib/Antd5/locale/ru_RU.js +4 -3
- package/lib/Antd5/locale/si_LK.js +8 -2
- package/lib/Antd5/locale/sk_SK.js +8 -2
- package/lib/Antd5/locale/sl_SI.js +8 -0
- package/lib/Antd5/locale/sr_RS.js +7 -1
- package/lib/Antd5/locale/sv_SE.js +3 -2
- package/lib/Antd5/locale/ta_IN.js +8 -2
- package/lib/Antd5/locale/th_TH.js +3 -2
- package/lib/Antd5/locale/tk_TK.js +7 -1
- package/lib/Antd5/locale/tr_TR.js +8 -2
- package/lib/Antd5/locale/uk_UA.js +3 -2
- package/lib/Antd5/locale/ur_PK.js +7 -1
- package/lib/Antd5/locale/uz_UZ.js +5 -4
- package/lib/Antd5/locale/vi_VN.js +3 -2
- package/lib/Antd5/locale/zh_CN.js +3 -2
- package/lib/Antd5/locale/zh_HK.js +11 -3
- package/lib/Antd5/locale/zh_TW.js +11 -3
- package/lib/Antd5/mentions/index.js +1 -1
- package/lib/Antd5/mentions/style/index.js +12 -7
- package/lib/Antd5/menu/MenuItem.js +3 -1
- package/lib/Antd5/menu/OverrideContext.js +2 -2
- package/lib/Antd5/menu/menu.js +1 -7
- package/lib/Antd5/menu/style/index.js +9 -6
- package/lib/Antd5/menu/style/theme.js +4 -3
- package/lib/Antd5/menu/style/vertical.js +1 -1
- package/lib/Antd5/message/style/index.js +4 -3
- package/lib/Antd5/modal/ConfirmDialog.js +2 -19
- package/lib/Antd5/modal/Modal.js +67 -35
- package/lib/Antd5/modal/confirm.js +5 -3
- package/lib/Antd5/modal/style/confirm.js +3 -1
- package/lib/Antd5/modal/style/index.js +21 -1
- package/lib/Antd5/modal/useModal/HookModal.js +2 -1
- package/lib/Antd5/notification/PurePanel.js +13 -6
- package/lib/Antd5/notification/index.js +3 -4
- package/lib/Antd5/notification/style/index.js +4 -3
- package/lib/Antd5/notification/style/stack.js +2 -1
- package/lib/Antd5/notification/useNotification.js +9 -4
- package/lib/Antd5/notification/util.js +9 -0
- package/lib/Antd5/pagination/Pagination.js +87 -20
- package/lib/Antd5/pagination/style/index.js +2 -10
- package/lib/Antd5/pagination/useShowSizeChanger.js +13 -0
- package/lib/Antd5/popconfirm/index.js +21 -6
- package/lib/Antd5/popover/index.js +21 -8
- package/lib/Antd5/progress/Steps.js +6 -2
- package/lib/Antd5/progress/progress.js +2 -2
- package/lib/Antd5/progress/utils.js +3 -3
- package/lib/Antd5/qr-code/style/index.js +2 -2
- package/lib/Antd5/segmented/index.js +16 -8
- package/lib/Antd5/segmented/style/index.js +14 -6
- package/lib/Antd5/select/index.js +45 -16
- package/lib/Antd5/select/style/dropdown.js +10 -9
- package/lib/Antd5/select/style/index.js +14 -10
- package/lib/Antd5/select/style/single.js +6 -3
- package/lib/Antd5/select/style/variants.js +55 -1
- package/lib/Antd5/skeleton/Paragraph.js +5 -8
- package/lib/Antd5/skeleton/Skeleton.js +8 -7
- package/lib/Antd5/slider/SliderTooltip.js +3 -2
- package/lib/Antd5/slider/index.js +43 -17
- package/lib/Antd5/slider/style/index.js +3 -3
- package/lib/Antd5/slider/useRafLock.js +1 -1
- package/lib/Antd5/space/Compact.js +8 -6
- package/lib/Antd5/space/index.js +16 -12
- package/lib/Antd5/spin/index.js +11 -9
- package/lib/Antd5/spin/style/index.js +1 -3
- package/lib/Antd5/spin/usePercent.js +1 -1
- package/lib/Antd5/splitter/SplitBar.js +56 -7
- package/lib/Antd5/splitter/Splitter.js +27 -17
- package/lib/Antd5/splitter/hooks/useResizable.js +3 -3
- package/lib/Antd5/splitter/hooks/useResize.js +17 -6
- package/lib/Antd5/splitter/style/index.js +32 -6
- package/lib/Antd5/statistic/Countdown.js +8 -61
- package/lib/Antd5/statistic/Statistic.js +17 -9
- package/lib/Antd5/statistic/Timer.js +91 -0
- package/lib/Antd5/statistic/index.js +2 -0
- package/lib/Antd5/statistic/utils.js +2 -2
- package/lib/Antd5/steps/index.js +8 -7
- package/lib/Antd5/steps/style/index.js +1 -1
- package/lib/Antd5/style/index.js +9 -4
- package/lib/Antd5/switch/style/index.js +2 -2
- package/lib/Antd5/table/InternalTable.js +6 -5
- package/lib/Antd5/table/hooks/useFilter/FilterDropdown.js +15 -11
- package/lib/Antd5/table/hooks/useFilter/FilterSearch.js +1 -1
- package/lib/Antd5/table/hooks/useFilter/index.js +3 -2
- package/lib/Antd5/table/hooks/useSelection.js +11 -3
- package/lib/Antd5/table/hooks/useSorter.js +4 -3
- package/lib/Antd5/table/style/filter.js +2 -2
- package/lib/Antd5/table/style/index.js +9 -9
- package/lib/Antd5/table/style/sorter.js +2 -1
- package/lib/Antd5/table/style/sticky.js +1 -1
- package/lib/Antd5/tabs/hooks/useLegacyItems.js +11 -4
- package/lib/Antd5/tabs/index.js +9 -2
- package/lib/Antd5/tabs/style/index.js +44 -23
- package/lib/Antd5/tag/style/index.js +3 -3
- package/lib/Antd5/theme/context.js +1 -3
- package/lib/Antd5/theme/getDesignToken.js +2 -2
- package/lib/Antd5/theme/themes/dark/colorAlgorithm.js +3 -3
- package/lib/Antd5/theme/themes/dark/index.js +13 -3
- package/lib/Antd5/theme/themes/default/colorAlgorithm.js +3 -3
- package/lib/Antd5/theme/themes/default/index.js +5 -1
- package/lib/Antd5/theme/themes/default/theme.js +4 -0
- package/lib/Antd5/theme/themes/shared/genColorMapToken.js +3 -3
- package/lib/Antd5/theme/themes/shared/genFontSizes.js +3 -1
- package/lib/Antd5/theme/util/alias.js +2 -2
- package/lib/Antd5/theme/util/genStyleUtils.js +9 -11
- package/lib/Antd5/theme/util/getAlphaColor.js +12 -12
- package/lib/Antd5/theme/util/useResetIconStyle.js +2 -10
- package/lib/Antd5/time-picker/index.js +1 -1
- package/lib/Antd5/timeline/TimelineItemList.js +1 -1
- package/lib/Antd5/tooltip/index.js +46 -31
- package/lib/Antd5/tooltip/style/index.js +13 -4
- package/lib/Antd5/tour/index.js +4 -2
- package/lib/Antd5/tour/panelRender.js +42 -27
- package/lib/Antd5/tour/style/index.js +3 -3
- package/lib/Antd5/transfer/ListItem.js +1 -1
- package/lib/Antd5/transfer/hooks/useData.js +8 -4
- package/lib/Antd5/transfer/hooks/useSelection.js +5 -4
- package/lib/Antd5/transfer/index.js +6 -2
- package/lib/Antd5/transfer/list.js +32 -13
- package/lib/Antd5/transfer/search.js +1 -1
- package/lib/Antd5/transfer/style/index.js +3 -1
- package/lib/Antd5/tree/DirectoryTree.js +2 -2
- package/lib/Antd5/tree/style/index.js +9 -3
- package/lib/Antd5/tree-select/index.js +61 -18
- package/lib/Antd5/tree-select/style/index.js +1 -1
- package/lib/Antd5/typography/Base/Ellipsis.js +3 -3
- package/lib/Antd5/typography/Base/index.js +20 -13
- package/lib/Antd5/typography/Editable.js +1 -1
- package/lib/Antd5/typography/Typography.js +8 -7
- package/lib/Antd5/typography/hooks/useCopyClick.js +24 -25
- package/lib/Antd5/typography/hooks/usePrevious.js +1 -1
- package/lib/Antd5/typography/style/index.js +5 -5
- package/lib/Antd5/typography/style/mixins.js +1 -1
- package/lib/Antd5/upload/Upload.js +22 -24
- package/lib/Antd5/version/index.js +0 -1
- package/lib/Antd5/version/token-meta.json +1 -0
- package/lib/Antd5/version/token.json +1 -0
- package/lib/Antd5/version/version.js +1 -1
- package/lib/Antd5/watermark/context.js +1 -1
- package/lib/Antd5/watermark/index.js +20 -13
- package/lib/Antd5/watermark/useClips.js +18 -16
- package/lib/Antd5/watermark/useRafDebounce.js +1 -1
- package/lib/Antd5/watermark/useSingletonCache.js +19 -0
- package/lib/Antd5/watermark/useWatermark.js +9 -18
- package/lib/CWCascader/rc-cascader/OptionList/Column.js +17 -18
- package/lib/CWMessage/MessageContent/TabList/index.js +10 -10
- package/lib/CWMessage/MessageContent/index.js +26 -28
- package/lib/CWMessage/index.js +42 -46
- package/lib/CWRangePicker/index.js +15 -15
- package/lib/CWRangePicker/utils/generate/dayjs.js +112 -23
- package/lib/CWRangePicker/utils/generate/moment.js +109 -21
- package/lib/CWSelect/index.js +423 -150
- package/lib/CWTable/CWTable.js +11 -11
- package/lib/Joyride/index.js +3 -3
- package/lib/ModuleFederation/react-dynamic-remote-component/RemoteComponent.js +38 -39
- package/lib/ModuleFederation/react-dynamic-remote-component/load-module.js +22 -23
- package/lib/QuickTransfer/index.js +13 -13
- package/lib/SearchBar/index.js +7 -7
- package/lib/SingleSpa/index.js +22 -24
- package/lib/TimeRangeSlider/TimeRangeSliderCmp/hooks/useMouse.js +3 -3
- package/lib/TimeRangeSlider/index.js +6 -6
- package/lib/TimeRangeSlider/utils/generate/dayjs.js +109 -20
- package/lib/TimeRangeSlider/utils/generate/moment.js +109 -20
- package/lib/TimeZoneSelect/index.js +21 -22
- package/package.json +35 -34
- package/lib/Antd5/_util/isNumeric.js +0 -4
- package/lib/Antd5/pagination/Select.js +0 -24
|
@@ -1,5 +1,5 @@
|
|
|
1
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", "value", "defaultValue", "format", "defaultFormat", "allowClear", "presets", "children", "trigger", "open", "disabled", "placement", "arrow", "panelRender", "showText", "style", "className", "size", "rootClassName", "prefixCls", "styles", "disabledAlpha", "onFormatChange", "onChange", "onClear", "onOpenChange", "onChangeComplete", "getPopupContainer", "autoAdjustOverflow", "destroyTooltipOnHide", "disabledFormat"];
|
|
2
|
+
var _excluded = ["mode", "value", "defaultValue", "format", "defaultFormat", "allowClear", "presets", "children", "trigger", "open", "disabled", "placement", "arrow", "panelRender", "showText", "style", "className", "size", "rootClassName", "prefixCls", "styles", "disabledAlpha", "onFormatChange", "onChange", "onClear", "onOpenChange", "onChangeComplete", "getPopupContainer", "autoAdjustOverflow", "destroyTooltipOnHide", "destroyOnHidden", "disabledFormat"];
|
|
3
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
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
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; }
|
|
@@ -71,6 +71,7 @@ var ColorPicker = function ColorPicker(props) {
|
|
|
71
71
|
_props$autoAdjustOver = props.autoAdjustOverflow,
|
|
72
72
|
autoAdjustOverflow = _props$autoAdjustOver === void 0 ? true : _props$autoAdjustOver,
|
|
73
73
|
destroyTooltipOnHide = props.destroyTooltipOnHide,
|
|
74
|
+
destroyOnHidden = props.destroyOnHidden,
|
|
74
75
|
disabledFormat = props.disabledFormat,
|
|
75
76
|
rest = _objectWithoutProperties(props, _excluded);
|
|
76
77
|
var _useContext = useContext(ConfigContext),
|
|
@@ -206,13 +207,15 @@ var ColorPicker = function ColorPicker(props) {
|
|
|
206
207
|
rootClassName: rootClassName,
|
|
207
208
|
getPopupContainer: getPopupContainer,
|
|
208
209
|
autoAdjustOverflow: autoAdjustOverflow,
|
|
209
|
-
|
|
210
|
+
destroyOnHidden: destroyOnHidden !== null && destroyOnHidden !== void 0 ? destroyOnHidden : !!destroyTooltipOnHide
|
|
210
211
|
};
|
|
211
212
|
var mergedStyle = _objectSpread(_objectSpread({}, colorPicker === null || colorPicker === void 0 ? void 0 : colorPicker.style), style);
|
|
212
213
|
// ============================ zIndex ============================
|
|
213
214
|
return wrapCSSVar(_jsx(Popover, _objectSpread(_objectSpread({
|
|
214
215
|
style: styles === null || styles === void 0 ? void 0 : styles.popup,
|
|
215
|
-
|
|
216
|
+
styles: {
|
|
217
|
+
body: styles === null || styles === void 0 ? void 0 : styles.popupOverlayInner
|
|
218
|
+
},
|
|
216
219
|
onOpenChange: function onOpenChange(visible) {
|
|
217
220
|
if (!visible || !mergedDisabled) {
|
|
218
221
|
setPopupOpen(visible);
|
|
@@ -243,7 +246,9 @@ var ColorPicker = function ColorPicker(props) {
|
|
|
243
246
|
disabledFormat: disabledFormat
|
|
244
247
|
})
|
|
245
248
|
}),
|
|
246
|
-
|
|
249
|
+
classNames: {
|
|
250
|
+
root: mergedPopupCls
|
|
251
|
+
}
|
|
247
252
|
}, popoverProps), {}, {
|
|
248
253
|
children: children || _jsx(ColorTrigger, _objectSpread(_objectSpread({
|
|
249
254
|
activeIndex: popupOpen ? activeIndex : -1,
|
|
@@ -262,14 +267,14 @@ var ColorPicker = function ColorPicker(props) {
|
|
|
262
267
|
if (process.env.NODE_ENV !== 'production') {
|
|
263
268
|
ColorPicker.displayName = 'ColorPicker';
|
|
264
269
|
}
|
|
265
|
-
var PurePanel = genPurePanel(ColorPicker,
|
|
266
|
-
function (prefixCls) {
|
|
267
|
-
return prefixCls;
|
|
268
|
-
}, function (props) {
|
|
270
|
+
var PurePanel = genPurePanel(ColorPicker, undefined, function (props) {
|
|
269
271
|
return _objectSpread(_objectSpread({}, props), {}, {
|
|
270
272
|
placement: 'bottom',
|
|
271
273
|
autoAdjustOverflow: false
|
|
272
274
|
});
|
|
275
|
+
}, 'color-picker', /* istanbul ignore next */
|
|
276
|
+
function (prefixCls) {
|
|
277
|
+
return prefixCls;
|
|
273
278
|
});
|
|
274
279
|
ColorPicker._InternalPanelDoNotUseOrYouWillBeFired = PurePanel;
|
|
275
280
|
export default ColorPicker;
|
|
@@ -5,7 +5,7 @@ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length)
|
|
|
5
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
6
|
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
7
7
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
|
-
import React, {
|
|
8
|
+
import React, { useState } from 'react';
|
|
9
9
|
import { generateColor, getColorAlpha } from '../util';
|
|
10
10
|
import ColorSteppers from './ColorSteppers';
|
|
11
11
|
var ColorAlphaInput = function ColorAlphaInput(_ref) {
|
|
@@ -13,23 +13,18 @@ var ColorAlphaInput = function ColorAlphaInput(_ref) {
|
|
|
13
13
|
value = _ref.value,
|
|
14
14
|
onChange = _ref.onChange;
|
|
15
15
|
var colorAlphaInputPrefixCls = "".concat(prefixCls, "-alpha-input");
|
|
16
|
-
var _useState = useState(
|
|
16
|
+
var _useState = useState(function () {
|
|
17
|
+
return generateColor(value || '#000');
|
|
18
|
+
}),
|
|
17
19
|
_useState2 = _slicedToArray(_useState, 2),
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
useEffect(function () {
|
|
22
|
-
if (value) {
|
|
23
|
-
setAlphaValue(value);
|
|
24
|
-
}
|
|
25
|
-
}, [value]);
|
|
20
|
+
internalValue = _useState2[0],
|
|
21
|
+
setInternalValue = _useState2[1];
|
|
22
|
+
var alphaValue = value || internalValue;
|
|
26
23
|
var handleAlphaChange = function handleAlphaChange(step) {
|
|
27
24
|
var hsba = alphaValue.toHsb();
|
|
28
25
|
hsba.a = (step || 0) / 100;
|
|
29
26
|
var genColor = generateColor(hsba);
|
|
30
|
-
|
|
31
|
-
setAlphaValue(genColor);
|
|
32
|
-
}
|
|
27
|
+
setInternalValue(genColor);
|
|
33
28
|
onChange === null || onChange === void 0 || onChange(genColor);
|
|
34
29
|
};
|
|
35
30
|
return _jsx(ColorSteppers, {
|
|
@@ -6,7 +6,7 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
|
|
|
6
6
|
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
7
7
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
8
|
import React, { useEffect, useState } from 'react';
|
|
9
|
-
import Input from '../../input';
|
|
9
|
+
import Input from '../../input/Input';
|
|
10
10
|
import { toHexFormat } from '../color';
|
|
11
11
|
import { generateColor } from '../util';
|
|
12
12
|
var hexReg = /(^#[\da-f]{6}$)|(^#[\da-f]{8}$)/i;
|
|
@@ -5,7 +5,7 @@ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length)
|
|
|
5
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
6
|
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
7
7
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
|
-
import React, {
|
|
8
|
+
import React, { useState } from 'react';
|
|
9
9
|
import { generateColor, getRoundNumber } from '../util';
|
|
10
10
|
import ColorSteppers from './ColorSteppers';
|
|
11
11
|
var ColorHsbInput = function ColorHsbInput(_ref) {
|
|
@@ -13,23 +13,18 @@ var ColorHsbInput = function ColorHsbInput(_ref) {
|
|
|
13
13
|
value = _ref.value,
|
|
14
14
|
onChange = _ref.onChange;
|
|
15
15
|
var colorHsbInputPrefixCls = "".concat(prefixCls, "-hsb-input");
|
|
16
|
-
var _useState = useState(
|
|
16
|
+
var _useState = useState(function () {
|
|
17
|
+
return generateColor(value || '#000');
|
|
18
|
+
}),
|
|
17
19
|
_useState2 = _slicedToArray(_useState, 2),
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
useEffect(function () {
|
|
22
|
-
if (value) {
|
|
23
|
-
setHsbValue(value);
|
|
24
|
-
}
|
|
25
|
-
}, [value]);
|
|
20
|
+
internalValue = _useState2[0],
|
|
21
|
+
setInternalValue = _useState2[1];
|
|
22
|
+
var hsbValue = value || internalValue;
|
|
26
23
|
var handleHsbChange = function handleHsbChange(step, type) {
|
|
27
24
|
var hsb = hsbValue.toHsb();
|
|
28
25
|
hsb[type] = type === 'h' ? step : (step || 0) / 100;
|
|
29
26
|
var genColor = generateColor(hsb);
|
|
30
|
-
|
|
31
|
-
setHsbValue(genColor);
|
|
32
|
-
}
|
|
27
|
+
setInternalValue(genColor);
|
|
33
28
|
onChange === null || onChange === void 0 || onChange(genColor);
|
|
34
29
|
};
|
|
35
30
|
return _jsxs("div", {
|
|
@@ -14,15 +14,15 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
14
14
|
import React, { useMemo } from 'react';
|
|
15
15
|
import useMergedState from 'rc-util/lib/hooks/useMergedState';
|
|
16
16
|
import Select from '../../select';
|
|
17
|
-
import {
|
|
17
|
+
import { FORMAT_HEX, FORMAT_HSB, FORMAT_RGB } from '../interface';
|
|
18
18
|
import ColorAlphaInput from './ColorAlphaInput';
|
|
19
19
|
import ColorHexInput from './ColorHexInput';
|
|
20
20
|
import ColorHsbInput from './ColorHsbInput';
|
|
21
21
|
import ColorRgbInput from './ColorRgbInput';
|
|
22
|
-
var selectOptions = [
|
|
22
|
+
var selectOptions = [FORMAT_HEX, FORMAT_HSB, FORMAT_RGB].map(function (format) {
|
|
23
23
|
return {
|
|
24
24
|
value: format,
|
|
25
|
-
label: format.
|
|
25
|
+
label: format.toUpperCase()
|
|
26
26
|
};
|
|
27
27
|
});
|
|
28
28
|
var ColorInput = function ColorInput(props) {
|
|
@@ -33,7 +33,7 @@ var ColorInput = function ColorInput(props) {
|
|
|
33
33
|
onFormatChange = props.onFormatChange,
|
|
34
34
|
onChange = props.onChange,
|
|
35
35
|
disabledFormat = props.disabledFormat;
|
|
36
|
-
var _useMergedState = useMergedState(
|
|
36
|
+
var _useMergedState = useMergedState(FORMAT_HEX, {
|
|
37
37
|
value: format,
|
|
38
38
|
onChange: onFormatChange
|
|
39
39
|
}),
|
|
@@ -51,11 +51,11 @@ var ColorInput = function ColorInput(props) {
|
|
|
51
51
|
onChange: onChange
|
|
52
52
|
};
|
|
53
53
|
switch (colorFormat) {
|
|
54
|
-
case
|
|
54
|
+
case FORMAT_HSB:
|
|
55
55
|
return _jsx(ColorHsbInput, _objectSpread({}, inputProps));
|
|
56
|
-
case
|
|
56
|
+
case FORMAT_RGB:
|
|
57
57
|
return _jsx(ColorRgbInput, _objectSpread({}, inputProps));
|
|
58
|
-
// case
|
|
58
|
+
// case FORMAT_HEX:
|
|
59
59
|
default:
|
|
60
60
|
return _jsx(ColorHexInput, _objectSpread({}, inputProps));
|
|
61
61
|
}
|
|
@@ -36,15 +36,16 @@ export var isBright = function isBright(value, bgColorToken) {
|
|
|
36
36
|
}
|
|
37
37
|
return r * 0.299 + g * 0.587 + b * 0.114 > 192;
|
|
38
38
|
};
|
|
39
|
-
var genCollapsePanelKey = function genCollapsePanelKey(
|
|
40
|
-
var
|
|
41
|
-
|
|
39
|
+
var genCollapsePanelKey = function genCollapsePanelKey(preset, index) {
|
|
40
|
+
var _preset$key;
|
|
41
|
+
var mergedKey = (_preset$key = preset.key) !== null && _preset$key !== void 0 ? _preset$key : index;
|
|
42
|
+
return "panel-".concat(mergedKey);
|
|
42
43
|
};
|
|
43
|
-
var ColorPresets = function ColorPresets(
|
|
44
|
-
var prefixCls =
|
|
45
|
-
presets =
|
|
46
|
-
color =
|
|
47
|
-
onChange =
|
|
44
|
+
var ColorPresets = function ColorPresets(_ref) {
|
|
45
|
+
var prefixCls = _ref.prefixCls,
|
|
46
|
+
presets = _ref.presets,
|
|
47
|
+
color = _ref.value,
|
|
48
|
+
onChange = _ref.onChange;
|
|
48
49
|
var _useLocale = useLocale('ColorPicker'),
|
|
49
50
|
_useLocale2 = _slicedToArray(_useLocale, 1),
|
|
50
51
|
locale = _useLocale2[0];
|
|
@@ -59,20 +60,22 @@ var ColorPresets = function ColorPresets(_ref2) {
|
|
|
59
60
|
presetsValue = _useMergedState2[0];
|
|
60
61
|
var colorPresetsPrefixCls = "".concat(prefixCls, "-presets");
|
|
61
62
|
var activeKeys = useMemo(function () {
|
|
62
|
-
return presetsValue.reduce(function (acc, preset) {
|
|
63
|
+
return presetsValue.reduce(function (acc, preset, index) {
|
|
63
64
|
var _preset$defaultOpen = preset.defaultOpen,
|
|
64
65
|
defaultOpen = _preset$defaultOpen === void 0 ? true : _preset$defaultOpen;
|
|
65
|
-
if (defaultOpen)
|
|
66
|
+
if (defaultOpen) {
|
|
67
|
+
acc.push(genCollapsePanelKey(preset, index));
|
|
68
|
+
}
|
|
66
69
|
return acc;
|
|
67
70
|
}, []);
|
|
68
71
|
}, [presetsValue]);
|
|
69
72
|
var handleClick = function handleClick(colorValue) {
|
|
70
73
|
onChange === null || onChange === void 0 || onChange(colorValue);
|
|
71
74
|
};
|
|
72
|
-
var items = presetsValue.map(function (preset) {
|
|
75
|
+
var items = presetsValue.map(function (preset, index) {
|
|
73
76
|
var _preset$colors;
|
|
74
77
|
return {
|
|
75
|
-
key: genCollapsePanelKey(preset),
|
|
78
|
+
key: genCollapsePanelKey(preset, index),
|
|
76
79
|
label: _jsx("div", {
|
|
77
80
|
className: "".concat(colorPresetsPrefixCls, "-label"),
|
|
78
81
|
children: preset === null || preset === void 0 ? void 0 : preset.label
|
|
@@ -5,7 +5,7 @@ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length)
|
|
|
5
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
6
|
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
7
7
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
|
-
import React, {
|
|
8
|
+
import React, { useState } from 'react';
|
|
9
9
|
import { generateColor } from '../util';
|
|
10
10
|
import ColorSteppers from './ColorSteppers';
|
|
11
11
|
var ColorRgbInput = function ColorRgbInput(_ref) {
|
|
@@ -13,23 +13,18 @@ var ColorRgbInput = function ColorRgbInput(_ref) {
|
|
|
13
13
|
value = _ref.value,
|
|
14
14
|
onChange = _ref.onChange;
|
|
15
15
|
var colorRgbInputPrefixCls = "".concat(prefixCls, "-rgb-input");
|
|
16
|
-
var _useState = useState(
|
|
16
|
+
var _useState = useState(function () {
|
|
17
|
+
return generateColor(value || '#000');
|
|
18
|
+
}),
|
|
17
19
|
_useState2 = _slicedToArray(_useState, 2),
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
useEffect(function () {
|
|
22
|
-
if (value) {
|
|
23
|
-
setRgbValue(value);
|
|
24
|
-
}
|
|
25
|
-
}, [value]);
|
|
20
|
+
internalValue = _useState2[0],
|
|
21
|
+
setInternalValue = _useState2[1];
|
|
22
|
+
var rgbValue = value || internalValue;
|
|
26
23
|
var handleRgbChange = function handleRgbChange(step, type) {
|
|
27
24
|
var rgb = rgbValue.toRgb();
|
|
28
25
|
rgb[type] = step || 0;
|
|
29
26
|
var genColor = generateColor(rgb);
|
|
30
|
-
|
|
31
|
-
setRgbValue(genColor);
|
|
32
|
-
}
|
|
27
|
+
setInternalValue(genColor);
|
|
33
28
|
onChange === null || onChange === void 0 || onChange(genColor);
|
|
34
29
|
};
|
|
35
30
|
return _jsxs("div", {
|
|
@@ -5,7 +5,7 @@ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length)
|
|
|
5
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
6
|
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
7
7
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
|
-
import React, {
|
|
8
|
+
import React, { useState } from 'react';
|
|
9
9
|
import classNames from 'classnames';
|
|
10
10
|
import InputNumber from '../../input-number';
|
|
11
11
|
var ColorSteppers = function ColorSteppers(_ref) {
|
|
@@ -19,16 +19,11 @@ var ColorSteppers = function ColorSteppers(_ref) {
|
|
|
19
19
|
className = _ref.className,
|
|
20
20
|
formatter = _ref.formatter;
|
|
21
21
|
var colorSteppersPrefixCls = "".concat(prefixCls, "-steppers");
|
|
22
|
-
var _useState = useState(
|
|
22
|
+
var _useState = useState(0),
|
|
23
23
|
_useState2 = _slicedToArray(_useState, 2),
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
useEffect(function () {
|
|
28
|
-
if (!Number.isNaN(value)) {
|
|
29
|
-
setStepValue(value);
|
|
30
|
-
}
|
|
31
|
-
}, [value]);
|
|
24
|
+
internalValue = _useState2[0],
|
|
25
|
+
setInternalValue = _useState2[1];
|
|
26
|
+
var stepValue = !Number.isNaN(value) ? value : internalValue;
|
|
32
27
|
return _jsx(InputNumber, {
|
|
33
28
|
className: classNames(colorSteppersPrefixCls, className),
|
|
34
29
|
min: min,
|
|
@@ -37,9 +32,7 @@ var ColorSteppers = function ColorSteppers(_ref) {
|
|
|
37
32
|
formatter: formatter,
|
|
38
33
|
size: "small",
|
|
39
34
|
onChange: function onChange(step) {
|
|
40
|
-
|
|
41
|
-
setStepValue(step || 0);
|
|
42
|
-
}
|
|
35
|
+
setInternalValue(step || 0);
|
|
43
36
|
_onChange === null || _onChange === void 0 || _onChange(step);
|
|
44
37
|
}
|
|
45
38
|
});
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
export var
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
ColorFormat["rgb"] = "rgb";
|
|
5
|
-
ColorFormat["hsb"] = "hsb";
|
|
6
|
-
})(ColorFormat || (ColorFormat = {}));
|
|
1
|
+
export var FORMAT_HEX = 'hex';
|
|
2
|
+
export var FORMAT_RGB = 'rgb';
|
|
3
|
+
export var FORMAT_HSB = 'hsb';
|
|
@@ -7,10 +7,11 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
7
7
|
import { unit } from '@ant-design/cssinjs';
|
|
8
8
|
/**
|
|
9
9
|
* @private Internal usage only
|
|
10
|
+
* see: https://developer.mozilla.org/en-US/docs/Web/CSS/gradient/conic-gradient#checkerboard
|
|
10
11
|
*/
|
|
11
12
|
export var getTransBg = function getTransBg(size, colorFill) {
|
|
12
13
|
return {
|
|
13
|
-
backgroundImage: "conic-gradient(".concat(colorFill, "
|
|
14
|
+
backgroundImage: "conic-gradient(".concat(colorFill, " 25%, transparent 25% 50%, ").concat(colorFill, " 50% 75%, transparent 75% 100%)"),
|
|
14
15
|
backgroundSize: "".concat(size, " ").concat(size)
|
|
15
16
|
};
|
|
16
17
|
};
|
|
@@ -8,18 +8,26 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
8
8
|
import * as React from 'react';
|
|
9
9
|
import { Provider as MotionProvider } from 'rc-motion';
|
|
10
10
|
import { useToken } from '../theme/internal';
|
|
11
|
+
var MotionCacheContext = /*#__PURE__*/React.createContext(true);
|
|
12
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
13
|
+
MotionCacheContext.displayName = 'MotionCacheContext';
|
|
14
|
+
}
|
|
11
15
|
export default function MotionWrapper(props) {
|
|
16
|
+
var parentMotion = React.useContext(MotionCacheContext);
|
|
12
17
|
var children = props.children;
|
|
13
18
|
var _useToken = useToken(),
|
|
14
19
|
_useToken2 = _slicedToArray(_useToken, 2),
|
|
15
20
|
token = _useToken2[1];
|
|
16
21
|
var motion = token.motion;
|
|
17
22
|
var needWrapMotionProviderRef = React.useRef(false);
|
|
18
|
-
needWrapMotionProviderRef.current
|
|
23
|
+
needWrapMotionProviderRef.current || (needWrapMotionProviderRef.current = parentMotion !== motion);
|
|
19
24
|
if (needWrapMotionProviderRef.current) {
|
|
20
|
-
return _jsx(
|
|
21
|
-
|
|
22
|
-
children:
|
|
25
|
+
return _jsx(MotionCacheContext.Provider, {
|
|
26
|
+
value: motion,
|
|
27
|
+
children: _jsx(MotionProvider, {
|
|
28
|
+
motion: motion,
|
|
29
|
+
children: children
|
|
30
|
+
})
|
|
23
31
|
});
|
|
24
32
|
}
|
|
25
33
|
return children;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as ReactDOM from 'react-dom';
|
|
3
|
+
import { render, unmount } from 'rc-util/lib/React/render';
|
|
4
|
+
import warning from '../_util/warning';
|
|
5
|
+
var defaultReactRender = function defaultReactRender(node, container) {
|
|
6
|
+
// TODO: Remove in v6
|
|
7
|
+
// Warning for React 19
|
|
8
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
9
|
+
var majorVersion = parseInt(React.version.split('.')[0], 10);
|
|
10
|
+
var fullKeys = Object.keys(ReactDOM);
|
|
11
|
+
warning(majorVersion < 19 || fullKeys.includes('createRoot'), 'compatible', 'antd v5 support React is 16 ~ 18. see https://u.ant.design/v5-for-19 for compatible.');
|
|
12
|
+
}
|
|
13
|
+
render(node, container);
|
|
14
|
+
return function () {
|
|
15
|
+
return unmount(container);
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
var unstableRender = defaultReactRender;
|
|
19
|
+
/**
|
|
20
|
+
* @deprecated Set React render function for compatible usage.
|
|
21
|
+
* This is internal usage only compatible with React 19.
|
|
22
|
+
* And will be removed in next major version.
|
|
23
|
+
*/
|
|
24
|
+
export function unstableSetRender(render) {
|
|
25
|
+
if (render) {
|
|
26
|
+
unstableRender = render;
|
|
27
|
+
}
|
|
28
|
+
return unstableRender;
|
|
29
|
+
}
|
|
@@ -1,7 +1,13 @@
|
|
|
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); }
|
|
1
7
|
import * as React from 'react';
|
|
2
8
|
export var defaultPrefixCls = 'ant';
|
|
3
9
|
export var defaultIconPrefixCls = 'anticon';
|
|
4
|
-
export var Variants = ['outlined', 'borderless', 'filled'];
|
|
10
|
+
export var Variants = ['outlined', 'borderless', 'filled', 'underlined'];
|
|
5
11
|
var defaultGetPrefixCls = function defaultGetPrefixCls(suffixCls, customizePrefixCls) {
|
|
6
12
|
if (customizePrefixCls) {
|
|
7
13
|
return customizePrefixCls;
|
|
@@ -15,4 +21,28 @@ export var ConfigContext = /*#__PURE__*/React.createContext({
|
|
|
15
21
|
iconPrefixCls: defaultIconPrefixCls
|
|
16
22
|
});
|
|
17
23
|
var ConfigConsumer = ConfigContext.Consumer;
|
|
18
|
-
export { ConfigConsumer };
|
|
24
|
+
export { ConfigConsumer };
|
|
25
|
+
var EMPTY_OBJECT = {};
|
|
26
|
+
/**
|
|
27
|
+
* Get ConfigProvider configured component props.
|
|
28
|
+
* This help to reduce bundle size for saving `?.` operator.
|
|
29
|
+
* Do not use as `useMemo` deps since we do not cache the object here.
|
|
30
|
+
*
|
|
31
|
+
* NOTE: not refactor this with `useMemo` since memo will cost another memory space,
|
|
32
|
+
* which will waste both compare calculation & memory.
|
|
33
|
+
*/
|
|
34
|
+
export function useComponentConfig(propName) {
|
|
35
|
+
var context = React.useContext(ConfigContext);
|
|
36
|
+
var getPrefixCls = context.getPrefixCls,
|
|
37
|
+
direction = context.direction,
|
|
38
|
+
getPopupContainer = context.getPopupContainer;
|
|
39
|
+
var propValue = context[propName];
|
|
40
|
+
return _objectSpread(_objectSpread({
|
|
41
|
+
classNames: EMPTY_OBJECT,
|
|
42
|
+
styles: EMPTY_OBJECT
|
|
43
|
+
}, propValue), {}, {
|
|
44
|
+
getPrefixCls: getPrefixCls,
|
|
45
|
+
direction: direction,
|
|
46
|
+
getPopupContainer: getPopupContainer
|
|
47
|
+
});
|
|
48
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { generate } from '@ant-design/colors';
|
|
2
|
-
import {
|
|
2
|
+
import { FastColor } from '@ant-design/fast-color';
|
|
3
3
|
import canUseDom from 'rc-util/lib/Dom/canUseDom';
|
|
4
4
|
import { updateCSS } from 'rc-util/lib/Dom/dynamicCSS';
|
|
5
5
|
import warning from '../_util/warning';
|
|
@@ -12,20 +12,20 @@ export function getStyle(globalPrefixCls, theme) {
|
|
|
12
12
|
return clone.toRgbString();
|
|
13
13
|
};
|
|
14
14
|
var fillColor = function fillColor(colorVal, type) {
|
|
15
|
-
var baseColor = new
|
|
15
|
+
var baseColor = new FastColor(colorVal);
|
|
16
16
|
var colorPalettes = generate(baseColor.toRgbString());
|
|
17
17
|
variables["".concat(type, "-color")] = formatColor(baseColor);
|
|
18
18
|
variables["".concat(type, "-color-disabled")] = colorPalettes[1];
|
|
19
19
|
variables["".concat(type, "-color-hover")] = colorPalettes[4];
|
|
20
20
|
variables["".concat(type, "-color-active")] = colorPalettes[6];
|
|
21
|
-
variables["".concat(type, "-color-outline")] = baseColor.clone().
|
|
21
|
+
variables["".concat(type, "-color-outline")] = baseColor.clone().setA(0.2).toRgbString();
|
|
22
22
|
variables["".concat(type, "-color-deprecated-bg")] = colorPalettes[0];
|
|
23
23
|
variables["".concat(type, "-color-deprecated-border")] = colorPalettes[2];
|
|
24
24
|
};
|
|
25
25
|
// ================ Primary Color ================
|
|
26
26
|
if (theme.primaryColor) {
|
|
27
27
|
fillColor(theme.primaryColor, 'primary');
|
|
28
|
-
var primaryColor = new
|
|
28
|
+
var primaryColor = new FastColor(theme.primaryColor);
|
|
29
29
|
var primaryColors = generate(primaryColor.toRgbString());
|
|
30
30
|
// Legacy - We should use semantic naming standard
|
|
31
31
|
primaryColors.forEach(function (color, index) {
|
|
@@ -45,11 +45,11 @@ export function getStyle(globalPrefixCls, theme) {
|
|
|
45
45
|
return c.tint(50);
|
|
46
46
|
});
|
|
47
47
|
variables['primary-color-deprecated-f-12'] = formatColor(primaryColor, function (c) {
|
|
48
|
-
return c.
|
|
48
|
+
return c.setA(c.a * 0.12);
|
|
49
49
|
});
|
|
50
|
-
var primaryActiveColor = new
|
|
50
|
+
var primaryActiveColor = new FastColor(primaryColors[0]);
|
|
51
51
|
variables['primary-color-active-deprecated-f-30'] = formatColor(primaryActiveColor, function (c) {
|
|
52
|
-
return c.
|
|
52
|
+
return c.setA(c.a * 0.3);
|
|
53
53
|
});
|
|
54
54
|
variables['primary-color-active-deprecated-d-02'] = formatColor(primaryActiveColor, function (c) {
|
|
55
55
|
return c.darken(2);
|
|
@@ -9,7 +9,7 @@ var useSize = function useSize(customSize) {
|
|
|
9
9
|
if (typeof customSize === 'string') {
|
|
10
10
|
return customSize !== null && customSize !== void 0 ? customSize : size;
|
|
11
11
|
}
|
|
12
|
-
if (customSize
|
|
12
|
+
if (typeof customSize === 'function') {
|
|
13
13
|
return customSize(size);
|
|
14
14
|
}
|
|
15
15
|
return size;
|
|
@@ -15,7 +15,7 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
|
|
|
15
15
|
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); }
|
|
16
16
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
17
17
|
import * as React from 'react';
|
|
18
|
-
import { createTheme } from '@ant-design/cssinjs';
|
|
18
|
+
import { createTheme, StyleContext as CssInJsStyleContext } from '@ant-design/cssinjs';
|
|
19
19
|
import IconContext from '@ant-design/icons/lib/components/Context';
|
|
20
20
|
import useMemo from 'rc-util/lib/hooks/useMemo';
|
|
21
21
|
import { merge } from 'rc-util/lib/utils/set';
|
|
@@ -183,6 +183,9 @@ var ProviderChildren = function ProviderChildren(props) {
|
|
|
183
183
|
dropdown = props.dropdown,
|
|
184
184
|
warningConfig = props.warning,
|
|
185
185
|
tour = props.tour,
|
|
186
|
+
tooltip = props.tooltip,
|
|
187
|
+
popover = props.popover,
|
|
188
|
+
popconfirm = props.popconfirm,
|
|
186
189
|
floatButtonGroup = props.floatButtonGroup,
|
|
187
190
|
variant = props.variant,
|
|
188
191
|
inputNumber = props.inputNumber,
|
|
@@ -272,6 +275,9 @@ var ProviderChildren = function ProviderChildren(props) {
|
|
|
272
275
|
dropdown: dropdown,
|
|
273
276
|
warning: warningConfig,
|
|
274
277
|
tour: tour,
|
|
278
|
+
tooltip: tooltip,
|
|
279
|
+
popover: popover,
|
|
280
|
+
popconfirm: popconfirm,
|
|
275
281
|
floatButtonGroup: floatButtonGroup,
|
|
276
282
|
variant: variant,
|
|
277
283
|
inputNumber: inputNumber,
|
|
@@ -311,12 +317,15 @@ var ProviderChildren = function ProviderChildren(props) {
|
|
|
311
317
|
return prevConfig[key] !== currentConfig[key];
|
|
312
318
|
});
|
|
313
319
|
});
|
|
320
|
+
var _React$useContext = React.useContext(CssInJsStyleContext),
|
|
321
|
+
layer = _React$useContext.layer;
|
|
314
322
|
var memoIconContextValue = React.useMemo(function () {
|
|
315
323
|
return {
|
|
316
324
|
prefixCls: iconPrefixCls,
|
|
317
|
-
csp: csp
|
|
325
|
+
csp: csp,
|
|
326
|
+
layer: layer ? 'antd' : undefined
|
|
318
327
|
};
|
|
319
|
-
}, [iconPrefixCls, csp]);
|
|
328
|
+
}, [iconPrefixCls, csp, layer]);
|
|
320
329
|
var childNode = _jsxs(_Fragment, {
|
|
321
330
|
children: [_jsx(PropWarning, {
|
|
322
331
|
dropdownMatchSelectWidth: dropdownMatchSelectWidth
|