@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
|
@@ -80,7 +80,7 @@ var Compact = function Compact(props) {
|
|
|
80
80
|
var childNodes = toArray(children);
|
|
81
81
|
var nodes = React.useMemo(function () {
|
|
82
82
|
return childNodes.map(function (child, i) {
|
|
83
|
-
var key = child
|
|
83
|
+
var key = (child === null || child === void 0 ? void 0 : child.key) || "".concat(prefixCls, "-item-").concat(i);
|
|
84
84
|
return _jsx(CompactItem, {
|
|
85
85
|
compactSize: mergedSize,
|
|
86
86
|
compactDirection: direction,
|
package/lib/Antd5/space/index.js
CHANGED
|
@@ -25,13 +25,13 @@ import Item from './Item';
|
|
|
25
25
|
import useStyle from './style';
|
|
26
26
|
export { SpaceContext } from './context';
|
|
27
27
|
var InternalSpace = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
28
|
-
var _customClassNames$ite, _space$classNames;
|
|
28
|
+
var _space$size, _customClassNames$ite, _space$classNames;
|
|
29
29
|
var _React$useContext = React.useContext(ConfigContext),
|
|
30
30
|
getPrefixCls = _React$useContext.getPrefixCls,
|
|
31
31
|
space = _React$useContext.space,
|
|
32
32
|
directionConfig = _React$useContext.direction;
|
|
33
33
|
var _props$size = props.size,
|
|
34
|
-
size = _props$size === void 0 ? (space === null || space === void 0 ? void 0 : space.size)
|
|
34
|
+
size = _props$size === void 0 ? (_space$size = space === null || space === void 0 ? void 0 : space.size) !== null && _space$size !== void 0 ? _space$size : 'small' : _props$size,
|
|
35
35
|
align = props.align,
|
|
36
36
|
className = props.className,
|
|
37
37
|
rootClassName = props.rootClassName,
|
|
@@ -73,7 +73,7 @@ var InternalSpace = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
73
73
|
if (child !== null && child !== undefined) {
|
|
74
74
|
latestIndex = i;
|
|
75
75
|
}
|
|
76
|
-
var key = child
|
|
76
|
+
var key = (child === null || child === void 0 ? void 0 : child.key) || "".concat(itemClassName, "-").concat(i);
|
|
77
77
|
return _jsx(Item, {
|
|
78
78
|
className: itemClassName,
|
|
79
79
|
index: i,
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import classNames from 'classnames';
|
|
4
|
+
import Progress from './Progress';
|
|
5
|
+
export default function Looper(props) {
|
|
6
|
+
var prefixCls = props.prefixCls,
|
|
7
|
+
_props$percent = props.percent,
|
|
8
|
+
percent = _props$percent === void 0 ? 0 : _props$percent;
|
|
9
|
+
var dotClassName = "".concat(prefixCls, "-dot");
|
|
10
|
+
var holderClassName = "".concat(dotClassName, "-holder");
|
|
11
|
+
var hideClassName = "".concat(holderClassName, "-hidden");
|
|
12
|
+
// ===================== Render =====================
|
|
13
|
+
return _jsxs(_Fragment, {
|
|
14
|
+
children: [_jsx("span", {
|
|
15
|
+
className: classNames(holderClassName, percent > 0 && hideClassName),
|
|
16
|
+
children: _jsx("span", {
|
|
17
|
+
className: classNames(dotClassName, "".concat(prefixCls, "-dot-spin")),
|
|
18
|
+
children: [1, 2, 3, 4].map(function (i) {
|
|
19
|
+
return _jsx("i", {
|
|
20
|
+
className: "".concat(prefixCls, "-dot-item")
|
|
21
|
+
}, i);
|
|
22
|
+
})
|
|
23
|
+
})
|
|
24
|
+
}), _jsx(Progress, {
|
|
25
|
+
prefixCls: prefixCls,
|
|
26
|
+
percent: percent
|
|
27
|
+
})]
|
|
28
|
+
});
|
|
29
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
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 _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
3
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
4
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
5
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
6
|
+
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; } }
|
|
7
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
8
|
+
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; }
|
|
9
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
10
|
+
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); }
|
|
11
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
12
|
+
import * as React from 'react';
|
|
13
|
+
import classNames from 'classnames';
|
|
14
|
+
import useLayoutEffect from 'rc-util/lib/hooks/useLayoutEffect';
|
|
15
|
+
var viewSize = 100;
|
|
16
|
+
var borderWidth = viewSize / 5;
|
|
17
|
+
var radius = viewSize / 2 - borderWidth / 2;
|
|
18
|
+
var circumference = radius * 2 * Math.PI;
|
|
19
|
+
var position = 50;
|
|
20
|
+
var CustomCircle = function CustomCircle(props) {
|
|
21
|
+
var dotClassName = props.dotClassName,
|
|
22
|
+
style = props.style,
|
|
23
|
+
hasCircleCls = props.hasCircleCls;
|
|
24
|
+
return _jsx("circle", {
|
|
25
|
+
className: classNames("".concat(dotClassName, "-circle"), _defineProperty({}, "".concat(dotClassName, "-circle-bg"), hasCircleCls)),
|
|
26
|
+
r: radius,
|
|
27
|
+
cx: position,
|
|
28
|
+
cy: position,
|
|
29
|
+
strokeWidth: borderWidth,
|
|
30
|
+
style: style
|
|
31
|
+
});
|
|
32
|
+
};
|
|
33
|
+
var Progress = function Progress(_ref) {
|
|
34
|
+
var percent = _ref.percent,
|
|
35
|
+
prefixCls = _ref.prefixCls;
|
|
36
|
+
var dotClassName = "".concat(prefixCls, "-dot");
|
|
37
|
+
var holderClassName = "".concat(dotClassName, "-holder");
|
|
38
|
+
var hideClassName = "".concat(holderClassName, "-hidden");
|
|
39
|
+
var _React$useState = React.useState(false),
|
|
40
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
41
|
+
render = _React$useState2[0],
|
|
42
|
+
setRender = _React$useState2[1];
|
|
43
|
+
// ==================== Visible =====================
|
|
44
|
+
useLayoutEffect(function () {
|
|
45
|
+
if (percent !== 0) {
|
|
46
|
+
setRender(true);
|
|
47
|
+
}
|
|
48
|
+
}, [percent !== 0]);
|
|
49
|
+
// ==================== Progress ====================
|
|
50
|
+
var safePtg = Math.max(Math.min(percent, 100), 0);
|
|
51
|
+
// ===================== Render =====================
|
|
52
|
+
if (!render) {
|
|
53
|
+
return null;
|
|
54
|
+
}
|
|
55
|
+
var circleStyle = {
|
|
56
|
+
strokeDashoffset: "".concat(circumference / 4),
|
|
57
|
+
strokeDasharray: "".concat(circumference * safePtg / 100, " ").concat(circumference * (100 - safePtg) / 100)
|
|
58
|
+
};
|
|
59
|
+
return _jsx("span", {
|
|
60
|
+
className: classNames(holderClassName, "".concat(dotClassName, "-progress"), safePtg <= 0 && hideClassName),
|
|
61
|
+
children: _jsxs("svg", {
|
|
62
|
+
viewBox: "0 0 ".concat(viewSize, " ").concat(viewSize),
|
|
63
|
+
// biome-ignore lint/a11y/noNoninteractiveElementToInteractiveRole: progressbar could be readonly
|
|
64
|
+
role: "progressbar",
|
|
65
|
+
"aria-valuemin": 0,
|
|
66
|
+
"aria-valuemax": 100,
|
|
67
|
+
"aria-valuenow": safePtg,
|
|
68
|
+
children: [_jsx(CustomCircle, {
|
|
69
|
+
dotClassName: dotClassName,
|
|
70
|
+
hasCircleCls: true
|
|
71
|
+
}), _jsx(CustomCircle, {
|
|
72
|
+
dotClassName: dotClassName,
|
|
73
|
+
style: circleStyle
|
|
74
|
+
})]
|
|
75
|
+
})
|
|
76
|
+
});
|
|
77
|
+
};
|
|
78
|
+
export default Progress;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import classNames from 'classnames';
|
|
4
|
+
import { cloneElement } from '../../_util/reactNode';
|
|
5
|
+
import Looper from './Looper';
|
|
6
|
+
export default function Indicator(props) {
|
|
7
|
+
var prefixCls = props.prefixCls,
|
|
8
|
+
indicator = props.indicator,
|
|
9
|
+
percent = props.percent;
|
|
10
|
+
var dotClassName = "".concat(prefixCls, "-dot");
|
|
11
|
+
if (indicator && /*#__PURE__*/React.isValidElement(indicator)) {
|
|
12
|
+
return cloneElement(indicator, {
|
|
13
|
+
className: classNames(indicator.props.className, dotClassName),
|
|
14
|
+
percent: percent
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
return _jsx(Looper, {
|
|
18
|
+
prefixCls: prefixCls,
|
|
19
|
+
percent: percent
|
|
20
|
+
});
|
|
21
|
+
}
|
package/lib/Antd5/spin/index.js
CHANGED
|
@@ -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", "spinning", "delay", "className", "rootClassName", "size", "tip", "wrapperClassName", "style", "children", "fullscreen"];
|
|
2
|
+
var _excluded = ["prefixCls", "spinning", "delay", "className", "rootClassName", "size", "tip", "wrapperClassName", "style", "children", "fullscreen", "indicator", "percent"];
|
|
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; }
|
|
@@ -16,49 +16,20 @@ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t =
|
|
|
16
16
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
17
17
|
import * as React from 'react';
|
|
18
18
|
import classNames from 'classnames';
|
|
19
|
-
import omit from 'rc-util/lib/omit';
|
|
20
19
|
import { debounce } from 'throttle-debounce';
|
|
21
|
-
import { cloneElement } from '../_util/reactNode';
|
|
22
20
|
import { devUseWarning } from '../_util/warning';
|
|
23
21
|
import { ConfigContext } from '../config-provider';
|
|
22
|
+
import Indicator from './Indicator';
|
|
24
23
|
import useStyle from './style/index';
|
|
25
|
-
|
|
24
|
+
import usePercent from './usePercent';
|
|
25
|
+
var _SpinSizes = ['small', 'default', 'large'];
|
|
26
26
|
// Render indicator
|
|
27
|
-
var defaultIndicator
|
|
28
|
-
function renderIndicator(prefixCls, props) {
|
|
29
|
-
var indicator = props.indicator;
|
|
30
|
-
var dotClassName = "".concat(prefixCls, "-dot");
|
|
31
|
-
// should not be render default indicator when indicator value is null
|
|
32
|
-
if (indicator === null) {
|
|
33
|
-
return null;
|
|
34
|
-
}
|
|
35
|
-
if (/*#__PURE__*/React.isValidElement(indicator)) {
|
|
36
|
-
return cloneElement(indicator, {
|
|
37
|
-
className: classNames(indicator.props.className, dotClassName)
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
if (/*#__PURE__*/React.isValidElement(defaultIndicator)) {
|
|
41
|
-
return cloneElement(defaultIndicator, {
|
|
42
|
-
className: classNames(defaultIndicator.props.className, dotClassName)
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
return _jsxs("span", {
|
|
46
|
-
className: classNames(dotClassName, "".concat(prefixCls, "-dot-spin")),
|
|
47
|
-
children: [_jsx("i", {
|
|
48
|
-
className: "".concat(prefixCls, "-dot-item")
|
|
49
|
-
}, 1), _jsx("i", {
|
|
50
|
-
className: "".concat(prefixCls, "-dot-item")
|
|
51
|
-
}, 2), _jsx("i", {
|
|
52
|
-
className: "".concat(prefixCls, "-dot-item")
|
|
53
|
-
}, 3), _jsx("i", {
|
|
54
|
-
className: "".concat(prefixCls, "-dot-item")
|
|
55
|
-
}, 4)]
|
|
56
|
-
});
|
|
57
|
-
}
|
|
27
|
+
var defaultIndicator;
|
|
58
28
|
function shouldDelay(spinning, delay) {
|
|
59
29
|
return !!spinning && !!delay && !isNaN(Number(delay));
|
|
60
30
|
}
|
|
61
31
|
var Spin = function Spin(props) {
|
|
32
|
+
var _ref;
|
|
62
33
|
var customizePrefixCls = props.prefixCls,
|
|
63
34
|
_props$spinning = props.spinning,
|
|
64
35
|
customSpinning = _props$spinning === void 0 ? true : _props$spinning,
|
|
@@ -74,9 +45,13 @@ var Spin = function Spin(props) {
|
|
|
74
45
|
children = props.children,
|
|
75
46
|
_props$fullscreen = props.fullscreen,
|
|
76
47
|
fullscreen = _props$fullscreen === void 0 ? false : _props$fullscreen,
|
|
48
|
+
indicator = props.indicator,
|
|
49
|
+
percent = props.percent,
|
|
77
50
|
restProps = _objectWithoutProperties(props, _excluded);
|
|
78
51
|
var _React$useContext = React.useContext(ConfigContext),
|
|
79
|
-
getPrefixCls = _React$useContext.getPrefixCls
|
|
52
|
+
getPrefixCls = _React$useContext.getPrefixCls,
|
|
53
|
+
direction = _React$useContext.direction,
|
|
54
|
+
spin = _React$useContext.spin;
|
|
80
55
|
var prefixCls = getPrefixCls('spin', customizePrefixCls);
|
|
81
56
|
var _useStyle = useStyle(prefixCls),
|
|
82
57
|
_useStyle2 = _slicedToArray(_useStyle, 3),
|
|
@@ -89,6 +64,7 @@ var Spin = function Spin(props) {
|
|
|
89
64
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
90
65
|
spinning = _React$useState2[0],
|
|
91
66
|
setSpinning = _React$useState2[1];
|
|
67
|
+
var mergedPercent = usePercent(spinning, percent);
|
|
92
68
|
React.useEffect(function () {
|
|
93
69
|
if (customSpinning) {
|
|
94
70
|
var showSpinning = debounce(delay, function () {
|
|
@@ -109,26 +85,26 @@ var Spin = function Spin(props) {
|
|
|
109
85
|
var warning = devUseWarning('Spin');
|
|
110
86
|
warning(!tip || isNestedPattern || fullscreen, 'usage', '`tip` only work in nest or fullscreen pattern.');
|
|
111
87
|
}
|
|
112
|
-
var
|
|
113
|
-
direction = _React$useContext2.direction,
|
|
114
|
-
spin = _React$useContext2.spin;
|
|
115
|
-
var spinClassName = classNames(prefixCls, spin === null || spin === void 0 ? void 0 : spin.className, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(prefixCls, "-sm"), size === 'small'), "".concat(prefixCls, "-lg"), size === 'large'), "".concat(prefixCls, "-spinning"), spinning), "".concat(prefixCls, "-show-text"), !!tip), "".concat(prefixCls, "-fullscreen"), fullscreen), "".concat(prefixCls, "-fullscreen-show"), fullscreen && spinning), "".concat(prefixCls, "-rtl"), direction === 'rtl'), className, rootClassName, hashId, cssVarCls);
|
|
88
|
+
var spinClassName = classNames(prefixCls, spin === null || spin === void 0 ? void 0 : spin.className, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(prefixCls, "-sm"), size === 'small'), "".concat(prefixCls, "-lg"), size === 'large'), "".concat(prefixCls, "-spinning"), spinning), "".concat(prefixCls, "-show-text"), !!tip), "".concat(prefixCls, "-rtl"), direction === 'rtl'), className, !fullscreen && rootClassName, hashId, cssVarCls);
|
|
116
89
|
var containerClassName = classNames("".concat(prefixCls, "-container"), _defineProperty({}, "".concat(prefixCls, "-blur"), spinning));
|
|
117
|
-
|
|
118
|
-
var divProps = omit(restProps, ['indicator']);
|
|
90
|
+
var mergedIndicator = (_ref = indicator !== null && indicator !== void 0 ? indicator : spin === null || spin === void 0 ? void 0 : spin.indicator) !== null && _ref !== void 0 ? _ref : defaultIndicator;
|
|
119
91
|
var mergedStyle = _objectSpread(_objectSpread({}, spin === null || spin === void 0 ? void 0 : spin.style), style);
|
|
120
|
-
var spinElement = _jsxs("div", _objectSpread(_objectSpread({},
|
|
92
|
+
var spinElement = _jsxs("div", _objectSpread(_objectSpread({}, restProps), {}, {
|
|
121
93
|
style: mergedStyle,
|
|
122
94
|
className: spinClassName,
|
|
123
95
|
"aria-live": "polite",
|
|
124
96
|
"aria-busy": spinning,
|
|
125
|
-
children: [
|
|
97
|
+
children: [_jsx(Indicator, {
|
|
98
|
+
prefixCls: prefixCls,
|
|
99
|
+
indicator: mergedIndicator,
|
|
100
|
+
percent: mergedPercent
|
|
101
|
+
}), tip && (isNestedPattern || fullscreen) ? _jsx("div", {
|
|
126
102
|
className: "".concat(prefixCls, "-text"),
|
|
127
103
|
children: tip
|
|
128
104
|
}) : null]
|
|
129
105
|
}));
|
|
130
106
|
if (isNestedPattern) {
|
|
131
|
-
return wrapCSSVar(_jsxs("div", _objectSpread(_objectSpread({},
|
|
107
|
+
return wrapCSSVar(_jsxs("div", _objectSpread(_objectSpread({}, restProps), {}, {
|
|
132
108
|
className: classNames("".concat(prefixCls, "-nested-loading"), wrapperClassName, hashId, cssVarCls),
|
|
133
109
|
children: [spinning && _jsx("div", {
|
|
134
110
|
children: spinElement
|
|
@@ -138,6 +114,12 @@ var Spin = function Spin(props) {
|
|
|
138
114
|
}, "container")]
|
|
139
115
|
})));
|
|
140
116
|
}
|
|
117
|
+
if (fullscreen) {
|
|
118
|
+
return wrapCSSVar(_jsx("div", {
|
|
119
|
+
className: classNames("".concat(prefixCls, "-fullscreen"), _defineProperty({}, "".concat(prefixCls, "-fullscreen-show"), spinning), rootClassName, hashId, cssVarCls),
|
|
120
|
+
children: spinElement
|
|
121
|
+
}));
|
|
122
|
+
}
|
|
141
123
|
return wrapCSSVar(spinElement);
|
|
142
124
|
};
|
|
143
125
|
Spin.setDefaultIndicator = function (indicator) {
|
|
@@ -18,9 +18,10 @@ var antRotate = new Keyframes('antRotate', {
|
|
|
18
18
|
}
|
|
19
19
|
});
|
|
20
20
|
var genSpinStyle = function genSpinStyle(token) {
|
|
21
|
+
var _objectSpread2;
|
|
21
22
|
var componentCls = token.componentCls,
|
|
22
23
|
calc = token.calc;
|
|
23
|
-
return _defineProperty({},
|
|
24
|
+
return _defineProperty({}, componentCls, _objectSpread(_objectSpread({}, resetComponent(token)), {}, (_objectSpread2 = {
|
|
24
25
|
position: 'absolute',
|
|
25
26
|
display: 'none',
|
|
26
27
|
color: token.colorPrimary,
|
|
@@ -30,14 +31,14 @@ var genSpinStyle = function genSpinStyle(token) {
|
|
|
30
31
|
opacity: 0,
|
|
31
32
|
transition: "transform ".concat(token.motionDurationSlow, " ").concat(token.motionEaseInOutCirc),
|
|
32
33
|
'&-spinning': {
|
|
33
|
-
position: '
|
|
34
|
+
position: 'relative',
|
|
34
35
|
display: 'inline-block',
|
|
35
36
|
opacity: 1
|
|
36
37
|
}
|
|
37
|
-
}, "".concat(componentCls, "-text"), {
|
|
38
|
+
}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_objectSpread2, "".concat(componentCls, "-text"), {
|
|
38
39
|
fontSize: token.fontSize,
|
|
39
40
|
paddingTop: calc(calc(token.dotSize).sub(token.fontSize)).div(2).add(2).equal()
|
|
40
|
-
}), '&-fullscreen', _defineProperty(
|
|
41
|
+
}), '&-fullscreen', _defineProperty({
|
|
41
42
|
position: 'fixed',
|
|
42
43
|
width: '100vw',
|
|
43
44
|
height: '100vh',
|
|
@@ -55,11 +56,11 @@ var genSpinStyle = function genSpinStyle(token) {
|
|
|
55
56
|
opacity: 1,
|
|
56
57
|
visibility: 'visible'
|
|
57
58
|
}
|
|
58
|
-
},
|
|
59
|
-
|
|
59
|
+
}, componentCls, _defineProperty(_defineProperty({}, "".concat(componentCls, "-dot-holder"), {
|
|
60
|
+
color: token.colorWhite
|
|
60
61
|
}), "".concat(componentCls, "-text"), {
|
|
61
62
|
color: token.colorTextLightSolid
|
|
62
|
-
})), '&-nested-loading', _defineProperty(_defineProperty(_defineProperty({
|
|
63
|
+
}))), '&-nested-loading', _defineProperty(_defineProperty(_defineProperty({
|
|
63
64
|
position: 'relative'
|
|
64
65
|
}, "> div > ".concat(componentCls), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({
|
|
65
66
|
position: 'absolute',
|
|
@@ -112,16 +113,35 @@ var genSpinStyle = function genSpinStyle(token) {
|
|
|
112
113
|
content: '""',
|
|
113
114
|
pointerEvents: 'none'
|
|
114
115
|
}
|
|
115
|
-
}), "".concat(componentCls, "-blur"),
|
|
116
|
+
}), "".concat(componentCls, "-blur"), {
|
|
116
117
|
clear: 'both',
|
|
117
118
|
opacity: 0.5,
|
|
118
119
|
userSelect: 'none',
|
|
119
|
-
pointerEvents: 'none'
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
120
|
+
pointerEvents: 'none',
|
|
121
|
+
'&::after': {
|
|
122
|
+
opacity: 0.4,
|
|
123
|
+
pointerEvents: 'auto'
|
|
124
|
+
}
|
|
125
|
+
})), '&-tip', {
|
|
124
126
|
color: token.spinDotDefault
|
|
127
|
+
}), "".concat(componentCls, "-dot-holder"), {
|
|
128
|
+
width: '1em',
|
|
129
|
+
height: '1em',
|
|
130
|
+
fontSize: token.dotSize,
|
|
131
|
+
display: 'inline-block',
|
|
132
|
+
transition: "transform ".concat(token.motionDurationSlow, " ease, opacity ").concat(token.motionDurationSlow, " ease"),
|
|
133
|
+
transformOrigin: '50% 50%',
|
|
134
|
+
lineHeight: 1,
|
|
135
|
+
color: token.colorPrimary,
|
|
136
|
+
'&-hidden': {
|
|
137
|
+
transform: 'scale(0.3)',
|
|
138
|
+
opacity: 0
|
|
139
|
+
}
|
|
140
|
+
}), "".concat(componentCls, "-dot-progress"), {
|
|
141
|
+
position: 'absolute',
|
|
142
|
+
top: '50%',
|
|
143
|
+
transform: 'translate(-50%, -50%)',
|
|
144
|
+
insetInlineStart: '50%'
|
|
125
145
|
}), "".concat(componentCls, "-dot"), {
|
|
126
146
|
position: 'relative',
|
|
127
147
|
display: 'inline-block',
|
|
@@ -133,7 +153,7 @@ var genSpinStyle = function genSpinStyle(token) {
|
|
|
133
153
|
display: 'block',
|
|
134
154
|
width: calc(token.dotSize).sub(calc(token.marginXXS).div(2)).div(2).equal(),
|
|
135
155
|
height: calc(token.dotSize).sub(calc(token.marginXXS).div(2)).div(2).equal(),
|
|
136
|
-
|
|
156
|
+
background: 'currentColor',
|
|
137
157
|
borderRadius: '100%',
|
|
138
158
|
transform: 'scale(0.75)',
|
|
139
159
|
transformOrigin: '50% 50%',
|
|
@@ -170,22 +190,39 @@ var genSpinStyle = function genSpinStyle(token) {
|
|
|
170
190
|
animationDuration: '1.2s',
|
|
171
191
|
animationIterationCount: 'infinite',
|
|
172
192
|
animationTimingFunction: 'linear'
|
|
193
|
+
},
|
|
194
|
+
'&-circle': {
|
|
195
|
+
strokeLinecap: 'round',
|
|
196
|
+
transition: ['stroke-dashoffset', 'stroke-dasharray', 'stroke', 'stroke-width', 'opacity'].map(function (item) {
|
|
197
|
+
return "".concat(item, " ").concat(token.motionDurationSlow, " ease");
|
|
198
|
+
}).join(','),
|
|
199
|
+
fillOpacity: 0,
|
|
200
|
+
stroke: 'currentcolor'
|
|
201
|
+
},
|
|
202
|
+
'&-circle-bg': {
|
|
203
|
+
stroke: token.colorFillSecondary
|
|
173
204
|
}
|
|
174
205
|
}), "&-sm ".concat(componentCls, "-dot"), {
|
|
175
|
-
|
|
206
|
+
'&, &-holder': {
|
|
207
|
+
fontSize: token.dotSizeSM
|
|
208
|
+
}
|
|
209
|
+
}), "&-sm ".concat(componentCls, "-dot-holder"), {
|
|
176
210
|
i: {
|
|
177
211
|
width: calc(calc(token.dotSizeSM).sub(calc(token.marginXXS).div(2))).div(2).equal(),
|
|
178
212
|
height: calc(calc(token.dotSizeSM).sub(calc(token.marginXXS).div(2))).div(2).equal()
|
|
179
213
|
}
|
|
180
214
|
}), "&-lg ".concat(componentCls, "-dot"), {
|
|
181
|
-
|
|
215
|
+
'&, &-holder': {
|
|
216
|
+
fontSize: token.dotSizeLG
|
|
217
|
+
}
|
|
218
|
+
}), _defineProperty(_defineProperty(_objectSpread2, "&-lg ".concat(componentCls, "-dot-holder"), {
|
|
182
219
|
i: {
|
|
183
220
|
width: calc(calc(token.dotSizeLG).sub(token.marginXXS)).div(2).equal(),
|
|
184
221
|
height: calc(calc(token.dotSizeLG).sub(token.marginXXS)).div(2).equal()
|
|
185
222
|
}
|
|
186
223
|
}), "&".concat(componentCls, "-show-text ").concat(componentCls, "-text"), {
|
|
187
224
|
display: 'block'
|
|
188
|
-
})));
|
|
225
|
+
}))));
|
|
189
226
|
};
|
|
190
227
|
export var prepareComponentToken = function prepareComponentToken(token) {
|
|
191
228
|
var controlHeightLG = token.controlHeightLG,
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
2
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
3
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
4
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
5
|
+
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
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
7
|
+
import * as React from 'react';
|
|
8
|
+
var AUTO_INTERVAL = 200;
|
|
9
|
+
var STEP_BUCKETS = [[30, 0.05], [70, 0.03], [96, 0.01]];
|
|
10
|
+
export default function usePercent(spinning, percent) {
|
|
11
|
+
var _React$useState = React.useState(0),
|
|
12
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
13
|
+
mockPercent = _React$useState2[0],
|
|
14
|
+
setMockPercent = _React$useState2[1];
|
|
15
|
+
var mockIntervalRef = React.useRef();
|
|
16
|
+
var isAuto = percent === 'auto';
|
|
17
|
+
React.useEffect(function () {
|
|
18
|
+
if (isAuto && spinning) {
|
|
19
|
+
setMockPercent(0);
|
|
20
|
+
mockIntervalRef.current = setInterval(function () {
|
|
21
|
+
setMockPercent(function (prev) {
|
|
22
|
+
var restPTG = 100 - prev;
|
|
23
|
+
for (var i = 0; i < STEP_BUCKETS.length; i += 1) {
|
|
24
|
+
var _STEP_BUCKETS$i = _slicedToArray(STEP_BUCKETS[i], 2),
|
|
25
|
+
limit = _STEP_BUCKETS$i[0],
|
|
26
|
+
stepPtg = _STEP_BUCKETS$i[1];
|
|
27
|
+
if (prev <= limit) {
|
|
28
|
+
return prev + restPTG * stepPtg;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
return prev;
|
|
32
|
+
});
|
|
33
|
+
}, AUTO_INTERVAL);
|
|
34
|
+
}
|
|
35
|
+
return function () {
|
|
36
|
+
clearInterval(mockIntervalRef.current);
|
|
37
|
+
};
|
|
38
|
+
}, [isAuto, spinning]);
|
|
39
|
+
return isAuto ? mockPercent : percent;
|
|
40
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
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 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; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
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
|
+
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 { jsx as _jsx } from "react/jsx-runtime";
|
|
8
|
+
import React, { forwardRef } from 'react';
|
|
9
|
+
import classNames from 'classnames';
|
|
10
|
+
export var InternalPanel = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
11
|
+
var prefixCls = props.prefixCls,
|
|
12
|
+
className = props.className,
|
|
13
|
+
children = props.children,
|
|
14
|
+
size = props.size,
|
|
15
|
+
_props$style = props.style,
|
|
16
|
+
style = _props$style === void 0 ? {} : _props$style;
|
|
17
|
+
var panelClassName = classNames("".concat(prefixCls, "-panel"), _defineProperty({}, "".concat(prefixCls, "-panel-hidden"), size === 0), className);
|
|
18
|
+
var hasSize = size !== undefined;
|
|
19
|
+
return _jsx("div", {
|
|
20
|
+
ref: ref,
|
|
21
|
+
className: panelClassName,
|
|
22
|
+
style: _objectSpread(_objectSpread({}, style), {}, {
|
|
23
|
+
// Use auto when start from ssr
|
|
24
|
+
flexBasis: hasSize ? size : 'auto',
|
|
25
|
+
flexGrow: hasSize ? 0 : 1
|
|
26
|
+
}),
|
|
27
|
+
children: children
|
|
28
|
+
});
|
|
29
|
+
});
|
|
30
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
31
|
+
InternalPanel.displayName = 'Panel';
|
|
32
|
+
}
|
|
33
|
+
var Panel = function Panel() {
|
|
34
|
+
return null;
|
|
35
|
+
};
|
|
36
|
+
export default Panel;
|
|
@@ -0,0 +1,124 @@
|
|
|
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
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
6
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
7
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
8
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
9
|
+
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; } }
|
|
10
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
11
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
12
|
+
import React, { useState } from 'react';
|
|
13
|
+
import DownOutlined from '@ant-design/icons/DownOutlined';
|
|
14
|
+
import LeftOutlined from '@ant-design/icons/LeftOutlined';
|
|
15
|
+
import RightOutlined from '@ant-design/icons/RightOutlined';
|
|
16
|
+
import UpOutlined from '@ant-design/icons/UpOutlined';
|
|
17
|
+
import classNames from 'classnames';
|
|
18
|
+
function getValidNumber(num) {
|
|
19
|
+
return typeof num === 'number' && !Number.isNaN(num) ? Math.round(num) : 0;
|
|
20
|
+
}
|
|
21
|
+
var SplitBar = function SplitBar(props) {
|
|
22
|
+
var prefixCls = props.prefixCls,
|
|
23
|
+
vertical = props.vertical,
|
|
24
|
+
index = props.index,
|
|
25
|
+
active = props.active,
|
|
26
|
+
ariaNow = props.ariaNow,
|
|
27
|
+
ariaMin = props.ariaMin,
|
|
28
|
+
ariaMax = props.ariaMax,
|
|
29
|
+
resizable = props.resizable,
|
|
30
|
+
startCollapsible = props.startCollapsible,
|
|
31
|
+
endCollapsible = props.endCollapsible,
|
|
32
|
+
onOffsetStart = props.onOffsetStart,
|
|
33
|
+
onOffsetUpdate = props.onOffsetUpdate,
|
|
34
|
+
onOffsetEnd = props.onOffsetEnd,
|
|
35
|
+
onCollapse = props.onCollapse;
|
|
36
|
+
var splitBarPrefixCls = "".concat(prefixCls, "-bar");
|
|
37
|
+
// ======================== Resize ========================
|
|
38
|
+
var _useState = useState(null),
|
|
39
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
40
|
+
startPos = _useState2[0],
|
|
41
|
+
setStartPos = _useState2[1];
|
|
42
|
+
var onMouseDown = function onMouseDown(e) {
|
|
43
|
+
if (resizable && e.currentTarget) {
|
|
44
|
+
setStartPos([e.pageX, e.pageY]);
|
|
45
|
+
onOffsetStart(index);
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
var onTouchStart = function onTouchStart(e) {
|
|
49
|
+
if (resizable && e.touches.length === 1) {
|
|
50
|
+
var touch = e.touches[0];
|
|
51
|
+
setStartPos([touch.pageX, touch.pageY]);
|
|
52
|
+
onOffsetStart(index);
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
React.useEffect(function () {
|
|
56
|
+
if (startPos) {
|
|
57
|
+
var onMouseMove = function onMouseMove(e) {
|
|
58
|
+
var pageX = e.pageX,
|
|
59
|
+
pageY = e.pageY;
|
|
60
|
+
var offsetX = pageX - startPos[0];
|
|
61
|
+
var offsetY = pageY - startPos[1];
|
|
62
|
+
onOffsetUpdate(index, offsetX, offsetY);
|
|
63
|
+
};
|
|
64
|
+
var onMouseUp = function onMouseUp() {
|
|
65
|
+
setStartPos(null);
|
|
66
|
+
onOffsetEnd();
|
|
67
|
+
};
|
|
68
|
+
var handleTouchMove = function handleTouchMove(e) {
|
|
69
|
+
if (e.touches.length === 1) {
|
|
70
|
+
var touch = e.touches[0];
|
|
71
|
+
var offsetX = touch.pageX - startPos[0];
|
|
72
|
+
var offsetY = touch.pageY - startPos[1];
|
|
73
|
+
onOffsetUpdate(index, offsetX, offsetY);
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
var handleTouchEnd = function handleTouchEnd() {
|
|
77
|
+
setStartPos(null);
|
|
78
|
+
onOffsetEnd();
|
|
79
|
+
};
|
|
80
|
+
window.addEventListener('touchmove', handleTouchMove);
|
|
81
|
+
window.addEventListener('touchend', handleTouchEnd);
|
|
82
|
+
window.addEventListener('mousemove', onMouseMove);
|
|
83
|
+
window.addEventListener('mouseup', onMouseUp);
|
|
84
|
+
return function () {
|
|
85
|
+
window.removeEventListener('mousemove', onMouseMove);
|
|
86
|
+
window.removeEventListener('mouseup', onMouseUp);
|
|
87
|
+
window.removeEventListener('touchmove', handleTouchMove);
|
|
88
|
+
window.removeEventListener('touchend', handleTouchEnd);
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
}, [startPos]);
|
|
92
|
+
// ======================== Render ========================
|
|
93
|
+
var StartIcon = vertical ? UpOutlined : LeftOutlined;
|
|
94
|
+
var EndIcon = vertical ? DownOutlined : RightOutlined;
|
|
95
|
+
return _jsxs("div", {
|
|
96
|
+
className: splitBarPrefixCls,
|
|
97
|
+
role: "separator",
|
|
98
|
+
"aria-valuenow": getValidNumber(ariaNow),
|
|
99
|
+
"aria-valuemin": getValidNumber(ariaMin),
|
|
100
|
+
"aria-valuemax": getValidNumber(ariaMax),
|
|
101
|
+
children: [_jsx("div", {
|
|
102
|
+
className: classNames("".concat(splitBarPrefixCls, "-dragger"), _defineProperty(_defineProperty({}, "".concat(splitBarPrefixCls, "-dragger-disabled"), !resizable), "".concat(splitBarPrefixCls, "-dragger-active"), active)),
|
|
103
|
+
onMouseDown: onMouseDown,
|
|
104
|
+
onTouchStart: onTouchStart
|
|
105
|
+
}), startCollapsible && _jsx("div", {
|
|
106
|
+
className: classNames("".concat(splitBarPrefixCls, "-collapse-bar"), "".concat(splitBarPrefixCls, "-collapse-bar-start")),
|
|
107
|
+
onClick: function onClick() {
|
|
108
|
+
return onCollapse(index, 'start');
|
|
109
|
+
},
|
|
110
|
+
children: _jsx(StartIcon, {
|
|
111
|
+
className: classNames("".concat(splitBarPrefixCls, "-collapse-icon"), "".concat(splitBarPrefixCls, "-collapse-start"))
|
|
112
|
+
})
|
|
113
|
+
}), endCollapsible && _jsx("div", {
|
|
114
|
+
className: classNames("".concat(splitBarPrefixCls, "-collapse-bar"), "".concat(splitBarPrefixCls, "-collapse-bar-end")),
|
|
115
|
+
onClick: function onClick() {
|
|
116
|
+
return onCollapse(index, 'end');
|
|
117
|
+
},
|
|
118
|
+
children: _jsx(EndIcon, {
|
|
119
|
+
className: classNames("".concat(splitBarPrefixCls, "-collapse-icon"), "".concat(splitBarPrefixCls, "-collapse-end"))
|
|
120
|
+
})
|
|
121
|
+
})]
|
|
122
|
+
});
|
|
123
|
+
};
|
|
124
|
+
export default SplitBar;
|