@chaoswise/ui 3.0.23 → 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/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/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 +6 -0
- 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 +45 -59
- 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
|
@@ -20,7 +20,8 @@ var MenuItem = function MenuItem(props) {
|
|
|
20
20
|
children = props.children,
|
|
21
21
|
icon = props.icon,
|
|
22
22
|
title = props.title,
|
|
23
|
-
danger = props.danger
|
|
23
|
+
danger = props.danger,
|
|
24
|
+
extra = props.extra;
|
|
24
25
|
var _React$useContext = React.useContext(MenuContext),
|
|
25
26
|
prefixCls = _React$useContext.prefixCls,
|
|
26
27
|
firstLevel = _React$useContext.firstLevel,
|
|
@@ -28,17 +29,18 @@ var MenuItem = function MenuItem(props) {
|
|
|
28
29
|
disableMenuItemTitleTooltip = _React$useContext.disableMenuItemTitleTooltip,
|
|
29
30
|
isInlineCollapsed = _React$useContext.inlineCollapsed;
|
|
30
31
|
var renderItemChildren = function renderItemChildren(inlineCollapsed) {
|
|
32
|
+
var label = children === null || children === void 0 ? void 0 : children[0];
|
|
31
33
|
var wrapNode = _jsx("span", {
|
|
32
|
-
className: "".concat(prefixCls, "-title-content"),
|
|
34
|
+
className: classNames("".concat(prefixCls, "-title-content"), _defineProperty({}, "".concat(prefixCls, "-title-content-with-extra"), !!extra || extra === 0)),
|
|
33
35
|
children: children
|
|
34
36
|
});
|
|
35
37
|
// inline-collapsed.md demo 依赖 span 来隐藏文字,有 icon 属性,则内部包裹一个 span
|
|
36
38
|
// ref: https://github.com/ant-design/ant-design/pull/23456
|
|
37
39
|
if (!icon || /*#__PURE__*/React.isValidElement(children) && children.type === 'span') {
|
|
38
|
-
if (children && inlineCollapsed && firstLevel && typeof
|
|
40
|
+
if (children && inlineCollapsed && firstLevel && typeof label === 'string') {
|
|
39
41
|
return _jsx("div", {
|
|
40
42
|
className: "".concat(prefixCls, "-inline-collapsed-noicon"),
|
|
41
|
-
children:
|
|
43
|
+
children: label.charAt(0)
|
|
42
44
|
});
|
|
43
45
|
}
|
|
44
46
|
}
|
|
@@ -52,7 +54,6 @@ var MenuItem = function MenuItem(props) {
|
|
|
52
54
|
} else if (title === false) {
|
|
53
55
|
tooltipTitle = '';
|
|
54
56
|
}
|
|
55
|
-
tooltipTitle = firstLevel ? title ? title : children : ''; // 修复折叠状态每一层级的Menu.Item均有tooltip问题,符合ui规范
|
|
56
57
|
var tooltipProps = {
|
|
57
58
|
title: tooltipTitle
|
|
58
59
|
};
|
|
@@ -9,8 +9,8 @@ function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i
|
|
|
9
9
|
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
|
|
10
10
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
11
|
import * as React from 'react';
|
|
12
|
-
import { supportNodeRef, useComposeRef } from 'rc-util';
|
|
13
|
-
import
|
|
12
|
+
import { supportNodeRef, useComposeRef } from 'rc-util/lib/ref';
|
|
13
|
+
import ContextIsolator from '../_util/ContextIsolator';
|
|
14
14
|
var OverrideContext = /*#__PURE__*/React.createContext(null);
|
|
15
15
|
/** @internal Only used for Dropdown component. Do not use this in your production. */
|
|
16
16
|
export var OverrideProvider = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
@@ -28,7 +28,8 @@ export var OverrideProvider = /*#__PURE__*/React.forwardRef(function (props, ref
|
|
|
28
28
|
var mergedRef = useComposeRef(ref, canRef ? children.ref : null);
|
|
29
29
|
return _jsx(OverrideContext.Provider, {
|
|
30
30
|
value: context,
|
|
31
|
-
children: _jsx(
|
|
31
|
+
children: _jsx(ContextIsolator, {
|
|
32
|
+
space: true,
|
|
32
33
|
children: canRef ? /*#__PURE__*/React.cloneElement(children, {
|
|
33
34
|
ref: mergedRef
|
|
34
35
|
}) : children
|
|
@@ -65,9 +65,9 @@ var SubMenu = function SubMenu(props) {
|
|
|
65
65
|
children: _jsx(RcSubMenu, _objectSpread(_objectSpread({}, omit(props, ['icon'])), {}, {
|
|
66
66
|
title: titleNode,
|
|
67
67
|
popupClassName: classNames(prefixCls, popupClassName, "".concat(prefixCls, "-").concat(customTheme || contextTheme)),
|
|
68
|
-
popupStyle: {
|
|
68
|
+
popupStyle: _objectSpread({
|
|
69
69
|
zIndex: zIndex
|
|
70
|
-
}
|
|
70
|
+
}, props.popupStyle)
|
|
71
71
|
}))
|
|
72
72
|
});
|
|
73
73
|
};
|
package/lib/Antd5/menu/menu.js
CHANGED
|
@@ -19,15 +19,15 @@ import { forwardRef } from 'react';
|
|
|
19
19
|
import EllipsisOutlined from '@ant-design/icons/EllipsisOutlined';
|
|
20
20
|
import classNames from 'classnames';
|
|
21
21
|
import RcMenu from 'rc-menu';
|
|
22
|
-
import
|
|
22
|
+
import useEvent from 'rc-util/lib/hooks/useEvent';
|
|
23
23
|
import omit from 'rc-util/lib/omit';
|
|
24
24
|
import initCollapseMotion from '../_util/motion';
|
|
25
25
|
import { cloneElement } from '../_util/reactNode';
|
|
26
26
|
import { devUseWarning } from '../_util/warning';
|
|
27
27
|
import { ConfigContext } from '../config-provider';
|
|
28
28
|
import useCSSVarCls from '../config-provider/hooks/useCSSVarCls';
|
|
29
|
-
import Divider from './MenuDivider';
|
|
30
29
|
import MenuContext from './MenuContext';
|
|
30
|
+
import Divider from './MenuDivider';
|
|
31
31
|
import MenuItem from './MenuItem';
|
|
32
32
|
import OverrideContext from './OverrideContext';
|
|
33
33
|
import useStyle from './style';
|
|
@@ -28,7 +28,7 @@ var genMenuItemStyle = function genMenuItemStyle(token) {
|
|
|
28
28
|
margin: 0,
|
|
29
29
|
whiteSpace: 'nowrap',
|
|
30
30
|
cursor: 'pointer',
|
|
31
|
-
transition: ["border-color ".concat(motionDurationSlow), "background ".concat(motionDurationSlow), "padding ".concat(motionDurationSlow, " ").concat(motionEaseInOut)].join(',')
|
|
31
|
+
transition: ["border-color ".concat(motionDurationSlow), "background ".concat(motionDurationSlow), "padding calc(".concat(motionDurationSlow, " + 0.1s) ").concat(motionEaseInOut)].join(',')
|
|
32
32
|
}, "".concat(componentCls, "-item-icon, ").concat(iconCls), {
|
|
33
33
|
minWidth: iconSize,
|
|
34
34
|
fontSize: iconSize,
|
|
@@ -61,32 +61,35 @@ var genSubMenuArrowStyle = function genSubMenuArrowStyle(token) {
|
|
|
61
61
|
borderRadius = token.borderRadius,
|
|
62
62
|
menuArrowSize = token.menuArrowSize,
|
|
63
63
|
menuArrowOffset = token.menuArrowOffset;
|
|
64
|
-
return _defineProperty({}, "".concat(componentCls, "-submenu"),
|
|
65
|
-
|
|
66
|
-
top: '50%',
|
|
67
|
-
insetInlineEnd: token.margin,
|
|
68
|
-
width: menuArrowSize,
|
|
69
|
-
color: 'currentcolor',
|
|
70
|
-
transform: 'translateY(-50%)',
|
|
71
|
-
transition: "transform ".concat(motionDurationSlow, " ").concat(motionEaseInOut, ", opacity ").concat(motionDurationSlow)
|
|
72
|
-
}), '&-arrow', {
|
|
73
|
-
// →
|
|
74
|
-
'&::before, &::after': {
|
|
64
|
+
return _defineProperty({}, "".concat(componentCls, "-submenu"), {
|
|
65
|
+
'&-expand-icon, &-arrow': {
|
|
75
66
|
position: 'absolute',
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
},
|
|
83
|
-
'&::before': {
|
|
84
|
-
transform: "rotate(45deg) translateY(".concat(unit(token.calc(menuArrowOffset).mul(-1).equal()), ")")
|
|
67
|
+
top: '50%',
|
|
68
|
+
insetInlineEnd: token.margin,
|
|
69
|
+
width: menuArrowSize,
|
|
70
|
+
color: 'currentcolor',
|
|
71
|
+
transform: 'translateY(-50%)',
|
|
72
|
+
transition: "transform ".concat(motionDurationSlow, " ").concat(motionEaseInOut, ", opacity ").concat(motionDurationSlow)
|
|
85
73
|
},
|
|
86
|
-
'
|
|
87
|
-
|
|
74
|
+
'&-arrow': {
|
|
75
|
+
// →
|
|
76
|
+
'&::before, &::after': {
|
|
77
|
+
position: 'absolute',
|
|
78
|
+
width: token.calc(menuArrowSize).mul(0.6).equal(),
|
|
79
|
+
height: token.calc(menuArrowSize).mul(0.15).equal(),
|
|
80
|
+
backgroundColor: 'currentcolor',
|
|
81
|
+
borderRadius: borderRadius,
|
|
82
|
+
transition: ["background ".concat(motionDurationSlow, " ").concat(motionEaseInOut), "transform ".concat(motionDurationSlow, " ").concat(motionEaseInOut), "top ".concat(motionDurationSlow, " ").concat(motionEaseInOut), "color ".concat(motionDurationSlow, " ").concat(motionEaseInOut)].join(','),
|
|
83
|
+
content: '""'
|
|
84
|
+
},
|
|
85
|
+
'&::before': {
|
|
86
|
+
transform: "rotate(45deg) translateY(".concat(unit(token.calc(menuArrowOffset).mul(-1).equal()), ")")
|
|
87
|
+
},
|
|
88
|
+
'&::after': {
|
|
89
|
+
transform: "rotate(-45deg) translateY(".concat(unit(menuArrowOffset), ")")
|
|
90
|
+
}
|
|
88
91
|
}
|
|
89
|
-
})
|
|
92
|
+
});
|
|
90
93
|
};
|
|
91
94
|
// =============================== Base ===============================
|
|
92
95
|
var getBaseStyle = function getBaseStyle(token) {
|
|
@@ -110,12 +113,15 @@ var getBaseStyle = function getBaseStyle(token) {
|
|
|
110
113
|
groupTitleFontSize = token.groupTitleFontSize;
|
|
111
114
|
return [// Misc
|
|
112
115
|
_defineProperty({
|
|
113
|
-
'': _defineProperty({},
|
|
114
|
-
|
|
115
|
-
|
|
116
|
+
'': _defineProperty({}, componentCls, _objectSpread(_objectSpread({}, clearFix()), {}, {
|
|
117
|
+
// Hidden
|
|
118
|
+
'&-hidden': {
|
|
119
|
+
display: 'none'
|
|
120
|
+
}
|
|
121
|
+
}))
|
|
116
122
|
}, "".concat(componentCls, "-submenu-hidden"), {
|
|
117
123
|
display: 'none'
|
|
118
|
-
}), _defineProperty({}, componentCls, _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, resetComponent(token)), clearFix()), {}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(
|
|
124
|
+
}), _defineProperty({}, componentCls, _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, resetComponent(token)), clearFix()), {}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({
|
|
119
125
|
marginBottom: 0,
|
|
120
126
|
paddingInlineStart: 0,
|
|
121
127
|
// Override default ul/ol
|
|
@@ -125,16 +131,19 @@ var getBaseStyle = function getBaseStyle(token) {
|
|
|
125
131
|
listStyle: 'none',
|
|
126
132
|
outline: 'none',
|
|
127
133
|
// Magic cubic here but smooth transition
|
|
128
|
-
transition: "width ".concat(motionDurationSlow, " cubic-bezier(0.2, 0, 0, 1) 0s")
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
134
|
+
transition: "width ".concat(motionDurationSlow, " cubic-bezier(0.2, 0, 0, 1) 0s"),
|
|
135
|
+
'ul, ol': {
|
|
136
|
+
margin: 0,
|
|
137
|
+
padding: 0,
|
|
138
|
+
listStyle: 'none'
|
|
139
|
+
},
|
|
140
|
+
// Overflow ellipsis
|
|
141
|
+
'&-overflow': _defineProperty({
|
|
142
|
+
display: 'flex'
|
|
143
|
+
}, "".concat(componentCls, "-item"), {
|
|
144
|
+
flex: 'none'
|
|
145
|
+
})
|
|
146
|
+
}, "".concat(componentCls, "-item, ").concat(componentCls, "-submenu, ").concat(componentCls, "-submenu-title"), {
|
|
138
147
|
borderRadius: token.itemBorderRadius
|
|
139
148
|
}), "".concat(componentCls, "-item-group-title"), {
|
|
140
149
|
padding: "".concat(unit(paddingXS), " ").concat(unit(padding)),
|
|
@@ -148,11 +157,20 @@ var getBaseStyle = function getBaseStyle(token) {
|
|
|
148
157
|
}), "".concat(componentCls, "-submenu ").concat(componentCls, "-sub"), {
|
|
149
158
|
cursor: 'initial',
|
|
150
159
|
transition: ["background ".concat(motionDurationSlow, " ").concat(motionEaseInOut), "padding ".concat(motionDurationSlow, " ").concat(motionEaseInOut)].join(',')
|
|
151
|
-
}), "".concat(componentCls, "-title-content"), _defineProperty({
|
|
152
|
-
transition: "color ".concat(motionDurationSlow)
|
|
160
|
+
}), "".concat(componentCls, "-title-content"), _defineProperty(_defineProperty({
|
|
161
|
+
transition: "color ".concat(motionDurationSlow),
|
|
162
|
+
'&-with-extra': {
|
|
163
|
+
display: 'inline-flex',
|
|
164
|
+
alignItems: 'center',
|
|
165
|
+
width: '100%'
|
|
166
|
+
}
|
|
153
167
|
}, "> ".concat(antCls, "-typography-ellipsis-single-line"), {
|
|
154
168
|
display: 'inline',
|
|
155
169
|
verticalAlign: 'unset'
|
|
170
|
+
}), "".concat(componentCls, "-item-extra"), {
|
|
171
|
+
marginInlineStart: 'auto',
|
|
172
|
+
paddingInlineStart: token.padding,
|
|
173
|
+
fontSize: token.fontSizeSM
|
|
156
174
|
})), "".concat(componentCls, "-item a"), {
|
|
157
175
|
'&::before': {
|
|
158
176
|
position: 'absolute',
|
|
@@ -46,8 +46,10 @@ var getThemeStyle = function getThemeStyle(token, themeSuffix) {
|
|
|
46
46
|
return _defineProperty({}, "".concat(componentCls, "-").concat(themeSuffix, ", ").concat(componentCls, "-").concat(themeSuffix, " > ").concat(componentCls), (_$concat$concat$conca2 = {
|
|
47
47
|
color: itemColor,
|
|
48
48
|
background: itemBg
|
|
49
|
-
}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_$concat$concat$conca2, "&".concat(componentCls, "-root:focus-visible"), _objectSpread({}, accessibilityFocus(token))), "".concat(componentCls, "-item
|
|
50
|
-
|
|
49
|
+
}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_$concat$concat$conca2, "&".concat(componentCls, "-root:focus-visible"), _objectSpread({}, accessibilityFocus(token))), "".concat(componentCls, "-item"), {
|
|
50
|
+
'&-group-title, &-extra': {
|
|
51
|
+
color: groupTitleColor
|
|
52
|
+
}
|
|
51
53
|
}), "".concat(componentCls, "-submenu-selected"), _defineProperty({}, "> ".concat(componentCls, "-submenu-title"), {
|
|
52
54
|
color: itemSelectedColor
|
|
53
55
|
})), "".concat(componentCls, "-item, ").concat(componentCls, "-submenu-title"), _defineProperty({
|
|
@@ -84,7 +86,7 @@ var getThemeStyle = function getThemeStyle(token, themeSuffix) {
|
|
|
84
86
|
color: itemSelectedColor
|
|
85
87
|
}, "&".concat(componentCls, "-item-danger"), {
|
|
86
88
|
color: dangerItemSelectedColor
|
|
87
|
-
}),
|
|
89
|
+
}), 'a, a:hover', {
|
|
88
90
|
color: 'inherit'
|
|
89
91
|
})), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_$concat$concat$conca2, "& ".concat(componentCls, "-item-selected"), _defineProperty({
|
|
90
92
|
backgroundColor: itemSelectedBg
|
|
@@ -98,7 +100,7 @@ var getThemeStyle = function getThemeStyle(token, themeSuffix) {
|
|
|
98
100
|
backgroundColor: popupBg
|
|
99
101
|
}), "&".concat(componentCls, "-horizontal"), _objectSpread(_objectSpread({}, themeSuffix === 'dark' ? {
|
|
100
102
|
borderBottom: 0
|
|
101
|
-
} : {}), {}, _defineProperty({}, "> ".concat(componentCls, "-item, > ").concat(componentCls, "-submenu"),
|
|
103
|
+
} : {}), {}, _defineProperty({}, "> ".concat(componentCls, "-item, > ").concat(componentCls, "-submenu"), {
|
|
102
104
|
top: activeBarBorderWidth,
|
|
103
105
|
marginTop: token.calc(activeBarBorderWidth).mul(-1).equal(),
|
|
104
106
|
marginBottom: 0,
|
|
@@ -110,24 +112,26 @@ var getThemeStyle = function getThemeStyle(token, themeSuffix) {
|
|
|
110
112
|
borderBottom: "".concat(unit(activeBarHeight), " solid transparent"),
|
|
111
113
|
transition: "border-color ".concat(motionDurationSlow, " ").concat(motionEaseInOut),
|
|
112
114
|
content: '""'
|
|
113
|
-
}
|
|
114
|
-
}, "&:hover, &-active, &-open", {
|
|
115
|
-
background: horizontalItemHoverBg,
|
|
116
|
-
'&::after': {
|
|
117
|
-
borderBottomWidth: activeBarHeight,
|
|
118
|
-
borderBottomColor: horizontalItemSelectedColor
|
|
119
|
-
}
|
|
120
|
-
}), "&-selected", {
|
|
121
|
-
color: horizontalItemSelectedColor,
|
|
122
|
-
backgroundColor: horizontalItemSelectedBg,
|
|
123
|
-
'&:hover': {
|
|
124
|
-
backgroundColor: horizontalItemSelectedBg
|
|
125
115
|
},
|
|
126
|
-
'
|
|
127
|
-
|
|
128
|
-
|
|
116
|
+
'&:hover, &-active, &-open': {
|
|
117
|
+
background: horizontalItemHoverBg,
|
|
118
|
+
'&::after': {
|
|
119
|
+
borderBottomWidth: activeBarHeight,
|
|
120
|
+
borderBottomColor: horizontalItemSelectedColor
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
'&-selected': {
|
|
124
|
+
color: horizontalItemSelectedColor,
|
|
125
|
+
backgroundColor: horizontalItemSelectedBg,
|
|
126
|
+
'&:hover': {
|
|
127
|
+
backgroundColor: horizontalItemSelectedBg
|
|
128
|
+
},
|
|
129
|
+
'&::after': {
|
|
130
|
+
borderBottomWidth: activeBarHeight,
|
|
131
|
+
borderBottomColor: horizontalItemSelectedColor
|
|
132
|
+
}
|
|
129
133
|
}
|
|
130
|
-
})))
|
|
134
|
+
}))), "&".concat(componentCls, "-root"), _defineProperty({}, "&".concat(componentCls, "-inline, &").concat(componentCls, "-vertical"), {
|
|
131
135
|
borderInlineEnd: "".concat(unit(activeBarBorderWidth), " ").concat(lineType, " ").concat(colorSplit)
|
|
132
136
|
})), "&".concat(componentCls, "-inline"), _defineProperty(_defineProperty(_defineProperty({}, "".concat(componentCls, "-sub").concat(componentCls, "-inline"), {
|
|
133
137
|
background: subMenuItemBg
|
|
@@ -14,7 +14,8 @@ var getVerticalInlineStyle = function getVerticalInlineStyle(token) {
|
|
|
14
14
|
menuArrowSize = token.menuArrowSize,
|
|
15
15
|
marginXS = token.marginXS,
|
|
16
16
|
itemMarginBlock = token.itemMarginBlock,
|
|
17
|
-
itemWidth = token.itemWidth
|
|
17
|
+
itemWidth = token.itemWidth,
|
|
18
|
+
itemPaddingInline = token.itemPaddingInline;
|
|
18
19
|
var paddingWithArrow = token.calc(menuArrowSize).add(padding).add(marginXS).equal();
|
|
19
20
|
return _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(componentCls, "-item"), {
|
|
20
21
|
position: 'relative',
|
|
@@ -22,7 +23,7 @@ var getVerticalInlineStyle = function getVerticalInlineStyle(token) {
|
|
|
22
23
|
}), "".concat(componentCls, "-item, ").concat(componentCls, "-submenu-title"), {
|
|
23
24
|
height: itemHeight,
|
|
24
25
|
lineHeight: unit(itemHeight),
|
|
25
|
-
paddingInline:
|
|
26
|
+
paddingInline: itemPaddingInline,
|
|
26
27
|
overflow: 'hidden',
|
|
27
28
|
textOverflow: 'ellipsis',
|
|
28
29
|
marginInline: itemMarginInline,
|
|
@@ -42,11 +43,11 @@ var getVerticalStyle = function getVerticalStyle(token) {
|
|
|
42
43
|
colorTextLightSolid = token.colorTextLightSolid,
|
|
43
44
|
dropdownWidth = token.dropdownWidth,
|
|
44
45
|
controlHeightLG = token.controlHeightLG,
|
|
45
|
-
motionDurationMid = token.motionDurationMid,
|
|
46
46
|
motionEaseOut = token.motionEaseOut,
|
|
47
47
|
paddingXL = token.paddingXL,
|
|
48
48
|
itemMarginInline = token.itemMarginInline,
|
|
49
49
|
fontSizeLG = token.fontSizeLG,
|
|
50
|
+
motionDurationFast = token.motionDurationFast,
|
|
50
51
|
motionDurationSlow = token.motionDurationSlow,
|
|
51
52
|
paddingXS = token.paddingXS,
|
|
52
53
|
boxShadowSecondary = token.boxShadowSecondary,
|
|
@@ -58,9 +59,11 @@ var getVerticalStyle = function getVerticalStyle(token) {
|
|
|
58
59
|
listStylePosition: 'inside',
|
|
59
60
|
listStyleType: 'disc'
|
|
60
61
|
};
|
|
61
|
-
return [_defineProperty(_defineProperty({}, componentCls,
|
|
62
|
-
|
|
63
|
-
|
|
62
|
+
return [_defineProperty(_defineProperty({}, componentCls, {
|
|
63
|
+
'&-inline, &-vertical': _objectSpread(_defineProperty({}, "&".concat(componentCls, "-root"), {
|
|
64
|
+
boxShadow: 'none'
|
|
65
|
+
}), getVerticalInlineStyle(token))
|
|
66
|
+
}), "".concat(componentCls, "-submenu-popup"), _defineProperty({}, "".concat(componentCls, "-vertical"), _objectSpread(_objectSpread({}, getVerticalInlineStyle(token)), {}, {
|
|
64
67
|
boxShadow: boxShadowSecondary
|
|
65
68
|
}))), // Vertical only
|
|
66
69
|
_defineProperty({}, "".concat(componentCls, "-submenu-popup ").concat(componentCls, "-vertical").concat(componentCls, "-sub"), {
|
|
@@ -81,7 +84,7 @@ var getVerticalStyle = function getVerticalStyle(token) {
|
|
|
81
84
|
}, "&".concat(componentCls, "-root"), _defineProperty({}, "".concat(componentCls, "-item, ").concat(componentCls, "-submenu-title"), _defineProperty(_defineProperty({
|
|
82
85
|
display: 'flex',
|
|
83
86
|
alignItems: 'center',
|
|
84
|
-
transition: ["border-color ".concat(motionDurationSlow), "background ".concat(motionDurationSlow), "padding ".concat(
|
|
87
|
+
transition: ["border-color ".concat(motionDurationSlow), "background ".concat(motionDurationSlow), "padding ".concat(motionDurationFast, " ").concat(motionEaseOut)].join(',')
|
|
85
88
|
}, "> ".concat(componentCls, "-title-content"), {
|
|
86
89
|
flex: 'auto',
|
|
87
90
|
minWidth: 0,
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
var _excluded = ["prefixCls", "className", "type", "icon", "content"];
|
|
2
1
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
var _excluded = ["prefixCls", "className", "type", "icon", "content"];
|
|
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
|
+
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; }
|
|
6
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
7
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
5
8
|
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
6
9
|
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."); }
|
|
7
10
|
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; } }
|
|
@@ -10,22 +13,18 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
|
|
|
10
13
|
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
11
14
|
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var s = Object.getOwnPropertySymbols(e); for (r = 0; r < s.length; r++) o = s[r], t.includes(o) || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
12
15
|
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import
|
|
23
|
-
import
|
|
24
|
-
import
|
|
25
|
-
import { ConfigContext } from "../config-provider";
|
|
26
|
-
import useCSSVarCls from "../config-provider/hooks/useCSSVarCls";
|
|
27
|
-
import useStyle from "./style";
|
|
28
|
-
import CloseSvg from "./assets/Close";
|
|
16
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
17
|
+
import * as React from 'react';
|
|
18
|
+
import CheckCircleFilled from '@ant-design/icons/CheckCircleFilled';
|
|
19
|
+
import CloseCircleFilled from '@ant-design/icons/CloseCircleFilled';
|
|
20
|
+
import ExclamationCircleFilled from '@ant-design/icons/ExclamationCircleFilled';
|
|
21
|
+
import InfoCircleFilled from '@ant-design/icons/InfoCircleFilled';
|
|
22
|
+
import LoadingOutlined from '@ant-design/icons/LoadingOutlined';
|
|
23
|
+
import classNames from 'classnames';
|
|
24
|
+
import { Notice } from 'rc-notification';
|
|
25
|
+
import { ConfigContext } from '../config-provider';
|
|
26
|
+
import useCSSVarCls from '../config-provider/hooks/useCSSVarCls';
|
|
27
|
+
import useStyle from './style';
|
|
29
28
|
export var TypeIcon = {
|
|
30
29
|
info: _jsx(InfoCircleFilled, {}),
|
|
31
30
|
success: _jsx(CheckCircleFilled, {}),
|
|
@@ -37,28 +36,11 @@ export var PureContent = function PureContent(_ref) {
|
|
|
37
36
|
var prefixCls = _ref.prefixCls,
|
|
38
37
|
type = _ref.type,
|
|
39
38
|
icon = _ref.icon,
|
|
40
|
-
children = _ref.children
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
children: [_jsxs("div", {
|
|
46
|
-
className: classNames("".concat(prefixCls, "-custom-content"), "".concat(prefixCls, "-").concat(type), _defineProperty({}, "".concat(prefixCls, "-custom-content-has-dec"), dec)),
|
|
47
|
-
children: [icon || TypeIcon[type], _jsx("span", {
|
|
48
|
-
className: "".concat(prefixCls, "-custom-header-content"),
|
|
49
|
-
children: children
|
|
50
|
-
}), closable && _jsx("span", {
|
|
51
|
-
onClick: function onClick() {
|
|
52
|
-
onClose === null || onClose === void 0 || onClose();
|
|
53
|
-
},
|
|
54
|
-
className: "".concat(prefixCls, "-custom-header-close-wrapper"),
|
|
55
|
-
children: _jsx(CloseSvg, {
|
|
56
|
-
className: "".concat(prefixCls, "-custom-header-close")
|
|
57
|
-
})
|
|
58
|
-
})]
|
|
59
|
-
}), dec && _jsx("div", {
|
|
60
|
-
className: classNames(_defineProperty(_defineProperty({}, "".concat(prefixCls, "-custom-dec-wrapper"), true), "".concat(prefixCls, "-custom-dec-not-closable"), !closable)),
|
|
61
|
-
children: dec
|
|
39
|
+
children = _ref.children;
|
|
40
|
+
return _jsxs("div", {
|
|
41
|
+
className: classNames("".concat(prefixCls, "-custom-content"), "".concat(prefixCls, "-").concat(type)),
|
|
42
|
+
children: [icon || TypeIcon[type], _jsx("span", {
|
|
43
|
+
children: children
|
|
62
44
|
})]
|
|
63
45
|
});
|
|
64
46
|
};
|
|
@@ -72,7 +54,7 @@ var PurePanel = function PurePanel(props) {
|
|
|
72
54
|
restProps = _objectWithoutProperties(props, _excluded);
|
|
73
55
|
var _React$useContext = React.useContext(ConfigContext),
|
|
74
56
|
getPrefixCls = _React$useContext.getPrefixCls;
|
|
75
|
-
var prefixCls = staticPrefixCls || getPrefixCls(
|
|
57
|
+
var prefixCls = staticPrefixCls || getPrefixCls('message');
|
|
76
58
|
var rootCls = useCSSVarCls(prefixCls);
|
|
77
59
|
var _useStyle = useStyle(prefixCls, rootCls),
|
|
78
60
|
_useStyle2 = _slicedToArray(_useStyle, 3),
|
|
@@ -51,63 +51,24 @@ var genMessageStyle = function genMessageStyle(token) {
|
|
|
51
51
|
opacity: 0
|
|
52
52
|
}
|
|
53
53
|
});
|
|
54
|
-
var noticeStyle = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({
|
|
54
|
+
var noticeStyle = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({
|
|
55
55
|
padding: paddingXS,
|
|
56
56
|
textAlign: 'center'
|
|
57
|
-
}, "".concat(componentCls, "-custom-content
|
|
58
|
-
|
|
57
|
+
}, "".concat(componentCls, "-custom-content"), {
|
|
58
|
+
display: 'flex',
|
|
59
|
+
alignItems: 'center'
|
|
60
|
+
}), "".concat(componentCls, "-custom-content > ").concat(iconCls), {
|
|
59
61
|
marginInlineEnd: marginXS,
|
|
60
62
|
// affected by ltr or rtl
|
|
61
63
|
fontSize: fontSizeLG
|
|
62
|
-
}), "".concat(noticeCls, "-content"),
|
|
64
|
+
}), "".concat(noticeCls, "-content"), {
|
|
63
65
|
display: 'inline-block',
|
|
64
66
|
padding: contentPadding,
|
|
65
67
|
background: contentBg,
|
|
66
68
|
borderRadius: borderRadiusLG,
|
|
67
69
|
boxShadow: boxShadow,
|
|
68
|
-
pointerEvents: 'all'
|
|
69
|
-
|
|
70
|
-
}, "&:has(".concat(componentCls, "-custom-dec-wrapper)"), {
|
|
71
|
-
paddingBottom: "12px",
|
|
72
|
-
width: "400px"
|
|
73
|
-
}), "".concat(componentCls, "-custom-content"), _defineProperty(_defineProperty(_defineProperty(_defineProperty({
|
|
74
|
-
display: "flex",
|
|
75
|
-
lineHeight: "22px"
|
|
76
|
-
}, "> ".concat(iconCls), {
|
|
77
|
-
fontSize: "16px",
|
|
78
|
-
width: "16px",
|
|
79
|
-
height: "16px",
|
|
80
|
-
transform: "translateY(3px)"
|
|
81
|
-
}), "".concat(componentCls, "-custom-header-content"), {
|
|
82
|
-
display: "inline-block",
|
|
83
|
-
fontSize: "14px",
|
|
84
|
-
lineHeight: "22px",
|
|
85
|
-
flex: "1",
|
|
86
|
-
flexBasis: "auto",
|
|
87
|
-
textAlign: "left",
|
|
88
|
-
marginRight: "16px",
|
|
89
|
-
wordBreak: "break-all"
|
|
90
|
-
}), "".concat(componentCls, "-custom-header-close-wrapper"), {
|
|
91
|
-
display: "inline-block",
|
|
92
|
-
height: "22px",
|
|
93
|
-
lineHeight: "22px",
|
|
94
|
-
cursor: "pointer",
|
|
95
|
-
"&:hover": {
|
|
96
|
-
color: token.colorPrimaryHover
|
|
97
|
-
}
|
|
98
|
-
}), "&".concat(componentCls, "-custom-content-has-dec"), _defineProperty({}, "".concat(componentCls, "-custom-header-content"), {
|
|
99
|
-
fontWeight: "500"
|
|
100
|
-
}))), "".concat(componentCls, "-custom-dec-wrapper"), _defineProperty({
|
|
101
|
-
textAlign: "left",
|
|
102
|
-
paddingLeft: "24px",
|
|
103
|
-
paddingRight: "32px",
|
|
104
|
-
marginTop: "6px",
|
|
105
|
-
fontSize: "14px",
|
|
106
|
-
lineHeight: "22px",
|
|
107
|
-
wordBreak: "break-all"
|
|
108
|
-
}, "&".concat(componentCls, "-custom-dec-not-closable"), {
|
|
109
|
-
paddingRight: "16px"
|
|
110
|
-
}))), "".concat(componentCls, "-success > ").concat(iconCls), {
|
|
70
|
+
pointerEvents: 'all'
|
|
71
|
+
}), "".concat(componentCls, "-success > ").concat(iconCls), {
|
|
111
72
|
color: colorSuccess
|
|
112
73
|
}), "".concat(componentCls, "-error > ").concat(iconCls), {
|
|
113
74
|
color: colorError
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var _excluded = ["content", "icon", "type", "key", "className", "style", "onClose"
|
|
1
|
+
var _excluded = ["content", "icon", "type", "key", "className", "style", "onClose"];
|
|
2
2
|
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); }
|
|
3
3
|
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var s = Object.getOwnPropertySymbols(e); for (r = 0; r < s.length; r++) o = s[r], t.includes(o) || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
4
4
|
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
|
|
@@ -151,18 +151,12 @@ export function useInternalMessage(messageConfig) {
|
|
|
151
151
|
className = config.className,
|
|
152
152
|
style = config.style,
|
|
153
153
|
_onClose = config.onClose,
|
|
154
|
-
_config$closable = config.closable,
|
|
155
|
-
closable = _config$closable === void 0 ? true : _config$closable,
|
|
156
|
-
dec = config.dec,
|
|
157
154
|
restConfig = _objectWithoutProperties(config, _excluded);
|
|
158
155
|
var mergedKey = key;
|
|
159
156
|
if (mergedKey === undefined || mergedKey === null) {
|
|
160
157
|
keyIndex += 1;
|
|
161
158
|
mergedKey = "antd-message-".concat(keyIndex);
|
|
162
159
|
}
|
|
163
|
-
var onCloseCustom = function onCloseCustom() {
|
|
164
|
-
close(mergedKey);
|
|
165
|
-
};
|
|
166
160
|
return wrapPromiseFn(function (resolve) {
|
|
167
161
|
originOpen(_objectSpread(_objectSpread({}, restConfig), {}, {
|
|
168
162
|
key: mergedKey,
|
|
@@ -170,9 +164,6 @@ export function useInternalMessage(messageConfig) {
|
|
|
170
164
|
prefixCls: prefixCls,
|
|
171
165
|
type: type,
|
|
172
166
|
icon: icon,
|
|
173
|
-
onClose: onCloseCustom,
|
|
174
|
-
closable: closable,
|
|
175
|
-
dec: dec,
|
|
176
167
|
children: content
|
|
177
168
|
}),
|
|
178
169
|
placement: 'top',
|
|
@@ -204,8 +195,7 @@ export function useInternalMessage(messageConfig) {
|
|
|
204
195
|
};
|
|
205
196
|
var keys = ['info', 'success', 'warning', 'error', 'loading'];
|
|
206
197
|
keys.forEach(function (type) {
|
|
207
|
-
var typeOpen = function typeOpen(jointContent, duration, onClose
|
|
208
|
-
var closable = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : true;
|
|
198
|
+
var typeOpen = function typeOpen(jointContent, duration, onClose) {
|
|
209
199
|
var config;
|
|
210
200
|
if (jointContent && _typeof(jointContent) === 'object' && 'content' in jointContent) {
|
|
211
201
|
config = jointContent;
|
|
@@ -225,9 +215,7 @@ export function useInternalMessage(messageConfig) {
|
|
|
225
215
|
}
|
|
226
216
|
var mergedConfig = _objectSpread(_objectSpread({
|
|
227
217
|
onClose: mergedOnClose,
|
|
228
|
-
duration: mergedDuration
|
|
229
|
-
dec: dec,
|
|
230
|
-
closable: closable
|
|
218
|
+
duration: mergedDuration
|
|
231
219
|
}, config), {}, {
|
|
232
220
|
type: type
|
|
233
221
|
});
|