@chaoswise/ui 3.1.6 → 3.1.8
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/PurePanel.js +9 -1
- package/lib/Antd5/_util/convertToTooltipProps.js +15 -0
- package/lib/Antd5/_util/extendsObject.js +14 -23
- package/lib/Antd5/_util/hooks/useClosable.js +25 -31
- package/lib/Antd5/_util/hooks/useMergeSemantic/index.js +89 -0
- package/lib/Antd5/_util/hooks/useMergeSemantic/interface.js +1 -0
- package/lib/Antd5/_util/isPrimitive.js +5 -0
- package/lib/Antd5/_util/mediaQueryUtil.js +16 -0
- package/lib/Antd5/_util/responsiveObserver.js +41 -33
- package/lib/Antd5/_util/toList.js +6 -3
- package/lib/Antd5/_util/warning.js +0 -1
- package/lib/Antd5/_util/wave/WaveEffect.js +29 -16
- package/lib/Antd5/_util/wave/index.js +2 -2
- package/lib/Antd5/_util/wave/useWave.js +1 -1
- package/lib/Antd5/affix/index.js +13 -11
- package/lib/Antd5/alert/Alert.js +19 -18
- package/lib/Antd5/anchor/Anchor.js +9 -7
- package/lib/Antd5/anchor/AnchorLink.js +16 -3
- package/lib/Antd5/app/App.js +90 -0
- package/lib/Antd5/app/index.js +3 -92
- package/lib/Antd5/app/useApp.js +6 -0
- package/lib/Antd5/auto-complete/AutoComplete.js +142 -0
- package/lib/Antd5/auto-complete/index.js +8 -106
- package/lib/Antd5/avatar/{avatar.js → Avatar.js} +25 -29
- package/lib/Antd5/avatar/{group.js → AvatarGroup.js} +14 -9
- package/lib/Antd5/avatar/index.js +3 -4
- package/lib/Antd5/breadcrumb/Breadcrumb.js +1 -0
- package/lib/Antd5/breadcrumb/style/index.js +1 -1
- package/lib/Antd5/button/{LoadingIcon.js → DefaultLoadingIcon.js} +12 -9
- package/lib/Antd5/button/button-group.js +11 -11
- package/lib/Antd5/button/button.js +60 -26
- package/lib/Antd5/button/buttonHelpers.js +8 -1
- package/lib/Antd5/button/style/compact.js +9 -10
- package/lib/Antd5/button/style/index.js +127 -41
- package/lib/Antd5/button/style/token.js +19 -8
- package/lib/Antd5/calendar/Header.js +4 -4
- package/lib/Antd5/calendar/generateCalendar.js +17 -12
- package/lib/Antd5/calendar/style/index.js +8 -2
- package/lib/Antd5/card/Card.js +9 -5
- package/lib/Antd5/card/style/index.js +22 -15
- package/lib/Antd5/carousel/index.js +21 -11
- package/lib/Antd5/carousel/style/index.js +39 -12
- package/lib/Antd5/cascader/index.js +54 -18
- package/lib/Antd5/cascader/style/columns.js +4 -2
- package/lib/Antd5/cascader/style/index.js +2 -1
- package/lib/Antd5/collapse/Collapse.js +32 -25
- package/lib/Antd5/collapse/style/index.js +14 -10
- package/lib/Antd5/color-picker/ColorPicker.js +13 -8
- package/lib/Antd5/color-picker/components/ColorAlphaInput.js +8 -13
- package/lib/Antd5/color-picker/components/ColorHexInput.js +1 -1
- package/lib/Antd5/color-picker/components/ColorHsbInput.js +8 -13
- package/lib/Antd5/color-picker/components/ColorInput.js +7 -7
- package/lib/Antd5/color-picker/components/ColorPresets.js +15 -12
- package/lib/Antd5/color-picker/components/ColorRgbInput.js +8 -13
- package/lib/Antd5/color-picker/components/ColorSteppers.js +6 -13
- package/lib/Antd5/color-picker/interface.js +3 -6
- package/lib/Antd5/color-picker/style/color-block.js +2 -1
- package/lib/Antd5/config-provider/MotionWrapper.js +12 -4
- package/lib/Antd5/config-provider/UnstableContext.js +29 -0
- package/lib/Antd5/config-provider/context.js +32 -2
- package/lib/Antd5/config-provider/cssVariables.js +7 -7
- package/lib/Antd5/config-provider/hooks/useSize.js +1 -1
- package/lib/Antd5/config-provider/index.js +12 -3
- package/lib/Antd5/date-picker/generatePicker/generateRangePicker.js +33 -12
- package/lib/Antd5/date-picker/generatePicker/generateSinglePicker.js +32 -13
- package/lib/Antd5/date-picker/hooks/useMergedPickerSemantic.js +47 -0
- package/lib/Antd5/date-picker/index.js +2 -2
- package/lib/Antd5/date-picker/locale/ar_EG.js +1 -8
- package/lib/Antd5/date-picker/locale/example.json +5 -8
- package/lib/Antd5/date-picker/locale/ko_KR.js +11 -1
- package/lib/Antd5/date-picker/locale/pl_PL.js +0 -3
- package/lib/Antd5/date-picker/locale/pt_PT.js +0 -3
- package/lib/Antd5/date-picker/locale/sl_SI.js +1 -3
- package/lib/Antd5/date-picker/style/index.js +9 -6
- package/lib/Antd5/date-picker/style/panel.js +12 -8
- package/lib/Antd5/date-picker/style/token.js +3 -3
- package/lib/Antd5/date-picker/style/variants.js +6 -2
- package/lib/Antd5/descriptions/Cell.js +14 -8
- package/lib/Antd5/descriptions/Item.js +2 -0
- package/lib/Antd5/descriptions/Row.js +10 -6
- package/lib/Antd5/descriptions/hooks/useRow.js +1 -1
- package/lib/Antd5/descriptions/index.js +45 -18
- package/lib/Antd5/descriptions/style/index.js +11 -2
- package/lib/Antd5/divider/index.js +32 -15
- package/lib/Antd5/divider/style/index.js +20 -7
- package/lib/Antd5/drawer/DrawerPanel.js +8 -10
- package/lib/Antd5/drawer/index.js +20 -17
- package/lib/Antd5/dropdown/dropdown-button.js +9 -3
- package/lib/Antd5/dropdown/dropdown.js +33 -35
- package/lib/Antd5/dropdown/style/index.js +1 -1
- package/lib/Antd5/empty/empty.js +2 -2
- package/lib/Antd5/empty/index.js +41 -23
- package/lib/Antd5/empty/simple.js +4 -4
- package/lib/Antd5/flex/style/index.js +2 -0
- package/lib/Antd5/float-button/FloatButton.js +12 -15
- package/lib/Antd5/float-button/FloatButtonContent.js +13 -7
- package/lib/Antd5/float-button/FloatButtonGroup.js +6 -6
- package/lib/Antd5/float-button/style/keyframes.js +4 -4
- package/lib/Antd5/form/ErrorList.js +1 -3
- package/lib/Antd5/form/Form.js +19 -19
- package/lib/Antd5/form/FormItem/index.js +1 -1
- package/lib/Antd5/form/FormItemLabel.js +12 -14
- package/lib/Antd5/form/context.js +3 -4
- package/lib/Antd5/form/hooks/useForm.js +16 -5
- package/lib/Antd5/form/hooks/useFormInstance.js +3 -3
- package/lib/Antd5/form/hooks/useFormItemStatus.js +7 -7
- package/lib/Antd5/form/hooks/useFormWarning.js +2 -2
- package/lib/Antd5/form/hooks/useFrameState.js +3 -4
- package/lib/Antd5/form/hooks/useItemRef.js +3 -2
- package/lib/Antd5/form/hooks/useVariants.js +5 -5
- package/lib/Antd5/form/style/index.js +22 -15
- package/lib/Antd5/grid/hooks/useBreakpoint.js +2 -1
- package/lib/Antd5/grid/hooks/useGutter.js +29 -0
- package/lib/Antd5/grid/row.js +8 -63
- package/lib/Antd5/grid/style/index.js +14 -8
- package/lib/Antd5/image/PreviewGroup.js +9 -2
- package/lib/Antd5/image/index.js +26 -17
- package/lib/Antd5/image/style/index.js +10 -10
- package/lib/Antd5/index.js +3 -1
- package/lib/Antd5/input/Group.js +5 -3
- package/lib/Antd5/input/Input.js +27 -20
- package/lib/Antd5/input/OTP/OTPInput.js +36 -19
- package/lib/Antd5/input/OTP/index.js +40 -19
- package/lib/Antd5/input/Password.js +7 -9
- package/lib/Antd5/input/Search.js +16 -9
- package/lib/Antd5/input/TextArea.js +90 -33
- package/lib/Antd5/input/style/index.js +31 -82
- package/lib/Antd5/input/style/otp.js +22 -6
- package/lib/Antd5/input/style/textarea.js +80 -0
- package/lib/Antd5/input/style/token.js +16 -7
- package/lib/Antd5/input/style/variants.js +67 -12
- package/lib/Antd5/input-number/index.js +1 -1
- package/lib/Antd5/input-number/style/index.js +10 -7
- package/lib/Antd5/input-number/style/token.js +6 -4
- package/lib/Antd5/layout/Sider.js +58 -68
- package/lib/Antd5/layout/layout.js +7 -5
- package/lib/Antd5/layout/style/sider.js +33 -42
- package/lib/Antd5/list/index.js +45 -45
- package/lib/Antd5/locale/ar_EG.js +7 -1
- package/lib/Antd5/locale/az_AZ.js +3 -2
- package/lib/Antd5/locale/bg_BG.js +8 -0
- package/lib/Antd5/locale/bn_BD.js +7 -1
- package/lib/Antd5/locale/by_BY.js +8 -2
- package/lib/Antd5/locale/ca_ES.js +7 -1
- package/lib/Antd5/locale/cs_CZ.js +19 -2
- package/lib/Antd5/locale/da_DK.js +8 -0
- package/lib/Antd5/locale/de_DE.js +4 -2
- package/lib/Antd5/locale/el_GR.js +3 -2
- package/lib/Antd5/locale/en_GB.js +8 -2
- package/lib/Antd5/locale/en_US.js +3 -2
- package/lib/Antd5/locale/es_ES.js +3 -2
- package/lib/Antd5/locale/et_EE.js +8 -2
- package/lib/Antd5/locale/eu_ES.js +3 -2
- package/lib/Antd5/locale/fa_IR.js +17 -7
- package/lib/Antd5/locale/fi_FI.js +8 -0
- package/lib/Antd5/locale/fr_BE.js +4 -1
- package/lib/Antd5/locale/fr_CA.js +9 -1
- package/lib/Antd5/locale/fr_FR.js +4 -1
- package/lib/Antd5/locale/ga_IE.js +7 -1
- package/lib/Antd5/locale/gl_ES.js +7 -1
- package/lib/Antd5/locale/he_IL.js +10 -1
- package/lib/Antd5/locale/hi_IN.js +7 -1
- package/lib/Antd5/locale/hr_HR.js +7 -1
- package/lib/Antd5/locale/hu_HU.js +8 -0
- package/lib/Antd5/locale/hy_AM.js +8 -3
- package/lib/Antd5/locale/id_ID.js +3 -2
- package/lib/Antd5/locale/is_IS.js +8 -0
- package/lib/Antd5/locale/it_IT.js +3 -2
- package/lib/Antd5/locale/ja_JP.js +3 -2
- package/lib/Antd5/locale/ka_GE.js +7 -1
- package/lib/Antd5/locale/kk_KZ.js +7 -1
- package/lib/Antd5/locale/km_KH.js +3 -0
- package/lib/Antd5/locale/kmr_IQ.js +8 -0
- package/lib/Antd5/locale/kn_IN.js +8 -2
- package/lib/Antd5/locale/ko_KR.js +3 -2
- package/lib/Antd5/locale/ku_IQ.js +8 -0
- package/lib/Antd5/locale/lt_LT.js +3 -2
- package/lib/Antd5/locale/lv_LV.js +8 -0
- package/lib/Antd5/locale/mk_MK.js +7 -1
- package/lib/Antd5/locale/ml_IN.js +7 -1
- package/lib/Antd5/locale/mn_MN.js +8 -2
- package/lib/Antd5/locale/ms_MY.js +3 -2
- package/lib/Antd5/locale/my_MM.js +3 -2
- package/lib/Antd5/locale/nb_NO.js +7 -1
- package/lib/Antd5/locale/ne_NP.js +3 -2
- package/lib/Antd5/locale/nl_BE.js +2 -1
- package/lib/Antd5/locale/nl_NL.js +2 -1
- package/lib/Antd5/locale/pl_PL.js +3 -2
- package/lib/Antd5/locale/pt_BR.js +3 -2
- package/lib/Antd5/locale/pt_PT.js +3 -2
- package/lib/Antd5/locale/ro_RO.js +7 -1
- package/lib/Antd5/locale/ru_RU.js +4 -3
- package/lib/Antd5/locale/si_LK.js +8 -2
- package/lib/Antd5/locale/sk_SK.js +8 -2
- package/lib/Antd5/locale/sl_SI.js +8 -0
- package/lib/Antd5/locale/sr_RS.js +7 -1
- package/lib/Antd5/locale/sv_SE.js +3 -2
- package/lib/Antd5/locale/ta_IN.js +8 -2
- package/lib/Antd5/locale/th_TH.js +3 -2
- package/lib/Antd5/locale/tk_TK.js +7 -1
- package/lib/Antd5/locale/tr_TR.js +8 -2
- package/lib/Antd5/locale/uk_UA.js +3 -2
- package/lib/Antd5/locale/ur_PK.js +7 -1
- package/lib/Antd5/locale/uz_UZ.js +5 -4
- package/lib/Antd5/locale/vi_VN.js +3 -2
- package/lib/Antd5/locale/zh_CN.js +3 -2
- package/lib/Antd5/locale/zh_HK.js +11 -3
- package/lib/Antd5/locale/zh_TW.js +11 -3
- package/lib/Antd5/mentions/index.js +1 -1
- package/lib/Antd5/mentions/style/index.js +12 -7
- package/lib/Antd5/menu/MenuItem.js +3 -1
- package/lib/Antd5/menu/OverrideContext.js +2 -2
- package/lib/Antd5/menu/menu.js +1 -7
- package/lib/Antd5/menu/style/index.js +9 -6
- package/lib/Antd5/menu/style/theme.js +4 -3
- package/lib/Antd5/menu/style/vertical.js +1 -1
- package/lib/Antd5/message/style/index.js +4 -3
- package/lib/Antd5/modal/ConfirmDialog.js +2 -19
- package/lib/Antd5/modal/Modal.js +67 -35
- package/lib/Antd5/modal/confirm.js +5 -3
- package/lib/Antd5/modal/style/confirm.js +3 -1
- package/lib/Antd5/modal/style/index.js +21 -1
- package/lib/Antd5/modal/useModal/HookModal.js +2 -1
- package/lib/Antd5/notification/PurePanel.js +13 -6
- package/lib/Antd5/notification/index.js +3 -4
- package/lib/Antd5/notification/style/index.js +4 -3
- package/lib/Antd5/notification/style/stack.js +2 -1
- package/lib/Antd5/notification/useNotification.js +9 -4
- package/lib/Antd5/notification/util.js +9 -0
- package/lib/Antd5/pagination/Pagination.js +87 -20
- package/lib/Antd5/pagination/style/index.js +2 -10
- package/lib/Antd5/pagination/useShowSizeChanger.js +13 -0
- package/lib/Antd5/popconfirm/index.js +21 -6
- package/lib/Antd5/popover/index.js +21 -8
- package/lib/Antd5/progress/Steps.js +6 -2
- package/lib/Antd5/progress/progress.js +2 -2
- package/lib/Antd5/progress/utils.js +3 -3
- package/lib/Antd5/qr-code/style/index.js +2 -2
- package/lib/Antd5/segmented/index.js +16 -8
- package/lib/Antd5/segmented/style/index.js +14 -6
- package/lib/Antd5/select/index.js +45 -16
- package/lib/Antd5/select/style/dropdown.js +10 -9
- package/lib/Antd5/select/style/index.js +14 -10
- package/lib/Antd5/select/style/single.js +6 -3
- package/lib/Antd5/select/style/variants.js +55 -1
- package/lib/Antd5/skeleton/Paragraph.js +5 -8
- package/lib/Antd5/skeleton/Skeleton.js +8 -7
- package/lib/Antd5/slider/SliderTooltip.js +3 -2
- package/lib/Antd5/slider/index.js +43 -17
- package/lib/Antd5/slider/style/index.js +3 -3
- package/lib/Antd5/slider/useRafLock.js +1 -1
- package/lib/Antd5/space/Compact.js +8 -6
- package/lib/Antd5/space/index.js +16 -12
- package/lib/Antd5/spin/index.js +11 -9
- package/lib/Antd5/spin/style/index.js +1 -3
- package/lib/Antd5/spin/usePercent.js +1 -1
- package/lib/Antd5/splitter/SplitBar.js +56 -7
- package/lib/Antd5/splitter/Splitter.js +27 -17
- package/lib/Antd5/splitter/hooks/useResizable.js +3 -3
- package/lib/Antd5/splitter/hooks/useResize.js +17 -6
- package/lib/Antd5/splitter/style/index.js +32 -6
- package/lib/Antd5/statistic/Countdown.js +8 -61
- package/lib/Antd5/statistic/Statistic.js +17 -9
- package/lib/Antd5/statistic/Timer.js +91 -0
- package/lib/Antd5/statistic/index.js +2 -0
- package/lib/Antd5/statistic/utils.js +2 -2
- package/lib/Antd5/steps/index.js +8 -7
- package/lib/Antd5/steps/style/index.js +1 -1
- package/lib/Antd5/style/index.js +9 -4
- package/lib/Antd5/switch/style/index.js +2 -2
- package/lib/Antd5/table/InternalTable.js +6 -5
- package/lib/Antd5/table/hooks/useFilter/FilterDropdown.js +15 -11
- package/lib/Antd5/table/hooks/useFilter/FilterSearch.js +1 -1
- package/lib/Antd5/table/hooks/useFilter/index.js +3 -2
- package/lib/Antd5/table/hooks/useSelection.js +11 -3
- package/lib/Antd5/table/hooks/useSorter.js +4 -3
- package/lib/Antd5/table/style/filter.js +2 -2
- package/lib/Antd5/table/style/index.js +9 -9
- package/lib/Antd5/table/style/sorter.js +2 -1
- package/lib/Antd5/table/style/sticky.js +1 -1
- package/lib/Antd5/tabs/hooks/useLegacyItems.js +11 -4
- package/lib/Antd5/tabs/index.js +9 -2
- package/lib/Antd5/tabs/style/index.js +44 -23
- package/lib/Antd5/tag/style/index.js +3 -3
- package/lib/Antd5/theme/context.js +1 -3
- package/lib/Antd5/theme/getDesignToken.js +2 -2
- package/lib/Antd5/theme/themes/dark/colorAlgorithm.js +3 -3
- package/lib/Antd5/theme/themes/dark/index.js +13 -3
- package/lib/Antd5/theme/themes/default/colorAlgorithm.js +3 -3
- package/lib/Antd5/theme/themes/default/index.js +5 -1
- package/lib/Antd5/theme/themes/default/theme.js +4 -0
- package/lib/Antd5/theme/themes/shared/genColorMapToken.js +3 -3
- package/lib/Antd5/theme/themes/shared/genFontSizes.js +3 -1
- package/lib/Antd5/theme/util/alias.js +2 -2
- package/lib/Antd5/theme/util/genStyleUtils.js +9 -11
- package/lib/Antd5/theme/util/getAlphaColor.js +12 -12
- package/lib/Antd5/theme/util/useResetIconStyle.js +2 -10
- package/lib/Antd5/time-picker/index.js +1 -1
- package/lib/Antd5/timeline/TimelineItemList.js +1 -1
- package/lib/Antd5/tooltip/index.js +46 -31
- package/lib/Antd5/tooltip/style/index.js +13 -4
- package/lib/Antd5/tour/index.js +4 -2
- package/lib/Antd5/tour/panelRender.js +42 -27
- package/lib/Antd5/tour/style/index.js +3 -3
- package/lib/Antd5/transfer/ListItem.js +1 -1
- package/lib/Antd5/transfer/hooks/useData.js +8 -4
- package/lib/Antd5/transfer/hooks/useSelection.js +5 -4
- package/lib/Antd5/transfer/index.js +6 -2
- package/lib/Antd5/transfer/list.js +32 -13
- package/lib/Antd5/transfer/search.js +1 -1
- package/lib/Antd5/transfer/style/index.js +3 -1
- package/lib/Antd5/tree/DirectoryTree.js +2 -2
- package/lib/Antd5/tree/style/index.js +9 -3
- package/lib/Antd5/tree-select/index.js +61 -18
- package/lib/Antd5/tree-select/style/index.js +1 -1
- package/lib/Antd5/typography/Base/Ellipsis.js +3 -3
- package/lib/Antd5/typography/Base/index.js +20 -13
- package/lib/Antd5/typography/Editable.js +1 -1
- package/lib/Antd5/typography/Typography.js +8 -7
- package/lib/Antd5/typography/hooks/useCopyClick.js +24 -25
- package/lib/Antd5/typography/hooks/usePrevious.js +1 -1
- package/lib/Antd5/typography/style/index.js +5 -5
- package/lib/Antd5/typography/style/mixins.js +1 -1
- package/lib/Antd5/upload/Upload.js +22 -24
- package/lib/Antd5/version/index.js +0 -1
- package/lib/Antd5/version/token-meta.json +1 -0
- package/lib/Antd5/version/token.json +1 -0
- package/lib/Antd5/version/version.js +1 -1
- package/lib/Antd5/watermark/context.js +1 -1
- package/lib/Antd5/watermark/index.js +20 -13
- package/lib/Antd5/watermark/useClips.js +18 -16
- package/lib/Antd5/watermark/useRafDebounce.js +1 -1
- package/lib/Antd5/watermark/useSingletonCache.js +19 -0
- package/lib/Antd5/watermark/useWatermark.js +9 -18
- package/lib/CWCascader/rc-cascader/OptionList/Column.js +17 -18
- package/lib/CWMessage/MessageContent/TabList/index.js +10 -10
- package/lib/CWMessage/MessageContent/index.js +26 -28
- package/lib/CWMessage/index.js +42 -46
- package/lib/CWRangePicker/index.js +15 -15
- package/lib/CWRangePicker/utils/generate/dayjs.js +112 -23
- package/lib/CWRangePicker/utils/generate/moment.js +109 -21
- package/lib/CWSelect/index.js +423 -150
- package/lib/CWTable/CWTable.js +11 -11
- package/lib/Joyride/index.js +3 -3
- package/lib/ModuleFederation/react-dynamic-remote-component/RemoteComponent.js +38 -39
- package/lib/ModuleFederation/react-dynamic-remote-component/load-module.js +22 -23
- package/lib/QuickTransfer/index.js +13 -13
- package/lib/SearchBar/index.js +7 -7
- package/lib/SingleSpa/index.js +22 -24
- package/lib/TimeRangeSlider/TimeRangeSliderCmp/hooks/useMouse.js +3 -3
- package/lib/TimeRangeSlider/index.js +6 -6
- package/lib/TimeRangeSlider/utils/generate/dayjs.js +109 -20
- package/lib/TimeRangeSlider/utils/generate/moment.js +109 -20
- package/lib/TimeZoneSelect/index.js +21 -22
- package/package.json +35 -34
- package/lib/Antd5/_util/isNumeric.js +0 -4
- package/lib/Antd5/pagination/Select.js +0 -24
|
@@ -5,7 +5,7 @@ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object
|
|
|
5
5
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
6
6
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
7
|
import { unit } from '@ant-design/cssinjs';
|
|
8
|
-
import {
|
|
8
|
+
import { FastColor } from '@ant-design/fast-color';
|
|
9
9
|
import { clearFix, resetComponent, resetIcon } from '../../style';
|
|
10
10
|
import { genCollapseMotion, initSlideMotion, initZoomMotion } from '../../style/motion';
|
|
11
11
|
import { genStyleHooks, mergeToken } from '../../theme/internal';
|
|
@@ -47,7 +47,9 @@ var genMenuItemStyle = function genMenuItemStyle(token) {
|
|
|
47
47
|
borderColor: 'transparent !important'
|
|
48
48
|
},
|
|
49
49
|
a: {
|
|
50
|
-
color: 'inherit !important'
|
|
50
|
+
color: 'inherit !important',
|
|
51
|
+
cursor: 'not-allowed',
|
|
52
|
+
pointerEvents: 'none'
|
|
51
53
|
}
|
|
52
54
|
}, "> ".concat(componentCls, "-submenu-title"), {
|
|
53
55
|
color: 'inherit !important',
|
|
@@ -169,8 +171,7 @@ var getBaseStyle = function getBaseStyle(token) {
|
|
|
169
171
|
verticalAlign: 'unset'
|
|
170
172
|
}), "".concat(componentCls, "-item-extra"), {
|
|
171
173
|
marginInlineStart: 'auto',
|
|
172
|
-
paddingInlineStart: token.padding
|
|
173
|
-
fontSize: token.fontSizeSM
|
|
174
|
+
paddingInlineStart: token.padding
|
|
174
175
|
})), "".concat(componentCls, "-item a"), {
|
|
175
176
|
'&::before': {
|
|
176
177
|
position: 'absolute',
|
|
@@ -285,7 +286,7 @@ export var prepareComponentToken = function prepareComponentToken(token) {
|
|
|
285
286
|
var activeBarWidth = (_token$activeBarWidth = token.activeBarWidth) !== null && _token$activeBarWidth !== void 0 ? _token$activeBarWidth : 0;
|
|
286
287
|
var activeBarBorderWidth = (_token$activeBarBorde = token.activeBarBorderWidth) !== null && _token$activeBarBorde !== void 0 ? _token$activeBarBorde : lineWidth;
|
|
287
288
|
var itemMarginInline = (_token$itemMarginInli = token.itemMarginInline) !== null && _token$itemMarginInli !== void 0 ? _token$itemMarginInli : token.marginXXS;
|
|
288
|
-
var colorTextDark = new
|
|
289
|
+
var colorTextDark = new FastColor(colorTextLightSolid).setA(0.65).toRgbString();
|
|
289
290
|
return {
|
|
290
291
|
dropdownWidth: 160,
|
|
291
292
|
zIndexPopup: token.zIndexPopupBase + 50,
|
|
@@ -303,6 +304,7 @@ export var prepareComponentToken = function prepareComponentToken(token) {
|
|
|
303
304
|
groupTitleColor: colorTextDescription,
|
|
304
305
|
colorItemTextSelected: colorPrimary,
|
|
305
306
|
itemSelectedColor: colorPrimary,
|
|
307
|
+
subMenuItemSelectedColor: colorPrimary,
|
|
306
308
|
colorItemTextSelectedHorizontal: colorPrimary,
|
|
307
309
|
horizontalItemSelectedColor: colorPrimary,
|
|
308
310
|
colorItemBg: colorBgContainer,
|
|
@@ -352,7 +354,7 @@ export var prepareComponentToken = function prepareComponentToken(token) {
|
|
|
352
354
|
collapsedIconSize: fontSizeLG,
|
|
353
355
|
groupTitleFontSize: fontSize,
|
|
354
356
|
// Disabled
|
|
355
|
-
darkItemDisabledColor: new
|
|
357
|
+
darkItemDisabledColor: new FastColor(colorTextLightSolid).setA(0.25).toRgbString(),
|
|
356
358
|
// Dark
|
|
357
359
|
darkItemColor: colorTextDark,
|
|
358
360
|
darkDangerItemColor: colorError,
|
|
@@ -411,6 +413,7 @@ export default (function (prefixCls) {
|
|
|
411
413
|
itemHoverColor: darkItemHoverColor,
|
|
412
414
|
groupTitleColor: darkGroupTitleColor,
|
|
413
415
|
itemSelectedColor: darkItemSelectedColor,
|
|
416
|
+
subMenuItemSelectedColor: darkItemSelectedColor,
|
|
414
417
|
itemBg: darkItemBg,
|
|
415
418
|
popupBg: darkPopupBg,
|
|
416
419
|
subMenuItemBg: darkSubMenuItemBg,
|
|
@@ -14,6 +14,7 @@ var getThemeStyle = function getThemeStyle(token, themeSuffix) {
|
|
|
14
14
|
var componentCls = token.componentCls,
|
|
15
15
|
itemColor = token.itemColor,
|
|
16
16
|
itemSelectedColor = token.itemSelectedColor,
|
|
17
|
+
subMenuItemSelectedColor = token.subMenuItemSelectedColor,
|
|
17
18
|
groupTitleColor = token.groupTitleColor,
|
|
18
19
|
itemBg = token.itemBg,
|
|
19
20
|
subMenuItemBg = token.subMenuItemBg,
|
|
@@ -50,9 +51,9 @@ var getThemeStyle = function getThemeStyle(token, themeSuffix) {
|
|
|
50
51
|
'&-group-title, &-extra': {
|
|
51
52
|
color: groupTitleColor
|
|
52
53
|
}
|
|
53
|
-
}), "".concat(componentCls, "-submenu-selected
|
|
54
|
-
color:
|
|
55
|
-
})
|
|
54
|
+
}), "".concat(componentCls, "-submenu-selected > ").concat(componentCls, "-submenu-title"), {
|
|
55
|
+
color: subMenuItemSelectedColor
|
|
56
|
+
}), "".concat(componentCls, "-item, ").concat(componentCls, "-submenu-title"), _defineProperty({
|
|
56
57
|
color: itemColor
|
|
57
58
|
}, "&:not(".concat(componentCls, "-item-disabled):focus-visible"), _objectSpread({}, accessibilityFocus(token)))), "".concat(componentCls, "-item-disabled, ").concat(componentCls, "-submenu-disabled"), {
|
|
58
59
|
color: "".concat(itemDisabledColor, " !important")
|
|
@@ -107,7 +107,7 @@ var getVerticalStyle = function getVerticalStyle(token) {
|
|
|
107
107
|
textAlign: 'center'
|
|
108
108
|
}))), "> ".concat(componentCls, "-item,\n > ").concat(componentCls, "-item-group > ").concat(componentCls, "-item-group-list > ").concat(componentCls, "-item,\n > ").concat(componentCls, "-item-group > ").concat(componentCls, "-item-group-list > ").concat(componentCls, "-submenu > ").concat(componentCls, "-submenu-title,\n > ").concat(componentCls, "-submenu > ").concat(componentCls, "-submenu-title"), _defineProperty(_defineProperty({
|
|
109
109
|
insetInlineStart: 0,
|
|
110
|
-
paddingInline: "calc(50% - ".concat(unit(token.calc(
|
|
110
|
+
paddingInline: "calc(50% - ".concat(unit(token.calc(collapsedIconSize).div(2).equal()), " - ").concat(unit(itemMarginInline), ")"),
|
|
111
111
|
textOverflow: 'clip'
|
|
112
112
|
}, "\n ".concat(componentCls, "-submenu-arrow,\n ").concat(componentCls, "-submenu-expand-icon\n "), {
|
|
113
113
|
opacity: 0
|
|
@@ -72,12 +72,13 @@ var genMessageStyle = function genMessageStyle(token) {
|
|
|
72
72
|
width: "400px"
|
|
73
73
|
}), "".concat(componentCls, "-custom-content"), _defineProperty(_defineProperty(_defineProperty(_defineProperty({
|
|
74
74
|
display: "flex",
|
|
75
|
-
lineHeight: "22px"
|
|
75
|
+
lineHeight: "22px",
|
|
76
|
+
alignItems: "center"
|
|
76
77
|
}, "> ".concat(iconCls), {
|
|
77
78
|
fontSize: "16px",
|
|
78
79
|
width: "16px",
|
|
79
|
-
height: "16px"
|
|
80
|
-
transform: "translateY(3px)"
|
|
80
|
+
height: "16px"
|
|
81
|
+
// transform: "translateY(3px)",
|
|
81
82
|
}), "".concat(componentCls, "-custom-header-content"), {
|
|
82
83
|
display: "inline-block",
|
|
83
84
|
fontSize: "14px",
|
|
@@ -125,11 +125,6 @@ export function ConfirmContent(props) {
|
|
|
125
125
|
var ConfirmDialog = function ConfirmDialog(props) {
|
|
126
126
|
var close = props.close,
|
|
127
127
|
zIndex = props.zIndex,
|
|
128
|
-
afterClose = props.afterClose,
|
|
129
|
-
open = props.open,
|
|
130
|
-
keyboard = props.keyboard,
|
|
131
|
-
centered = props.centered,
|
|
132
|
-
getContainer = props.getContainer,
|
|
133
128
|
maskStyle = props.maskStyle,
|
|
134
129
|
direction = props.direction,
|
|
135
130
|
prefixCls = props.prefixCls,
|
|
@@ -138,9 +133,6 @@ var ConfirmDialog = function ConfirmDialog(props) {
|
|
|
138
133
|
bodyStyle = props.bodyStyle,
|
|
139
134
|
_props$closable = props.closable,
|
|
140
135
|
closable = _props$closable === void 0 ? false : _props$closable,
|
|
141
|
-
closeIcon = props.closeIcon,
|
|
142
|
-
modalRender = props.modalRender,
|
|
143
|
-
focusTriggerAfterClose = props.focusTriggerAfterClose,
|
|
144
136
|
onConfirm = props.onConfirm,
|
|
145
137
|
styles = props.styles;
|
|
146
138
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -171,8 +163,7 @@ var ConfirmDialog = function ConfirmDialog(props) {
|
|
|
171
163
|
return token.zIndexPopupBase + CONTAINER_MAX_OFFSET;
|
|
172
164
|
}, [zIndex, token]);
|
|
173
165
|
// ========================= Render =========================
|
|
174
|
-
return _jsx(Modal, {
|
|
175
|
-
prefixCls: prefixCls,
|
|
166
|
+
return _jsx(Modal, _objectSpread(_objectSpread({}, props), {}, {
|
|
176
167
|
className: classString,
|
|
177
168
|
wrapClassName: classNames(_defineProperty({}, "".concat(confirmPrefixCls, "-centered"), !!props.centered), wrapClassName),
|
|
178
169
|
onCancel: function onCancel() {
|
|
@@ -181,7 +172,6 @@ var ConfirmDialog = function ConfirmDialog(props) {
|
|
|
181
172
|
});
|
|
182
173
|
onConfirm === null || onConfirm === void 0 || onConfirm(false);
|
|
183
174
|
},
|
|
184
|
-
open: open,
|
|
185
175
|
title: "",
|
|
186
176
|
footer: null,
|
|
187
177
|
transitionName: getTransitionName(rootPrefixCls || '', 'zoom', props.transitionName),
|
|
@@ -195,18 +185,11 @@ var ConfirmDialog = function ConfirmDialog(props) {
|
|
|
195
185
|
}, styles),
|
|
196
186
|
width: width,
|
|
197
187
|
zIndex: mergedZIndex,
|
|
198
|
-
afterClose: afterClose,
|
|
199
|
-
keyboard: keyboard,
|
|
200
|
-
centered: centered,
|
|
201
|
-
getContainer: getContainer,
|
|
202
188
|
closable: closable,
|
|
203
|
-
closeIcon: closeIcon,
|
|
204
|
-
modalRender: modalRender,
|
|
205
|
-
focusTriggerAfterClose: focusTriggerAfterClose,
|
|
206
189
|
children: _jsx(ConfirmContent, _objectSpread(_objectSpread({}, props), {}, {
|
|
207
190
|
confirmPrefixCls: confirmPrefixCls
|
|
208
191
|
}))
|
|
209
|
-
});
|
|
192
|
+
}));
|
|
210
193
|
};
|
|
211
194
|
var ConfirmDialogWrapper = function ConfirmDialogWrapper(props) {
|
|
212
195
|
var rootPrefixCls = props.rootPrefixCls,
|
package/lib/Antd5/modal/Modal.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
+
var _excluded = ["prefixCls", "className", "rootClassName", "open", "wrapClassName", "centered", "getContainer", "focusTriggerAfterClose", "style", "visible", "width", "footer", "classNames", "styles", "children", "loading", "confirmLoading", "zIndex", "mousePosition", "onOk", "onCancel", "destroyOnHidden", "destroyOnClose"];
|
|
1
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
|
-
var _excluded = ["prefixCls", "className", "rootClassName", "open", "wrapClassName", "centered", "getContainer", "focusTriggerAfterClose", "style", "visible", "width", "footer", "classNames", "styles", "children", "loading"];
|
|
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; }
|
|
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); }
|
|
8
|
-
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(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 (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
10
8
|
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
11
9
|
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."); }
|
|
12
10
|
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; } }
|
|
13
11
|
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; }
|
|
14
12
|
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; } }
|
|
15
13
|
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
14
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
15
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
16
16
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
17
17
|
import * as React from 'react';
|
|
18
18
|
import CloseOutlined from '@ant-design/icons/CloseOutlined';
|
|
@@ -50,29 +50,6 @@ if (canUseDocElement()) {
|
|
|
50
50
|
document.documentElement.addEventListener('click', getClickPosition, true);
|
|
51
51
|
}
|
|
52
52
|
var Modal = function Modal(props) {
|
|
53
|
-
var _restProps$mousePosit;
|
|
54
|
-
var _React$useContext = React.useContext(ConfigContext),
|
|
55
|
-
getContextPopupContainer = _React$useContext.getPopupContainer,
|
|
56
|
-
getPrefixCls = _React$useContext.getPrefixCls,
|
|
57
|
-
direction = _React$useContext.direction,
|
|
58
|
-
modalContext = _React$useContext.modal;
|
|
59
|
-
var handleCancel = function handleCancel(e) {
|
|
60
|
-
var onCancel = props.onCancel;
|
|
61
|
-
onCancel === null || onCancel === void 0 || onCancel(e);
|
|
62
|
-
};
|
|
63
|
-
var handleOk = function handleOk(e) {
|
|
64
|
-
var onOk = props.onOk;
|
|
65
|
-
onOk === null || onOk === void 0 || onOk(e);
|
|
66
|
-
};
|
|
67
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
68
|
-
var warning = devUseWarning('Modal');
|
|
69
|
-
[['visible', 'open'], ['bodyStyle', 'styles.body'], ['maskStyle', 'styles.mask']].forEach(function (_ref) {
|
|
70
|
-
var _ref2 = _slicedToArray(_ref, 2),
|
|
71
|
-
deprecatedName = _ref2[0],
|
|
72
|
-
newName = _ref2[1];
|
|
73
|
-
warning.deprecated(!(deprecatedName in props), deprecatedName, newName);
|
|
74
|
-
});
|
|
75
|
-
}
|
|
76
53
|
var customizePrefixCls = props.prefixCls,
|
|
77
54
|
className = props.className,
|
|
78
55
|
rootClassName = props.rootClassName,
|
|
@@ -91,7 +68,37 @@ var Modal = function Modal(props) {
|
|
|
91
68
|
modalStyles = props.styles,
|
|
92
69
|
children = props.children,
|
|
93
70
|
loading = props.loading,
|
|
71
|
+
confirmLoading = props.confirmLoading,
|
|
72
|
+
customizeZIndex = props.zIndex,
|
|
73
|
+
customizeMousePosition = props.mousePosition,
|
|
74
|
+
onOk = props.onOk,
|
|
75
|
+
onCancel = props.onCancel,
|
|
76
|
+
destroyOnHidden = props.destroyOnHidden,
|
|
77
|
+
destroyOnClose = props.destroyOnClose,
|
|
94
78
|
restProps = _objectWithoutProperties(props, _excluded);
|
|
79
|
+
var _React$useContext = React.useContext(ConfigContext),
|
|
80
|
+
getContextPopupContainer = _React$useContext.getPopupContainer,
|
|
81
|
+
getPrefixCls = _React$useContext.getPrefixCls,
|
|
82
|
+
direction = _React$useContext.direction,
|
|
83
|
+
modalContext = _React$useContext.modal;
|
|
84
|
+
var handleCancel = function handleCancel(e) {
|
|
85
|
+
if (confirmLoading) {
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
onCancel === null || onCancel === void 0 || onCancel(e);
|
|
89
|
+
};
|
|
90
|
+
var handleOk = function handleOk(e) {
|
|
91
|
+
onOk === null || onOk === void 0 || onOk(e);
|
|
92
|
+
};
|
|
93
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
94
|
+
var warning = devUseWarning('Modal');
|
|
95
|
+
[['visible', 'open'], ['bodyStyle', 'styles.body'], ['maskStyle', 'styles.mask'], ['destroyOnClose', 'destroyOnHidden']].forEach(function (_ref) {
|
|
96
|
+
var _ref2 = _slicedToArray(_ref, 2),
|
|
97
|
+
deprecatedName = _ref2[0],
|
|
98
|
+
newName = _ref2[1];
|
|
99
|
+
warning.deprecated(!(deprecatedName in props), deprecatedName, newName);
|
|
100
|
+
});
|
|
101
|
+
}
|
|
95
102
|
var prefixCls = getPrefixCls('modal', customizePrefixCls);
|
|
96
103
|
var rootPrefixCls = getPrefixCls();
|
|
97
104
|
// Style
|
|
@@ -101,7 +108,7 @@ var Modal = function Modal(props) {
|
|
|
101
108
|
wrapCSSVar = _useStyle2[0],
|
|
102
109
|
hashId = _useStyle2[1],
|
|
103
110
|
cssVarCls = _useStyle2[2];
|
|
104
|
-
var wrapClassNameExtended = classNames(wrapClassName, _defineProperty(_defineProperty({}, "".concat(prefixCls, "-centered"),
|
|
111
|
+
var wrapClassNameExtended = classNames(wrapClassName, _defineProperty(_defineProperty({}, "".concat(prefixCls, "-centered"), centered !== null && centered !== void 0 ? centered : modalContext === null || modalContext === void 0 ? void 0 : modalContext.centered), "".concat(prefixCls, "-wrap-rtl"), direction === 'rtl'));
|
|
105
112
|
var dialogFooter = footer !== null && !loading ? _jsx(Footer, _objectSpread(_objectSpread({}, props), {}, {
|
|
106
113
|
onOk: handleOk,
|
|
107
114
|
onCancel: handleCancel
|
|
@@ -115,18 +122,41 @@ var Modal = function Modal(props) {
|
|
|
115
122
|
return renderCloseIcon(prefixCls, icon);
|
|
116
123
|
}
|
|
117
124
|
}),
|
|
118
|
-
_useClosable2 = _slicedToArray(_useClosable,
|
|
125
|
+
_useClosable2 = _slicedToArray(_useClosable, 4),
|
|
119
126
|
mergedClosable = _useClosable2[0],
|
|
120
127
|
mergedCloseIcon = _useClosable2[1],
|
|
121
|
-
closeBtnIsDisabled = _useClosable2[2]
|
|
128
|
+
closeBtnIsDisabled = _useClosable2[2],
|
|
129
|
+
ariaProps = _useClosable2[3];
|
|
122
130
|
// ============================ Refs ============================
|
|
123
131
|
// Select `ant-modal-content` by `panelRef`
|
|
124
132
|
var panelRef = usePanelRef(".".concat(prefixCls, "-content"));
|
|
125
133
|
// ============================ zIndex ============================
|
|
126
|
-
var _useZIndex = useZIndex('Modal',
|
|
134
|
+
var _useZIndex = useZIndex('Modal', customizeZIndex),
|
|
127
135
|
_useZIndex2 = _slicedToArray(_useZIndex, 2),
|
|
128
136
|
zIndex = _useZIndex2[0],
|
|
129
137
|
contextZIndex = _useZIndex2[1];
|
|
138
|
+
// =========================== Width ============================
|
|
139
|
+
var _React$useMemo = React.useMemo(function () {
|
|
140
|
+
if (width && _typeof(width) === 'object') {
|
|
141
|
+
return [undefined, width];
|
|
142
|
+
}
|
|
143
|
+
return [width, undefined];
|
|
144
|
+
}, [width]),
|
|
145
|
+
_React$useMemo2 = _slicedToArray(_React$useMemo, 2),
|
|
146
|
+
numWidth = _React$useMemo2[0],
|
|
147
|
+
responsiveWidth = _React$useMemo2[1];
|
|
148
|
+
var responsiveWidthVars = React.useMemo(function () {
|
|
149
|
+
var vars = {};
|
|
150
|
+
if (responsiveWidth) {
|
|
151
|
+
Object.keys(responsiveWidth).forEach(function (breakpoint) {
|
|
152
|
+
var breakpointWidth = responsiveWidth[breakpoint];
|
|
153
|
+
if (breakpointWidth !== undefined) {
|
|
154
|
+
vars["--".concat(prefixCls, "-").concat(breakpoint, "-width")] = typeof breakpointWidth === 'number' ? "".concat(breakpointWidth, "px") : breakpointWidth;
|
|
155
|
+
}
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
return vars;
|
|
159
|
+
}, [responsiveWidth]);
|
|
130
160
|
// =========================== Render ===========================
|
|
131
161
|
return wrapCSSVar(_jsx(ContextIsolator, {
|
|
132
162
|
form: true,
|
|
@@ -134,7 +164,7 @@ var Modal = function Modal(props) {
|
|
|
134
164
|
children: _jsx(zIndexContext.Provider, {
|
|
135
165
|
value: contextZIndex,
|
|
136
166
|
children: _jsx(Dialog, _objectSpread(_objectSpread({
|
|
137
|
-
width:
|
|
167
|
+
width: numWidth
|
|
138
168
|
}, restProps), {}, {
|
|
139
169
|
zIndex: zIndex,
|
|
140
170
|
getContainer: getContainer === undefined ? getContextPopupContainer : getContainer,
|
|
@@ -142,23 +172,25 @@ var Modal = function Modal(props) {
|
|
|
142
172
|
rootClassName: classNames(hashId, rootClassName, cssVarCls, rootCls),
|
|
143
173
|
footer: dialogFooter,
|
|
144
174
|
visible: open !== null && open !== void 0 ? open : visible,
|
|
145
|
-
mousePosition:
|
|
175
|
+
mousePosition: customizeMousePosition !== null && customizeMousePosition !== void 0 ? customizeMousePosition : mousePosition,
|
|
146
176
|
onClose: handleCancel,
|
|
147
|
-
closable: mergedClosable ? {
|
|
177
|
+
closable: mergedClosable ? _objectSpread({
|
|
148
178
|
disabled: closeBtnIsDisabled,
|
|
149
179
|
closeIcon: mergedCloseIcon
|
|
150
|
-
} : mergedClosable,
|
|
180
|
+
}, ariaProps) : mergedClosable,
|
|
151
181
|
closeIcon: mergedCloseIcon,
|
|
152
182
|
focusTriggerAfterClose: focusTriggerAfterClose,
|
|
153
183
|
transitionName: getTransitionName(rootPrefixCls, 'zoom', props.transitionName),
|
|
154
184
|
maskTransitionName: getTransitionName(rootPrefixCls, 'fade', props.maskTransitionName),
|
|
155
185
|
className: classNames(hashId, className, modalContext === null || modalContext === void 0 ? void 0 : modalContext.className),
|
|
156
|
-
style: _objectSpread(_objectSpread({}, modalContext === null || modalContext === void 0 ? void 0 : modalContext.style), style),
|
|
186
|
+
style: _objectSpread(_objectSpread(_objectSpread({}, modalContext === null || modalContext === void 0 ? void 0 : modalContext.style), style), responsiveWidthVars),
|
|
157
187
|
classNames: _objectSpread(_objectSpread(_objectSpread({}, modalContext === null || modalContext === void 0 ? void 0 : modalContext.classNames), modalClassNames), {}, {
|
|
158
188
|
wrapper: classNames(wrapClassNameExtended, modalClassNames === null || modalClassNames === void 0 ? void 0 : modalClassNames.wrapper)
|
|
159
189
|
}),
|
|
160
190
|
styles: _objectSpread(_objectSpread({}, modalContext === null || modalContext === void 0 ? void 0 : modalContext.styles), modalStyles),
|
|
161
191
|
panelRef: panelRef,
|
|
192
|
+
// TODO: In the future, destroyOnClose in rc-dialog needs to be upgrade to destroyOnHidden
|
|
193
|
+
destroyOnClose: destroyOnHidden !== null && destroyOnHidden !== void 0 ? destroyOnHidden : destroyOnClose,
|
|
162
194
|
children: loading ? _jsx(Skeleton, {
|
|
163
195
|
active: true,
|
|
164
196
|
title: false,
|
|
@@ -12,9 +12,9 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
|
|
|
12
12
|
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); }
|
|
13
13
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
14
|
import React, { useContext } from 'react';
|
|
15
|
-
import { render as reactRender, unmount as reactUnmount } from 'rc-util/lib/React/render';
|
|
16
15
|
import warning from '../_util/warning';
|
|
17
16
|
import ConfigProvider, { ConfigContext, globalConfig, warnContext } from '../config-provider';
|
|
17
|
+
import { unstableSetRender } from '../config-provider/UnstableContext';
|
|
18
18
|
import ConfirmDialog from './ConfirmDialog';
|
|
19
19
|
import destroyFns from './destroyFns';
|
|
20
20
|
import { getConfirmLocale } from './locale';
|
|
@@ -60,6 +60,7 @@ export default function confirm(config) {
|
|
|
60
60
|
open: true
|
|
61
61
|
});
|
|
62
62
|
var timeoutId;
|
|
63
|
+
var reactUnmount;
|
|
63
64
|
function destroy() {
|
|
64
65
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
65
66
|
args[_key] = arguments[_key];
|
|
@@ -78,7 +79,7 @@ export default function confirm(config) {
|
|
|
78
79
|
break;
|
|
79
80
|
}
|
|
80
81
|
}
|
|
81
|
-
reactUnmount(
|
|
82
|
+
reactUnmount();
|
|
82
83
|
}
|
|
83
84
|
function render(props) {
|
|
84
85
|
clearTimeout(timeoutId);
|
|
@@ -92,7 +93,8 @@ export default function confirm(config) {
|
|
|
92
93
|
var iconPrefixCls = global.getIconPrefixCls();
|
|
93
94
|
var theme = global.getTheme();
|
|
94
95
|
var dom = _jsx(ConfirmDialogWrapper, _objectSpread({}, props));
|
|
95
|
-
reactRender(
|
|
96
|
+
var reactRender = unstableSetRender();
|
|
97
|
+
reactUnmount = reactRender(_jsx(ConfigProvider, {
|
|
96
98
|
prefixCls: rootPrefixCls,
|
|
97
99
|
iconPrefixCls: iconPrefixCls,
|
|
98
100
|
theme: theme,
|
|
@@ -44,7 +44,9 @@ var genModalConfirmStyle = function genModalConfirmStyle(token) {
|
|
|
44
44
|
display: 'flex',
|
|
45
45
|
flexDirection: 'column',
|
|
46
46
|
flex: 'auto',
|
|
47
|
-
rowGap: token.marginXS
|
|
47
|
+
rowGap: token.marginXS,
|
|
48
|
+
// https://github.com/ant-design/ant-design/issues/51912
|
|
49
|
+
maxWidth: "calc(100% - ".concat(unit(token.marginSM), ")")
|
|
48
50
|
}), "".concat(token.iconCls, " + ").concat(confirmComponentCls, "-paragraph"), {
|
|
49
51
|
maxWidth: "calc(100% - ".concat(unit(token.calc(token.modalConfirmIconSize).add(token.marginSM).equal()), ")")
|
|
50
52
|
}), "".concat(confirmComponentCls, "-title"), {
|
|
@@ -1,10 +1,17 @@
|
|
|
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 _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
|
|
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."); }
|
|
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 _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
|
|
6
|
+
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
|
|
7
|
+
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; }
|
|
2
8
|
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
9
|
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
10
|
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
11
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
6
12
|
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
13
|
import { unit } from '@ant-design/cssinjs';
|
|
14
|
+
import { getMediaSize } from '../../grid/style';
|
|
8
15
|
import { genFocusStyle, resetComponent } from '../../style';
|
|
9
16
|
import { initFadeMotion, initZoomMotion } from '../../style/motion';
|
|
10
17
|
import { genStyleHooks, mergeToken } from '../../theme/internal';
|
|
@@ -180,6 +187,19 @@ var genRTLStyle = function genRTLStyle(token) {
|
|
|
180
187
|
direction: 'rtl'
|
|
181
188
|
})));
|
|
182
189
|
};
|
|
190
|
+
var genResponsiveWidthStyle = function genResponsiveWidthStyle(token) {
|
|
191
|
+
var componentCls = token.componentCls;
|
|
192
|
+
var gridMediaSizesMap = getMediaSize(token);
|
|
193
|
+
delete gridMediaSizesMap.xs;
|
|
194
|
+
var responsiveStyles = Object.keys(gridMediaSizesMap).map(function (key) {
|
|
195
|
+
return _defineProperty({}, "@media (min-width: ".concat(unit(gridMediaSizesMap[key]), ")"), {
|
|
196
|
+
width: "var(--".concat(componentCls.replace('.', ''), "-").concat(key, "-width)")
|
|
197
|
+
});
|
|
198
|
+
});
|
|
199
|
+
return _defineProperty({}, "".concat(componentCls, "-root"), _defineProperty({}, componentCls, [{
|
|
200
|
+
width: "var(--".concat(componentCls.replace('.', ''), "-xs-width)")
|
|
201
|
+
}].concat(_toConsumableArray(responsiveStyles))));
|
|
202
|
+
};
|
|
183
203
|
// ============================== Export ==============================
|
|
184
204
|
export var prepareToken = function prepareToken(token) {
|
|
185
205
|
var headerPaddingVertical = token.padding;
|
|
@@ -223,7 +243,7 @@ export var prepareComponentToken = function prepareComponentToken(token) {
|
|
|
223
243
|
};
|
|
224
244
|
export default genStyleHooks('Modal', function (token) {
|
|
225
245
|
var modalToken = prepareToken(token);
|
|
226
|
-
return [genModalStyle(modalToken), genRTLStyle(modalToken), genModalMaskStyle(modalToken), initZoomMotion(modalToken, 'zoom')];
|
|
246
|
+
return [genModalStyle(modalToken), genRTLStyle(modalToken), genModalMaskStyle(modalToken), initZoomMotion(modalToken, 'zoom'), genResponsiveWidthStyle(modalToken)];
|
|
227
247
|
}, prepareComponentToken, {
|
|
228
248
|
unitless: {
|
|
229
249
|
titleLineHeight: true
|
|
@@ -64,7 +64,8 @@ var HookModal = function HookModal(_ref, ref) {
|
|
|
64
64
|
destroy: close,
|
|
65
65
|
update: function update(newConfig) {
|
|
66
66
|
setInnerConfig(function (originConfig) {
|
|
67
|
-
|
|
67
|
+
var nextConfig = typeof newConfig === 'function' ? newConfig(originConfig) : newConfig;
|
|
68
|
+
return _objectSpread(_objectSpread({}, originConfig), nextConfig);
|
|
68
69
|
});
|
|
69
70
|
}
|
|
70
71
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var _excluded = ["prefixCls", "className", "icon", "type", "message", "description", "btn", "closable", "closeIcon", "className"];
|
|
1
|
+
var _excluded = ["prefixCls", "className", "icon", "type", "message", "description", "btn", "actions", "closable", "closeIcon", "className"];
|
|
2
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); }
|
|
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; }
|
|
@@ -23,6 +23,7 @@ import InfoCircleFilled from '@ant-design/icons/InfoCircleFilled';
|
|
|
23
23
|
import LoadingOutlined from '@ant-design/icons/LoadingOutlined';
|
|
24
24
|
import classNames from 'classnames';
|
|
25
25
|
import { Notice } from 'rc-notification';
|
|
26
|
+
import { devUseWarning } from '../_util/warning';
|
|
26
27
|
import { ConfigContext } from '../config-provider';
|
|
27
28
|
import useCSSVarCls from '../config-provider/hooks/useCSSVarCls';
|
|
28
29
|
import useStyle from './style';
|
|
@@ -54,7 +55,7 @@ export var PureContent = function PureContent(props) {
|
|
|
54
55
|
type = props.type,
|
|
55
56
|
message = props.message,
|
|
56
57
|
description = props.description,
|
|
57
|
-
|
|
58
|
+
actions = props.actions,
|
|
58
59
|
_props$role = props.role,
|
|
59
60
|
role = _props$role === void 0 ? 'alert' : _props$role;
|
|
60
61
|
var iconNode = null;
|
|
@@ -77,9 +78,9 @@ export var PureContent = function PureContent(props) {
|
|
|
77
78
|
}), _jsx("div", {
|
|
78
79
|
className: "".concat(prefixCls, "-description"),
|
|
79
80
|
children: description
|
|
80
|
-
}),
|
|
81
|
-
className: "".concat(prefixCls, "-
|
|
82
|
-
children:
|
|
81
|
+
}), actions && _jsx("div", {
|
|
82
|
+
className: "".concat(prefixCls, "-actions"),
|
|
83
|
+
children: actions
|
|
83
84
|
})]
|
|
84
85
|
});
|
|
85
86
|
};
|
|
@@ -92,6 +93,7 @@ var PurePanel = function PurePanel(props) {
|
|
|
92
93
|
message = props.message,
|
|
93
94
|
description = props.description,
|
|
94
95
|
btn = props.btn,
|
|
96
|
+
actions = props.actions,
|
|
95
97
|
_props$closable = props.closable,
|
|
96
98
|
closable = _props$closable === void 0 ? true : _props$closable,
|
|
97
99
|
closeIcon = props.closeIcon,
|
|
@@ -99,6 +101,11 @@ var PurePanel = function PurePanel(props) {
|
|
|
99
101
|
restProps = _objectWithoutProperties(props, _excluded);
|
|
100
102
|
var _React$useContext = React.useContext(ConfigContext),
|
|
101
103
|
getPrefixCls = _React$useContext.getPrefixCls;
|
|
104
|
+
var mergedActions = actions !== null && actions !== void 0 ? actions : btn;
|
|
105
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
106
|
+
var warning = devUseWarning('Notification');
|
|
107
|
+
warning.deprecated(!btn, 'btn', 'actions');
|
|
108
|
+
}
|
|
102
109
|
var prefixCls = staticPrefixCls || getPrefixCls('notification');
|
|
103
110
|
var noticePrefixCls = "".concat(prefixCls, "-notice");
|
|
104
111
|
var rootCls = useCSSVarCls(prefixCls);
|
|
@@ -126,7 +133,7 @@ var PurePanel = function PurePanel(props) {
|
|
|
126
133
|
type: type,
|
|
127
134
|
message: message,
|
|
128
135
|
description: description,
|
|
129
|
-
|
|
136
|
+
actions: mergedActions
|
|
130
137
|
})
|
|
131
138
|
}))]
|
|
132
139
|
}));
|
|
@@ -12,9 +12,9 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
|
|
|
12
12
|
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
13
13
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
14
|
import React, { useContext } from 'react';
|
|
15
|
-
import { render } from 'rc-util/lib/React/render';
|
|
16
15
|
import { AppConfigContext } from '../app/context';
|
|
17
16
|
import ConfigProvider, { ConfigContext, globalConfig, warnContext } from '../config-provider';
|
|
17
|
+
import { unstableSetRender } from '../config-provider/UnstableContext';
|
|
18
18
|
import PurePanel from './PurePanel';
|
|
19
19
|
import useNotification, { useInternalNotification } from './useNotification';
|
|
20
20
|
var notification = null;
|
|
@@ -108,7 +108,8 @@ function flushNotice() {
|
|
|
108
108
|
notification = newNotification;
|
|
109
109
|
// Delay render to avoid sync issue
|
|
110
110
|
act(function () {
|
|
111
|
-
|
|
111
|
+
var reactRender = unstableSetRender();
|
|
112
|
+
reactRender(_jsx(GlobalHolderWrapper, {
|
|
112
113
|
ref: function ref(node) {
|
|
113
114
|
var _ref = node || {},
|
|
114
115
|
instance = _ref.instance,
|
|
@@ -200,7 +201,6 @@ methods.forEach(function (type) {
|
|
|
200
201
|
// ==============================================================================
|
|
201
202
|
var noop = function noop() {};
|
|
202
203
|
/** @internal Only Work in test env */
|
|
203
|
-
// eslint-disable-next-line import/no-mutable-exports
|
|
204
204
|
export var actWrapper = noop;
|
|
205
205
|
if (process.env.NODE_ENV === 'test') {
|
|
206
206
|
actWrapper = function actWrapper(wrapper) {
|
|
@@ -208,7 +208,6 @@ if (process.env.NODE_ENV === 'test') {
|
|
|
208
208
|
};
|
|
209
209
|
}
|
|
210
210
|
/** @internal Only Work in test env */
|
|
211
|
-
// eslint-disable-next-line import/no-mutable-exports
|
|
212
211
|
export var actDestroy = noop;
|
|
213
212
|
if (process.env.NODE_ENV === 'test') {
|
|
214
213
|
actDestroy = function actDestroy() {
|
|
@@ -89,6 +89,8 @@ export var genNoticeStyle = function genNoticeStyle(token) {
|
|
|
89
89
|
display: 'flex',
|
|
90
90
|
alignItems: 'center',
|
|
91
91
|
justifyContent: 'center',
|
|
92
|
+
background: 'none',
|
|
93
|
+
border: 'none',
|
|
92
94
|
'&:hover': {
|
|
93
95
|
color: token.colorIconHover,
|
|
94
96
|
backgroundColor: token.colorBgTextHover
|
|
@@ -100,7 +102,6 @@ export var genNoticeStyle = function genNoticeStyle(token) {
|
|
|
100
102
|
position: 'absolute',
|
|
101
103
|
display: 'block',
|
|
102
104
|
appearance: 'none',
|
|
103
|
-
WebkitAppearance: 'none',
|
|
104
105
|
inlineSize: "calc(100% - ".concat(unit(borderRadiusLG), " * 2)"),
|
|
105
106
|
left: {
|
|
106
107
|
_skip_check_: true,
|
|
@@ -124,7 +125,7 @@ export var genNoticeStyle = function genNoticeStyle(token) {
|
|
|
124
125
|
borderRadius: borderRadiusLG,
|
|
125
126
|
background: notificationProgressBg
|
|
126
127
|
}
|
|
127
|
-
}), "".concat(noticeCls, "-
|
|
128
|
+
}), "".concat(noticeCls, "-actions"), {
|
|
128
129
|
"float": 'right',
|
|
129
130
|
marginTop: token.marginSM
|
|
130
131
|
});
|
|
@@ -179,7 +180,7 @@ var genNotificationStyle = function genNotificationStyle(token) {
|
|
|
179
180
|
animationPlayState: 'running'
|
|
180
181
|
}), '&-rtl', _defineProperty({
|
|
181
182
|
direction: 'rtl'
|
|
182
|
-
}, "".concat(noticeCls, "-
|
|
183
|
+
}, "".concat(noticeCls, "-actions"), {
|
|
183
184
|
"float": 'left'
|
|
184
185
|
})))), // ============================ Notice ============================
|
|
185
186
|
_defineProperty({}, componentCls, _defineProperty({}, "".concat(noticeCls, "-wrapper"), _objectSpread({}, genNoticeStyle(token))))];
|
|
@@ -51,7 +51,8 @@ var genStackedNoticeStyle = function genStackedNoticeStyle(token) {
|
|
|
51
51
|
var genStackStyle = function genStackStyle(token) {
|
|
52
52
|
var componentCls = token.componentCls;
|
|
53
53
|
return _objectSpread(_defineProperty(_defineProperty(_defineProperty({}, "".concat(componentCls, "-stack"), _defineProperty({}, "& > ".concat(componentCls, "-notice-wrapper"), _objectSpread({
|
|
54
|
-
transition: "
|
|
54
|
+
transition: "transform ".concat(token.motionDurationSlow, ", backdrop-filter 0s"),
|
|
55
|
+
willChange: 'transform, opacity',
|
|
55
56
|
position: 'absolute'
|
|
56
57
|
}, genStackChildrenStyle(token)))), "".concat(componentCls, "-stack:not(").concat(componentCls, "-stack-expanded)"), _defineProperty({}, "& > ".concat(componentCls, "-notice-wrapper"), _objectSpread({}, genStackedNoticeStyle(token)))), "".concat(componentCls, "-stack").concat(componentCls, "-stack-expanded"), _defineProperty({}, "& > ".concat(componentCls, "-notice-wrapper"), {
|
|
57
58
|
'&:not(:nth-last-child(-n + 1))': _defineProperty({
|