@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 { resetComponent, resetIcon, textEllipsis
|
|
8
|
+
import { operationUnit, resetComponent, resetIcon, textEllipsis } from '../../style';
|
|
9
9
|
import { genStyleHooks, mergeToken } from '../../theme/internal';
|
|
10
10
|
var genTransferCustomizeStyle = function genTransferCustomizeStyle(token) {
|
|
11
11
|
var antCls = token.antCls,
|
|
@@ -74,6 +74,7 @@ var genTransferListStyle = function genTransferListStyle(token) {
|
|
|
74
74
|
colorBgContainer = token.colorBgContainer,
|
|
75
75
|
colorText = token.colorText,
|
|
76
76
|
controlItemBgActiveHover = token.controlItemBgActiveHover;
|
|
77
|
+
var contentBorderRadius = unit(token.calc(borderRadiusLG).sub(lineWidth).equal());
|
|
77
78
|
return {
|
|
78
79
|
display: 'flex',
|
|
79
80
|
flexDirection: 'column',
|
|
@@ -137,6 +138,7 @@ var genTransferListStyle = function genTransferListStyle(token) {
|
|
|
137
138
|
padding: 0,
|
|
138
139
|
overflow: 'auto',
|
|
139
140
|
listStyle: 'none',
|
|
141
|
+
borderRadius: "0 0 ".concat(contentBorderRadius, " ").concat(contentBorderRadius),
|
|
140
142
|
'&-item': _defineProperty(_defineProperty(_defineProperty({
|
|
141
143
|
display: 'flex',
|
|
142
144
|
alignItems: 'center',
|
|
@@ -48,8 +48,8 @@ var DirectoryTree = function DirectoryTree(_ref2, ref) {
|
|
|
48
48
|
defaultExpandedKeys = _ref2.defaultExpandedKeys,
|
|
49
49
|
props = _objectWithoutProperties(_ref2, _excluded);
|
|
50
50
|
// Shift click usage
|
|
51
|
-
var lastSelectedKey = React.useRef();
|
|
52
|
-
var cachedSelectedKeys = React.useRef();
|
|
51
|
+
var lastSelectedKey = React.useRef(null);
|
|
52
|
+
var cachedSelectedKeys = React.useRef(null);
|
|
53
53
|
var getInitExpandedKeys = function getInitExpandedKeys() {
|
|
54
54
|
var _convertDataToEntitie = convertDataToEntities(getTreeData(props)),
|
|
55
55
|
keyEntities = _convertDataToEntitie.keyEntities;
|
|
@@ -62,7 +62,8 @@ export var genBaseStyle = function genBaseStyle(prefixCls, token) {
|
|
|
62
62
|
indentSize = token.indentSize,
|
|
63
63
|
nodeSelectedBg = token.nodeSelectedBg,
|
|
64
64
|
nodeHoverBg = token.nodeHoverBg,
|
|
65
|
-
colorTextQuaternary = token.colorTextQuaternary
|
|
65
|
+
colorTextQuaternary = token.colorTextQuaternary,
|
|
66
|
+
controlItemBgActiveDisabled = token.controlItemBgActiveDisabled;
|
|
66
67
|
return _defineProperty({}, treeCls, _objectSpread(_objectSpread({}, resetComponent(token)), {}, (_objectSpread4 = {
|
|
67
68
|
background: token.colorBgContainer,
|
|
68
69
|
borderRadius: token.borderRadius,
|
|
@@ -90,7 +91,7 @@ export var genBaseStyle = function genBaseStyle(prefixCls, token) {
|
|
|
90
91
|
content: '""',
|
|
91
92
|
pointerEvents: 'none',
|
|
92
93
|
borderRadius: token.borderRadius
|
|
93
|
-
}))), treeNodeCls, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({
|
|
94
|
+
}))), treeNodeCls, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({
|
|
94
95
|
display: 'flex',
|
|
95
96
|
alignItems: 'flex-start',
|
|
96
97
|
marginBottom: treeNodePadding,
|
|
@@ -112,6 +113,10 @@ export var genBaseStyle = function genBaseStyle(prefixCls, token) {
|
|
|
112
113
|
'&:hover': {
|
|
113
114
|
background: 'transparent'
|
|
114
115
|
}
|
|
116
|
+
}), "".concat(treeCls, "-checkbox-disabled + ").concat(treeCls, "-node-selected,&").concat(treeNodeCls, "-disabled").concat(treeNodeCls, "-selected ").concat(treeCls, "-node-content-wrapper"), {
|
|
117
|
+
backgroundColor: controlItemBgActiveDisabled
|
|
118
|
+
}), "".concat(treeCls, "-checkbox-disabled"), {
|
|
119
|
+
pointerEvents: 'unset'
|
|
115
120
|
}), "&:not(".concat(treeNodeCls, "-disabled)"), _defineProperty({}, "".concat(treeCls, "-node-content-wrapper"), {
|
|
116
121
|
'&:hover': {
|
|
117
122
|
color: token.nodeHoverColor
|
|
@@ -256,6 +261,7 @@ export var genBaseStyle = function genBaseStyle(prefixCls, token) {
|
|
|
256
261
|
};
|
|
257
262
|
// ============================== Merged ==============================
|
|
258
263
|
export var genTreeStyle = function genTreeStyle(prefixCls, token) {
|
|
264
|
+
var enableDirectory = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
|
|
259
265
|
var treeCls = ".".concat(prefixCls);
|
|
260
266
|
var treeNodeCls = "".concat(treeCls, "-treenode");
|
|
261
267
|
var treeNodePadding = token.calc(token.paddingXS).div(2).equal();
|
|
@@ -268,7 +274,7 @@ export var genTreeStyle = function genTreeStyle(prefixCls, token) {
|
|
|
268
274
|
// Basic
|
|
269
275
|
genBaseStyle(prefixCls, treeToken),
|
|
270
276
|
// Directory
|
|
271
|
-
genDirectoryStyle(treeToken)];
|
|
277
|
+
enableDirectory && genDirectoryStyle(treeToken)].filter(Boolean);
|
|
272
278
|
};
|
|
273
279
|
export var initComponentToken = function initComponentToken(token) {
|
|
274
280
|
var controlHeightSM = token.controlHeightSM,
|
|
@@ -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", "size", "disabled", "bordered", "className", "rootClassName", "treeCheckable", "multiple", "listHeight", "listItemHeight", "placement", "notFoundContent", "switcherIcon", "treeLine", "getPopupContainer", "popupClassName", "dropdownClassName", "treeIcon", "transitionName", "choiceTransitionName", "status", "treeExpandAction", "builtinPlacements", "dropdownMatchSelectWidth", "popupMatchSelectWidth", "allowClear", "variant", "dropdownStyle", "tagRender"];
|
|
2
|
+
var _excluded = ["prefixCls", "size", "disabled", "bordered", "style", "className", "rootClassName", "treeCheckable", "multiple", "listHeight", "listItemHeight", "placement", "notFoundContent", "switcherIcon", "treeLine", "getPopupContainer", "popupClassName", "dropdownClassName", "treeIcon", "transitionName", "choiceTransitionName", "status", "treeExpandAction", "builtinPlacements", "dropdownMatchSelectWidth", "popupMatchSelectWidth", "allowClear", "variant", "dropdownStyle", "dropdownRender", "popupRender", "onDropdownVisibleChange", "onOpenChange", "tagRender", "maxCount", "showCheckedStrategy", "treeCheckStrictly", "styles", "classNames"];
|
|
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; }
|
|
@@ -15,7 +15,7 @@ function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, 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
17
|
import * as React from 'react';
|
|
18
|
-
import
|
|
18
|
+
import cls from 'classnames';
|
|
19
19
|
import RcTreeSelect, { SHOW_ALL, SHOW_CHILD, SHOW_PARENT, TreeNode } from 'rc-tree-select';
|
|
20
20
|
import omit from 'rc-util/lib/omit';
|
|
21
21
|
import { useZIndex } from '../_util/hooks/useZIndex';
|
|
@@ -35,16 +35,18 @@ import useSelectStyle from '../select/style';
|
|
|
35
35
|
import useIcons from '../select/useIcons';
|
|
36
36
|
import useShowArrow from '../select/useShowArrow';
|
|
37
37
|
import { useCompactItemContext } from '../space/Compact';
|
|
38
|
-
import SwitcherIconCom from '../tree/utils/iconUtil';
|
|
39
38
|
import { useToken } from '../theme/internal';
|
|
39
|
+
import SwitcherIconCom from '../tree/utils/iconUtil';
|
|
40
40
|
import useStyle from './style';
|
|
41
|
+
import { useComponentConfig } from '../config-provider/context';
|
|
41
42
|
var InternalTreeSelect = function InternalTreeSelect(props, ref) {
|
|
42
|
-
var
|
|
43
|
+
var _classNames$popup, _contextClassNames$po, _styles$popup, _contextStyles$popup, _ref3;
|
|
43
44
|
var customizePrefixCls = props.prefixCls,
|
|
44
45
|
customizeSize = props.size,
|
|
45
46
|
customDisabled = props.disabled,
|
|
46
47
|
_props$bordered = props.bordered,
|
|
47
48
|
bordered = _props$bordered === void 0 ? true : _props$bordered,
|
|
49
|
+
style = props.style,
|
|
48
50
|
className = props.className,
|
|
49
51
|
rootClassName = props.rootClassName,
|
|
50
52
|
treeCheckable = props.treeCheckable,
|
|
@@ -72,7 +74,16 @@ var InternalTreeSelect = function InternalTreeSelect(props, ref) {
|
|
|
72
74
|
allowClear = props.allowClear,
|
|
73
75
|
customVariant = props.variant,
|
|
74
76
|
dropdownStyle = props.dropdownStyle,
|
|
77
|
+
dropdownRender = props.dropdownRender,
|
|
78
|
+
popupRender = props.popupRender,
|
|
79
|
+
onDropdownVisibleChange = props.onDropdownVisibleChange,
|
|
80
|
+
onOpenChange = props.onOpenChange,
|
|
75
81
|
tagRender = props.tagRender,
|
|
82
|
+
maxCount = props.maxCount,
|
|
83
|
+
showCheckedStrategy = props.showCheckedStrategy,
|
|
84
|
+
treeCheckStrictly = props.treeCheckStrictly,
|
|
85
|
+
styles = props.styles,
|
|
86
|
+
classNames = props.classNames,
|
|
76
87
|
restProps = _objectWithoutProperties(props, _excluded);
|
|
77
88
|
var _React$useContext = React.useContext(ConfigContext),
|
|
78
89
|
getContextPopupContainer = _React$useContext.getPopupContainer,
|
|
@@ -82,17 +93,32 @@ var InternalTreeSelect = function InternalTreeSelect(props, ref) {
|
|
|
82
93
|
virtual = _React$useContext.virtual,
|
|
83
94
|
contextPopupMatchSelectWidth = _React$useContext.popupMatchSelectWidth,
|
|
84
95
|
popupOverflow = _React$useContext.popupOverflow;
|
|
96
|
+
var _useComponentConfig = useComponentConfig('treeSelect'),
|
|
97
|
+
contextStyles = _useComponentConfig.styles,
|
|
98
|
+
contextClassNames = _useComponentConfig.classNames;
|
|
85
99
|
var _useToken = useToken(),
|
|
86
100
|
_useToken2 = _slicedToArray(_useToken, 2),
|
|
87
101
|
token = _useToken2[1];
|
|
88
102
|
var listItemHeight = customListItemHeight !== null && customListItemHeight !== void 0 ? customListItemHeight : (token === null || token === void 0 ? void 0 : token.controlHeightSM) + (token === null || token === void 0 ? void 0 : token.paddingXXS);
|
|
89
103
|
if (process.env.NODE_ENV !== 'production') {
|
|
90
104
|
var warning = devUseWarning('TreeSelect');
|
|
105
|
+
var deprecatedProps = {
|
|
106
|
+
dropdownMatchSelectWidth: 'popupMatchSelectWidth',
|
|
107
|
+
dropdownStyle: 'styles.popup.root',
|
|
108
|
+
dropdownClassName: 'classNames.popup.root',
|
|
109
|
+
popupClassName: 'classNames.popup.root',
|
|
110
|
+
dropdownRender: 'popupRender',
|
|
111
|
+
onDropdownVisibleChange: 'onOpenChange',
|
|
112
|
+
bordered: 'variant'
|
|
113
|
+
};
|
|
114
|
+
Object.entries(deprecatedProps).forEach(function (_ref) {
|
|
115
|
+
var _ref2 = _slicedToArray(_ref, 2),
|
|
116
|
+
oldProp = _ref2[0],
|
|
117
|
+
newProp = _ref2[1];
|
|
118
|
+
warning.deprecated(!(oldProp in props), oldProp, newProp);
|
|
119
|
+
});
|
|
91
120
|
warning(multiple !== false || !treeCheckable, 'usage', '`multiple` will always be `true` when `treeCheckable` is true');
|
|
92
|
-
warning.deprecated(!dropdownClassName, 'dropdownClassName', 'popupClassName');
|
|
93
|
-
warning.deprecated(dropdownMatchSelectWidth === undefined, 'dropdownMatchSelectWidth', 'popupMatchSelectWidth');
|
|
94
121
|
warning(!('showArrow' in props), 'deprecated', '`showArrow` is deprecated which will be removed in next major version. It will be a default behavior, you can hide it by setting `suffixIcon` to null.');
|
|
95
|
-
warning.deprecated(!('bordered' in props), 'bordered', 'variant');
|
|
96
122
|
}
|
|
97
123
|
var rootPrefixCls = getPrefixCls();
|
|
98
124
|
var prefixCls = getPrefixCls('select', customizePrefixCls);
|
|
@@ -115,10 +141,19 @@ var InternalTreeSelect = function InternalTreeSelect(props, ref) {
|
|
|
115
141
|
_useVariant2 = _slicedToArray(_useVariant, 2),
|
|
116
142
|
variant = _useVariant2[0],
|
|
117
143
|
enableVariantCls = _useVariant2[1];
|
|
118
|
-
var
|
|
144
|
+
var mergedPopupClassName = cls((classNames === null || classNames === void 0 || (_classNames$popup = classNames.popup) === null || _classNames$popup === void 0 ? void 0 : _classNames$popup.root) || (contextClassNames === null || contextClassNames === void 0 || (_contextClassNames$po = contextClassNames.popup) === null || _contextClassNames$po === void 0 ? void 0 : _contextClassNames$po.root) || popupClassName || dropdownClassName, "".concat(treeSelectPrefixCls, "-dropdown"), _defineProperty({}, "".concat(treeSelectPrefixCls, "-dropdown-rtl"), direction === 'rtl'), rootClassName, contextClassNames.root, classNames === null || classNames === void 0 ? void 0 : classNames.root, cssVarCls, rootCls, treeSelectRootCls, hashId);
|
|
145
|
+
var mergedPopupStyle = (styles === null || styles === void 0 || (_styles$popup = styles.popup) === null || _styles$popup === void 0 ? void 0 : _styles$popup.root) || (contextStyles === null || contextStyles === void 0 || (_contextStyles$popup = contextStyles.popup) === null || _contextStyles$popup === void 0 ? void 0 : _contextStyles$popup.root) || dropdownStyle;
|
|
146
|
+
var mergedPopupRender = popupRender || dropdownRender;
|
|
147
|
+
var mergedOnOpenChange = onOpenChange || onDropdownVisibleChange;
|
|
119
148
|
var isMultiple = !!(treeCheckable || multiple);
|
|
149
|
+
var mergedMaxCount = React.useMemo(function () {
|
|
150
|
+
if (maxCount && (showCheckedStrategy === 'SHOW_ALL' && !treeCheckStrictly || showCheckedStrategy === 'SHOW_PARENT')) {
|
|
151
|
+
return undefined;
|
|
152
|
+
}
|
|
153
|
+
return maxCount;
|
|
154
|
+
}, [maxCount, showCheckedStrategy, treeCheckStrictly]);
|
|
120
155
|
var showSuffixIcon = useShowArrow(props.suffixIcon, props.showArrow);
|
|
121
|
-
var mergedPopupMatchSelectWidth = (
|
|
156
|
+
var mergedPopupMatchSelectWidth = (_ref3 = popupMatchSelectWidth !== null && popupMatchSelectWidth !== void 0 ? popupMatchSelectWidth : dropdownMatchSelectWidth) !== null && _ref3 !== void 0 ? _ref3 : contextPopupMatchSelectWidth;
|
|
122
157
|
// ===================== Form =====================
|
|
123
158
|
var _React$useContext2 = React.useContext(FormItemInputContext),
|
|
124
159
|
contextStatus = _React$useContext2.status,
|
|
@@ -151,7 +186,7 @@ var InternalTreeSelect = function InternalTreeSelect(props, ref) {
|
|
|
151
186
|
});
|
|
152
187
|
}
|
|
153
188
|
// ==================== Render =====================
|
|
154
|
-
var selectProps = omit(restProps, ['suffixIcon', 'removeIcon', 'clearIcon', 'itemIcon', 'switcherIcon']);
|
|
189
|
+
var selectProps = omit(restProps, ['suffixIcon', 'removeIcon', 'clearIcon', 'itemIcon', 'switcherIcon', 'style']);
|
|
155
190
|
// ===================== Placement =====================
|
|
156
191
|
var memoizedPlacement = React.useMemo(function () {
|
|
157
192
|
if (placement !== undefined) {
|
|
@@ -160,13 +195,13 @@ var InternalTreeSelect = function InternalTreeSelect(props, ref) {
|
|
|
160
195
|
return direction === 'rtl' ? 'bottomRight' : 'bottomLeft';
|
|
161
196
|
}, [placement, direction]);
|
|
162
197
|
var mergedSize = useSize(function (ctx) {
|
|
163
|
-
var
|
|
164
|
-
return (
|
|
198
|
+
var _ref4;
|
|
199
|
+
return (_ref4 = customizeSize !== null && customizeSize !== void 0 ? customizeSize : compactSize) !== null && _ref4 !== void 0 ? _ref4 : ctx;
|
|
165
200
|
});
|
|
166
201
|
// ===================== Disabled =====================
|
|
167
202
|
var disabled = React.useContext(DisabledContext);
|
|
168
203
|
var mergedDisabled = customDisabled !== null && customDisabled !== void 0 ? customDisabled : disabled;
|
|
169
|
-
var mergedClassName =
|
|
204
|
+
var mergedClassName = cls(!customizePrefixCls && treeSelectPrefixCls, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(prefixCls, "-lg"), mergedSize === 'large'), "".concat(prefixCls, "-sm"), mergedSize === 'small'), "".concat(prefixCls, "-rtl"), direction === 'rtl'), "".concat(prefixCls, "-").concat(variant), enableVariantCls), "".concat(prefixCls, "-in-form-item"), isFormItemInput), getStatusClassNames(prefixCls, mergedStatus, hasFeedback), compactItemClassnames, className, rootClassName, contextClassNames.root, classNames === null || classNames === void 0 ? void 0 : classNames.root, cssVarCls, rootCls, treeSelectRootCls, hashId);
|
|
170
205
|
var renderSwitcherIcon = function renderSwitcherIcon(nodeProps) {
|
|
171
206
|
return _jsx(SwitcherIconCom, {
|
|
172
207
|
prefixCls: treePrefixCls,
|
|
@@ -176,7 +211,7 @@ var InternalTreeSelect = function InternalTreeSelect(props, ref) {
|
|
|
176
211
|
});
|
|
177
212
|
};
|
|
178
213
|
// ============================ zIndex ============================
|
|
179
|
-
var _useZIndex = useZIndex('SelectLike',
|
|
214
|
+
var _useZIndex = useZIndex('SelectLike', mergedPopupStyle === null || mergedPopupStyle === void 0 ? void 0 : mergedPopupStyle.zIndex),
|
|
180
215
|
_useZIndex2 = _slicedToArray(_useZIndex, 1),
|
|
181
216
|
zIndex = _useZIndex2[0];
|
|
182
217
|
var returnNode = _jsx(RcTreeSelect, _objectSpread(_objectSpread({
|
|
@@ -188,6 +223,7 @@ var InternalTreeSelect = function InternalTreeSelect(props, ref) {
|
|
|
188
223
|
ref: ref,
|
|
189
224
|
prefixCls: prefixCls,
|
|
190
225
|
className: mergedClassName,
|
|
226
|
+
style: _objectSpread(_objectSpread({}, styles === null || styles === void 0 ? void 0 : styles.root), style),
|
|
191
227
|
listHeight: listHeight,
|
|
192
228
|
listItemHeight: listItemHeight,
|
|
193
229
|
treeCheckable: treeCheckable ? _jsx("span", {
|
|
@@ -204,14 +240,19 @@ var InternalTreeSelect = function InternalTreeSelect(props, ref) {
|
|
|
204
240
|
notFoundContent: mergedNotFound,
|
|
205
241
|
getPopupContainer: getPopupContainer || getContextPopupContainer,
|
|
206
242
|
treeMotion: null,
|
|
207
|
-
dropdownClassName:
|
|
208
|
-
dropdownStyle: _objectSpread(_objectSpread({},
|
|
243
|
+
dropdownClassName: mergedPopupClassName,
|
|
244
|
+
dropdownStyle: _objectSpread(_objectSpread({}, mergedPopupStyle), {}, {
|
|
209
245
|
zIndex: zIndex
|
|
210
246
|
}),
|
|
247
|
+
dropdownRender: mergedPopupRender,
|
|
248
|
+
onDropdownVisibleChange: mergedOnOpenChange,
|
|
211
249
|
choiceTransitionName: getTransitionName(rootPrefixCls, '', choiceTransitionName),
|
|
212
250
|
transitionName: getTransitionName(rootPrefixCls, 'slide-up', transitionName),
|
|
213
251
|
treeExpandAction: treeExpandAction,
|
|
214
|
-
tagRender: isMultiple ? tagRender : undefined
|
|
252
|
+
tagRender: isMultiple ? tagRender : undefined,
|
|
253
|
+
maxCount: mergedMaxCount,
|
|
254
|
+
showCheckedStrategy: showCheckedStrategy,
|
|
255
|
+
treeCheckStrictly: treeCheckStrictly
|
|
215
256
|
}));
|
|
216
257
|
return wrapCSSVar(treeSelectWrapCSSVar(returnNode));
|
|
217
258
|
};
|
|
@@ -219,7 +260,9 @@ var TreeSelectRef = /*#__PURE__*/React.forwardRef(InternalTreeSelect);
|
|
|
219
260
|
var TreeSelect = TreeSelectRef;
|
|
220
261
|
// We don't care debug panel
|
|
221
262
|
/* istanbul ignore next */
|
|
222
|
-
var PurePanel = genPurePanel(TreeSelect)
|
|
263
|
+
var PurePanel = genPurePanel(TreeSelect, 'dropdownAlign', function (props) {
|
|
264
|
+
return omit(props, ['visible']);
|
|
265
|
+
});
|
|
223
266
|
TreeSelect.TreeNode = TreeNode;
|
|
224
267
|
TreeSelect.SHOW_ALL = SHOW_ALL;
|
|
225
268
|
TreeSelect.SHOW_PARENT = SHOW_PARENT;
|
|
@@ -21,7 +21,7 @@ var genBaseStyle = function genBaseStyle(token) {
|
|
|
21
21
|
// ====================== Tree ======================
|
|
22
22
|
genTreeStyle(treePrefixCls, mergeToken(token, {
|
|
23
23
|
colorBgContainer: colorBgElevated
|
|
24
|
-
})), _defineProperty({}, treeCls, _defineProperty({
|
|
24
|
+
}), false), _defineProperty({}, treeCls, _defineProperty({
|
|
25
25
|
borderRadius: 0
|
|
26
26
|
}, "".concat(treeCls, "-list-holder-inner"), _defineProperty({
|
|
27
27
|
alignItems: 'stretch'
|
|
@@ -133,9 +133,9 @@ export default function EllipsisMeasure(props) {
|
|
|
133
133
|
ellipsisHeight = _React$useState8[0],
|
|
134
134
|
setEllipsisHeight = _React$useState8[1];
|
|
135
135
|
var _React$useState9 = React.useState(null),
|
|
136
|
-
_React$
|
|
137
|
-
parentWhiteSpace = _React$
|
|
138
|
-
setParentWhiteSpace = _React$
|
|
136
|
+
_React$useState0 = _slicedToArray(_React$useState9, 2),
|
|
137
|
+
parentWhiteSpace = _React$useState0[0],
|
|
138
|
+
setParentWhiteSpace = _React$useState0[1];
|
|
139
139
|
// Trigger start measure
|
|
140
140
|
useLayoutEffect(function () {
|
|
141
141
|
if (enableMeasure && width && nodeLen) {
|
|
@@ -1,5 +1,9 @@
|
|
|
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
2
|
var _excluded = ["prefixCls", "className", "style", "type", "disabled", "children", "ellipsis", "editable", "copyable", "component", "title"];
|
|
3
|
+
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
|
|
4
|
+
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."); }
|
|
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); }
|
|
3
7
|
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
8
|
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
9
|
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; }
|
|
@@ -62,6 +66,7 @@ function wrapperDecorations(_ref, content) {
|
|
|
62
66
|
return currentContent;
|
|
63
67
|
}
|
|
64
68
|
var ELLIPSIS_STR = '...';
|
|
69
|
+
var DECORATION_PROPS = ['delete', 'mark', 'code', 'underline', 'strong', 'keyboard', 'italic'];
|
|
65
70
|
var Base = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
66
71
|
var customizePrefixCls = props.prefixCls,
|
|
67
72
|
className = props.className,
|
|
@@ -85,7 +90,7 @@ var Base = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
85
90
|
var editIconRef = React.useRef(null);
|
|
86
91
|
// ============================ MISC ============================
|
|
87
92
|
var prefixCls = getPrefixCls('typography', customizePrefixCls);
|
|
88
|
-
var textProps = omit(restProps,
|
|
93
|
+
var textProps = omit(restProps, DECORATION_PROPS);
|
|
89
94
|
// ========================== Editable ==========================
|
|
90
95
|
var _useMergedConfig = useMergedConfig(editable),
|
|
91
96
|
_useMergedConfig2 = _slicedToArray(_useMergedConfig, 2),
|
|
@@ -158,9 +163,9 @@ var Base = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
158
163
|
isNativeEllipsis = _React$useState8[0],
|
|
159
164
|
setIsNativeEllipsis = _React$useState8[1];
|
|
160
165
|
var _React$useState9 = React.useState(true),
|
|
161
|
-
_React$
|
|
162
|
-
isNativeVisible = _React$
|
|
163
|
-
setIsNativeVisible = _React$
|
|
166
|
+
_React$useState0 = _slicedToArray(_React$useState9, 2),
|
|
167
|
+
isNativeVisible = _React$useState0[0],
|
|
168
|
+
setIsNativeVisible = _React$useState0[1];
|
|
164
169
|
var _useMergedConfig5 = useMergedConfig(ellipsis, {
|
|
165
170
|
expandable: false,
|
|
166
171
|
symbol: function symbol(isExpanded) {
|
|
@@ -196,10 +201,10 @@ var Base = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
196
201
|
setIsTextOverflowSupport(isStyleSupport('textOverflow'));
|
|
197
202
|
}
|
|
198
203
|
}, [needMeasureEllipsis, enableEllipsis]);
|
|
199
|
-
var _React$
|
|
200
|
-
_React$
|
|
201
|
-
cssEllipsis = _React$
|
|
202
|
-
setCssEllipsis = _React$
|
|
204
|
+
var _React$useState1 = React.useState(mergedEnableEllipsis),
|
|
205
|
+
_React$useState10 = _slicedToArray(_React$useState1, 2),
|
|
206
|
+
cssEllipsis = _React$useState10[0],
|
|
207
|
+
setCssEllipsis = _React$useState10[1];
|
|
203
208
|
var canUseCssEllipsis = React.useMemo(function () {
|
|
204
209
|
if (needMeasureEllipsis) {
|
|
205
210
|
return false;
|
|
@@ -223,10 +228,10 @@ var Base = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
223
228
|
setExpanded(info.expanded);
|
|
224
229
|
(_ellipsisConfig$onExp = ellipsisConfig.onExpand) === null || _ellipsisConfig$onExp === void 0 || _ellipsisConfig$onExp.call(ellipsisConfig, e, info);
|
|
225
230
|
};
|
|
226
|
-
var _React$
|
|
227
|
-
_React$
|
|
228
|
-
ellipsisWidth = _React$
|
|
229
|
-
setEllipsisWidth = _React$
|
|
231
|
+
var _React$useState11 = React.useState(0),
|
|
232
|
+
_React$useState12 = _slicedToArray(_React$useState11, 2),
|
|
233
|
+
ellipsisWidth = _React$useState12[0],
|
|
234
|
+
setEllipsisWidth = _React$useState12[1];
|
|
230
235
|
var onResize = function onResize(_ref2) {
|
|
231
236
|
var offsetWidth = _ref2.offsetWidth;
|
|
232
237
|
setEllipsisWidth(offsetWidth);
|
|
@@ -386,7 +391,9 @@ var Base = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
386
391
|
width: ellipsisWidth,
|
|
387
392
|
onEllipsis: onJsEllipsis,
|
|
388
393
|
expanded: expanded,
|
|
389
|
-
miscDeps: [copied, expanded, copyLoading, enableEdit, enableCopy, textLocale]
|
|
394
|
+
miscDeps: [copied, expanded, copyLoading, enableEdit, enableCopy, textLocale].concat(_toConsumableArray(DECORATION_PROPS.map(function (key) {
|
|
395
|
+
return props[key];
|
|
396
|
+
}))),
|
|
390
397
|
children: function children(node, canEllipsis) {
|
|
391
398
|
return wrapperDecorations(props, _jsxs(_Fragment, {
|
|
392
399
|
children: [node.length > 0 && canEllipsis && !expanded && topAriaLabel ? _jsx("span", {
|
|
@@ -34,7 +34,7 @@ var Editable = function Editable(props) {
|
|
|
34
34
|
enterIcon = _props$enterIcon === void 0 ? _jsx(EnterOutlined, {}) : _props$enterIcon;
|
|
35
35
|
var ref = React.useRef(null);
|
|
36
36
|
var inComposition = React.useRef(false);
|
|
37
|
-
var lastKeyCode = React.useRef();
|
|
37
|
+
var lastKeyCode = React.useRef(null);
|
|
38
38
|
var _React$useState = React.useState(value),
|
|
39
39
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
40
40
|
current = _React$useState2[0],
|
|
@@ -18,7 +18,7 @@ import * as React from 'react';
|
|
|
18
18
|
import classNames from 'classnames';
|
|
19
19
|
import { composeRef } from 'rc-util/lib/ref';
|
|
20
20
|
import { devUseWarning } from '../_util/warning';
|
|
21
|
-
import {
|
|
21
|
+
import { useComponentConfig } from '../config-provider/context';
|
|
22
22
|
import useStyle from './style';
|
|
23
23
|
var Typography = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
24
24
|
var customizePrefixCls = props.prefixCls,
|
|
@@ -31,10 +31,11 @@ var Typography = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
31
31
|
typographyDirection = props.direction,
|
|
32
32
|
style = props.style,
|
|
33
33
|
restProps = _objectWithoutProperties(props, _excluded);
|
|
34
|
-
var
|
|
35
|
-
getPrefixCls =
|
|
36
|
-
contextDirection =
|
|
37
|
-
|
|
34
|
+
var _useComponentConfig = useComponentConfig('typography'),
|
|
35
|
+
getPrefixCls = _useComponentConfig.getPrefixCls,
|
|
36
|
+
contextDirection = _useComponentConfig.direction,
|
|
37
|
+
contextClassName = _useComponentConfig.className,
|
|
38
|
+
contextStyle = _useComponentConfig.style;
|
|
38
39
|
var direction = typographyDirection !== null && typographyDirection !== void 0 ? typographyDirection : contextDirection;
|
|
39
40
|
var mergedRef = setContentRef ? composeRef(ref, setContentRef) : ref;
|
|
40
41
|
var prefixCls = getPrefixCls('typography', customizePrefixCls);
|
|
@@ -48,8 +49,8 @@ var Typography = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
48
49
|
wrapCSSVar = _useStyle2[0],
|
|
49
50
|
hashId = _useStyle2[1],
|
|
50
51
|
cssVarCls = _useStyle2[2];
|
|
51
|
-
var componentClassName = classNames(prefixCls,
|
|
52
|
-
var mergedStyle = _objectSpread(_objectSpread({},
|
|
52
|
+
var componentClassName = classNames(prefixCls, contextClassName, _defineProperty({}, "".concat(prefixCls, "-rtl"), direction === 'rtl'), className, rootClassName, hashId, cssVarCls);
|
|
53
|
+
var mergedStyle = _objectSpread(_objectSpread({}, contextStyle), style);
|
|
53
54
|
return wrapCSSVar(
|
|
54
55
|
// @ts-expect-error: Expression produces a union type that is too complex to represent.
|
|
55
56
|
_jsx(Component, _objectSpread(_objectSpread({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
function
|
|
2
|
-
function
|
|
1
|
+
function _regenerator() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ var e, t, r = "function" == typeof Symbol ? Symbol : {}, n = r.iterator || "@@iterator", o = r.toStringTag || "@@toStringTag"; function i(r, n, o, i) { var c = n && n.prototype instanceof Generator ? n : Generator, u = Object.create(c.prototype); return _regeneratorDefine2(u, "_invoke", function (r, n, o) { var i, c, u, f = 0, p = o || [], y = !1, G = { p: 0, n: 0, v: e, a: d, f: d.bind(e, 4), d: function d(t, r) { return i = t, c = 0, u = e, G.n = r, a; } }; function d(r, n) { for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { var o, i = p[t], d = G.p, l = i[2]; r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); } if (o || r > 1) return a; throw y = !0, n; } return function (o, p, l) { if (f > 1) throw TypeError("Generator is already running"); for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); try { if (f = 2, i) { if (c || (o = "next"), t = i[o]) { if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); if (!t.done) return t; u = t.value, c < 2 && (c = 0); } else 1 === c && (t = i["return"]) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); i = e; } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; } catch (t) { i = e, c = 1, u = t; } finally { f = 1; } } return { value: t, done: y }; }; }(r, o, i), !0), u; } var a = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} t = Object.getPrototypeOf; var c = [][n] ? t(t([][n]())) : (_regeneratorDefine2(t = {}, n, function () { return this; }), t), u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); function f(e) { return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, _regeneratorDefine2(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, _regeneratorDefine2(u, "constructor", GeneratorFunctionPrototype), _regeneratorDefine2(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", _regeneratorDefine2(GeneratorFunctionPrototype, o, "GeneratorFunction"), _regeneratorDefine2(u), _regeneratorDefine2(u, o, "Generator"), _regeneratorDefine2(u, n, function () { return this; }), _regeneratorDefine2(u, "toString", function () { return "[object Generator]"; }), (_regenerator = function _regenerator() { return { w: i, m: f }; })(); }
|
|
2
|
+
function _regeneratorDefine2(e, r, n, t) { var i = Object.defineProperty; try { i({}, "", {}); } catch (e) { i = 0; } _regeneratorDefine2 = function _regeneratorDefine(e, r, n, t) { if (r) i ? i(e, r, { value: n, enumerable: !t, configurable: !t, writable: !t }) : e[r] = n;else { var o = function o(r, n) { _regeneratorDefine2(e, r, function (e) { return this._invoke(r, n, e); }); }; o("next", 0), o("throw", 1), o("return", 2); } }, _regeneratorDefine2(e, r, n, t); }
|
|
3
3
|
function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
|
|
4
4
|
function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
|
|
5
5
|
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
@@ -38,29 +38,29 @@ var useCopyClick = function useCopyClick(_ref) {
|
|
|
38
38
|
}, []);
|
|
39
39
|
// Keep copy action up to date
|
|
40
40
|
var onClick = useEvent(/*#__PURE__*/function () {
|
|
41
|
-
var _ref2 = _asyncToGenerator(/*#__PURE__*/
|
|
42
|
-
var _copyConfig$onCopy, text;
|
|
43
|
-
return
|
|
44
|
-
while (1) switch (_context.
|
|
41
|
+
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(e) {
|
|
42
|
+
var _copyConfig$onCopy, text, _t, _t2;
|
|
43
|
+
return _regenerator().w(function (_context) {
|
|
44
|
+
while (1) switch (_context.n) {
|
|
45
45
|
case 0:
|
|
46
46
|
e === null || e === void 0 || e.preventDefault();
|
|
47
47
|
e === null || e === void 0 || e.stopPropagation();
|
|
48
48
|
setCopyLoading(true);
|
|
49
|
-
_context.
|
|
49
|
+
_context.p = 1;
|
|
50
50
|
if (!(typeof copyConfig.text === 'function')) {
|
|
51
|
-
_context.
|
|
51
|
+
_context.n = 3;
|
|
52
52
|
break;
|
|
53
53
|
}
|
|
54
|
-
_context.
|
|
54
|
+
_context.n = 2;
|
|
55
55
|
return copyConfig.text();
|
|
56
|
-
case
|
|
57
|
-
|
|
58
|
-
_context.
|
|
56
|
+
case 2:
|
|
57
|
+
_t = _context.v;
|
|
58
|
+
_context.n = 4;
|
|
59
59
|
break;
|
|
60
|
-
case
|
|
61
|
-
|
|
62
|
-
case
|
|
63
|
-
text =
|
|
60
|
+
case 3:
|
|
61
|
+
_t = copyConfig.text;
|
|
62
|
+
case 4:
|
|
63
|
+
text = _t;
|
|
64
64
|
copy(text || toList(children, true).join('') || '', copyOptions);
|
|
65
65
|
setCopyLoading(false);
|
|
66
66
|
setCopied(true);
|
|
@@ -70,18 +70,17 @@ var useCopyClick = function useCopyClick(_ref) {
|
|
|
70
70
|
setCopied(false);
|
|
71
71
|
}, 3000);
|
|
72
72
|
(_copyConfig$onCopy = copyConfig.onCopy) === null || _copyConfig$onCopy === void 0 || _copyConfig$onCopy.call(copyConfig, e);
|
|
73
|
-
_context.
|
|
73
|
+
_context.n = 6;
|
|
74
74
|
break;
|
|
75
|
-
case
|
|
76
|
-
_context.
|
|
77
|
-
|
|
75
|
+
case 5:
|
|
76
|
+
_context.p = 5;
|
|
77
|
+
_t2 = _context.v;
|
|
78
78
|
setCopyLoading(false);
|
|
79
|
-
throw
|
|
80
|
-
case
|
|
81
|
-
|
|
82
|
-
return _context.stop();
|
|
79
|
+
throw _t2;
|
|
80
|
+
case 6:
|
|
81
|
+
return _context.a(2);
|
|
83
82
|
}
|
|
84
|
-
}, _callee, null, [[
|
|
83
|
+
}, _callee, null, [[1, 5]]);
|
|
85
84
|
}));
|
|
86
85
|
return function (_x) {
|
|
87
86
|
return _ref2.apply(this, arguments);
|
|
@@ -17,16 +17,16 @@ var genTypographyStyle = function genTypographyStyle(token) {
|
|
|
17
17
|
}, "&".concat(componentCls, "-secondary"), {
|
|
18
18
|
color: token.colorTextDescription
|
|
19
19
|
}), "&".concat(componentCls, "-success"), {
|
|
20
|
-
color: token.
|
|
20
|
+
color: token.colorSuccessText
|
|
21
21
|
}), "&".concat(componentCls, "-warning"), {
|
|
22
|
-
color: token.
|
|
22
|
+
color: token.colorWarningText
|
|
23
23
|
}), "&".concat(componentCls, "-danger"), {
|
|
24
|
-
color: token.
|
|
24
|
+
color: token.colorErrorText,
|
|
25
25
|
'a&:active, a&:focus': {
|
|
26
|
-
color: token.
|
|
26
|
+
color: token.colorErrorTextActive
|
|
27
27
|
},
|
|
28
28
|
'a&:hover': {
|
|
29
|
-
color: token.
|
|
29
|
+
color: token.colorErrorTextHover
|
|
30
30
|
}
|
|
31
31
|
}), "&".concat(componentCls, "-disabled"), {
|
|
32
32
|
color: token.colorTextDisabled,
|
|
@@ -158,7 +158,7 @@ export var getEditableStyles = function getEditableStyles(token) {
|
|
|
158
158
|
position: 'absolute',
|
|
159
159
|
insetInlineEnd: token.calc(token.marginXS).add(2).equal(),
|
|
160
160
|
insetBlockEnd: token.marginXS,
|
|
161
|
-
color: token.
|
|
161
|
+
color: token.colorIcon,
|
|
162
162
|
// default style
|
|
163
163
|
fontWeight: 'normal',
|
|
164
164
|
fontSize: token.fontSize,
|