@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
|
@@ -16,7 +16,7 @@ import useState from 'rc-util/lib/hooks/useState';
|
|
|
16
16
|
import Button from '../button';
|
|
17
17
|
import { convertLegacyProps } from '../button/buttonHelpers';
|
|
18
18
|
function isThenable(thing) {
|
|
19
|
-
return !!(thing && thing.then);
|
|
19
|
+
return !!(thing !== null && thing !== void 0 && thing.then);
|
|
20
20
|
}
|
|
21
21
|
var ActionButton = function ActionButton(props) {
|
|
22
22
|
var type = props.type,
|
|
@@ -46,7 +46,9 @@ var ActionButton = function ActionButton(props) {
|
|
|
46
46
|
if (autoFocus) {
|
|
47
47
|
timeoutId = setTimeout(function () {
|
|
48
48
|
var _buttonRef$current;
|
|
49
|
-
(_buttonRef$current = buttonRef.current) === null || _buttonRef$current === void 0 || _buttonRef$current.focus(
|
|
49
|
+
(_buttonRef$current = buttonRef.current) === null || _buttonRef$current === void 0 || _buttonRef$current.focus({
|
|
50
|
+
preventScroll: true
|
|
51
|
+
});
|
|
50
52
|
});
|
|
51
53
|
}
|
|
52
54
|
return function () {
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { NoFormStyle } from '../form/context';
|
|
4
|
+
import { NoCompactStyle } from '../space/Compact';
|
|
5
|
+
var ContextIsolator = function ContextIsolator(props) {
|
|
6
|
+
var space = props.space,
|
|
7
|
+
form = props.form,
|
|
8
|
+
children = props.children;
|
|
9
|
+
if (children === undefined || children === null) {
|
|
10
|
+
return null;
|
|
11
|
+
}
|
|
12
|
+
var result = children;
|
|
13
|
+
if (form) {
|
|
14
|
+
result = _jsx(NoFormStyle, {
|
|
15
|
+
override: true,
|
|
16
|
+
status: true,
|
|
17
|
+
children: result
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
if (space) {
|
|
21
|
+
result = _jsx(NoCompactStyle, {
|
|
22
|
+
children: result
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
return result;
|
|
26
|
+
};
|
|
27
|
+
export default ContextIsolator;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
// eslint-disable-next-line import/prefer-default-export
|
|
2
1
|
export function easeInOutCubic(t, b, c, d) {
|
|
3
2
|
var cc = c - b;
|
|
3
|
+
// biome-ignore lint: it is a common easing function
|
|
4
4
|
t /= d / 2;
|
|
5
5
|
if (t < 1) {
|
|
6
6
|
return cc / 2 * t * t * t + b;
|
|
7
7
|
}
|
|
8
|
-
//
|
|
8
|
+
// biome-ignore lint: it is a common easing function
|
|
9
9
|
return cc / 2 * ((t -= 2) * t * t + 2) + b;
|
|
10
10
|
}
|
|
@@ -1,29 +1,30 @@
|
|
|
1
1
|
export function isWindow(obj) {
|
|
2
2
|
return obj !== null && obj !== undefined && obj === obj.window;
|
|
3
3
|
}
|
|
4
|
-
|
|
4
|
+
var getScroll = function getScroll(target) {
|
|
5
5
|
if (typeof window === 'undefined') {
|
|
6
6
|
return 0;
|
|
7
7
|
}
|
|
8
|
-
var method = top ? 'scrollTop' : 'scrollLeft';
|
|
9
8
|
var result = 0;
|
|
10
9
|
if (isWindow(target)) {
|
|
11
|
-
result = target
|
|
10
|
+
result = target.pageYOffset;
|
|
12
11
|
} else if (target instanceof Document) {
|
|
13
|
-
result = target.documentElement
|
|
12
|
+
result = target.documentElement.scrollTop;
|
|
14
13
|
} else if (target instanceof HTMLElement) {
|
|
15
|
-
result = target
|
|
14
|
+
result = target.scrollTop;
|
|
16
15
|
} else if (target) {
|
|
17
16
|
// According to the type inference, the `target` is `never` type.
|
|
18
17
|
// Since we configured the loose mode type checking, and supports mocking the target with such shape below::
|
|
19
18
|
// `{ documentElement: { scrollLeft: 200, scrollTop: 400 } }`,
|
|
20
19
|
// the program may falls into this branch.
|
|
21
20
|
// Check the corresponding tests for details. Don't sure what is the real scenario this happens.
|
|
22
|
-
|
|
21
|
+
/* biome-ignore lint/complexity/useLiteralKeys: target is a never type */ /* eslint-disable-next-line dot-notation */
|
|
22
|
+
result = target['scrollTop'];
|
|
23
23
|
}
|
|
24
24
|
if (target && !isWindow(target) && typeof result !== 'number') {
|
|
25
25
|
var _documentElement, _target$ownerDocument;
|
|
26
|
-
result = (_documentElement = ((_target$ownerDocument = target.ownerDocument) !== null && _target$ownerDocument !== void 0 ? _target$ownerDocument : target).documentElement) === null || _documentElement === void 0 ? void 0 : _documentElement
|
|
26
|
+
result = (_documentElement = ((_target$ownerDocument = target.ownerDocument) !== null && _target$ownerDocument !== void 0 ? _target$ownerDocument : target).documentElement) === null || _documentElement === void 0 ? void 0 : _documentElement.scrollTop;
|
|
27
27
|
}
|
|
28
28
|
return result;
|
|
29
|
-
}
|
|
29
|
+
};
|
|
30
|
+
export default getScroll;
|
|
@@ -67,6 +67,7 @@ export default function useClosable(propCloseCollection, contextCloseCollection)
|
|
|
67
67
|
// Align the `props`, `context` `fallback` to config object first
|
|
68
68
|
var propCloseConfig = useClosableConfig(propCloseCollection);
|
|
69
69
|
var contextCloseConfig = useClosableConfig(contextCloseCollection);
|
|
70
|
+
var closeBtnIsDisabled = typeof propCloseConfig !== 'boolean' ? !!(propCloseConfig !== null && propCloseConfig !== void 0 && propCloseConfig.disabled) : false;
|
|
70
71
|
var mergedFallbackCloseCollection = React.useMemo(function () {
|
|
71
72
|
return _objectSpread({
|
|
72
73
|
closeIcon: _jsx(CloseOutlined, {})
|
|
@@ -96,7 +97,7 @@ export default function useClosable(propCloseCollection, contextCloseCollection)
|
|
|
96
97
|
// Calculate the final closeIcon
|
|
97
98
|
return React.useMemo(function () {
|
|
98
99
|
if (mergedClosableConfig === false) {
|
|
99
|
-
return [false, null];
|
|
100
|
+
return [false, null, closeBtnIsDisabled];
|
|
100
101
|
}
|
|
101
102
|
var closeIconRender = mergedFallbackCloseCollection.closeIconRender;
|
|
102
103
|
var closeIcon = mergedClosableConfig.closeIcon;
|
|
@@ -114,6 +115,6 @@ export default function useClosable(propCloseCollection, contextCloseCollection)
|
|
|
114
115
|
}));
|
|
115
116
|
}
|
|
116
117
|
}
|
|
117
|
-
return [true, mergedCloseIcon];
|
|
118
|
+
return [true, mergedCloseIcon, closeBtnIsDisabled];
|
|
118
119
|
}, [mergedClosableConfig, mergedFallbackCloseCollection]);
|
|
119
120
|
}
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
3
|
+
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
4
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
6
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
|
+
import React from 'react';
|
|
8
|
+
var BEAT_LIMIT = 1000 * 60 * 10;
|
|
9
|
+
/**
|
|
10
|
+
* A helper class to map keys to values.
|
|
11
|
+
* It supports both primitive keys and object keys.
|
|
12
|
+
*/
|
|
13
|
+
var ArrayKeyMap = /*#__PURE__*/function () {
|
|
14
|
+
function ArrayKeyMap() {
|
|
15
|
+
_classCallCheck(this, ArrayKeyMap);
|
|
16
|
+
Object.defineProperty(this, "map", {
|
|
17
|
+
enumerable: true,
|
|
18
|
+
configurable: true,
|
|
19
|
+
writable: true,
|
|
20
|
+
value: new Map()
|
|
21
|
+
});
|
|
22
|
+
// Use WeakMap to avoid memory leak
|
|
23
|
+
Object.defineProperty(this, "objectIDMap", {
|
|
24
|
+
enumerable: true,
|
|
25
|
+
configurable: true,
|
|
26
|
+
writable: true,
|
|
27
|
+
value: new WeakMap()
|
|
28
|
+
});
|
|
29
|
+
Object.defineProperty(this, "nextID", {
|
|
30
|
+
enumerable: true,
|
|
31
|
+
configurable: true,
|
|
32
|
+
writable: true,
|
|
33
|
+
value: 0
|
|
34
|
+
});
|
|
35
|
+
Object.defineProperty(this, "lastAccessBeat", {
|
|
36
|
+
enumerable: true,
|
|
37
|
+
configurable: true,
|
|
38
|
+
writable: true,
|
|
39
|
+
value: new Map()
|
|
40
|
+
});
|
|
41
|
+
// We will clean up the cache when reach the limit
|
|
42
|
+
Object.defineProperty(this, "accessBeat", {
|
|
43
|
+
enumerable: true,
|
|
44
|
+
configurable: true,
|
|
45
|
+
writable: true,
|
|
46
|
+
value: 0
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
return _createClass(ArrayKeyMap, [{
|
|
50
|
+
key: "set",
|
|
51
|
+
value: function set(keys, value) {
|
|
52
|
+
// New set will trigger clear
|
|
53
|
+
this.clear();
|
|
54
|
+
// Set logic
|
|
55
|
+
var compositeKey = this.getCompositeKey(keys);
|
|
56
|
+
this.map.set(compositeKey, value);
|
|
57
|
+
this.lastAccessBeat.set(compositeKey, Date.now());
|
|
58
|
+
}
|
|
59
|
+
}, {
|
|
60
|
+
key: "get",
|
|
61
|
+
value: function get(keys) {
|
|
62
|
+
var compositeKey = this.getCompositeKey(keys);
|
|
63
|
+
var cache = this.map.get(compositeKey);
|
|
64
|
+
this.lastAccessBeat.set(compositeKey, Date.now());
|
|
65
|
+
this.accessBeat += 1;
|
|
66
|
+
return cache;
|
|
67
|
+
}
|
|
68
|
+
}, {
|
|
69
|
+
key: "getCompositeKey",
|
|
70
|
+
value: function getCompositeKey(keys) {
|
|
71
|
+
var _this = this;
|
|
72
|
+
var ids = keys.map(function (key) {
|
|
73
|
+
if (key && _typeof(key) === 'object') {
|
|
74
|
+
return "obj_".concat(_this.getObjectID(key));
|
|
75
|
+
}
|
|
76
|
+
return "".concat(_typeof(key), "_").concat(key);
|
|
77
|
+
});
|
|
78
|
+
return ids.join('|');
|
|
79
|
+
}
|
|
80
|
+
}, {
|
|
81
|
+
key: "getObjectID",
|
|
82
|
+
value: function getObjectID(obj) {
|
|
83
|
+
if (this.objectIDMap.has(obj)) {
|
|
84
|
+
return this.objectIDMap.get(obj);
|
|
85
|
+
}
|
|
86
|
+
var id = this.nextID;
|
|
87
|
+
this.objectIDMap.set(obj, id);
|
|
88
|
+
this.nextID += 1;
|
|
89
|
+
return id;
|
|
90
|
+
}
|
|
91
|
+
}, {
|
|
92
|
+
key: "clear",
|
|
93
|
+
value: function clear() {
|
|
94
|
+
var _this2 = this;
|
|
95
|
+
if (this.accessBeat > 10000) {
|
|
96
|
+
var now = Date.now();
|
|
97
|
+
this.lastAccessBeat.forEach(function (beat, key) {
|
|
98
|
+
if (now - beat > BEAT_LIMIT) {
|
|
99
|
+
_this2.map["delete"](key);
|
|
100
|
+
_this2.lastAccessBeat["delete"](key);
|
|
101
|
+
}
|
|
102
|
+
});
|
|
103
|
+
this.accessBeat = 0;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}]);
|
|
107
|
+
}();
|
|
108
|
+
var uniqueMap = new ArrayKeyMap();
|
|
109
|
+
/**
|
|
110
|
+
* Like `useMemo`, but this hook result will be shared across all instances.
|
|
111
|
+
*/
|
|
112
|
+
function useUniqueMemo(memoFn, deps) {
|
|
113
|
+
return React.useMemo(function () {
|
|
114
|
+
var cachedValue = uniqueMap.get(deps);
|
|
115
|
+
if (cachedValue) {
|
|
116
|
+
return cachedValue;
|
|
117
|
+
}
|
|
118
|
+
var newValue = memoFn();
|
|
119
|
+
uniqueMap.set(deps, newValue);
|
|
120
|
+
return newValue;
|
|
121
|
+
}, deps);
|
|
122
|
+
}
|
|
123
|
+
export default useUniqueMemo;
|
|
@@ -6,6 +6,7 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
|
|
|
6
6
|
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
7
7
|
import React from 'react';
|
|
8
8
|
import useToken from '../../theme/useToken';
|
|
9
|
+
import { devUseWarning } from '../warning';
|
|
9
10
|
import zIndexContext from '../zindexContext';
|
|
10
11
|
// Z-Index control range
|
|
11
12
|
// Container: 1000 + offset 100 (max base + 10 * offset = 2000)
|
|
@@ -14,13 +15,20 @@ import zIndexContext from '../zindexContext';
|
|
|
14
15
|
var CONTAINER_OFFSET = 100;
|
|
15
16
|
var CONTAINER_OFFSET_MAX_COUNT = 10;
|
|
16
17
|
export var CONTAINER_MAX_OFFSET = CONTAINER_OFFSET * CONTAINER_OFFSET_MAX_COUNT;
|
|
18
|
+
/**
|
|
19
|
+
* Static function will default be the `CONTAINER_MAX_OFFSET`.
|
|
20
|
+
* But it still may have children component like Select, Dropdown.
|
|
21
|
+
* So the warning zIndex should exceed the `CONTAINER_MAX_OFFSET`.
|
|
22
|
+
*/
|
|
23
|
+
var CONTAINER_MAX_OFFSET_WITH_CHILDREN = CONTAINER_MAX_OFFSET + CONTAINER_OFFSET;
|
|
17
24
|
export var containerBaseZIndexOffset = {
|
|
18
25
|
Modal: CONTAINER_OFFSET,
|
|
19
26
|
Drawer: CONTAINER_OFFSET,
|
|
20
27
|
Popover: CONTAINER_OFFSET,
|
|
21
28
|
Popconfirm: CONTAINER_OFFSET,
|
|
22
29
|
Tooltip: CONTAINER_OFFSET,
|
|
23
|
-
Tour: CONTAINER_OFFSET
|
|
30
|
+
Tour: CONTAINER_OFFSET,
|
|
31
|
+
FloatButton: CONTAINER_OFFSET
|
|
24
32
|
};
|
|
25
33
|
export var consumerBaseZIndexOffset = {
|
|
26
34
|
SelectLike: 50,
|
|
@@ -32,25 +40,33 @@ export var consumerBaseZIndexOffset = {
|
|
|
32
40
|
function isContainerType(type) {
|
|
33
41
|
return type in containerBaseZIndexOffset;
|
|
34
42
|
}
|
|
35
|
-
export function useZIndex(componentType, customZIndex) {
|
|
43
|
+
export var useZIndex = function useZIndex(componentType, customZIndex) {
|
|
36
44
|
var _useToken = useToken(),
|
|
37
45
|
_useToken2 = _slicedToArray(_useToken, 2),
|
|
38
46
|
token = _useToken2[1];
|
|
39
47
|
var parentZIndex = React.useContext(zIndexContext);
|
|
40
48
|
var isContainer = isContainerType(componentType);
|
|
49
|
+
var result;
|
|
41
50
|
if (customZIndex !== undefined) {
|
|
42
|
-
|
|
43
|
-
}
|
|
44
|
-
var zIndex = parentZIndex !== null && parentZIndex !== void 0 ? parentZIndex : 0;
|
|
45
|
-
if (isContainer) {
|
|
46
|
-
zIndex +=
|
|
47
|
-
// Use preset token zIndex by default but not stack when has parent container
|
|
48
|
-
(parentZIndex ? 0 : token.zIndexPopupBase) +
|
|
49
|
-
// Container offset
|
|
50
|
-
containerBaseZIndexOffset[componentType];
|
|
51
|
-
zIndex = Math.min(zIndex, token.zIndexPopupBase + CONTAINER_MAX_OFFSET);
|
|
51
|
+
result = [customZIndex, customZIndex];
|
|
52
52
|
} else {
|
|
53
|
-
zIndex
|
|
53
|
+
var zIndex = parentZIndex !== null && parentZIndex !== void 0 ? parentZIndex : 0;
|
|
54
|
+
if (isContainer) {
|
|
55
|
+
zIndex +=
|
|
56
|
+
// Use preset token zIndex by default but not stack when has parent container
|
|
57
|
+
(parentZIndex ? 0 : token.zIndexPopupBase) +
|
|
58
|
+
// Container offset
|
|
59
|
+
containerBaseZIndexOffset[componentType];
|
|
60
|
+
} else {
|
|
61
|
+
zIndex += consumerBaseZIndexOffset[componentType];
|
|
62
|
+
}
|
|
63
|
+
result = [parentZIndex === undefined ? customZIndex : zIndex, zIndex];
|
|
64
|
+
}
|
|
65
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
66
|
+
var warning = devUseWarning(componentType);
|
|
67
|
+
var maxZIndex = token.zIndexPopupBase + CONTAINER_MAX_OFFSET_WITH_CHILDREN;
|
|
68
|
+
var currentZIndex = result[0] || 0;
|
|
69
|
+
warning(customZIndex !== undefined || currentZIndex <= maxZIndex, 'usage', '`zIndex` is over design token `zIndexPopupBase` too much. It may cause unexpected override.');
|
|
54
70
|
}
|
|
55
|
-
return
|
|
56
|
-
}
|
|
71
|
+
return result;
|
|
72
|
+
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { defaultPrefixCls } from '../config-provider';
|
|
1
2
|
// ================== Collapse Motion ==================
|
|
2
3
|
var getCollapsedHeight = function getCollapsedHeight() {
|
|
3
4
|
return {
|
|
@@ -21,7 +22,7 @@ var skipOpacityTransition = function skipOpacityTransition(_, event) {
|
|
|
21
22
|
return (event === null || event === void 0 ? void 0 : event.deadline) === true || event.propertyName === 'height';
|
|
22
23
|
};
|
|
23
24
|
var initCollapseMotion = function initCollapseMotion() {
|
|
24
|
-
var rootCls = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] :
|
|
25
|
+
var rootCls = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultPrefixCls;
|
|
25
26
|
return {
|
|
26
27
|
motionName: "".concat(rootCls, "-motion-collapse"),
|
|
27
28
|
onAppearStart: getCollapsedHeight,
|
|
@@ -36,7 +37,7 @@ var initCollapseMotion = function initCollapseMotion() {
|
|
|
36
37
|
motionDeadline: 500
|
|
37
38
|
};
|
|
38
39
|
};
|
|
39
|
-
var
|
|
40
|
+
var _SelectPlacements = ['bottomLeft', 'bottomRight', 'topLeft', 'topRight'];
|
|
40
41
|
var getTransitionName = function getTransitionName(rootPrefixCls, motion, transitionName) {
|
|
41
42
|
if (transitionName !== undefined) {
|
|
42
43
|
return transitionName;
|
|
@@ -163,11 +163,11 @@ export default function getPlacements(config) {
|
|
|
163
163
|
break;
|
|
164
164
|
case 'leftTop':
|
|
165
165
|
case 'rightTop':
|
|
166
|
-
placementInfo.offset[1] = -arrowOffset.arrowOffsetHorizontal
|
|
166
|
+
placementInfo.offset[1] = -arrowOffset.arrowOffsetHorizontal * 2 + halfArrowWidth;
|
|
167
167
|
break;
|
|
168
168
|
case 'leftBottom':
|
|
169
169
|
case 'rightBottom':
|
|
170
|
-
placementInfo.offset[1] = arrowOffset.arrowOffsetHorizontal
|
|
170
|
+
placementInfo.offset[1] = arrowOffset.arrowOffsetHorizontal * 2 - halfArrowWidth;
|
|
171
171
|
break;
|
|
172
172
|
}
|
|
173
173
|
}
|
|
@@ -11,7 +11,7 @@ export default function scrollTo(y) {
|
|
|
11
11
|
_options$duration = options.duration,
|
|
12
12
|
duration = _options$duration === void 0 ? 450 : _options$duration;
|
|
13
13
|
var container = getContainer();
|
|
14
|
-
var scrollTop = getScroll(container
|
|
14
|
+
var scrollTop = getScroll(container);
|
|
15
15
|
var startTime = Date.now();
|
|
16
16
|
var _frameFunc = function frameFunc() {
|
|
17
17
|
var timestamp = Date.now();
|
|
@@ -3,7 +3,7 @@ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object
|
|
|
3
3
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
4
4
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
5
5
|
import classNames from 'classnames';
|
|
6
|
-
var
|
|
6
|
+
var _InputStatuses = ['warning', 'error', ''];
|
|
7
7
|
export function getStatusClassNames(prefixCls, status, hasFeedback) {
|
|
8
8
|
return classNames(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(prefixCls, "-status-success"), status === 'success'), "".concat(prefixCls, "-status-warning"), status === 'warning'), "".concat(prefixCls, "-status-error"), status === 'error'), "".concat(prefixCls, "-status-validating"), status === 'validating'), "".concat(prefixCls, "-has-feedback"), hasFeedback));
|
|
9
9
|
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export default function toList(candidate) {
|
|
2
|
+
var skipEmpty = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
3
|
+
if (skipEmpty && (candidate === undefined || candidate === null)) return [];
|
|
4
|
+
return Array.isArray(candidate) ? candidate : [candidate];
|
|
5
|
+
}
|
|
@@ -39,7 +39,6 @@ export var devUseWarning = process.env.NODE_ENV !== 'production' ? function (com
|
|
|
39
39
|
}
|
|
40
40
|
// Warning for the first time
|
|
41
41
|
if (!existWarning) {
|
|
42
|
-
// eslint-disable-next-line no-console
|
|
43
42
|
console.warn('[antd] There exists deprecated usage in your code:', deprecatedWarnList);
|
|
44
43
|
}
|
|
45
44
|
} else {
|
|
@@ -132,9 +132,9 @@ var WaveEffect = function WaveEffect(props) {
|
|
|
132
132
|
var motionClassName = _ref.className;
|
|
133
133
|
return _jsx("div", {
|
|
134
134
|
ref: composeRef(divRef, ref),
|
|
135
|
-
className: classNames(className, {
|
|
135
|
+
className: classNames(className, motionClassName, {
|
|
136
136
|
'wave-quick': isSmallComponent
|
|
137
|
-
}
|
|
137
|
+
}),
|
|
138
138
|
style: waveStyle
|
|
139
139
|
});
|
|
140
140
|
}
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import { defaultPrefixCls } from '../../config-provider';
|
|
2
|
+
export var TARGET_CLS = "".concat(defaultPrefixCls, "-wave-target");
|
|
@@ -5,7 +5,7 @@ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length)
|
|
|
5
5
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
6
6
|
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
7
7
|
import * as React from 'react';
|
|
8
|
-
import
|
|
8
|
+
import useEvent from 'rc-util/lib/hooks/useEvent';
|
|
9
9
|
import raf from 'rc-util/lib/raf';
|
|
10
10
|
import { ConfigContext } from '../../config-provider';
|
|
11
11
|
import useToken from '../../theme/useToken';
|
|
@@ -1,13 +1,5 @@
|
|
|
1
|
-
export function isNotGrey(color) {
|
|
2
|
-
// eslint-disable-next-line no-useless-escape
|
|
3
|
-
var match = (color || '').match(/rgba?\((\d*), (\d*), (\d*)(, [\d.]*)?\)/);
|
|
4
|
-
if (match && match[1] && match[2] && match[3]) {
|
|
5
|
-
return !(match[1] === match[2] && match[2] === match[3]);
|
|
6
|
-
}
|
|
7
|
-
return true;
|
|
8
|
-
}
|
|
9
1
|
export function isValidWaveColor(color) {
|
|
10
|
-
return color && color !== '#fff' && color !== '#ffffff' && color !== 'rgb(255, 255, 255)' && color !== 'rgba(255, 255, 255, 1)' &&
|
|
2
|
+
return color && color !== '#fff' && color !== '#ffffff' && color !== 'rgb(255, 255, 255)' && color !== 'rgba(255, 255, 255, 1)' && !/rgba\((?:\d*, ){3}0\)/.test(color) &&
|
|
11
3
|
// any transparent rgba color
|
|
12
4
|
color !== 'transparent';
|
|
13
5
|
}
|
package/lib/Antd5/alert/Alert.js
CHANGED
|
@@ -23,8 +23,8 @@ import ExclamationCircleFilled from '@ant-design/icons/ExclamationCircleFilled';
|
|
|
23
23
|
import InfoCircleFilled from '@ant-design/icons/InfoCircleFilled';
|
|
24
24
|
import classNames from 'classnames';
|
|
25
25
|
import CSSMotion from 'rc-motion';
|
|
26
|
-
import { composeRef } from 'rc-util/lib/ref';
|
|
27
26
|
import pickAttrs from 'rc-util/lib/pickAttrs';
|
|
27
|
+
import { composeRef } from 'rc-util/lib/ref';
|
|
28
28
|
import { replaceElement } from '../_util/reactNode';
|
|
29
29
|
import { devUseWarning } from '../_util/warning';
|
|
30
30
|
import { ConfigContext } from '../config-provider';
|
|
@@ -167,7 +167,6 @@ var Alert = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
167
167
|
var mergedAriaProps = React.useMemo(function () {
|
|
168
168
|
var merged = closable !== null && closable !== void 0 ? closable : alert === null || alert === void 0 ? void 0 : alert.closable;
|
|
169
169
|
if (_typeof(merged) === 'object') {
|
|
170
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
171
170
|
var _ = merged.closeIcon,
|
|
172
171
|
ariaProps = _objectWithoutProperties(merged, _excluded2);
|
|
173
172
|
return ariaProps;
|
|
@@ -52,7 +52,7 @@ var ErrorBoundary = /*#__PURE__*/function (_React$Component) {
|
|
|
52
52
|
var _this$state = this.state,
|
|
53
53
|
error = _this$state.error,
|
|
54
54
|
info = _this$state.info;
|
|
55
|
-
var componentStack = info
|
|
55
|
+
var componentStack = (info === null || info === void 0 ? void 0 : info.componentStack) || null;
|
|
56
56
|
var errorMessage = typeof message === 'undefined' ? (error || '').toString() : message;
|
|
57
57
|
var errorDescription = typeof description === 'undefined' ? componentStack : description;
|
|
58
58
|
if (error) {
|
|
@@ -13,17 +13,17 @@ var BehaviorPattern = function BehaviorPattern() {
|
|
|
13
13
|
children: [{
|
|
14
14
|
id: '707000085',
|
|
15
15
|
label: '了解提示内容',
|
|
16
|
-
link: '
|
|
16
|
+
link: 'alert-index-tab-design-demo-content'
|
|
17
17
|
}, {
|
|
18
18
|
id: '707000086',
|
|
19
19
|
label: '了解提示类型',
|
|
20
|
-
link: '
|
|
20
|
+
link: 'alert-index-tab-design-demo-type'
|
|
21
21
|
}]
|
|
22
22
|
}, {
|
|
23
23
|
id: '200000005',
|
|
24
24
|
label: '针对提示进行操作',
|
|
25
25
|
targetType: 'extension',
|
|
26
|
-
link: '
|
|
26
|
+
link: 'alert-index-tab-design-demo-action'
|
|
27
27
|
}]
|
|
28
28
|
}
|
|
29
29
|
});
|
|
@@ -45,7 +45,7 @@ export var genBaseStyle = function genBaseStyle(token) {
|
|
|
45
45
|
}), "".concat(componentCls, "-icon"), {
|
|
46
46
|
marginInlineEnd: marginXS,
|
|
47
47
|
lineHeight: 0
|
|
48
|
-
}),
|
|
48
|
+
}), '&-description', {
|
|
49
49
|
display: 'none',
|
|
50
50
|
fontSize: fontSize,
|
|
51
51
|
lineHeight: lineHeight
|
|
@@ -114,9 +114,11 @@ export var genActionStyle = function genActionStyle(token) {
|
|
|
114
114
|
fontSizeIcon = token.fontSizeIcon,
|
|
115
115
|
colorIcon = token.colorIcon,
|
|
116
116
|
colorIconHover = token.colorIconHover;
|
|
117
|
-
return _defineProperty({}, componentCls, _defineProperty(_defineProperty(
|
|
118
|
-
|
|
119
|
-
|
|
117
|
+
return _defineProperty({}, componentCls, _defineProperty(_defineProperty({
|
|
118
|
+
'&-action': {
|
|
119
|
+
marginInlineStart: marginXS
|
|
120
|
+
}
|
|
121
|
+
}, "".concat(componentCls, "-close-icon"), _defineProperty({
|
|
120
122
|
marginInlineStart: marginXS,
|
|
121
123
|
padding: 0,
|
|
122
124
|
overflow: 'hidden',
|
|
@@ -18,7 +18,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
18
18
|
import { createElement as _createElement } from "react";
|
|
19
19
|
import * as React from 'react';
|
|
20
20
|
import classNames from 'classnames';
|
|
21
|
-
import
|
|
21
|
+
import useEvent from 'rc-util/lib/hooks/useEvent';
|
|
22
22
|
import scrollIntoView from 'scroll-into-view-if-needed';
|
|
23
23
|
import getScroll from '../_util/getScroll';
|
|
24
24
|
import scrollTo from '../_util/scrollTo';
|
|
@@ -39,8 +39,7 @@ function getOffsetTop(element, container) {
|
|
|
39
39
|
var rect = element.getBoundingClientRect();
|
|
40
40
|
if (rect.width || rect.height) {
|
|
41
41
|
if (container === window) {
|
|
42
|
-
|
|
43
|
-
return rect.top - container.clientTop;
|
|
42
|
+
return rect.top - element.ownerDocument.documentElement.clientTop;
|
|
44
43
|
}
|
|
45
44
|
return rect.top - container.getBoundingClientRect().top;
|
|
46
45
|
}
|
|
@@ -198,7 +197,7 @@ var Anchor = function Anchor(props) {
|
|
|
198
197
|
return;
|
|
199
198
|
}
|
|
200
199
|
var container = getCurrentContainer();
|
|
201
|
-
var scrollTop = getScroll(container
|
|
200
|
+
var scrollTop = getScroll(container);
|
|
202
201
|
var eleOffsetTop = getOffsetTop(targetElement, container);
|
|
203
202
|
var y = scrollTop + eleOffsetTop;
|
|
204
203
|
y -= targetOffset !== undefined ? targetOffset : offsetTop || 0;
|
|
@@ -263,13 +262,15 @@ var Anchor = function Anchor(props) {
|
|
|
263
262
|
direction: anchorDirection
|
|
264
263
|
};
|
|
265
264
|
}, [activeLink, onClick, handleScrollTo, anchorDirection]);
|
|
265
|
+
var affixProps = affix && _typeof(affix) === 'object' ? affix : undefined;
|
|
266
266
|
return wrapCSSVar(_jsx(AnchorContext.Provider, {
|
|
267
267
|
value: memoizedContextValue,
|
|
268
|
-
children: affix ? _jsx(Affix, {
|
|
268
|
+
children: affix ? _jsx(Affix, _objectSpread(_objectSpread({
|
|
269
269
|
offsetTop: offsetTop,
|
|
270
|
-
target: getCurrentContainer
|
|
270
|
+
target: getCurrentContainer
|
|
271
|
+
}, affixProps), {}, {
|
|
271
272
|
children: anchorContent
|
|
272
|
-
}) : anchorContent
|
|
273
|
+
})) : anchorContent
|
|
273
274
|
}));
|
|
274
275
|
};
|
|
275
276
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -31,15 +31,15 @@ var AnchorLink = function AnchorLink(props) {
|
|
|
31
31
|
};
|
|
32
32
|
}, [href]);
|
|
33
33
|
var handleClick = function handleClick(e) {
|
|
34
|
-
if (replace) {
|
|
35
|
-
e.preventDefault();
|
|
36
|
-
window.location.replace(href);
|
|
37
|
-
}
|
|
38
34
|
onClick === null || onClick === void 0 || onClick(e, {
|
|
39
35
|
title: title,
|
|
40
36
|
href: href
|
|
41
37
|
});
|
|
42
38
|
scrollTo === null || scrollTo === void 0 || scrollTo(href);
|
|
39
|
+
if (replace) {
|
|
40
|
+
e.preventDefault();
|
|
41
|
+
window.location.replace(href);
|
|
42
|
+
}
|
|
43
43
|
};
|
|
44
44
|
// =================== Warning =====================
|
|
45
45
|
if (process.env.NODE_ENV !== 'production') {
|
package/lib/Antd5/app/index.js
CHANGED
|
@@ -34,6 +34,7 @@ var App = function App(props) {
|
|
|
34
34
|
_props$component = props.component,
|
|
35
35
|
component = _props$component === void 0 ? 'div' : _props$component;
|
|
36
36
|
var _useContext = useContext(ConfigContext),
|
|
37
|
+
direction = _useContext.direction,
|
|
37
38
|
getPrefixCls = _useContext.getPrefixCls;
|
|
38
39
|
var prefixCls = getPrefixCls('app', customizePrefixCls);
|
|
39
40
|
var _useStyle = useStyle(prefixCls),
|
|
@@ -41,7 +42,7 @@ var App = function App(props) {
|
|
|
41
42
|
wrapCSSVar = _useStyle2[0],
|
|
42
43
|
hashId = _useStyle2[1],
|
|
43
44
|
cssVarCls = _useStyle2[2];
|
|
44
|
-
var customClassName = classNames(hashId, prefixCls, className, rootClassName, cssVarCls);
|
|
45
|
+
var customClassName = classNames(hashId, prefixCls, className, rootClassName, cssVarCls, _defineProperty({}, "".concat(prefixCls, "-rtl"), direction === 'rtl'));
|
|
45
46
|
var appConfig = useContext(AppConfigContext);
|
|
46
47
|
var mergedAppConfig = React.useMemo(function () {
|
|
47
48
|
return {
|
|
@@ -10,13 +10,14 @@ var genBaseStyle = function genBaseStyle(token) {
|
|
|
10
10
|
fontSize = token.fontSize,
|
|
11
11
|
lineHeight = token.lineHeight,
|
|
12
12
|
fontFamily = token.fontFamily;
|
|
13
|
-
return _defineProperty({}, componentCls, {
|
|
13
|
+
return _defineProperty({}, componentCls, _defineProperty({
|
|
14
14
|
color: colorText,
|
|
15
15
|
fontSize: fontSize,
|
|
16
16
|
lineHeight: lineHeight,
|
|
17
|
-
fontFamily: fontFamily
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
fontFamily: fontFamily
|
|
18
|
+
}, "&".concat(componentCls, "-rtl"), {
|
|
19
|
+
direction: 'rtl'
|
|
20
|
+
}));
|
|
20
21
|
};
|
|
21
22
|
export var prepareComponentToken = function prepareComponentToken() {
|
|
22
23
|
return {};
|
|
@@ -22,7 +22,7 @@ import { ConfigContext } from '../config-provider';
|
|
|
22
22
|
import Select from '../select';
|
|
23
23
|
var Option = Select.Option;
|
|
24
24
|
function isSelectOptionOrSelectOptGroup(child) {
|
|
25
|
-
return child
|
|
25
|
+
return (child === null || child === void 0 ? void 0 : child.type) && (child.type.isSelectOption || child.type.isSelectOptGroup);
|
|
26
26
|
}
|
|
27
27
|
var AutoComplete = function AutoComplete(props, ref) {
|
|
28
28
|
var _props$dropdownStyle;
|