@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
|
@@ -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", "type", "danger", "disabled", "loading", "onClick", "htmlType", "children", "className", "menu", "arrow", "autoFocus", "overlay", "trigger", "align", "open", "onOpenChange", "placement", "getPopupContainer", "href", "icon", "title", "buttonsRender", "mouseEnterDelay", "mouseLeaveDelay", "overlayClassName", "overlayStyle", "destroyPopupOnHide", "dropdownRender"];
|
|
2
|
+
var _excluded = ["prefixCls", "type", "danger", "disabled", "loading", "onClick", "htmlType", "children", "className", "menu", "arrow", "autoFocus", "overlay", "trigger", "align", "open", "onOpenChange", "placement", "getPopupContainer", "href", "icon", "title", "buttonsRender", "mouseEnterDelay", "mouseLeaveDelay", "overlayClassName", "overlayStyle", "destroyOnHidden", "destroyPopupOnHide", "dropdownRender", "popupRender"];
|
|
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; }
|
|
@@ -59,11 +59,14 @@ var DropdownButton = function DropdownButton(props) {
|
|
|
59
59
|
mouseLeaveDelay = props.mouseLeaveDelay,
|
|
60
60
|
overlayClassName = props.overlayClassName,
|
|
61
61
|
overlayStyle = props.overlayStyle,
|
|
62
|
+
destroyOnHidden = props.destroyOnHidden,
|
|
62
63
|
destroyPopupOnHide = props.destroyPopupOnHide,
|
|
63
64
|
dropdownRender = props.dropdownRender,
|
|
65
|
+
popupRender = props.popupRender,
|
|
64
66
|
restProps = _objectWithoutProperties(props, _excluded);
|
|
65
67
|
var prefixCls = getPrefixCls('dropdown', customizePrefixCls);
|
|
66
68
|
var buttonPrefixCls = "".concat(prefixCls, "-button");
|
|
69
|
+
var mergedPopupRender = popupRender || dropdownRender;
|
|
67
70
|
var dropdownProps = {
|
|
68
71
|
menu: menu,
|
|
69
72
|
arrow: arrow,
|
|
@@ -77,13 +80,16 @@ var DropdownButton = function DropdownButton(props) {
|
|
|
77
80
|
mouseLeaveDelay: mouseLeaveDelay,
|
|
78
81
|
overlayClassName: overlayClassName,
|
|
79
82
|
overlayStyle: overlayStyle,
|
|
80
|
-
|
|
81
|
-
|
|
83
|
+
destroyOnHidden: destroyOnHidden,
|
|
84
|
+
popupRender: mergedPopupRender
|
|
82
85
|
};
|
|
83
86
|
var _useCompactItemContex = useCompactItemContext(prefixCls, direction),
|
|
84
87
|
compactSize = _useCompactItemContex.compactSize,
|
|
85
88
|
compactItemClassnames = _useCompactItemContex.compactItemClassnames;
|
|
86
89
|
var classes = classNames(buttonPrefixCls, compactItemClassnames, className);
|
|
90
|
+
if ('destroyPopupOnHide' in props) {
|
|
91
|
+
dropdownProps.destroyPopupOnHide = destroyPopupOnHide;
|
|
92
|
+
}
|
|
87
93
|
if ('overlay' in props) {
|
|
88
94
|
dropdownProps.overlay = overlay;
|
|
89
95
|
}
|
|
@@ -12,6 +12,7 @@ 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 * as React from 'react';
|
|
15
|
+
import LeftOutlined from '@ant-design/icons/LeftOutlined';
|
|
15
16
|
import RightOutlined from '@ant-design/icons/RightOutlined';
|
|
16
17
|
import classNames from 'classnames';
|
|
17
18
|
import RcDropdown from 'rc-dropdown';
|
|
@@ -19,6 +20,7 @@ import useEvent from 'rc-util/lib/hooks/useEvent';
|
|
|
19
20
|
import useMergedState from 'rc-util/lib/hooks/useMergedState';
|
|
20
21
|
import omit from 'rc-util/lib/omit';
|
|
21
22
|
import { useZIndex } from '../_util/hooks/useZIndex';
|
|
23
|
+
import isPrimitive from '../_util/isPrimitive';
|
|
22
24
|
import getPlacements from '../_util/placements';
|
|
23
25
|
import genPurePanel from '../_util/PurePanel';
|
|
24
26
|
import { cloneElement } from '../_util/reactNode';
|
|
@@ -40,6 +42,7 @@ var Dropdown = function Dropdown(props) {
|
|
|
40
42
|
trigger = props.trigger,
|
|
41
43
|
disabled = props.disabled,
|
|
42
44
|
dropdownRender = props.dropdownRender,
|
|
45
|
+
popupRender = props.popupRender,
|
|
43
46
|
getPopupContainer = props.getPopupContainer,
|
|
44
47
|
overlayClassName = props.overlayClassName,
|
|
45
48
|
rootClassName = props.rootClassName,
|
|
@@ -57,22 +60,34 @@ var Dropdown = function Dropdown(props) {
|
|
|
57
60
|
_props$placement = props.placement,
|
|
58
61
|
placement = _props$placement === void 0 ? '' : _props$placement,
|
|
59
62
|
overlay = props.overlay,
|
|
60
|
-
transitionName = props.transitionName
|
|
63
|
+
transitionName = props.transitionName,
|
|
64
|
+
destroyOnHidden = props.destroyOnHidden,
|
|
65
|
+
destroyPopupOnHide = props.destroyPopupOnHide;
|
|
61
66
|
var _React$useContext = React.useContext(ConfigContext),
|
|
62
67
|
getContextPopupContainer = _React$useContext.getPopupContainer,
|
|
63
68
|
getPrefixCls = _React$useContext.getPrefixCls,
|
|
64
69
|
direction = _React$useContext.direction,
|
|
65
70
|
dropdown = _React$useContext.dropdown;
|
|
71
|
+
var mergedPopupRender = popupRender || dropdownRender;
|
|
66
72
|
// Warning for deprecated usage
|
|
67
73
|
var warning = devUseWarning('Dropdown');
|
|
68
74
|
if (process.env.NODE_ENV !== 'production') {
|
|
69
|
-
|
|
75
|
+
var deprecatedProps = {
|
|
76
|
+
visible: 'open',
|
|
77
|
+
onVisibleChange: 'onOpenChange',
|
|
78
|
+
overlay: 'menu',
|
|
79
|
+
dropdownRender: 'popupRender',
|
|
80
|
+
destroyPopupOnHide: 'destroyOnHidden'
|
|
81
|
+
};
|
|
82
|
+
Object.entries(deprecatedProps).forEach(function (_ref) {
|
|
70
83
|
var _ref2 = _slicedToArray(_ref, 2),
|
|
71
84
|
deprecatedName = _ref2[0],
|
|
72
85
|
newName = _ref2[1];
|
|
73
86
|
warning.deprecated(!(deprecatedName in props), deprecatedName, newName);
|
|
74
87
|
});
|
|
75
|
-
|
|
88
|
+
if (placement.includes('Center')) {
|
|
89
|
+
warning.deprecated(!placement.includes('Center'), "placement: ".concat(placement), "placement: ".concat(placement.slice(0, placement.indexOf('Center'))));
|
|
90
|
+
}
|
|
76
91
|
}
|
|
77
92
|
var memoTransitionName = React.useMemo(function () {
|
|
78
93
|
var rootPrefixCls = getPrefixCls();
|
|
@@ -93,18 +108,6 @@ var Dropdown = function Dropdown(props) {
|
|
|
93
108
|
}
|
|
94
109
|
return placement;
|
|
95
110
|
}, [placement, direction]);
|
|
96
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
97
|
-
if (placement.includes('Center')) {
|
|
98
|
-
var newPlacement = placement.slice(0, placement.indexOf('Center'));
|
|
99
|
-
warning(!placement.includes('Center'), 'deprecated', "You are using '".concat(placement, "' placement in Dropdown, which is deprecated. Try to use '").concat(newPlacement, "' instead."));
|
|
100
|
-
}
|
|
101
|
-
[['visible', 'open'], ['onVisibleChange', 'onOpenChange']].forEach(function (_ref3) {
|
|
102
|
-
var _ref4 = _slicedToArray(_ref3, 2),
|
|
103
|
-
deprecatedName = _ref4[0],
|
|
104
|
-
newName = _ref4[1];
|
|
105
|
-
warning.deprecated(!(deprecatedName in props), deprecatedName, newName);
|
|
106
|
-
});
|
|
107
|
-
}
|
|
108
111
|
var prefixCls = getPrefixCls('dropdown', customizePrefixCls);
|
|
109
112
|
var rootCls = useCSSVarCls(prefixCls);
|
|
110
113
|
var _useStyle = useStyle(prefixCls, rootCls),
|
|
@@ -115,8 +118,10 @@ var Dropdown = function Dropdown(props) {
|
|
|
115
118
|
var _useToken = useToken(),
|
|
116
119
|
_useToken2 = _slicedToArray(_useToken, 2),
|
|
117
120
|
token = _useToken2[1];
|
|
118
|
-
var child = React.Children.only(children)
|
|
119
|
-
|
|
121
|
+
var child = React.Children.only(isPrimitive(children) ? _jsx("span", {
|
|
122
|
+
children: children
|
|
123
|
+
}) : children);
|
|
124
|
+
var popupTrigger = cloneElement(child, {
|
|
120
125
|
className: classNames("".concat(prefixCls, "-trigger"), _defineProperty({}, "".concat(prefixCls, "-rtl"), direction === 'rtl'), child.props.className),
|
|
121
126
|
disabled: (_child$props$disabled = child.props.disabled) !== null && _child$props$disabled !== void 0 ? _child$props$disabled : disabled
|
|
122
127
|
});
|
|
@@ -165,8 +170,8 @@ var Dropdown = function Dropdown(props) {
|
|
|
165
170
|
} else {
|
|
166
171
|
overlayNode = overlay;
|
|
167
172
|
}
|
|
168
|
-
if (
|
|
169
|
-
overlayNode =
|
|
173
|
+
if (mergedPopupRender) {
|
|
174
|
+
overlayNode = mergedPopupRender(overlayNode);
|
|
170
175
|
}
|
|
171
176
|
overlayNode = React.Children.only(typeof overlayNode === 'string' ? _jsx("span", {
|
|
172
177
|
children: overlayNode
|
|
@@ -176,15 +181,17 @@ var Dropdown = function Dropdown(props) {
|
|
|
176
181
|
rootClassName: classNames(cssVarCls, rootCls),
|
|
177
182
|
expandIcon: _jsx("span", {
|
|
178
183
|
className: "".concat(prefixCls, "-menu-submenu-arrow"),
|
|
179
|
-
children: _jsx(
|
|
184
|
+
children: direction === 'rtl' ? _jsx(LeftOutlined, {
|
|
185
|
+
className: "".concat(prefixCls, "-menu-submenu-arrow-icon")
|
|
186
|
+
}) : _jsx(RightOutlined, {
|
|
180
187
|
className: "".concat(prefixCls, "-menu-submenu-arrow-icon")
|
|
181
188
|
})
|
|
182
189
|
}),
|
|
183
190
|
mode: "vertical",
|
|
184
191
|
selectable: false,
|
|
185
192
|
onClick: onMenuClick,
|
|
186
|
-
validator: function validator(
|
|
187
|
-
var mode =
|
|
193
|
+
validator: function validator(_ref3) {
|
|
194
|
+
var mode = _ref3.mode;
|
|
188
195
|
// Warning if use other mode
|
|
189
196
|
warning(!mode || mode === 'vertical', 'usage', "mode=\"".concat(mode, "\" is not supported for Dropdown's Menu."));
|
|
190
197
|
},
|
|
@@ -216,7 +223,8 @@ var Dropdown = function Dropdown(props) {
|
|
|
216
223
|
overlayStyle: _objectSpread(_objectSpread(_objectSpread({}, dropdown === null || dropdown === void 0 ? void 0 : dropdown.style), overlayStyle), {}, {
|
|
217
224
|
zIndex: zIndex
|
|
218
225
|
}),
|
|
219
|
-
|
|
226
|
+
autoDestroy: destroyOnHidden !== null && destroyOnHidden !== void 0 ? destroyOnHidden : destroyPopupOnHide,
|
|
227
|
+
children: popupTrigger
|
|
220
228
|
}));
|
|
221
229
|
if (zIndex) {
|
|
222
230
|
renderNode = _jsx(zIndexContext.Provider, {
|
|
@@ -226,20 +234,10 @@ var Dropdown = function Dropdown(props) {
|
|
|
226
234
|
}
|
|
227
235
|
return wrapCSSVar(renderNode);
|
|
228
236
|
};
|
|
229
|
-
function postPureProps(props) {
|
|
230
|
-
return _objectSpread(_objectSpread({}, props), {}, {
|
|
231
|
-
align: {
|
|
232
|
-
overflow: {
|
|
233
|
-
adjustX: false,
|
|
234
|
-
adjustY: false
|
|
235
|
-
}
|
|
236
|
-
}
|
|
237
|
-
});
|
|
238
|
-
}
|
|
239
237
|
// We don't care debug panel
|
|
240
|
-
var PurePanel = genPurePanel(Dropdown, 'dropdown', function (prefixCls) {
|
|
238
|
+
var PurePanel = genPurePanel(Dropdown, 'align', undefined, 'dropdown', function (prefixCls) {
|
|
241
239
|
return prefixCls;
|
|
242
|
-
}
|
|
240
|
+
});
|
|
243
241
|
/* istanbul ignore next */
|
|
244
242
|
var WrapPurePanel = function WrapPurePanel(props) {
|
|
245
243
|
return _jsx(PurePanel, _objectSpread(_objectSpread({}, props), {}, {
|
|
@@ -189,7 +189,7 @@ var genBaseStyle = function genBaseStyle(token) {
|
|
|
189
189
|
insetInlineEnd: token.paddingXS
|
|
190
190
|
}, "".concat(componentCls, "-menu-submenu-arrow-icon"), {
|
|
191
191
|
marginInlineEnd: '0 !important',
|
|
192
|
-
color: token.
|
|
192
|
+
color: token.colorIcon,
|
|
193
193
|
fontSize: fontSizeIcon,
|
|
194
194
|
fontStyle: 'normal'
|
|
195
195
|
})))), "".concat(menuCls, "-item-group-list"), {
|
package/lib/Antd5/empty/empty.js
CHANGED
|
@@ -6,7 +6,7 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
|
|
|
6
6
|
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
7
7
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
8
|
import * as React from 'react';
|
|
9
|
-
import {
|
|
9
|
+
import { FastColor } from '@ant-design/fast-color';
|
|
10
10
|
import { useLocale } from '../locale';
|
|
11
11
|
import { useToken } from '../theme/internal';
|
|
12
12
|
var Empty = function Empty() {
|
|
@@ -16,7 +16,7 @@ var Empty = function Empty() {
|
|
|
16
16
|
var _useLocale = useLocale('Empty'),
|
|
17
17
|
_useLocale2 = _slicedToArray(_useLocale, 1),
|
|
18
18
|
locale = _useLocale2[0];
|
|
19
|
-
var bgColor = new
|
|
19
|
+
var bgColor = new FastColor(token.colorBgBase);
|
|
20
20
|
// Dark Theme need more dark of this
|
|
21
21
|
var themeStyle = bgColor.toHsl().l < 0.5 ? {
|
|
22
22
|
opacity: 0.65
|
package/lib/Antd5/empty/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
-
var _excluded = ["className", "rootClassName", "prefixCls", "image", "description", "children", "imageStyle", "style"];
|
|
2
|
+
var _excluded = ["className", "rootClassName", "prefixCls", "image", "description", "children", "imageStyle", "style", "classNames", "styles"];
|
|
3
3
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4
4
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5
5
|
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
@@ -16,28 +16,34 @@ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t =
|
|
|
16
16
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
17
17
|
import * as React from 'react';
|
|
18
18
|
import classNames from 'classnames';
|
|
19
|
-
import {
|
|
19
|
+
import { devUseWarning } from '../_util/warning';
|
|
20
20
|
import { useLocale } from '../locale';
|
|
21
21
|
import DefaultEmptyImg from './empty';
|
|
22
22
|
import SimpleEmptyImg from './simple';
|
|
23
23
|
import useStyle from './style';
|
|
24
|
+
import { useComponentConfig } from '../config-provider/context';
|
|
24
25
|
var defaultEmptyImg = _jsx(DefaultEmptyImg, {});
|
|
25
26
|
var simpleEmptyImg = _jsx(SimpleEmptyImg, {});
|
|
26
|
-
var Empty = function Empty(
|
|
27
|
-
var className =
|
|
28
|
-
rootClassName =
|
|
29
|
-
customizePrefixCls =
|
|
30
|
-
|
|
31
|
-
image =
|
|
32
|
-
description =
|
|
33
|
-
children =
|
|
34
|
-
imageStyle =
|
|
35
|
-
style =
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
27
|
+
var Empty = function Empty(props) {
|
|
28
|
+
var className = props.className,
|
|
29
|
+
rootClassName = props.rootClassName,
|
|
30
|
+
customizePrefixCls = props.prefixCls,
|
|
31
|
+
_props$image = props.image,
|
|
32
|
+
image = _props$image === void 0 ? defaultEmptyImg : _props$image,
|
|
33
|
+
description = props.description,
|
|
34
|
+
children = props.children,
|
|
35
|
+
imageStyle = props.imageStyle,
|
|
36
|
+
style = props.style,
|
|
37
|
+
emptyClassNames = props.classNames,
|
|
38
|
+
styles = props.styles,
|
|
39
|
+
restProps = _objectWithoutProperties(props, _excluded);
|
|
40
|
+
var _useComponentConfig = useComponentConfig('empty'),
|
|
41
|
+
getPrefixCls = _useComponentConfig.getPrefixCls,
|
|
42
|
+
direction = _useComponentConfig.direction,
|
|
43
|
+
contextClassName = _useComponentConfig.className,
|
|
44
|
+
contextStyle = _useComponentConfig.style,
|
|
45
|
+
contextClassNames = _useComponentConfig.classNames,
|
|
46
|
+
contextStyles = _useComponentConfig.styles;
|
|
41
47
|
var prefixCls = getPrefixCls('empty', customizePrefixCls);
|
|
42
48
|
var _useStyle = useStyle(prefixCls),
|
|
43
49
|
_useStyle2 = _slicedToArray(_useStyle, 3),
|
|
@@ -58,19 +64,31 @@ var Empty = function Empty(_ref) {
|
|
|
58
64
|
} else {
|
|
59
65
|
imageNode = image;
|
|
60
66
|
}
|
|
67
|
+
// ============================= Warning ==============================
|
|
68
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
69
|
+
var warning = devUseWarning('Empty');
|
|
70
|
+
[['imageStyle', 'styles: { image: {} }']].forEach(function (_ref) {
|
|
71
|
+
var _ref2 = _slicedToArray(_ref, 2),
|
|
72
|
+
deprecatedName = _ref2[0],
|
|
73
|
+
newName = _ref2[1];
|
|
74
|
+
warning.deprecated(!(deprecatedName in props), deprecatedName, newName);
|
|
75
|
+
});
|
|
76
|
+
}
|
|
61
77
|
return wrapCSSVar(_jsxs("div", _objectSpread(_objectSpread({
|
|
62
|
-
className: classNames(hashId, cssVarCls, prefixCls,
|
|
63
|
-
style: _objectSpread(_objectSpread({},
|
|
78
|
+
className: classNames(hashId, cssVarCls, prefixCls, contextClassName, _defineProperty(_defineProperty({}, "".concat(prefixCls, "-normal"), image === simpleEmptyImg), "".concat(prefixCls, "-rtl"), direction === 'rtl'), className, rootClassName, contextClassNames.root, emptyClassNames === null || emptyClassNames === void 0 ? void 0 : emptyClassNames.root),
|
|
79
|
+
style: _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, contextStyles.root), contextStyle), styles === null || styles === void 0 ? void 0 : styles.root), style)
|
|
64
80
|
}, restProps), {}, {
|
|
65
81
|
children: [_jsx("div", {
|
|
66
|
-
className: "".concat(prefixCls, "-image"),
|
|
67
|
-
style: imageStyle,
|
|
82
|
+
className: classNames("".concat(prefixCls, "-image"), contextClassNames.image, emptyClassNames === null || emptyClassNames === void 0 ? void 0 : emptyClassNames.image),
|
|
83
|
+
style: _objectSpread(_objectSpread(_objectSpread({}, imageStyle), contextStyles.image), styles === null || styles === void 0 ? void 0 : styles.image),
|
|
68
84
|
children: imageNode
|
|
69
85
|
}), des && _jsx("div", {
|
|
70
|
-
className: "".concat(prefixCls, "-description"),
|
|
86
|
+
className: classNames("".concat(prefixCls, "-description"), contextClassNames.description, emptyClassNames === null || emptyClassNames === void 0 ? void 0 : emptyClassNames.description),
|
|
87
|
+
style: _objectSpread(_objectSpread({}, contextStyles.description), styles === null || styles === void 0 ? void 0 : styles.description),
|
|
71
88
|
children: des
|
|
72
89
|
}), children && _jsx("div", {
|
|
73
|
-
className: "".concat(prefixCls, "-footer"),
|
|
90
|
+
className: classNames("".concat(prefixCls, "-footer"), contextClassNames.footer, emptyClassNames === null || emptyClassNames === void 0 ? void 0 : emptyClassNames.footer),
|
|
91
|
+
style: _objectSpread(_objectSpread({}, contextStyles.footer), styles === null || styles === void 0 ? void 0 : styles.footer),
|
|
74
92
|
children: children
|
|
75
93
|
})]
|
|
76
94
|
})));
|
|
@@ -7,7 +7,7 @@ function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
|
7
7
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
8
|
import * as React from 'react';
|
|
9
9
|
import { useMemo } from 'react';
|
|
10
|
-
import {
|
|
10
|
+
import { FastColor } from '@ant-design/fast-color';
|
|
11
11
|
import { useToken } from '../theme/internal';
|
|
12
12
|
import { useLocale } from '../locale';
|
|
13
13
|
var Simple = function Simple() {
|
|
@@ -23,9 +23,9 @@ var Simple = function Simple() {
|
|
|
23
23
|
colorBgContainer = token.colorBgContainer;
|
|
24
24
|
var _useMemo = useMemo(function () {
|
|
25
25
|
return {
|
|
26
|
-
borderColor: new
|
|
27
|
-
shadowColor: new
|
|
28
|
-
contentColor: new
|
|
26
|
+
borderColor: new FastColor(colorFill).onBackground(colorBgContainer).toHexString(),
|
|
27
|
+
shadowColor: new FastColor(colorFillTertiary).onBackground(colorBgContainer).toHexString(),
|
|
28
|
+
contentColor: new FastColor(colorFillQuaternary).onBackground(colorBgContainer).toHexString()
|
|
29
29
|
};
|
|
30
30
|
}, [colorFill, colorFillTertiary, colorFillQuaternary, colorBgContainer]),
|
|
31
31
|
borderColor = _useMemo.borderColor,
|
|
@@ -14,9 +14,10 @@ function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
|
14
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
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
|
-
import React, { useContext
|
|
17
|
+
import React, { useContext } from 'react';
|
|
18
18
|
import classNames from 'classnames';
|
|
19
19
|
import omit from 'rc-util/lib/omit';
|
|
20
|
+
import convertToTooltipProps from '../_util/convertToTooltipProps';
|
|
20
21
|
import { useZIndex } from '../_util/hooks/useZIndex';
|
|
21
22
|
import { devUseWarning } from '../_util/warning';
|
|
22
23
|
import Badge from '../badge';
|
|
@@ -66,29 +67,25 @@ var InternalFloatButton = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
66
67
|
});
|
|
67
68
|
// 虽然在 ts 中已经 omit 过了,但是为了防止多余的属性被透传进来,这里再 omit 一遍,以防万一
|
|
68
69
|
var badgeProps = omit(badge, ['title', 'children', 'status', 'text']);
|
|
69
|
-
var contentProps = useMemo(function () {
|
|
70
|
-
return {
|
|
71
|
-
prefixCls: prefixCls,
|
|
72
|
-
description: description,
|
|
73
|
-
icon: icon,
|
|
74
|
-
type: type
|
|
75
|
-
};
|
|
76
|
-
}, [prefixCls, description, icon, type]);
|
|
77
70
|
var buttonNode = _jsx("div", {
|
|
78
71
|
className: "".concat(prefixCls, "-body"),
|
|
79
|
-
children: _jsx(Content,
|
|
72
|
+
children: _jsx(Content, {
|
|
73
|
+
prefixCls: prefixCls,
|
|
74
|
+
description: description,
|
|
75
|
+
icon: icon
|
|
76
|
+
})
|
|
80
77
|
});
|
|
81
78
|
if ('badge' in props) {
|
|
82
79
|
buttonNode = _jsx(Badge, _objectSpread(_objectSpread({}, badgeProps), {}, {
|
|
83
80
|
children: buttonNode
|
|
84
81
|
}));
|
|
85
82
|
}
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
83
|
+
// ============================ Tooltip ============================
|
|
84
|
+
var tooltipProps = convertToTooltipProps(tooltip);
|
|
85
|
+
if (tooltipProps) {
|
|
86
|
+
buttonNode = _jsx(Tooltip, _objectSpread(_objectSpread({}, tooltipProps), {}, {
|
|
90
87
|
children: buttonNode
|
|
91
|
-
});
|
|
88
|
+
}));
|
|
92
89
|
}
|
|
93
90
|
if (process.env.NODE_ENV !== 'production') {
|
|
94
91
|
var warning = devUseWarning('FloatButton');
|
|
@@ -1,3 +1,12 @@
|
|
|
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 = ["icon", "description", "prefixCls", "className"];
|
|
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
|
+
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
|
+
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
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
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; }
|
|
1
10
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
11
|
import React, { memo } from 'react';
|
|
3
12
|
import FileTextOutlined from '@ant-design/icons/FileTextOutlined';
|
|
@@ -6,16 +15,13 @@ var FloatButtonContent = function FloatButtonContent(props) {
|
|
|
6
15
|
var icon = props.icon,
|
|
7
16
|
description = props.description,
|
|
8
17
|
prefixCls = props.prefixCls,
|
|
9
|
-
className = props.className
|
|
18
|
+
className = props.className,
|
|
19
|
+
rest = _objectWithoutProperties(props, _excluded);
|
|
10
20
|
var defaultElement = _jsx("div", {
|
|
11
21
|
className: "".concat(prefixCls, "-icon"),
|
|
12
22
|
children: _jsx(FileTextOutlined, {})
|
|
13
23
|
});
|
|
14
|
-
return _jsx("div", {
|
|
15
|
-
onClick: props.onClick,
|
|
16
|
-
onFocus: props.onFocus,
|
|
17
|
-
onMouseEnter: props.onMouseEnter,
|
|
18
|
-
onMouseLeave: props.onMouseLeave,
|
|
24
|
+
return _jsx("div", _objectSpread(_objectSpread({}, rest), {}, {
|
|
19
25
|
className: classNames(className, "".concat(prefixCls, "-content")),
|
|
20
26
|
children: icon || description ? _jsxs(_Fragment, {
|
|
21
27
|
children: [icon && _jsx("div", {
|
|
@@ -26,6 +32,6 @@ var FloatButtonContent = function FloatButtonContent(props) {
|
|
|
26
32
|
children: description
|
|
27
33
|
})]
|
|
28
34
|
}) : defaultElement
|
|
29
|
-
});
|
|
35
|
+
}));
|
|
30
36
|
};
|
|
31
37
|
export default /*#__PURE__*/memo(FloatButtonContent);
|
|
@@ -23,7 +23,7 @@ import useEvent from 'rc-util/lib/hooks/useEvent';
|
|
|
23
23
|
import useMergedState from 'rc-util/lib/hooks/useMergedState';
|
|
24
24
|
import { useZIndex } from '../_util/hooks/useZIndex';
|
|
25
25
|
import { devUseWarning } from '../_util/warning';
|
|
26
|
-
import {
|
|
26
|
+
import { useComponentConfig } from '../config-provider/context';
|
|
27
27
|
import useCSSVarCls from '../config-provider/hooks/useCSSVarCls';
|
|
28
28
|
import { FloatButtonGroupProvider } from './context';
|
|
29
29
|
import FloatButton, { floatButtonPrefixCls } from './FloatButton';
|
|
@@ -49,11 +49,11 @@ var FloatButtonGroup = function FloatButtonGroup(props) {
|
|
|
49
49
|
customOpen = props.open,
|
|
50
50
|
onTriggerButtonClick = props.onClick,
|
|
51
51
|
floatButtonProps = _objectWithoutProperties(props, _excluded);
|
|
52
|
-
var
|
|
53
|
-
direction =
|
|
54
|
-
getPrefixCls =
|
|
55
|
-
|
|
56
|
-
var mergedCloseIcon = (_ref = closeIcon !== null && closeIcon !== void 0 ? closeIcon :
|
|
52
|
+
var _useComponentConfig = useComponentConfig('floatButtonGroup'),
|
|
53
|
+
direction = _useComponentConfig.direction,
|
|
54
|
+
getPrefixCls = _useComponentConfig.getPrefixCls,
|
|
55
|
+
contextCloseIcon = _useComponentConfig.closeIcon;
|
|
56
|
+
var mergedCloseIcon = (_ref = closeIcon !== null && closeIcon !== void 0 ? closeIcon : contextCloseIcon) !== null && _ref !== void 0 ? _ref : _jsx(CloseOutlined, {});
|
|
57
57
|
var prefixCls = getPrefixCls(floatButtonPrefixCls, customizePrefixCls);
|
|
58
58
|
var rootCls = useCSSVarCls(prefixCls);
|
|
59
59
|
var _useStyle = useStyle(prefixCls, rootCls),
|
|
@@ -36,7 +36,7 @@ var floatButtonGroupMotion = function floatButtonGroupMotion(token) {
|
|
|
36
36
|
});
|
|
37
37
|
var moveRightIn = new Keyframes('antFloatButtonMoveRightIn', {
|
|
38
38
|
'0%': {
|
|
39
|
-
transform: "translate3d(".concat(calc(floatButtonSize).mul(-1).equal(), ", 0, 0)"),
|
|
39
|
+
transform: "translate3d(".concat(unit(calc(floatButtonSize).mul(-1).equal()), ", 0, 0)"),
|
|
40
40
|
transformOrigin: '0 0',
|
|
41
41
|
opacity: 0
|
|
42
42
|
},
|
|
@@ -53,14 +53,14 @@ var floatButtonGroupMotion = function floatButtonGroupMotion(token) {
|
|
|
53
53
|
opacity: 1
|
|
54
54
|
},
|
|
55
55
|
'100%': {
|
|
56
|
-
transform: "translate3d(".concat(calc(floatButtonSize).mul(-1).equal(), ", 0, 0)"),
|
|
56
|
+
transform: "translate3d(".concat(unit(calc(floatButtonSize).mul(-1).equal()), ", 0, 0)"),
|
|
57
57
|
transformOrigin: '0 0',
|
|
58
58
|
opacity: 0
|
|
59
59
|
}
|
|
60
60
|
});
|
|
61
61
|
var moveBottomIn = new Keyframes('antFloatButtonMoveBottomIn', {
|
|
62
62
|
'0%': {
|
|
63
|
-
transform: "translate3d(0, ".concat(calc(floatButtonSize).mul(-1).equal(), ", 0)"),
|
|
63
|
+
transform: "translate3d(0, ".concat(unit(calc(floatButtonSize).mul(-1).equal()), ", 0)"),
|
|
64
64
|
transformOrigin: '0 0',
|
|
65
65
|
opacity: 0
|
|
66
66
|
},
|
|
@@ -77,7 +77,7 @@ var floatButtonGroupMotion = function floatButtonGroupMotion(token) {
|
|
|
77
77
|
opacity: 1
|
|
78
78
|
},
|
|
79
79
|
'100%': {
|
|
80
|
-
transform: "translate3d(0, ".concat(calc(floatButtonSize).mul(-1).equal(), ", 0)"),
|
|
80
|
+
transform: "translate3d(0, ".concat(unit(calc(floatButtonSize).mul(-1).equal()), ", 0)"),
|
|
81
81
|
transformOrigin: '0 0',
|
|
82
82
|
opacity: 0
|
|
83
83
|
}
|
|
@@ -16,7 +16,6 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
|
|
|
16
16
|
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
17
17
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
18
18
|
import * as React from 'react';
|
|
19
|
-
import { useMemo } from 'react';
|
|
20
19
|
import classNames from 'classnames';
|
|
21
20
|
import CSSMotion, { CSSMotionList } from 'rc-motion';
|
|
22
21
|
import initCollapseMotion from '../_util/motion';
|
|
@@ -52,7 +51,7 @@ var ErrorList = function ErrorList(_ref) {
|
|
|
52
51
|
wrapCSSVar = _useStyle2[0],
|
|
53
52
|
hashId = _useStyle2[1],
|
|
54
53
|
cssVarCls = _useStyle2[2];
|
|
55
|
-
var collapseMotion = useMemo(function () {
|
|
54
|
+
var collapseMotion = React.useMemo(function () {
|
|
56
55
|
return initCollapseMotion(prefixCls);
|
|
57
56
|
}, [prefixCls]);
|
|
58
57
|
// We have to debounce here again since somewhere use ErrorList directly still need no shaking
|
|
@@ -96,7 +95,6 @@ var ErrorList = function ErrorList(_ref) {
|
|
|
96
95
|
return _jsx("div", _objectSpread(_objectSpread({}, helpProps), {}, {
|
|
97
96
|
className: classNames(baseClassName, holderClassName, cssVarCls, rootCls, rootClassName, hashId),
|
|
98
97
|
style: holderStyle,
|
|
99
|
-
role: "alert",
|
|
100
98
|
children: _jsx(CSSMotionList, _objectSpread(_objectSpread({
|
|
101
99
|
keys: filledKeyFullKeyList
|
|
102
100
|
}, initCollapseMotion(prefixCls)), {}, {
|