@chaoswise/ui 3.0.23 → 3.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/Antd5/_util/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 +4 -2
- 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 +1 -1
- 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 +44 -10
- package/lib/Antd5/checkbox/Group.js +7 -2
- package/lib/Antd5/checkbox/assets/duigou1.js +29 -0
- package/lib/Antd5/checkbox/assets/duigou2.js +29 -0
- package/lib/Antd5/checkbox/style/index.js +112 -6
- 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/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/radio/radio.js +4 -10
- package/lib/Antd5/radio/style/index.js +65 -80
- 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/typography/hooks/useTooltipProps.js +30 -0
- package/lib/Antd5/typography/style/mixins.js +3 -9
- 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/AppHolder/index.js +2 -1
- 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 +11 -10
- package/lib/ConfigProvider/customTheme.js +6 -0
- package/lib/ConfigProvider/theme/common.js +140 -0
- package/lib/ConfigProvider/theme/dark.js +2 -0
- package/lib/ConfigProvider/theme/default.js +122 -0
- package/lib/ConfigProvider/theme/utils.js +49 -0
- package/lib/Header/UserSetting/TenantTree.js +0 -1
- package/lib/Pagination/index.style.js +1 -1
- package/lib/QuickTransfer/index.js +45 -59
- package/lib/SiderMenu/index.style.js +4 -2
- package/lib/Slider/index.style.js +2 -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
|
@@ -24,13 +24,13 @@ import Tooltip from '../../tooltip';
|
|
|
24
24
|
import { getColumnKey, getColumnPos, renderColumnTitle, safeColumnTitle } from '../util';
|
|
25
25
|
var ASCEND = 'ascend';
|
|
26
26
|
var DESCEND = 'descend';
|
|
27
|
-
function getMultiplePriority(column) {
|
|
27
|
+
var getMultiplePriority = function getMultiplePriority(column) {
|
|
28
28
|
if (_typeof(column.sorter) === 'object' && typeof column.sorter.multiple === 'number') {
|
|
29
29
|
return column.sorter.multiple;
|
|
30
30
|
}
|
|
31
31
|
return false;
|
|
32
|
-
}
|
|
33
|
-
function getSortFunction(sorter) {
|
|
32
|
+
};
|
|
33
|
+
var getSortFunction = function getSortFunction(sorter) {
|
|
34
34
|
if (typeof sorter === 'function') {
|
|
35
35
|
return sorter;
|
|
36
36
|
}
|
|
@@ -38,23 +38,23 @@ function getSortFunction(sorter) {
|
|
|
38
38
|
return sorter.compare;
|
|
39
39
|
}
|
|
40
40
|
return false;
|
|
41
|
-
}
|
|
42
|
-
function nextSortDirection(sortDirections, current) {
|
|
41
|
+
};
|
|
42
|
+
var nextSortDirection = function nextSortDirection(sortDirections, current) {
|
|
43
43
|
if (!current) {
|
|
44
44
|
return sortDirections[0];
|
|
45
45
|
}
|
|
46
46
|
return sortDirections[sortDirections.indexOf(current) + 1];
|
|
47
|
-
}
|
|
48
|
-
function collectSortStates(columns, init, pos) {
|
|
47
|
+
};
|
|
48
|
+
var _collectSortStates = function collectSortStates(columns, init, pos) {
|
|
49
49
|
var sortStates = [];
|
|
50
|
-
function pushState(column, columnPos) {
|
|
50
|
+
var pushState = function pushState(column, columnPos) {
|
|
51
51
|
sortStates.push({
|
|
52
52
|
column: column,
|
|
53
53
|
key: getColumnKey(column, columnPos),
|
|
54
54
|
multiplePriority: getMultiplePriority(column),
|
|
55
55
|
sortOrder: column.sortOrder
|
|
56
56
|
});
|
|
57
|
-
}
|
|
57
|
+
};
|
|
58
58
|
(columns || []).forEach(function (column, index) {
|
|
59
59
|
var columnPos = getColumnPos(index, pos);
|
|
60
60
|
if (column.children) {
|
|
@@ -62,7 +62,7 @@ function collectSortStates(columns, init, pos) {
|
|
|
62
62
|
// Controlled
|
|
63
63
|
pushState(column, columnPos);
|
|
64
64
|
}
|
|
65
|
-
sortStates = [].concat(_toConsumableArray(sortStates), _toConsumableArray(
|
|
65
|
+
sortStates = [].concat(_toConsumableArray(sortStates), _toConsumableArray(_collectSortStates(column.children, init, columnPos)));
|
|
66
66
|
} else if (column.sorter) {
|
|
67
67
|
if ('sortOrder' in column) {
|
|
68
68
|
// Controlled
|
|
@@ -79,9 +79,9 @@ function collectSortStates(columns, init, pos) {
|
|
|
79
79
|
}
|
|
80
80
|
});
|
|
81
81
|
return sortStates;
|
|
82
|
-
}
|
|
83
|
-
function injectSorter(prefixCls, columns, sorterStates, triggerSorter, defaultSortDirections, tableLocale, tableShowSorterTooltip, pos) {
|
|
84
|
-
|
|
82
|
+
};
|
|
83
|
+
var _injectSorter = function injectSorter(prefixCls, columns, sorterStates, triggerSorter, defaultSortDirections, tableLocale, tableShowSorterTooltip, pos) {
|
|
84
|
+
var finalColumns = (columns || []).map(function (column, index) {
|
|
85
85
|
var columnPos = getColumnPos(index, pos);
|
|
86
86
|
var newColumn = column;
|
|
87
87
|
if (newColumn.sorter) {
|
|
@@ -162,7 +162,8 @@ function injectSorter(prefixCls, columns, sorterStates, triggerSorter, defaultSo
|
|
|
162
162
|
return renderSortTitle;
|
|
163
163
|
},
|
|
164
164
|
onHeaderCell: function onHeaderCell(col) {
|
|
165
|
-
var
|
|
165
|
+
var _column$onHeaderCell;
|
|
166
|
+
var cell = ((_column$onHeaderCell = column.onHeaderCell) === null || _column$onHeaderCell === void 0 ? void 0 : _column$onHeaderCell.call(column, col)) || {};
|
|
166
167
|
var originOnClick = cell.onClick;
|
|
167
168
|
var originOKeyDown = cell.onKeyDown;
|
|
168
169
|
cell.onClick = function (event) {
|
|
@@ -204,15 +205,16 @@ function injectSorter(prefixCls, columns, sorterStates, triggerSorter, defaultSo
|
|
|
204
205
|
}
|
|
205
206
|
if ('children' in newColumn) {
|
|
206
207
|
newColumn = _objectSpread(_objectSpread({}, newColumn), {}, {
|
|
207
|
-
children:
|
|
208
|
+
children: _injectSorter(prefixCls, newColumn.children, sorterStates, triggerSorter, defaultSortDirections, tableLocale, tableShowSorterTooltip, columnPos)
|
|
208
209
|
});
|
|
209
210
|
}
|
|
210
211
|
return newColumn;
|
|
211
212
|
});
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
213
|
+
return finalColumns;
|
|
214
|
+
};
|
|
215
|
+
var stateToInfo = function stateToInfo(sorterState) {
|
|
216
|
+
var column = sorterState.column,
|
|
217
|
+
sortOrder = sorterState.sortOrder;
|
|
216
218
|
return {
|
|
217
219
|
column: column,
|
|
218
220
|
order: sortOrder,
|
|
@@ -221,24 +223,27 @@ var stateToInfo = function stateToInfo(sorterStates) {
|
|
|
221
223
|
};
|
|
222
224
|
};
|
|
223
225
|
var generateSorterInfo = function generateSorterInfo(sorterStates) {
|
|
224
|
-
var
|
|
226
|
+
var activeSorters = sorterStates.filter(function (_ref3) {
|
|
225
227
|
var sortOrder = _ref3.sortOrder;
|
|
226
228
|
return sortOrder;
|
|
227
229
|
}).map(stateToInfo);
|
|
228
230
|
// =========== Legacy compatible support ===========
|
|
229
231
|
// https://github.com/ant-design/ant-design/pull/19226
|
|
230
|
-
if (
|
|
232
|
+
if (activeSorters.length === 0 && sorterStates.length) {
|
|
231
233
|
var lastIndex = sorterStates.length - 1;
|
|
232
234
|
return _objectSpread(_objectSpread({}, stateToInfo(sorterStates[lastIndex])), {}, {
|
|
233
|
-
column: undefined
|
|
235
|
+
column: undefined,
|
|
236
|
+
order: undefined,
|
|
237
|
+
field: undefined,
|
|
238
|
+
columnKey: undefined
|
|
234
239
|
});
|
|
235
240
|
}
|
|
236
|
-
if (
|
|
237
|
-
return
|
|
241
|
+
if (activeSorters.length <= 1) {
|
|
242
|
+
return activeSorters[0] || {};
|
|
238
243
|
}
|
|
239
|
-
return
|
|
244
|
+
return activeSorters;
|
|
240
245
|
};
|
|
241
|
-
|
|
246
|
+
var _getSortData = function getSortData(data, sortStates, childrenColumnName) {
|
|
242
247
|
var innerSorterStates = sortStates.slice().sort(function (a, b) {
|
|
243
248
|
return b.multiplePriority - a.multiplePriority;
|
|
244
249
|
});
|
|
@@ -269,28 +274,45 @@ export function getSortData(data, sortStates, childrenColumnName) {
|
|
|
269
274
|
}).map(function (record) {
|
|
270
275
|
var subRecords = record[childrenColumnName];
|
|
271
276
|
if (subRecords) {
|
|
272
|
-
return _objectSpread(_objectSpread({}, record), {}, _defineProperty({}, childrenColumnName,
|
|
277
|
+
return _objectSpread(_objectSpread({}, record), {}, _defineProperty({}, childrenColumnName, _getSortData(subRecords, sortStates, childrenColumnName)));
|
|
273
278
|
}
|
|
274
279
|
return record;
|
|
275
280
|
});
|
|
276
|
-
}
|
|
277
|
-
export
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
sortDirections =
|
|
282
|
-
tableLocale =
|
|
283
|
-
showSorterTooltip =
|
|
284
|
-
|
|
281
|
+
};
|
|
282
|
+
export { _getSortData as getSortData };
|
|
283
|
+
var useFilterSorter = function useFilterSorter(props) {
|
|
284
|
+
var prefixCls = props.prefixCls,
|
|
285
|
+
mergedColumns = props.mergedColumns,
|
|
286
|
+
sortDirections = props.sortDirections,
|
|
287
|
+
tableLocale = props.tableLocale,
|
|
288
|
+
showSorterTooltip = props.showSorterTooltip,
|
|
289
|
+
onSorterChange = props.onSorterChange;
|
|
290
|
+
var _React$useState = React.useState(_collectSortStates(mergedColumns, true)),
|
|
285
291
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
286
292
|
sortStates = _React$useState2[0],
|
|
287
293
|
setSortStates = _React$useState2[1];
|
|
294
|
+
var _getColumnKeys = function getColumnKeys(columns, pos) {
|
|
295
|
+
var newKeys = [];
|
|
296
|
+
columns.forEach(function (item, index) {
|
|
297
|
+
var columnPos = getColumnPos(index, pos);
|
|
298
|
+
newKeys.push(getColumnKey(item, columnPos));
|
|
299
|
+
if (Array.isArray(item.children)) {
|
|
300
|
+
var childKeys = _getColumnKeys(item.children, columnPos);
|
|
301
|
+
newKeys.push.apply(newKeys, _toConsumableArray(childKeys));
|
|
302
|
+
}
|
|
303
|
+
});
|
|
304
|
+
return newKeys;
|
|
305
|
+
};
|
|
288
306
|
var mergedSorterStates = React.useMemo(function () {
|
|
289
307
|
var validate = true;
|
|
290
|
-
var collectedStates =
|
|
308
|
+
var collectedStates = _collectSortStates(mergedColumns, false);
|
|
291
309
|
// Return if not controlled
|
|
292
310
|
if (!collectedStates.length) {
|
|
293
|
-
|
|
311
|
+
var mergedColumnsKeys = _getColumnKeys(mergedColumns);
|
|
312
|
+
return sortStates.filter(function (_ref5) {
|
|
313
|
+
var key = _ref5.key;
|
|
314
|
+
return mergedColumnsKeys.includes(key);
|
|
315
|
+
});
|
|
294
316
|
}
|
|
295
317
|
var validateStates = [];
|
|
296
318
|
function patchStates(state) {
|
|
@@ -324,6 +346,7 @@ export default function useFilterSorter(_ref5) {
|
|
|
324
346
|
}, [mergedColumns, sortStates]);
|
|
325
347
|
// Get render columns title required props
|
|
326
348
|
var columnTitleSorterProps = React.useMemo(function () {
|
|
349
|
+
var _sortColumns$, _sortColumns$2;
|
|
327
350
|
var sortColumns = mergedSorterStates.map(function (_ref6) {
|
|
328
351
|
var column = _ref6.column,
|
|
329
352
|
sortOrder = _ref6.sortOrder;
|
|
@@ -335,8 +358,8 @@ export default function useFilterSorter(_ref5) {
|
|
|
335
358
|
return {
|
|
336
359
|
sortColumns: sortColumns,
|
|
337
360
|
// Legacy
|
|
338
|
-
sortColumn: sortColumns[0]
|
|
339
|
-
sortOrder: sortColumns[0]
|
|
361
|
+
sortColumn: (_sortColumns$ = sortColumns[0]) === null || _sortColumns$ === void 0 ? void 0 : _sortColumns$.column,
|
|
362
|
+
sortOrder: (_sortColumns$2 = sortColumns[0]) === null || _sortColumns$2 === void 0 ? void 0 : _sortColumns$2.order
|
|
340
363
|
};
|
|
341
364
|
}, [mergedSorterStates]);
|
|
342
365
|
var triggerSorter = function triggerSorter(sortState) {
|
|
@@ -353,10 +376,11 @@ export default function useFilterSorter(_ref5) {
|
|
|
353
376
|
onSorterChange(generateSorterInfo(newSorterStates), newSorterStates);
|
|
354
377
|
};
|
|
355
378
|
var transformColumns = function transformColumns(innerColumns) {
|
|
356
|
-
return
|
|
379
|
+
return _injectSorter(prefixCls, innerColumns, mergedSorterStates, triggerSorter, sortDirections, tableLocale, showSorterTooltip);
|
|
357
380
|
};
|
|
358
381
|
var getSorters = function getSorters() {
|
|
359
382
|
return generateSorterInfo(mergedSorterStates);
|
|
360
383
|
};
|
|
361
384
|
return [transformColumns, mergedSorterStates, columnTitleSorterProps, getSorters];
|
|
362
|
-
}
|
|
385
|
+
};
|
|
386
|
+
export default useFilterSorter;
|
|
@@ -6,19 +6,21 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
|
|
|
6
6
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
7
|
import * as React from 'react';
|
|
8
8
|
import { renderColumnTitle } from '../util';
|
|
9
|
-
function fillTitle(columns, columnTitleProps) {
|
|
10
|
-
|
|
9
|
+
var _fillTitle = function fillTitle(columns, columnTitleProps) {
|
|
10
|
+
var finalColumns = columns.map(function (column) {
|
|
11
11
|
var cloneColumn = _objectSpread({}, column);
|
|
12
12
|
cloneColumn.title = renderColumnTitle(column.title, columnTitleProps);
|
|
13
13
|
if ('children' in cloneColumn) {
|
|
14
|
-
cloneColumn.children =
|
|
14
|
+
cloneColumn.children = _fillTitle(cloneColumn.children, columnTitleProps);
|
|
15
15
|
}
|
|
16
16
|
return cloneColumn;
|
|
17
17
|
});
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
return finalColumns;
|
|
19
|
+
};
|
|
20
|
+
var useTitleColumns = function useTitleColumns(columnTitleProps) {
|
|
20
21
|
var filledColumns = React.useCallback(function (columns) {
|
|
21
|
-
return
|
|
22
|
+
return _fillTitle(columns, columnTitleProps);
|
|
22
23
|
}, [columnTitleProps]);
|
|
23
24
|
return [filledColumns];
|
|
24
|
-
}
|
|
25
|
+
};
|
|
26
|
+
export default useTitleColumns;
|
|
@@ -50,9 +50,11 @@ var genBorderedStyle = function genBorderedStyle(token) {
|
|
|
50
50
|
}
|
|
51
51
|
}))
|
|
52
52
|
})), "&".concat(componentCls, "-scroll-horizontal"), _defineProperty({}, "> ".concat(componentCls, "-container > ").concat(componentCls, "-body"), {
|
|
53
|
-
'> table > tbody': _defineProperty({}, "\n > tr".concat(componentCls, "-expanded-row,\n > tr").concat(componentCls, "-placeholder\n "),
|
|
54
|
-
|
|
55
|
-
|
|
53
|
+
'> table > tbody': _defineProperty({}, "\n > tr".concat(componentCls, "-expanded-row,\n > tr").concat(componentCls, "-placeholder\n "), {
|
|
54
|
+
'> th, > td': {
|
|
55
|
+
borderInlineEnd: 0
|
|
56
|
+
}
|
|
57
|
+
})
|
|
56
58
|
})), getSizeBorderStyle('middle', token.tablePaddingVerticalMiddle, token.tablePaddingHorizontalMiddle)), getSizeBorderStyle('small', token.tablePaddingVerticalSmall, token.tablePaddingHorizontalSmall)), {}, _defineProperty({}, "> ".concat(componentCls, "-footer"), {
|
|
57
59
|
border: tableBorder,
|
|
58
60
|
borderTop: 0
|
|
@@ -39,63 +39,69 @@ var genExpandStyle = function genExpandStyle(token) {
|
|
|
39
39
|
})), "".concat(componentCls, "-row-indent"), {
|
|
40
40
|
height: 1,
|
|
41
41
|
"float": 'left'
|
|
42
|
-
}), "".concat(componentCls, "-row-expand-icon"), _objectSpread(_objectSpread({}, operationUnit(token)), {},
|
|
42
|
+
}), "".concat(componentCls, "-row-expand-icon"), _objectSpread(_objectSpread({}, operationUnit(token)), {}, {
|
|
43
43
|
position: 'relative',
|
|
44
44
|
"float": 'left',
|
|
45
|
-
boxSizing: 'border-box',
|
|
46
45
|
width: expandIconSize,
|
|
47
46
|
height: expandIconSize,
|
|
48
|
-
padding: 0,
|
|
49
47
|
color: 'inherit',
|
|
50
48
|
lineHeight: unit(expandIconSize),
|
|
51
49
|
background: tableExpandIconBg,
|
|
52
50
|
border: tableBorder,
|
|
53
51
|
borderRadius: borderRadius,
|
|
54
52
|
transform: "scale(".concat(expandIconScale, ")"),
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
borderColor: 'currentcolor'
|
|
59
|
-
}), "&::before, &::after", {
|
|
60
|
-
position: 'absolute',
|
|
61
|
-
background: 'currentcolor',
|
|
62
|
-
transition: "transform ".concat(motionDurationSlow, " ease-out"),
|
|
63
|
-
content: '""'
|
|
64
|
-
}), '&::before', {
|
|
65
|
-
top: expandIconHalfInner,
|
|
66
|
-
insetInlineEnd: expandIconLineOffset,
|
|
67
|
-
insetInlineStart: expandIconLineOffset,
|
|
68
|
-
height: lineWidth
|
|
69
|
-
}), '&::after', {
|
|
70
|
-
top: expandIconLineOffset,
|
|
71
|
-
bottom: expandIconLineOffset,
|
|
72
|
-
insetInlineStart: expandIconHalfInner,
|
|
73
|
-
width: lineWidth,
|
|
74
|
-
transform: 'rotate(90deg)'
|
|
75
|
-
}), '&-collapsed::before', {
|
|
76
|
-
transform: 'rotate(-180deg)'
|
|
77
|
-
}), '&-collapsed::after', {
|
|
78
|
-
transform: 'rotate(0deg)'
|
|
79
|
-
}), '&-spaced', {
|
|
53
|
+
'&:focus, &:hover, &:active': {
|
|
54
|
+
borderColor: 'currentcolor'
|
|
55
|
+
},
|
|
80
56
|
'&::before, &::after': {
|
|
81
|
-
|
|
82
|
-
|
|
57
|
+
position: 'absolute',
|
|
58
|
+
background: 'currentcolor',
|
|
59
|
+
transition: "transform ".concat(motionDurationSlow, " ease-out"),
|
|
60
|
+
content: '""'
|
|
61
|
+
},
|
|
62
|
+
'&::before': {
|
|
63
|
+
top: expandIconHalfInner,
|
|
64
|
+
insetInlineEnd: expandIconLineOffset,
|
|
65
|
+
insetInlineStart: expandIconLineOffset,
|
|
66
|
+
height: lineWidth
|
|
67
|
+
},
|
|
68
|
+
'&::after': {
|
|
69
|
+
top: expandIconLineOffset,
|
|
70
|
+
bottom: expandIconLineOffset,
|
|
71
|
+
insetInlineStart: expandIconHalfInner,
|
|
72
|
+
width: lineWidth,
|
|
73
|
+
transform: 'rotate(90deg)'
|
|
74
|
+
},
|
|
75
|
+
// Motion effect
|
|
76
|
+
'&-collapsed::before': {
|
|
77
|
+
transform: 'rotate(-180deg)'
|
|
83
78
|
},
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
79
|
+
'&-collapsed::after': {
|
|
80
|
+
transform: 'rotate(0deg)'
|
|
81
|
+
},
|
|
82
|
+
'&-spaced': {
|
|
83
|
+
'&::before, &::after': {
|
|
84
|
+
display: 'none',
|
|
85
|
+
content: 'none'
|
|
86
|
+
},
|
|
87
|
+
background: 'transparent',
|
|
88
|
+
border: 0,
|
|
89
|
+
visibility: 'hidden'
|
|
90
|
+
}
|
|
91
|
+
})), "".concat(componentCls, "-row-indent + ").concat(componentCls, "-row-expand-icon"), {
|
|
88
92
|
marginTop: expandIconMarginTop,
|
|
89
93
|
marginInlineEnd: paddingXS
|
|
90
94
|
}), "tr".concat(componentCls, "-expanded-row"), _defineProperty({
|
|
91
|
-
'&, &:hover':
|
|
92
|
-
|
|
93
|
-
|
|
95
|
+
'&, &:hover': {
|
|
96
|
+
'> th, > td': {
|
|
97
|
+
background: tableExpandedRowBg
|
|
98
|
+
}
|
|
99
|
+
}
|
|
94
100
|
}, "".concat(antCls, "-descriptions-view"), {
|
|
95
101
|
display: 'flex',
|
|
96
102
|
table: {
|
|
97
103
|
flex: 'auto',
|
|
98
|
-
width: '
|
|
104
|
+
width: '100%'
|
|
99
105
|
}
|
|
100
106
|
})), "".concat(componentCls, "-expanded-row-fixed"), {
|
|
101
107
|
position: 'relative',
|
|
@@ -118,7 +118,7 @@ var genFilterStyle = function genFilterStyle(token) {
|
|
|
118
118
|
_defineProperty({}, "".concat(antCls, "-dropdown ").concat(tableFilterDropdownPrefixCls, ", ").concat(tableFilterDropdownPrefixCls, "-submenu"), _defineProperty(_defineProperty({}, "".concat(antCls, "-checkbox-wrapper + span"), {
|
|
119
119
|
paddingInlineStart: paddingXS,
|
|
120
120
|
color: colorText
|
|
121
|
-
}),
|
|
121
|
+
}), '> ul', {
|
|
122
122
|
maxHeight: 'calc(100vh - 130px)',
|
|
123
123
|
overflowX: 'hidden',
|
|
124
124
|
overflowY: 'auto'
|
|
@@ -88,26 +88,29 @@ var genTableStyle = function genTableStyle(token) {
|
|
|
88
88
|
})), '> tr:not(:last-child) > th[colspan]', {
|
|
89
89
|
borderBottom: 0
|
|
90
90
|
})), "".concat(componentCls, "-tbody"), {
|
|
91
|
-
'> tr':
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
91
|
+
'> tr': {
|
|
92
|
+
'> th, > td': _defineProperty({
|
|
93
|
+
transition: "background ".concat(motionDurationMid, ", border-color ").concat(motionDurationMid),
|
|
94
|
+
borderBottom: tableBorder
|
|
95
|
+
}, "\n > ".concat(componentCls, "-wrapper:only-child,\n > ").concat(componentCls, "-expanded-row-fixed > ").concat(componentCls, "-wrapper:only-child\n "), _defineProperty({}, componentCls, _defineProperty({
|
|
96
|
+
marginBlock: unit(calc(tablePaddingVertical).mul(-1).equal()),
|
|
97
|
+
marginInline: "".concat(unit(calc(tableExpandColumnWidth).sub(tablePaddingHorizontal).equal()), "\n ").concat(unit(calc(tablePaddingHorizontal).mul(-1).equal()))
|
|
98
|
+
}, "".concat(componentCls, "-tbody > tr:last-child > td"), {
|
|
99
|
+
borderBottom: 0,
|
|
100
|
+
'&:first-child, &:last-child': {
|
|
101
|
+
borderRadius: 0
|
|
102
|
+
}
|
|
103
|
+
}))),
|
|
104
|
+
'> th': {
|
|
105
|
+
position: 'relative',
|
|
106
|
+
color: tableHeaderTextColor,
|
|
107
|
+
fontWeight: fontWeightStrong,
|
|
108
|
+
textAlign: 'start',
|
|
109
|
+
background: tableHeaderBg,
|
|
110
|
+
borderBottom: tableBorder,
|
|
111
|
+
transition: "background ".concat(motionDurationMid, " ease")
|
|
101
112
|
}
|
|
102
|
-
}
|
|
103
|
-
position: 'relative',
|
|
104
|
-
color: tableHeaderTextColor,
|
|
105
|
-
fontWeight: fontWeightStrong,
|
|
106
|
-
textAlign: 'start',
|
|
107
|
-
background: tableHeaderBg,
|
|
108
|
-
borderBottom: tableBorder,
|
|
109
|
-
transition: "background ".concat(motionDurationMid, " ease")
|
|
110
|
-
})
|
|
113
|
+
}
|
|
111
114
|
}), "".concat(componentCls, "-footer"), {
|
|
112
115
|
padding: "".concat(unit(tablePaddingVertical), " ").concat(unit(tablePaddingHorizontal)),
|
|
113
116
|
color: tableFooterTextColor,
|
|
@@ -184,6 +187,7 @@ export var prepareComponentToken = function prepareComponentToken(token) {
|
|
|
184
187
|
expandIconScale: controlInteractiveSize / expandIconSize
|
|
185
188
|
};
|
|
186
189
|
};
|
|
190
|
+
var zIndexTableFixed = 2;
|
|
187
191
|
// ============================== Export ==============================
|
|
188
192
|
export default genStyleHooks('Table', function (token) {
|
|
189
193
|
var colorTextHeading = token.colorTextHeading,
|
|
@@ -220,7 +224,6 @@ export default genStyleHooks('Table', function (token) {
|
|
|
220
224
|
selectionColumnWidth = token.selectionColumnWidth,
|
|
221
225
|
stickyScrollBarBg = token.stickyScrollBarBg,
|
|
222
226
|
calc = token.calc;
|
|
223
|
-
var zIndexTableFixed = 2;
|
|
224
227
|
var tableToken = mergeToken(token, {
|
|
225
228
|
tableFontSize: cellFontSize,
|
|
226
229
|
tableBg: colorBgContainer,
|
|
@@ -247,7 +250,9 @@ export default genStyleHooks('Table', function (token) {
|
|
|
247
250
|
tableSelectedRowBg: rowSelectedBg,
|
|
248
251
|
tableSelectedRowHoverBg: rowSelectedHoverBg,
|
|
249
252
|
zIndexTableFixed: zIndexTableFixed,
|
|
250
|
-
zIndexTableSticky: zIndexTableFixed
|
|
253
|
+
zIndexTableSticky: calc(zIndexTableFixed).add(1).equal({
|
|
254
|
+
unit: false
|
|
255
|
+
}),
|
|
251
256
|
tableFontSizeMiddle: cellFontSizeMD,
|
|
252
257
|
tableFontSizeSmall: cellFontSizeSM,
|
|
253
258
|
tableSelectionColumnWidth: selectionColumnWidth,
|
|
@@ -33,7 +33,9 @@ var genSelectionStyle = function genSelectionStyle(token) {
|
|
|
33
33
|
}, "".concat(antCls, "-radio-wrapper"), {
|
|
34
34
|
marginInlineEnd: 0
|
|
35
35
|
})), "table tr th".concat(componentCls, "-selection-column").concat(componentCls, "-cell-fix-left"), {
|
|
36
|
-
zIndex: token.zIndexTableFixed
|
|
36
|
+
zIndex: calc(token.zIndexTableFixed).add(1).equal({
|
|
37
|
+
unit: false
|
|
38
|
+
})
|
|
37
39
|
}), "table tr th".concat(componentCls, "-selection-column::after"), {
|
|
38
40
|
backgroundColor: 'transparent !important'
|
|
39
41
|
}), "".concat(componentCls, "-selection"), {
|
|
@@ -11,7 +11,9 @@ var genSorterStyle = function genSorterStyle(token) {
|
|
|
11
11
|
return _defineProperty({}, "".concat(componentCls, "-wrapper"), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(componentCls, "-thead th").concat(componentCls, "-column-has-sorters"), _defineProperty({
|
|
12
12
|
outline: 'none',
|
|
13
13
|
cursor: 'pointer',
|
|
14
|
-
transition
|
|
14
|
+
// why left 0s? Avoid column header move with transition when left is changed
|
|
15
|
+
// https://github.com/ant-design/ant-design/issues/50588
|
|
16
|
+
transition: "all ".concat(token.motionDurationSlow, ", left 0s"),
|
|
15
17
|
'&:hover': {
|
|
16
18
|
background: token.tableHeaderSortHoverBg,
|
|
17
19
|
'&::before': {
|
|
@@ -12,11 +12,11 @@ var genVirtualStyle = function genVirtualStyle(token) {
|
|
|
12
12
|
calc = token.calc;
|
|
13
13
|
var tableBorder = "".concat(unit(lineWidth), " ").concat(lineType, " ").concat(tableBorderColor);
|
|
14
14
|
var rowCellCls = "".concat(componentCls, "-expanded-row-cell");
|
|
15
|
-
return _defineProperty({}, "".concat(componentCls, "-wrapper"), _defineProperty(_defineProperty({}, "".concat(componentCls, "-tbody-virtual"), _defineProperty(_defineProperty(_defineProperty({}, "".concat(componentCls, "-row:not(
|
|
15
|
+
return _defineProperty({}, "".concat(componentCls, "-wrapper"), _defineProperty(_defineProperty({}, "".concat(componentCls, "-tbody-virtual"), _defineProperty(_defineProperty(_defineProperty({}, "".concat(componentCls, "-tbody-virtual-holder-inner"), _defineProperty({}, "\n & > ".concat(componentCls, "-row, \n & > div:not(").concat(componentCls, "-row) > ").concat(componentCls, "-row\n "), {
|
|
16
16
|
display: 'flex',
|
|
17
17
|
boxSizing: 'border-box',
|
|
18
18
|
width: '100%'
|
|
19
|
-
}), "".concat(componentCls, "-cell"), {
|
|
19
|
+
})), "".concat(componentCls, "-cell"), {
|
|
20
20
|
borderBottom: tableBorder,
|
|
21
21
|
transition: "background ".concat(motionDurationMid)
|
|
22
22
|
}), "".concat(componentCls, "-expanded-row"), _defineProperty({}, "".concat(rowCellCls).concat(rowCellCls, "-fixed"), {
|
package/lib/Antd5/table/util.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export function getColumnKey(column, defaultKey) {
|
|
1
|
+
export var getColumnKey = function getColumnKey(column, defaultKey) {
|
|
2
2
|
if ('key' in column && column.key !== undefined && column.key !== null) {
|
|
3
3
|
return column.key;
|
|
4
4
|
}
|
|
@@ -6,26 +6,27 @@ export function getColumnKey(column, defaultKey) {
|
|
|
6
6
|
return Array.isArray(column.dataIndex) ? column.dataIndex.join('.') : column.dataIndex;
|
|
7
7
|
}
|
|
8
8
|
return defaultKey;
|
|
9
|
-
}
|
|
9
|
+
};
|
|
10
10
|
export function getColumnPos(index, pos) {
|
|
11
11
|
return pos ? "".concat(pos, "-").concat(index) : "".concat(index);
|
|
12
12
|
}
|
|
13
|
-
export function renderColumnTitle(title, props) {
|
|
13
|
+
export var renderColumnTitle = function renderColumnTitle(title, props) {
|
|
14
14
|
if (typeof title === 'function') {
|
|
15
15
|
return title(props);
|
|
16
16
|
}
|
|
17
17
|
return title;
|
|
18
|
-
}
|
|
18
|
+
};
|
|
19
19
|
/**
|
|
20
20
|
* Safe get column title
|
|
21
21
|
*
|
|
22
22
|
* Should filter [object Object]
|
|
23
23
|
*
|
|
24
24
|
* @param title
|
|
25
|
-
* @returns
|
|
26
25
|
*/
|
|
27
|
-
export function safeColumnTitle(title, props) {
|
|
26
|
+
export var safeColumnTitle = function safeColumnTitle(title, props) {
|
|
28
27
|
var res = renderColumnTitle(title, props);
|
|
29
|
-
if (Object.prototype.toString.call(res) === '[object Object]')
|
|
28
|
+
if (Object.prototype.toString.call(res) === '[object Object]') {
|
|
29
|
+
return '';
|
|
30
|
+
}
|
|
30
31
|
return res;
|
|
31
|
-
}
|
|
32
|
+
};
|
|
@@ -581,8 +581,8 @@ var genTabsStyle = function genTabsStyle(token) {
|
|
|
581
581
|
'&-hidden': {
|
|
582
582
|
display: 'none'
|
|
583
583
|
}
|
|
584
|
-
}))), "".concat(componentCls, "-centered"), _defineProperty({}, "> ".concat(componentCls, "-nav, > div > ").concat(componentCls, "-nav"), _defineProperty({}, "".concat(componentCls, "-nav-wrap"), _defineProperty({}, "&:not([class*='".concat(componentCls, "-nav-wrap-ping'])"), {
|
|
585
|
-
|
|
584
|
+
}))), "".concat(componentCls, "-centered"), _defineProperty({}, "> ".concat(componentCls, "-nav, > div > ").concat(componentCls, "-nav"), _defineProperty({}, "".concat(componentCls, "-nav-wrap"), _defineProperty({}, "&:not([class*='".concat(componentCls, "-nav-wrap-ping']) > ").concat(componentCls, "-nav-list"), {
|
|
585
|
+
margin: 'auto'
|
|
586
586
|
}))));
|
|
587
587
|
};
|
|
588
588
|
export var prepareComponentToken = function prepareComponentToken(token) {
|
|
@@ -50,7 +50,7 @@ var genBaseStyle = function genBaseStyle(token) {
|
|
|
50
50
|
borderColor: 'transparent'
|
|
51
51
|
}, "&, a, a:hover, ".concat(token.iconCls, "-close, ").concat(token.iconCls, "-close:hover"), {
|
|
52
52
|
color: token.colorTextLightSolid
|
|
53
|
-
})),
|
|
53
|
+
})), '&-checkable', _defineProperty(_defineProperty(_defineProperty(_defineProperty({
|
|
54
54
|
backgroundColor: 'transparent',
|
|
55
55
|
borderColor: 'transparent',
|
|
56
56
|
cursor: 'pointer'
|
|
@@ -66,7 +66,7 @@ var genBaseStyle = function genBaseStyle(token) {
|
|
|
66
66
|
}
|
|
67
67
|
}), '&:active', {
|
|
68
68
|
backgroundColor: token.colorPrimaryActive
|
|
69
|
-
})),
|
|
69
|
+
})), '&-hidden', {
|
|
70
70
|
display: 'none'
|
|
71
71
|
}), "> ".concat(token.iconCls, " + span, > span + ").concat(token.iconCls), {
|
|
72
72
|
marginInlineStart: paddingInline
|
package/lib/Antd5/theme/index.js
CHANGED
|
@@ -4,9 +4,8 @@ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r)
|
|
|
4
4
|
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
5
5
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
6
6
|
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
7
|
-
/* eslint-disable import/prefer-default-export */
|
|
8
7
|
import getDesignToken from './getDesignToken';
|
|
9
|
-
import { defaultConfig, useToken as useInternalToken } from './internal';
|
|
8
|
+
import { defaultConfig, DesignTokenContext as InternalDesignTokenContext, useToken as useInternalToken } from './internal';
|
|
10
9
|
import compactAlgorithm from './themes/compact';
|
|
11
10
|
import darkAlgorithm from './themes/dark';
|
|
12
11
|
import defaultAlgorithm from './themes/default';
|
|
@@ -27,13 +26,21 @@ function useToken() {
|
|
|
27
26
|
};
|
|
28
27
|
}
|
|
29
28
|
export default {
|
|
30
|
-
/** @private Test Usage. Do not use in production. */
|
|
31
|
-
defaultConfig: defaultConfig,
|
|
32
29
|
/** Default seedToken */
|
|
33
30
|
defaultSeed: defaultConfig.token,
|
|
34
31
|
useToken: useToken,
|
|
35
32
|
defaultAlgorithm: defaultAlgorithm,
|
|
36
33
|
darkAlgorithm: darkAlgorithm,
|
|
37
34
|
compactAlgorithm: compactAlgorithm,
|
|
38
|
-
getDesignToken: getDesignToken
|
|
35
|
+
getDesignToken: getDesignToken,
|
|
36
|
+
/**
|
|
37
|
+
* @private Private variable
|
|
38
|
+
* @warring 🔥 Do not use in production. 🔥
|
|
39
|
+
*/
|
|
40
|
+
defaultConfig: defaultConfig,
|
|
41
|
+
/**
|
|
42
|
+
* @private Private variable
|
|
43
|
+
* @warring 🔥 Do not use in production. 🔥
|
|
44
|
+
*/
|
|
45
|
+
_internalContext: InternalDesignTokenContext
|
|
39
46
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,13 +1,18 @@
|
|
|
1
1
|
import { useStyleRegister } from '@ant-design/cssinjs';
|
|
2
|
+
import { genCalc as calc, mergeToken, statisticToken, statistic } from '@ant-design/cssinjs-utils';
|
|
2
3
|
import { PresetColors } from './interface';
|
|
3
4
|
import { getLineHeight } from './themes/shared/genFontSizes';
|
|
4
5
|
import useToken from './useToken';
|
|
5
|
-
import
|
|
6
|
-
import genComponentStyleHook, { genStyleHooks, genSubStyleComponent } from './util/genComponentStyleHook';
|
|
6
|
+
import { genComponentStyleHook, genStyleHooks, genSubStyleComponent } from './util/genStyleUtils';
|
|
7
7
|
import genPresetColor from './util/genPresetColor';
|
|
8
|
-
import statisticToken, { merge as mergeToken } from './util/statistic';
|
|
9
8
|
import useResetIconStyle from './util/useResetIconStyle';
|
|
10
9
|
export { DesignTokenContext, defaultConfig } from './context';
|
|
11
|
-
export {
|
|
10
|
+
export {
|
|
11
|
+
// generators
|
|
12
|
+
genComponentStyleHook, genSubStyleComponent, genPresetColor, genStyleHooks,
|
|
13
|
+
// utils
|
|
14
|
+
mergeToken, statisticToken, calc, getLineHeight,
|
|
12
15
|
// hooks
|
|
13
|
-
useResetIconStyle, useStyleRegister, useToken
|
|
16
|
+
useResetIconStyle, useStyleRegister, useToken,
|
|
17
|
+
// constant
|
|
18
|
+
PresetColors, statistic };
|