@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
|
@@ -47,7 +47,7 @@ var genSkeletonElementAvatar = function genSkeletonElementAvatar(token) {
|
|
|
47
47
|
controlHeight = token.controlHeight,
|
|
48
48
|
controlHeightLG = token.controlHeightLG,
|
|
49
49
|
controlHeightSM = token.controlHeightSM;
|
|
50
|
-
return _defineProperty(_defineProperty(_defineProperty(_defineProperty({},
|
|
50
|
+
return _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, skeletonAvatarCls, _objectSpread({
|
|
51
51
|
display: 'inline-block',
|
|
52
52
|
verticalAlign: 'top',
|
|
53
53
|
background: gradientFromColor
|
|
@@ -63,7 +63,7 @@ var genSkeletonElementInput = function genSkeletonElementInput(token) {
|
|
|
63
63
|
controlHeightSM = token.controlHeightSM,
|
|
64
64
|
gradientFromColor = token.gradientFromColor,
|
|
65
65
|
calc = token.calc;
|
|
66
|
-
return _defineProperty(_defineProperty(_defineProperty({},
|
|
66
|
+
return _defineProperty(_defineProperty(_defineProperty({}, skeletonInputCls, _objectSpread({
|
|
67
67
|
display: 'inline-block',
|
|
68
68
|
verticalAlign: 'top',
|
|
69
69
|
background: gradientFromColor,
|
|
@@ -81,11 +81,11 @@ var genSkeletonElementImage = function genSkeletonElementImage(token) {
|
|
|
81
81
|
gradientFromColor = token.gradientFromColor,
|
|
82
82
|
borderRadiusSM = token.borderRadiusSM,
|
|
83
83
|
calc = token.calc;
|
|
84
|
-
return _defineProperty(_defineProperty({},
|
|
85
|
-
display: 'flex',
|
|
84
|
+
return _defineProperty(_defineProperty({}, skeletonImageCls, _objectSpread(_objectSpread({
|
|
85
|
+
display: 'inline-flex',
|
|
86
86
|
alignItems: 'center',
|
|
87
87
|
justifyContent: 'center',
|
|
88
|
-
verticalAlign: '
|
|
88
|
+
verticalAlign: 'middle',
|
|
89
89
|
background: gradientFromColor,
|
|
90
90
|
borderRadius: borderRadiusSM
|
|
91
91
|
}, genSkeletonElementImageSize(calc(imageSizeBase).mul(2).equal())), {}, _defineProperty(_defineProperty(_defineProperty({}, "".concat(skeletonImageCls, "-path"), {
|
|
@@ -123,7 +123,7 @@ var genSkeletonElementButton = function genSkeletonElementButton(token) {
|
|
|
123
123
|
controlHeightSM = token.controlHeightSM,
|
|
124
124
|
gradientFromColor = token.gradientFromColor,
|
|
125
125
|
calc = token.calc;
|
|
126
|
-
return _objectSpread(_objectSpread(_objectSpread(_defineProperty({},
|
|
126
|
+
return _objectSpread(_objectSpread(_objectSpread(_defineProperty({}, skeletonButtonCls, _objectSpread({
|
|
127
127
|
display: 'inline-block',
|
|
128
128
|
verticalAlign: 'top',
|
|
129
129
|
background: gradientFromColor,
|
|
@@ -153,14 +153,14 @@ var genBaseStyle = function genBaseStyle(token) {
|
|
|
153
153
|
paragraphLiHeight = token.paragraphLiHeight,
|
|
154
154
|
controlHeightXS = token.controlHeightXS,
|
|
155
155
|
paragraphMarginTop = token.paragraphMarginTop;
|
|
156
|
-
return _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({},
|
|
156
|
+
return _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, componentCls, _defineProperty(_defineProperty(_defineProperty({
|
|
157
157
|
display: 'table',
|
|
158
158
|
width: '100%'
|
|
159
159
|
}, "".concat(componentCls, "-header"), _defineProperty(_defineProperty(_defineProperty(_defineProperty({
|
|
160
160
|
display: 'table-cell',
|
|
161
161
|
paddingInlineEnd: padding,
|
|
162
162
|
verticalAlign: 'top'
|
|
163
|
-
},
|
|
163
|
+
}, skeletonAvatarCls, _objectSpread({
|
|
164
164
|
display: 'inline-block',
|
|
165
165
|
verticalAlign: 'top',
|
|
166
166
|
background: gradientFromColor
|
|
@@ -170,14 +170,14 @@ var genBaseStyle = function genBaseStyle(token) {
|
|
|
170
170
|
display: 'table-cell',
|
|
171
171
|
width: '100%',
|
|
172
172
|
verticalAlign: 'top'
|
|
173
|
-
},
|
|
173
|
+
}, skeletonTitleCls, _defineProperty({
|
|
174
174
|
width: '100%',
|
|
175
175
|
height: titleHeight,
|
|
176
176
|
background: gradientFromColor,
|
|
177
177
|
borderRadius: blockRadius
|
|
178
178
|
}, "+ ".concat(skeletonParagraphCls), {
|
|
179
179
|
marginBlockStart: controlHeightSM
|
|
180
|
-
})),
|
|
180
|
+
})), skeletonParagraphCls, {
|
|
181
181
|
padding: 0,
|
|
182
182
|
'> li': {
|
|
183
183
|
width: '100%',
|
|
@@ -193,7 +193,7 @@ var genBaseStyle = function genBaseStyle(token) {
|
|
|
193
193
|
width: '61%'
|
|
194
194
|
})), "&-round ".concat(componentCls, "-content"), _defineProperty({}, "".concat(skeletonTitleCls, ", ").concat(skeletonParagraphCls, " > li"), {
|
|
195
195
|
borderRadius: borderRadius
|
|
196
|
-
}))), "".concat(componentCls, "-with-avatar ").concat(componentCls, "-content"), _defineProperty({},
|
|
196
|
+
}))), "".concat(componentCls, "-with-avatar ").concat(componentCls, "-content"), _defineProperty({}, skeletonTitleCls, _defineProperty({
|
|
197
197
|
marginBlockStart: marginSM
|
|
198
198
|
}, "+ ".concat(skeletonParagraphCls), {
|
|
199
199
|
marginBlockStart: paragraphMarginTop
|
|
@@ -202,9 +202,9 @@ var genBaseStyle = function genBaseStyle(token) {
|
|
|
202
202
|
width: 'auto'
|
|
203
203
|
}, genSkeletonElementButton(token)), genSkeletonElementAvatar(token)), genSkeletonElementInput(token)), genSkeletonElementImage(token))), "".concat(componentCls).concat(componentCls, "-block"), _defineProperty(_defineProperty({
|
|
204
204
|
width: '100%'
|
|
205
|
-
},
|
|
205
|
+
}, skeletonButtonCls, {
|
|
206
206
|
width: '100%'
|
|
207
|
-
}),
|
|
207
|
+
}), skeletonInputCls, {
|
|
208
208
|
width: '100%'
|
|
209
209
|
})), "".concat(componentCls).concat(componentCls, "-active"), _defineProperty({}, "\n ".concat(skeletonTitleCls, ",\n ").concat(skeletonParagraphCls, " > li,\n ").concat(skeletonAvatarCls, ",\n ").concat(skeletonButtonCls, ",\n ").concat(skeletonInputCls, ",\n ").concat(skeletonImageCls, "\n "), _objectSpread({}, genSkeletonColor(token))));
|
|
210
210
|
};
|
|
@@ -11,8 +11,10 @@ import raf from 'rc-util/lib/raf';
|
|
|
11
11
|
import { composeRef } from 'rc-util/lib/ref';
|
|
12
12
|
import Tooltip from '../tooltip';
|
|
13
13
|
var SliderTooltip = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
14
|
-
var open = props.open
|
|
14
|
+
var open = props.open,
|
|
15
|
+
draggingDelete = props.draggingDelete;
|
|
15
16
|
var innerRef = useRef(null);
|
|
17
|
+
var mergedOpen = open && !draggingDelete;
|
|
16
18
|
var rafRef = useRef(null);
|
|
17
19
|
function cancelKeepAlign() {
|
|
18
20
|
raf.cancel(rafRef.current);
|
|
@@ -26,16 +28,18 @@ var SliderTooltip = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
26
28
|
});
|
|
27
29
|
}
|
|
28
30
|
React.useEffect(function () {
|
|
29
|
-
if (
|
|
31
|
+
if (mergedOpen) {
|
|
30
32
|
keepAlign();
|
|
31
33
|
} else {
|
|
32
34
|
cancelKeepAlign();
|
|
33
35
|
}
|
|
34
36
|
return cancelKeepAlign;
|
|
35
|
-
}, [
|
|
36
|
-
return _jsx(Tooltip, _objectSpread({
|
|
37
|
+
}, [mergedOpen, props.title]);
|
|
38
|
+
return _jsx(Tooltip, _objectSpread(_objectSpread({
|
|
37
39
|
ref: composeRef(innerRef, ref)
|
|
38
|
-
}, props)
|
|
40
|
+
}, props), {}, {
|
|
41
|
+
open: mergedOpen
|
|
42
|
+
}));
|
|
39
43
|
});
|
|
40
44
|
if (process.env.NODE_ENV !== 'production') {
|
|
41
45
|
SliderTooltip.displayName = 'SliderTooltip';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
var _excluded = ["prefixCls", "range", "className", "rootClassName", "style", "disabled", "tooltipPrefixCls", "tipFormatter", "tooltipVisible", "getTooltipPopupContainer", "tooltipPlacement", "tooltip", "onChangeComplete"];
|
|
2
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 = ["prefixCls", "range", "className", "rootClassName", "style", "disabled", "tooltipPrefixCls", "tipFormatter", "tooltipVisible", "getTooltipPopupContainer", "tooltipPlacement", "tooltip", "onChangeComplete"];
|
|
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; }
|
|
@@ -24,6 +24,7 @@ import { ConfigContext } from '../config-provider';
|
|
|
24
24
|
import DisabledContext from '../config-provider/DisabledContext';
|
|
25
25
|
import SliderTooltip from './SliderTooltip';
|
|
26
26
|
import useStyle from './style';
|
|
27
|
+
import SliderInternalContext from './Context';
|
|
27
28
|
import useRafLock from './useRafLock';
|
|
28
29
|
function getTipFormatter(tipFormatter, legacyTipFormatter) {
|
|
29
30
|
if (tipFormatter || tipFormatter === null) {
|
|
@@ -54,12 +55,18 @@ var Slider = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
54
55
|
restProps = _objectWithoutProperties(props, _excluded);
|
|
55
56
|
var vertical = props.vertical;
|
|
56
57
|
var _React$useContext = React.useContext(ConfigContext),
|
|
57
|
-
|
|
58
|
+
contextDirection = _React$useContext.direction,
|
|
58
59
|
slider = _React$useContext.slider,
|
|
59
60
|
getPrefixCls = _React$useContext.getPrefixCls,
|
|
60
61
|
getPopupContainer = _React$useContext.getPopupContainer;
|
|
61
62
|
var contextDisabled = React.useContext(DisabledContext);
|
|
62
63
|
var mergedDisabled = disabled !== null && disabled !== void 0 ? disabled : contextDisabled;
|
|
64
|
+
// ============================= Context ==============================
|
|
65
|
+
var _React$useContext2 = React.useContext(SliderInternalContext),
|
|
66
|
+
contextHandleRender = _React$useContext2.handleRender,
|
|
67
|
+
internalContextDirection = _React$useContext2.direction;
|
|
68
|
+
var mergedDirection = internalContextDirection || contextDirection;
|
|
69
|
+
var isRTL = mergedDirection === 'rtl';
|
|
63
70
|
// =============================== Open ===============================
|
|
64
71
|
var _useRafLock = useRafLock(),
|
|
65
72
|
_useRafLock2 = _slicedToArray(_useRafLock, 2),
|
|
@@ -95,7 +102,7 @@ var Slider = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
95
102
|
if (!vert) {
|
|
96
103
|
return 'top';
|
|
97
104
|
}
|
|
98
|
-
return
|
|
105
|
+
return isRTL ? 'left' : 'right';
|
|
99
106
|
};
|
|
100
107
|
// ============================== Style ===============================
|
|
101
108
|
var prefixCls = getPrefixCls('slider', customizePrefixCls);
|
|
@@ -104,22 +111,11 @@ var Slider = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
104
111
|
wrapCSSVar = _useStyle2[0],
|
|
105
112
|
hashId = _useStyle2[1],
|
|
106
113
|
cssVarCls = _useStyle2[2];
|
|
107
|
-
var cls = classNames(className, slider === null || slider === void 0 ? void 0 : slider.className, rootClassName, _defineProperty(_defineProperty({}, "".concat(prefixCls, "-rtl"),
|
|
114
|
+
var cls = classNames(className, slider === null || slider === void 0 ? void 0 : slider.className, rootClassName, _defineProperty(_defineProperty({}, "".concat(prefixCls, "-rtl"), isRTL), "".concat(prefixCls, "-lock"), dragging), hashId, cssVarCls);
|
|
108
115
|
// make reverse default on rtl direction
|
|
109
|
-
if (
|
|
116
|
+
if (isRTL && !restProps.vertical) {
|
|
110
117
|
restProps.reverse = !restProps.reverse;
|
|
111
118
|
}
|
|
112
|
-
// ============================= Multiple =============================
|
|
113
|
-
// Range config
|
|
114
|
-
var _React$useMemo = React.useMemo(function () {
|
|
115
|
-
if (!range) {
|
|
116
|
-
return [false];
|
|
117
|
-
}
|
|
118
|
-
return _typeof(range) === 'object' ? [true, range.draggableTrack] : [true, false];
|
|
119
|
-
}, [range]),
|
|
120
|
-
_React$useMemo2 = _slicedToArray(_React$useMemo, 2),
|
|
121
|
-
mergedRange = _React$useMemo2[0],
|
|
122
|
-
draggableTrack = _React$useMemo2[1];
|
|
123
119
|
// ============================= Warning ==============================
|
|
124
120
|
// Warning for deprecated usage
|
|
125
121
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -145,38 +141,43 @@ var Slider = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
145
141
|
document.removeEventListener('mouseup', onMouseUp);
|
|
146
142
|
};
|
|
147
143
|
}, []);
|
|
148
|
-
var useActiveTooltipHandle =
|
|
149
|
-
var handleRender = function
|
|
144
|
+
var useActiveTooltipHandle = range && !lockOpen;
|
|
145
|
+
var handleRender = contextHandleRender || function (node, info) {
|
|
150
146
|
var index = info.index;
|
|
151
147
|
var nodeProps = node.props;
|
|
148
|
+
function proxyEvent(eventName, event, triggerRestPropsEvent) {
|
|
149
|
+
var _nodeProps$eventName;
|
|
150
|
+
if (triggerRestPropsEvent) {
|
|
151
|
+
var _restProps$eventName;
|
|
152
|
+
(_restProps$eventName = restProps[eventName]) === null || _restProps$eventName === void 0 || _restProps$eventName.call(restProps, event);
|
|
153
|
+
}
|
|
154
|
+
(_nodeProps$eventName = nodeProps[eventName]) === null || _nodeProps$eventName === void 0 || _nodeProps$eventName.call(nodeProps, event);
|
|
155
|
+
}
|
|
152
156
|
var passedProps = _objectSpread(_objectSpread({}, nodeProps), {}, {
|
|
153
157
|
onMouseEnter: function onMouseEnter(e) {
|
|
154
|
-
var _nodeProps$onMouseEnt;
|
|
155
158
|
setHoverOpen(true);
|
|
156
|
-
(
|
|
159
|
+
proxyEvent('onMouseEnter', e);
|
|
157
160
|
},
|
|
158
161
|
onMouseLeave: function onMouseLeave(e) {
|
|
159
|
-
var _nodeProps$onMouseLea;
|
|
160
162
|
setHoverOpen(false);
|
|
161
|
-
(
|
|
163
|
+
proxyEvent('onMouseLeave', e);
|
|
162
164
|
},
|
|
163
165
|
onMouseDown: function onMouseDown(e) {
|
|
164
|
-
var _nodeProps$onMouseDow;
|
|
165
166
|
setFocusOpen(true);
|
|
166
167
|
setDragging(true);
|
|
167
|
-
(
|
|
168
|
+
proxyEvent('onMouseDown', e);
|
|
168
169
|
},
|
|
169
170
|
onFocus: function onFocus(e) {
|
|
170
|
-
var _restProps$onFocus
|
|
171
|
+
var _restProps$onFocus;
|
|
171
172
|
setFocusOpen(true);
|
|
172
173
|
(_restProps$onFocus = restProps.onFocus) === null || _restProps$onFocus === void 0 || _restProps$onFocus.call(restProps, e);
|
|
173
|
-
(
|
|
174
|
+
proxyEvent('onFocus', e, true);
|
|
174
175
|
},
|
|
175
176
|
onBlur: function onBlur(e) {
|
|
176
|
-
var _restProps$onBlur
|
|
177
|
+
var _restProps$onBlur;
|
|
177
178
|
setFocusOpen(false);
|
|
178
179
|
(_restProps$onBlur = restProps.onBlur) === null || _restProps$onBlur === void 0 || _restProps$onBlur.call(restProps, e);
|
|
179
|
-
(
|
|
180
|
+
proxyEvent('onBlur', e, true);
|
|
180
181
|
}
|
|
181
182
|
});
|
|
182
183
|
var cloneNode = /*#__PURE__*/React.cloneElement(node, passedProps);
|
|
@@ -209,7 +210,8 @@ var Slider = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
209
210
|
placement: getTooltipPlacement(tooltipPlacement !== null && tooltipPlacement !== void 0 ? tooltipPlacement : legacyTooltipPlacement, vertical),
|
|
210
211
|
key: "tooltip",
|
|
211
212
|
overlayClassName: "".concat(prefixCls, "-tooltip"),
|
|
212
|
-
getPopupContainer: getTooltipPopupContainer || legacyGetTooltipPopupContainer || getPopupContainer
|
|
213
|
+
getPopupContainer: getTooltipPopupContainer || legacyGetTooltipPopupContainer || getPopupContainer,
|
|
214
|
+
draggingDelete: info.draggingDelete
|
|
213
215
|
}), cloneNode);
|
|
214
216
|
} : undefined;
|
|
215
217
|
// ============================== Render ==============================
|
|
@@ -218,8 +220,7 @@ var Slider = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
218
220
|
// @ts-ignore
|
|
219
221
|
_jsx(RcSlider, _objectSpread(_objectSpread({}, restProps), {}, {
|
|
220
222
|
step: restProps.step,
|
|
221
|
-
range:
|
|
222
|
-
draggableTrack: draggableTrack,
|
|
223
|
+
range: range,
|
|
223
224
|
className: cls,
|
|
224
225
|
style: mergedStyle,
|
|
225
226
|
disabled: mergedDisabled,
|
|
@@ -19,24 +19,32 @@ var genBaseStyle = function genBaseStyle(token) {
|
|
|
19
19
|
marginPart = token.marginPart,
|
|
20
20
|
colorFillContentHover = token.colorFillContentHover,
|
|
21
21
|
handleColorDisabled = token.handleColorDisabled,
|
|
22
|
-
calc = token.calc
|
|
22
|
+
calc = token.calc,
|
|
23
|
+
handleSize = token.handleSize,
|
|
24
|
+
handleSizeHover = token.handleSizeHover,
|
|
25
|
+
handleActiveColor = token.handleActiveColor,
|
|
26
|
+
handleActiveOutlineColor = token.handleActiveOutlineColor,
|
|
27
|
+
handleLineWidth = token.handleLineWidth,
|
|
28
|
+
handleLineWidthHover = token.handleLineWidthHover,
|
|
29
|
+
motionDurationMid = token.motionDurationMid;
|
|
23
30
|
return _defineProperty({}, componentCls, _objectSpread(_objectSpread({}, resetComponent(token)), {}, (_objectSpread2 = {
|
|
24
31
|
position: 'relative',
|
|
25
32
|
height: controlSize,
|
|
26
33
|
margin: "".concat(unit(marginPart), " ").concat(unit(marginFull)),
|
|
27
34
|
padding: 0,
|
|
28
35
|
cursor: 'pointer',
|
|
29
|
-
touchAction: 'none'
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
36
|
+
touchAction: 'none',
|
|
37
|
+
'&-vertical': {
|
|
38
|
+
margin: "".concat(unit(marginFull), " ").concat(unit(marginPart))
|
|
39
|
+
}
|
|
40
|
+
}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_objectSpread2, "".concat(componentCls, "-rail"), {
|
|
33
41
|
position: 'absolute',
|
|
34
42
|
backgroundColor: token.railBg,
|
|
35
43
|
borderRadius: token.borderRadiusXS,
|
|
36
|
-
transition: "background-color ".concat(
|
|
44
|
+
transition: "background-color ".concat(motionDurationMid)
|
|
37
45
|
}), "".concat(componentCls, "-track,").concat(componentCls, "-tracks"), {
|
|
38
46
|
position: 'absolute',
|
|
39
|
-
transition: "background-color ".concat(
|
|
47
|
+
transition: "background-color ".concat(motionDurationMid)
|
|
40
48
|
}), "".concat(componentCls, "-track"), {
|
|
41
49
|
backgroundColor: token.trackBg,
|
|
42
50
|
borderRadius: token.borderRadiusXS
|
|
@@ -51,22 +59,27 @@ var genBaseStyle = function genBaseStyle(token) {
|
|
|
51
59
|
}), "".concat(componentCls, "-dot"), {
|
|
52
60
|
borderColor: colorFillContentHover
|
|
53
61
|
}), "".concat(componentCls, "-handle::after"), {
|
|
54
|
-
boxShadow: "0 0 0 ".concat(unit(
|
|
62
|
+
boxShadow: "0 0 0 ".concat(unit(handleLineWidth), " ").concat(token.colorPrimaryBorderHover)
|
|
55
63
|
}), "".concat(componentCls, "-dot-active"), {
|
|
56
64
|
borderColor: token.dotActiveBorderColor
|
|
57
65
|
})), "".concat(componentCls, "-handle"), {
|
|
58
66
|
position: 'absolute',
|
|
59
|
-
width:
|
|
60
|
-
height:
|
|
67
|
+
width: handleSize,
|
|
68
|
+
height: handleSize,
|
|
61
69
|
outline: 'none',
|
|
70
|
+
userSelect: 'none',
|
|
71
|
+
// Dragging status
|
|
72
|
+
'&-dragging-delete': {
|
|
73
|
+
opacity: 0
|
|
74
|
+
},
|
|
62
75
|
// 扩大选区
|
|
63
76
|
'&::before': {
|
|
64
77
|
content: '""',
|
|
65
78
|
position: 'absolute',
|
|
66
|
-
insetInlineStart: calc(
|
|
67
|
-
insetBlockStart: calc(
|
|
68
|
-
width: calc(
|
|
69
|
-
height: calc(
|
|
79
|
+
insetInlineStart: calc(handleLineWidth).mul(-1).equal(),
|
|
80
|
+
insetBlockStart: calc(handleLineWidth).mul(-1).equal(),
|
|
81
|
+
width: calc(handleSize).add(calc(handleLineWidth).mul(2)).equal(),
|
|
82
|
+
height: calc(handleSize).add(calc(handleLineWidth).mul(2)).equal(),
|
|
70
83
|
backgroundColor: 'transparent'
|
|
71
84
|
},
|
|
72
85
|
'&::after': {
|
|
@@ -74,36 +87,36 @@ var genBaseStyle = function genBaseStyle(token) {
|
|
|
74
87
|
position: 'absolute',
|
|
75
88
|
insetBlockStart: 0,
|
|
76
89
|
insetInlineStart: 0,
|
|
77
|
-
width:
|
|
78
|
-
height:
|
|
90
|
+
width: handleSize,
|
|
91
|
+
height: handleSize,
|
|
79
92
|
backgroundColor: token.colorBgElevated,
|
|
80
|
-
boxShadow: "0 0 0 ".concat(unit(
|
|
93
|
+
boxShadow: "0 0 0 ".concat(unit(handleLineWidth), " ").concat(token.handleColor),
|
|
94
|
+
outline: "0px solid transparent",
|
|
81
95
|
borderRadius: '50%',
|
|
82
96
|
cursor: 'pointer',
|
|
83
|
-
transition: "\n inset-inline-start ".concat(
|
|
97
|
+
transition: "\n inset-inline-start ".concat(motionDurationMid, ",\n inset-block-start ").concat(motionDurationMid, ",\n width ").concat(motionDurationMid, ",\n height ").concat(motionDurationMid, ",\n box-shadow ").concat(motionDurationMid, ",\n outline ").concat(motionDurationMid, "\n ")
|
|
84
98
|
},
|
|
85
99
|
'&:hover, &:active, &:focus': {
|
|
86
100
|
'&::before': {
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
insetInlineStart: calc(token.handleSizeHover).sub(token.handleSize).div(2).add(token.handleLineWidthHover).mul(-1).equal(),
|
|
92
|
-
insetBlockStart: calc(token.handleSizeHover).sub(token.handleSize).div(2).add(token.handleLineWidthHover).mul(-1).equal(),
|
|
93
|
-
width: calc(token.handleSizeHover).add(calc(token.handleLineWidthHover).mul(2)).equal(),
|
|
94
|
-
height: calc(token.handleSizeHover).add(calc(token.handleLineWidthHover).mul(2)).equal()
|
|
101
|
+
insetInlineStart: calc(handleSizeHover).sub(handleSize).div(2).add(handleLineWidthHover).mul(-1).equal(),
|
|
102
|
+
insetBlockStart: calc(handleSizeHover).sub(handleSize).div(2).add(handleLineWidthHover).mul(-1).equal(),
|
|
103
|
+
width: calc(handleSizeHover).add(calc(handleLineWidthHover).mul(2)).equal(),
|
|
104
|
+
height: calc(handleSizeHover).add(calc(handleLineWidthHover).mul(2)).equal()
|
|
95
105
|
},
|
|
96
106
|
'&::after': {
|
|
97
|
-
boxShadow: "0 0 0 ".concat(unit(
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
107
|
+
boxShadow: "0 0 0 ".concat(unit(handleLineWidthHover), " ").concat(handleActiveColor),
|
|
108
|
+
outline: "6px solid ".concat(handleActiveOutlineColor),
|
|
109
|
+
width: handleSizeHover,
|
|
110
|
+
height: handleSizeHover,
|
|
111
|
+
insetInlineStart: token.calc(handleSize).sub(handleSizeHover).div(2).equal(),
|
|
112
|
+
insetBlockStart: token.calc(handleSize).sub(handleSizeHover).div(2).equal()
|
|
102
113
|
}
|
|
103
114
|
}
|
|
104
|
-
}), "&-lock ".concat(componentCls, "-handle"),
|
|
105
|
-
|
|
106
|
-
|
|
115
|
+
}), "&-lock ".concat(componentCls, "-handle"), {
|
|
116
|
+
'&::before, &::after': {
|
|
117
|
+
transition: 'none'
|
|
118
|
+
}
|
|
119
|
+
}), "".concat(componentCls, "-mark"), {
|
|
107
120
|
position: 'absolute',
|
|
108
121
|
fontSize: token.fontSize
|
|
109
122
|
}), "".concat(componentCls, "-mark-text"), {
|
|
@@ -117,16 +130,16 @@ var genBaseStyle = function genBaseStyle(token) {
|
|
|
117
130
|
'&-active': {
|
|
118
131
|
color: token.colorText
|
|
119
132
|
}
|
|
120
|
-
}),
|
|
133
|
+
}), "".concat(componentCls, "-step"), {
|
|
121
134
|
position: 'absolute',
|
|
122
135
|
background: 'transparent',
|
|
123
136
|
pointerEvents: 'none'
|
|
124
|
-
}), "".concat(componentCls, "-dot"), {
|
|
137
|
+
}), _defineProperty(_defineProperty(_defineProperty(_objectSpread2, "".concat(componentCls, "-dot"), {
|
|
125
138
|
position: 'absolute',
|
|
126
139
|
width: dotSize,
|
|
127
140
|
height: dotSize,
|
|
128
141
|
backgroundColor: token.colorBgElevated,
|
|
129
|
-
border: "".concat(unit(
|
|
142
|
+
border: "".concat(unit(handleLineWidth), " solid ").concat(token.dotBorderColor),
|
|
130
143
|
borderRadius: '50%',
|
|
131
144
|
cursor: 'pointer',
|
|
132
145
|
transition: "border-color ".concat(token.motionDurationSlow),
|
|
@@ -148,9 +161,9 @@ var genBaseStyle = function genBaseStyle(token) {
|
|
|
148
161
|
}), "".concat(componentCls, "-handle::after"), {
|
|
149
162
|
backgroundColor: token.colorBgElevated,
|
|
150
163
|
cursor: 'not-allowed',
|
|
151
|
-
width:
|
|
152
|
-
height:
|
|
153
|
-
boxShadow: "0 0 0 ".concat(unit(
|
|
164
|
+
width: handleSize,
|
|
165
|
+
height: handleSize,
|
|
166
|
+
boxShadow: "0 0 0 ".concat(unit(handleLineWidth), " ").concat(handleColorDisabled),
|
|
154
167
|
insetInlineStart: 0,
|
|
155
168
|
insetBlockStart: 0
|
|
156
169
|
}), "\n ".concat(componentCls, "-mark-text,\n ").concat(componentCls, "-dot\n "), {
|
|
@@ -215,7 +228,9 @@ export var prepareComponentToken = function prepareComponentToken(token) {
|
|
|
215
228
|
var controlSize = token.controlHeightLG / 4;
|
|
216
229
|
var controlSizeHover = token.controlHeightSM / 2;
|
|
217
230
|
var handleLineWidth = token.lineWidth + increaseHandleWidth;
|
|
218
|
-
var handleLineWidthHover = token.lineWidth + increaseHandleWidth *
|
|
231
|
+
var handleLineWidthHover = token.lineWidth + increaseHandleWidth * 1.5;
|
|
232
|
+
var handleActiveColor = token.colorPrimary;
|
|
233
|
+
var handleActiveOutlineColor = new TinyColor(handleActiveColor).setAlpha(0.2).toRgbString();
|
|
219
234
|
return {
|
|
220
235
|
controlSize: controlSize,
|
|
221
236
|
railSize: 4,
|
|
@@ -226,10 +241,11 @@ export var prepareComponentToken = function prepareComponentToken(token) {
|
|
|
226
241
|
handleLineWidthHover: handleLineWidthHover,
|
|
227
242
|
railBg: token.colorFillTertiary,
|
|
228
243
|
railHoverBg: token.colorFillSecondary,
|
|
229
|
-
trackBg: token.
|
|
230
|
-
trackHoverBg: token.
|
|
244
|
+
trackBg: token.colorPrimaryBorder,
|
|
245
|
+
trackHoverBg: token.colorPrimaryBorderHover,
|
|
231
246
|
handleColor: token.colorPrimaryBorder,
|
|
232
|
-
handleActiveColor:
|
|
247
|
+
handleActiveColor: handleActiveColor,
|
|
248
|
+
handleActiveOutlineColor: handleActiveOutlineColor,
|
|
233
249
|
handleColorDisabled: new TinyColor(token.colorTextDisabled).onBackground(token.colorBgContainer).toHexShortString(),
|
|
234
250
|
dotBorderColor: token.colorBorderSecondary,
|
|
235
251
|
dotActiveBorderColor: token.colorPrimaryBorder,
|
|
@@ -80,7 +80,7 @@ var Compact = function Compact(props) {
|
|
|
80
80
|
var childNodes = toArray(children);
|
|
81
81
|
var nodes = React.useMemo(function () {
|
|
82
82
|
return childNodes.map(function (child, i) {
|
|
83
|
-
var key = child
|
|
83
|
+
var key = (child === null || child === void 0 ? void 0 : child.key) || "".concat(prefixCls, "-item-").concat(i);
|
|
84
84
|
return _jsx(CompactItem, {
|
|
85
85
|
compactSize: mergedSize,
|
|
86
86
|
compactDirection: direction,
|
package/lib/Antd5/space/index.js
CHANGED
|
@@ -25,13 +25,13 @@ import Item from './Item';
|
|
|
25
25
|
import useStyle from './style';
|
|
26
26
|
export { SpaceContext } from './context';
|
|
27
27
|
var InternalSpace = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
28
|
-
var _customClassNames$ite, _space$classNames;
|
|
28
|
+
var _space$size, _customClassNames$ite, _space$classNames;
|
|
29
29
|
var _React$useContext = React.useContext(ConfigContext),
|
|
30
30
|
getPrefixCls = _React$useContext.getPrefixCls,
|
|
31
31
|
space = _React$useContext.space,
|
|
32
32
|
directionConfig = _React$useContext.direction;
|
|
33
33
|
var _props$size = props.size,
|
|
34
|
-
size = _props$size === void 0 ? (space === null || space === void 0 ? void 0 : space.size)
|
|
34
|
+
size = _props$size === void 0 ? (_space$size = space === null || space === void 0 ? void 0 : space.size) !== null && _space$size !== void 0 ? _space$size : 'small' : _props$size,
|
|
35
35
|
align = props.align,
|
|
36
36
|
className = props.className,
|
|
37
37
|
rootClassName = props.rootClassName,
|
|
@@ -73,7 +73,7 @@ var InternalSpace = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
73
73
|
if (child !== null && child !== undefined) {
|
|
74
74
|
latestIndex = i;
|
|
75
75
|
}
|
|
76
|
-
var key = child
|
|
76
|
+
var key = (child === null || child === void 0 ? void 0 : child.key) || "".concat(itemClassName, "-").concat(i);
|
|
77
77
|
return _jsx(Item, {
|
|
78
78
|
className: itemClassName,
|
|
79
79
|
index: i,
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import classNames from 'classnames';
|
|
4
|
+
import Progress from './Progress';
|
|
5
|
+
export default function Looper(props) {
|
|
6
|
+
var prefixCls = props.prefixCls,
|
|
7
|
+
_props$percent = props.percent,
|
|
8
|
+
percent = _props$percent === void 0 ? 0 : _props$percent;
|
|
9
|
+
var dotClassName = "".concat(prefixCls, "-dot");
|
|
10
|
+
var holderClassName = "".concat(dotClassName, "-holder");
|
|
11
|
+
var hideClassName = "".concat(holderClassName, "-hidden");
|
|
12
|
+
// ===================== Render =====================
|
|
13
|
+
return _jsxs(_Fragment, {
|
|
14
|
+
children: [_jsx("span", {
|
|
15
|
+
className: classNames(holderClassName, percent > 0 && hideClassName),
|
|
16
|
+
children: _jsx("span", {
|
|
17
|
+
className: classNames(dotClassName, "".concat(prefixCls, "-dot-spin")),
|
|
18
|
+
children: [1, 2, 3, 4].map(function (i) {
|
|
19
|
+
return _jsx("i", {
|
|
20
|
+
className: "".concat(prefixCls, "-dot-item")
|
|
21
|
+
}, i);
|
|
22
|
+
})
|
|
23
|
+
})
|
|
24
|
+
}), _jsx(Progress, {
|
|
25
|
+
prefixCls: prefixCls,
|
|
26
|
+
percent: percent
|
|
27
|
+
})]
|
|
28
|
+
});
|
|
29
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
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 _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
3
|
+
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."); }
|
|
4
|
+
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; } }
|
|
5
|
+
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; }
|
|
6
|
+
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; } }
|
|
7
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
8
|
+
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; }
|
|
9
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
10
|
+
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); }
|
|
11
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
12
|
+
import * as React from 'react';
|
|
13
|
+
import classNames from 'classnames';
|
|
14
|
+
import useLayoutEffect from 'rc-util/lib/hooks/useLayoutEffect';
|
|
15
|
+
var viewSize = 100;
|
|
16
|
+
var borderWidth = viewSize / 5;
|
|
17
|
+
var radius = viewSize / 2 - borderWidth / 2;
|
|
18
|
+
var circumference = radius * 2 * Math.PI;
|
|
19
|
+
var position = 50;
|
|
20
|
+
var CustomCircle = function CustomCircle(props) {
|
|
21
|
+
var dotClassName = props.dotClassName,
|
|
22
|
+
style = props.style,
|
|
23
|
+
hasCircleCls = props.hasCircleCls;
|
|
24
|
+
return _jsx("circle", {
|
|
25
|
+
className: classNames("".concat(dotClassName, "-circle"), _defineProperty({}, "".concat(dotClassName, "-circle-bg"), hasCircleCls)),
|
|
26
|
+
r: radius,
|
|
27
|
+
cx: position,
|
|
28
|
+
cy: position,
|
|
29
|
+
strokeWidth: borderWidth,
|
|
30
|
+
style: style
|
|
31
|
+
});
|
|
32
|
+
};
|
|
33
|
+
var Progress = function Progress(_ref) {
|
|
34
|
+
var percent = _ref.percent,
|
|
35
|
+
prefixCls = _ref.prefixCls;
|
|
36
|
+
var dotClassName = "".concat(prefixCls, "-dot");
|
|
37
|
+
var holderClassName = "".concat(dotClassName, "-holder");
|
|
38
|
+
var hideClassName = "".concat(holderClassName, "-hidden");
|
|
39
|
+
var _React$useState = React.useState(false),
|
|
40
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
41
|
+
render = _React$useState2[0],
|
|
42
|
+
setRender = _React$useState2[1];
|
|
43
|
+
// ==================== Visible =====================
|
|
44
|
+
useLayoutEffect(function () {
|
|
45
|
+
if (percent !== 0) {
|
|
46
|
+
setRender(true);
|
|
47
|
+
}
|
|
48
|
+
}, [percent !== 0]);
|
|
49
|
+
// ==================== Progress ====================
|
|
50
|
+
var safePtg = Math.max(Math.min(percent, 100), 0);
|
|
51
|
+
// ===================== Render =====================
|
|
52
|
+
if (!render) {
|
|
53
|
+
return null;
|
|
54
|
+
}
|
|
55
|
+
var circleStyle = {
|
|
56
|
+
strokeDashoffset: "".concat(circumference / 4),
|
|
57
|
+
strokeDasharray: "".concat(circumference * safePtg / 100, " ").concat(circumference * (100 - safePtg) / 100)
|
|
58
|
+
};
|
|
59
|
+
return _jsx("span", {
|
|
60
|
+
className: classNames(holderClassName, "".concat(dotClassName, "-progress"), safePtg <= 0 && hideClassName),
|
|
61
|
+
children: _jsxs("svg", {
|
|
62
|
+
viewBox: "0 0 ".concat(viewSize, " ").concat(viewSize),
|
|
63
|
+
// biome-ignore lint/a11y/noNoninteractiveElementToInteractiveRole: progressbar could be readonly
|
|
64
|
+
role: "progressbar",
|
|
65
|
+
"aria-valuemin": 0,
|
|
66
|
+
"aria-valuemax": 100,
|
|
67
|
+
"aria-valuenow": safePtg,
|
|
68
|
+
children: [_jsx(CustomCircle, {
|
|
69
|
+
dotClassName: dotClassName,
|
|
70
|
+
hasCircleCls: true
|
|
71
|
+
}), _jsx(CustomCircle, {
|
|
72
|
+
dotClassName: dotClassName,
|
|
73
|
+
style: circleStyle
|
|
74
|
+
})]
|
|
75
|
+
})
|
|
76
|
+
});
|
|
77
|
+
};
|
|
78
|
+
export default Progress;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import classNames from 'classnames';
|
|
4
|
+
import { cloneElement } from '../../_util/reactNode';
|
|
5
|
+
import Looper from './Looper';
|
|
6
|
+
export default function Indicator(props) {
|
|
7
|
+
var prefixCls = props.prefixCls,
|
|
8
|
+
indicator = props.indicator,
|
|
9
|
+
percent = props.percent;
|
|
10
|
+
var dotClassName = "".concat(prefixCls, "-dot");
|
|
11
|
+
if (indicator && /*#__PURE__*/React.isValidElement(indicator)) {
|
|
12
|
+
return cloneElement(indicator, {
|
|
13
|
+
className: classNames(indicator.props.className, dotClassName),
|
|
14
|
+
percent: percent
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
return _jsx(Looper, {
|
|
18
|
+
prefixCls: prefixCls,
|
|
19
|
+
percent: percent
|
|
20
|
+
});
|
|
21
|
+
}
|