@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
|
@@ -9,6 +9,7 @@ import { resetComponent } from '../../style';
|
|
|
9
9
|
import { genStyleHooks, mergeToken } from '../../theme/internal';
|
|
10
10
|
// ============================== Shared ==============================
|
|
11
11
|
var genSharedDividerStyle = function genSharedDividerStyle(token) {
|
|
12
|
+
var _objectSpread2;
|
|
12
13
|
var componentCls = token.componentCls,
|
|
13
14
|
sizePaddingEdgeHorizontal = token.sizePaddingEdgeHorizontal,
|
|
14
15
|
colorSplit = token.colorSplit,
|
|
@@ -16,7 +17,7 @@ var genSharedDividerStyle = function genSharedDividerStyle(token) {
|
|
|
16
17
|
textPaddingInline = token.textPaddingInline,
|
|
17
18
|
orientationMargin = token.orientationMargin,
|
|
18
19
|
verticalMarginInline = token.verticalMarginInline;
|
|
19
|
-
return _defineProperty({}, componentCls, _objectSpread(_objectSpread({}, resetComponent(token)), {},
|
|
20
|
+
return _defineProperty({}, componentCls, _objectSpread(_objectSpread({}, resetComponent(token)), {}, (_objectSpread2 = {
|
|
20
21
|
borderBlockStart: "".concat(unit(lineWidth), " solid ").concat(colorSplit),
|
|
21
22
|
// vertical
|
|
22
23
|
'&-vertical': {
|
|
@@ -38,7 +39,7 @@ var genSharedDividerStyle = function genSharedDividerStyle(token) {
|
|
|
38
39
|
// Fix https://github.com/ant-design/ant-design/issues/10914
|
|
39
40
|
margin: "".concat(unit(token.dividerHorizontalGutterMargin), " 0")
|
|
40
41
|
}
|
|
41
|
-
}, "&-horizontal".concat(componentCls, "-with-text"), {
|
|
42
|
+
}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_objectSpread2, "&-horizontal".concat(componentCls, "-with-text"), {
|
|
42
43
|
display: 'flex',
|
|
43
44
|
alignItems: 'center',
|
|
44
45
|
margin: "".concat(unit(token.dividerHorizontalWithTextGutterMargin), " 0"),
|
|
@@ -90,7 +91,21 @@ var genSharedDividerStyle = function genSharedDividerStyle(token) {
|
|
|
90
91
|
borderInlineEnd: 0,
|
|
91
92
|
borderBlockStart: 0,
|
|
92
93
|
borderBlockEnd: 0
|
|
93
|
-
}),
|
|
94
|
+
}), '&-dotted', {
|
|
95
|
+
background: 'none',
|
|
96
|
+
borderColor: colorSplit,
|
|
97
|
+
borderStyle: 'dotted',
|
|
98
|
+
borderWidth: "".concat(unit(lineWidth), " 0 0")
|
|
99
|
+
}), "&-horizontal".concat(componentCls, "-with-text").concat(componentCls, "-dotted"), {
|
|
100
|
+
'&::before, &::after': {
|
|
101
|
+
borderStyle: 'dotted none none'
|
|
102
|
+
}
|
|
103
|
+
}), "&-vertical".concat(componentCls, "-dotted"), {
|
|
104
|
+
borderInlineStartWidth: lineWidth,
|
|
105
|
+
borderInlineEnd: 0,
|
|
106
|
+
borderBlockStart: 0,
|
|
107
|
+
borderBlockEnd: 0
|
|
108
|
+
}), _defineProperty(_defineProperty(_defineProperty(_objectSpread2, "&-plain".concat(componentCls, "-with-text"), {
|
|
94
109
|
color: token.colorText,
|
|
95
110
|
fontWeight: 'normal',
|
|
96
111
|
fontSize: token.fontSize
|
|
@@ -112,7 +127,7 @@ var genSharedDividerStyle = function genSharedDividerStyle(token) {
|
|
|
112
127
|
}
|
|
113
128
|
}, "".concat(componentCls, "-inner-text"), {
|
|
114
129
|
paddingInlineEnd: sizePaddingEdgeHorizontal
|
|
115
|
-
}))));
|
|
130
|
+
})))));
|
|
116
131
|
};
|
|
117
132
|
export var prepareComponentToken = function prepareComponentToken(token) {
|
|
118
133
|
return {
|
|
@@ -1,9 +1,9 @@
|
|
|
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); }
|
|
1
2
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
2
3
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
3
4
|
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
4
5
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
5
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); }
|
|
6
|
-
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); }
|
|
7
7
|
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
8
8
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
9
9
|
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
@@ -15,9 +15,9 @@ import * as React from 'react';
|
|
|
15
15
|
import classNames from 'classnames';
|
|
16
16
|
import useClosable, { pickClosable } from '../_util/hooks/useClosable';
|
|
17
17
|
import { ConfigContext } from '../config-provider';
|
|
18
|
-
import
|
|
18
|
+
import Skeleton from '../skeleton';
|
|
19
19
|
var DrawerPanel = function DrawerPanel(props) {
|
|
20
|
-
var
|
|
20
|
+
var _drawerContext$classN3, _drawerContext$styles3;
|
|
21
21
|
var prefixCls = props.prefixCls,
|
|
22
22
|
title = props.title,
|
|
23
23
|
footer = props.footer,
|
|
@@ -48,17 +48,6 @@ var DrawerPanel = function DrawerPanel(props) {
|
|
|
48
48
|
_useClosable2 = _slicedToArray(_useClosable, 2),
|
|
49
49
|
mergedClosable = _useClosable2[0],
|
|
50
50
|
mergedCloseIcon = _useClosable2[1];
|
|
51
|
-
// >>>>>>>>> Spinning
|
|
52
|
-
var spinProps;
|
|
53
|
-
if (typeof loading === 'boolean') {
|
|
54
|
-
spinProps = {
|
|
55
|
-
spinning: loading
|
|
56
|
-
};
|
|
57
|
-
} else if (_typeof(loading) === 'object') {
|
|
58
|
-
spinProps = _objectSpread({
|
|
59
|
-
spinning: true
|
|
60
|
-
}, loading);
|
|
61
|
-
}
|
|
62
51
|
var headerNode = React.useMemo(function () {
|
|
63
52
|
var _drawerContext$styles, _drawerContext$classN;
|
|
64
53
|
if (!title && !mergedClosable) {
|
|
@@ -91,16 +80,18 @@ var DrawerPanel = function DrawerPanel(props) {
|
|
|
91
80
|
children: footer
|
|
92
81
|
});
|
|
93
82
|
}, [footer, footerStyle, prefixCls]);
|
|
94
|
-
if ((_spinProps = spinProps) !== null && _spinProps !== void 0 && _spinProps.spinning) {
|
|
95
|
-
return _jsx(Spin, _objectSpread(_objectSpread({}, spinProps), {}, {
|
|
96
|
-
className: classNames(spinProps.className, "".concat(prefixCls, "-content-spin"))
|
|
97
|
-
}));
|
|
98
|
-
}
|
|
99
83
|
return _jsxs(_Fragment, {
|
|
100
84
|
children: [headerNode, _jsx("div", {
|
|
101
85
|
className: classNames("".concat(prefixCls, "-body"), drawerClassNames === null || drawerClassNames === void 0 ? void 0 : drawerClassNames.body, drawerContext === null || drawerContext === void 0 || (_drawerContext$classN3 = drawerContext.classNames) === null || _drawerContext$classN3 === void 0 ? void 0 : _drawerContext$classN3.body),
|
|
102
86
|
style: _objectSpread(_objectSpread(_objectSpread({}, drawerContext === null || drawerContext === void 0 || (_drawerContext$styles3 = drawerContext.styles) === null || _drawerContext$styles3 === void 0 ? void 0 : _drawerContext$styles3.body), bodyStyle), drawerStyles === null || drawerStyles === void 0 ? void 0 : drawerStyles.body),
|
|
103
|
-
children:
|
|
87
|
+
children: loading ? _jsx(Skeleton, {
|
|
88
|
+
active: true,
|
|
89
|
+
title: false,
|
|
90
|
+
paragraph: {
|
|
91
|
+
rows: 5
|
|
92
|
+
},
|
|
93
|
+
className: "".concat(prefixCls, "-body-skeleton")
|
|
94
|
+
}) : children
|
|
104
95
|
}), footerNode]
|
|
105
96
|
});
|
|
106
97
|
};
|
|
@@ -18,17 +18,16 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
18
18
|
import * as React from 'react';
|
|
19
19
|
import classNames from 'classnames';
|
|
20
20
|
import RcDrawer from 'rc-drawer';
|
|
21
|
+
import ContextIsolator from '../_util/ContextIsolator';
|
|
21
22
|
import { useZIndex } from '../_util/hooks/useZIndex';
|
|
22
23
|
import { getTransitionName } from '../_util/motion';
|
|
23
24
|
import { devUseWarning } from '../_util/warning';
|
|
24
25
|
import zIndexContext from '../_util/zindexContext';
|
|
25
26
|
import { ConfigContext } from '../config-provider';
|
|
26
|
-
import { NoFormStyle } from '../form/context';
|
|
27
|
-
import { NoCompactStyle } from '../space/Compact';
|
|
28
27
|
import { usePanelRef } from '../watermark/context';
|
|
29
28
|
import DrawerPanel from './DrawerPanel';
|
|
30
29
|
import useStyle from './style';
|
|
31
|
-
var
|
|
30
|
+
var _SizeTypes = ['default', 'large'];
|
|
32
31
|
var defaultPushState = {
|
|
33
32
|
distance: 180
|
|
34
33
|
};
|
|
@@ -130,47 +129,45 @@ var Drawer = function Drawer(props) {
|
|
|
130
129
|
contextClassNames = _ref3$classNames === void 0 ? {} : _ref3$classNames,
|
|
131
130
|
_ref3$styles = _ref3.styles,
|
|
132
131
|
contextStyles = _ref3$styles === void 0 ? {} : _ref3$styles;
|
|
133
|
-
return wrapCSSVar(_jsx(
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
132
|
+
return wrapCSSVar(_jsx(ContextIsolator, {
|
|
133
|
+
form: true,
|
|
134
|
+
space: true,
|
|
135
|
+
children: _jsx(zIndexContext.Provider, {
|
|
136
|
+
value: contextZIndex,
|
|
137
|
+
children: _jsx(RcDrawer, _objectSpread(_objectSpread({
|
|
138
|
+
prefixCls: prefixCls,
|
|
139
|
+
onClose: onClose,
|
|
140
|
+
maskMotion: maskMotion,
|
|
141
|
+
motion: panelMotion
|
|
142
|
+
}, rest), {}, {
|
|
143
|
+
classNames: {
|
|
144
|
+
mask: classNames(propClassNames.mask, contextClassNames.mask),
|
|
145
|
+
content: classNames(propClassNames.content, contextClassNames.content),
|
|
146
|
+
wrapper: classNames(propClassNames.wrapper, contextClassNames.wrapper)
|
|
147
|
+
},
|
|
148
|
+
styles: {
|
|
149
|
+
mask: _objectSpread(_objectSpread(_objectSpread({}, propStyles.mask), maskStyle), contextStyles.mask),
|
|
150
|
+
content: _objectSpread(_objectSpread(_objectSpread({}, propStyles.content), drawerStyle), contextStyles.content),
|
|
151
|
+
wrapper: _objectSpread(_objectSpread(_objectSpread({}, propStyles.wrapper), contentWrapperStyle), contextStyles.wrapper)
|
|
152
|
+
},
|
|
153
|
+
open: open !== null && open !== void 0 ? open : visible,
|
|
154
|
+
mask: mask,
|
|
155
|
+
push: push,
|
|
156
|
+
width: mergedWidth,
|
|
157
|
+
height: mergedHeight,
|
|
158
|
+
style: _objectSpread(_objectSpread({}, drawer === null || drawer === void 0 ? void 0 : drawer.style), style),
|
|
159
|
+
className: classNames(drawer === null || drawer === void 0 ? void 0 : drawer.className, className),
|
|
160
|
+
rootClassName: drawerClassName,
|
|
161
|
+
getContainer: getContainer,
|
|
162
|
+
afterOpenChange: afterOpenChange !== null && afterOpenChange !== void 0 ? afterOpenChange : afterVisibleChange,
|
|
163
|
+
panelRef: panelRef,
|
|
164
|
+
zIndex: zIndex,
|
|
165
|
+
children: _jsx(DrawerPanel, _objectSpread(_objectSpread({
|
|
166
|
+
prefixCls: prefixCls
|
|
144
167
|
}, rest), {}, {
|
|
145
|
-
|
|
146
|
-
mask: classNames(propClassNames.mask, contextClassNames.mask),
|
|
147
|
-
content: classNames(propClassNames.content, contextClassNames.content),
|
|
148
|
-
wrapper: classNames(propClassNames.wrapper, contextClassNames.wrapper)
|
|
149
|
-
},
|
|
150
|
-
styles: {
|
|
151
|
-
mask: _objectSpread(_objectSpread(_objectSpread({}, propStyles.mask), maskStyle), contextStyles.mask),
|
|
152
|
-
content: _objectSpread(_objectSpread(_objectSpread({}, propStyles.content), drawerStyle), contextStyles.content),
|
|
153
|
-
wrapper: _objectSpread(_objectSpread(_objectSpread({}, propStyles.wrapper), contentWrapperStyle), contextStyles.wrapper)
|
|
154
|
-
},
|
|
155
|
-
open: open !== null && open !== void 0 ? open : visible,
|
|
156
|
-
mask: mask,
|
|
157
|
-
push: push,
|
|
158
|
-
width: mergedWidth,
|
|
159
|
-
height: mergedHeight,
|
|
160
|
-
style: _objectSpread(_objectSpread({}, drawer === null || drawer === void 0 ? void 0 : drawer.style), style),
|
|
161
|
-
className: classNames(drawer === null || drawer === void 0 ? void 0 : drawer.className, className),
|
|
162
|
-
rootClassName: drawerClassName,
|
|
163
|
-
getContainer: getContainer,
|
|
164
|
-
afterOpenChange: afterOpenChange !== null && afterOpenChange !== void 0 ? afterOpenChange : afterVisibleChange,
|
|
165
|
-
panelRef: panelRef,
|
|
166
|
-
zIndex: zIndex,
|
|
167
|
-
children: _jsx(DrawerPanel, _objectSpread(_objectSpread({
|
|
168
|
-
prefixCls: prefixCls
|
|
169
|
-
}, rest), {}, {
|
|
170
|
-
onClose: onClose
|
|
171
|
-
}))
|
|
168
|
+
onClose: onClose
|
|
172
169
|
}))
|
|
173
|
-
})
|
|
170
|
+
}))
|
|
174
171
|
})
|
|
175
172
|
}));
|
|
176
173
|
};
|
|
@@ -42,6 +42,7 @@ var genDrawerStyle = function genDrawerStyle(token) {
|
|
|
42
42
|
inset: 0,
|
|
43
43
|
zIndex: zIndexPopup,
|
|
44
44
|
pointerEvents: 'none',
|
|
45
|
+
color: colorText,
|
|
45
46
|
'&-pure': _defineProperty(_defineProperty(_defineProperty(_defineProperty({
|
|
46
47
|
position: 'relative',
|
|
47
48
|
background: colorBgElevated,
|
|
@@ -97,7 +98,7 @@ var genDrawerStyle = function genDrawerStyle(token) {
|
|
|
97
98
|
bottom: 0,
|
|
98
99
|
insetInline: 0,
|
|
99
100
|
boxShadow: token.boxShadowDrawerDown
|
|
100
|
-
}), "".concat(componentCls, "-content"),
|
|
101
|
+
}), "".concat(componentCls, "-content"), {
|
|
101
102
|
display: 'flex',
|
|
102
103
|
flexDirection: 'column',
|
|
103
104
|
width: '100%',
|
|
@@ -105,13 +106,7 @@ var genDrawerStyle = function genDrawerStyle(token) {
|
|
|
105
106
|
overflow: 'auto',
|
|
106
107
|
background: colorBgElevated,
|
|
107
108
|
pointerEvents: 'auto'
|
|
108
|
-
}, "".concat(componentCls, "-
|
|
109
|
-
width: '100%',
|
|
110
|
-
height: '100%',
|
|
111
|
-
display: 'flex',
|
|
112
|
-
alignItems: 'center',
|
|
113
|
-
justifyContent: 'center'
|
|
114
|
-
})), "".concat(componentCls, "-header"), {
|
|
109
|
+
}), "".concat(componentCls, "-header"), {
|
|
115
110
|
display: 'flex',
|
|
116
111
|
flex: 0,
|
|
117
112
|
alignItems: 'center',
|
|
@@ -160,17 +155,21 @@ var genDrawerStyle = function genDrawerStyle(token) {
|
|
|
160
155
|
}, genFocusStyle(token))), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_componentCls, "".concat(componentCls, "-title"), {
|
|
161
156
|
flex: 1,
|
|
162
157
|
margin: 0,
|
|
163
|
-
color: colorText,
|
|
164
158
|
fontWeight: token.fontWeightStrong,
|
|
165
159
|
fontSize: fontSizeLG,
|
|
166
160
|
lineHeight: lineHeightLG
|
|
167
|
-
}), "".concat(componentCls, "-body"), {
|
|
161
|
+
}), "".concat(componentCls, "-body"), _defineProperty({
|
|
168
162
|
flex: 1,
|
|
169
163
|
minWidth: 0,
|
|
170
164
|
minHeight: 0,
|
|
171
165
|
padding: paddingLG,
|
|
172
166
|
overflow: 'auto'
|
|
173
|
-
}
|
|
167
|
+
}, "".concat(componentCls, "-body-skeleton"), {
|
|
168
|
+
width: '100%',
|
|
169
|
+
height: '100%',
|
|
170
|
+
display: 'flex',
|
|
171
|
+
justifyContent: 'center'
|
|
172
|
+
})), "".concat(componentCls, "-footer"), {
|
|
174
173
|
flexShrink: 0,
|
|
175
174
|
padding: "".concat(unit(footerPaddingBlock), " ").concat(unit(footerPaddingInline)),
|
|
176
175
|
borderTop: "".concat(unit(lineWidth), " ").concat(lineType, " ").concat(colorSplit)
|
|
@@ -15,7 +15,7 @@ import * as React from 'react';
|
|
|
15
15
|
import RightOutlined from '@ant-design/icons/RightOutlined';
|
|
16
16
|
import classNames from 'classnames';
|
|
17
17
|
import RcDropdown from 'rc-dropdown';
|
|
18
|
-
import
|
|
18
|
+
import useEvent from 'rc-util/lib/hooks/useEvent';
|
|
19
19
|
import useMergedState from 'rc-util/lib/hooks/useMergedState';
|
|
20
20
|
import omit from 'rc-util/lib/omit';
|
|
21
21
|
import { useZIndex } from '../_util/hooks/useZIndex';
|
|
@@ -30,8 +30,9 @@ import Menu from '../menu';
|
|
|
30
30
|
import { OverrideProvider } from '../menu/OverrideContext';
|
|
31
31
|
import { useToken } from '../theme/internal';
|
|
32
32
|
import useStyle from './style';
|
|
33
|
-
var
|
|
33
|
+
var _Placements = ['topLeft', 'topCenter', 'topRight', 'bottomLeft', 'bottomCenter', 'bottomRight', 'top', 'bottom'];
|
|
34
34
|
var Dropdown = function Dropdown(props) {
|
|
35
|
+
var _child$props$disabled;
|
|
35
36
|
var menu = props.menu,
|
|
36
37
|
arrow = props.arrow,
|
|
37
38
|
customizePrefixCls = props.prefixCls,
|
|
@@ -117,13 +118,10 @@ var Dropdown = function Dropdown(props) {
|
|
|
117
118
|
var child = React.Children.only(children);
|
|
118
119
|
var dropdownTrigger = cloneElement(child, {
|
|
119
120
|
className: classNames("".concat(prefixCls, "-trigger"), _defineProperty({}, "".concat(prefixCls, "-rtl"), direction === 'rtl'), child.props.className),
|
|
120
|
-
disabled: disabled
|
|
121
|
+
disabled: (_child$props$disabled = child.props.disabled) !== null && _child$props$disabled !== void 0 ? _child$props$disabled : disabled
|
|
121
122
|
});
|
|
122
123
|
var triggerActions = disabled ? [] : trigger;
|
|
123
|
-
var alignPoint;
|
|
124
|
-
if (triggerActions && triggerActions.includes('contextMenu')) {
|
|
125
|
-
alignPoint = true;
|
|
126
|
-
}
|
|
124
|
+
var alignPoint = !!(triggerActions !== null && triggerActions !== void 0 && triggerActions.includes('contextMenu'));
|
|
127
125
|
// =========================== Open ============================
|
|
128
126
|
var _useMergedState = useMergedState(false, {
|
|
129
127
|
value: open !== null && open !== void 0 ? open : visible
|
|
@@ -28,7 +28,7 @@ var genBaseStyle = function genBaseStyle(token) {
|
|
|
28
28
|
fontSizeIcon = token.fontSizeIcon,
|
|
29
29
|
controlPaddingHorizontal = token.controlPaddingHorizontal,
|
|
30
30
|
colorBgElevated = token.colorBgElevated;
|
|
31
|
-
return [_defineProperty({}, componentCls,
|
|
31
|
+
return [_defineProperty({}, componentCls, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({
|
|
32
32
|
position: 'absolute',
|
|
33
33
|
top: -9999,
|
|
34
34
|
left: {
|
|
@@ -45,6 +45,11 @@ var genBaseStyle = function genBaseStyle(token) {
|
|
|
45
45
|
zIndex: -9999,
|
|
46
46
|
opacity: 0.0001,
|
|
47
47
|
content: '""'
|
|
48
|
+
},
|
|
49
|
+
// Makes vertical dropdowns have a scrollbar once they become taller than the viewport.
|
|
50
|
+
'&-menu-vertical': {
|
|
51
|
+
maxHeight: '100vh',
|
|
52
|
+
overflowY: 'auto'
|
|
48
53
|
}
|
|
49
54
|
}, "&-trigger".concat(antCls, "-btn"), _defineProperty({}, "& > ".concat(iconCls, "-down, & > ").concat(antCls, "-btn-icon > ").concat(iconCls, "-down"), {
|
|
50
55
|
fontSize: fontSizeIcon
|
|
@@ -66,7 +71,7 @@ var genBaseStyle = function genBaseStyle(token) {
|
|
|
66
71
|
animationName: slideUpOut
|
|
67
72
|
}), "&".concat(antCls, "-slide-up-leave").concat(antCls, "-slide-up-leave-active").concat(componentCls, "-placement-topLeft,\n &").concat(antCls, "-slide-up-leave").concat(antCls, "-slide-up-leave-active").concat(componentCls, "-placement-top,\n &").concat(antCls, "-slide-up-leave").concat(antCls, "-slide-up-leave-active").concat(componentCls, "-placement-topRight"), {
|
|
68
73
|
animationName: slideDownOut
|
|
69
|
-
}))
|
|
74
|
+
})),
|
|
70
75
|
// =============================================================
|
|
71
76
|
// == Arrow style ==
|
|
72
77
|
// =============================================================
|
|
@@ -88,7 +93,7 @@ var genBaseStyle = function genBaseStyle(token) {
|
|
|
88
93
|
listStyle: 'none',
|
|
89
94
|
margin: 0
|
|
90
95
|
}
|
|
91
|
-
}), "".concat(componentCls, ", ").concat(componentCls, "-menu-submenu"), _defineProperty({}, menuCls, _objectSpread(_objectSpread({
|
|
96
|
+
}), "".concat(componentCls, ", ").concat(componentCls, "-menu-submenu"), _objectSpread(_objectSpread({}, resetComponent(token)), {}, _defineProperty({}, menuCls, _objectSpread(_objectSpread({
|
|
92
97
|
padding: dropdownEdgeChildPadding,
|
|
93
98
|
listStyleType: 'none',
|
|
94
99
|
backgroundColor: colorBgElevated,
|
|
@@ -113,8 +118,13 @@ var genBaseStyle = function genBaseStyle(token) {
|
|
|
113
118
|
minWidth: fontSize,
|
|
114
119
|
marginInlineEnd: token.marginXS,
|
|
115
120
|
fontSize: token.fontSizeSM
|
|
116
|
-
}), "".concat(menuCls, "-title-content"), {
|
|
121
|
+
}), "".concat(menuCls, "-title-content"), _defineProperty({
|
|
117
122
|
flex: 'auto',
|
|
123
|
+
'&-with-extra': {
|
|
124
|
+
display: 'inline-flex',
|
|
125
|
+
alignItems: 'center',
|
|
126
|
+
width: '100%'
|
|
127
|
+
},
|
|
118
128
|
'> a': {
|
|
119
129
|
color: 'inherit',
|
|
120
130
|
transition: "all ".concat(motionDurationMid),
|
|
@@ -127,8 +137,13 @@ var genBaseStyle = function genBaseStyle(token) {
|
|
|
127
137
|
content: '""'
|
|
128
138
|
}
|
|
129
139
|
}
|
|
130
|
-
}
|
|
131
|
-
|
|
140
|
+
}, "".concat(menuCls, "-item-extra"), {
|
|
141
|
+
paddingInlineStart: token.padding,
|
|
142
|
+
marginInlineStart: 'auto',
|
|
143
|
+
fontSize: token.fontSizeSM,
|
|
144
|
+
color: token.colorTextDescription
|
|
145
|
+
})), "".concat(menuCls, "-item, ").concat(menuCls, "-submenu-title"), _objectSpread(_objectSpread({
|
|
146
|
+
display: 'flex',
|
|
132
147
|
margin: 0,
|
|
133
148
|
padding: "".concat(unit(paddingBlock), " ").concat(unit(controlPaddingHorizontal)),
|
|
134
149
|
color: token.colorText,
|
|
@@ -137,10 +152,11 @@ var genBaseStyle = function genBaseStyle(token) {
|
|
|
137
152
|
lineHeight: token.lineHeight,
|
|
138
153
|
cursor: 'pointer',
|
|
139
154
|
transition: "all ".concat(motionDurationMid),
|
|
140
|
-
borderRadius: token.borderRadiusSM
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
155
|
+
borderRadius: token.borderRadiusSM,
|
|
156
|
+
'&:hover, &-active': {
|
|
157
|
+
backgroundColor: token.controlItemBgHover
|
|
158
|
+
}
|
|
159
|
+
}, genFocusStyle(token)), {}, _defineProperty({
|
|
144
160
|
'&-selected': {
|
|
145
161
|
color: token.colorPrimary,
|
|
146
162
|
backgroundColor: token.controlItemBgActive,
|
|
@@ -190,7 +206,7 @@ var genBaseStyle = function genBaseStyle(token) {
|
|
|
190
206
|
cursor: 'not-allowed'
|
|
191
207
|
})), "".concat(menuCls, "-submenu-selected ").concat(componentCls, "-menu-submenu-title"), {
|
|
192
208
|
color: token.colorPrimary
|
|
193
|
-
})))),
|
|
209
|
+
}))))),
|
|
194
210
|
// Follow code may reuse in other components
|
|
195
211
|
[initSlideMotion(token, 'slide-up'), initSlideMotion(token, 'slide-down'), initMoveMotion(token, 'move-up'), initMoveMotion(token, 'move-down'), initZoomMotion(token, 'zoom-big')]];
|
|
196
212
|
};
|
package/lib/Antd5/empty/empty.js
CHANGED
|
@@ -7,23 +7,29 @@ function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
|
7
7
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
8
|
import * as React from 'react';
|
|
9
9
|
import { TinyColor } from '@ctrl/tinycolor';
|
|
10
|
+
import { useLocale } from '../locale';
|
|
10
11
|
import { useToken } from '../theme/internal';
|
|
11
12
|
var Empty = function Empty() {
|
|
12
13
|
var _useToken = useToken(),
|
|
13
14
|
_useToken2 = _slicedToArray(_useToken, 2),
|
|
14
15
|
token = _useToken2[1];
|
|
16
|
+
var _useLocale = useLocale('Empty'),
|
|
17
|
+
_useLocale2 = _slicedToArray(_useLocale, 1),
|
|
18
|
+
locale = _useLocale2[0];
|
|
15
19
|
var bgColor = new TinyColor(token.colorBgBase);
|
|
16
20
|
// Dark Theme need more dark of this
|
|
17
21
|
var themeStyle = bgColor.toHsl().l < 0.5 ? {
|
|
18
22
|
opacity: 0.65
|
|
19
23
|
} : {};
|
|
20
|
-
return
|
|
24
|
+
return _jsxs("svg", {
|
|
21
25
|
style: themeStyle,
|
|
22
26
|
width: "184",
|
|
23
27
|
height: "152",
|
|
24
28
|
viewBox: "0 0 184 152",
|
|
25
29
|
xmlns: "http://www.w3.org/2000/svg",
|
|
26
|
-
children:
|
|
30
|
+
children: [_jsx("title", {
|
|
31
|
+
children: (locale === null || locale === void 0 ? void 0 : locale.description) || 'Empty'
|
|
32
|
+
}), _jsxs("g", {
|
|
27
33
|
fill: "none",
|
|
28
34
|
fillRule: "evenodd",
|
|
29
35
|
children: [_jsxs("g", {
|
|
@@ -64,7 +70,7 @@ var Empty = function Empty() {
|
|
|
64
70
|
d: "M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"
|
|
65
71
|
})]
|
|
66
72
|
})]
|
|
67
|
-
})
|
|
73
|
+
})]
|
|
68
74
|
});
|
|
69
75
|
};
|
|
70
76
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -9,10 +9,14 @@ import * as React from 'react';
|
|
|
9
9
|
import { useMemo } from 'react';
|
|
10
10
|
import { TinyColor } from '@ctrl/tinycolor';
|
|
11
11
|
import { useToken } from '../theme/internal';
|
|
12
|
+
import { useLocale } from '../locale';
|
|
12
13
|
var Simple = function Simple() {
|
|
13
14
|
var _useToken = useToken(),
|
|
14
15
|
_useToken2 = _slicedToArray(_useToken, 2),
|
|
15
16
|
token = _useToken2[1];
|
|
17
|
+
var _useLocale = useLocale('Empty'),
|
|
18
|
+
_useLocale2 = _slicedToArray(_useLocale, 1),
|
|
19
|
+
locale = _useLocale2[0];
|
|
16
20
|
var colorFill = token.colorFill,
|
|
17
21
|
colorFillTertiary = token.colorFillTertiary,
|
|
18
22
|
colorFillQuaternary = token.colorFillQuaternary,
|
|
@@ -27,12 +31,14 @@ var Simple = function Simple() {
|
|
|
27
31
|
borderColor = _useMemo.borderColor,
|
|
28
32
|
shadowColor = _useMemo.shadowColor,
|
|
29
33
|
contentColor = _useMemo.contentColor;
|
|
30
|
-
return
|
|
34
|
+
return _jsxs("svg", {
|
|
31
35
|
width: "64",
|
|
32
36
|
height: "41",
|
|
33
37
|
viewBox: "0 0 64 41",
|
|
34
38
|
xmlns: "http://www.w3.org/2000/svg",
|
|
35
|
-
children:
|
|
39
|
+
children: [_jsx("title", {
|
|
40
|
+
children: (locale === null || locale === void 0 ? void 0 : locale.description) || 'Empty'
|
|
41
|
+
}), _jsxs("g", {
|
|
36
42
|
transform: "translate(0 1)",
|
|
37
43
|
fill: "none",
|
|
38
44
|
fillRule: "evenodd",
|
|
@@ -52,7 +58,7 @@ var Simple = function Simple() {
|
|
|
52
58
|
fill: contentColor
|
|
53
59
|
})]
|
|
54
60
|
})]
|
|
55
|
-
})
|
|
61
|
+
})]
|
|
56
62
|
});
|
|
57
63
|
};
|
|
58
64
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -29,7 +29,7 @@ var genSharedEmptyStyle = function genSharedEmptyStyle(token) {
|
|
|
29
29
|
margin: 'auto'
|
|
30
30
|
}
|
|
31
31
|
}), "".concat(componentCls, "-description"), {
|
|
32
|
-
color: token.
|
|
32
|
+
color: token.colorTextDescription
|
|
33
33
|
}), "".concat(componentCls, "-footer"), {
|
|
34
34
|
marginTop: margin
|
|
35
35
|
}), '&-normal', _defineProperty(_defineProperty({
|
|
@@ -52,10 +52,11 @@ var BackTop = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
52
52
|
};
|
|
53
53
|
});
|
|
54
54
|
var getDefaultTarget = function getDefaultTarget() {
|
|
55
|
-
|
|
55
|
+
var _internalRef$current;
|
|
56
|
+
return ((_internalRef$current = internalRef.current) === null || _internalRef$current === void 0 ? void 0 : _internalRef$current.ownerDocument) || window;
|
|
56
57
|
};
|
|
57
58
|
var handleScroll = throttleByAnimationFrame(function (e) {
|
|
58
|
-
var scrollTop = getScroll(e.target
|
|
59
|
+
var scrollTop = getScroll(e.target);
|
|
59
60
|
setVisible(scrollTop >= visibilityHeight);
|
|
60
61
|
});
|
|
61
62
|
useEffect(function () {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
-
var _excluded = ["prefixCls", "className", "rootClassName", "type", "shape", "icon", "description", "tooltip", "badge"];
|
|
2
|
+
var _excluded = ["prefixCls", "className", "rootClassName", "style", "type", "shape", "icon", "description", "tooltip", "htmlType", "badge"];
|
|
3
3
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4
4
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5
5
|
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
@@ -17,6 +17,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
17
17
|
import React, { useContext, useMemo } from 'react';
|
|
18
18
|
import classNames from 'classnames';
|
|
19
19
|
import omit from 'rc-util/lib/omit';
|
|
20
|
+
import { useZIndex } from '../_util/hooks/useZIndex';
|
|
20
21
|
import { devUseWarning } from '../_util/warning';
|
|
21
22
|
import Badge from '../badge';
|
|
22
23
|
import { ConfigContext } from '../config-provider';
|
|
@@ -30,6 +31,7 @@ var InternalFloatButton = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
30
31
|
var customizePrefixCls = props.prefixCls,
|
|
31
32
|
className = props.className,
|
|
32
33
|
rootClassName = props.rootClassName,
|
|
34
|
+
style = props.style,
|
|
33
35
|
_props$type = props.type,
|
|
34
36
|
type = _props$type === void 0 ? 'default' : _props$type,
|
|
35
37
|
_props$shape = props.shape,
|
|
@@ -37,6 +39,8 @@ var InternalFloatButton = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
37
39
|
icon = props.icon,
|
|
38
40
|
description = props.description,
|
|
39
41
|
tooltip = props.tooltip,
|
|
42
|
+
_props$htmlType = props.htmlType,
|
|
43
|
+
htmlType = _props$htmlType === void 0 ? 'button' : _props$htmlType,
|
|
40
44
|
_props$badge = props.badge,
|
|
41
45
|
badge = _props$badge === void 0 ? {} : _props$badge,
|
|
42
46
|
restProps = _objectWithoutProperties(props, _excluded);
|
|
@@ -53,10 +57,15 @@ var InternalFloatButton = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
53
57
|
cssVarCls = _useStyle2[2];
|
|
54
58
|
var mergedShape = groupShape || shape;
|
|
55
59
|
var classString = classNames(hashId, cssVarCls, rootCls, prefixCls, className, rootClassName, "".concat(prefixCls, "-").concat(type), "".concat(prefixCls, "-").concat(mergedShape), _defineProperty({}, "".concat(prefixCls, "-rtl"), direction === 'rtl'));
|
|
60
|
+
// ============================ zIndex ============================
|
|
61
|
+
var _useZIndex = useZIndex('FloatButton', style === null || style === void 0 ? void 0 : style.zIndex),
|
|
62
|
+
_useZIndex2 = _slicedToArray(_useZIndex, 1),
|
|
63
|
+
zIndex = _useZIndex2[0];
|
|
64
|
+
var mergedStyle = _objectSpread(_objectSpread({}, style), {}, {
|
|
65
|
+
zIndex: zIndex
|
|
66
|
+
});
|
|
56
67
|
// 虽然在 ts 中已经 omit 过了,但是为了防止多余的属性被透传进来,这里再 omit 一遍,以防万一
|
|
57
|
-
var badgeProps =
|
|
58
|
-
return omit(badge, ['title', 'children', 'status', 'text']);
|
|
59
|
-
}, [badge]);
|
|
68
|
+
var badgeProps = omit(badge, ['title', 'children', 'status', 'text']);
|
|
60
69
|
var contentProps = useMemo(function () {
|
|
61
70
|
return {
|
|
62
71
|
prefixCls: prefixCls,
|
|
@@ -89,12 +98,14 @@ var InternalFloatButton = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
89
98
|
ref: ref
|
|
90
99
|
}, restProps), {}, {
|
|
91
100
|
className: classString,
|
|
101
|
+
style: mergedStyle,
|
|
92
102
|
children: buttonNode
|
|
93
103
|
})) : _jsx("button", _objectSpread(_objectSpread({
|
|
94
104
|
ref: ref
|
|
95
105
|
}, restProps), {}, {
|
|
96
106
|
className: classString,
|
|
97
|
-
|
|
107
|
+
style: mergedStyle,
|
|
108
|
+
type: htmlType,
|
|
98
109
|
children: buttonNode
|
|
99
110
|
})));
|
|
100
111
|
});
|