@chaoswise/ui 3.0.22 → 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/Alert/index.js +48 -2
- package/lib/Alert/index.style.js +36 -0
- 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/Button/index.style.js +1 -3
- 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 +9 -2
- 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 +44 -48
- package/lib/RangePicker/components/ExtraQuickSelect.js +1 -4
- package/lib/RangePicker/index.js +38 -26
- package/lib/RangePicker/utils/generate/dayjs.js +1 -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
package/lib/Antd5/form/Form.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var _excluded = ["prefixCls", "className", "rootClassName", "size", "disabled", "form", "colon", "labelAlign", "labelWrap", "labelCol", "wrapperCol", "hideRequiredMark", "layout", "scrollToFirstError", "requiredMark", "onFinishFailed", "name", "style", "feedbackIcons", "variant"];
|
|
2
|
+
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
3
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
4
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
-
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); }
|
|
5
5
|
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
6
6
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
7
7
|
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); }
|
|
@@ -105,8 +105,12 @@ var InternalForm = function InternalForm(props, ref) {
|
|
|
105
105
|
feedbackIcons: feedbackIcons
|
|
106
106
|
};
|
|
107
107
|
}, [name, labelAlign, labelCol, wrapperCol, layout, mergedColon, mergedRequiredMark, wrapForm, feedbackIcons]);
|
|
108
|
+
var nativeElementRef = React.useRef(null);
|
|
108
109
|
React.useImperativeHandle(ref, function () {
|
|
109
|
-
|
|
110
|
+
var _nativeElementRef$cur;
|
|
111
|
+
return _objectSpread(_objectSpread({}, wrapForm), {}, {
|
|
112
|
+
nativeElement: (_nativeElementRef$cur = nativeElementRef.current) === null || _nativeElementRef$cur === void 0 ? void 0 : _nativeElementRef$cur.nativeElement
|
|
113
|
+
});
|
|
110
114
|
});
|
|
111
115
|
var scrollToField = function scrollToField(options, fieldName) {
|
|
112
116
|
if (options) {
|
|
@@ -114,9 +118,12 @@ var InternalForm = function InternalForm(props, ref) {
|
|
|
114
118
|
block: 'nearest'
|
|
115
119
|
};
|
|
116
120
|
if (_typeof(options) === 'object') {
|
|
117
|
-
defaultScrollToFirstError = options;
|
|
121
|
+
defaultScrollToFirstError = _objectSpread(_objectSpread({}, defaultScrollToFirstError), options);
|
|
118
122
|
}
|
|
119
123
|
wrapForm.scrollToField(fieldName, defaultScrollToFirstError);
|
|
124
|
+
if (defaultScrollToFirstError.focus) {
|
|
125
|
+
wrapForm.focusField(fieldName);
|
|
126
|
+
}
|
|
120
127
|
}
|
|
121
128
|
};
|
|
122
129
|
var onInternalFinishFailed = function onInternalFinishFailed(errorInfo) {
|
|
@@ -149,6 +156,7 @@ var InternalForm = function InternalForm(props, ref) {
|
|
|
149
156
|
name: name,
|
|
150
157
|
onFinishFailed: onInternalFinishFailed,
|
|
151
158
|
form: wrapForm,
|
|
159
|
+
ref: nativeElementRef,
|
|
152
160
|
style: _objectSpread(_objectSpread({}, contextForm === null || contextForm === void 0 ? void 0 : contextForm.style), style),
|
|
153
161
|
className: formClassName
|
|
154
162
|
}))
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
-
var _excluded = ["prefixCls", "className", "rootClassName", "style", "help", "errors", "warnings", "validateStatus", "meta", "hasFeedback", "hidden", "children", "fieldId", "required", "isRequired", "onSubItemMetaChange"];
|
|
2
|
+
var _excluded = ["prefixCls", "className", "rootClassName", "style", "help", "errors", "warnings", "validateStatus", "meta", "hasFeedback", "hidden", "children", "fieldId", "required", "isRequired", "onSubItemMetaChange", "layout"];
|
|
3
3
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4
4
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5
5
|
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
@@ -43,10 +43,13 @@ export default function ItemHolder(props) {
|
|
|
43
43
|
required = props.required,
|
|
44
44
|
isRequired = props.isRequired,
|
|
45
45
|
onSubItemMetaChange = props.onSubItemMetaChange,
|
|
46
|
+
layout = props.layout,
|
|
46
47
|
restProps = _objectWithoutProperties(props, _excluded);
|
|
47
48
|
var itemPrefixCls = "".concat(prefixCls, "-item");
|
|
48
49
|
var _React$useContext = React.useContext(FormContext),
|
|
49
|
-
requiredMark = _React$useContext.requiredMark
|
|
50
|
+
requiredMark = _React$useContext.requiredMark,
|
|
51
|
+
formVertical = _React$useContext.vertical;
|
|
52
|
+
var vertical = formVertical || layout === 'vertical';
|
|
50
53
|
// ======================== Margin ========================
|
|
51
54
|
var itemRef = React.useRef(null);
|
|
52
55
|
var debounceErrors = useDebounce(errors);
|
|
@@ -80,7 +83,7 @@ export default function ItemHolder(props) {
|
|
|
80
83
|
};
|
|
81
84
|
var mergedValidateStatus = getValidateState();
|
|
82
85
|
// ======================== Render ========================
|
|
83
|
-
var itemClassName = classNames(itemPrefixCls, className, rootClassName, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(itemPrefixCls, "-with-help"), hasHelp || debounceErrors.length || debounceWarnings.length), "".concat(itemPrefixCls, "-has-feedback"), mergedValidateStatus && hasFeedback), "".concat(itemPrefixCls, "-has-success"), mergedValidateStatus === 'success'), "".concat(itemPrefixCls, "-has-warning"), mergedValidateStatus === 'warning'), "".concat(itemPrefixCls, "-has-error"), mergedValidateStatus === 'error'), "".concat(itemPrefixCls, "-is-validating"), mergedValidateStatus === 'validating'), "".concat(itemPrefixCls, "-hidden"), hidden));
|
|
86
|
+
var itemClassName = classNames(itemPrefixCls, className, rootClassName, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(itemPrefixCls, "-with-help"), hasHelp || debounceErrors.length || debounceWarnings.length), "".concat(itemPrefixCls, "-has-feedback"), mergedValidateStatus && hasFeedback), "".concat(itemPrefixCls, "-has-success"), mergedValidateStatus === 'success'), "".concat(itemPrefixCls, "-has-warning"), mergedValidateStatus === 'warning'), "".concat(itemPrefixCls, "-has-error"), mergedValidateStatus === 'error'), "".concat(itemPrefixCls, "-is-validating"), mergedValidateStatus === 'validating'), "".concat(itemPrefixCls, "-hidden"), hidden), "".concat(itemPrefixCls, "-").concat(layout), layout));
|
|
84
87
|
return _jsxs("div", {
|
|
85
88
|
className: itemClassName,
|
|
86
89
|
style: style,
|
|
@@ -95,7 +98,8 @@ export default function ItemHolder(props) {
|
|
|
95
98
|
}, props), {}, {
|
|
96
99
|
requiredMark: requiredMark,
|
|
97
100
|
required: required !== null && required !== void 0 ? required : isRequired,
|
|
98
|
-
prefixCls: prefixCls
|
|
101
|
+
prefixCls: prefixCls,
|
|
102
|
+
vertical: vertical
|
|
99
103
|
})), _jsx(FormItemInput, _objectSpread(_objectSpread(_objectSpread({}, props), meta), {}, {
|
|
100
104
|
errors: debounceErrors,
|
|
101
105
|
warnings: debounceWarnings,
|
|
@@ -34,7 +34,7 @@ import { getFieldId, toArray } from '../util';
|
|
|
34
34
|
import ItemHolder from './ItemHolder';
|
|
35
35
|
import StatusProvider from './StatusProvider';
|
|
36
36
|
var NAME_SPLIT = '__SPLIT__';
|
|
37
|
-
var
|
|
37
|
+
var _ValidateStatuses = ['success', 'warning', 'error', 'validating', ''];
|
|
38
38
|
// https://github.com/ant-design/ant-design/issues/46417
|
|
39
39
|
// `getValueProps` may modify the value props name,
|
|
40
40
|
// we should check if the control is similar.
|
|
@@ -81,7 +81,8 @@ function InternalFormItem(props) {
|
|
|
81
81
|
trigger = _props$trigger === void 0 ? 'onChange' : _props$trigger,
|
|
82
82
|
validateTrigger = props.validateTrigger,
|
|
83
83
|
hidden = props.hidden,
|
|
84
|
-
help = props.help
|
|
84
|
+
help = props.help,
|
|
85
|
+
layout = props.layout;
|
|
85
86
|
var _React$useContext = React.useContext(ConfigContext),
|
|
86
87
|
getPrefixCls = _React$useContext.getPrefixCls;
|
|
87
88
|
var _React$useContext2 = React.useContext(FormContext),
|
|
@@ -204,6 +205,7 @@ function InternalFormItem(props) {
|
|
|
204
205
|
warnings: mergedWarnings,
|
|
205
206
|
meta: meta,
|
|
206
207
|
onSubItemMetaChange: onSubItemMetaChange,
|
|
208
|
+
layout: layout,
|
|
207
209
|
children: baseChildren
|
|
208
210
|
}), "row");
|
|
209
211
|
}
|
|
@@ -228,13 +230,13 @@ function InternalFormItem(props) {
|
|
|
228
230
|
children: function children(control, renderMeta, context) {
|
|
229
231
|
var mergedName = toArray(name).length && renderMeta ? renderMeta.name : [];
|
|
230
232
|
var fieldId = getFieldId(mergedName, formName);
|
|
231
|
-
var isRequired = required !== undefined ? required : !!(rules && rules.some(function (rule) {
|
|
233
|
+
var isRequired = required !== undefined ? required : !!(rules !== null && rules !== void 0 && rules.some(function (rule) {
|
|
232
234
|
if (rule && _typeof(rule) === 'object' && rule.required && !rule.warningOnly) {
|
|
233
235
|
return true;
|
|
234
236
|
}
|
|
235
237
|
if (typeof rule === 'function') {
|
|
236
238
|
var ruleEntity = rule(context);
|
|
237
|
-
return ruleEntity
|
|
239
|
+
return (ruleEntity === null || ruleEntity === void 0 ? void 0 : ruleEntity.required) && !(ruleEntity !== null && ruleEntity !== void 0 && ruleEntity.warningOnly);
|
|
238
240
|
}
|
|
239
241
|
return false;
|
|
240
242
|
}));
|
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
var _excluded = ["labelCol", "wrapperCol"];
|
|
2
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
3
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
4
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
5
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
6
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
7
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
8
|
+
function _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; }
|
|
9
|
+
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; }
|
|
1
10
|
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
11
|
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
12
|
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; }
|
|
@@ -7,13 +16,17 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
7
16
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
8
17
|
import * as React from 'react';
|
|
9
18
|
import classNames from 'classnames';
|
|
19
|
+
import { get, set } from 'rc-util';
|
|
20
|
+
import useLayoutEffect from 'rc-util/lib/hooks/useLayoutEffect';
|
|
10
21
|
import Col from '../grid/col';
|
|
11
22
|
import { FormContext, FormItemPrefixContext } from './context';
|
|
12
23
|
import ErrorList from './ErrorList';
|
|
13
24
|
import FallbackCmp from './style/fallbackCmp';
|
|
25
|
+
var GRID_MAX = 24;
|
|
14
26
|
var FormItemInput = function FormItemInput(props) {
|
|
15
27
|
var prefixCls = props.prefixCls,
|
|
16
28
|
status = props.status,
|
|
29
|
+
labelCol = props.labelCol,
|
|
17
30
|
wrapperCol = props.wrapperCol,
|
|
18
31
|
children = props.children,
|
|
19
32
|
errors = props.errors,
|
|
@@ -23,17 +36,47 @@ var FormItemInput = function FormItemInput(props) {
|
|
|
23
36
|
help = props.help,
|
|
24
37
|
fieldId = props.fieldId,
|
|
25
38
|
marginBottom = props.marginBottom,
|
|
26
|
-
onErrorVisibleChanged = props.onErrorVisibleChanged
|
|
39
|
+
onErrorVisibleChanged = props.onErrorVisibleChanged,
|
|
40
|
+
label = props.label;
|
|
27
41
|
var baseClassName = "".concat(prefixCls, "-item");
|
|
28
42
|
var formContext = React.useContext(FormContext);
|
|
29
|
-
var mergedWrapperCol =
|
|
43
|
+
var mergedWrapperCol = React.useMemo(function () {
|
|
44
|
+
var mergedWrapper = _objectSpread({}, wrapperCol || formContext.wrapperCol || {});
|
|
45
|
+
if (label === null && !labelCol && !wrapperCol && formContext.labelCol) {
|
|
46
|
+
var list = [undefined, 'xs', 'sm', 'md', 'lg', 'xl', 'xxl'];
|
|
47
|
+
list.forEach(function (size) {
|
|
48
|
+
var _size = size ? [size] : [];
|
|
49
|
+
var formLabel = get(formContext.labelCol, _size);
|
|
50
|
+
var formLabelObj = _typeof(formLabel) === 'object' ? formLabel : {};
|
|
51
|
+
var wrapper = get(mergedWrapper, _size);
|
|
52
|
+
var wrapperObj = _typeof(wrapper) === 'object' ? wrapper : {};
|
|
53
|
+
if ('span' in formLabelObj && !('offset' in wrapperObj) && formLabelObj.span < GRID_MAX) {
|
|
54
|
+
mergedWrapper = set(mergedWrapper, [].concat(_size, ['offset']), formLabelObj.span);
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
return mergedWrapper;
|
|
59
|
+
}, [wrapperCol, formContext]);
|
|
30
60
|
var className = classNames("".concat(baseClassName, "-control"), mergedWrapperCol.className);
|
|
31
61
|
// Pass to sub FormItem should not with col info
|
|
32
62
|
var subFormContext = React.useMemo(function () {
|
|
33
|
-
|
|
63
|
+
var labelCol = formContext.labelCol,
|
|
64
|
+
wrapperCol = formContext.wrapperCol,
|
|
65
|
+
rest = _objectWithoutProperties(formContext, _excluded);
|
|
66
|
+
return rest;
|
|
34
67
|
}, [formContext]);
|
|
35
|
-
|
|
36
|
-
|
|
68
|
+
var extraRef = React.useRef(null);
|
|
69
|
+
var _React$useState = React.useState(0),
|
|
70
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
71
|
+
extraHeight = _React$useState2[0],
|
|
72
|
+
setExtraHeight = _React$useState2[1];
|
|
73
|
+
useLayoutEffect(function () {
|
|
74
|
+
if (extra && extraRef.current) {
|
|
75
|
+
setExtraHeight(extraRef.current.clientHeight);
|
|
76
|
+
} else {
|
|
77
|
+
setExtraHeight(0);
|
|
78
|
+
}
|
|
79
|
+
}, [extra]);
|
|
37
80
|
var inputDom = _jsx("div", {
|
|
38
81
|
className: "".concat(baseClassName, "-control-input"),
|
|
39
82
|
children: _jsx("div", {
|
|
@@ -47,28 +90,17 @@ var FormItemInput = function FormItemInput(props) {
|
|
|
47
90
|
status: status
|
|
48
91
|
};
|
|
49
92
|
}, [prefixCls, status]);
|
|
50
|
-
var errorListDom = marginBottom !== null || errors.length || warnings.length ?
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
help: help,
|
|
62
|
-
helpStatus: status,
|
|
63
|
-
className: "".concat(baseClassName, "-explain-connected"),
|
|
64
|
-
onVisibleChanged: onErrorVisibleChanged
|
|
65
|
-
})
|
|
66
|
-
}), !!marginBottom && _jsx("div", {
|
|
67
|
-
style: {
|
|
68
|
-
width: 0,
|
|
69
|
-
height: marginBottom
|
|
70
|
-
}
|
|
71
|
-
})]
|
|
93
|
+
var errorListDom = marginBottom !== null || errors.length || warnings.length ? _jsx(FormItemPrefixContext.Provider, {
|
|
94
|
+
value: formItemContext,
|
|
95
|
+
children: _jsx(ErrorList, {
|
|
96
|
+
fieldId: fieldId,
|
|
97
|
+
errors: errors,
|
|
98
|
+
warnings: warnings,
|
|
99
|
+
help: help,
|
|
100
|
+
helpStatus: status,
|
|
101
|
+
className: "".concat(baseClassName, "-explain-connected"),
|
|
102
|
+
onVisibleChanged: onErrorVisibleChanged
|
|
103
|
+
})
|
|
72
104
|
}) : null;
|
|
73
105
|
var extraProps = {};
|
|
74
106
|
if (fieldId) {
|
|
@@ -78,14 +110,22 @@ var FormItemInput = function FormItemInput(props) {
|
|
|
78
110
|
// 0&&error -> 0
|
|
79
111
|
var extraDom = extra ? _jsx("div", _objectSpread(_objectSpread({}, extraProps), {}, {
|
|
80
112
|
className: "".concat(baseClassName, "-extra"),
|
|
113
|
+
ref: extraRef,
|
|
81
114
|
children: extra
|
|
82
115
|
})) : null;
|
|
116
|
+
var additionalDom = errorListDom || extraDom ? _jsxs("div", {
|
|
117
|
+
className: "".concat(baseClassName, "-additional"),
|
|
118
|
+
style: marginBottom ? {
|
|
119
|
+
minHeight: marginBottom + extraHeight
|
|
120
|
+
} : {},
|
|
121
|
+
children: [errorListDom, extraDom]
|
|
122
|
+
}) : null;
|
|
83
123
|
var dom = formItemRender && formItemRender.mark === 'pro_table_render' && formItemRender.render ? formItemRender.render(props, {
|
|
84
124
|
input: inputDom,
|
|
85
125
|
errorList: errorListDom,
|
|
86
126
|
extra: extraDom
|
|
87
127
|
}) : _jsxs(_Fragment, {
|
|
88
|
-
children: [inputDom,
|
|
128
|
+
children: [inputDom, additionalDom]
|
|
89
129
|
});
|
|
90
130
|
return _jsxs(FormContext.Provider, {
|
|
91
131
|
value: subFormContext,
|
|
@@ -42,12 +42,12 @@ var FormItemLabel = function FormItemLabel(_ref) {
|
|
|
42
42
|
colon = _ref.colon,
|
|
43
43
|
required = _ref.required,
|
|
44
44
|
requiredMark = _ref.requiredMark,
|
|
45
|
-
tooltip = _ref.tooltip
|
|
45
|
+
tooltip = _ref.tooltip,
|
|
46
|
+
vertical = _ref.vertical;
|
|
46
47
|
var _useLocale = useLocale('Form'),
|
|
47
48
|
_useLocale2 = _slicedToArray(_useLocale, 1),
|
|
48
49
|
formLocale = _useLocale2[0];
|
|
49
50
|
var _React$useContext = React.useContext(FormContext),
|
|
50
|
-
vertical = _React$useContext.vertical,
|
|
51
51
|
contextLabelAlign = _React$useContext.labelAlign,
|
|
52
52
|
contextLabelCol = _React$useContext.labelCol,
|
|
53
53
|
labelWrap = _React$useContext.labelWrap,
|
|
@@ -64,7 +64,7 @@ var FormItemLabel = function FormItemLabel(_ref) {
|
|
|
64
64
|
var computedColon = colon === true || contextColon !== false && colon !== false;
|
|
65
65
|
var haveColon = computedColon && !vertical;
|
|
66
66
|
// Remove duplicated user input colon
|
|
67
|
-
if (haveColon && typeof label === 'string' && label.trim()
|
|
67
|
+
if (haveColon && typeof label === 'string' && label.trim()) {
|
|
68
68
|
labelChildren = label.replace(/[:|:]\s*$/, '');
|
|
69
69
|
}
|
|
70
70
|
// Tooltip
|
|
@@ -12,8 +12,8 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
|
|
|
12
12
|
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
13
13
|
import * as React from 'react';
|
|
14
14
|
import { useForm as useRcForm } from 'rc-field-form';
|
|
15
|
-
import scrollIntoView from 'scroll-into-view-if-needed';
|
|
16
15
|
import { getDOM } from 'rc-util/lib/Dom/findDOMNode';
|
|
16
|
+
import scrollIntoView from 'scroll-into-view-if-needed';
|
|
17
17
|
import { getFieldId, toArray } from '../util';
|
|
18
18
|
function toNamePathStr(name) {
|
|
19
19
|
var namePath = toArray(name);
|
|
@@ -59,6 +59,13 @@ export default function useForm(form) {
|
|
|
59
59
|
}, options));
|
|
60
60
|
}
|
|
61
61
|
},
|
|
62
|
+
focusField: function focusField(name) {
|
|
63
|
+
var node = getFieldDOMNode(name, wrapForm);
|
|
64
|
+
if (node) {
|
|
65
|
+
var _node$focus;
|
|
66
|
+
(_node$focus = node.focus) === null || _node$focus === void 0 || _node$focus.call(node);
|
|
67
|
+
}
|
|
68
|
+
},
|
|
62
69
|
getFieldInstance: function getFieldInstance(name) {
|
|
63
70
|
var namePathStr = toNamePathStr(name);
|
|
64
71
|
return itemsRef.current[namePathStr];
|
|
@@ -1,19 +1,25 @@
|
|
|
1
1
|
import { useContext } from 'react';
|
|
2
2
|
import { VariantContext } from '../context';
|
|
3
|
-
|
|
3
|
+
import { ConfigContext, Variants } from '../../config-provider';
|
|
4
4
|
/**
|
|
5
5
|
* Compatible for legacy `bordered` prop.
|
|
6
6
|
*/
|
|
7
|
-
var useVariant = function useVariant(variant) {
|
|
8
|
-
var legacyBordered = arguments.length >
|
|
7
|
+
var useVariant = function useVariant(component, variant) {
|
|
8
|
+
var legacyBordered = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined;
|
|
9
|
+
var _useContext = useContext(ConfigContext),
|
|
10
|
+
configVariant = _useContext.variant,
|
|
11
|
+
componentConfig = _useContext[component];
|
|
9
12
|
var ctxVariant = useContext(VariantContext);
|
|
13
|
+
var configComponentVariant = componentConfig === null || componentConfig === void 0 ? void 0 : componentConfig.variant;
|
|
10
14
|
var mergedVariant;
|
|
11
15
|
if (typeof variant !== 'undefined') {
|
|
12
16
|
mergedVariant = variant;
|
|
13
17
|
} else if (legacyBordered === false) {
|
|
14
18
|
mergedVariant = 'borderless';
|
|
15
19
|
} else {
|
|
16
|
-
|
|
20
|
+
var _ref, _ref2;
|
|
21
|
+
// form variant > component global variant > global variant
|
|
22
|
+
mergedVariant = (_ref = (_ref2 = ctxVariant !== null && ctxVariant !== void 0 ? ctxVariant : configComponentVariant) !== null && _ref2 !== void 0 ? _ref2 : configVariant) !== null && _ref !== void 0 ? _ref : 'outlined';
|
|
17
23
|
}
|
|
18
24
|
var enableVariantCls = Variants.includes(mergedVariant);
|
|
19
25
|
return [mergedVariant, enableVariantCls];
|
|
@@ -8,7 +8,7 @@ var genFormValidateMotionStyle = function genFormValidateMotionStyle(token) {
|
|
|
8
8
|
var helpItemCls = "".concat(componentCls, "-show-help-item");
|
|
9
9
|
return _defineProperty({}, helpCls, _defineProperty({
|
|
10
10
|
// Explain holder
|
|
11
|
-
transition: "opacity ".concat(token.
|
|
11
|
+
transition: "opacity ".concat(token.motionDurationFast, " ").concat(token.motionEaseInOut),
|
|
12
12
|
'&-appear, &-enter': {
|
|
13
13
|
opacity: 0,
|
|
14
14
|
'&-active': {
|
|
@@ -23,14 +23,15 @@ var genFormValidateMotionStyle = function genFormValidateMotionStyle(token) {
|
|
|
23
23
|
}
|
|
24
24
|
}, helpItemCls, _defineProperty(_defineProperty({
|
|
25
25
|
overflow: 'hidden',
|
|
26
|
-
transition: "height ".concat(token.
|
|
27
|
-
}, "&".concat(helpItemCls, "-appear, &").concat(helpItemCls, "-enter"),
|
|
26
|
+
transition: "height ".concat(token.motionDurationFast, " ").concat(token.motionEaseInOut, ",\n opacity ").concat(token.motionDurationFast, " ").concat(token.motionEaseInOut, ",\n transform ").concat(token.motionDurationFast, " ").concat(token.motionEaseInOut, " !important")
|
|
27
|
+
}, "&".concat(helpItemCls, "-appear, &").concat(helpItemCls, "-enter"), {
|
|
28
28
|
transform: "translateY(-5px)",
|
|
29
|
-
opacity: 0
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
29
|
+
opacity: 0,
|
|
30
|
+
'&-active': {
|
|
31
|
+
transform: 'translateY(0)',
|
|
32
|
+
opacity: 1
|
|
33
|
+
}
|
|
34
|
+
}), "&".concat(helpItemCls, "-leave-active"), {
|
|
34
35
|
transform: "translateY(-5px)"
|
|
35
36
|
})));
|
|
36
37
|
};
|
|
@@ -72,6 +72,7 @@ var genFormItemStyle = function genFormItemStyle(token) {
|
|
|
72
72
|
iconCls = token.iconCls,
|
|
73
73
|
componentCls = token.componentCls,
|
|
74
74
|
rootPrefixCls = token.rootPrefixCls,
|
|
75
|
+
antCls = token.antCls,
|
|
75
76
|
labelRequiredMarkColor = token.labelRequiredMarkColor,
|
|
76
77
|
labelColor = token.labelColor,
|
|
77
78
|
labelFontSize = token.labelFontSize,
|
|
@@ -85,7 +86,7 @@ var genFormItemStyle = function genFormItemStyle(token) {
|
|
|
85
86
|
'&-with-help': {
|
|
86
87
|
transition: 'none'
|
|
87
88
|
}
|
|
88
|
-
}, "&-hidden,\n &-hidden
|
|
89
|
+
}, "&-hidden,\n &-hidden".concat(antCls, "-row"), {
|
|
89
90
|
// https://github.com/ant-design/ant-design/issues/26141
|
|
90
91
|
display: 'none'
|
|
91
92
|
}), '&-has-warning', _defineProperty({}, "".concat(formItemCls, "-split"), {
|
|
@@ -159,6 +160,10 @@ var genFormItemStyle = function genFormItemStyle(token) {
|
|
|
159
160
|
maxWidth: '100%'
|
|
160
161
|
}
|
|
161
162
|
})), formItemCls, {
|
|
163
|
+
'&-additional': {
|
|
164
|
+
display: 'flex',
|
|
165
|
+
flexDirection: 'column'
|
|
166
|
+
},
|
|
162
167
|
'&-explain, &-extra': {
|
|
163
168
|
clear: 'both',
|
|
164
169
|
color: token.colorTextDescription,
|
|
@@ -205,10 +210,9 @@ var genFormItemStyle = function genFormItemStyle(token) {
|
|
|
205
210
|
}
|
|
206
211
|
})));
|
|
207
212
|
};
|
|
208
|
-
var genHorizontalStyle = function genHorizontalStyle(token) {
|
|
209
|
-
var
|
|
210
|
-
|
|
211
|
-
return _defineProperty({}, "".concat(componentCls, "-horizontal"), _defineProperty(_defineProperty(_defineProperty({}, "".concat(formItemCls, "-label"), {
|
|
213
|
+
var genHorizontalStyle = function genHorizontalStyle(token, className) {
|
|
214
|
+
var formItemCls = token.formItemCls;
|
|
215
|
+
return _defineProperty({}, "".concat(className, "-horizontal"), _defineProperty(_defineProperty(_defineProperty({}, "".concat(formItemCls, "-label"), {
|
|
212
216
|
flexGrow: 0
|
|
213
217
|
}), "".concat(formItemCls, "-control"), {
|
|
214
218
|
flex: '1 1 0',
|
|
@@ -273,17 +277,25 @@ var makeVerticalLayout = function makeVerticalLayout(token) {
|
|
|
273
277
|
var genVerticalStyle = function genVerticalStyle(token) {
|
|
274
278
|
var componentCls = token.componentCls,
|
|
275
279
|
formItemCls = token.formItemCls,
|
|
276
|
-
|
|
277
|
-
return _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(
|
|
278
|
-
'
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
280
|
+
antCls = token.antCls;
|
|
281
|
+
return _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(componentCls, "-vertical"), _defineProperty({}, "".concat(formItemCls, ":not(").concat(formItemCls, "-horizontal)"), _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(formItemCls, "-row"), {
|
|
282
|
+
flexDirection: 'column'
|
|
283
|
+
}), "".concat(formItemCls, "-label > label"), {
|
|
284
|
+
height: 'auto'
|
|
285
|
+
}), "".concat(formItemCls, "-control"), {
|
|
286
|
+
width: '100%'
|
|
287
|
+
}), "".concat(formItemCls, "-label,\n ").concat(antCls, "-col-24").concat(formItemCls, "-label,\n ").concat(antCls, "-col-xl-24").concat(formItemCls, "-label"), makeVerticalLayoutLabel(token)))), "@media (max-width: ".concat(unit(token.screenXSMax), ")"), [makeVerticalLayout(token), _defineProperty({}, componentCls, _defineProperty({}, "".concat(formItemCls, ":not(").concat(formItemCls, "-horizontal)"), _defineProperty({}, "".concat(antCls, "-col-xs-24").concat(formItemCls, "-label"), makeVerticalLayoutLabel(token))))]), "@media (max-width: ".concat(unit(token.screenSMMax), ")"), _defineProperty({}, componentCls, _defineProperty({}, "".concat(formItemCls, ":not(").concat(formItemCls, "-horizontal)"), _defineProperty({}, "".concat(antCls, "-col-sm-24").concat(formItemCls, "-label"), makeVerticalLayoutLabel(token))))), "@media (max-width: ".concat(unit(token.screenMDMax), ")"), _defineProperty({}, componentCls, _defineProperty({}, "".concat(formItemCls, ":not(").concat(formItemCls, "-horizontal)"), _defineProperty({}, "".concat(antCls, "-col-md-24").concat(formItemCls, "-label"), makeVerticalLayoutLabel(token))))), "@media (max-width: ".concat(unit(token.screenLGMax), ")"), _defineProperty({}, componentCls, _defineProperty({}, "".concat(formItemCls, ":not(").concat(formItemCls, "-horizontal)"), _defineProperty({}, "".concat(antCls, "-col-lg-24").concat(formItemCls, "-label"), makeVerticalLayoutLabel(token)))));
|
|
288
|
+
};
|
|
289
|
+
var genItemVerticalStyle = function genItemVerticalStyle(token) {
|
|
290
|
+
var formItemCls = token.formItemCls,
|
|
291
|
+
antCls = token.antCls;
|
|
292
|
+
return _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(formItemCls, "-vertical"), _defineProperty(_defineProperty(_defineProperty({}, "".concat(formItemCls, "-row"), {
|
|
293
|
+
flexDirection: 'column'
|
|
294
|
+
}), "".concat(formItemCls, "-label > label"), {
|
|
295
|
+
height: 'auto'
|
|
296
|
+
}), "".concat(formItemCls, "-control"), {
|
|
285
297
|
width: '100%'
|
|
286
|
-
}))
|
|
298
|
+
})), "".concat(formItemCls, "-vertical ").concat(formItemCls, "-label,\n ").concat(antCls, "-col-24").concat(formItemCls, "-label,\n ").concat(antCls, "-col-xl-24").concat(formItemCls, "-label"), makeVerticalLayoutLabel(token)), "@media (max-width: ".concat(unit(token.screenXSMax), ")"), [makeVerticalLayout(token), _defineProperty({}, formItemCls, _defineProperty({}, "".concat(antCls, "-col-xs-24").concat(formItemCls, "-label"), makeVerticalLayoutLabel(token)))]), "@media (max-width: ".concat(unit(token.screenSMMax), ")"), _defineProperty({}, formItemCls, _defineProperty({}, "".concat(antCls, "-col-sm-24").concat(formItemCls, "-label"), makeVerticalLayoutLabel(token)))), "@media (max-width: ".concat(unit(token.screenMDMax), ")"), _defineProperty({}, formItemCls, _defineProperty({}, "".concat(antCls, "-col-md-24").concat(formItemCls, "-label"), makeVerticalLayoutLabel(token)))), "@media (max-width: ".concat(unit(token.screenLGMax), ")"), _defineProperty({}, formItemCls, _defineProperty({}, "".concat(antCls, "-col-lg-24").concat(formItemCls, "-label"), makeVerticalLayoutLabel(token))));
|
|
287
299
|
};
|
|
288
300
|
// ============================== Export ==============================
|
|
289
301
|
export var prepareComponentToken = function prepareComponentToken(token) {
|
|
@@ -307,10 +319,10 @@ export var prepareToken = function prepareToken(token, rootPrefixCls) {
|
|
|
307
319
|
});
|
|
308
320
|
return formToken;
|
|
309
321
|
};
|
|
310
|
-
export default genStyleHooks('Form', function (token,
|
|
311
|
-
var rootPrefixCls =
|
|
322
|
+
export default genStyleHooks('Form', function (token, _ref12) {
|
|
323
|
+
var rootPrefixCls = _ref12.rootPrefixCls;
|
|
312
324
|
var formToken = prepareToken(token, rootPrefixCls);
|
|
313
|
-
return [genFormStyle(formToken), genFormItemStyle(formToken), genFormValidateMotionStyle(formToken), genHorizontalStyle(formToken), genInlineStyle(formToken), genVerticalStyle(formToken), genCollapseMotion(formToken), zoomIn];
|
|
325
|
+
return [genFormStyle(formToken), genFormItemStyle(formToken), genFormValidateMotionStyle(formToken), genHorizontalStyle(formToken, formToken.componentCls), genHorizontalStyle(formToken, formToken.formItemCls), genInlineStyle(formToken), genVerticalStyle(formToken), genItemVerticalStyle(formToken), genCollapseMotion(formToken), zoomIn];
|
|
314
326
|
}, prepareComponentToken, {
|
|
315
327
|
// Let From style before the Grid
|
|
316
328
|
// ref https://github.com/ant-design/ant-design/issues/44386
|
package/lib/Antd5/grid/row.js
CHANGED
|
@@ -20,8 +20,8 @@ import useResponsiveObserver, { responsiveArray } from '../_util/responsiveObser
|
|
|
20
20
|
import { ConfigContext } from '../config-provider';
|
|
21
21
|
import RowContext from './RowContext';
|
|
22
22
|
import { useRowStyle } from './style';
|
|
23
|
-
var
|
|
24
|
-
var
|
|
23
|
+
var _RowAligns = ['top', 'middle', 'bottom', 'stretch'];
|
|
24
|
+
var _RowJustify = ['start', 'end', 'center', 'space-around', 'space-between', 'space-evenly'];
|
|
25
25
|
function useMergedPropByScreen(oriProp, screen) {
|
|
26
26
|
var _React$useState = React.useState(typeof oriProp === 'string' ? oriProp : ''),
|
|
27
27
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
package/lib/Antd5/image/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
var _excluded = ["prefixCls", "preview", "className", "rootClassName", "style"],
|
|
2
|
-
_excluded2 = ["getContainer", "closeIcon"];
|
|
2
|
+
_excluded2 = ["getContainer", "closeIcon", "rootClassName"];
|
|
3
3
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4
4
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5
5
|
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
@@ -63,6 +63,7 @@ var Image = function Image(props) {
|
|
|
63
63
|
var _preview = _typeof(preview) === 'object' ? preview : {};
|
|
64
64
|
var getContainer = _preview.getContainer,
|
|
65
65
|
closeIcon = _preview.closeIcon,
|
|
66
|
+
rootClassName = _preview.rootClassName,
|
|
66
67
|
restPreviewProps = _objectWithoutProperties(_preview, _excluded2);
|
|
67
68
|
return _objectSpread(_objectSpread({
|
|
68
69
|
mask: _jsxs("div", {
|
|
@@ -71,6 +72,7 @@ var Image = function Image(props) {
|
|
|
71
72
|
}),
|
|
72
73
|
icons: icons
|
|
73
74
|
}, restPreviewProps), {}, {
|
|
75
|
+
rootClassName: classNames(mergedRootClassName, rootClassName),
|
|
74
76
|
getContainer: getContainer !== null && getContainer !== void 0 ? getContainer : getContextPopupContainer,
|
|
75
77
|
transitionName: getTransitionName(rootPrefixCls, 'zoom', _preview.transitionName),
|
|
76
78
|
maskTransitionName: getTransitionName(rootPrefixCls, 'fade', _preview.maskTransitionName),
|
|
@@ -62,13 +62,13 @@ export var genPreviewOperationsStyle = function genPreviewOperationsStyle(token)
|
|
|
62
62
|
bottom: marginXL,
|
|
63
63
|
left: {
|
|
64
64
|
_skip_check_: true,
|
|
65
|
-
value:
|
|
65
|
+
value: '50%'
|
|
66
66
|
},
|
|
67
|
-
width: '100%',
|
|
68
67
|
display: 'flex',
|
|
69
68
|
flexDirection: 'column',
|
|
70
69
|
alignItems: 'center',
|
|
71
|
-
color: token.previewOperationColor
|
|
70
|
+
color: token.previewOperationColor,
|
|
71
|
+
transform: 'translateX(-50%)'
|
|
72
72
|
}), "".concat(previewCls, "-progress"), {
|
|
73
73
|
marginBottom: margin
|
|
74
74
|
}), "".concat(previewCls, "-close"), _defineProperty({
|
|
@@ -125,12 +125,10 @@ export var genPreviewSwitchStyle = function genPreviewSwitchStyle(token) {
|
|
|
125
125
|
motionDurationSlow = token.motionDurationSlow;
|
|
126
126
|
var operationBg = new TinyColor(modalMaskBg).setAlpha(0.1);
|
|
127
127
|
var operationBgHover = operationBg.clone().setAlpha(0.2);
|
|
128
|
-
return _defineProperty(_defineProperty(_defineProperty({}, "".concat(previewCls, "-switch-left, ").concat(previewCls, "-switch-right"), _defineProperty(
|
|
128
|
+
return _defineProperty(_defineProperty(_defineProperty({}, "".concat(previewCls, "-switch-left, ").concat(previewCls, "-switch-right"), _defineProperty({
|
|
129
129
|
position: 'fixed',
|
|
130
130
|
insetBlockStart: '50%',
|
|
131
|
-
zIndex: token.calc(zIndexPopup).add(1).equal(
|
|
132
|
-
unit: false
|
|
133
|
-
}),
|
|
131
|
+
zIndex: token.calc(zIndexPopup).add(1).equal(),
|
|
134
132
|
display: 'flex',
|
|
135
133
|
alignItems: 'center',
|
|
136
134
|
justifyContent: 'center',
|
|
@@ -146,16 +144,17 @@ export var genPreviewSwitchStyle = function genPreviewSwitchStyle(token) {
|
|
|
146
144
|
userSelect: 'none',
|
|
147
145
|
'&:hover': {
|
|
148
146
|
background: operationBgHover.toRgbString()
|
|
147
|
+
},
|
|
148
|
+
'&-disabled': {
|
|
149
|
+
'&, &:hover': _defineProperty({
|
|
150
|
+
color: previewOperationColorDisabled,
|
|
151
|
+
background: 'transparent',
|
|
152
|
+
cursor: 'not-allowed'
|
|
153
|
+
}, "> ".concat(iconCls), {
|
|
154
|
+
cursor: 'not-allowed'
|
|
155
|
+
})
|
|
149
156
|
}
|
|
150
|
-
}, "
|
|
151
|
-
'&, &:hover': _defineProperty({
|
|
152
|
-
color: previewOperationColorDisabled,
|
|
153
|
-
background: 'transparent',
|
|
154
|
-
cursor: 'not-allowed'
|
|
155
|
-
}, "> ".concat(iconCls), {
|
|
156
|
-
cursor: 'not-allowed'
|
|
157
|
-
})
|
|
158
|
-
}), "> ".concat(iconCls), {
|
|
157
|
+
}, "> ".concat(iconCls), {
|
|
159
158
|
fontSize: token.previewOperationSize
|
|
160
159
|
})), "".concat(previewCls, "-switch-left"), {
|
|
161
160
|
insetInlineStart: token.marginSM
|
|
@@ -212,9 +211,7 @@ export var genImagePreviewStyle = function genImagePreviewStyle(token) {
|
|
|
212
211
|
})), // Preview operations & switch
|
|
213
212
|
_defineProperty(_defineProperty({}, "".concat(componentCls, "-preview-operations-wrapper"), {
|
|
214
213
|
position: 'fixed',
|
|
215
|
-
zIndex: token.calc(token.zIndexPopup).add(1).equal(
|
|
216
|
-
unit: false
|
|
217
|
-
})
|
|
214
|
+
zIndex: token.calc(token.zIndexPopup).add(1).equal()
|
|
218
215
|
}), '&', [genPreviewOperationsStyle(token), genPreviewSwitchStyle(token)])];
|
|
219
216
|
};
|
|
220
217
|
var genImageStyle = function genImageStyle(token) {
|
|
@@ -238,7 +235,7 @@ var genImageStyle = function genImageStyle(token) {
|
|
|
238
235
|
};
|
|
239
236
|
var genPreviewMotion = function genPreviewMotion(token) {
|
|
240
237
|
var previewCls = token.previewCls;
|
|
241
|
-
return _defineProperty(_defineProperty({}, "".concat(previewCls, "-root"), initZoomMotion(token, 'zoom')),
|
|
238
|
+
return _defineProperty(_defineProperty({}, "".concat(previewCls, "-root"), initZoomMotion(token, 'zoom')), '&', initFadeMotion(token, true));
|
|
242
239
|
};
|
|
243
240
|
// ============================== Export ==============================
|
|
244
241
|
export var prepareComponentToken = function prepareComponentToken(token) {
|
package/lib/Antd5/index.js
CHANGED
|
@@ -69,4 +69,5 @@ export { default as TreeSelect } from './tree-select';
|
|
|
69
69
|
export { default as Typography } from './typography';
|
|
70
70
|
export { default as Upload } from './upload';
|
|
71
71
|
export { default as version } from './version';
|
|
72
|
-
export { default as Watermark } from './watermark';
|
|
72
|
+
export { default as Watermark } from './watermark';
|
|
73
|
+
export { default as Splitter } from './splitter';
|