@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
|
@@ -16,7 +16,6 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
16
16
|
import { gold } from '@ant-design/colors';
|
|
17
17
|
import { unit } from '@ant-design/cssinjs';
|
|
18
18
|
import { operationUnit } from '../../style';
|
|
19
|
-
// eslint-disable-next-line import/prefer-default-export
|
|
20
19
|
var getTitleStyle = function getTitleStyle(fontSize, lineHeight, color, token) {
|
|
21
20
|
var titleMarginBottom = token.titleMarginBottom,
|
|
22
21
|
fontWeightStrong = token.fontWeightStrong;
|
|
@@ -28,7 +27,6 @@ var getTitleStyle = function getTitleStyle(fontSize, lineHeight, color, token) {
|
|
|
28
27
|
lineHeight: lineHeight
|
|
29
28
|
};
|
|
30
29
|
};
|
|
31
|
-
// eslint-disable-next-line import/prefer-default-export
|
|
32
30
|
export var getTitleStyles = function getTitleStyles(token) {
|
|
33
31
|
var headings = [1, 2, 3, 4, 5];
|
|
34
32
|
var styles = {};
|
|
@@ -41,10 +39,7 @@ export var getLinkStyles = function getLinkStyles(token) {
|
|
|
41
39
|
var componentCls = token.componentCls;
|
|
42
40
|
return {
|
|
43
41
|
'a&, a': _objectSpread(_objectSpread({}, operationUnit(token)), {}, _defineProperty({
|
|
44
|
-
|
|
45
|
-
'&:active, &:hover': {
|
|
46
|
-
textDecoration: token.linkHoverDecoration
|
|
47
|
-
}
|
|
42
|
+
userSelect: 'text'
|
|
48
43
|
}, "&[disabled], &".concat(componentCls, "-disabled"), {
|
|
49
44
|
color: token.colorTextDisabled,
|
|
50
45
|
cursor: 'not-allowed',
|
|
@@ -185,12 +180,11 @@ export var getCopyableStyles = function getCopyableStyles(token) {
|
|
|
185
180
|
});
|
|
186
181
|
};
|
|
187
182
|
export var getEllipsisStyles = function getEllipsisStyles() {
|
|
188
|
-
return _defineProperty(_defineProperty(_defineProperty(
|
|
183
|
+
return _defineProperty(_defineProperty(_defineProperty({}, "\n a&-ellipsis,\n span&-ellipsis\n ", {
|
|
189
184
|
display: 'inline-block',
|
|
190
185
|
maxWidth: '100%'
|
|
191
|
-
}), '&-single-line', {
|
|
192
|
-
whiteSpace: 'nowrap'
|
|
193
186
|
}), '&-ellipsis-single-line', {
|
|
187
|
+
whiteSpace: 'nowrap',
|
|
194
188
|
overflow: 'hidden',
|
|
195
189
|
textOverflow: 'ellipsis',
|
|
196
190
|
// https://blog.csdn.net/iefreer/article/details/50421025
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export default '5.
|
|
1
|
+
export default '5.22.2';
|
|
@@ -1,9 +1,4 @@
|
|
|
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; }
|
|
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
2
|
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
|
|
8
3
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
9
4
|
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
|
|
@@ -14,16 +9,23 @@ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r)
|
|
|
14
9
|
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; }
|
|
15
10
|
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; } }
|
|
16
11
|
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
12
|
+
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; }
|
|
13
|
+
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; }
|
|
14
|
+
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; }
|
|
15
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
16
|
+
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); }
|
|
17
17
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
18
18
|
import React, { useEffect } from 'react';
|
|
19
19
|
import { useMutateObserver } from '@rc-component/mutate-observer';
|
|
20
20
|
import classNames from 'classnames';
|
|
21
|
+
import useEvent from 'rc-util/lib/hooks/useEvent';
|
|
21
22
|
import { useToken } from '../theme/internal';
|
|
22
23
|
import WatermarkContext from './context';
|
|
23
24
|
import useClips, { FontGap } from './useClips';
|
|
24
25
|
import useRafDebounce from './useRafDebounce';
|
|
25
26
|
import useWatermark from './useWatermark';
|
|
26
27
|
import { getPixelRatio, reRendering } from './utils';
|
|
28
|
+
import toList from '../_util/toList';
|
|
27
29
|
/**
|
|
28
30
|
* Only return `next` when size changed.
|
|
29
31
|
* This is only used for elements compare, not a shallow equal!
|
|
@@ -33,6 +35,10 @@ function getSizeDiff(prev, next) {
|
|
|
33
35
|
}
|
|
34
36
|
var DEFAULT_GAP_X = 100;
|
|
35
37
|
var DEFAULT_GAP_Y = 100;
|
|
38
|
+
var fixedStyle = {
|
|
39
|
+
position: 'relative',
|
|
40
|
+
overflow: 'hidden'
|
|
41
|
+
};
|
|
36
42
|
var Watermark = function Watermark(props) {
|
|
37
43
|
var _offset$, _offset$2;
|
|
38
44
|
var _props$zIndex = props.zIndex,
|
|
@@ -54,6 +60,7 @@ var Watermark = function Watermark(props) {
|
|
|
54
60
|
children = props.children,
|
|
55
61
|
_props$inherit = props.inherit,
|
|
56
62
|
inherit = _props$inherit === void 0 ? true : _props$inherit;
|
|
63
|
+
var mergedStyle = _objectSpread(_objectSpread({}, fixedStyle), style);
|
|
57
64
|
var _useToken = useToken(),
|
|
58
65
|
_useToken2 = _slicedToArray(_useToken, 2),
|
|
59
66
|
token = _useToken2[1];
|
|
@@ -79,7 +86,7 @@ var Watermark = function Watermark(props) {
|
|
|
79
86
|
var offsetLeft = (_offset$ = offset === null || offset === void 0 ? void 0 : offset[0]) !== null && _offset$ !== void 0 ? _offset$ : gapXCenter;
|
|
80
87
|
var offsetTop = (_offset$2 = offset === null || offset === void 0 ? void 0 : offset[1]) !== null && _offset$2 !== void 0 ? _offset$2 : gapYCenter;
|
|
81
88
|
var markStyle = React.useMemo(function () {
|
|
82
|
-
var
|
|
89
|
+
var mergedMarkStyle = {
|
|
83
90
|
zIndex: zIndex,
|
|
84
91
|
position: 'absolute',
|
|
85
92
|
left: 0,
|
|
@@ -93,17 +100,17 @@ var Watermark = function Watermark(props) {
|
|
|
93
100
|
var positionLeft = offsetLeft - gapXCenter;
|
|
94
101
|
var positionTop = offsetTop - gapYCenter;
|
|
95
102
|
if (positionLeft > 0) {
|
|
96
|
-
|
|
97
|
-
|
|
103
|
+
mergedMarkStyle.left = "".concat(positionLeft, "px");
|
|
104
|
+
mergedMarkStyle.width = "calc(100% - ".concat(positionLeft, "px)");
|
|
98
105
|
positionLeft = 0;
|
|
99
106
|
}
|
|
100
107
|
if (positionTop > 0) {
|
|
101
|
-
|
|
102
|
-
|
|
108
|
+
mergedMarkStyle.top = "".concat(positionTop, "px");
|
|
109
|
+
mergedMarkStyle.height = "calc(100% - ".concat(positionTop, "px)");
|
|
103
110
|
positionTop = 0;
|
|
104
111
|
}
|
|
105
|
-
|
|
106
|
-
return
|
|
112
|
+
mergedMarkStyle.backgroundPosition = "".concat(positionLeft, "px ").concat(positionTop, "px");
|
|
113
|
+
return mergedMarkStyle;
|
|
107
114
|
}, [zIndex, offsetLeft, gapXCenter, offsetTop, gapYCenter]);
|
|
108
115
|
var _React$useState = React.useState(),
|
|
109
116
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
@@ -129,7 +136,7 @@ var Watermark = function Watermark(props) {
|
|
|
129
136
|
var defaultHeight = 64;
|
|
130
137
|
if (!image && ctx.measureText) {
|
|
131
138
|
ctx.font = "".concat(Number(fontSize), "px ").concat(fontFamily);
|
|
132
|
-
var contents =
|
|
139
|
+
var contents = toList(content);
|
|
133
140
|
var sizes = contents.map(function (item) {
|
|
134
141
|
var metrics = ctx.measureText(item);
|
|
135
142
|
return [metrics.width, metrics.fontBoundingBoxAscent + metrics.fontBoundingBoxDescent];
|
|
@@ -204,13 +211,25 @@ var Watermark = function Watermark(props) {
|
|
|
204
211
|
}
|
|
205
212
|
}, [watermarkInfo, targetElements]);
|
|
206
213
|
// ============================ Observe =============================
|
|
207
|
-
var onMutate = function
|
|
214
|
+
var onMutate = useEvent(function (mutations) {
|
|
208
215
|
mutations.forEach(function (mutation) {
|
|
209
216
|
if (reRendering(mutation, isWatermarkEle)) {
|
|
210
217
|
syncWatermark();
|
|
218
|
+
} else if (mutation.target === container && mutation.attributeName === 'style') {
|
|
219
|
+
// We've only force container not modify.
|
|
220
|
+
// Not consider nest case.
|
|
221
|
+
var keyStyles = Object.keys(fixedStyle);
|
|
222
|
+
for (var i = 0; i < keyStyles.length; i += 1) {
|
|
223
|
+
var key = keyStyles[i];
|
|
224
|
+
var oriValue = mergedStyle[key];
|
|
225
|
+
var currentValue = container.style[key];
|
|
226
|
+
if (oriValue && oriValue !== currentValue) {
|
|
227
|
+
container.style[key] = oriValue;
|
|
228
|
+
}
|
|
229
|
+
}
|
|
211
230
|
}
|
|
212
231
|
});
|
|
213
|
-
};
|
|
232
|
+
});
|
|
214
233
|
useMutateObserver(targetElements, onMutate);
|
|
215
234
|
useEffect(syncWatermark, [rotate, zIndex, width, height, image, content, color, fontSize, fontWeight, fontStyle, fontFamily, textAlign, gapX, gapY, offsetLeft, offsetTop]);
|
|
216
235
|
// ============================ Context =============================
|
|
@@ -241,9 +260,7 @@ var Watermark = function Watermark(props) {
|
|
|
241
260
|
return _jsx("div", {
|
|
242
261
|
ref: setContainer,
|
|
243
262
|
className: classNames(className, rootClassName),
|
|
244
|
-
style:
|
|
245
|
-
position: 'relative'
|
|
246
|
-
}, style),
|
|
263
|
+
style: mergedStyle,
|
|
247
264
|
children: childNode
|
|
248
265
|
});
|
|
249
266
|
};
|
|
@@ -4,6 +4,7 @@ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r)
|
|
|
4
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
5
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
6
6
|
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
7
|
+
import toList from '../_util/toList';
|
|
7
8
|
export var FontGap = 3;
|
|
8
9
|
function prepareCanvas(width, height) {
|
|
9
10
|
var ratio = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;
|
|
@@ -46,7 +47,7 @@ export default function useClips() {
|
|
|
46
47
|
ctx.fillStyle = color;
|
|
47
48
|
ctx.textAlign = textAlign;
|
|
48
49
|
ctx.textBaseline = 'top';
|
|
49
|
-
var contents =
|
|
50
|
+
var contents = toList(content);
|
|
50
51
|
contents === null || contents === void 0 || contents.forEach(function (item, index) {
|
|
51
52
|
ctx.fillText(item !== null && item !== void 0 ? item : '', contentWidth / 2, index * (mergedFontSize + FontGap * ratio));
|
|
52
53
|
});
|
package/lib/AppHolder/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import _App from "@chaoswise/ui/lib/App";
|
|
2
|
+
import { memo } from "react";
|
|
2
3
|
var message;
|
|
3
4
|
var notification;
|
|
4
5
|
var modal;
|
|
@@ -9,7 +10,7 @@ var AppHolder = function AppHolder() {
|
|
|
9
10
|
notification = staticFunction.notification;
|
|
10
11
|
return null;
|
|
11
12
|
};
|
|
12
|
-
export default AppHolder;
|
|
13
|
+
export default /*#__PURE__*/memo(AppHolder);
|
|
13
14
|
// 这里的问题是 AppHolder 组件在首次定义的时候,message、modal 和 notification 还没有被赋值。当你在其他地方尝试访问 AppHolder.message 时,这些属性是 undefined 的。
|
|
14
15
|
// AppHolder.message = message;
|
|
15
16
|
// AppHolder.modal = modal;
|
package/lib/CWSelect/index.js
CHANGED
|
@@ -1,2 +1,40 @@
|
|
|
1
|
+
var _excluded = ["selectLabel", "label", "prefix"];
|
|
2
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
3
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
4
|
+
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."); }
|
|
5
|
+
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; } }
|
|
6
|
+
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; }
|
|
7
|
+
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; } }
|
|
8
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
9
|
+
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; }
|
|
10
|
+
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; }
|
|
11
|
+
import React, { forwardRef, useMemo } from "react";
|
|
1
12
|
import Select from "../Antd5/select";
|
|
2
|
-
|
|
13
|
+
import classnames from "classnames";
|
|
14
|
+
import useConfigContext from "../useConfigContext";
|
|
15
|
+
import { cloneComProps } from "../utils";
|
|
16
|
+
import useStyle from "./index.style";
|
|
17
|
+
var CWSelect = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
18
|
+
var selectLabel = props.selectLabel,
|
|
19
|
+
label = props.label,
|
|
20
|
+
prefix = props.prefix,
|
|
21
|
+
rest = _objectWithoutProperties(props, _excluded);
|
|
22
|
+
var _useConfigContext = useConfigContext(),
|
|
23
|
+
getPrefixCls = _useConfigContext.getPrefixCls;
|
|
24
|
+
var prefixCls = getPrefixCls("select");
|
|
25
|
+
var _useStyle = useStyle(prefixCls),
|
|
26
|
+
_useStyle2 = _slicedToArray(_useStyle, 3),
|
|
27
|
+
wrapCSSVar = _useStyle2[0],
|
|
28
|
+
hashId = _useStyle2[1],
|
|
29
|
+
cssVarCls = _useStyle2[2];
|
|
30
|
+
var _prefix = useMemo(function () {
|
|
31
|
+
return prefix || label || selectLabel;
|
|
32
|
+
}, [prefix, label, selectLabel]);
|
|
33
|
+
return wrapCSSVar(/*#__PURE__*/React.createElement(Select, _extends({
|
|
34
|
+
ref: ref,
|
|
35
|
+
prefix: _prefix
|
|
36
|
+
}, rest)));
|
|
37
|
+
});
|
|
38
|
+
CWSelect.propTypes = {};
|
|
39
|
+
cloneComProps(Select, CWSelect);
|
|
40
|
+
export default CWSelect;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
3
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
4
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
5
|
+
import { genStyleHooks, mergeToken } from "../Antd5/theme/internal";
|
|
6
|
+
var genCustomSelectStyle = function genCustomSelectStyle(token) {
|
|
7
|
+
var prefixCls = token.antCls,
|
|
8
|
+
inputPaddingHorizontalBase = token.inputPaddingHorizontalBase;
|
|
9
|
+
var componentCls = "".concat(prefixCls, "-select");
|
|
10
|
+
return _defineProperty(_defineProperty(_defineProperty({}, "".concat(componentCls), _defineProperty({}, "".concat(componentCls, "-selector"), _defineProperty(_defineProperty({}, "".concat(componentCls, "-prefix"), {
|
|
11
|
+
display: "flex",
|
|
12
|
+
alignItems: "center"
|
|
13
|
+
// paddingRight: inputPaddingHorizontalBase,
|
|
14
|
+
}), "".concat(componentCls, "-selection-wrap"), {
|
|
15
|
+
display: "flex",
|
|
16
|
+
position: "relative",
|
|
17
|
+
flex: 1,
|
|
18
|
+
alignItems: "center",
|
|
19
|
+
flexWrap: "wrap",
|
|
20
|
+
overflow: "auto"
|
|
21
|
+
}))), "".concat(componentCls).concat(componentCls, "-single"), _defineProperty({}, "".concat(componentCls, "-selector"), _defineProperty({}, "".concat(componentCls, "-selection-wrap"), _defineProperty({}, "".concat(componentCls, "-selection-search"), {
|
|
22
|
+
left: "0",
|
|
23
|
+
marginLeft: "0"
|
|
24
|
+
})))), "".concat(componentCls).concat(componentCls, "-multiple"), _defineProperty({}, "".concat(componentCls, "-selector"), _defineProperty(_defineProperty({}, "".concat(componentCls, "-selection-wrap"), _defineProperty({}, "".concat(componentCls, "-selection-placeholder"), {
|
|
25
|
+
transform: "translate(-3px,-50%)" // 3px 是`${componentCls}-selection-search` 宽度
|
|
26
|
+
})), "&:has(".concat(componentCls, "-prefix)"), _defineProperty({}, "".concat(componentCls, "-selection-wrap"), _defineProperty(_defineProperty({}, "".concat(componentCls, "-selection-placeholder"), {
|
|
27
|
+
left: 0,
|
|
28
|
+
transform: "translateY(-50%)"
|
|
29
|
+
}), "".concat(componentCls, "-selection-search"), {
|
|
30
|
+
marginLeft: "0"
|
|
31
|
+
})))));
|
|
32
|
+
};
|
|
33
|
+
// ============================== Export ==============================
|
|
34
|
+
export default genStyleHooks("CWSelect", function (token) {
|
|
35
|
+
var selectToken = mergeToken(token, {
|
|
36
|
+
inputPaddingHorizontalBase: token.calc(token.paddingSM).sub(1).equal()
|
|
37
|
+
});
|
|
38
|
+
return [genCustomSelectStyle(selectToken)];
|
|
39
|
+
});
|
package/lib/CWTree/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import _TooltipText from "@chaoswise/ui/lib/TooltipText";
|
|
|
3
3
|
import _Dropdown from "@chaoswise/ui/lib/Dropdown";
|
|
4
4
|
import _Menu from "@chaoswise/ui/lib/Menu";
|
|
5
5
|
import _Tree from "@chaoswise/ui/lib/Tree";
|
|
6
|
-
var _excluded = ["children", "treeData", "menuData", "extendType", "onClickMenu", "menuStyle", "menuRender", "extraFooter", "tooltipPlacement", "searchValue", "multiple", "selectedKeys", "defaultSelectedKeys", "onSelect", "searchHighlight", "draggable", "
|
|
6
|
+
var _excluded = ["children", "treeData", "menuData", "extendType", "onClickMenu", "menuStyle", "menuRender", "extraFooter", "tooltipPlacement", "searchValue", "multiple", "selectedKeys", "defaultSelectedKeys", "onSelect", "searchHighlight", "draggable", "searchHighlightStyle", "className", "caseSensitive", "onExpand", "renderItem", "useTooltipText"],
|
|
7
7
|
_excluded2 = ["icon", "title", "key", "children"];
|
|
8
8
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
9
9
|
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
@@ -52,7 +52,6 @@ function CWTree(_ref) {
|
|
|
52
52
|
searchHighlight = _ref$searchHighlight === void 0 ? false : _ref$searchHighlight,
|
|
53
53
|
_ref$draggable = _ref.draggable,
|
|
54
54
|
draggable = _ref$draggable === void 0 ? false : _ref$draggable,
|
|
55
|
-
isDrawer = _ref.isDrawer,
|
|
56
55
|
_ref$searchHighlightS = _ref.searchHighlightStyle,
|
|
57
56
|
searchHighlightStyle = _ref$searchHighlightS === void 0 ? {
|
|
58
57
|
color: "#F5222D"
|
|
@@ -178,7 +177,7 @@ function CWTree(_ref) {
|
|
|
178
177
|
className: "cw-tree-treenode-title"
|
|
179
178
|
}, useTooltipText ? /*#__PURE__*/React.createElement(_TooltipText, {
|
|
180
179
|
placement: tooltipPlacement ? tooltipPlacement : "bottomLeft"
|
|
181
|
-
}, title) : title), /*#__PURE__*/React.createElement("span", {
|
|
180
|
+
}, title) : title), draggable && _showExtend === key && /*#__PURE__*/React.createElement("span", {
|
|
182
181
|
className: "cw-tree-treenode-drag-icon"
|
|
183
182
|
}, /*#__PURE__*/React.createElement(_Tooltip, {
|
|
184
183
|
title: intl.get("5fe60774-0f08-450f-a9d9-998996485fec").d("拖拽移动")
|
|
@@ -315,8 +314,7 @@ CWTree.defaultProps = {
|
|
|
315
314
|
searchHighlightStyle: {
|
|
316
315
|
color: "#F5222D"
|
|
317
316
|
},
|
|
318
|
-
draggable: false
|
|
319
|
-
isDrawer: true
|
|
317
|
+
draggable: false
|
|
320
318
|
};
|
|
321
319
|
CWTree.propTypes = {
|
|
322
320
|
/**
|
|
@@ -389,10 +387,6 @@ CWTree.propTypes = {
|
|
|
389
387
|
* 拖拽回调
|
|
390
388
|
*/
|
|
391
389
|
onDrop: PropTypes.func,
|
|
392
|
-
/**
|
|
393
|
-
* 使用抽屉扩展功能
|
|
394
|
-
*/
|
|
395
|
-
isDrawer: PropTypes.bool,
|
|
396
390
|
/**
|
|
397
391
|
* 自定义render node节点
|
|
398
392
|
*/
|
|
@@ -27,6 +27,7 @@ var genCustomCWTreeStyle = function genCustomCWTreeStyle(token) {
|
|
|
27
27
|
lineHeight: "32px",
|
|
28
28
|
padding: "0 16px",
|
|
29
29
|
whiteSpace: "nowrap",
|
|
30
|
+
marginBottom: 0,
|
|
30
31
|
"&::before": {
|
|
31
32
|
bottom: 0
|
|
32
33
|
}
|
|
@@ -51,6 +52,7 @@ var genCustomCWTreeStyle = function genCustomCWTreeStyle(token) {
|
|
|
51
52
|
display: "inline-flex",
|
|
52
53
|
flex: 1,
|
|
53
54
|
width: "0",
|
|
55
|
+
position: "static",
|
|
54
56
|
".cw-tree-treenode-content": {
|
|
55
57
|
width: "100%",
|
|
56
58
|
".cw-tree-treenode-title": {
|
|
@@ -11,21 +11,22 @@ function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
|
11
11
|
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var s = Object.getOwnPropertySymbols(e); for (r = 0; r < s.length; r++) o = s[r], t.includes(o) || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
12
12
|
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
|
|
13
13
|
// 导出全部 Antd5/config-provider 下的内容
|
|
14
|
-
import React, {
|
|
14
|
+
import React, { useState, useEffect, useMemo } from "react";
|
|
15
15
|
import ConfigProvider from "../Antd5/config-provider";
|
|
16
16
|
import { TagInitInstance, injectLocale } from "../locales";
|
|
17
17
|
// eslint-disable-next-line react-refresh/only-export-components
|
|
18
18
|
|
|
19
19
|
import { ThemeProvider } from "../antd-style";
|
|
20
20
|
import { cloneComProps } from "../utils";
|
|
21
|
-
import
|
|
22
|
-
import chaoswiseUICustomTheme from "./customToken";
|
|
21
|
+
import { getFinalTheme } from "./theme/utils";
|
|
23
22
|
import "../Antd5/style/reset.css";
|
|
24
23
|
import { merge } from "lodash-es";
|
|
25
24
|
import intlContext from "./intlContext";
|
|
26
25
|
import { getDateLocal } from "./generate/dayjs";
|
|
27
26
|
import { legacyLogicalPropertiesTransformer, StyleProvider } from "@ant-design/cssinjs";
|
|
28
27
|
var Provider = intlContext.Provider;
|
|
28
|
+
// 导出intlContext与低版本ui组件同步,@chaoswise/business需要用到
|
|
29
|
+
export { intlContext };
|
|
29
30
|
var CWConfigProvider = function CWConfigProvider(_ref) {
|
|
30
31
|
var defaultLocale = _ref.defaultLocale,
|
|
31
32
|
theme = _ref.theme,
|
|
@@ -47,6 +48,13 @@ var CWConfigProvider = function CWConfigProvider(_ref) {
|
|
|
47
48
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
48
49
|
antdLocale = _useState6[0],
|
|
49
50
|
setAntdLocale = _useState6[1];
|
|
51
|
+
var mergeTheme = useMemo(function () {
|
|
52
|
+
return getFinalTheme(merge({},
|
|
53
|
+
// 若嵌套主题内层ConfigProvider设置主题hashed为true
|
|
54
|
+
{
|
|
55
|
+
hashed: false
|
|
56
|
+
}, theme));
|
|
57
|
+
}, [theme]);
|
|
50
58
|
var injectAntdLocale = function injectAntdLocale() {
|
|
51
59
|
if (currentLocale === "zh_CN") {
|
|
52
60
|
import("../Antd5/locale/zh_CN").then(function (res) {
|
|
@@ -77,13 +85,6 @@ var CWConfigProvider = function CWConfigProvider(_ref) {
|
|
|
77
85
|
if (loading) {
|
|
78
86
|
return null;
|
|
79
87
|
}
|
|
80
|
-
var mergeTheme = merge({}, customTheme, {
|
|
81
|
-
components: chaoswiseUICustomTheme
|
|
82
|
-
},
|
|
83
|
-
// 若嵌套主题内层ConfigProvider设置主题hashed为true
|
|
84
|
-
{
|
|
85
|
-
hashed: false
|
|
86
|
-
}, theme);
|
|
87
88
|
return /*#__PURE__*/React.createElement(Provider, {
|
|
88
89
|
value: {
|
|
89
90
|
locale: currentLocale,
|
|
@@ -209,6 +209,12 @@ export default {
|
|
|
209
209
|
// 组件内部需要调整符合UI规范的样式
|
|
210
210
|
// 1.组件折叠图标替换、位置调整
|
|
211
211
|
// 2.组件内部间距调整
|
|
212
|
+
nodeHoverBg: "#e6f7ff",
|
|
213
|
+
// token变量,悬停色e6f7ff
|
|
214
|
+
nodeSelectedBg: "#e6f7ff",
|
|
215
|
+
// token变量,悬停色e6f7ff
|
|
216
|
+
directoryNodeSelectedBg: "#E6F7FF",
|
|
217
|
+
controlItemBgHover: "#E6F7FF",
|
|
212
218
|
controlHeightSM: 28,
|
|
213
219
|
marginXXS: 6,
|
|
214
220
|
colorBgContainer: "transparent",
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
export var commonToken = {
|
|
2
|
+
colorError: "#f5222d",
|
|
3
|
+
borderRadius: 2,
|
|
4
|
+
fontSize: 12,
|
|
5
|
+
controlHeight: 28,
|
|
6
|
+
controlHeightLG: 40,
|
|
7
|
+
controlHeightSM: 24,
|
|
8
|
+
controlHeightXS: 16,
|
|
9
|
+
wireframe: true // 用于将组件的视觉效果变为线框化,初始恢复到antd3/antd4的视觉效果
|
|
10
|
+
};
|
|
11
|
+
export var commonComponentToken = {
|
|
12
|
+
Layout: {
|
|
13
|
+
headerHeight: 48,
|
|
14
|
+
headerPadding: 0
|
|
15
|
+
},
|
|
16
|
+
Button: {
|
|
17
|
+
primaryShadow: "none",
|
|
18
|
+
dangerShadow: "none",
|
|
19
|
+
defaultShadow: "none",
|
|
20
|
+
contentFontSizeLG: 14,
|
|
21
|
+
contentFontSizeSM: 12,
|
|
22
|
+
contentFontSize: 12,
|
|
23
|
+
onlyIconSizeLG: 16,
|
|
24
|
+
onlyIconSizeSM: 12,
|
|
25
|
+
onlyIconSize: 14,
|
|
26
|
+
paddingInline: 11
|
|
27
|
+
},
|
|
28
|
+
Radio: {
|
|
29
|
+
radioSize: 16,
|
|
30
|
+
dotSize: 8
|
|
31
|
+
},
|
|
32
|
+
Checkbox: {
|
|
33
|
+
controlInteractiveSize: 16
|
|
34
|
+
},
|
|
35
|
+
Tooltip: {
|
|
36
|
+
paddingSM: 8
|
|
37
|
+
},
|
|
38
|
+
Dropdown: {
|
|
39
|
+
controlHeight: 30,
|
|
40
|
+
controlPaddingHorizontal: 6,
|
|
41
|
+
paddingXXS: "4px 0"
|
|
42
|
+
},
|
|
43
|
+
Form: {
|
|
44
|
+
verticalLabelPadding: "0 0 4px"
|
|
45
|
+
},
|
|
46
|
+
Steps: {
|
|
47
|
+
controlHeight: 24,
|
|
48
|
+
padding: 8,
|
|
49
|
+
iconSize: 24,
|
|
50
|
+
dotCurrentSize: 8,
|
|
51
|
+
dotSize: 8
|
|
52
|
+
},
|
|
53
|
+
DatePicker: {
|
|
54
|
+
paddingInline: 9
|
|
55
|
+
},
|
|
56
|
+
Input: {
|
|
57
|
+
paddingInline: 9
|
|
58
|
+
},
|
|
59
|
+
InputNumber: {
|
|
60
|
+
paddingInline: 9
|
|
61
|
+
},
|
|
62
|
+
Slider: {
|
|
63
|
+
railSize: 6,
|
|
64
|
+
borderRadiusXS: 3,
|
|
65
|
+
handleSize: 18,
|
|
66
|
+
dotSize: 6
|
|
67
|
+
},
|
|
68
|
+
Badge: {
|
|
69
|
+
dotSize: 4,
|
|
70
|
+
statusSize: 8,
|
|
71
|
+
indicatorHeight: 20,
|
|
72
|
+
textFontSize: 12
|
|
73
|
+
},
|
|
74
|
+
Collapse: {
|
|
75
|
+
headerPadding: "7px 16px"
|
|
76
|
+
},
|
|
77
|
+
Switch: {
|
|
78
|
+
opacityLoading: 0.35
|
|
79
|
+
},
|
|
80
|
+
Select: {
|
|
81
|
+
optionPadding: "5px 10px",
|
|
82
|
+
algorithm: true
|
|
83
|
+
},
|
|
84
|
+
Alert: {
|
|
85
|
+
defaultPadding: "4px 15px",
|
|
86
|
+
withDescriptionIconSize: 14,
|
|
87
|
+
withDescriptionPadding: "4px 15px",
|
|
88
|
+
fontSize: 14
|
|
89
|
+
},
|
|
90
|
+
Notification: {
|
|
91
|
+
zIndexPopup: 950
|
|
92
|
+
},
|
|
93
|
+
Message: {
|
|
94
|
+
contentPadding: "9px 16px"
|
|
95
|
+
},
|
|
96
|
+
Spin: {
|
|
97
|
+
dotSize: 20,
|
|
98
|
+
dotSizeLG: 32,
|
|
99
|
+
dotSizeSM: 14
|
|
100
|
+
},
|
|
101
|
+
Modal: {
|
|
102
|
+
padding: 14
|
|
103
|
+
},
|
|
104
|
+
Drawer: {
|
|
105
|
+
padding: 14
|
|
106
|
+
},
|
|
107
|
+
Tag: {
|
|
108
|
+
marginXS: 6
|
|
109
|
+
},
|
|
110
|
+
Table: {
|
|
111
|
+
fontWeightStrong: 400,
|
|
112
|
+
cellPaddingBlock: 12,
|
|
113
|
+
cellPaddingInline: 12,
|
|
114
|
+
cellPaddingBlockMD: 8,
|
|
115
|
+
cellPaddingInlineMD: 12
|
|
116
|
+
},
|
|
117
|
+
Tree: {
|
|
118
|
+
controlHeightSM: 28,
|
|
119
|
+
marginXXS: 6
|
|
120
|
+
},
|
|
121
|
+
Tabs: {
|
|
122
|
+
horizontalItemPaddingLG: "15px 0",
|
|
123
|
+
horizontalItemPadding: "10px 0",
|
|
124
|
+
horizontalItemPaddingSM: "5px 0",
|
|
125
|
+
lineHeight: 1.5714285,
|
|
126
|
+
padding: 15,
|
|
127
|
+
titleFontSize: 14,
|
|
128
|
+
titleFontSizeLG: 14,
|
|
129
|
+
titleFontSizeSM: 14,
|
|
130
|
+
cardPaddingLG: "15px 23px",
|
|
131
|
+
cardPadding: "8px 15px",
|
|
132
|
+
cardPaddingSM: "5px 7px"
|
|
133
|
+
},
|
|
134
|
+
Menu: {
|
|
135
|
+
itemBorderRadius: 4,
|
|
136
|
+
itemMarginInline: 8,
|
|
137
|
+
fontSize: 14,
|
|
138
|
+
collapsedWidth: 40
|
|
139
|
+
}
|
|
140
|
+
};
|