@chaoswise/ui 3.0.23 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/Antd5/_util/ActionButton.js +4 -2
- package/lib/Antd5/_util/ContextIsolator.js +27 -0
- package/lib/Antd5/_util/easings.js +2 -2
- package/lib/Antd5/_util/getScroll.js +9 -8
- package/lib/Antd5/_util/hooks/useClosable.js +3 -2
- package/lib/Antd5/_util/hooks/useUniqueMemo.js +123 -0
- package/lib/Antd5/_util/hooks/useZIndex.js +31 -15
- package/lib/Antd5/_util/motion.js +3 -2
- package/lib/Antd5/_util/placements.js +2 -2
- package/lib/Antd5/_util/scrollTo.js +1 -1
- package/lib/Antd5/_util/statusUtils.js +1 -1
- package/lib/Antd5/_util/toList.js +5 -0
- package/lib/Antd5/_util/warning.js +0 -1
- package/lib/Antd5/_util/wave/WaveEffect.js +2 -2
- package/lib/Antd5/_util/wave/interface.js +2 -1
- package/lib/Antd5/_util/wave/useWave.js +1 -1
- package/lib/Antd5/_util/wave/util.js +1 -9
- package/lib/Antd5/alert/Alert.js +1 -2
- package/lib/Antd5/alert/ErrorBoundary.js +1 -1
- package/lib/Antd5/alert/design/behavior-pattern.js +3 -3
- package/lib/Antd5/alert/style/index.js +6 -4
- package/lib/Antd5/anchor/Anchor.js +8 -7
- package/lib/Antd5/anchor/AnchorLink.js +4 -4
- package/lib/Antd5/app/index.js +2 -1
- package/lib/Antd5/app/style/index.js +5 -4
- package/lib/Antd5/auto-complete/index.js +1 -1
- package/lib/Antd5/avatar/group.js +35 -17
- package/lib/Antd5/avatar/style/index.js +18 -13
- package/lib/Antd5/back-top/index.js +3 -2
- package/lib/Antd5/badge/ScrollNumber.js +1 -1
- package/lib/Antd5/badge/SingleNumber.js +17 -16
- package/lib/Antd5/badge/style/index.js +6 -7
- package/lib/Antd5/badge/style/ribbon.js +3 -3
- package/lib/Antd5/breadcrumb/design/behavior-pattern.js +4 -4
- package/lib/Antd5/breadcrumb/style/index.js +2 -2
- package/lib/Antd5/button/LoadingIcon.js +5 -10
- package/lib/Antd5/button/button-group.js +0 -1
- package/lib/Antd5/button/button.js +70 -41
- package/lib/Antd5/button/buttonHelpers.js +7 -5
- package/lib/Antd5/button/style/{compactCmp.js → compact.js} +20 -27
- package/lib/Antd5/button/style/group.js +9 -7
- package/lib/Antd5/button/style/index.js +150 -110
- package/lib/Antd5/button/style/token.js +8 -1
- package/lib/Antd5/calendar/generateCalendar.js +25 -28
- package/lib/Antd5/calendar/style/index.js +4 -4
- package/lib/Antd5/card/Card.js +3 -3
- package/lib/Antd5/card/style/index.js +6 -9
- package/lib/Antd5/carousel/index.js +3 -3
- package/lib/Antd5/carousel/style/index.js +1 -1
- package/lib/Antd5/cascader/Panel.js +7 -2
- package/lib/Antd5/cascader/hooks/useBase.js +3 -2
- package/lib/Antd5/cascader/hooks/useColumnIcons.js +6 -3
- package/lib/Antd5/cascader/index.js +1 -1
- package/lib/Antd5/cascader/style/columns.js +6 -4
- package/lib/Antd5/checkbox/Checkbox.js +11 -5
- package/lib/Antd5/checkbox/style/index.js +6 -3
- package/lib/Antd5/collapse/Collapse.js +2 -1
- package/lib/Antd5/collapse/style/index.js +20 -13
- package/lib/Antd5/color-picker/ColorPicker.js +120 -78
- package/lib/Antd5/color-picker/ColorPickerPanel.js +44 -26
- package/lib/Antd5/color-picker/color.js +82 -10
- package/lib/Antd5/color-picker/components/ColorAlphaInput.js +2 -2
- package/lib/Antd5/color-picker/components/ColorClear.js +2 -2
- package/lib/Antd5/color-picker/components/ColorHexInput.js +5 -4
- package/lib/Antd5/color-picker/components/ColorInput.js +4 -3
- package/lib/Antd5/color-picker/components/ColorPresets.js +1 -1
- package/lib/Antd5/color-picker/components/ColorSlider.js +139 -0
- package/lib/Antd5/color-picker/components/ColorTrigger.js +52 -26
- package/lib/Antd5/color-picker/components/PanelPicker/GradientColorBar.js +130 -0
- package/lib/Antd5/color-picker/components/PanelPicker/index.js +194 -0
- package/lib/Antd5/color-picker/context.js +1 -5
- package/lib/Antd5/color-picker/hooks/useModeColor.js +87 -0
- package/lib/Antd5/color-picker/style/color-block.js +3 -2
- package/lib/Antd5/color-picker/style/index.js +33 -15
- package/lib/Antd5/color-picker/style/input.js +1 -1
- package/lib/Antd5/color-picker/style/picker.js +6 -33
- package/lib/Antd5/color-picker/style/slider.js +87 -0
- package/lib/Antd5/color-picker/util.js +53 -7
- package/lib/Antd5/config-provider/context.js +3 -1
- package/lib/Antd5/config-provider/cssVariables.js +0 -1
- package/lib/Antd5/config-provider/defaultRenderEmpty.js +8 -1
- package/lib/Antd5/config-provider/index.js +13 -5
- package/lib/Antd5/config-provider/style/index.js +0 -1
- package/lib/Antd5/date-picker/PickerButton.js +3 -2
- package/lib/Antd5/date-picker/design/behavior-pattern.js +15 -15
- package/lib/Antd5/date-picker/generatePicker/constant.js +15 -0
- package/lib/Antd5/date-picker/generatePicker/generateRangePicker.js +16 -11
- package/lib/Antd5/date-picker/generatePicker/generateSinglePicker.js +19 -15
- package/lib/Antd5/date-picker/generatePicker/index.js +2 -2
- package/lib/Antd5/date-picker/generatePicker/interface.js +1 -1
- package/lib/Antd5/date-picker/index.js +2 -17
- package/lib/Antd5/date-picker/locale/ar_EG.js +9 -1
- package/lib/Antd5/date-picker/locale/az_AZ.js +9 -1
- package/lib/Antd5/date-picker/locale/el_GR.js +9 -1
- package/lib/Antd5/date-picker/locale/ja_JP.js +11 -1
- package/lib/Antd5/date-picker/locale/kn_IN.js +9 -1
- package/lib/Antd5/date-picker/locale/pl_PL.js +9 -1
- package/lib/Antd5/date-picker/locale/uk_UA.js +10 -1
- package/lib/Antd5/date-picker/style/index.js +13 -10
- package/lib/Antd5/date-picker/style/panel.js +36 -32
- package/lib/Antd5/date-picker/style/token.js +1 -1
- package/lib/Antd5/date-picker/util.js +0 -48
- package/lib/Antd5/descriptions/hooks/useItems.js +5 -0
- package/lib/Antd5/descriptions/hooks/useRow.js +42 -34
- package/lib/Antd5/descriptions/style/index.js +20 -8
- package/lib/Antd5/divider/index.js +4 -3
- package/lib/Antd5/divider/style/index.js +19 -4
- package/lib/Antd5/drawer/DrawerPanel.js +11 -20
- package/lib/Antd5/drawer/index.js +39 -42
- package/lib/Antd5/drawer/style/index.js +10 -11
- package/lib/Antd5/dropdown/dropdown.js +5 -7
- package/lib/Antd5/dropdown/style/index.js +27 -11
- package/lib/Antd5/empty/empty.js +9 -3
- package/lib/Antd5/empty/simple.js +9 -3
- package/lib/Antd5/empty/style/index.js +1 -1
- package/lib/Antd5/float-button/BackTop.js +3 -2
- package/lib/Antd5/float-button/FloatButton.js +16 -5
- package/lib/Antd5/float-button/FloatButtonGroup.js +76 -52
- package/lib/Antd5/float-button/style/index.js +117 -76
- package/lib/Antd5/float-button/style/keyframes.js +118 -0
- package/lib/Antd5/form/ErrorList.js +14 -2
- package/lib/Antd5/form/Form.js +11 -3
- package/lib/Antd5/form/FormItem/ItemHolder.js +8 -4
- package/lib/Antd5/form/FormItem/index.js +6 -4
- package/lib/Antd5/form/FormItemInput.js +68 -28
- package/lib/Antd5/form/FormItemLabel.js +3 -3
- package/lib/Antd5/form/hooks/useForm.js +8 -1
- package/lib/Antd5/form/hooks/useVariants.js +10 -4
- package/lib/Antd5/form/style/explain.js +9 -8
- package/lib/Antd5/form/style/index.js +30 -18
- package/lib/Antd5/grid/row.js +2 -2
- package/lib/Antd5/image/index.js +3 -1
- package/lib/Antd5/image/style/index.js +17 -20
- package/lib/Antd5/index.js +2 -1
- package/lib/Antd5/input/Input.js +18 -38
- package/lib/Antd5/input/OTP/OTPInput.js +10 -5
- package/lib/Antd5/input/OTP/index.js +12 -4
- package/lib/Antd5/input/Password.js +6 -2
- package/lib/Antd5/input/Search.js +2 -4
- package/lib/Antd5/input/TextArea.js +1 -1
- package/lib/Antd5/input/style/index.js +72 -63
- package/lib/Antd5/input/style/otp.js +1 -1
- package/lib/Antd5/input/style/variants.js +38 -23
- package/lib/Antd5/input/utils.js +0 -1
- package/lib/Antd5/input-number/index.js +19 -22
- package/lib/Antd5/input-number/style/index.js +26 -16
- package/lib/Antd5/layout/Sider.js +15 -8
- package/lib/Antd5/layout/style/index.js +6 -96
- package/lib/Antd5/layout/style/sider.js +115 -0
- package/lib/Antd5/list/Item.js +18 -5
- package/lib/Antd5/list/index.js +15 -10
- package/lib/Antd5/list/style/index.js +40 -41
- package/lib/Antd5/locale/ar_EG.js +14 -1
- package/lib/Antd5/locale/az_AZ.js +78 -28
- package/lib/Antd5/locale/bn_BD.js +0 -1
- package/lib/Antd5/locale/by_BY.js +0 -1
- package/lib/Antd5/locale/ca_ES.js +0 -1
- package/lib/Antd5/locale/cs_CZ.js +0 -1
- package/lib/Antd5/locale/de_DE.js +0 -1
- package/lib/Antd5/locale/el_GR.js +104 -3
- package/lib/Antd5/locale/en_GB.js +0 -1
- package/lib/Antd5/locale/en_US.js +4 -2
- package/lib/Antd5/locale/es_ES.js +10 -6
- package/lib/Antd5/locale/et_EE.js +0 -1
- package/lib/Antd5/locale/eu_ES.js +4 -2
- package/lib/Antd5/locale/fa_IR.js +0 -1
- package/lib/Antd5/locale/fr_BE.js +5 -1
- package/lib/Antd5/locale/fr_CA.js +0 -1
- package/lib/Antd5/locale/fr_FR.js +5 -6
- package/lib/Antd5/locale/ga_IE.js +0 -1
- package/lib/Antd5/locale/gl_ES.js +0 -1
- package/lib/Antd5/locale/he_IL.js +0 -1
- package/lib/Antd5/locale/hi_IN.js +0 -1
- package/lib/Antd5/locale/hr_HR.js +0 -1
- package/lib/Antd5/locale/id_ID.js +4 -2
- package/lib/Antd5/locale/index.js +1 -1
- package/lib/Antd5/locale/it_IT.js +0 -1
- package/lib/Antd5/locale/ja_JP.js +4 -2
- package/lib/Antd5/locale/ka_GE.js +0 -1
- package/lib/Antd5/locale/kk_KZ.js +0 -1
- package/lib/Antd5/locale/km_KH.js +0 -1
- package/lib/Antd5/locale/kn_IN.js +82 -4
- package/lib/Antd5/locale/ko_KR.js +4 -2
- package/lib/Antd5/locale/lt_LT.js +4 -2
- package/lib/Antd5/locale/ml_IN.js +0 -1
- package/lib/Antd5/locale/mn_MN.js +86 -2
- package/lib/Antd5/locale/ms_MY.js +101 -18
- package/lib/Antd5/locale/my_MM.js +0 -1
- package/lib/Antd5/locale/nb_NO.js +0 -1
- package/lib/Antd5/locale/ne_NP.js +104 -2
- package/lib/Antd5/locale/nl_BE.js +5 -1
- package/lib/Antd5/locale/nl_NL.js +5 -1
- package/lib/Antd5/locale/pl_PL.js +0 -1
- package/lib/Antd5/locale/pt_BR.js +0 -1
- package/lib/Antd5/locale/pt_PT.js +55 -38
- package/lib/Antd5/locale/ro_RO.js +0 -1
- package/lib/Antd5/locale/ru_RU.js +9 -2
- package/lib/Antd5/locale/si_LK.js +0 -1
- package/lib/Antd5/locale/sk_SK.js +0 -1
- package/lib/Antd5/locale/sr_RS.js +0 -1
- package/lib/Antd5/locale/sv_SE.js +0 -1
- package/lib/Antd5/locale/th_TH.js +11 -3
- package/lib/Antd5/locale/tk_TK.js +0 -1
- package/lib/Antd5/locale/tr_TR.js +2 -1
- package/lib/Antd5/locale/uk_UA.js +1 -1
- package/lib/Antd5/locale/ur_PK.js +0 -1
- package/lib/Antd5/locale/uz_UZ.js +6 -7
- package/lib/Antd5/locale/zh_CN.js +4 -2
- package/lib/Antd5/locale/zh_HK.js +0 -1
- package/lib/Antd5/locale/zh_TW.js +0 -1
- package/lib/Antd5/mentions/index.js +4 -4
- package/lib/Antd5/menu/MenuItem.js +6 -5
- package/lib/Antd5/menu/OverrideContext.js +4 -3
- package/lib/Antd5/menu/SubMenu.js +2 -2
- package/lib/Antd5/menu/menu.js +2 -2
- package/lib/Antd5/menu/style/index.js +58 -40
- package/lib/Antd5/menu/style/theme.js +24 -20
- package/lib/Antd5/menu/style/vertical.js +10 -7
- package/lib/Antd5/message/PurePanel.js +22 -40
- package/lib/Antd5/message/style/index.js +8 -47
- package/lib/Antd5/message/useMessage.js +3 -15
- package/lib/Antd5/modal/Modal.js +50 -38
- package/lib/Antd5/modal/PurePanel.js +0 -1
- package/lib/Antd5/modal/confirm.js +4 -5
- package/lib/Antd5/modal/style/confirm.js +1 -2
- package/lib/Antd5/modal/style/index.js +13 -3
- package/lib/Antd5/modal/useModal/HookModal.js +4 -3
- package/lib/Antd5/modal/useModal/index.js +0 -1
- package/lib/Antd5/notification/index.js +6 -3
- package/lib/Antd5/notification/style/index.js +35 -3
- package/lib/Antd5/notification/useNotification.js +6 -1
- package/lib/Antd5/pagination/Pagination.js +10 -5
- package/lib/Antd5/pagination/design/behavior-pattern.js +3 -3
- package/lib/Antd5/pagination/style/bordered.js +1 -1
- package/lib/Antd5/pagination/style/index.js +27 -18
- package/lib/Antd5/popconfirm/PurePanel.js +7 -7
- package/lib/Antd5/popover/PurePanel.js +16 -6
- package/lib/Antd5/popover/index.js +7 -19
- package/lib/Antd5/popover/style/index.js +3 -1
- package/lib/Antd5/progress/Line.js +27 -19
- package/lib/Antd5/progress/design/behavior-pattern.js +3 -3
- package/lib/Antd5/progress/progress.js +37 -11
- package/lib/Antd5/progress/style/index.js +46 -11
- package/lib/Antd5/progress/utils.js +20 -18
- package/lib/Antd5/qr-code/QrcodeStatus.js +42 -0
- package/lib/Antd5/qr-code/index.js +31 -31
- package/lib/Antd5/rate/index.js +8 -2
- package/lib/Antd5/result/noFound.js +3 -1
- package/lib/Antd5/result/serverError.js +3 -1
- package/lib/Antd5/result/unauthorized.js +5 -3
- package/lib/Antd5/segmented/index.js +5 -3
- package/lib/Antd5/segmented/style/index.js +11 -3
- package/lib/Antd5/select/index.js +4 -2
- package/lib/Antd5/select/style/dropdown.js +1 -1
- package/lib/Antd5/select/style/index.js +21 -8
- package/lib/Antd5/select/style/multiple.js +18 -9
- package/lib/Antd5/select/style/single.js +8 -10
- package/lib/Antd5/select/style/token.js +9 -2
- package/lib/Antd5/select/style/variants.js +20 -11
- package/lib/Antd5/skeleton/Image.js +6 -4
- package/lib/Antd5/skeleton/Node.js +1 -3
- package/lib/Antd5/skeleton/Paragraph.js +1 -1
- package/lib/Antd5/skeleton/Title.js +9 -6
- package/lib/Antd5/skeleton/style/index.js +13 -13
- package/lib/Antd5/slider/Context.js +4 -0
- package/lib/Antd5/slider/SliderTooltip.js +9 -5
- package/lib/Antd5/slider/index.js +32 -31
- package/lib/Antd5/slider/style/index.js +60 -44
- package/lib/Antd5/space/Compact.js +1 -1
- package/lib/Antd5/space/index.js +3 -3
- package/lib/Antd5/spin/Indicator/Looper.js +29 -0
- package/lib/Antd5/spin/Indicator/Progress.js +78 -0
- package/lib/Antd5/spin/Indicator/index.js +21 -0
- package/lib/Antd5/spin/index.js +27 -45
- package/lib/Antd5/spin/style/index.js +54 -17
- package/lib/Antd5/spin/usePercent.js +40 -0
- package/lib/Antd5/splitter/Panel.js +36 -0
- package/lib/Antd5/splitter/SplitBar.js +124 -0
- package/lib/Antd5/splitter/Splitter.js +194 -0
- package/lib/Antd5/{_util/transButton.js → splitter/hooks/useItems.js} +28 -54
- package/lib/Antd5/splitter/hooks/useResizable.js +43 -0
- package/lib/Antd5/splitter/hooks/useResize.js +138 -0
- package/lib/Antd5/splitter/hooks/useSizes.js +109 -0
- package/lib/Antd5/splitter/index.js +5 -0
- package/lib/Antd5/splitter/interface.js +1 -0
- package/lib/Antd5/splitter/style/index.js +219 -0
- package/lib/Antd5/statistic/style/index.js +1 -1
- package/lib/Antd5/steps/style/custom-icon.js +1 -1
- package/lib/Antd5/steps/style/index.js +11 -8
- package/lib/Antd5/steps/style/inline.js +5 -4
- package/lib/Antd5/steps/style/progress-dot.js +2 -2
- package/lib/Antd5/steps/style/small.js +3 -3
- package/lib/Antd5/steps/style/vertical.js +2 -2
- package/lib/Antd5/style/index.js +37 -13
- package/lib/Antd5/style/motion/slide.js +6 -5
- package/lib/Antd5/style/placementArrow.js +15 -6
- package/lib/Antd5/switch/style/index.js +1 -1
- package/lib/Antd5/table/Column.js +2 -3
- package/lib/Antd5/table/ColumnGroup.js +2 -3
- package/lib/Antd5/table/ExpandIcon.js +6 -6
- package/lib/Antd5/table/InternalTable.js +6 -6
- package/lib/Antd5/table/RcTable/VirtualTable.js +3 -2
- package/lib/Antd5/table/RcTable/index.js +3 -2
- package/lib/Antd5/table/hooks/useFilter/FilterDropdown.js +82 -61
- package/lib/Antd5/table/hooks/useFilter/FilterSearch.js +7 -7
- package/lib/Antd5/table/hooks/useFilter/index.js +28 -26
- package/lib/Antd5/table/hooks/useLazyKVMap.js +5 -5
- package/lib/Antd5/table/hooks/useSelection.js +21 -11
- package/lib/Antd5/table/hooks/useSorter.js +66 -42
- package/lib/Antd5/table/hooks/useTitleColumns.js +9 -7
- package/lib/Antd5/table/interface.js +1 -1
- package/lib/Antd5/table/style/bordered.js +5 -3
- package/lib/Antd5/table/style/expand.js +44 -38
- package/lib/Antd5/table/style/filter.js +1 -1
- package/lib/Antd5/table/style/index.js +26 -21
- package/lib/Antd5/table/style/selection.js +3 -1
- package/lib/Antd5/table/style/sorter.js +3 -1
- package/lib/Antd5/table/style/virtual.js +2 -2
- package/lib/Antd5/table/util.js +9 -8
- package/lib/Antd5/tabs/style/index.js +2 -2
- package/lib/Antd5/tag/style/index.js +2 -2
- package/lib/Antd5/theme/index.js +12 -5
- package/lib/Antd5/theme/interface/cssinjs-utils.js +1 -0
- package/lib/Antd5/theme/internal.js +10 -5
- package/lib/Antd5/theme/themes/dark/colors.js +3 -0
- package/lib/Antd5/theme/themes/dark/index.js +1 -0
- package/lib/Antd5/theme/themes/default/colors.js +3 -0
- package/lib/Antd5/theme/themes/default/index.js +6 -2
- package/lib/Antd5/theme/themes/seed.js +5 -2
- package/lib/Antd5/theme/themes/shared/genColorMapToken.js +2 -0
- package/lib/Antd5/theme/themes/shared/genFontSizes.js +1 -1
- package/lib/Antd5/theme/useToken.js +2 -1
- package/lib/Antd5/theme/util/alias.js +1 -1
- package/lib/Antd5/theme/util/genStyleUtils.js +61 -0
- package/lib/Antd5/time-picker/index.js +15 -2
- package/lib/Antd5/time-picker/locale/az_AZ.js +2 -1
- package/lib/Antd5/time-picker/locale/it_IT.js +2 -1
- package/lib/Antd5/time-picker/locale/uk_UA.js +2 -1
- package/lib/Antd5/timeline/TimelineItemList.js +0 -1
- package/lib/Antd5/timeline/style/index.js +1 -1
- package/lib/Antd5/tooltip/index.js +3 -2
- package/lib/Antd5/tooltip/style/index.js +3 -1
- package/lib/Antd5/tooltip/util.js +0 -1
- package/lib/Antd5/tour/panelRender.js +7 -13
- package/lib/Antd5/tour/style/index.js +6 -13
- package/lib/Antd5/transfer/ListItem.js +3 -3
- package/lib/Antd5/transfer/hooks/useData.js +1 -1
- package/lib/Antd5/transfer/hooks/useSelection.js +26 -21
- package/lib/Antd5/transfer/style/index.js +12 -22
- package/lib/Antd5/tree/Tree.js +2 -0
- package/lib/Antd5/tree/style/directory.js +39 -0
- package/lib/Antd5/tree/style/index.js +115 -166
- package/lib/Antd5/tree/utils/dropIndicator.js +3 -2
- package/lib/Antd5/tree/utils/iconUtil.js +5 -1
- package/lib/Antd5/tree-select/index.js +47 -43
- package/lib/Antd5/typography/Base/CopyBtn.js +17 -17
- package/lib/Antd5/typography/Base/Ellipsis.js +48 -40
- package/lib/Antd5/typography/Base/index.js +20 -60
- package/lib/Antd5/typography/Base/util.js +31 -1
- package/lib/Antd5/typography/Editable.js +11 -10
- package/lib/Antd5/typography/Title.js +1 -6
- package/lib/Antd5/typography/Typography.js +2 -6
- package/lib/Antd5/typography/hooks/useCopyClick.js +3 -2
- package/lib/Antd5/typography/hooks/usePrevious.js +1 -1
- package/lib/Antd5/{message/assets/Close.js → typography/hooks/useTooltipProps.js} +24 -16
- package/lib/Antd5/typography/style/mixins.js +3 -9
- package/lib/Antd5/upload/Upload.js +55 -83
- package/lib/Antd5/upload/UploadList/ListItem.js +15 -9
- package/lib/Antd5/upload/UploadList/index.js +33 -47
- package/lib/Antd5/upload/style/dragger.js +5 -26
- package/lib/Antd5/upload/style/list.js +2 -7
- package/lib/Antd5/version/version.js +1 -1
- package/lib/Antd5/watermark/context.js +1 -1
- package/lib/Antd5/watermark/index.js +35 -18
- package/lib/Antd5/watermark/useClips.js +2 -1
- package/lib/Antd5/watermark/useRafDebounce.js +1 -1
- package/lib/Antd5/watermark/utils.js +1 -1
- package/lib/CWSelect/index.js +39 -1
- package/lib/CWSelect/index.style.js +39 -0
- package/lib/CWTree/index.js +3 -9
- package/lib/CWTree/index.style.js +2 -0
- package/lib/ConfigProvider/ConfigProvider.js +9 -10
- package/lib/ConfigProvider/customTheme.js +6 -0
- package/lib/ConfigProvider/theme/common.js +140 -0
- package/lib/ConfigProvider/theme/dark.js +2 -0
- package/lib/ConfigProvider/theme/default.js +115 -0
- package/lib/ConfigProvider/theme/utils.js +49 -0
- package/lib/QuickTransfer/index.js +45 -59
- package/lib/Splitter/index.js +2 -0
- package/package.json +37 -35
- package/lib/Antd5/color-picker/components/PanelPicker.js +0 -53
- package/lib/Antd5/color-picker/hooks/useColorState.js +0 -53
- package/lib/Antd5/layout/style/light.js +0 -24
- package/lib/Antd5/style/operationUnit.js +0 -18
- package/lib/Antd5/theme/util/calc/CSSCalculator.js +0 -119
- package/lib/Antd5/theme/util/calc/NumCalculator.js +0 -81
- package/lib/Antd5/theme/util/calc/calculator.js +0 -10
- package/lib/Antd5/theme/util/calc/index.js +0 -9
- package/lib/Antd5/theme/util/genComponentStyleHook.js +0 -243
- package/lib/Antd5/theme/util/maxmin.js +0 -27
- package/lib/Antd5/theme/util/statistic.js +0 -74
- package/lib/Antd5/typography/hooks/useUpdatedEffect.js +0 -13
- package/lib/Antd5/version/token-meta.json +0 -1
- package/lib/Antd5/version/token.json +0 -1
- package/lib/ConfigProvider/customTheme.json +0 -163
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var _excluded = ["loading", "prefixCls", "type", "danger", "shape", "size", "styles", "disabled", "className", "rootClassName", "children", "icon", "iconPosition", "ghost", "block", "htmlType", "classNames", "style", "autoInsertSpace"];
|
|
1
|
+
var _excluded = ["loading", "prefixCls", "color", "variant", "type", "danger", "shape", "size", "styles", "disabled", "className", "rootClassName", "children", "icon", "iconPosition", "ghost", "block", "htmlType", "classNames", "style", "autoInsertSpace", "autoFocus"];
|
|
2
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
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
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; }
|
|
@@ -13,12 +13,11 @@ function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
|
13
13
|
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; }
|
|
14
14
|
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; }
|
|
15
15
|
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); }
|
|
16
|
-
import { jsx as _jsx,
|
|
17
|
-
|
|
18
|
-
import React, { Children, createRef, useContext, useEffect, useMemo, useState } from 'react';
|
|
16
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
17
|
+
import React, { Children, useContext, useEffect, useMemo, useRef, useState } from 'react';
|
|
19
18
|
import classNames from 'classnames';
|
|
20
19
|
import omit from 'rc-util/lib/omit';
|
|
21
|
-
import {
|
|
20
|
+
import { useComposeRef } from 'rc-util/lib/ref';
|
|
22
21
|
import { devUseWarning } from '../_util/warning';
|
|
23
22
|
import Wave from '../_util/wave';
|
|
24
23
|
import { ConfigContext } from '../config-provider';
|
|
@@ -26,11 +25,11 @@ import DisabledContext from '../config-provider/DisabledContext';
|
|
|
26
25
|
import useSize from '../config-provider/hooks/useSize';
|
|
27
26
|
import { useCompactItemContext } from '../space/Compact';
|
|
28
27
|
import Group, { GroupSizeContext } from './button-group';
|
|
29
|
-
import { isTwoCNChar,
|
|
28
|
+
import { isTwoCNChar, isUnBorderedButtonVariant, spaceChildren } from './buttonHelpers';
|
|
30
29
|
import IconWrapper from './IconWrapper';
|
|
31
30
|
import LoadingIcon from './LoadingIcon';
|
|
32
31
|
import useStyle from './style';
|
|
33
|
-
import
|
|
32
|
+
import Compact from './style/compact';
|
|
34
33
|
function getLoadingConfig(loading) {
|
|
35
34
|
if (_typeof(loading) === 'object' && loading) {
|
|
36
35
|
var delay = loading === null || loading === void 0 ? void 0 : loading.delay;
|
|
@@ -45,13 +44,23 @@ function getLoadingConfig(loading) {
|
|
|
45
44
|
delay: 0
|
|
46
45
|
};
|
|
47
46
|
}
|
|
47
|
+
var ButtonTypeMap = {
|
|
48
|
+
"default": ['default', 'outlined'],
|
|
49
|
+
primary: ['primary', 'solid'],
|
|
50
|
+
dashed: ['default', 'dashed'],
|
|
51
|
+
link: ['primary', 'link'],
|
|
52
|
+
text: ['default', 'text']
|
|
53
|
+
};
|
|
48
54
|
var InternalCompoundedButton = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
49
|
-
var _ref, _button$classNames, _button$styles;
|
|
55
|
+
var _ref, _sizeClassNameMap$siz, _classNames, _button$classNames, _button$styles;
|
|
50
56
|
var _props$loading = props.loading,
|
|
51
57
|
loading = _props$loading === void 0 ? false : _props$loading,
|
|
52
58
|
customizePrefixCls = props.prefixCls,
|
|
59
|
+
color = props.color,
|
|
60
|
+
variant = props.variant,
|
|
53
61
|
type = props.type,
|
|
54
|
-
danger = props.danger,
|
|
62
|
+
_props$danger = props.danger,
|
|
63
|
+
danger = _props$danger === void 0 ? false : _props$danger,
|
|
55
64
|
_props$shape = props.shape,
|
|
56
65
|
shape = _props$shape === void 0 ? 'default' : _props$shape,
|
|
57
66
|
customizeSize = props.size,
|
|
@@ -73,10 +82,26 @@ var InternalCompoundedButton = /*#__PURE__*/React.forwardRef(function (props, re
|
|
|
73
82
|
_props$style = props.style,
|
|
74
83
|
customStyle = _props$style === void 0 ? {} : _props$style,
|
|
75
84
|
autoInsertSpace = props.autoInsertSpace,
|
|
85
|
+
autoFocus = props.autoFocus,
|
|
76
86
|
rest = _objectWithoutProperties(props, _excluded);
|
|
77
87
|
// https://github.com/ant-design/ant-design/issues/47605
|
|
78
88
|
// Compatible with original `type` behavior
|
|
79
89
|
var mergedType = type || 'default';
|
|
90
|
+
var _useMemo = useMemo(function () {
|
|
91
|
+
if (color && variant) {
|
|
92
|
+
return [color, variant];
|
|
93
|
+
}
|
|
94
|
+
var colorVariantPair = ButtonTypeMap[mergedType] || [];
|
|
95
|
+
if (danger) {
|
|
96
|
+
return ['danger', colorVariantPair[1]];
|
|
97
|
+
}
|
|
98
|
+
return colorVariantPair;
|
|
99
|
+
}, [type, color, variant, danger]),
|
|
100
|
+
_useMemo2 = _slicedToArray(_useMemo, 2),
|
|
101
|
+
mergedColor = _useMemo2[0],
|
|
102
|
+
mergedVariant = _useMemo2[1];
|
|
103
|
+
var isDanger = mergedColor === 'danger';
|
|
104
|
+
var mergedColorText = isDanger ? 'dangerous' : mergedColor;
|
|
80
105
|
var _useContext = useContext(ConfigContext),
|
|
81
106
|
getPrefixCls = _useContext.getPrefixCls,
|
|
82
107
|
direction = _useContext.direction,
|
|
@@ -102,9 +127,11 @@ var InternalCompoundedButton = /*#__PURE__*/React.forwardRef(function (props, re
|
|
|
102
127
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
103
128
|
hasTwoCNChar = _useState4[0],
|
|
104
129
|
setHasTwoCNChar = _useState4[1];
|
|
105
|
-
var
|
|
106
|
-
var
|
|
107
|
-
var needInserted = Children.count(children) === 1 && !icon && !
|
|
130
|
+
var buttonRef = useRef();
|
|
131
|
+
var mergedRef = useComposeRef(ref, buttonRef);
|
|
132
|
+
var needInserted = Children.count(children) === 1 && !icon && !isUnBorderedButtonVariant(mergedVariant);
|
|
133
|
+
// ========================= Effect =========================
|
|
134
|
+
// Loading
|
|
108
135
|
useEffect(function () {
|
|
109
136
|
var delayTimer = null;
|
|
110
137
|
if (loadingOrDelay.delay > 0) {
|
|
@@ -123,12 +150,13 @@ var InternalCompoundedButton = /*#__PURE__*/React.forwardRef(function (props, re
|
|
|
123
150
|
}
|
|
124
151
|
return cleanupTimer;
|
|
125
152
|
}, [loadingOrDelay]);
|
|
153
|
+
// Two chinese characters check
|
|
126
154
|
useEffect(function () {
|
|
127
155
|
// FIXME: for HOC usage like <FormatMessage />
|
|
128
|
-
if (!buttonRef
|
|
156
|
+
if (!buttonRef.current || !mergedInsertSpace) {
|
|
129
157
|
return;
|
|
130
158
|
}
|
|
131
|
-
var buttonText = buttonRef.current.textContent;
|
|
159
|
+
var buttonText = buttonRef.current.textContent || '';
|
|
132
160
|
if (needInserted && isTwoCNChar(buttonText)) {
|
|
133
161
|
if (!hasTwoCNChar) {
|
|
134
162
|
setHasTwoCNChar(true);
|
|
@@ -136,21 +164,30 @@ var InternalCompoundedButton = /*#__PURE__*/React.forwardRef(function (props, re
|
|
|
136
164
|
} else if (hasTwoCNChar) {
|
|
137
165
|
setHasTwoCNChar(false);
|
|
138
166
|
}
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
|
|
167
|
+
});
|
|
168
|
+
// Auto focus
|
|
169
|
+
useEffect(function () {
|
|
170
|
+
if (autoFocus && buttonRef.current) {
|
|
171
|
+
buttonRef.current.focus();
|
|
172
|
+
}
|
|
173
|
+
}, []);
|
|
174
|
+
// ========================= Events =========================
|
|
175
|
+
var handleClick = React.useCallback(function (e) {
|
|
176
|
+
var _props$onClick;
|
|
142
177
|
// FIXME: https://github.com/ant-design/ant-design/issues/30207
|
|
143
178
|
if (innerLoading || mergedDisabled) {
|
|
144
179
|
e.preventDefault();
|
|
145
180
|
return;
|
|
146
181
|
}
|
|
147
|
-
onClick === null || onClick === void 0 || onClick(e);
|
|
148
|
-
};
|
|
182
|
+
(_props$onClick = props.onClick) === null || _props$onClick === void 0 || _props$onClick.call(props, e);
|
|
183
|
+
}, [props.onClick, innerLoading, mergedDisabled]);
|
|
184
|
+
// ========================== Warn ==========================
|
|
149
185
|
if (process.env.NODE_ENV !== 'production') {
|
|
150
186
|
var warning = devUseWarning('Button');
|
|
151
187
|
warning(!(typeof icon === 'string' && icon.length > 2), 'breaking', "`icon` is using ReactNode instead of string naming in v4. Please check `".concat(icon, "` at https://ant.design/components/icon"));
|
|
152
|
-
warning(!(ghost &&
|
|
188
|
+
warning(!(ghost && isUnBorderedButtonVariant(mergedVariant)), 'usage', "`link` or `text` button can't be a `ghost` button.");
|
|
153
189
|
}
|
|
190
|
+
// ========================== Size ==========================
|
|
154
191
|
var _useCompactItemContex = useCompactItemContext(prefixCls, direction),
|
|
155
192
|
compactSize = _useCompactItemContex.compactSize,
|
|
156
193
|
compactItemClassnames = _useCompactItemContex.compactItemClassnames;
|
|
@@ -163,13 +200,13 @@ var InternalCompoundedButton = /*#__PURE__*/React.forwardRef(function (props, re
|
|
|
163
200
|
var _ref2, _ref3;
|
|
164
201
|
return (_ref2 = (_ref3 = customizeSize !== null && customizeSize !== void 0 ? customizeSize : compactSize) !== null && _ref3 !== void 0 ? _ref3 : groupSize) !== null && _ref2 !== void 0 ? _ref2 : ctxSize;
|
|
165
202
|
});
|
|
166
|
-
var sizeCls = sizeFullName ? sizeClassNameMap[sizeFullName]
|
|
203
|
+
var sizeCls = sizeFullName ? (_sizeClassNameMap$siz = sizeClassNameMap[sizeFullName]) !== null && _sizeClassNameMap$siz !== void 0 ? _sizeClassNameMap$siz : '' : '';
|
|
167
204
|
var iconType = innerLoading ? 'loading' : icon;
|
|
168
205
|
var linkButtonRestProps = omit(rest, ['navigate']);
|
|
169
|
-
|
|
206
|
+
// ========================= Render =========================
|
|
207
|
+
var classes = classNames(prefixCls, hashId, cssVarCls, (_classNames = {}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_classNames, "".concat(prefixCls, "-").concat(shape), shape !== 'default' && shape), "".concat(prefixCls, "-").concat(mergedType), mergedType), "".concat(prefixCls, "-dangerous"), danger), "".concat(prefixCls, "-color-").concat(mergedColorText), mergedColorText), "".concat(prefixCls, "-variant-").concat(mergedVariant), mergedVariant), "".concat(prefixCls, "-").concat(sizeCls), sizeCls), "".concat(prefixCls, "-icon-only"), !children && children !== 0 && !!iconType), "".concat(prefixCls, "-background-ghost"), ghost && !isUnBorderedButtonVariant(mergedVariant)), "".concat(prefixCls, "-loading"), innerLoading), "".concat(prefixCls, "-two-chinese-chars"), hasTwoCNChar && mergedInsertSpace && !innerLoading), _defineProperty(_defineProperty(_defineProperty(_classNames, "".concat(prefixCls, "-block"), block), "".concat(prefixCls, "-rtl"), direction === 'rtl'), "".concat(prefixCls, "-icon-end"), iconPosition === 'end')), compactItemClassnames, className, rootClassName, button === null || button === void 0 ? void 0 : button.className);
|
|
170
208
|
var fullStyle = _objectSpread(_objectSpread({}, button === null || button === void 0 ? void 0 : button.style), customStyle);
|
|
171
|
-
var
|
|
172
|
-
var iconClasses = classNames(customClassNames === null || customClassNames === void 0 ? void 0 : customClassNames.icon, button === null || button === void 0 || (_button$classNames = button.classNames) === null || _button$classNames === void 0 ? void 0 : _button$classNames.icon, _defineProperty({}, "".concat(prefixCls, "-icon-end"), isIconPositionEnd));
|
|
209
|
+
var iconClasses = classNames(customClassNames === null || customClassNames === void 0 ? void 0 : customClassNames.icon, button === null || button === void 0 || (_button$classNames = button.classNames) === null || _button$classNames === void 0 ? void 0 : _button$classNames.icon);
|
|
173
210
|
var iconStyle = _objectSpread(_objectSpread({}, (styles === null || styles === void 0 ? void 0 : styles.icon) || {}), (button === null || button === void 0 || (_button$styles = button.styles) === null || _button$styles === void 0 ? void 0 : _button$styles.icon) || {});
|
|
174
211
|
var iconNode = icon && !innerLoading ? _jsx(IconWrapper, {
|
|
175
212
|
prefixCls: prefixCls,
|
|
@@ -179,26 +216,18 @@ var InternalCompoundedButton = /*#__PURE__*/React.forwardRef(function (props, re
|
|
|
179
216
|
}) : _jsx(LoadingIcon, {
|
|
180
217
|
existIcon: !!icon,
|
|
181
218
|
prefixCls: prefixCls,
|
|
182
|
-
loading:
|
|
183
|
-
iconPosition: iconPosition
|
|
219
|
+
loading: innerLoading
|
|
184
220
|
});
|
|
185
221
|
var kids = children || children === 0 ? spaceChildren(children, needInserted && mergedInsertSpace) : null;
|
|
186
|
-
var genButtonContent = function genButtonContent(iconComponent, kidsComponent) {
|
|
187
|
-
return iconPosition === 'start' ? _jsxs(_Fragment, {
|
|
188
|
-
children: [iconComponent, kidsComponent]
|
|
189
|
-
}) : _jsxs(_Fragment, {
|
|
190
|
-
children: [kidsComponent, iconComponent]
|
|
191
|
-
});
|
|
192
|
-
};
|
|
193
222
|
if (linkButtonRestProps.href !== undefined) {
|
|
194
|
-
return wrapCSSVar(
|
|
223
|
+
return wrapCSSVar(_jsxs("a", _objectSpread(_objectSpread({}, linkButtonRestProps), {}, {
|
|
195
224
|
className: classNames(classes, _defineProperty({}, "".concat(prefixCls, "-disabled"), mergedDisabled)),
|
|
196
225
|
href: mergedDisabled ? undefined : linkButtonRestProps.href,
|
|
197
226
|
style: fullStyle,
|
|
198
227
|
onClick: handleClick,
|
|
199
|
-
ref:
|
|
228
|
+
ref: mergedRef,
|
|
200
229
|
tabIndex: mergedDisabled ? -1 : 0,
|
|
201
|
-
children:
|
|
230
|
+
children: [iconNode, kids]
|
|
202
231
|
})));
|
|
203
232
|
}
|
|
204
233
|
var buttonNode = _jsxs("button", _objectSpread(_objectSpread({}, rest), {}, {
|
|
@@ -207,15 +236,15 @@ var InternalCompoundedButton = /*#__PURE__*/React.forwardRef(function (props, re
|
|
|
207
236
|
style: fullStyle,
|
|
208
237
|
onClick: handleClick,
|
|
209
238
|
disabled: mergedDisabled,
|
|
210
|
-
ref:
|
|
211
|
-
children: [
|
|
239
|
+
ref: mergedRef,
|
|
240
|
+
children: [iconNode, kids, compactItemClassnames && _jsx(Compact, {
|
|
212
241
|
prefixCls: prefixCls
|
|
213
|
-
}
|
|
242
|
+
})]
|
|
214
243
|
}));
|
|
215
|
-
if (!
|
|
244
|
+
if (!isUnBorderedButtonVariant(mergedVariant)) {
|
|
216
245
|
buttonNode = _jsx(Wave, {
|
|
217
246
|
component: "Button",
|
|
218
|
-
disabled:
|
|
247
|
+
disabled: innerLoading,
|
|
219
248
|
children: buttonNode
|
|
220
249
|
});
|
|
221
250
|
}
|
|
@@ -2,7 +2,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { cloneElement, isFragment } from '../_util/reactNode';
|
|
5
|
-
var rxTwoCNChar = /^[\
|
|
5
|
+
var rxTwoCNChar = /^[\u4E00-\u9FA5]{2}$/;
|
|
6
6
|
export var isTwoCNChar = rxTwoCNChar.test.bind(rxTwoCNChar);
|
|
7
7
|
export function convertLegacyProps(type) {
|
|
8
8
|
if (type === 'danger') {
|
|
@@ -17,7 +17,7 @@ export function convertLegacyProps(type) {
|
|
|
17
17
|
export function isString(str) {
|
|
18
18
|
return typeof str === 'string';
|
|
19
19
|
}
|
|
20
|
-
export function
|
|
20
|
+
export function isUnBorderedButtonVariant(type) {
|
|
21
21
|
return type === 'text' || type === 'link';
|
|
22
22
|
}
|
|
23
23
|
function splitCNCharsBySpace(child, needInserted) {
|
|
@@ -63,6 +63,8 @@ export function spaceChildren(children, needInserted) {
|
|
|
63
63
|
return splitCNCharsBySpace(child, needInserted);
|
|
64
64
|
});
|
|
65
65
|
}
|
|
66
|
-
var
|
|
67
|
-
var
|
|
68
|
-
var
|
|
66
|
+
var _ButtonTypes = ['default', 'primary', 'dashed', 'link', 'text'];
|
|
67
|
+
var _ButtonShapes = ['default', 'circle', 'round'];
|
|
68
|
+
var _ButtonHTMLTypes = ['submit', 'button', 'reset'];
|
|
69
|
+
export var _ButtonVariantTypes = ['outlined', 'dashed', 'solid', 'filled', 'text', 'link'];
|
|
70
|
+
export var _ButtonColorTypes = ['default', 'primary', 'danger'];
|
|
@@ -1,41 +1,34 @@
|
|
|
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
|
+
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; }
|
|
2
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; }
|
|
3
5
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
4
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); }
|
|
5
|
-
// Style as inline component
|
|
6
|
-
import { unit } from '@ant-design/cssinjs';
|
|
7
7
|
import { genCompactItemStyle } from '../../style/compact-item';
|
|
8
8
|
import { genCompactItemVerticalStyle } from '../../style/compact-item-vertical';
|
|
9
9
|
import { genSubStyleComponent } from '../../theme/internal';
|
|
10
10
|
import { prepareComponentToken, prepareToken } from './token';
|
|
11
11
|
var genButtonCompactStyle = function genButtonCompactStyle(token) {
|
|
12
12
|
var componentCls = token.componentCls,
|
|
13
|
+
colorPrimaryHover = token.colorPrimaryHover,
|
|
14
|
+
lineWidth = token.lineWidth,
|
|
13
15
|
calc = token.calc;
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
'
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
top: calc(token.lineWidth).mul(-1).equal(),
|
|
31
|
-
insetInlineStart: calc(token.lineWidth).mul(-1).equal(),
|
|
32
|
-
display: 'inline-block',
|
|
33
|
-
width: "calc(100% + ".concat(unit(token.lineWidth), " * 2)"),
|
|
34
|
-
height: token.lineWidth,
|
|
35
|
-
backgroundColor: token.colorPrimaryHover,
|
|
36
|
-
content: '""'
|
|
37
|
-
}
|
|
38
|
-
}))));
|
|
16
|
+
var insetOffset = calc(lineWidth).mul(-1).equal();
|
|
17
|
+
var getCompactBorderStyle = function getCompactBorderStyle(vertical) {
|
|
18
|
+
return _defineProperty({}, "".concat(componentCls, "-compact").concat(vertical ? '-vertical' : '', "-item").concat(componentCls, "-primary:not([disabled])"), {
|
|
19
|
+
'& + &::before': {
|
|
20
|
+
position: 'absolute',
|
|
21
|
+
top: vertical ? insetOffset : 0,
|
|
22
|
+
insetInlineStart: vertical ? 0 : insetOffset,
|
|
23
|
+
backgroundColor: colorPrimaryHover,
|
|
24
|
+
content: '""',
|
|
25
|
+
width: vertical ? '100%' : lineWidth,
|
|
26
|
+
height: vertical ? lineWidth : '100%'
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
};
|
|
30
|
+
// Special styles for Primary Button
|
|
31
|
+
return _objectSpread(_objectSpread({}, getCompactBorderStyle()), getCompactBorderStyle(true));
|
|
39
32
|
};
|
|
40
33
|
// ============================== Export ==============================
|
|
41
34
|
export default genSubStyleComponent(['Button', 'compact'], function (token) {
|
|
@@ -36,14 +36,16 @@ var genGroupStyle = function genGroupStyle(token) {
|
|
|
36
36
|
borderStartStartRadius: 0,
|
|
37
37
|
borderEndStartRadius: 0
|
|
38
38
|
})
|
|
39
|
-
}), componentCls,
|
|
39
|
+
}), componentCls, {
|
|
40
40
|
position: 'relative',
|
|
41
|
-
zIndex: 1
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
41
|
+
zIndex: 1,
|
|
42
|
+
'&:hover, &:focus, &:active': {
|
|
43
|
+
zIndex: 2
|
|
44
|
+
},
|
|
45
|
+
'&[disabled]': {
|
|
46
|
+
zIndex: 0
|
|
47
|
+
}
|
|
48
|
+
}), "".concat(componentCls, "-icon-only"), {
|
|
47
49
|
fontSize: fontSize
|
|
48
50
|
}),
|
|
49
51
|
// Border Color
|