@chaoswise/ui 3.0.23 → 3.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/Antd5/_util/ActionButton.js +4 -2
- package/lib/Antd5/_util/ContextIsolator.js +27 -0
- package/lib/Antd5/_util/easings.js +2 -2
- package/lib/Antd5/_util/getScroll.js +9 -8
- package/lib/Antd5/_util/hooks/useClosable.js +3 -2
- package/lib/Antd5/_util/hooks/useUniqueMemo.js +123 -0
- package/lib/Antd5/_util/hooks/useZIndex.js +31 -15
- package/lib/Antd5/_util/motion.js +3 -2
- package/lib/Antd5/_util/placements.js +2 -2
- package/lib/Antd5/_util/scrollTo.js +1 -1
- package/lib/Antd5/_util/statusUtils.js +1 -1
- package/lib/Antd5/_util/toList.js +5 -0
- package/lib/Antd5/_util/warning.js +0 -1
- package/lib/Antd5/_util/wave/WaveEffect.js +2 -2
- package/lib/Antd5/_util/wave/interface.js +2 -1
- package/lib/Antd5/_util/wave/useWave.js +1 -1
- package/lib/Antd5/_util/wave/util.js +1 -9
- package/lib/Antd5/alert/Alert.js +1 -2
- package/lib/Antd5/alert/ErrorBoundary.js +1 -1
- package/lib/Antd5/alert/design/behavior-pattern.js +3 -3
- package/lib/Antd5/alert/style/index.js +6 -4
- package/lib/Antd5/anchor/Anchor.js +8 -7
- package/lib/Antd5/anchor/AnchorLink.js +4 -4
- package/lib/Antd5/app/index.js +2 -1
- package/lib/Antd5/app/style/index.js +4 -2
- package/lib/Antd5/auto-complete/index.js +1 -1
- package/lib/Antd5/avatar/group.js +35 -17
- package/lib/Antd5/avatar/style/index.js +18 -13
- package/lib/Antd5/back-top/index.js +3 -2
- package/lib/Antd5/badge/ScrollNumber.js +1 -1
- package/lib/Antd5/badge/SingleNumber.js +17 -16
- package/lib/Antd5/badge/style/index.js +6 -7
- package/lib/Antd5/badge/style/ribbon.js +3 -3
- package/lib/Antd5/breadcrumb/design/behavior-pattern.js +4 -4
- package/lib/Antd5/breadcrumb/style/index.js +1 -1
- package/lib/Antd5/button/LoadingIcon.js +5 -10
- package/lib/Antd5/button/button-group.js +0 -1
- package/lib/Antd5/button/button.js +70 -41
- package/lib/Antd5/button/buttonHelpers.js +7 -5
- package/lib/Antd5/button/style/{compactCmp.js → compact.js} +20 -27
- package/lib/Antd5/button/style/group.js +9 -7
- package/lib/Antd5/button/style/index.js +150 -110
- package/lib/Antd5/button/style/token.js +8 -1
- package/lib/Antd5/calendar/generateCalendar.js +25 -28
- package/lib/Antd5/calendar/style/index.js +4 -4
- package/lib/Antd5/card/Card.js +3 -3
- package/lib/Antd5/card/style/index.js +6 -9
- package/lib/Antd5/carousel/index.js +3 -3
- package/lib/Antd5/carousel/style/index.js +1 -1
- package/lib/Antd5/cascader/Panel.js +7 -2
- package/lib/Antd5/cascader/hooks/useBase.js +3 -2
- package/lib/Antd5/cascader/hooks/useColumnIcons.js +6 -3
- package/lib/Antd5/cascader/index.js +1 -1
- package/lib/Antd5/cascader/style/columns.js +6 -4
- package/lib/Antd5/checkbox/Checkbox.js +44 -10
- package/lib/Antd5/checkbox/Group.js +7 -2
- package/lib/Antd5/checkbox/assets/duigou1.js +29 -0
- package/lib/Antd5/checkbox/assets/duigou2.js +29 -0
- package/lib/Antd5/checkbox/style/index.js +112 -6
- package/lib/Antd5/collapse/Collapse.js +2 -1
- package/lib/Antd5/collapse/style/index.js +20 -13
- package/lib/Antd5/color-picker/ColorPicker.js +120 -78
- package/lib/Antd5/color-picker/ColorPickerPanel.js +44 -26
- package/lib/Antd5/color-picker/color.js +82 -10
- package/lib/Antd5/color-picker/components/ColorAlphaInput.js +2 -2
- package/lib/Antd5/color-picker/components/ColorClear.js +2 -2
- package/lib/Antd5/color-picker/components/ColorHexInput.js +5 -4
- package/lib/Antd5/color-picker/components/ColorInput.js +4 -3
- package/lib/Antd5/color-picker/components/ColorPresets.js +1 -1
- package/lib/Antd5/color-picker/components/ColorSlider.js +139 -0
- package/lib/Antd5/color-picker/components/ColorTrigger.js +52 -26
- package/lib/Antd5/color-picker/components/PanelPicker/GradientColorBar.js +130 -0
- package/lib/Antd5/color-picker/components/PanelPicker/index.js +194 -0
- package/lib/Antd5/color-picker/context.js +1 -5
- package/lib/Antd5/color-picker/hooks/useModeColor.js +87 -0
- package/lib/Antd5/color-picker/style/color-block.js +3 -2
- package/lib/Antd5/color-picker/style/index.js +33 -15
- package/lib/Antd5/color-picker/style/input.js +1 -1
- package/lib/Antd5/color-picker/style/picker.js +6 -33
- package/lib/Antd5/color-picker/style/slider.js +87 -0
- package/lib/Antd5/color-picker/util.js +53 -7
- package/lib/Antd5/config-provider/context.js +3 -1
- package/lib/Antd5/config-provider/cssVariables.js +0 -1
- package/lib/Antd5/config-provider/defaultRenderEmpty.js +8 -1
- package/lib/Antd5/config-provider/index.js +13 -5
- package/lib/Antd5/config-provider/style/index.js +0 -1
- package/lib/Antd5/date-picker/PickerButton.js +3 -2
- package/lib/Antd5/date-picker/design/behavior-pattern.js +15 -15
- package/lib/Antd5/date-picker/generatePicker/constant.js +15 -0
- package/lib/Antd5/date-picker/generatePicker/generateRangePicker.js +16 -11
- package/lib/Antd5/date-picker/generatePicker/generateSinglePicker.js +19 -15
- package/lib/Antd5/date-picker/generatePicker/index.js +2 -2
- package/lib/Antd5/date-picker/generatePicker/interface.js +1 -1
- package/lib/Antd5/date-picker/index.js +2 -17
- package/lib/Antd5/date-picker/locale/ar_EG.js +9 -1
- package/lib/Antd5/date-picker/locale/az_AZ.js +9 -1
- package/lib/Antd5/date-picker/locale/el_GR.js +9 -1
- package/lib/Antd5/date-picker/locale/ja_JP.js +11 -1
- package/lib/Antd5/date-picker/locale/kn_IN.js +9 -1
- package/lib/Antd5/date-picker/locale/pl_PL.js +9 -1
- package/lib/Antd5/date-picker/locale/uk_UA.js +10 -1
- package/lib/Antd5/date-picker/style/index.js +13 -10
- package/lib/Antd5/date-picker/style/panel.js +36 -32
- package/lib/Antd5/date-picker/style/token.js +1 -1
- package/lib/Antd5/date-picker/util.js +0 -48
- package/lib/Antd5/descriptions/hooks/useItems.js +5 -0
- package/lib/Antd5/descriptions/hooks/useRow.js +42 -34
- package/lib/Antd5/descriptions/style/index.js +20 -8
- package/lib/Antd5/divider/index.js +4 -3
- package/lib/Antd5/divider/style/index.js +19 -4
- package/lib/Antd5/drawer/DrawerPanel.js +11 -20
- package/lib/Antd5/drawer/index.js +39 -42
- package/lib/Antd5/drawer/style/index.js +10 -11
- package/lib/Antd5/dropdown/dropdown.js +5 -7
- package/lib/Antd5/dropdown/style/index.js +27 -11
- package/lib/Antd5/empty/empty.js +9 -3
- package/lib/Antd5/empty/simple.js +9 -3
- package/lib/Antd5/empty/style/index.js +1 -1
- package/lib/Antd5/float-button/BackTop.js +3 -2
- package/lib/Antd5/float-button/FloatButton.js +16 -5
- package/lib/Antd5/float-button/FloatButtonGroup.js +76 -52
- package/lib/Antd5/float-button/style/index.js +117 -76
- package/lib/Antd5/float-button/style/keyframes.js +118 -0
- package/lib/Antd5/form/ErrorList.js +14 -2
- package/lib/Antd5/form/Form.js +11 -3
- package/lib/Antd5/form/FormItem/ItemHolder.js +8 -4
- package/lib/Antd5/form/FormItem/index.js +6 -4
- package/lib/Antd5/form/FormItemInput.js +68 -28
- package/lib/Antd5/form/FormItemLabel.js +3 -3
- package/lib/Antd5/form/hooks/useForm.js +8 -1
- package/lib/Antd5/form/hooks/useVariants.js +10 -4
- package/lib/Antd5/form/style/explain.js +9 -8
- package/lib/Antd5/form/style/index.js +30 -18
- package/lib/Antd5/grid/row.js +2 -2
- package/lib/Antd5/image/index.js +3 -1
- package/lib/Antd5/image/style/index.js +17 -20
- package/lib/Antd5/index.js +2 -1
- package/lib/Antd5/input/Input.js +18 -38
- package/lib/Antd5/input/OTP/OTPInput.js +10 -5
- package/lib/Antd5/input/OTP/index.js +12 -4
- package/lib/Antd5/input/Password.js +6 -2
- package/lib/Antd5/input/Search.js +2 -4
- package/lib/Antd5/input/TextArea.js +1 -1
- package/lib/Antd5/input/style/index.js +72 -63
- package/lib/Antd5/input/style/otp.js +1 -1
- package/lib/Antd5/input/style/variants.js +38 -23
- package/lib/Antd5/input/utils.js +0 -1
- package/lib/Antd5/input-number/index.js +19 -22
- package/lib/Antd5/input-number/style/index.js +26 -16
- package/lib/Antd5/layout/Sider.js +15 -8
- package/lib/Antd5/layout/style/index.js +6 -96
- package/lib/Antd5/layout/style/sider.js +115 -0
- package/lib/Antd5/list/Item.js +18 -5
- package/lib/Antd5/list/index.js +15 -10
- package/lib/Antd5/list/style/index.js +40 -41
- package/lib/Antd5/locale/ar_EG.js +14 -1
- package/lib/Antd5/locale/az_AZ.js +78 -28
- package/lib/Antd5/locale/bn_BD.js +0 -1
- package/lib/Antd5/locale/by_BY.js +0 -1
- package/lib/Antd5/locale/ca_ES.js +0 -1
- package/lib/Antd5/locale/cs_CZ.js +0 -1
- package/lib/Antd5/locale/de_DE.js +0 -1
- package/lib/Antd5/locale/el_GR.js +104 -3
- package/lib/Antd5/locale/en_GB.js +0 -1
- package/lib/Antd5/locale/en_US.js +4 -2
- package/lib/Antd5/locale/es_ES.js +10 -6
- package/lib/Antd5/locale/et_EE.js +0 -1
- package/lib/Antd5/locale/eu_ES.js +4 -2
- package/lib/Antd5/locale/fa_IR.js +0 -1
- package/lib/Antd5/locale/fr_BE.js +5 -1
- package/lib/Antd5/locale/fr_CA.js +0 -1
- package/lib/Antd5/locale/fr_FR.js +5 -6
- package/lib/Antd5/locale/ga_IE.js +0 -1
- package/lib/Antd5/locale/gl_ES.js +0 -1
- package/lib/Antd5/locale/he_IL.js +0 -1
- package/lib/Antd5/locale/hi_IN.js +0 -1
- package/lib/Antd5/locale/hr_HR.js +0 -1
- package/lib/Antd5/locale/id_ID.js +4 -2
- package/lib/Antd5/locale/index.js +1 -1
- package/lib/Antd5/locale/it_IT.js +0 -1
- package/lib/Antd5/locale/ja_JP.js +4 -2
- package/lib/Antd5/locale/ka_GE.js +0 -1
- package/lib/Antd5/locale/kk_KZ.js +0 -1
- package/lib/Antd5/locale/km_KH.js +0 -1
- package/lib/Antd5/locale/kn_IN.js +82 -4
- package/lib/Antd5/locale/ko_KR.js +4 -2
- package/lib/Antd5/locale/lt_LT.js +4 -2
- package/lib/Antd5/locale/ml_IN.js +0 -1
- package/lib/Antd5/locale/mn_MN.js +86 -2
- package/lib/Antd5/locale/ms_MY.js +101 -18
- package/lib/Antd5/locale/my_MM.js +0 -1
- package/lib/Antd5/locale/nb_NO.js +0 -1
- package/lib/Antd5/locale/ne_NP.js +104 -2
- package/lib/Antd5/locale/nl_BE.js +5 -1
- package/lib/Antd5/locale/nl_NL.js +5 -1
- package/lib/Antd5/locale/pl_PL.js +0 -1
- package/lib/Antd5/locale/pt_BR.js +0 -1
- package/lib/Antd5/locale/pt_PT.js +55 -38
- package/lib/Antd5/locale/ro_RO.js +0 -1
- package/lib/Antd5/locale/ru_RU.js +9 -2
- package/lib/Antd5/locale/si_LK.js +0 -1
- package/lib/Antd5/locale/sk_SK.js +0 -1
- package/lib/Antd5/locale/sr_RS.js +0 -1
- package/lib/Antd5/locale/sv_SE.js +0 -1
- package/lib/Antd5/locale/th_TH.js +11 -3
- package/lib/Antd5/locale/tk_TK.js +0 -1
- package/lib/Antd5/locale/tr_TR.js +2 -1
- package/lib/Antd5/locale/uk_UA.js +1 -1
- package/lib/Antd5/locale/ur_PK.js +0 -1
- package/lib/Antd5/locale/uz_UZ.js +6 -7
- package/lib/Antd5/locale/zh_CN.js +4 -2
- package/lib/Antd5/locale/zh_HK.js +0 -1
- package/lib/Antd5/locale/zh_TW.js +0 -1
- package/lib/Antd5/mentions/index.js +4 -4
- package/lib/Antd5/menu/MenuItem.js +6 -5
- package/lib/Antd5/menu/OverrideContext.js +4 -3
- package/lib/Antd5/menu/SubMenu.js +2 -2
- package/lib/Antd5/menu/menu.js +2 -2
- package/lib/Antd5/menu/style/index.js +58 -40
- package/lib/Antd5/menu/style/theme.js +24 -20
- package/lib/Antd5/menu/style/vertical.js +10 -7
- package/lib/Antd5/modal/Modal.js +50 -38
- package/lib/Antd5/modal/PurePanel.js +0 -1
- package/lib/Antd5/modal/confirm.js +4 -5
- package/lib/Antd5/modal/style/confirm.js +1 -2
- package/lib/Antd5/modal/style/index.js +13 -3
- package/lib/Antd5/modal/useModal/HookModal.js +4 -3
- package/lib/Antd5/modal/useModal/index.js +0 -1
- package/lib/Antd5/notification/index.js +6 -3
- package/lib/Antd5/notification/style/index.js +35 -3
- package/lib/Antd5/notification/useNotification.js +6 -1
- package/lib/Antd5/pagination/Pagination.js +10 -5
- package/lib/Antd5/pagination/design/behavior-pattern.js +3 -3
- package/lib/Antd5/pagination/style/bordered.js +1 -1
- package/lib/Antd5/pagination/style/index.js +27 -18
- package/lib/Antd5/popconfirm/PurePanel.js +7 -7
- package/lib/Antd5/popover/PurePanel.js +16 -6
- package/lib/Antd5/popover/index.js +7 -19
- package/lib/Antd5/popover/style/index.js +3 -1
- package/lib/Antd5/progress/Line.js +27 -19
- package/lib/Antd5/progress/design/behavior-pattern.js +3 -3
- package/lib/Antd5/progress/progress.js +37 -11
- package/lib/Antd5/progress/style/index.js +46 -11
- package/lib/Antd5/progress/utils.js +20 -18
- package/lib/Antd5/qr-code/QrcodeStatus.js +42 -0
- package/lib/Antd5/qr-code/index.js +31 -31
- package/lib/Antd5/radio/radio.js +4 -10
- package/lib/Antd5/radio/style/index.js +65 -80
- package/lib/Antd5/rate/index.js +8 -2
- package/lib/Antd5/result/noFound.js +3 -1
- package/lib/Antd5/result/serverError.js +3 -1
- package/lib/Antd5/result/unauthorized.js +5 -3
- package/lib/Antd5/segmented/index.js +5 -3
- package/lib/Antd5/segmented/style/index.js +11 -3
- package/lib/Antd5/select/index.js +4 -2
- package/lib/Antd5/select/style/dropdown.js +1 -1
- package/lib/Antd5/select/style/index.js +21 -8
- package/lib/Antd5/select/style/multiple.js +18 -9
- package/lib/Antd5/select/style/single.js +8 -10
- package/lib/Antd5/select/style/token.js +9 -2
- package/lib/Antd5/select/style/variants.js +20 -11
- package/lib/Antd5/skeleton/Image.js +6 -4
- package/lib/Antd5/skeleton/Node.js +1 -3
- package/lib/Antd5/skeleton/Paragraph.js +1 -1
- package/lib/Antd5/skeleton/Title.js +9 -6
- package/lib/Antd5/skeleton/style/index.js +13 -13
- package/lib/Antd5/slider/Context.js +4 -0
- package/lib/Antd5/slider/SliderTooltip.js +9 -5
- package/lib/Antd5/slider/index.js +32 -31
- package/lib/Antd5/slider/style/index.js +60 -44
- package/lib/Antd5/space/Compact.js +1 -1
- package/lib/Antd5/space/index.js +3 -3
- package/lib/Antd5/spin/Indicator/Looper.js +29 -0
- package/lib/Antd5/spin/Indicator/Progress.js +78 -0
- package/lib/Antd5/spin/Indicator/index.js +21 -0
- package/lib/Antd5/spin/index.js +27 -45
- package/lib/Antd5/spin/style/index.js +54 -17
- package/lib/Antd5/spin/usePercent.js +40 -0
- package/lib/Antd5/splitter/Panel.js +36 -0
- package/lib/Antd5/splitter/SplitBar.js +124 -0
- package/lib/Antd5/splitter/Splitter.js +194 -0
- package/lib/Antd5/{_util/transButton.js → splitter/hooks/useItems.js} +28 -54
- package/lib/Antd5/splitter/hooks/useResizable.js +43 -0
- package/lib/Antd5/splitter/hooks/useResize.js +138 -0
- package/lib/Antd5/splitter/hooks/useSizes.js +109 -0
- package/lib/Antd5/splitter/index.js +5 -0
- package/lib/Antd5/splitter/interface.js +1 -0
- package/lib/Antd5/splitter/style/index.js +219 -0
- package/lib/Antd5/statistic/style/index.js +1 -1
- package/lib/Antd5/steps/style/custom-icon.js +1 -1
- package/lib/Antd5/steps/style/index.js +11 -8
- package/lib/Antd5/steps/style/inline.js +5 -4
- package/lib/Antd5/steps/style/progress-dot.js +2 -2
- package/lib/Antd5/steps/style/small.js +3 -3
- package/lib/Antd5/steps/style/vertical.js +2 -2
- package/lib/Antd5/style/index.js +37 -13
- package/lib/Antd5/style/motion/slide.js +6 -5
- package/lib/Antd5/style/placementArrow.js +15 -6
- package/lib/Antd5/switch/style/index.js +1 -1
- package/lib/Antd5/table/Column.js +2 -3
- package/lib/Antd5/table/ColumnGroup.js +2 -3
- package/lib/Antd5/table/ExpandIcon.js +6 -6
- package/lib/Antd5/table/InternalTable.js +6 -6
- package/lib/Antd5/table/RcTable/VirtualTable.js +3 -2
- package/lib/Antd5/table/RcTable/index.js +3 -2
- package/lib/Antd5/table/hooks/useFilter/FilterDropdown.js +82 -61
- package/lib/Antd5/table/hooks/useFilter/FilterSearch.js +7 -7
- package/lib/Antd5/table/hooks/useFilter/index.js +28 -26
- package/lib/Antd5/table/hooks/useLazyKVMap.js +5 -5
- package/lib/Antd5/table/hooks/useSelection.js +21 -11
- package/lib/Antd5/table/hooks/useSorter.js +66 -42
- package/lib/Antd5/table/hooks/useTitleColumns.js +9 -7
- package/lib/Antd5/table/interface.js +1 -1
- package/lib/Antd5/table/style/bordered.js +5 -3
- package/lib/Antd5/table/style/expand.js +44 -38
- package/lib/Antd5/table/style/filter.js +1 -1
- package/lib/Antd5/table/style/index.js +26 -21
- package/lib/Antd5/table/style/selection.js +3 -1
- package/lib/Antd5/table/style/sorter.js +3 -1
- package/lib/Antd5/table/style/virtual.js +2 -2
- package/lib/Antd5/table/util.js +9 -8
- package/lib/Antd5/tabs/style/index.js +2 -2
- package/lib/Antd5/tag/style/index.js +2 -2
- package/lib/Antd5/theme/index.js +12 -5
- package/lib/Antd5/theme/interface/cssinjs-utils.js +1 -0
- package/lib/Antd5/theme/internal.js +10 -5
- package/lib/Antd5/theme/themes/dark/colors.js +3 -0
- package/lib/Antd5/theme/themes/dark/index.js +1 -0
- package/lib/Antd5/theme/themes/default/colors.js +3 -0
- package/lib/Antd5/theme/themes/default/index.js +6 -2
- package/lib/Antd5/theme/themes/seed.js +5 -2
- package/lib/Antd5/theme/themes/shared/genColorMapToken.js +2 -0
- package/lib/Antd5/theme/themes/shared/genFontSizes.js +1 -1
- package/lib/Antd5/theme/useToken.js +2 -1
- package/lib/Antd5/theme/util/alias.js +1 -1
- package/lib/Antd5/theme/util/genStyleUtils.js +61 -0
- package/lib/Antd5/time-picker/index.js +15 -2
- package/lib/Antd5/time-picker/locale/az_AZ.js +2 -1
- package/lib/Antd5/time-picker/locale/it_IT.js +2 -1
- package/lib/Antd5/time-picker/locale/uk_UA.js +2 -1
- package/lib/Antd5/timeline/TimelineItemList.js +0 -1
- package/lib/Antd5/timeline/style/index.js +1 -1
- package/lib/Antd5/tooltip/index.js +3 -2
- package/lib/Antd5/tooltip/style/index.js +3 -1
- package/lib/Antd5/tooltip/util.js +0 -1
- package/lib/Antd5/tour/panelRender.js +7 -13
- package/lib/Antd5/tour/style/index.js +6 -13
- package/lib/Antd5/transfer/ListItem.js +3 -3
- package/lib/Antd5/transfer/hooks/useData.js +1 -1
- package/lib/Antd5/transfer/hooks/useSelection.js +26 -21
- package/lib/Antd5/transfer/style/index.js +12 -22
- package/lib/Antd5/tree/Tree.js +2 -0
- package/lib/Antd5/tree/style/directory.js +39 -0
- package/lib/Antd5/tree/style/index.js +115 -166
- package/lib/Antd5/tree/utils/dropIndicator.js +3 -2
- package/lib/Antd5/tree/utils/iconUtil.js +5 -1
- package/lib/Antd5/tree-select/index.js +47 -43
- package/lib/Antd5/typography/Base/CopyBtn.js +17 -17
- package/lib/Antd5/typography/Base/Ellipsis.js +48 -40
- package/lib/Antd5/typography/Base/index.js +20 -60
- package/lib/Antd5/typography/Base/util.js +31 -1
- package/lib/Antd5/typography/Editable.js +11 -10
- package/lib/Antd5/typography/Title.js +1 -6
- package/lib/Antd5/typography/Typography.js +2 -6
- package/lib/Antd5/typography/hooks/useCopyClick.js +3 -2
- package/lib/Antd5/typography/hooks/usePrevious.js +1 -1
- package/lib/Antd5/typography/hooks/useTooltipProps.js +30 -0
- package/lib/Antd5/typography/style/mixins.js +3 -9
- package/lib/Antd5/version/version.js +1 -1
- package/lib/Antd5/watermark/context.js +1 -1
- package/lib/Antd5/watermark/index.js +35 -18
- package/lib/Antd5/watermark/useClips.js +2 -1
- package/lib/Antd5/watermark/useRafDebounce.js +1 -1
- package/lib/Antd5/watermark/utils.js +1 -1
- package/lib/AppHolder/index.js +2 -1
- package/lib/CWSelect/index.js +39 -1
- package/lib/CWSelect/index.style.js +39 -0
- package/lib/CWTree/index.js +3 -9
- package/lib/CWTree/index.style.js +2 -0
- package/lib/ConfigProvider/ConfigProvider.js +11 -10
- package/lib/ConfigProvider/customTheme.js +6 -0
- package/lib/ConfigProvider/theme/common.js +140 -0
- package/lib/ConfigProvider/theme/dark.js +2 -0
- package/lib/ConfigProvider/theme/default.js +122 -0
- package/lib/ConfigProvider/theme/utils.js +49 -0
- package/lib/Header/UserSetting/TenantTree.js +0 -1
- package/lib/Pagination/index.style.js +1 -1
- package/lib/QuickTransfer/index.js +45 -59
- package/lib/SiderMenu/index.style.js +4 -2
- package/lib/Slider/index.style.js +2 -1
- package/lib/Splitter/index.js +2 -0
- package/package.json +37 -35
- package/lib/Antd5/color-picker/components/PanelPicker.js +0 -53
- package/lib/Antd5/color-picker/hooks/useColorState.js +0 -53
- package/lib/Antd5/layout/style/light.js +0 -24
- package/lib/Antd5/style/operationUnit.js +0 -18
- package/lib/Antd5/theme/util/calc/CSSCalculator.js +0 -119
- package/lib/Antd5/theme/util/calc/NumCalculator.js +0 -81
- package/lib/Antd5/theme/util/calc/calculator.js +0 -10
- package/lib/Antd5/theme/util/calc/index.js +0 -9
- package/lib/Antd5/theme/util/genComponentStyleHook.js +0 -243
- package/lib/Antd5/theme/util/maxmin.js +0 -27
- package/lib/Antd5/theme/util/statistic.js +0 -74
- package/lib/Antd5/typography/hooks/useUpdatedEffect.js +0 -13
- package/lib/Antd5/version/token-meta.json +0 -1
- package/lib/Antd5/version/token.json +0 -1
- package/lib/ConfigProvider/customTheme.json +0 -163
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
-
var _excluded = ["prefixCls", "className", "style", "shape", "type", "icon", "closeIcon", "description", "trigger", "children", "onOpenChange", "open"];
|
|
2
|
+
var _excluded = ["prefixCls", "className", "style", "shape", "type", "placement", "icon", "closeIcon", "description", "trigger", "children", "onOpenChange", "open", "onClick"];
|
|
3
3
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4
4
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5
5
|
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
@@ -14,12 +14,14 @@ function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
|
14
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; }
|
|
15
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; }
|
|
16
16
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
17
|
-
import React
|
|
17
|
+
import React from 'react';
|
|
18
18
|
import CloseOutlined from '@ant-design/icons/CloseOutlined';
|
|
19
19
|
import FileTextOutlined from '@ant-design/icons/FileTextOutlined';
|
|
20
20
|
import classNames from 'classnames';
|
|
21
21
|
import CSSMotion from 'rc-motion';
|
|
22
|
+
import useEvent from 'rc-util/lib/hooks/useEvent';
|
|
22
23
|
import useMergedState from 'rc-util/lib/hooks/useMergedState';
|
|
24
|
+
import { useZIndex } from '../_util/hooks/useZIndex';
|
|
23
25
|
import { devUseWarning } from '../_util/warning';
|
|
24
26
|
import { ConfigContext } from '../config-provider';
|
|
25
27
|
import useCSSVarCls from '../config-provider/hooks/useCSSVarCls';
|
|
@@ -35,6 +37,8 @@ var FloatButtonGroup = function FloatButtonGroup(props) {
|
|
|
35
37
|
shape = _props$shape === void 0 ? 'circle' : _props$shape,
|
|
36
38
|
_props$type = props.type,
|
|
37
39
|
type = _props$type === void 0 ? 'default' : _props$type,
|
|
40
|
+
_props$placement = props.placement,
|
|
41
|
+
placement = _props$placement === void 0 ? 'top' : _props$placement,
|
|
38
42
|
_props$icon = props.icon,
|
|
39
43
|
icon = _props$icon === void 0 ? _jsx(FileTextOutlined, {}) : _props$icon,
|
|
40
44
|
closeIcon = props.closeIcon,
|
|
@@ -43,11 +47,12 @@ var FloatButtonGroup = function FloatButtonGroup(props) {
|
|
|
43
47
|
_children = props.children,
|
|
44
48
|
onOpenChange = props.onOpenChange,
|
|
45
49
|
customOpen = props.open,
|
|
50
|
+
onTriggerButtonClick = props.onClick,
|
|
46
51
|
floatButtonProps = _objectWithoutProperties(props, _excluded);
|
|
47
|
-
var
|
|
48
|
-
direction =
|
|
49
|
-
getPrefixCls =
|
|
50
|
-
floatButtonGroup =
|
|
52
|
+
var _React$useContext = React.useContext(ConfigContext),
|
|
53
|
+
direction = _React$useContext.direction,
|
|
54
|
+
getPrefixCls = _React$useContext.getPrefixCls,
|
|
55
|
+
floatButtonGroup = _React$useContext.floatButtonGroup;
|
|
51
56
|
var mergedCloseIcon = (_ref = closeIcon !== null && closeIcon !== void 0 ? closeIcon : floatButtonGroup === null || floatButtonGroup === void 0 ? void 0 : floatButtonGroup.closeIcon) !== null && _ref !== void 0 ? _ref : _jsx(CloseOutlined, {});
|
|
52
57
|
var prefixCls = getPrefixCls(floatButtonPrefixCls, customizePrefixCls);
|
|
53
58
|
var rootCls = useCSSVarCls(prefixCls);
|
|
@@ -57,7 +62,16 @@ var FloatButtonGroup = function FloatButtonGroup(props) {
|
|
|
57
62
|
hashId = _useStyle2[1],
|
|
58
63
|
cssVarCls = _useStyle2[2];
|
|
59
64
|
var groupPrefixCls = "".concat(prefixCls, "-group");
|
|
60
|
-
var
|
|
65
|
+
var isMenuMode = trigger && ['click', 'hover'].includes(trigger);
|
|
66
|
+
var isValidPlacement = placement && ['top', 'left', 'right', 'bottom'].includes(placement);
|
|
67
|
+
var groupCls = classNames(groupPrefixCls, hashId, cssVarCls, rootCls, className, _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(groupPrefixCls, "-rtl"), direction === 'rtl'), "".concat(groupPrefixCls, "-").concat(shape), shape), "".concat(groupPrefixCls, "-").concat(shape, "-shadow"), !isMenuMode), "".concat(groupPrefixCls, "-").concat(placement), isMenuMode && isValidPlacement));
|
|
68
|
+
// ============================ zIndex ============================
|
|
69
|
+
var _useZIndex = useZIndex('FloatButton', style === null || style === void 0 ? void 0 : style.zIndex),
|
|
70
|
+
_useZIndex2 = _slicedToArray(_useZIndex, 1),
|
|
71
|
+
zIndex = _useZIndex2[0];
|
|
72
|
+
var mergedStyle = _objectSpread(_objectSpread({}, style), {}, {
|
|
73
|
+
zIndex: zIndex
|
|
74
|
+
});
|
|
61
75
|
var wrapperCls = classNames(hashId, "".concat(groupPrefixCls, "-wrap"));
|
|
62
76
|
var _useMergedState = useMergedState(false, {
|
|
63
77
|
value: customOpen
|
|
@@ -66,59 +80,69 @@ var FloatButtonGroup = function FloatButtonGroup(props) {
|
|
|
66
80
|
open = _useMergedState2[0],
|
|
67
81
|
setOpen = _useMergedState2[1];
|
|
68
82
|
var floatButtonGroupRef = React.useRef(null);
|
|
69
|
-
|
|
70
|
-
var
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
}
|
|
83
|
+
// ========================== Open ==========================
|
|
84
|
+
var hoverTrigger = trigger === 'hover';
|
|
85
|
+
var clickTrigger = trigger === 'click';
|
|
86
|
+
var triggerOpen = useEvent(function (nextOpen) {
|
|
87
|
+
if (open !== nextOpen) {
|
|
88
|
+
setOpen(nextOpen);
|
|
89
|
+
onOpenChange === null || onOpenChange === void 0 || onOpenChange(nextOpen);
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
// ===================== Trigger: Hover =====================
|
|
93
|
+
var onMouseEnter = function onMouseEnter() {
|
|
94
|
+
if (hoverTrigger) {
|
|
95
|
+
triggerOpen(true);
|
|
96
|
+
}
|
|
97
|
+
};
|
|
98
|
+
var onMouseLeave = function onMouseLeave() {
|
|
99
|
+
if (hoverTrigger) {
|
|
100
|
+
triggerOpen(false);
|
|
101
|
+
}
|
|
88
102
|
};
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
if (
|
|
92
|
-
|
|
93
|
-
if ((_floatButtonRef$curre = floatButtonRef.current) !== null && _floatButtonRef$curre !== void 0 && _floatButtonRef$curre.contains(e.target)) {
|
|
94
|
-
handleOpenChange();
|
|
95
|
-
}
|
|
96
|
-
return;
|
|
103
|
+
// ===================== Trigger: Click =====================
|
|
104
|
+
var onInternalTriggerButtonClick = function onInternalTriggerButtonClick(e) {
|
|
105
|
+
if (clickTrigger) {
|
|
106
|
+
triggerOpen(!open);
|
|
97
107
|
}
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
108
|
+
onTriggerButtonClick === null || onTriggerButtonClick === void 0 || onTriggerButtonClick(e);
|
|
109
|
+
};
|
|
110
|
+
React.useEffect(function () {
|
|
111
|
+
if (clickTrigger) {
|
|
112
|
+
var onDocClick = function onDocClick(e) {
|
|
113
|
+
var _floatButtonGroupRef$;
|
|
114
|
+
// Skip if click on the group
|
|
115
|
+
if ((_floatButtonGroupRef$ = floatButtonGroupRef.current) !== null && _floatButtonGroupRef$ !== void 0 && _floatButtonGroupRef$.contains(e.target)) {
|
|
116
|
+
return;
|
|
117
|
+
}
|
|
118
|
+
triggerOpen(false);
|
|
119
|
+
};
|
|
120
|
+
document.addEventListener('click', onDocClick, {
|
|
121
|
+
capture: true
|
|
122
|
+
});
|
|
104
123
|
return function () {
|
|
105
|
-
document.removeEventListener('click',
|
|
124
|
+
return document.removeEventListener('click', onDocClick, {
|
|
125
|
+
capture: true
|
|
126
|
+
});
|
|
106
127
|
};
|
|
107
128
|
}
|
|
108
|
-
}, [
|
|
109
|
-
//
|
|
129
|
+
}, [clickTrigger]);
|
|
130
|
+
// ======================== Warning =========================
|
|
110
131
|
if (process.env.NODE_ENV !== 'production') {
|
|
111
132
|
var warning = devUseWarning('FloatButton.Group');
|
|
112
133
|
warning(!('open' in props) || !!trigger, 'usage', '`open` need to be used together with `trigger`');
|
|
113
134
|
}
|
|
135
|
+
// ========================= Render =========================
|
|
114
136
|
return wrapCSSVar(_jsx(FloatButtonGroupProvider, {
|
|
115
137
|
value: shape,
|
|
116
|
-
children: _jsx("div",
|
|
138
|
+
children: _jsx("div", {
|
|
117
139
|
ref: floatButtonGroupRef,
|
|
118
140
|
className: groupCls,
|
|
119
|
-
style:
|
|
120
|
-
|
|
121
|
-
|
|
141
|
+
style: mergedStyle,
|
|
142
|
+
// Hover trigger
|
|
143
|
+
onMouseEnter: onMouseEnter,
|
|
144
|
+
onMouseLeave: onMouseLeave,
|
|
145
|
+
children: isMenuMode ? _jsxs(_Fragment, {
|
|
122
146
|
children: [_jsx(CSSMotion, {
|
|
123
147
|
visible: open,
|
|
124
148
|
motionName: "".concat(groupPrefixCls, "-wrap"),
|
|
@@ -130,15 +154,15 @@ var FloatButtonGroup = function FloatButtonGroup(props) {
|
|
|
130
154
|
});
|
|
131
155
|
}
|
|
132
156
|
}), _jsx(FloatButton, _objectSpread({
|
|
133
|
-
ref: floatButtonRef,
|
|
134
157
|
type: type,
|
|
135
|
-
shape: shape,
|
|
136
158
|
icon: open ? mergedCloseIcon : icon,
|
|
137
159
|
description: description,
|
|
138
|
-
"aria-label": props['aria-label']
|
|
160
|
+
"aria-label": props['aria-label'],
|
|
161
|
+
className: "".concat(groupPrefixCls, "-trigger"),
|
|
162
|
+
onClick: onInternalTriggerButtonClick
|
|
139
163
|
}, floatButtonProps))]
|
|
140
164
|
}) : _children
|
|
141
|
-
})
|
|
165
|
+
})
|
|
142
166
|
}));
|
|
143
167
|
};
|
|
144
|
-
export default
|
|
168
|
+
export default FloatButtonGroup;
|
|
@@ -4,51 +4,15 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
4
4
|
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
5
5
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
6
6
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
|
-
import {
|
|
7
|
+
import { unit } from '@ant-design/cssinjs';
|
|
8
8
|
import { resetComponent } from '../../style';
|
|
9
9
|
import { initFadeMotion } from '../../style/motion/fade';
|
|
10
|
-
import { initMotion } from '../../style/motion/motion';
|
|
11
10
|
import { genStyleHooks, mergeToken } from '../../theme/internal';
|
|
12
11
|
import getOffset from '../util';
|
|
13
|
-
|
|
14
|
-
var componentCls = token.componentCls,
|
|
15
|
-
floatButtonSize = token.floatButtonSize,
|
|
16
|
-
motionDurationSlow = token.motionDurationSlow,
|
|
17
|
-
motionEaseInOutCirc = token.motionEaseInOutCirc;
|
|
18
|
-
var groupPrefixCls = "".concat(componentCls, "-group");
|
|
19
|
-
var moveDownIn = new Keyframes('antFloatButtonMoveDownIn', {
|
|
20
|
-
'0%': {
|
|
21
|
-
transform: "translate3d(0, ".concat(unit(floatButtonSize), ", 0)"),
|
|
22
|
-
transformOrigin: '0 0',
|
|
23
|
-
opacity: 0
|
|
24
|
-
},
|
|
25
|
-
'100%': {
|
|
26
|
-
transform: 'translate3d(0, 0, 0)',
|
|
27
|
-
transformOrigin: '0 0',
|
|
28
|
-
opacity: 1
|
|
29
|
-
}
|
|
30
|
-
});
|
|
31
|
-
var moveDownOut = new Keyframes('antFloatButtonMoveDownOut', {
|
|
32
|
-
'0%': {
|
|
33
|
-
transform: 'translate3d(0, 0, 0)',
|
|
34
|
-
transformOrigin: '0 0',
|
|
35
|
-
opacity: 1
|
|
36
|
-
},
|
|
37
|
-
'100%': {
|
|
38
|
-
transform: "translate3d(0, ".concat(unit(floatButtonSize), ", 0)"),
|
|
39
|
-
transformOrigin: '0 0',
|
|
40
|
-
opacity: 0
|
|
41
|
-
}
|
|
42
|
-
});
|
|
43
|
-
return [_defineProperty({}, "".concat(groupPrefixCls, "-wrap"), _objectSpread({}, initMotion("".concat(groupPrefixCls, "-wrap"), moveDownIn, moveDownOut, motionDurationSlow, true))), _defineProperty({}, "".concat(groupPrefixCls, "-wrap"), _defineProperty(_defineProperty({}, "\n &".concat(groupPrefixCls, "-wrap-enter,\n &").concat(groupPrefixCls, "-wrap-appear\n "), {
|
|
44
|
-
opacity: 0,
|
|
45
|
-
animationTimingFunction: motionEaseInOutCirc
|
|
46
|
-
}), "&".concat(groupPrefixCls, "-wrap-leave"), {
|
|
47
|
-
animationTimingFunction: motionEaseInOutCirc
|
|
48
|
-
}))];
|
|
49
|
-
};
|
|
12
|
+
import floatButtonGroupMotion from './keyframes';
|
|
50
13
|
// ============================== Group ==============================
|
|
51
14
|
var floatButtonGroupStyle = function floatButtonGroupStyle(token) {
|
|
15
|
+
var _ref;
|
|
52
16
|
var antCls = token.antCls,
|
|
53
17
|
componentCls = token.componentCls,
|
|
54
18
|
floatButtonSize = token.floatButtonSize,
|
|
@@ -57,61 +21,128 @@ var floatButtonGroupStyle = function floatButtonGroupStyle(token) {
|
|
|
57
21
|
borderRadiusSM = token.borderRadiusSM,
|
|
58
22
|
badgeOffset = token.badgeOffset,
|
|
59
23
|
floatButtonBodyPadding = token.floatButtonBodyPadding,
|
|
24
|
+
zIndexPopupBase = token.zIndexPopupBase,
|
|
60
25
|
calc = token.calc;
|
|
61
26
|
var groupPrefixCls = "".concat(componentCls, "-group");
|
|
62
|
-
return _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(
|
|
63
|
-
zIndex:
|
|
64
|
-
display: '
|
|
27
|
+
return _ref = {}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_ref, groupPrefixCls, _objectSpread(_objectSpread({}, resetComponent(token)), {}, _defineProperty(_defineProperty(_defineProperty({
|
|
28
|
+
zIndex: zIndexPopupBase,
|
|
29
|
+
display: 'flex',
|
|
30
|
+
flexDirection: 'column',
|
|
31
|
+
alignItems: 'center',
|
|
32
|
+
justifyContent: 'center',
|
|
65
33
|
border: 'none',
|
|
66
34
|
position: 'fixed',
|
|
67
|
-
width: floatButtonSize,
|
|
68
35
|
height: 'auto',
|
|
69
36
|
boxShadow: 'none',
|
|
37
|
+
minWidth: floatButtonSize,
|
|
70
38
|
minHeight: floatButtonSize,
|
|
71
39
|
insetInlineEnd: token.floatButtonInsetInlineEnd,
|
|
72
|
-
|
|
40
|
+
bottom: token.floatButtonInsetBlockEnd,
|
|
73
41
|
borderRadius: borderRadiusLG
|
|
74
42
|
}, "".concat(groupPrefixCls, "-wrap"), {
|
|
75
43
|
zIndex: -1,
|
|
76
|
-
display: '
|
|
77
|
-
|
|
78
|
-
|
|
44
|
+
display: 'flex',
|
|
45
|
+
justifyContent: 'center',
|
|
46
|
+
alignItems: 'center',
|
|
47
|
+
position: 'absolute'
|
|
79
48
|
}), "&".concat(groupPrefixCls, "-rtl"), {
|
|
80
49
|
direction: 'rtl'
|
|
81
50
|
}), componentCls, {
|
|
82
51
|
position: 'static'
|
|
83
|
-
}))), "".concat(groupPrefixCls, "-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
52
|
+
}))), "".concat(groupPrefixCls, "-top > ").concat(groupPrefixCls, "-wrap"), {
|
|
53
|
+
flexDirection: 'column',
|
|
54
|
+
top: 'auto',
|
|
55
|
+
bottom: calc(floatButtonSize).add(margin).equal(),
|
|
56
|
+
'&::after': {
|
|
57
|
+
content: '""',
|
|
58
|
+
position: 'absolute',
|
|
59
|
+
width: '100%',
|
|
60
|
+
height: margin,
|
|
61
|
+
bottom: calc(margin).mul(-1).equal()
|
|
62
|
+
}
|
|
63
|
+
}), "".concat(groupPrefixCls, "-bottom > ").concat(groupPrefixCls, "-wrap"), {
|
|
64
|
+
flexDirection: 'column',
|
|
65
|
+
top: calc(floatButtonSize).add(margin).equal(),
|
|
66
|
+
bottom: 'auto',
|
|
67
|
+
'&::after': {
|
|
68
|
+
content: '""',
|
|
69
|
+
position: 'absolute',
|
|
70
|
+
width: '100%',
|
|
71
|
+
height: margin,
|
|
72
|
+
top: calc(margin).mul(-1).equal()
|
|
73
|
+
}
|
|
74
|
+
}), "".concat(groupPrefixCls, "-right > ").concat(groupPrefixCls, "-wrap"), {
|
|
75
|
+
flexDirection: 'row',
|
|
76
|
+
left: {
|
|
77
|
+
_skip_check_: true,
|
|
78
|
+
value: calc(floatButtonSize).add(margin).equal()
|
|
95
79
|
},
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
80
|
+
right: {
|
|
81
|
+
_skip_check_: true,
|
|
82
|
+
value: 'auto'
|
|
99
83
|
},
|
|
100
|
-
'
|
|
101
|
-
|
|
84
|
+
'&::after': {
|
|
85
|
+
content: '""',
|
|
86
|
+
position: 'absolute',
|
|
87
|
+
width: margin,
|
|
88
|
+
height: '100%',
|
|
89
|
+
left: {
|
|
90
|
+
_skip_check_: true,
|
|
91
|
+
value: calc(margin).mul(-1).equal()
|
|
92
|
+
}
|
|
102
93
|
}
|
|
103
|
-
}, "".concat(
|
|
94
|
+
}), "".concat(groupPrefixCls, "-left > ").concat(groupPrefixCls, "-wrap"), {
|
|
95
|
+
flexDirection: 'row',
|
|
96
|
+
left: {
|
|
97
|
+
_skip_check_: true,
|
|
98
|
+
value: 'auto'
|
|
99
|
+
},
|
|
100
|
+
right: {
|
|
101
|
+
_skip_check_: true,
|
|
102
|
+
value: calc(floatButtonSize).add(margin).equal()
|
|
103
|
+
},
|
|
104
|
+
'&::after': {
|
|
105
|
+
content: '""',
|
|
106
|
+
position: 'absolute',
|
|
107
|
+
width: margin,
|
|
108
|
+
height: '100%',
|
|
109
|
+
right: {
|
|
110
|
+
_skip_check_: true,
|
|
111
|
+
value: calc(margin).mul(-1).equal()
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}), "".concat(groupPrefixCls, "-circle"), _defineProperty({
|
|
115
|
+
gap: margin
|
|
116
|
+
}, "".concat(groupPrefixCls, "-wrap"), {
|
|
117
|
+
gap: margin
|
|
118
|
+
})), "".concat(groupPrefixCls, "-square"), _defineProperty(_defineProperty({}, "".concat(componentCls, "-square"), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({
|
|
119
|
+
padding: 0,
|
|
120
|
+
borderRadius: 0
|
|
121
|
+
}, "&".concat(groupPrefixCls, "-trigger"), {
|
|
122
|
+
borderRadius: borderRadiusLG
|
|
123
|
+
}), '&:first-child', {
|
|
124
|
+
borderStartStartRadius: borderRadiusLG,
|
|
125
|
+
borderStartEndRadius: borderRadiusLG
|
|
126
|
+
}), '&:last-child', {
|
|
127
|
+
borderEndStartRadius: borderRadiusLG,
|
|
128
|
+
borderEndEndRadius: borderRadiusLG
|
|
129
|
+
}), '&:not(:last-child)', {
|
|
130
|
+
borderBottom: "".concat(unit(token.lineWidth), " ").concat(token.lineType, " ").concat(token.colorSplit)
|
|
131
|
+
}), "".concat(antCls, "-badge"), _defineProperty({}, "".concat(antCls, "-badge-count"), {
|
|
104
132
|
top: calc(calc(floatButtonBodyPadding).add(badgeOffset)).mul(-1).equal(),
|
|
105
133
|
insetInlineEnd: calc(calc(floatButtonBodyPadding).add(badgeOffset)).mul(-1).equal()
|
|
106
134
|
}))), "".concat(groupPrefixCls, "-wrap"), _defineProperty({
|
|
107
|
-
display: 'block',
|
|
108
135
|
borderRadius: borderRadiusLG,
|
|
109
136
|
boxShadow: token.boxShadowSecondary
|
|
110
137
|
}, "".concat(componentCls, "-square"), _defineProperty({
|
|
111
138
|
boxShadow: 'none',
|
|
112
|
-
marginTop: 0,
|
|
113
139
|
borderRadius: 0,
|
|
114
|
-
padding: floatButtonBodyPadding
|
|
140
|
+
padding: floatButtonBodyPadding
|
|
141
|
+
}, "".concat(componentCls, "-body"), {
|
|
142
|
+
width: token.floatButtonBodySize,
|
|
143
|
+
height: token.floatButtonBodySize,
|
|
144
|
+
borderRadius: borderRadiusSM
|
|
145
|
+
})))), "".concat(groupPrefixCls, "-top > ").concat(groupPrefixCls, "-wrap, ").concat(groupPrefixCls, "-bottom > ").concat(groupPrefixCls, "-wrap"), _defineProperty({}, "> ".concat(componentCls, "-square"), {
|
|
115
146
|
'&:first-child': {
|
|
116
147
|
borderStartStartRadius: borderRadiusLG,
|
|
117
148
|
borderStartEndRadius: borderRadiusLG
|
|
@@ -123,12 +154,21 @@ var floatButtonGroupStyle = function floatButtonGroupStyle(token) {
|
|
|
123
154
|
'&:not(:last-child)': {
|
|
124
155
|
borderBottom: "".concat(unit(token.lineWidth), " ").concat(token.lineType, " ").concat(token.colorSplit)
|
|
125
156
|
}
|
|
126
|
-
}, "".concat(componentCls, "-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
157
|
+
})), "".concat(groupPrefixCls, "-left > ").concat(groupPrefixCls, "-wrap, ").concat(groupPrefixCls, "-right > ").concat(groupPrefixCls, "-wrap"), _defineProperty({}, "> ".concat(componentCls, "-square"), {
|
|
158
|
+
'&:first-child': {
|
|
159
|
+
borderStartStartRadius: borderRadiusLG,
|
|
160
|
+
borderEndStartRadius: borderRadiusLG
|
|
161
|
+
},
|
|
162
|
+
'&:last-child': {
|
|
163
|
+
borderStartEndRadius: borderRadiusLG,
|
|
164
|
+
borderEndEndRadius: borderRadiusLG
|
|
165
|
+
},
|
|
166
|
+
'&:not(:last-child)': {
|
|
167
|
+
borderInlineEnd: "".concat(unit(token.lineWidth), " ").concat(token.lineType, " ").concat(token.colorSplit)
|
|
168
|
+
}
|
|
169
|
+
})), "".concat(groupPrefixCls, "-circle-shadow"), {
|
|
130
170
|
boxShadow: 'none'
|
|
131
|
-
}), "".concat(groupPrefixCls, "-square-shadow"), _defineProperty({
|
|
171
|
+
}), _defineProperty(_ref, "".concat(groupPrefixCls, "-square-shadow"), _defineProperty({
|
|
132
172
|
boxShadow: token.boxShadowSecondary
|
|
133
173
|
}, "".concat(componentCls, "-square"), _defineProperty({
|
|
134
174
|
boxShadow: 'none',
|
|
@@ -150,12 +190,13 @@ var sharedFloatButtonStyle = function sharedFloatButtonStyle(token) {
|
|
|
150
190
|
badgeOffset = token.badgeOffset,
|
|
151
191
|
dotOffsetInSquare = token.dotOffsetInSquare,
|
|
152
192
|
dotOffsetInCircle = token.dotOffsetInCircle,
|
|
193
|
+
zIndexPopupBase = token.zIndexPopupBase,
|
|
153
194
|
calc = token.calc;
|
|
154
195
|
return _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, componentCls, _objectSpread(_objectSpread({}, resetComponent(token)), {}, _defineProperty(_defineProperty({
|
|
155
196
|
border: 'none',
|
|
156
197
|
position: 'fixed',
|
|
157
198
|
cursor: 'pointer',
|
|
158
|
-
zIndex:
|
|
199
|
+
zIndex: zIndexPopupBase,
|
|
159
200
|
// Do not remove the 'display: block' here.
|
|
160
201
|
// Deleting it will cause marginBottom to become ineffective.
|
|
161
202
|
// Ref: https://github.com/ant-design/ant-design/issues/44700
|
|
@@ -163,7 +204,7 @@ var sharedFloatButtonStyle = function sharedFloatButtonStyle(token) {
|
|
|
163
204
|
width: floatButtonSize,
|
|
164
205
|
height: floatButtonSize,
|
|
165
206
|
insetInlineEnd: token.floatButtonInsetInlineEnd,
|
|
166
|
-
|
|
207
|
+
bottom: token.floatButtonInsetBlockEnd,
|
|
167
208
|
boxShadow: token.boxShadowSecondary,
|
|
168
209
|
// Pure Panel
|
|
169
210
|
'&-pure': {
|
|
@@ -290,5 +331,5 @@ export default genStyleHooks('FloatButton', function (token) {
|
|
|
290
331
|
floatButtonBodyPadding: paddingXXS,
|
|
291
332
|
badgeOffset: calc(paddingXXS).mul(1.5).equal()
|
|
292
333
|
});
|
|
293
|
-
return [floatButtonGroupStyle(floatButtonToken), sharedFloatButtonStyle(floatButtonToken), initFadeMotion(token),
|
|
334
|
+
return [floatButtonGroupStyle(floatButtonToken), sharedFloatButtonStyle(floatButtonToken), initFadeMotion(token), floatButtonGroupMotion(floatButtonToken)];
|
|
294
335
|
}, prepareComponentToken);
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
3
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
4
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
5
|
+
import { Keyframes, unit } from '@ant-design/cssinjs';
|
|
6
|
+
import { initMotion } from '../../style/motion/motion';
|
|
7
|
+
var floatButtonGroupMotion = function floatButtonGroupMotion(token) {
|
|
8
|
+
var componentCls = token.componentCls,
|
|
9
|
+
floatButtonSize = token.floatButtonSize,
|
|
10
|
+
motionDurationSlow = token.motionDurationSlow,
|
|
11
|
+
motionEaseInOutCirc = token.motionEaseInOutCirc,
|
|
12
|
+
calc = token.calc;
|
|
13
|
+
var moveTopIn = new Keyframes('antFloatButtonMoveTopIn', {
|
|
14
|
+
'0%': {
|
|
15
|
+
transform: "translate3d(0, ".concat(unit(floatButtonSize), ", 0)"),
|
|
16
|
+
transformOrigin: '0 0',
|
|
17
|
+
opacity: 0
|
|
18
|
+
},
|
|
19
|
+
'100%': {
|
|
20
|
+
transform: 'translate3d(0, 0, 0)',
|
|
21
|
+
transformOrigin: '0 0',
|
|
22
|
+
opacity: 1
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
var moveTopOut = new Keyframes('antFloatButtonMoveTopOut', {
|
|
26
|
+
'0%': {
|
|
27
|
+
transform: 'translate3d(0, 0, 0)',
|
|
28
|
+
transformOrigin: '0 0',
|
|
29
|
+
opacity: 1
|
|
30
|
+
},
|
|
31
|
+
'100%': {
|
|
32
|
+
transform: "translate3d(0, ".concat(unit(floatButtonSize), ", 0)"),
|
|
33
|
+
transformOrigin: '0 0',
|
|
34
|
+
opacity: 0
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
var moveRightIn = new Keyframes('antFloatButtonMoveRightIn', {
|
|
38
|
+
'0%': {
|
|
39
|
+
transform: "translate3d(".concat(calc(floatButtonSize).mul(-1).equal(), ", 0, 0)"),
|
|
40
|
+
transformOrigin: '0 0',
|
|
41
|
+
opacity: 0
|
|
42
|
+
},
|
|
43
|
+
'100%': {
|
|
44
|
+
transform: 'translate3d(0, 0, 0)',
|
|
45
|
+
transformOrigin: '0 0',
|
|
46
|
+
opacity: 1
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
var moveRightOut = new Keyframes('antFloatButtonMoveRightOut', {
|
|
50
|
+
'0%': {
|
|
51
|
+
transform: 'translate3d(0, 0, 0)',
|
|
52
|
+
transformOrigin: '0 0',
|
|
53
|
+
opacity: 1
|
|
54
|
+
},
|
|
55
|
+
'100%': {
|
|
56
|
+
transform: "translate3d(".concat(calc(floatButtonSize).mul(-1).equal(), ", 0, 0)"),
|
|
57
|
+
transformOrigin: '0 0',
|
|
58
|
+
opacity: 0
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
var moveBottomIn = new Keyframes('antFloatButtonMoveBottomIn', {
|
|
62
|
+
'0%': {
|
|
63
|
+
transform: "translate3d(0, ".concat(calc(floatButtonSize).mul(-1).equal(), ", 0)"),
|
|
64
|
+
transformOrigin: '0 0',
|
|
65
|
+
opacity: 0
|
|
66
|
+
},
|
|
67
|
+
'100%': {
|
|
68
|
+
transform: 'translate3d(0, 0, 0)',
|
|
69
|
+
transformOrigin: '0 0',
|
|
70
|
+
opacity: 1
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
var moveBottomOut = new Keyframes('antFloatButtonMoveBottomOut', {
|
|
74
|
+
'0%': {
|
|
75
|
+
transform: 'translate3d(0, 0, 0)',
|
|
76
|
+
transformOrigin: '0 0',
|
|
77
|
+
opacity: 1
|
|
78
|
+
},
|
|
79
|
+
'100%': {
|
|
80
|
+
transform: "translate3d(0, ".concat(calc(floatButtonSize).mul(-1).equal(), ", 0)"),
|
|
81
|
+
transformOrigin: '0 0',
|
|
82
|
+
opacity: 0
|
|
83
|
+
}
|
|
84
|
+
});
|
|
85
|
+
var moveLeftIn = new Keyframes('antFloatButtonMoveLeftIn', {
|
|
86
|
+
'0%': {
|
|
87
|
+
transform: "translate3d(".concat(unit(floatButtonSize), ", 0, 0)"),
|
|
88
|
+
transformOrigin: '0 0',
|
|
89
|
+
opacity: 0
|
|
90
|
+
},
|
|
91
|
+
'100%': {
|
|
92
|
+
transform: 'translate3d(0, 0, 0)',
|
|
93
|
+
transformOrigin: '0 0',
|
|
94
|
+
opacity: 1
|
|
95
|
+
}
|
|
96
|
+
});
|
|
97
|
+
var moveLeftOut = new Keyframes('antFloatButtonMoveLeftOut', {
|
|
98
|
+
'0%': {
|
|
99
|
+
transform: 'translate3d(0, 0, 0)',
|
|
100
|
+
transformOrigin: '0 0',
|
|
101
|
+
opacity: 1
|
|
102
|
+
},
|
|
103
|
+
'100%': {
|
|
104
|
+
transform: "translate3d(".concat(unit(floatButtonSize), ", 0, 0)"),
|
|
105
|
+
transformOrigin: '0 0',
|
|
106
|
+
opacity: 0
|
|
107
|
+
}
|
|
108
|
+
});
|
|
109
|
+
var groupPrefixCls = "".concat(componentCls, "-group");
|
|
110
|
+
return [_defineProperty({}, groupPrefixCls, _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "&".concat(groupPrefixCls, "-top ").concat(groupPrefixCls, "-wrap"), initMotion("".concat(groupPrefixCls, "-wrap"), moveTopIn, moveTopOut, motionDurationSlow, true)), "&".concat(groupPrefixCls, "-bottom ").concat(groupPrefixCls, "-wrap"), initMotion("".concat(groupPrefixCls, "-wrap"), moveBottomIn, moveBottomOut, motionDurationSlow, true)), "&".concat(groupPrefixCls, "-left ").concat(groupPrefixCls, "-wrap"), initMotion("".concat(groupPrefixCls, "-wrap"), moveLeftIn, moveLeftOut, motionDurationSlow, true)), "&".concat(groupPrefixCls, "-right ").concat(groupPrefixCls, "-wrap"), initMotion("".concat(groupPrefixCls, "-wrap"), moveRightIn, moveRightOut, motionDurationSlow, true))), _defineProperty({}, "".concat(groupPrefixCls, "-wrap"), _defineProperty(_defineProperty({}, "&".concat(groupPrefixCls, "-wrap-enter, &").concat(groupPrefixCls, "-wrap-appear"), {
|
|
111
|
+
opacity: 0,
|
|
112
|
+
animationTimingFunction: motionEaseInOutCirc
|
|
113
|
+
}), "&".concat(groupPrefixCls, "-wrap-leave"), {
|
|
114
|
+
opacity: 1,
|
|
115
|
+
animationTimingFunction: motionEaseInOutCirc
|
|
116
|
+
}))];
|
|
117
|
+
};
|
|
118
|
+
export default floatButtonGroupMotion;
|
|
@@ -69,6 +69,18 @@ var ErrorList = function ErrorList(_ref) {
|
|
|
69
69
|
return toErrorEntity(warning, 'warning', 'warning', index);
|
|
70
70
|
})));
|
|
71
71
|
}, [help, helpStatus, debounceErrors, debounceWarnings]);
|
|
72
|
+
var filledKeyFullKeyList = React.useMemo(function () {
|
|
73
|
+
var keysCount = {};
|
|
74
|
+
fullKeyList.forEach(function (_ref2) {
|
|
75
|
+
var key = _ref2.key;
|
|
76
|
+
keysCount[key] = (keysCount[key] || 0) + 1;
|
|
77
|
+
});
|
|
78
|
+
return fullKeyList.map(function (entity, index) {
|
|
79
|
+
return _objectSpread(_objectSpread({}, entity), {}, {
|
|
80
|
+
key: keysCount[entity.key] > 1 ? "".concat(entity.key, "-fallback-").concat(index) : entity.key
|
|
81
|
+
});
|
|
82
|
+
});
|
|
83
|
+
}, [fullKeyList]);
|
|
72
84
|
var helpProps = {};
|
|
73
85
|
if (fieldId) {
|
|
74
86
|
helpProps.id = "".concat(fieldId, "_help");
|
|
@@ -76,7 +88,7 @@ var ErrorList = function ErrorList(_ref) {
|
|
|
76
88
|
return wrapCSSVar(_jsx(CSSMotion, {
|
|
77
89
|
motionDeadline: collapseMotion.motionDeadline,
|
|
78
90
|
motionName: "".concat(prefixCls, "-show-help"),
|
|
79
|
-
visible: !!
|
|
91
|
+
visible: !!filledKeyFullKeyList.length,
|
|
80
92
|
onVisibleChanged: onVisibleChanged,
|
|
81
93
|
children: function children(holderProps) {
|
|
82
94
|
var holderClassName = holderProps.className,
|
|
@@ -86,7 +98,7 @@ var ErrorList = function ErrorList(_ref) {
|
|
|
86
98
|
style: holderStyle,
|
|
87
99
|
role: "alert",
|
|
88
100
|
children: _jsx(CSSMotionList, _objectSpread(_objectSpread({
|
|
89
|
-
keys:
|
|
101
|
+
keys: filledKeyFullKeyList
|
|
90
102
|
}, initCollapseMotion(prefixCls)), {}, {
|
|
91
103
|
motionName: "".concat(prefixCls, "-show-help-item"),
|
|
92
104
|
component: false,
|