@chaoswise/ui 3.0.22 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/Alert/index.js +48 -2
- package/lib/Alert/index.style.js +36 -0
- package/lib/Antd5/_util/ActionButton.js +4 -2
- package/lib/Antd5/_util/ContextIsolator.js +27 -0
- package/lib/Antd5/_util/easings.js +2 -2
- package/lib/Antd5/_util/getScroll.js +9 -8
- package/lib/Antd5/_util/hooks/useClosable.js +3 -2
- package/lib/Antd5/_util/hooks/useUniqueMemo.js +123 -0
- package/lib/Antd5/_util/hooks/useZIndex.js +31 -15
- package/lib/Antd5/_util/motion.js +3 -2
- package/lib/Antd5/_util/placements.js +2 -2
- package/lib/Antd5/_util/scrollTo.js +1 -1
- package/lib/Antd5/_util/statusUtils.js +1 -1
- package/lib/Antd5/_util/toList.js +5 -0
- package/lib/Antd5/_util/warning.js +0 -1
- package/lib/Antd5/_util/wave/WaveEffect.js +2 -2
- package/lib/Antd5/_util/wave/interface.js +2 -1
- package/lib/Antd5/_util/wave/useWave.js +1 -1
- package/lib/Antd5/_util/wave/util.js +1 -9
- package/lib/Antd5/alert/Alert.js +1 -2
- package/lib/Antd5/alert/ErrorBoundary.js +1 -1
- package/lib/Antd5/alert/design/behavior-pattern.js +3 -3
- package/lib/Antd5/alert/style/index.js +6 -4
- package/lib/Antd5/anchor/Anchor.js +8 -7
- package/lib/Antd5/anchor/AnchorLink.js +4 -4
- package/lib/Antd5/app/index.js +2 -1
- package/lib/Antd5/app/style/index.js +5 -4
- package/lib/Antd5/auto-complete/index.js +1 -1
- package/lib/Antd5/avatar/group.js +35 -17
- package/lib/Antd5/avatar/style/index.js +18 -13
- package/lib/Antd5/back-top/index.js +3 -2
- package/lib/Antd5/badge/ScrollNumber.js +1 -1
- package/lib/Antd5/badge/SingleNumber.js +17 -16
- package/lib/Antd5/badge/style/index.js +6 -7
- package/lib/Antd5/badge/style/ribbon.js +3 -3
- package/lib/Antd5/breadcrumb/design/behavior-pattern.js +4 -4
- package/lib/Antd5/breadcrumb/style/index.js +2 -2
- package/lib/Antd5/button/LoadingIcon.js +5 -10
- package/lib/Antd5/button/button-group.js +0 -1
- package/lib/Antd5/button/button.js +70 -41
- package/lib/Antd5/button/buttonHelpers.js +7 -5
- package/lib/Antd5/button/style/{compactCmp.js → compact.js} +20 -27
- package/lib/Antd5/button/style/group.js +9 -7
- package/lib/Antd5/button/style/index.js +150 -110
- package/lib/Antd5/button/style/token.js +8 -1
- package/lib/Antd5/calendar/generateCalendar.js +25 -28
- package/lib/Antd5/calendar/style/index.js +4 -4
- package/lib/Antd5/card/Card.js +3 -3
- package/lib/Antd5/card/style/index.js +6 -9
- package/lib/Antd5/carousel/index.js +3 -3
- package/lib/Antd5/carousel/style/index.js +1 -1
- package/lib/Antd5/cascader/Panel.js +7 -2
- package/lib/Antd5/cascader/hooks/useBase.js +3 -2
- package/lib/Antd5/cascader/hooks/useColumnIcons.js +6 -3
- package/lib/Antd5/cascader/index.js +1 -1
- package/lib/Antd5/cascader/style/columns.js +6 -4
- package/lib/Antd5/checkbox/Checkbox.js +11 -5
- package/lib/Antd5/checkbox/style/index.js +6 -3
- package/lib/Antd5/collapse/Collapse.js +2 -1
- package/lib/Antd5/collapse/style/index.js +20 -13
- package/lib/Antd5/color-picker/ColorPicker.js +120 -78
- package/lib/Antd5/color-picker/ColorPickerPanel.js +44 -26
- package/lib/Antd5/color-picker/color.js +82 -10
- package/lib/Antd5/color-picker/components/ColorAlphaInput.js +2 -2
- package/lib/Antd5/color-picker/components/ColorClear.js +2 -2
- package/lib/Antd5/color-picker/components/ColorHexInput.js +5 -4
- package/lib/Antd5/color-picker/components/ColorInput.js +4 -3
- package/lib/Antd5/color-picker/components/ColorPresets.js +1 -1
- package/lib/Antd5/color-picker/components/ColorSlider.js +139 -0
- package/lib/Antd5/color-picker/components/ColorTrigger.js +52 -26
- package/lib/Antd5/color-picker/components/PanelPicker/GradientColorBar.js +130 -0
- package/lib/Antd5/color-picker/components/PanelPicker/index.js +194 -0
- package/lib/Antd5/color-picker/context.js +1 -5
- package/lib/Antd5/color-picker/hooks/useModeColor.js +87 -0
- package/lib/Antd5/color-picker/style/color-block.js +3 -2
- package/lib/Antd5/color-picker/style/index.js +33 -15
- package/lib/Antd5/color-picker/style/input.js +1 -1
- package/lib/Antd5/color-picker/style/picker.js +6 -33
- package/lib/Antd5/color-picker/style/slider.js +87 -0
- package/lib/Antd5/color-picker/util.js +53 -7
- package/lib/Antd5/config-provider/context.js +3 -1
- package/lib/Antd5/config-provider/cssVariables.js +0 -1
- package/lib/Antd5/config-provider/defaultRenderEmpty.js +8 -1
- package/lib/Antd5/config-provider/index.js +13 -5
- package/lib/Antd5/config-provider/style/index.js +0 -1
- package/lib/Antd5/date-picker/PickerButton.js +3 -2
- package/lib/Antd5/date-picker/design/behavior-pattern.js +15 -15
- package/lib/Antd5/date-picker/generatePicker/constant.js +15 -0
- package/lib/Antd5/date-picker/generatePicker/generateRangePicker.js +16 -11
- package/lib/Antd5/date-picker/generatePicker/generateSinglePicker.js +19 -15
- package/lib/Antd5/date-picker/generatePicker/index.js +2 -2
- package/lib/Antd5/date-picker/generatePicker/interface.js +1 -1
- package/lib/Antd5/date-picker/index.js +2 -17
- package/lib/Antd5/date-picker/locale/ar_EG.js +9 -1
- package/lib/Antd5/date-picker/locale/az_AZ.js +9 -1
- package/lib/Antd5/date-picker/locale/el_GR.js +9 -1
- package/lib/Antd5/date-picker/locale/ja_JP.js +11 -1
- package/lib/Antd5/date-picker/locale/kn_IN.js +9 -1
- package/lib/Antd5/date-picker/locale/pl_PL.js +9 -1
- package/lib/Antd5/date-picker/locale/uk_UA.js +10 -1
- package/lib/Antd5/date-picker/style/index.js +13 -10
- package/lib/Antd5/date-picker/style/panel.js +36 -32
- package/lib/Antd5/date-picker/style/token.js +1 -1
- package/lib/Antd5/date-picker/util.js +0 -48
- package/lib/Antd5/descriptions/hooks/useItems.js +5 -0
- package/lib/Antd5/descriptions/hooks/useRow.js +42 -34
- package/lib/Antd5/descriptions/style/index.js +20 -8
- package/lib/Antd5/divider/index.js +4 -3
- package/lib/Antd5/divider/style/index.js +19 -4
- package/lib/Antd5/drawer/DrawerPanel.js +11 -20
- package/lib/Antd5/drawer/index.js +39 -42
- package/lib/Antd5/drawer/style/index.js +10 -11
- package/lib/Antd5/dropdown/dropdown.js +5 -7
- package/lib/Antd5/dropdown/style/index.js +27 -11
- package/lib/Antd5/empty/empty.js +9 -3
- package/lib/Antd5/empty/simple.js +9 -3
- package/lib/Antd5/empty/style/index.js +1 -1
- package/lib/Antd5/float-button/BackTop.js +3 -2
- package/lib/Antd5/float-button/FloatButton.js +16 -5
- package/lib/Antd5/float-button/FloatButtonGroup.js +76 -52
- package/lib/Antd5/float-button/style/index.js +117 -76
- package/lib/Antd5/float-button/style/keyframes.js +118 -0
- package/lib/Antd5/form/ErrorList.js +14 -2
- package/lib/Antd5/form/Form.js +11 -3
- package/lib/Antd5/form/FormItem/ItemHolder.js +8 -4
- package/lib/Antd5/form/FormItem/index.js +6 -4
- package/lib/Antd5/form/FormItemInput.js +68 -28
- package/lib/Antd5/form/FormItemLabel.js +3 -3
- package/lib/Antd5/form/hooks/useForm.js +8 -1
- package/lib/Antd5/form/hooks/useVariants.js +10 -4
- package/lib/Antd5/form/style/explain.js +9 -8
- package/lib/Antd5/form/style/index.js +30 -18
- package/lib/Antd5/grid/row.js +2 -2
- package/lib/Antd5/image/index.js +3 -1
- package/lib/Antd5/image/style/index.js +17 -20
- package/lib/Antd5/index.js +2 -1
- package/lib/Antd5/input/Input.js +18 -38
- package/lib/Antd5/input/OTP/OTPInput.js +10 -5
- package/lib/Antd5/input/OTP/index.js +12 -4
- package/lib/Antd5/input/Password.js +6 -2
- package/lib/Antd5/input/Search.js +2 -4
- package/lib/Antd5/input/TextArea.js +1 -1
- package/lib/Antd5/input/style/index.js +72 -63
- package/lib/Antd5/input/style/otp.js +1 -1
- package/lib/Antd5/input/style/variants.js +38 -23
- package/lib/Antd5/input/utils.js +0 -1
- package/lib/Antd5/input-number/index.js +19 -22
- package/lib/Antd5/input-number/style/index.js +26 -16
- package/lib/Antd5/layout/Sider.js +15 -8
- package/lib/Antd5/layout/style/index.js +6 -96
- package/lib/Antd5/layout/style/sider.js +115 -0
- package/lib/Antd5/list/Item.js +18 -5
- package/lib/Antd5/list/index.js +15 -10
- package/lib/Antd5/list/style/index.js +40 -41
- package/lib/Antd5/locale/ar_EG.js +14 -1
- package/lib/Antd5/locale/az_AZ.js +78 -28
- package/lib/Antd5/locale/bn_BD.js +0 -1
- package/lib/Antd5/locale/by_BY.js +0 -1
- package/lib/Antd5/locale/ca_ES.js +0 -1
- package/lib/Antd5/locale/cs_CZ.js +0 -1
- package/lib/Antd5/locale/de_DE.js +0 -1
- package/lib/Antd5/locale/el_GR.js +104 -3
- package/lib/Antd5/locale/en_GB.js +0 -1
- package/lib/Antd5/locale/en_US.js +4 -2
- package/lib/Antd5/locale/es_ES.js +10 -6
- package/lib/Antd5/locale/et_EE.js +0 -1
- package/lib/Antd5/locale/eu_ES.js +4 -2
- package/lib/Antd5/locale/fa_IR.js +0 -1
- package/lib/Antd5/locale/fr_BE.js +5 -1
- package/lib/Antd5/locale/fr_CA.js +0 -1
- package/lib/Antd5/locale/fr_FR.js +5 -6
- package/lib/Antd5/locale/ga_IE.js +0 -1
- package/lib/Antd5/locale/gl_ES.js +0 -1
- package/lib/Antd5/locale/he_IL.js +0 -1
- package/lib/Antd5/locale/hi_IN.js +0 -1
- package/lib/Antd5/locale/hr_HR.js +0 -1
- package/lib/Antd5/locale/id_ID.js +4 -2
- package/lib/Antd5/locale/index.js +1 -1
- package/lib/Antd5/locale/it_IT.js +0 -1
- package/lib/Antd5/locale/ja_JP.js +4 -2
- package/lib/Antd5/locale/ka_GE.js +0 -1
- package/lib/Antd5/locale/kk_KZ.js +0 -1
- package/lib/Antd5/locale/km_KH.js +0 -1
- package/lib/Antd5/locale/kn_IN.js +82 -4
- package/lib/Antd5/locale/ko_KR.js +4 -2
- package/lib/Antd5/locale/lt_LT.js +4 -2
- package/lib/Antd5/locale/ml_IN.js +0 -1
- package/lib/Antd5/locale/mn_MN.js +86 -2
- package/lib/Antd5/locale/ms_MY.js +101 -18
- package/lib/Antd5/locale/my_MM.js +0 -1
- package/lib/Antd5/locale/nb_NO.js +0 -1
- package/lib/Antd5/locale/ne_NP.js +104 -2
- package/lib/Antd5/locale/nl_BE.js +5 -1
- package/lib/Antd5/locale/nl_NL.js +5 -1
- package/lib/Antd5/locale/pl_PL.js +0 -1
- package/lib/Antd5/locale/pt_BR.js +0 -1
- package/lib/Antd5/locale/pt_PT.js +55 -38
- package/lib/Antd5/locale/ro_RO.js +0 -1
- package/lib/Antd5/locale/ru_RU.js +9 -2
- package/lib/Antd5/locale/si_LK.js +0 -1
- package/lib/Antd5/locale/sk_SK.js +0 -1
- package/lib/Antd5/locale/sr_RS.js +0 -1
- package/lib/Antd5/locale/sv_SE.js +0 -1
- package/lib/Antd5/locale/th_TH.js +11 -3
- package/lib/Antd5/locale/tk_TK.js +0 -1
- package/lib/Antd5/locale/tr_TR.js +2 -1
- package/lib/Antd5/locale/uk_UA.js +1 -1
- package/lib/Antd5/locale/ur_PK.js +0 -1
- package/lib/Antd5/locale/uz_UZ.js +6 -7
- package/lib/Antd5/locale/zh_CN.js +4 -2
- package/lib/Antd5/locale/zh_HK.js +0 -1
- package/lib/Antd5/locale/zh_TW.js +0 -1
- package/lib/Antd5/mentions/index.js +4 -4
- package/lib/Antd5/menu/MenuItem.js +6 -5
- package/lib/Antd5/menu/OverrideContext.js +4 -3
- package/lib/Antd5/menu/SubMenu.js +2 -2
- package/lib/Antd5/menu/menu.js +2 -2
- package/lib/Antd5/menu/style/index.js +58 -40
- package/lib/Antd5/menu/style/theme.js +24 -20
- package/lib/Antd5/menu/style/vertical.js +10 -7
- package/lib/Antd5/message/PurePanel.js +22 -40
- package/lib/Antd5/message/style/index.js +8 -47
- package/lib/Antd5/message/useMessage.js +3 -15
- package/lib/Antd5/modal/Modal.js +50 -38
- package/lib/Antd5/modal/PurePanel.js +0 -1
- package/lib/Antd5/modal/confirm.js +4 -5
- package/lib/Antd5/modal/style/confirm.js +1 -2
- package/lib/Antd5/modal/style/index.js +13 -3
- package/lib/Antd5/modal/useModal/HookModal.js +4 -3
- package/lib/Antd5/modal/useModal/index.js +0 -1
- package/lib/Antd5/notification/index.js +6 -3
- package/lib/Antd5/notification/style/index.js +35 -3
- package/lib/Antd5/notification/useNotification.js +6 -1
- package/lib/Antd5/pagination/Pagination.js +10 -5
- package/lib/Antd5/pagination/design/behavior-pattern.js +3 -3
- package/lib/Antd5/pagination/style/bordered.js +1 -1
- package/lib/Antd5/pagination/style/index.js +27 -18
- package/lib/Antd5/popconfirm/PurePanel.js +7 -7
- package/lib/Antd5/popover/PurePanel.js +16 -6
- package/lib/Antd5/popover/index.js +7 -19
- package/lib/Antd5/popover/style/index.js +3 -1
- package/lib/Antd5/progress/Line.js +27 -19
- package/lib/Antd5/progress/design/behavior-pattern.js +3 -3
- package/lib/Antd5/progress/progress.js +37 -11
- package/lib/Antd5/progress/style/index.js +46 -11
- package/lib/Antd5/progress/utils.js +20 -18
- package/lib/Antd5/qr-code/QrcodeStatus.js +42 -0
- package/lib/Antd5/qr-code/index.js +31 -31
- package/lib/Antd5/rate/index.js +8 -2
- package/lib/Antd5/result/noFound.js +3 -1
- package/lib/Antd5/result/serverError.js +3 -1
- package/lib/Antd5/result/unauthorized.js +5 -3
- package/lib/Antd5/segmented/index.js +5 -3
- package/lib/Antd5/segmented/style/index.js +11 -3
- package/lib/Antd5/select/index.js +4 -2
- package/lib/Antd5/select/style/dropdown.js +1 -1
- package/lib/Antd5/select/style/index.js +21 -8
- package/lib/Antd5/select/style/multiple.js +18 -9
- package/lib/Antd5/select/style/single.js +8 -10
- package/lib/Antd5/select/style/token.js +9 -2
- package/lib/Antd5/select/style/variants.js +20 -11
- package/lib/Antd5/skeleton/Image.js +6 -4
- package/lib/Antd5/skeleton/Node.js +1 -3
- package/lib/Antd5/skeleton/Paragraph.js +1 -1
- package/lib/Antd5/skeleton/Title.js +9 -6
- package/lib/Antd5/skeleton/style/index.js +13 -13
- package/lib/Antd5/slider/Context.js +4 -0
- package/lib/Antd5/slider/SliderTooltip.js +9 -5
- package/lib/Antd5/slider/index.js +32 -31
- package/lib/Antd5/slider/style/index.js +60 -44
- package/lib/Antd5/space/Compact.js +1 -1
- package/lib/Antd5/space/index.js +3 -3
- package/lib/Antd5/spin/Indicator/Looper.js +29 -0
- package/lib/Antd5/spin/Indicator/Progress.js +78 -0
- package/lib/Antd5/spin/Indicator/index.js +21 -0
- package/lib/Antd5/spin/index.js +27 -45
- package/lib/Antd5/spin/style/index.js +54 -17
- package/lib/Antd5/spin/usePercent.js +40 -0
- package/lib/Antd5/splitter/Panel.js +36 -0
- package/lib/Antd5/splitter/SplitBar.js +124 -0
- package/lib/Antd5/splitter/Splitter.js +194 -0
- package/lib/Antd5/{_util/transButton.js → splitter/hooks/useItems.js} +28 -54
- package/lib/Antd5/splitter/hooks/useResizable.js +43 -0
- package/lib/Antd5/splitter/hooks/useResize.js +138 -0
- package/lib/Antd5/splitter/hooks/useSizes.js +109 -0
- package/lib/Antd5/splitter/index.js +5 -0
- package/lib/Antd5/splitter/interface.js +1 -0
- package/lib/Antd5/splitter/style/index.js +219 -0
- package/lib/Antd5/statistic/style/index.js +1 -1
- package/lib/Antd5/steps/style/custom-icon.js +1 -1
- package/lib/Antd5/steps/style/index.js +11 -8
- package/lib/Antd5/steps/style/inline.js +5 -4
- package/lib/Antd5/steps/style/progress-dot.js +2 -2
- package/lib/Antd5/steps/style/small.js +3 -3
- package/lib/Antd5/steps/style/vertical.js +2 -2
- package/lib/Antd5/style/index.js +37 -13
- package/lib/Antd5/style/motion/slide.js +6 -5
- package/lib/Antd5/style/placementArrow.js +15 -6
- package/lib/Antd5/switch/style/index.js +1 -1
- package/lib/Antd5/table/Column.js +2 -3
- package/lib/Antd5/table/ColumnGroup.js +2 -3
- package/lib/Antd5/table/ExpandIcon.js +6 -6
- package/lib/Antd5/table/InternalTable.js +6 -6
- package/lib/Antd5/table/RcTable/VirtualTable.js +3 -2
- package/lib/Antd5/table/RcTable/index.js +3 -2
- package/lib/Antd5/table/hooks/useFilter/FilterDropdown.js +82 -61
- package/lib/Antd5/table/hooks/useFilter/FilterSearch.js +7 -7
- package/lib/Antd5/table/hooks/useFilter/index.js +28 -26
- package/lib/Antd5/table/hooks/useLazyKVMap.js +5 -5
- package/lib/Antd5/table/hooks/useSelection.js +21 -11
- package/lib/Antd5/table/hooks/useSorter.js +66 -42
- package/lib/Antd5/table/hooks/useTitleColumns.js +9 -7
- package/lib/Antd5/table/interface.js +1 -1
- package/lib/Antd5/table/style/bordered.js +5 -3
- package/lib/Antd5/table/style/expand.js +44 -38
- package/lib/Antd5/table/style/filter.js +1 -1
- package/lib/Antd5/table/style/index.js +26 -21
- package/lib/Antd5/table/style/selection.js +3 -1
- package/lib/Antd5/table/style/sorter.js +3 -1
- package/lib/Antd5/table/style/virtual.js +2 -2
- package/lib/Antd5/table/util.js +9 -8
- package/lib/Antd5/tabs/style/index.js +2 -2
- package/lib/Antd5/tag/style/index.js +2 -2
- package/lib/Antd5/theme/index.js +12 -5
- package/lib/Antd5/theme/interface/cssinjs-utils.js +1 -0
- package/lib/Antd5/theme/internal.js +10 -5
- package/lib/Antd5/theme/themes/dark/colors.js +3 -0
- package/lib/Antd5/theme/themes/dark/index.js +1 -0
- package/lib/Antd5/theme/themes/default/colors.js +3 -0
- package/lib/Antd5/theme/themes/default/index.js +6 -2
- package/lib/Antd5/theme/themes/seed.js +5 -2
- package/lib/Antd5/theme/themes/shared/genColorMapToken.js +2 -0
- package/lib/Antd5/theme/themes/shared/genFontSizes.js +1 -1
- package/lib/Antd5/theme/useToken.js +2 -1
- package/lib/Antd5/theme/util/alias.js +1 -1
- package/lib/Antd5/theme/util/genStyleUtils.js +61 -0
- package/lib/Antd5/time-picker/index.js +15 -2
- package/lib/Antd5/time-picker/locale/az_AZ.js +2 -1
- package/lib/Antd5/time-picker/locale/it_IT.js +2 -1
- package/lib/Antd5/time-picker/locale/uk_UA.js +2 -1
- package/lib/Antd5/timeline/TimelineItemList.js +0 -1
- package/lib/Antd5/timeline/style/index.js +1 -1
- package/lib/Antd5/tooltip/index.js +3 -2
- package/lib/Antd5/tooltip/style/index.js +3 -1
- package/lib/Antd5/tooltip/util.js +0 -1
- package/lib/Antd5/tour/panelRender.js +7 -13
- package/lib/Antd5/tour/style/index.js +6 -13
- package/lib/Antd5/transfer/ListItem.js +3 -3
- package/lib/Antd5/transfer/hooks/useData.js +1 -1
- package/lib/Antd5/transfer/hooks/useSelection.js +26 -21
- package/lib/Antd5/transfer/style/index.js +12 -22
- package/lib/Antd5/tree/Tree.js +2 -0
- package/lib/Antd5/tree/style/directory.js +39 -0
- package/lib/Antd5/tree/style/index.js +115 -166
- package/lib/Antd5/tree/utils/dropIndicator.js +3 -2
- package/lib/Antd5/tree/utils/iconUtil.js +5 -1
- package/lib/Antd5/tree-select/index.js +47 -43
- package/lib/Antd5/typography/Base/CopyBtn.js +17 -17
- package/lib/Antd5/typography/Base/Ellipsis.js +48 -40
- package/lib/Antd5/typography/Base/index.js +20 -60
- package/lib/Antd5/typography/Base/util.js +31 -1
- package/lib/Antd5/typography/Editable.js +11 -10
- package/lib/Antd5/typography/Title.js +1 -6
- package/lib/Antd5/typography/Typography.js +2 -6
- package/lib/Antd5/typography/hooks/useCopyClick.js +3 -2
- package/lib/Antd5/typography/hooks/usePrevious.js +1 -1
- package/lib/Antd5/{message/assets/Close.js → typography/hooks/useTooltipProps.js} +24 -16
- package/lib/Antd5/typography/style/mixins.js +3 -9
- package/lib/Antd5/upload/Upload.js +55 -83
- package/lib/Antd5/upload/UploadList/ListItem.js +15 -9
- package/lib/Antd5/upload/UploadList/index.js +33 -47
- package/lib/Antd5/upload/style/dragger.js +5 -26
- package/lib/Antd5/upload/style/list.js +2 -7
- package/lib/Antd5/version/version.js +1 -1
- package/lib/Antd5/watermark/context.js +1 -1
- package/lib/Antd5/watermark/index.js +35 -18
- package/lib/Antd5/watermark/useClips.js +2 -1
- package/lib/Antd5/watermark/useRafDebounce.js +1 -1
- package/lib/Antd5/watermark/utils.js +1 -1
- package/lib/Button/index.style.js +1 -3
- package/lib/CWSelect/index.js +39 -1
- package/lib/CWSelect/index.style.js +39 -0
- package/lib/CWTree/index.js +3 -9
- package/lib/CWTree/index.style.js +2 -0
- package/lib/ConfigProvider/ConfigProvider.js +9 -10
- package/lib/ConfigProvider/customTheme.js +9 -2
- package/lib/ConfigProvider/theme/common.js +140 -0
- package/lib/ConfigProvider/theme/dark.js +2 -0
- package/lib/ConfigProvider/theme/default.js +115 -0
- package/lib/ConfigProvider/theme/utils.js +49 -0
- package/lib/QuickTransfer/index.js +44 -48
- package/lib/RangePicker/components/ExtraQuickSelect.js +1 -4
- package/lib/RangePicker/index.js +38 -26
- package/lib/RangePicker/utils/generate/dayjs.js +1 -1
- package/lib/Splitter/index.js +2 -0
- package/package.json +37 -35
- package/lib/Antd5/color-picker/components/PanelPicker.js +0 -53
- package/lib/Antd5/color-picker/hooks/useColorState.js +0 -53
- package/lib/Antd5/layout/style/light.js +0 -24
- package/lib/Antd5/style/operationUnit.js +0 -18
- package/lib/Antd5/theme/util/calc/CSSCalculator.js +0 -119
- package/lib/Antd5/theme/util/calc/NumCalculator.js +0 -81
- package/lib/Antd5/theme/util/calc/calculator.js +0 -10
- package/lib/Antd5/theme/util/calc/index.js +0 -9
- package/lib/Antd5/theme/util/genComponentStyleHook.js +0 -243
- package/lib/Antd5/theme/util/maxmin.js +0 -27
- package/lib/Antd5/theme/util/statistic.js +0 -74
- package/lib/Antd5/typography/hooks/useUpdatedEffect.js +0 -13
- package/lib/Antd5/version/token-meta.json +0 -1
- package/lib/Antd5/version/token.json +0 -1
- package/lib/ConfigProvider/customTheme.json +0 -163
|
@@ -0,0 +1,39 @@
|
|
|
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 _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; }
|
|
3
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
4
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
5
|
+
// ============================ Directory =============================
|
|
6
|
+
export var genDirectoryStyle = function genDirectoryStyle(_ref) {
|
|
7
|
+
var treeCls = _ref.treeCls,
|
|
8
|
+
treeNodeCls = _ref.treeNodeCls,
|
|
9
|
+
directoryNodeSelectedBg = _ref.directoryNodeSelectedBg,
|
|
10
|
+
directoryNodeSelectedColor = _ref.directoryNodeSelectedColor,
|
|
11
|
+
motionDurationMid = _ref.motionDurationMid,
|
|
12
|
+
borderRadius = _ref.borderRadius,
|
|
13
|
+
controlItemBgHover = _ref.controlItemBgHover;
|
|
14
|
+
return _defineProperty({}, "".concat(treeCls).concat(treeCls, "-directory ").concat(treeNodeCls), _defineProperty(_defineProperty(_defineProperty({}, "".concat(treeCls, "-node-content-wrapper"), _defineProperty(_defineProperty(_defineProperty(_defineProperty({
|
|
15
|
+
position: 'static'
|
|
16
|
+
}, "> *:not(".concat(treeCls, "-drop-indicator)"), {
|
|
17
|
+
position: 'relative'
|
|
18
|
+
}), '&:hover', {
|
|
19
|
+
background: 'transparent'
|
|
20
|
+
}), '&:before', {
|
|
21
|
+
position: 'absolute',
|
|
22
|
+
inset: 0,
|
|
23
|
+
transition: "background-color ".concat(motionDurationMid),
|
|
24
|
+
content: '""',
|
|
25
|
+
borderRadius: borderRadius
|
|
26
|
+
}), '&:hover:before', {
|
|
27
|
+
background: controlItemBgHover
|
|
28
|
+
})), "".concat(treeCls, "-switcher, ").concat(treeCls, "-checkbox, ").concat(treeCls, "-draggable-icon"), {
|
|
29
|
+
zIndex: 1
|
|
30
|
+
}), '&-selected', _defineProperty(_defineProperty({}, "".concat(treeCls, "-switcher, ").concat(treeCls, "-draggable-icon"), {
|
|
31
|
+
color: directoryNodeSelectedColor
|
|
32
|
+
}), "".concat(treeCls, "-node-content-wrapper"), {
|
|
33
|
+
color: directoryNodeSelectedColor,
|
|
34
|
+
background: 'transparent',
|
|
35
|
+
'&:before, &:hover:before': {
|
|
36
|
+
background: directoryNodeSelectedBg
|
|
37
|
+
}
|
|
38
|
+
})));
|
|
39
|
+
};
|
|
@@ -9,6 +9,7 @@ import { getStyle as getCheckboxStyle } from '../../checkbox/style';
|
|
|
9
9
|
import { genFocusOutline, resetComponent } from '../../style';
|
|
10
10
|
import { genCollapseMotion } from '../../style/motion';
|
|
11
11
|
import { genStyleHooks, mergeToken } from '../../theme/internal';
|
|
12
|
+
import { genDirectoryStyle } from './directory';
|
|
12
13
|
// ============================ Keyframes =============================
|
|
13
14
|
var treeNodeFX = new Keyframes('ant-tree-node-fx-do-not-use', {
|
|
14
15
|
'0%': {
|
|
@@ -53,115 +54,127 @@ var getDropIndicatorStyle = function getDropIndicatorStyle(prefixCls, token) {
|
|
|
53
54
|
});
|
|
54
55
|
};
|
|
55
56
|
export var genBaseStyle = function genBaseStyle(prefixCls, token) {
|
|
56
|
-
var
|
|
57
|
+
var _objectSpread4;
|
|
57
58
|
var treeCls = token.treeCls,
|
|
58
59
|
treeNodeCls = token.treeNodeCls,
|
|
59
60
|
treeNodePadding = token.treeNodePadding,
|
|
60
61
|
titleHeight = token.titleHeight,
|
|
62
|
+
indentSize = token.indentSize,
|
|
61
63
|
nodeSelectedBg = token.nodeSelectedBg,
|
|
62
|
-
nodeHoverBg = token.nodeHoverBg
|
|
63
|
-
|
|
64
|
-
return _defineProperty({}, treeCls, _objectSpread(_objectSpread({}, resetComponent(token)), {}, (
|
|
64
|
+
nodeHoverBg = token.nodeHoverBg,
|
|
65
|
+
colorTextQuaternary = token.colorTextQuaternary;
|
|
66
|
+
return _defineProperty({}, treeCls, _objectSpread(_objectSpread({}, resetComponent(token)), {}, (_objectSpread4 = {
|
|
65
67
|
background: token.colorBgContainer,
|
|
66
68
|
borderRadius: token.borderRadius,
|
|
67
|
-
transition: "background-color ".concat(token.motionDurationSlow)
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
})), "&-focused:not(:hover):not(".concat(treeCls, "-active-focused)"), _objectSpread({}, genFocusOutline(token))), "".concat(treeCls, "-list-holder-inner"), {
|
|
69
|
+
transition: "background-color ".concat(token.motionDurationSlow),
|
|
70
|
+
'&-rtl': {
|
|
71
|
+
direction: 'rtl'
|
|
72
|
+
}
|
|
73
|
+
}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_objectSpread4, "&".concat(treeCls, "-rtl ").concat(treeCls, "-switcher_close ").concat(treeCls, "-switcher-icon svg"), {
|
|
74
|
+
transform: 'rotate(90deg)'
|
|
75
|
+
}), "&-focused:not(:hover):not(".concat(treeCls, "-active-focused)"), _objectSpread({}, genFocusOutline(token))), "".concat(treeCls, "-list-holder-inner"), {
|
|
75
76
|
alignItems: 'flex-start'
|
|
76
77
|
}), "&".concat(treeCls, "-block-node"), _defineProperty({}, "".concat(treeCls, "-list-holder-inner"), _defineProperty(_defineProperty({
|
|
77
78
|
alignItems: 'stretch'
|
|
78
79
|
}, "".concat(treeCls, "-node-content-wrapper"), {
|
|
79
80
|
flex: 'auto'
|
|
80
|
-
}), "".concat(treeNodeCls, ".dragging"), {
|
|
81
|
+
}), "".concat(treeNodeCls, ".dragging:after"), {
|
|
82
|
+
position: 'absolute',
|
|
83
|
+
inset: 0,
|
|
84
|
+
border: "1px solid ".concat(token.colorPrimary),
|
|
85
|
+
opacity: 0,
|
|
86
|
+
animationName: treeNodeFX,
|
|
87
|
+
animationDuration: token.motionDurationSlow,
|
|
88
|
+
animationPlayState: 'running',
|
|
89
|
+
animationFillMode: 'forwards',
|
|
90
|
+
content: '""',
|
|
91
|
+
pointerEvents: 'none',
|
|
92
|
+
borderRadius: token.borderRadius
|
|
93
|
+
}))), treeNodeCls, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({
|
|
94
|
+
display: 'flex',
|
|
95
|
+
alignItems: 'flex-start',
|
|
96
|
+
marginBottom: treeNodePadding,
|
|
97
|
+
lineHeight: unit(titleHeight),
|
|
81
98
|
position: 'relative',
|
|
82
|
-
|
|
99
|
+
// 非常重要,避免 drop-indicator 在拖拽过程中闪烁
|
|
100
|
+
'&:before': {
|
|
101
|
+
content: '""',
|
|
83
102
|
position: 'absolute',
|
|
84
|
-
|
|
85
|
-
insetInlineEnd: 0,
|
|
86
|
-
bottom: treeNodePadding,
|
|
103
|
+
zIndex: 1,
|
|
87
104
|
insetInlineStart: 0,
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
animationDuration: token.motionDurationSlow,
|
|
92
|
-
animationPlayState: 'running',
|
|
93
|
-
animationFillMode: 'forwards',
|
|
94
|
-
content: '""',
|
|
95
|
-
pointerEvents: 'none'
|
|
105
|
+
width: '100%',
|
|
106
|
+
top: '100%',
|
|
107
|
+
height: treeNodePadding
|
|
96
108
|
}
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
'&:hover': {
|
|
110
|
-
background: 'transparent'
|
|
111
|
-
}
|
|
112
|
-
})
|
|
113
|
-
}, "&-active ".concat(treeCls, "-node-content-wrapper"), {
|
|
114
|
-
background: token.colorPrimaryBg
|
|
109
|
+
}, "&-disabled ".concat(treeCls, "-node-content-wrapper"), {
|
|
110
|
+
color: token.colorTextDisabled,
|
|
111
|
+
cursor: 'not-allowed',
|
|
112
|
+
'&:hover': {
|
|
113
|
+
background: 'transparent'
|
|
114
|
+
}
|
|
115
|
+
}), "&:not(".concat(treeNodeCls, "-disabled)"), _defineProperty({}, "".concat(treeCls, "-node-content-wrapper"), {
|
|
116
|
+
'&:hover': {
|
|
117
|
+
color: token.nodeHoverColor
|
|
118
|
+
}
|
|
119
|
+
})), "&-active ".concat(treeCls, "-node-content-wrapper"), {
|
|
120
|
+
background: token.controlItemBgHover
|
|
115
121
|
}), "&:not(".concat(treeNodeCls, "-disabled).filter-node ").concat(treeCls, "-title"), {
|
|
116
|
-
color:
|
|
122
|
+
color: token.colorPrimary,
|
|
117
123
|
fontWeight: 500
|
|
118
124
|
}), '&-draggable', _defineProperty(_defineProperty({
|
|
119
125
|
cursor: 'grab'
|
|
120
|
-
}, "".concat(treeCls, "-draggable-icon"),
|
|
126
|
+
}, "".concat(treeCls, "-draggable-icon"), {
|
|
121
127
|
// https://github.com/ant-design/ant-design/issues/41915
|
|
122
128
|
flexShrink: 0,
|
|
123
129
|
width: titleHeight,
|
|
124
|
-
lineHeight: "".concat(unit(titleHeight)),
|
|
125
130
|
textAlign: 'center',
|
|
126
131
|
visibility: 'visible',
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
}, "".concat(treeNodeCls, ":hover &"), {
|
|
130
|
-
opacity: 0.45
|
|
131
|
-
})), "&".concat(treeNodeCls, "-disabled"), _defineProperty({}, "".concat(treeCls, "-draggable-icon"), {
|
|
132
|
+
color: colorTextQuaternary
|
|
133
|
+
}), "&".concat(treeNodeCls, "-disabled ").concat(treeCls, "-draggable-icon"), {
|
|
132
134
|
visibility: 'hidden'
|
|
133
|
-
})))
|
|
135
|
+
}))), "".concat(treeCls, "-indent"), {
|
|
134
136
|
alignSelf: 'stretch',
|
|
135
137
|
whiteSpace: 'nowrap',
|
|
136
138
|
userSelect: 'none',
|
|
137
139
|
'&-unit': {
|
|
138
140
|
display: 'inline-block',
|
|
139
|
-
width:
|
|
141
|
+
width: indentSize
|
|
140
142
|
}
|
|
141
143
|
}), "".concat(treeCls, "-draggable-icon"), {
|
|
142
144
|
visibility: 'hidden'
|
|
145
|
+
}), "".concat(treeCls, "-switcher, ").concat(treeCls, "-checkbox"), {
|
|
146
|
+
marginInlineEnd: token.calc(token.calc(titleHeight).sub(token.controlInteractiveSize)).div(2).equal()
|
|
143
147
|
}), "".concat(treeCls, "-switcher"), _objectSpread(_objectSpread({}, getSwitchStyle(prefixCls, token)), {}, _defineProperty(_defineProperty(_defineProperty(_defineProperty({
|
|
144
148
|
position: 'relative',
|
|
145
149
|
flex: 'none',
|
|
146
150
|
alignSelf: 'stretch',
|
|
147
151
|
width: titleHeight,
|
|
148
|
-
margin: 0,
|
|
149
|
-
lineHeight: "".concat(unit(titleHeight)),
|
|
150
152
|
textAlign: 'center',
|
|
151
153
|
cursor: 'pointer',
|
|
152
154
|
userSelect: 'none',
|
|
153
155
|
transition: "all ".concat(token.motionDurationSlow),
|
|
154
|
-
borderRadius: token.borderRadius,
|
|
155
156
|
'&-noop': {
|
|
156
157
|
cursor: 'unset'
|
|
158
|
+
},
|
|
159
|
+
'&:before': {
|
|
160
|
+
pointerEvents: 'none',
|
|
161
|
+
content: '""',
|
|
162
|
+
width: titleHeight,
|
|
163
|
+
height: titleHeight,
|
|
164
|
+
position: 'absolute',
|
|
165
|
+
left: {
|
|
166
|
+
_skip_check_: true,
|
|
167
|
+
value: 0
|
|
168
|
+
},
|
|
169
|
+
top: 0,
|
|
170
|
+
borderRadius: token.borderRadius,
|
|
171
|
+
transition: "all ".concat(token.motionDurationSlow)
|
|
157
172
|
}
|
|
158
|
-
}, "&:not(".concat(treeCls, "-switcher-noop):hover"), {
|
|
173
|
+
}, "&:not(".concat(treeCls, "-switcher-noop):hover:before"), {
|
|
159
174
|
backgroundColor: token.colorBgTextHover
|
|
160
|
-
}),
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
}
|
|
164
|
-
})), '&-loading-icon', {
|
|
175
|
+
}), "&_close ".concat(treeCls, "-switcher-icon svg"), {
|
|
176
|
+
transform: 'rotate(-90deg)'
|
|
177
|
+
}), '&-loading-icon', {
|
|
165
178
|
color: token.colorPrimary
|
|
166
179
|
}), '&-leaf-line', {
|
|
167
180
|
position: 'relative',
|
|
@@ -186,128 +199,59 @@ export var genBaseStyle = function genBaseStyle(prefixCls, token) {
|
|
|
186
199
|
borderBottom: "1px solid ".concat(token.colorBorder),
|
|
187
200
|
content: '""'
|
|
188
201
|
}
|
|
189
|
-
}))), "".concat(treeCls, "-
|
|
190
|
-
top: 'initial',
|
|
191
|
-
marginInlineEnd: treeCheckBoxMarginHorizontal,
|
|
192
|
-
alignSelf: 'flex-start',
|
|
193
|
-
marginTop: token.marginXXS
|
|
194
|
-
}), "".concat(treeCls, "-node-content-wrapper, ").concat(treeCls, "-checkbox + span"), _defineProperty(_defineProperty({
|
|
202
|
+
}))), "".concat(treeCls, "-node-content-wrapper"), _objectSpread(_objectSpread({
|
|
195
203
|
position: 'relative',
|
|
196
|
-
zIndex: 'auto',
|
|
197
204
|
minHeight: titleHeight,
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
color: 'inherit',
|
|
201
|
-
lineHeight: "".concat(unit(titleHeight)),
|
|
205
|
+
paddingBlock: 0,
|
|
206
|
+
paddingInline: token.paddingXS,
|
|
202
207
|
background: 'transparent',
|
|
203
208
|
borderRadius: token.borderRadius,
|
|
204
209
|
cursor: 'pointer',
|
|
205
|
-
transition: "all ".concat(token.motionDurationMid, ", border 0s, line-height 0s, box-shadow 0s")
|
|
210
|
+
transition: "all ".concat(token.motionDurationMid, ", border 0s, line-height 0s, box-shadow 0s")
|
|
211
|
+
}, getDropIndicatorStyle(prefixCls, token)), {}, _defineProperty(_defineProperty({
|
|
206
212
|
'&:hover': {
|
|
207
213
|
backgroundColor: nodeHoverBg
|
|
208
214
|
}
|
|
209
215
|
}, "&".concat(treeCls, "-node-selected"), {
|
|
216
|
+
color: token.nodeSelectedColor,
|
|
210
217
|
backgroundColor: nodeSelectedBg
|
|
211
218
|
}), "".concat(treeCls, "-iconEle"), {
|
|
212
219
|
display: 'inline-block',
|
|
213
220
|
width: titleHeight,
|
|
214
221
|
height: titleHeight,
|
|
215
|
-
lineHeight: "".concat(unit(titleHeight)),
|
|
216
222
|
textAlign: 'center',
|
|
217
223
|
verticalAlign: 'top',
|
|
218
224
|
'&:empty': {
|
|
219
225
|
display: 'none'
|
|
220
226
|
}
|
|
221
|
-
})), _defineProperty(_defineProperty(_defineProperty(_defineProperty(
|
|
227
|
+
}))), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_objectSpread4, "".concat(treeCls, "-unselectable ").concat(treeCls, "-node-content-wrapper:hover"), {
|
|
222
228
|
backgroundColor: 'transparent'
|
|
223
|
-
}), "".concat(
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
}, getDropIndicatorStyle(prefixCls, token))), "".concat(treeNodeCls, ".drop-container"), {
|
|
227
|
-
'> [draggable]': {
|
|
228
|
-
boxShadow: "0 0 0 2px ".concat(token.colorPrimary)
|
|
229
|
-
}
|
|
230
|
-
}), '&-show-line', _defineProperty(_defineProperty({}, "".concat(treeCls, "-indent"), {
|
|
231
|
-
'&-unit': {
|
|
232
|
-
position: 'relative',
|
|
233
|
-
height: '100%',
|
|
234
|
-
'&:before': {
|
|
235
|
-
position: 'absolute',
|
|
236
|
-
top: 0,
|
|
237
|
-
insetInlineEnd: token.calc(titleHeight).div(2).equal(),
|
|
238
|
-
bottom: token.calc(treeNodePadding).mul(-1).equal(),
|
|
239
|
-
borderInlineEnd: "1px solid ".concat(token.colorBorder),
|
|
240
|
-
content: '""'
|
|
241
|
-
},
|
|
242
|
-
'&-end': {
|
|
243
|
-
'&:before': {
|
|
244
|
-
display: 'none'
|
|
245
|
-
}
|
|
246
|
-
}
|
|
247
|
-
}
|
|
248
|
-
}), "".concat(treeCls, "-switcher"), {
|
|
249
|
-
background: 'transparent',
|
|
250
|
-
'&-line-icon': {
|
|
251
|
-
// https://github.com/ant-design/ant-design/issues/32813
|
|
252
|
-
verticalAlign: '-0.15em'
|
|
253
|
-
}
|
|
254
|
-
})), "".concat(treeNodeCls, "-leaf-last"), _defineProperty({}, "".concat(treeCls, "-switcher"), {
|
|
255
|
-
'&-leaf-line': {
|
|
256
|
-
'&:before': {
|
|
257
|
-
top: 'auto !important',
|
|
258
|
-
bottom: 'auto !important',
|
|
259
|
-
height: "".concat(unit(token.calc(titleHeight).div(2).equal()), " !important")
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
})))));
|
|
263
|
-
};
|
|
264
|
-
// ============================ Directory =============================
|
|
265
|
-
export var genDirectoryStyle = function genDirectoryStyle(token) {
|
|
266
|
-
var treeCls = token.treeCls,
|
|
267
|
-
treeNodeCls = token.treeNodeCls,
|
|
268
|
-
treeNodePadding = token.treeNodePadding,
|
|
269
|
-
directoryNodeSelectedBg = token.directoryNodeSelectedBg,
|
|
270
|
-
directoryNodeSelectedColor = token.directoryNodeSelectedColor;
|
|
271
|
-
return _defineProperty({}, "".concat(treeCls).concat(treeCls, "-directory"), _defineProperty({}, treeNodeCls, _defineProperty(_defineProperty(_defineProperty({
|
|
229
|
+
}), "".concat(treeNodeCls, ".drop-container > [draggable]"), {
|
|
230
|
+
boxShadow: "0 0 0 2px ".concat(token.colorPrimary)
|
|
231
|
+
}), '&-show-line', _defineProperty(_defineProperty({}, "".concat(treeCls, "-indent-unit"), {
|
|
272
232
|
position: 'relative',
|
|
273
|
-
|
|
233
|
+
height: '100%',
|
|
274
234
|
'&:before': {
|
|
275
235
|
position: 'absolute',
|
|
276
236
|
top: 0,
|
|
277
|
-
insetInlineEnd:
|
|
278
|
-
bottom: treeNodePadding,
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
content: '""',
|
|
282
|
-
pointerEvents: 'none'
|
|
283
|
-
},
|
|
284
|
-
'&:hover': {
|
|
285
|
-
'&:before': {
|
|
286
|
-
background: token.colorPrimaryBg
|
|
287
|
-
}
|
|
237
|
+
insetInlineEnd: token.calc(titleHeight).div(2).equal(),
|
|
238
|
+
bottom: token.calc(treeNodePadding).mul(-1).equal(),
|
|
239
|
+
borderInlineEnd: "1px solid ".concat(token.colorBorder),
|
|
240
|
+
content: '""'
|
|
288
241
|
},
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
zIndex: 1
|
|
292
|
-
}
|
|
293
|
-
}, "".concat(treeCls, "-switcher"), {
|
|
294
|
-
transition: "color ".concat(token.motionDurationMid)
|
|
295
|
-
}), "".concat(treeCls, "-node-content-wrapper"), _defineProperty({
|
|
296
|
-
borderRadius: 0,
|
|
297
|
-
userSelect: 'none',
|
|
298
|
-
'&:hover': {
|
|
299
|
-
background: 'transparent'
|
|
242
|
+
'&-end:before': {
|
|
243
|
+
display: 'none'
|
|
300
244
|
}
|
|
301
|
-
}, "&".concat(treeCls, "-node-selected"), {
|
|
302
|
-
color: directoryNodeSelectedColor,
|
|
303
|
-
background: 'transparent'
|
|
304
|
-
})), '&-selected', _defineProperty(_defineProperty(_defineProperty({}, "\n &:hover::before,\n &::before\n ", {
|
|
305
|
-
background: directoryNodeSelectedBg
|
|
306
245
|
}), "".concat(treeCls, "-switcher"), {
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
246
|
+
background: 'transparent',
|
|
247
|
+
'&-line-icon': {
|
|
248
|
+
// https://github.com/ant-design/ant-design/issues/32813
|
|
249
|
+
verticalAlign: '-0.15em'
|
|
250
|
+
}
|
|
251
|
+
})), "".concat(treeNodeCls, "-leaf-last ").concat(treeCls, "-switcher-leaf-line:before"), {
|
|
252
|
+
top: 'auto !important',
|
|
253
|
+
bottom: 'auto !important',
|
|
254
|
+
height: "".concat(unit(token.calc(titleHeight).div(2).equal()), " !important")
|
|
311
255
|
}))));
|
|
312
256
|
};
|
|
313
257
|
// ============================== Merged ==============================
|
|
@@ -327,23 +271,28 @@ export var genTreeStyle = function genTreeStyle(prefixCls, token) {
|
|
|
327
271
|
genDirectoryStyle(treeToken)];
|
|
328
272
|
};
|
|
329
273
|
export var initComponentToken = function initComponentToken(token) {
|
|
330
|
-
var controlHeightSM = token.controlHeightSM
|
|
274
|
+
var controlHeightSM = token.controlHeightSM,
|
|
275
|
+
controlItemBgHover = token.controlItemBgHover,
|
|
276
|
+
controlItemBgActive = token.controlItemBgActive;
|
|
277
|
+
var titleHeight = controlHeightSM;
|
|
331
278
|
return {
|
|
332
|
-
titleHeight:
|
|
333
|
-
|
|
334
|
-
|
|
279
|
+
titleHeight: titleHeight,
|
|
280
|
+
indentSize: titleHeight,
|
|
281
|
+
nodeHoverBg: controlItemBgHover,
|
|
282
|
+
nodeHoverColor: token.colorText,
|
|
283
|
+
nodeSelectedBg: controlItemBgActive,
|
|
284
|
+
nodeSelectedColor: token.colorText
|
|
335
285
|
};
|
|
336
286
|
};
|
|
337
287
|
export var prepareComponentToken = function prepareComponentToken(token) {
|
|
338
288
|
var colorTextLightSolid = token.colorTextLightSolid,
|
|
339
|
-
colorPrimary = token.colorPrimary
|
|
340
|
-
colorPrimaryBg = token.colorPrimaryBg;
|
|
289
|
+
colorPrimary = token.colorPrimary;
|
|
341
290
|
return _objectSpread(_objectSpread({}, initComponentToken(token)), {}, {
|
|
342
291
|
directoryNodeSelectedColor: colorTextLightSolid,
|
|
343
|
-
directoryNodeSelectedBg:
|
|
292
|
+
directoryNodeSelectedBg: colorPrimary
|
|
344
293
|
});
|
|
345
294
|
};
|
|
346
|
-
export default genStyleHooks('Tree', function (token,
|
|
347
|
-
var prefixCls =
|
|
295
|
+
export default genStyleHooks('Tree', function (token, _ref4) {
|
|
296
|
+
var prefixCls = _ref4.prefixCls;
|
|
348
297
|
return [_defineProperty({}, token.componentCls, getCheckboxStyle("".concat(prefixCls, "-checkbox"), token)), genTreeStyle(prefixCls, token), genCollapseMotion(token)];
|
|
349
298
|
}, prepareComponentToken);
|
|
@@ -5,7 +5,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
5
5
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
6
|
import React from 'react';
|
|
7
7
|
export var offset = 4;
|
|
8
|
-
|
|
8
|
+
function dropIndicatorRender(props) {
|
|
9
9
|
var dropPosition = props.dropPosition,
|
|
10
10
|
dropLevelOffset = props.dropLevelOffset,
|
|
11
11
|
prefixCls = props.prefixCls,
|
|
@@ -32,4 +32,5 @@ export default function dropIndicatorRender(props) {
|
|
|
32
32
|
style: style,
|
|
33
33
|
className: "".concat(prefixCls, "-drop-indicator")
|
|
34
34
|
});
|
|
35
|
-
}
|
|
35
|
+
}
|
|
36
|
+
export default dropIndicatorRender;
|
|
@@ -12,11 +12,15 @@ var SwitcherIconCom = function SwitcherIconCom(props) {
|
|
|
12
12
|
var prefixCls = props.prefixCls,
|
|
13
13
|
switcherIcon = props.switcherIcon,
|
|
14
14
|
treeNodeProps = props.treeNodeProps,
|
|
15
|
-
showLine = props.showLine
|
|
15
|
+
showLine = props.showLine,
|
|
16
|
+
switcherLoadingIcon = props.switcherLoadingIcon;
|
|
16
17
|
var isLeaf = treeNodeProps.isLeaf,
|
|
17
18
|
expanded = treeNodeProps.expanded,
|
|
18
19
|
loading = treeNodeProps.loading;
|
|
19
20
|
if (loading) {
|
|
21
|
+
if (/*#__PURE__*/React.isValidElement(switcherLoadingIcon)) {
|
|
22
|
+
return switcherLoadingIcon;
|
|
23
|
+
}
|
|
20
24
|
return _jsx(LoadingOutlined, {
|
|
21
25
|
className: "".concat(prefixCls, "-switcher-loading-icon")
|
|
22
26
|
});
|
|
@@ -36,44 +36,44 @@ import useIcons from '../select/useIcons';
|
|
|
36
36
|
import useShowArrow from '../select/useShowArrow';
|
|
37
37
|
import { useCompactItemContext } from '../space/Compact';
|
|
38
38
|
import SwitcherIconCom from '../tree/utils/iconUtil';
|
|
39
|
+
import { useToken } from '../theme/internal';
|
|
39
40
|
import useStyle from './style';
|
|
40
|
-
var InternalTreeSelect = function InternalTreeSelect(
|
|
41
|
-
var
|
|
42
|
-
var customizePrefixCls =
|
|
43
|
-
customizeSize =
|
|
44
|
-
customDisabled =
|
|
45
|
-
|
|
46
|
-
bordered =
|
|
47
|
-
className =
|
|
48
|
-
rootClassName =
|
|
49
|
-
treeCheckable =
|
|
50
|
-
multiple =
|
|
51
|
-
|
|
52
|
-
listHeight =
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
props = _objectWithoutProperties(_ref, _excluded);
|
|
41
|
+
var InternalTreeSelect = function InternalTreeSelect(props, ref) {
|
|
42
|
+
var _ref;
|
|
43
|
+
var customizePrefixCls = props.prefixCls,
|
|
44
|
+
customizeSize = props.size,
|
|
45
|
+
customDisabled = props.disabled,
|
|
46
|
+
_props$bordered = props.bordered,
|
|
47
|
+
bordered = _props$bordered === void 0 ? true : _props$bordered,
|
|
48
|
+
className = props.className,
|
|
49
|
+
rootClassName = props.rootClassName,
|
|
50
|
+
treeCheckable = props.treeCheckable,
|
|
51
|
+
multiple = props.multiple,
|
|
52
|
+
_props$listHeight = props.listHeight,
|
|
53
|
+
listHeight = _props$listHeight === void 0 ? 256 : _props$listHeight,
|
|
54
|
+
customListItemHeight = props.listItemHeight,
|
|
55
|
+
placement = props.placement,
|
|
56
|
+
notFoundContent = props.notFoundContent,
|
|
57
|
+
switcherIcon = props.switcherIcon,
|
|
58
|
+
treeLine = props.treeLine,
|
|
59
|
+
getPopupContainer = props.getPopupContainer,
|
|
60
|
+
popupClassName = props.popupClassName,
|
|
61
|
+
dropdownClassName = props.dropdownClassName,
|
|
62
|
+
_props$treeIcon = props.treeIcon,
|
|
63
|
+
treeIcon = _props$treeIcon === void 0 ? false : _props$treeIcon,
|
|
64
|
+
transitionName = props.transitionName,
|
|
65
|
+
_props$choiceTransiti = props.choiceTransitionName,
|
|
66
|
+
choiceTransitionName = _props$choiceTransiti === void 0 ? '' : _props$choiceTransiti,
|
|
67
|
+
customStatus = props.status,
|
|
68
|
+
treeExpandAction = props.treeExpandAction,
|
|
69
|
+
builtinPlacements = props.builtinPlacements,
|
|
70
|
+
dropdownMatchSelectWidth = props.dropdownMatchSelectWidth,
|
|
71
|
+
popupMatchSelectWidth = props.popupMatchSelectWidth,
|
|
72
|
+
allowClear = props.allowClear,
|
|
73
|
+
customVariant = props.variant,
|
|
74
|
+
dropdownStyle = props.dropdownStyle,
|
|
75
|
+
tagRender = props.tagRender,
|
|
76
|
+
restProps = _objectWithoutProperties(props, _excluded);
|
|
77
77
|
var _React$useContext = React.useContext(ConfigContext),
|
|
78
78
|
getContextPopupContainer = _React$useContext.getPopupContainer,
|
|
79
79
|
getPrefixCls = _React$useContext.getPrefixCls,
|
|
@@ -82,6 +82,10 @@ var InternalTreeSelect = function InternalTreeSelect(_ref, ref) {
|
|
|
82
82
|
virtual = _React$useContext.virtual,
|
|
83
83
|
contextPopupMatchSelectWidth = _React$useContext.popupMatchSelectWidth,
|
|
84
84
|
popupOverflow = _React$useContext.popupOverflow;
|
|
85
|
+
var _useToken = useToken(),
|
|
86
|
+
_useToken2 = _slicedToArray(_useToken, 2),
|
|
87
|
+
token = _useToken2[1];
|
|
88
|
+
var listItemHeight = customListItemHeight !== null && customListItemHeight !== void 0 ? customListItemHeight : (token === null || token === void 0 ? void 0 : token.controlHeightSM) + (token === null || token === void 0 ? void 0 : token.paddingXXS);
|
|
85
89
|
if (process.env.NODE_ENV !== 'production') {
|
|
86
90
|
var warning = devUseWarning('TreeSelect');
|
|
87
91
|
warning(multiple !== false || !treeCheckable, 'usage', '`multiple` will always be `true` when `treeCheckable` is true');
|
|
@@ -107,14 +111,14 @@ var InternalTreeSelect = function InternalTreeSelect(_ref, ref) {
|
|
|
107
111
|
var _useStyle = useStyle(treeSelectPrefixCls, treePrefixCls, treeSelectRootCls),
|
|
108
112
|
_useStyle2 = _slicedToArray(_useStyle, 1),
|
|
109
113
|
treeSelectWrapCSSVar = _useStyle2[0];
|
|
110
|
-
var _useVariant = useVariant(customVariant, bordered),
|
|
114
|
+
var _useVariant = useVariant('treeSelect', customVariant, bordered),
|
|
111
115
|
_useVariant2 = _slicedToArray(_useVariant, 2),
|
|
112
116
|
variant = _useVariant2[0],
|
|
113
117
|
enableVariantCls = _useVariant2[1];
|
|
114
118
|
var mergedDropdownClassName = classNames(popupClassName || dropdownClassName, "".concat(treeSelectPrefixCls, "-dropdown"), _defineProperty({}, "".concat(treeSelectPrefixCls, "-dropdown-rtl"), direction === 'rtl'), rootClassName, cssVarCls, rootCls, treeSelectRootCls, hashId);
|
|
115
119
|
var isMultiple = !!(treeCheckable || multiple);
|
|
116
120
|
var showSuffixIcon = useShowArrow(props.suffixIcon, props.showArrow);
|
|
117
|
-
var mergedPopupMatchSelectWidth = (
|
|
121
|
+
var mergedPopupMatchSelectWidth = (_ref = popupMatchSelectWidth !== null && popupMatchSelectWidth !== void 0 ? popupMatchSelectWidth : dropdownMatchSelectWidth) !== null && _ref !== void 0 ? _ref : contextPopupMatchSelectWidth;
|
|
118
122
|
// ===================== Form =====================
|
|
119
123
|
var _React$useContext2 = React.useContext(FormItemInputContext),
|
|
120
124
|
contextStatus = _React$useContext2.status,
|
|
@@ -123,7 +127,7 @@ var InternalTreeSelect = function InternalTreeSelect(_ref, ref) {
|
|
|
123
127
|
feedbackIcon = _React$useContext2.feedbackIcon;
|
|
124
128
|
var mergedStatus = getMergedStatus(contextStatus, customStatus);
|
|
125
129
|
// ===================== Icons =====================
|
|
126
|
-
var _useIcons = useIcons(_objectSpread(_objectSpread({},
|
|
130
|
+
var _useIcons = useIcons(_objectSpread(_objectSpread({}, restProps), {}, {
|
|
127
131
|
multiple: isMultiple,
|
|
128
132
|
showSuffixIcon: showSuffixIcon,
|
|
129
133
|
hasFeedback: hasFeedback,
|
|
@@ -147,7 +151,7 @@ var InternalTreeSelect = function InternalTreeSelect(_ref, ref) {
|
|
|
147
151
|
});
|
|
148
152
|
}
|
|
149
153
|
// ==================== Render =====================
|
|
150
|
-
var selectProps = omit(
|
|
154
|
+
var selectProps = omit(restProps, ['suffixIcon', 'removeIcon', 'clearIcon', 'itemIcon', 'switcherIcon']);
|
|
151
155
|
// ===================== Placement =====================
|
|
152
156
|
var memoizedPlacement = React.useMemo(function () {
|
|
153
157
|
if (placement !== undefined) {
|
|
@@ -156,8 +160,8 @@ var InternalTreeSelect = function InternalTreeSelect(_ref, ref) {
|
|
|
156
160
|
return direction === 'rtl' ? 'bottomRight' : 'bottomLeft';
|
|
157
161
|
}, [placement, direction]);
|
|
158
162
|
var mergedSize = useSize(function (ctx) {
|
|
159
|
-
var
|
|
160
|
-
return (
|
|
163
|
+
var _ref2;
|
|
164
|
+
return (_ref2 = customizeSize !== null && customizeSize !== void 0 ? customizeSize : compactSize) !== null && _ref2 !== void 0 ? _ref2 : ctx;
|
|
161
165
|
});
|
|
162
166
|
// ===================== Disabled =====================
|
|
163
167
|
var disabled = React.useContext(DisabledContext);
|