tntd 2.7.29 → 2.7.30
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/es/affix/style/index.js.map +1 -0
- package/es/affix/style/index.less +6 -0
- package/es/alert/style/index.js +2 -0
- package/es/alert/style/index.js.map +1 -0
- package/es/alert/style/index.less +188 -0
- package/es/anchor/style/index.js +4 -0
- package/es/anchor/style/index.js.map +1 -0
- package/es/anchor/style/index.less +82 -0
- package/es/auto-complete/style/index.js +5 -0
- package/es/auto-complete/style/index.js.map +1 -0
- package/es/auto-complete/style/index.less +92 -0
- package/es/avatar/style/index.js +2 -0
- package/es/avatar/style/index.js.map +1 -0
- package/es/avatar/style/index.less +59 -0
- package/es/back-top/style/index.js +2 -0
- package/es/back-top/style/index.js.map +1 -0
- package/es/back-top/style/index.less +42 -0
- package/es/back-top/style/responsive.less +11 -0
- package/es/badge/style/index.js +2 -0
- package/es/badge/style/index.js.map +1 -0
- package/es/badge/style/index.less +190 -0
- package/es/breadcrumb/style/index.js +4 -0
- package/es/breadcrumb/style/index.js.map +1 -0
- package/es/breadcrumb/style/index.less +51 -0
- package/es/button/style/index.js +2 -0
- package/es/button/style/index.js.map +1 -0
- package/es/button/style/index.less +224 -0
- package/es/button/style/mixin.less +357 -0
- package/es/calendar/style/index.js +5 -0
- package/es/calendar/style/index.js.map +1 -0
- package/es/calendar/style/index.less +278 -0
- package/es/card/style/index.js +6 -0
- package/es/card/style/index.js.map +1 -0
- package/es/card/style/index.less +263 -0
- package/es/card/style/size.less +25 -0
- package/es/carousel/style/index.js +2 -0
- package/es/carousel/style/index.js.map +1 -0
- package/es/carousel/style/index.less +238 -0
- package/es/cascader/style/index.js +5 -0
- package/es/cascader/style/index.js.map +1 -0
- package/es/cascader/style/index.less +227 -0
- package/es/checkbox/style/index.js +2 -0
- package/es/checkbox/style/index.js.map +1 -0
- package/es/checkbox/style/index.less +4 -0
- package/es/checkbox/style/mixin.less +220 -0
- package/es/col/style/index.js +4 -0
- package/es/col/style/index.js.map +1 -0
- package/es/collapse/style/index.js +2 -0
- package/es/collapse/style/index.js.map +1 -0
- package/es/collapse/style/index.less +134 -0
- package/es/comment/style/index.js +2 -0
- package/es/comment/style/index.js.map +1 -0
- package/es/comment/style/index.less +93 -0
- package/es/config-provider/style/index.js +1 -0
- package/es/config-provider/style/index.js.map +1 -0
- package/es/config-provider/style/index.less +2 -0
- package/es/date-picker/style/Calendar.less +402 -0
- package/es/date-picker/style/DecadePanel.less +81 -0
- package/es/date-picker/style/MonthPanel.less +86 -0
- package/es/date-picker/style/MonthPicker.less +11 -0
- package/es/date-picker/style/Picker.less +113 -0
- package/es/date-picker/style/RangePicker.less +248 -0
- package/es/date-picker/style/TimePicker.less +151 -0
- package/es/date-picker/style/WeekPicker.less +21 -0
- package/es/date-picker/style/YearPanel.less +85 -0
- package/es/date-picker/style/index.js +7 -0
- package/es/date-picker/style/index.js.map +1 -0
- package/es/date-picker/style/index.less +17 -0
- package/es/descriptions/style/index.js +2 -0
- package/es/descriptions/style/index.js.map +1 -0
- package/es/descriptions/style/index.less +144 -0
- package/es/divider/style/index.js +2 -0
- package/es/divider/style/index.js.map +1 -0
- package/es/divider/style/index.less +109 -0
- package/es/drawer/style/drawer.less +230 -0
- package/es/drawer/style/index.js +3 -0
- package/es/drawer/style/index.js.map +1 -0
- package/es/drawer/style/index.less +3 -0
- package/es/dropdown/style/index.js +4 -0
- package/es/dropdown/style/index.js.map +1 -0
- package/es/dropdown/style/index.less +282 -0
- package/es/empty/style/index.js +2 -0
- package/es/empty/style/index.js.map +1 -0
- package/es/empty/style/index.less +52 -0
- package/es/form/style/index.js +4 -0
- package/es/form/style/index.js.map +1 -0
- package/es/form/style/index.less +653 -0
- package/es/form/style/mixin.less +126 -0
- package/es/grid-v4/RowContext.js.map +1 -0
- package/es/{tntd-form/grid → grid-v4}/col.js +0 -1
- package/es/grid-v4/col.js.map +1 -0
- package/es/grid-v4/hooks/useBreakpoint.js.map +1 -0
- package/es/grid-v4/index.js.map +1 -0
- package/es/{tntd-form/grid → grid-v4}/row.js +1 -0
- package/es/grid-v4/row.js.map +1 -0
- package/es/grid-v4/style/index.js +2 -0
- package/es/grid-v4/style/index.js.map +1 -0
- package/es/grid-v4/style/index.less +124 -0
- package/es/grid-v4/style/mixin.less +57 -0
- package/es/grid-v4/style/rtl.less +69 -0
- package/es/handle/handle.js +138 -0
- package/es/handle/handle.js.map +1 -0
- package/es/icon/style/index.js +2 -0
- package/es/icon/style/index.js.map +1 -0
- package/es/icon/style/index.less +4 -0
- package/es/input/style/index.js +4 -0
- package/es/input/style/index.js.map +1 -0
- package/es/input/style/index.less +57 -0
- package/es/input/style/mixin.less +449 -0
- package/es/input/style/search-input.less +34 -0
- package/es/input-number/style/index.js +2 -0
- package/es/input-number/style/index.js.map +1 -0
- package/es/input-number/style/index.less +179 -0
- package/es/layout/style/index.js +2 -0
- package/es/layout/style/index.js.map +1 -0
- package/es/layout/style/index.less +124 -0
- package/es/layout/style/light.less +15 -0
- package/es/list/style/bordered.less +41 -0
- package/es/list/style/index.js +7 -0
- package/es/list/style/index.js.map +1 -0
- package/es/list/style/index.less +234 -0
- package/es/list/style/responsive.less +40 -0
- package/es/locale-provider/style/index.js +1 -0
- package/es/locale-provider/style/index.js.map +1 -0
- package/es/locale-provider/style/index.less +2 -0
- package/es/mention/index.js +4 -0
- package/es/mention/index.js.map +1 -0
- package/es/mentions/style/index.js +4 -0
- package/es/mentions/style/index.js.map +1 -0
- package/es/mentions/style/index.less +164 -0
- package/es/menu/style/dark.less +139 -0
- package/es/menu/style/index.js +5 -0
- package/es/menu/style/index.js.map +1 -0
- package/es/menu/style/index.less +515 -0
- package/es/message/style/index.js +2 -0
- package/es/message/style/index.js.map +1 -0
- package/es/message/style/index.less +75 -0
- package/es/modal/style/confirm.less +78 -0
- package/es/modal/style/index.js +4 -0
- package/es/modal/style/index.js.map +1 -0
- package/es/modal/style/index.less +4 -0
- package/es/modal/style/modal.less +165 -0
- package/es/notification/style/index.js +2 -0
- package/es/notification/style/index.js.map +1 -0
- package/es/notification/style/index.less +199 -0
- package/es/page-header/style/index.js +4 -0
- package/es/page-header/style/index.js.map +1 -0
- package/es/page-header/style/index.less +119 -0
- package/es/pagination/style/index.js +4 -0
- package/es/pagination/style/index.js.map +1 -0
- package/es/pagination/style/index.less +400 -0
- package/es/popconfirm/style/index.js +5 -0
- package/es/popconfirm/style/index.js.map +1 -0
- package/es/popover/style/index.js +4 -0
- package/es/popover/style/index.js.map +1 -0
- package/es/popover/style/index.less +205 -0
- package/es/progress/style/index.js +2 -0
- package/es/progress/style/index.js.map +1 -0
- package/es/progress/style/index.less +182 -0
- package/es/radio/style/index.js +2 -0
- package/es/radio/style/index.js.map +1 -0
- package/es/radio/style/index.less +327 -0
- package/es/rate/style/index.js +4 -0
- package/es/rate/style/index.js.map +1 -0
- package/es/rate/style/index.less +85 -0
- package/es/result/style/index.js +2 -0
- package/es/result/style/index.js.map +1 -0
- package/es/result/style/index.less +71 -0
- package/es/row/style/index.js +4 -0
- package/es/row/style/index.js.map +1 -0
- package/es/select/style/index.js +4 -0
- package/es/select/style/index.js.map +1 -0
- package/es/select/style/index.less +604 -0
- package/es/skeleton/style/index.js +2 -0
- package/es/skeleton/style/index.js.map +1 -0
- package/es/skeleton/style/index.less +130 -0
- package/es/slider/style/index.js +4 -0
- package/es/slider/style/index.js.map +1 -0
- package/es/slider/style/index.less +197 -0
- package/es/spin/style/index.js +2 -0
- package/es/spin/style/index.js.map +1 -0
- package/es/spin/style/index.less +214 -0
- package/es/statistic/style/index.js +2 -0
- package/es/statistic/style/index.js.map +1 -0
- package/es/statistic/style/index.less +40 -0
- package/es/steps/style/compatibility.less +50 -0
- package/es/steps/style/custom-icon.less +31 -0
- package/es/steps/style/index.js +2 -0
- package/es/steps/style/index.js.map +1 -0
- package/es/steps/style/label-placement.less +38 -0
- package/es/steps/style/progress-dot.less +80 -0
- package/es/steps/style/vertical.less +74 -0
- package/es/style/color/bezierEasing.less +110 -0
- package/es/style/color/colorPalette.less +75 -0
- package/es/style/color/colors.less +149 -0
- package/es/style/color/tinyColor.less +1184 -0
- package/es/style/core/base.less +510 -0
- package/es/style/core/iconfont.less +19 -0
- package/es/style/core/index.less +4 -0
- package/es/style/core/motion/fade.less +31 -0
- package/es/style/core/motion/move.less +120 -0
- package/es/style/core/motion/other.less +40 -0
- package/es/style/core/motion/slide.less +120 -0
- package/es/style/core/motion/swing.less +34 -0
- package/es/style/core/motion/zoom.less +162 -0
- package/es/style/core/motion.less +20 -0
- package/es/style/index.js +1 -0
- package/es/style/index.js.map +1 -0
- package/es/style/index.less +2 -0
- package/es/style/mixins/clearfix.less +13 -0
- package/es/style/mixins/compatibility.less +22 -0
- package/es/style/mixins/iconfont.less +43 -0
- package/es/style/mixins/index.less +10 -0
- package/es/style/mixins/motion.less +35 -0
- package/es/style/mixins/operation-unit.less +18 -0
- package/es/style/mixins/reset.less +13 -0
- package/es/style/mixins/size.less +10 -0
- package/es/style/mixins/typography.less +49 -0
- package/es/style/themes/default.less +699 -0
- package/es/style/themes/index.less +1 -0
- package/es/style/v2-compatible-reset.js +1 -0
- package/es/style/v2-compatible-reset.js.map +1 -0
- package/es/style/v2-compatible-reset.less +51 -0
- package/es/switch/style/index.js +2 -0
- package/es/switch/style/index.js.map +1 -0
- package/es/switch/style/index.less +178 -0
- package/es/table/style/index.js +10 -0
- package/es/table/style/index.js.map +1 -0
- package/es/table/style/index.less +800 -0
- package/es/table/style/size.less +179 -0
- package/es/tabs/style/card-style.less +186 -0
- package/es/tabs/style/index.js +2 -0
- package/es/tabs/style/index.js.map +1 -0
- package/es/tabs/style/index.less +436 -0
- package/es/tabs/tabs.js +8 -5
- package/es/tabs/tabs.js.map +1 -1
- package/es/tag/style/index.js +2 -0
- package/es/tag/style/index.js.map +1 -0
- package/es/tag/style/index.less +106 -0
- package/es/time-picker/style/index.js +2 -0
- package/es/time-picker/style/index.js.map +1 -0
- package/es/time-picker/style/index.less +246 -0
- package/es/timeline/style/index.js +2 -0
- package/es/timeline/style/index.js.map +1 -0
- package/es/timeline/style/index.less +167 -0
- package/es/tntd-form/TntdForm/components/Item.js +55 -0
- package/es/tntd-form/TntdForm/components/Item.js.map +1 -0
- package/es/tntd-form/TntdForm/components/ItemComp.js +186 -0
- package/es/tntd-form/TntdForm/components/ItemComp.js.map +1 -0
- package/es/tntd-form/TntdForm/components/List.js +102 -0
- package/es/tntd-form/TntdForm/components/List.js.map +1 -0
- package/es/tntd-form/TntdForm/index.js +55 -0
- package/es/tntd-form/TntdForm/index.js.map +1 -0
- package/es/tntd-form/TntdForm/interface.js +1 -0
- package/es/tntd-form/TntdForm/interface.js.map +1 -0
- package/es/tntd-form/TntdForm/store.js +2 -0
- package/es/tntd-form/TntdForm/store.js.map +1 -0
- package/es/tntd-form/TntdForm/utils.js +219 -0
- package/es/tntd-form/TntdForm/utils.js.map +1 -0
- package/es/tntd-select/_util/DisabledContext.js +12 -0
- package/es/tntd-select/_util/DisabledContext.js.map +1 -0
- package/es/tntd-select/_util/FormItemInputContext.js +2 -0
- package/es/tntd-select/_util/FormItemInputContext.js.map +1 -0
- package/es/tntd-select/_util/PurePanel.js +66 -0
- package/es/tntd-select/_util/PurePanel.js.map +1 -0
- package/es/tntd-select/_util/SizeContext.js +2 -0
- package/es/tntd-select/_util/SizeContext.js.map +1 -0
- package/es/tntd-select/_util/context.js.map +1 -0
- package/es/tntd-select/_util/defaultRenderEmpty.js.map +1 -0
- package/es/tntd-select/_util/getIcons.js +74 -0
- package/es/tntd-select/_util/getIcons.js.map +1 -0
- package/es/tntd-select/_util/interface.js +4 -0
- package/es/tntd-select/_util/interface.js.map +1 -0
- package/es/tntd-select/_util/motion.js +47 -0
- package/es/tntd-select/_util/motion.js.map +1 -0
- package/es/tntd-select/_util/type.js +3 -0
- package/es/tntd-select/_util/type.js.map +1 -0
- package/es/tntd-select/_util/useCompactItemContext.js +26 -0
- package/es/tntd-select/_util/useCompactItemContext.js.map +1 -0
- package/es/tntd-select/_util/warning.js +14 -0
- package/es/tntd-select/_util/warning.js.map +1 -0
- package/es/tntd-select/rc-select/BaseSelect.js +524 -0
- package/es/tntd-select/rc-select/BaseSelect.js.map +1 -0
- package/es/tntd-select/rc-select/OptGroup.js +4 -0
- package/es/tntd-select/rc-select/OptGroup.js.map +1 -0
- package/es/tntd-select/rc-select/Option.js +4 -0
- package/es/tntd-select/rc-select/Option.js.map +1 -0
- package/es/tntd-select/rc-select/OptionList.js +346 -0
- package/es/tntd-select/rc-select/OptionList.js.map +1 -0
- package/es/tntd-select/rc-select/Select.js +440 -0
- package/es/tntd-select/rc-select/Select.js.map +1 -0
- package/es/tntd-select/rc-select/SelectContext.js +3 -0
- package/es/tntd-select/rc-select/SelectContext.js.map +1 -0
- package/es/tntd-select/rc-select/SelectTrigger.js +130 -0
- package/es/tntd-select/rc-select/SelectTrigger.js.map +1 -0
- package/es/tntd-select/rc-select/Selector/Input.js +103 -0
- package/es/tntd-select/rc-select/Selector/Input.js.map +1 -0
- package/es/tntd-select/rc-select/Selector/MultipleSelector.js +171 -0
- package/es/tntd-select/rc-select/Selector/MultipleSelector.js.map +1 -0
- package/es/tntd-select/rc-select/Selector/SingleSelector.js +98 -0
- package/es/tntd-select/rc-select/Selector/SingleSelector.js.map +1 -0
- package/es/tntd-select/rc-select/Selector/index.js +158 -0
- package/es/tntd-select/rc-select/Selector/index.js.map +1 -0
- package/es/tntd-select/rc-select/TransBtn.js +36 -0
- package/es/tntd-select/rc-select/TransBtn.js.map +1 -0
- package/es/tntd-select/rc-select/hooks/useAllowClear.js +24 -0
- package/es/tntd-select/rc-select/hooks/useAllowClear.js.map +1 -0
- package/es/tntd-select/rc-select/hooks/useBaseProps.js +9 -0
- package/es/tntd-select/rc-select/hooks/useBaseProps.js.map +1 -0
- package/es/tntd-select/rc-select/hooks/useCache.js +38 -0
- package/es/tntd-select/rc-select/hooks/useCache.js.map +1 -0
- package/es/tntd-select/rc-select/hooks/useDelayReset.js +23 -0
- package/es/tntd-select/rc-select/hooks/useDelayReset.js.map +1 -0
- package/es/tntd-select/rc-select/hooks/useFilterOptions.js +55 -0
- package/es/tntd-select/rc-select/hooks/useFilterOptions.js.map +1 -0
- package/es/tntd-select/rc-select/hooks/useId.js +26 -0
- package/es/tntd-select/rc-select/hooks/useId.js.map +1 -0
- package/es/tntd-select/rc-select/hooks/useLayoutEffect.js +16 -0
- package/es/tntd-select/rc-select/hooks/useLayoutEffect.js.map +1 -0
- package/es/tntd-select/rc-select/hooks/useLock.js +25 -0
- package/es/tntd-select/rc-select/hooks/useLock.js.map +1 -0
- package/es/tntd-select/rc-select/hooks/useOptions.js +43 -0
- package/es/tntd-select/rc-select/hooks/useOptions.js.map +1 -0
- package/es/tntd-select/rc-select/hooks/useRefFunc.js +13 -0
- package/es/tntd-select/rc-select/hooks/useRefFunc.js.map +1 -0
- package/es/tntd-select/rc-select/hooks/useSelectTriggerControl.js +28 -0
- package/es/tntd-select/rc-select/hooks/useSelectTriggerControl.js.map +1 -0
- package/es/tntd-select/rc-select/index.js +7 -0
- package/es/tntd-select/rc-select/index.js.map +1 -0
- package/es/tntd-select/rc-select/interface.js +1 -0
- package/es/tntd-select/rc-select/interface.js.map +1 -0
- package/es/tntd-select/rc-select/utils/commonUtil.js +30 -0
- package/es/tntd-select/rc-select/utils/commonUtil.js.map +1 -0
- package/es/tntd-select/rc-select/utils/keyUtil.js +9 -0
- package/es/tntd-select/rc-select/utils/keyUtil.js.map +1 -0
- package/es/tntd-select/rc-select/utils/legacyUtil.js +55 -0
- package/es/tntd-select/rc-select/utils/legacyUtil.js.map +1 -0
- package/es/tntd-select/rc-select/utils/platformUtil.js +4 -0
- package/es/tntd-select/rc-select/utils/platformUtil.js.map +1 -0
- package/es/tntd-select/rc-select/utils/valueUtil.js +112 -0
- package/es/tntd-select/rc-select/utils/valueUtil.js.map +1 -0
- package/es/tntd-select/rc-select/utils/warningPropsUtil.js +112 -0
- package/es/tntd-select/rc-select/utils/warningPropsUtil.js.map +1 -0
- package/es/tooltip/style/index.js +2 -0
- package/es/tooltip/style/index.js.map +1 -0
- package/es/tooltip/style/index.less +187 -0
- package/es/transfer/style/customize.less +62 -0
- package/es/transfer/style/index.js +7 -0
- package/es/transfer/style/index.js.map +1 -0
- package/es/transfer/style/index.less +191 -0
- package/es/tree/style/directory.less +95 -0
- package/es/tree/style/index.js +2 -0
- package/es/tree/style/index.js.map +1 -0
- package/es/tree/style/index.less +280 -0
- package/es/tree/style/mixin.less +29 -0
- package/es/tree-select/style/index.js +6 -0
- package/es/tree-select/style/index.js.map +1 -0
- package/es/tree-select/style/index.less +191 -0
- package/es/typography/style/index.js +5 -0
- package/es/typography/style/index.js.map +1 -0
- package/es/typography/style/index.less +204 -0
- package/es/upload/style/index.js +5 -0
- package/es/upload/style/index.js.map +1 -0
- package/es/upload/style/index.less +542 -0
- package/es/utils/lang.js +5 -0
- package/es/utils/lang.js.map +1 -1
- package/es/version/style/index.js +2 -0
- package/es/version/style/index.js.map +1 -0
- package/lib/affix/style/index.d.ts.map +1 -0
- package/lib/affix/style/index.js.map +1 -0
- package/lib/affix/style/index.less +6 -0
- package/lib/alert/style/index.d.ts +3 -0
- package/lib/alert/style/index.d.ts.map +1 -0
- package/lib/alert/style/index.js +4 -0
- package/lib/alert/style/index.js.map +1 -0
- package/lib/alert/style/index.less +188 -0
- package/lib/anchor/style/index.d.ts +4 -0
- package/lib/anchor/style/index.d.ts.map +1 -0
- package/lib/anchor/style/index.js +5 -0
- package/lib/anchor/style/index.js.map +1 -0
- package/lib/anchor/style/index.less +82 -0
- package/lib/auto-complete/style/index.d.ts +5 -0
- package/lib/auto-complete/style/index.d.ts.map +1 -0
- package/lib/auto-complete/style/index.js +6 -0
- package/lib/auto-complete/style/index.js.map +1 -0
- package/lib/auto-complete/style/index.less +92 -0
- package/lib/avatar/style/index.d.ts +3 -0
- package/lib/avatar/style/index.d.ts.map +1 -0
- package/lib/avatar/style/index.js +4 -0
- package/lib/avatar/style/index.js.map +1 -0
- package/lib/avatar/style/index.less +59 -0
- package/lib/back-top/style/index.d.ts +3 -0
- package/lib/back-top/style/index.d.ts.map +1 -0
- package/lib/back-top/style/index.js +4 -0
- package/lib/back-top/style/index.js.map +1 -0
- package/lib/back-top/style/index.less +42 -0
- package/lib/back-top/style/responsive.less +11 -0
- package/lib/badge/style/index.d.ts +3 -0
- package/lib/badge/style/index.d.ts.map +1 -0
- package/lib/badge/style/index.js +4 -0
- package/lib/badge/style/index.js.map +1 -0
- package/lib/badge/style/index.less +190 -0
- package/lib/breadcrumb/style/index.d.ts +5 -0
- package/lib/breadcrumb/style/index.d.ts.map +1 -0
- package/lib/breadcrumb/style/index.js +6 -0
- package/lib/breadcrumb/style/index.js.map +1 -0
- package/lib/breadcrumb/style/index.less +51 -0
- package/lib/button/style/index.d.ts +3 -0
- package/lib/button/style/index.d.ts.map +1 -0
- package/lib/button/style/index.js +4 -0
- package/lib/button/style/index.js.map +1 -0
- package/lib/button/style/index.less +224 -0
- package/lib/button/style/mixin.less +357 -0
- package/lib/calendar/style/index.d.ts +5 -0
- package/lib/calendar/style/index.d.ts.map +1 -0
- package/lib/calendar/style/index.js +6 -0
- package/lib/calendar/style/index.js.map +1 -0
- package/lib/calendar/style/index.less +278 -0
- package/lib/card/style/index.d.ts +6 -0
- package/lib/card/style/index.d.ts.map +1 -0
- package/lib/card/style/index.js +7 -0
- package/lib/card/style/index.js.map +1 -0
- package/lib/card/style/index.less +263 -0
- package/lib/card/style/size.less +25 -0
- package/lib/carousel/style/index.d.ts +3 -0
- package/lib/carousel/style/index.d.ts.map +1 -0
- package/lib/carousel/style/index.js +4 -0
- package/lib/carousel/style/index.js.map +1 -0
- package/lib/carousel/style/index.less +238 -0
- package/lib/cascader/style/index.d.ts +5 -0
- package/lib/cascader/style/index.d.ts.map +1 -0
- package/lib/cascader/style/index.js +6 -0
- package/lib/cascader/style/index.js.map +1 -0
- package/lib/cascader/style/index.less +227 -0
- package/lib/checkbox/style/index.d.ts +3 -0
- package/lib/checkbox/style/index.d.ts.map +1 -0
- package/lib/checkbox/style/index.js +4 -0
- package/lib/checkbox/style/index.js.map +1 -0
- package/lib/checkbox/style/index.less +4 -0
- package/lib/checkbox/style/mixin.less +220 -0
- package/lib/col/style/index.d.ts +3 -0
- package/lib/col/style/index.d.ts.map +1 -0
- package/lib/col/style/index.js +4 -0
- package/lib/col/style/index.js.map +1 -0
- package/lib/collapse/style/index.d.ts +3 -0
- package/lib/collapse/style/index.d.ts.map +1 -0
- package/lib/collapse/style/index.js +4 -0
- package/lib/collapse/style/index.js.map +1 -0
- package/lib/collapse/style/index.less +134 -0
- package/lib/comment/style/index.d.ts +3 -0
- package/lib/comment/style/index.d.ts.map +1 -0
- package/lib/comment/style/index.js +4 -0
- package/lib/comment/style/index.js.map +1 -0
- package/lib/comment/style/index.less +93 -0
- package/lib/config-provider/style/index.d.ts +2 -0
- package/lib/config-provider/style/index.d.ts.map +1 -0
- package/lib/config-provider/style/index.js +3 -0
- package/lib/config-provider/style/index.js.map +1 -0
- package/lib/config-provider/style/index.less +2 -0
- package/lib/date-picker/style/Calendar.less +402 -0
- package/lib/date-picker/style/DecadePanel.less +81 -0
- package/lib/date-picker/style/MonthPanel.less +86 -0
- package/lib/date-picker/style/MonthPicker.less +11 -0
- package/lib/date-picker/style/Picker.less +113 -0
- package/lib/date-picker/style/RangePicker.less +248 -0
- package/lib/date-picker/style/TimePicker.less +151 -0
- package/lib/date-picker/style/WeekPicker.less +21 -0
- package/lib/date-picker/style/YearPanel.less +85 -0
- package/lib/date-picker/style/index.d.ts +6 -0
- package/lib/date-picker/style/index.d.ts.map +1 -0
- package/lib/date-picker/style/index.js +7 -0
- package/lib/date-picker/style/index.js.map +1 -0
- package/lib/date-picker/style/index.less +17 -0
- package/lib/descriptions/style/index.d.ts +3 -0
- package/lib/descriptions/style/index.d.ts.map +1 -0
- package/lib/descriptions/style/index.js +4 -0
- package/lib/descriptions/style/index.js.map +1 -0
- package/lib/descriptions/style/index.less +144 -0
- package/lib/divider/style/index.d.ts +3 -0
- package/lib/divider/style/index.d.ts.map +1 -0
- package/lib/divider/style/index.js +4 -0
- package/lib/divider/style/index.js.map +1 -0
- package/lib/divider/style/index.less +109 -0
- package/lib/drawer/style/drawer.less +230 -0
- package/lib/drawer/style/index.d.ts +3 -0
- package/lib/drawer/style/index.d.ts.map +1 -0
- package/lib/drawer/style/index.js +4 -0
- package/lib/drawer/style/index.js.map +1 -0
- package/lib/drawer/style/index.less +3 -0
- package/lib/dropdown/style/index.d.ts +4 -0
- package/lib/dropdown/style/index.d.ts.map +1 -0
- package/lib/dropdown/style/index.js +5 -0
- package/lib/dropdown/style/index.js.map +1 -0
- package/lib/dropdown/style/index.less +282 -0
- package/lib/empty/style/index.d.ts +3 -0
- package/lib/empty/style/index.d.ts.map +1 -0
- package/lib/empty/style/index.js +4 -0
- package/lib/empty/style/index.js.map +1 -0
- package/lib/empty/style/index.less +52 -0
- package/lib/form/style/index.d.ts +4 -0
- package/lib/form/style/index.d.ts.map +1 -0
- package/lib/form/style/index.js +5 -0
- package/lib/form/style/index.js.map +1 -0
- package/lib/form/style/index.less +653 -0
- package/lib/form/style/mixin.less +126 -0
- package/lib/grid-v4/RowContext.d.ts.map +1 -0
- package/lib/grid-v4/RowContext.js.map +1 -0
- package/lib/grid-v4/col.d.ts.map +1 -0
- package/lib/grid-v4/col.js.map +1 -0
- package/lib/grid-v4/hooks/useBreakpoint.d.ts.map +1 -0
- package/lib/grid-v4/hooks/useBreakpoint.js.map +1 -0
- package/lib/grid-v4/index.d.ts.map +1 -0
- package/lib/grid-v4/index.js.map +1 -0
- package/lib/grid-v4/row.d.ts.map +1 -0
- package/lib/{tntd-form/grid → grid-v4}/row.js +1 -0
- package/lib/grid-v4/row.js.map +1 -0
- package/lib/grid-v4/style/index.d.ts +2 -0
- package/lib/grid-v4/style/index.d.ts.map +1 -0
- package/lib/grid-v4/style/index.js +3 -0
- package/lib/grid-v4/style/index.js.map +1 -0
- package/lib/grid-v4/style/index.less +124 -0
- package/lib/grid-v4/style/mixin.less +57 -0
- package/lib/grid-v4/style/rtl.less +69 -0
- package/lib/handle/handle.d.ts +3 -0
- package/lib/handle/handle.d.ts.map +1 -0
- package/lib/handle/handle.js +181 -0
- package/lib/handle/handle.js.map +1 -0
- package/lib/icon/style/index.d.ts +3 -0
- package/lib/icon/style/index.d.ts.map +1 -0
- package/lib/icon/style/index.js +4 -0
- package/lib/icon/style/index.js.map +1 -0
- package/lib/icon/style/index.less +4 -0
- package/lib/input/style/index.d.ts +4 -0
- package/lib/input/style/index.d.ts.map +1 -0
- package/lib/input/style/index.js +5 -0
- package/lib/input/style/index.js.map +1 -0
- package/lib/input/style/index.less +57 -0
- package/lib/input/style/mixin.less +449 -0
- package/lib/input/style/search-input.less +34 -0
- package/lib/input-number/style/index.d.ts +3 -0
- package/lib/input-number/style/index.d.ts.map +1 -0
- package/lib/input-number/style/index.js +4 -0
- package/lib/input-number/style/index.js.map +1 -0
- package/lib/input-number/style/index.less +179 -0
- package/lib/layout/style/index.d.ts +3 -0
- package/lib/layout/style/index.d.ts.map +1 -0
- package/lib/layout/style/index.js +4 -0
- package/lib/layout/style/index.js.map +1 -0
- package/lib/layout/style/index.less +124 -0
- package/lib/layout/style/light.less +15 -0
- package/lib/list/style/bordered.less +41 -0
- package/lib/list/style/index.d.ts +7 -0
- package/lib/list/style/index.d.ts.map +1 -0
- package/lib/list/style/index.js +8 -0
- package/lib/list/style/index.js.map +1 -0
- package/lib/list/style/index.less +234 -0
- package/lib/list/style/responsive.less +40 -0
- package/lib/locale-provider/style/index.d.ts +2 -0
- package/lib/locale-provider/style/index.d.ts.map +1 -0
- package/lib/locale-provider/style/index.js +3 -0
- package/lib/locale-provider/style/index.js.map +1 -0
- package/lib/locale-provider/style/index.less +2 -0
- package/lib/mention/index.js +25 -0
- package/lib/mentions/style/index.d.ts +4 -0
- package/lib/mentions/style/index.d.ts.map +1 -0
- package/lib/mentions/style/index.js +5 -0
- package/lib/mentions/style/index.js.map +1 -0
- package/lib/mentions/style/index.less +164 -0
- package/lib/menu/style/dark.less +139 -0
- package/lib/menu/style/index.d.ts +4 -0
- package/lib/menu/style/index.d.ts.map +1 -0
- package/lib/menu/style/index.js +5 -0
- package/lib/menu/style/index.js.map +1 -0
- package/lib/menu/style/index.less +515 -0
- package/lib/message/style/index.d.ts +3 -0
- package/lib/message/style/index.d.ts.map +1 -0
- package/lib/message/style/index.js +4 -0
- package/lib/message/style/index.js.map +1 -0
- package/lib/message/style/index.less +75 -0
- package/lib/modal/style/confirm.less +78 -0
- package/lib/modal/style/index.d.ts +4 -0
- package/lib/modal/style/index.d.ts.map +1 -0
- package/lib/modal/style/index.js +5 -0
- package/lib/modal/style/index.js.map +1 -0
- package/lib/modal/style/index.less +4 -0
- package/lib/modal/style/modal.less +165 -0
- package/lib/notification/style/index.d.ts +3 -0
- package/lib/notification/style/index.d.ts.map +1 -0
- package/lib/notification/style/index.js +4 -0
- package/lib/notification/style/index.js.map +1 -0
- package/lib/notification/style/index.less +199 -0
- package/lib/page-header/style/index.d.ts +4 -0
- package/lib/page-header/style/index.d.ts.map +1 -0
- package/lib/page-header/style/index.js +5 -0
- package/lib/page-header/style/index.js.map +1 -0
- package/lib/page-header/style/index.less +119 -0
- package/lib/pagination/style/index.d.ts +4 -0
- package/lib/pagination/style/index.d.ts.map +1 -0
- package/lib/pagination/style/index.js +5 -0
- package/lib/pagination/style/index.js.map +1 -0
- package/lib/pagination/style/index.less +400 -0
- package/lib/popconfirm/style/index.d.ts +4 -0
- package/lib/popconfirm/style/index.d.ts.map +1 -0
- package/lib/popconfirm/style/index.js +5 -0
- package/lib/popconfirm/style/index.js.map +1 -0
- package/lib/popover/style/index.d.ts +3 -0
- package/lib/popover/style/index.d.ts.map +1 -0
- package/lib/popover/style/index.js +4 -0
- package/lib/popover/style/index.js.map +1 -0
- package/lib/popover/style/index.less +205 -0
- package/lib/progress/style/index.d.ts +3 -0
- package/lib/progress/style/index.d.ts.map +1 -0
- package/lib/progress/style/index.js +4 -0
- package/lib/progress/style/index.js.map +1 -0
- package/lib/progress/style/index.less +182 -0
- package/lib/radio/style/index.d.ts +3 -0
- package/lib/radio/style/index.d.ts.map +1 -0
- package/lib/radio/style/index.js +4 -0
- package/lib/radio/style/index.js.map +1 -0
- package/lib/radio/style/index.less +327 -0
- package/lib/rate/style/index.d.ts +4 -0
- package/lib/rate/style/index.d.ts.map +1 -0
- package/lib/rate/style/index.js +5 -0
- package/lib/rate/style/index.js.map +1 -0
- package/lib/rate/style/index.less +85 -0
- package/lib/result/style/index.d.ts +3 -0
- package/lib/result/style/index.d.ts.map +1 -0
- package/lib/result/style/index.js +4 -0
- package/lib/result/style/index.js.map +1 -0
- package/lib/result/style/index.less +71 -0
- package/lib/row/style/index.d.ts +3 -0
- package/lib/row/style/index.d.ts.map +1 -0
- package/lib/row/style/index.js +4 -0
- package/lib/row/style/index.js.map +1 -0
- package/lib/select/style/index.d.ts +4 -0
- package/lib/select/style/index.d.ts.map +1 -0
- package/lib/select/style/index.js +5 -0
- package/lib/select/style/index.js.map +1 -0
- package/lib/select/style/index.less +604 -0
- package/lib/skeleton/style/index.d.ts +3 -0
- package/lib/skeleton/style/index.d.ts.map +1 -0
- package/lib/skeleton/style/index.js +4 -0
- package/lib/skeleton/style/index.js.map +1 -0
- package/lib/skeleton/style/index.less +130 -0
- package/lib/slider/style/index.d.ts +4 -0
- package/lib/slider/style/index.d.ts.map +1 -0
- package/lib/slider/style/index.js +5 -0
- package/lib/slider/style/index.js.map +1 -0
- package/lib/slider/style/index.less +197 -0
- package/lib/spin/style/index.d.ts +3 -0
- package/lib/spin/style/index.d.ts.map +1 -0
- package/lib/spin/style/index.js +4 -0
- package/lib/spin/style/index.js.map +1 -0
- package/lib/spin/style/index.less +214 -0
- package/lib/statistic/style/index.d.ts +3 -0
- package/lib/statistic/style/index.d.ts.map +1 -0
- package/lib/statistic/style/index.js +4 -0
- package/lib/statistic/style/index.js.map +1 -0
- package/lib/statistic/style/index.less +40 -0
- package/lib/steps/style/compatibility.less +50 -0
- package/lib/steps/style/custom-icon.less +31 -0
- package/lib/steps/style/index.d.ts +3 -0
- package/lib/steps/style/index.d.ts.map +1 -0
- package/lib/steps/style/index.js +4 -0
- package/lib/steps/style/index.js.map +1 -0
- package/lib/steps/style/label-placement.less +38 -0
- package/lib/steps/style/progress-dot.less +80 -0
- package/lib/steps/style/vertical.less +74 -0
- package/lib/style/color/bezierEasing.less +110 -0
- package/lib/style/color/colorPalette.less +75 -0
- package/lib/style/color/colors.less +149 -0
- package/lib/style/color/tinyColor.less +1184 -0
- package/lib/style/core/base.less +510 -0
- package/lib/style/core/iconfont.less +19 -0
- package/lib/style/core/index.less +4 -0
- package/lib/style/core/motion/fade.less +31 -0
- package/lib/style/core/motion/move.less +120 -0
- package/lib/style/core/motion/other.less +40 -0
- package/lib/style/core/motion/slide.less +120 -0
- package/lib/style/core/motion/swing.less +34 -0
- package/lib/style/core/motion/zoom.less +162 -0
- package/lib/style/core/motion.less +20 -0
- package/lib/style/index.d.ts +2 -0
- package/lib/style/index.d.ts.map +1 -0
- package/lib/style/index.js +3 -0
- package/lib/style/index.js.map +1 -0
- package/lib/style/index.less +2 -0
- package/lib/style/mixins/clearfix.less +13 -0
- package/lib/style/mixins/compatibility.less +22 -0
- package/lib/style/mixins/iconfont.less +43 -0
- package/lib/style/mixins/index.less +10 -0
- package/lib/style/mixins/motion.less +35 -0
- package/lib/style/mixins/operation-unit.less +18 -0
- package/lib/style/mixins/reset.less +13 -0
- package/lib/style/mixins/size.less +10 -0
- package/lib/style/mixins/typography.less +49 -0
- package/lib/style/themes/default.less +699 -0
- package/lib/style/themes/index.less +1 -0
- package/lib/style/v2-compatible-reset.d.ts +2 -0
- package/lib/style/v2-compatible-reset.d.ts.map +1 -0
- package/lib/style/v2-compatible-reset.js +3 -0
- package/lib/style/v2-compatible-reset.js.map +1 -0
- package/lib/style/v2-compatible-reset.less +51 -0
- package/lib/switch/style/index.d.ts +3 -0
- package/lib/switch/style/index.d.ts.map +1 -0
- package/lib/switch/style/index.js +4 -0
- package/lib/switch/style/index.js.map +1 -0
- package/lib/switch/style/index.less +178 -0
- package/lib/table/style/index.d.ts +9 -0
- package/lib/table/style/index.d.ts.map +1 -0
- package/lib/table/style/index.js +10 -0
- package/lib/table/style/index.js.map +1 -0
- package/lib/table/style/index.less +800 -0
- package/lib/table/style/size.less +179 -0
- package/lib/tabs/style/card-style.less +186 -0
- package/lib/tabs/style/index.d.ts +3 -0
- package/lib/tabs/style/index.d.ts.map +1 -0
- package/lib/tabs/style/index.js +4 -0
- package/lib/tabs/style/index.js.map +1 -0
- package/lib/tabs/style/index.less +436 -0
- package/lib/tabs/tabs.d.ts +1 -0
- package/lib/tabs/tabs.d.ts.map +1 -1
- package/lib/tabs/tabs.js +7 -4
- package/lib/tabs/tabs.js.map +1 -1
- package/lib/tag/style/index.d.ts +3 -0
- package/lib/tag/style/index.d.ts.map +1 -0
- package/lib/tag/style/index.js +4 -0
- package/lib/tag/style/index.js.map +1 -0
- package/lib/tag/style/index.less +106 -0
- package/lib/time-picker/style/index.d.ts +3 -0
- package/lib/time-picker/style/index.d.ts.map +1 -0
- package/lib/time-picker/style/index.js +4 -0
- package/lib/time-picker/style/index.js.map +1 -0
- package/lib/time-picker/style/index.less +246 -0
- package/lib/timeline/style/index.d.ts +3 -0
- package/lib/timeline/style/index.d.ts.map +1 -0
- package/lib/timeline/style/index.js +4 -0
- package/lib/timeline/style/index.js.map +1 -0
- package/lib/timeline/style/index.less +167 -0
- package/lib/tntd-form/TntdForm/components/Item.js +65 -0
- package/lib/tntd-form/TntdForm/components/ItemComp.js +215 -0
- package/lib/tntd-form/TntdForm/components/List.js +123 -0
- package/lib/tntd-form/TntdForm/index.js +72 -0
- package/lib/tntd-form/TntdForm/interface.js +5 -0
- package/lib/tntd-form/TntdForm/store.js +10 -0
- package/lib/tntd-form/TntdForm/utils.js +239 -0
- package/lib/tntd-form/tntd-form.stories.d.ts +1 -1
- package/lib/tntd-select/_util/DisabledContext.d.ts +10 -0
- package/lib/tntd-select/_util/DisabledContext.d.ts.map +1 -0
- package/lib/tntd-select/_util/DisabledContext.js +22 -0
- package/lib/tntd-select/_util/DisabledContext.js.map +1 -0
- package/lib/tntd-select/_util/FormItemInputContext.d.ts +4 -0
- package/lib/tntd-select/_util/FormItemInputContext.d.ts.map +1 -0
- package/lib/tntd-select/_util/FormItemInputContext.js +12 -0
- package/lib/tntd-select/_util/FormItemInputContext.js.map +1 -0
- package/lib/tntd-select/_util/PurePanel.d.ts +9 -0
- package/lib/tntd-select/_util/PurePanel.d.ts.map +1 -0
- package/lib/tntd-select/_util/PurePanel.js +90 -0
- package/lib/tntd-select/_util/PurePanel.js.map +1 -0
- package/lib/tntd-select/_util/SizeContext.d.ts +4 -0
- package/lib/tntd-select/_util/SizeContext.d.ts.map +1 -0
- package/lib/tntd-select/_util/SizeContext.js +12 -0
- package/lib/tntd-select/_util/SizeContext.js.map +1 -0
- package/lib/tntd-select/_util/context.d.ts.map +1 -0
- package/lib/tntd-select/_util/context.js.map +1 -0
- package/lib/tntd-select/_util/defaultRenderEmpty.d.ts.map +1 -0
- package/lib/tntd-select/_util/defaultRenderEmpty.js.map +1 -0
- package/lib/tntd-select/_util/getIcons.d.ts +25 -0
- package/lib/tntd-select/_util/getIcons.d.ts.map +1 -0
- package/lib/tntd-select/_util/getIcons.js +84 -0
- package/lib/tntd-select/_util/getIcons.js.map +1 -0
- package/lib/tntd-select/_util/interface.d.ts +25 -0
- package/lib/tntd-select/_util/interface.d.ts.map +1 -0
- package/lib/tntd-select/_util/interface.js +16 -0
- package/lib/tntd-select/_util/interface.js.map +1 -0
- package/lib/tntd-select/_util/motion.d.ts +9 -0
- package/lib/tntd-select/_util/motion.d.ts.map +1 -0
- package/lib/tntd-select/_util/motion.js +59 -0
- package/lib/tntd-select/_util/motion.js.map +1 -0
- package/lib/tntd-select/_util/type.d.ts +10 -0
- package/lib/tntd-select/_util/type.d.ts.map +1 -0
- package/lib/tntd-select/_util/type.js +21 -0
- package/lib/tntd-select/_util/type.js.map +1 -0
- package/lib/tntd-select/_util/useCompactItemContext.d.ts +9 -0
- package/lib/tntd-select/_util/useCompactItemContext.d.ts.map +1 -0
- package/lib/tntd-select/_util/useCompactItemContext.js +35 -0
- package/lib/tntd-select/_util/useCompactItemContext.js.map +1 -0
- package/lib/tntd-select/_util/warning.d.ts +4 -0
- package/lib/tntd-select/_util/warning.d.ts.map +1 -0
- package/lib/tntd-select/_util/warning.js +24 -0
- package/lib/tntd-select/_util/warning.js.map +1 -0
- package/lib/tntd-select/rc-select/BaseSelect.d.ts +114 -0
- package/lib/tntd-select/rc-select/BaseSelect.d.ts.map +1 -0
- package/lib/tntd-select/rc-select/BaseSelect.js +566 -0
- package/lib/tntd-select/rc-select/BaseSelect.js.map +1 -0
- package/lib/tntd-select/rc-select/OptGroup.d.ts +13 -0
- package/lib/tntd-select/rc-select/OptGroup.d.ts.map +1 -0
- package/lib/tntd-select/rc-select/OptGroup.js +13 -0
- package/lib/tntd-select/rc-select/OptGroup.js.map +1 -0
- package/lib/tntd-select/rc-select/Option.d.ts +15 -0
- package/lib/tntd-select/rc-select/Option.d.ts.map +1 -0
- package/lib/tntd-select/rc-select/Option.js +13 -0
- package/lib/tntd-select/rc-select/Option.js.map +1 -0
- package/lib/tntd-select/rc-select/OptionList.d.ts +11 -0
- package/lib/tntd-select/rc-select/OptionList.d.ts.map +1 -0
- package/lib/tntd-select/rc-select/OptionList.js +372 -0
- package/lib/tntd-select/rc-select/OptionList.js.map +1 -0
- package/lib/tntd-select/rc-select/Select.d.ts +115 -0
- package/lib/tntd-select/rc-select/Select.d.ts.map +1 -0
- package/lib/tntd-select/rc-select/Select.js +509 -0
- package/lib/tntd-select/rc-select/Select.js.map +1 -0
- package/lib/tntd-select/rc-select/SelectContext.d.ts +23 -0
- package/lib/tntd-select/rc-select/SelectContext.d.ts.map +1 -0
- package/lib/tntd-select/rc-select/SelectContext.js +13 -0
- package/lib/tntd-select/rc-select/SelectContext.js.map +1 -0
- package/lib/tntd-select/rc-select/SelectTrigger.d.ts +31 -0
- package/lib/tntd-select/rc-select/SelectTrigger.d.ts.map +1 -0
- package/lib/tntd-select/rc-select/SelectTrigger.js +149 -0
- package/lib/tntd-select/rc-select/SelectTrigger.js.map +1 -0
- package/lib/tntd-select/rc-select/Selector/Input.d.ts +27 -0
- package/lib/tntd-select/rc-select/Selector/Input.d.ts.map +1 -0
- package/lib/tntd-select/rc-select/Selector/Input.js +110 -0
- package/lib/tntd-select/rc-select/Selector/Input.js.map +1 -0
- package/lib/tntd-select/rc-select/Selector/MultipleSelector.d.ts +17 -0
- package/lib/tntd-select/rc-select/Selector/MultipleSelector.d.ts.map +1 -0
- package/lib/tntd-select/rc-select/Selector/MultipleSelector.js +193 -0
- package/lib/tntd-select/rc-select/Selector/MultipleSelector.js.map +1 -0
- package/lib/tntd-select/rc-select/Selector/SingleSelector.d.ts +9 -0
- package/lib/tntd-select/rc-select/Selector/SingleSelector.d.ts.map +1 -0
- package/lib/tntd-select/rc-select/Selector/SingleSelector.js +116 -0
- package/lib/tntd-select/rc-select/Selector/SingleSelector.js.map +1 -0
- package/lib/tntd-select/rc-select/Selector/index.d.ts +83 -0
- package/lib/tntd-select/rc-select/Selector/index.d.ts.map +1 -0
- package/lib/tntd-select/rc-select/Selector/index.js +159 -0
- package/lib/tntd-select/rc-select/Selector/index.js.map +1 -0
- package/lib/tntd-select/rc-select/TransBtn.d.ts +13 -0
- package/lib/tntd-select/rc-select/TransBtn.d.ts.map +1 -0
- package/lib/tntd-select/rc-select/TransBtn.js +48 -0
- package/lib/tntd-select/rc-select/TransBtn.js.map +1 -0
- package/lib/tntd-select/rc-select/hooks/useAllowClear.d.ts +9 -0
- package/lib/tntd-select/rc-select/hooks/useAllowClear.d.ts.map +1 -0
- package/lib/tntd-select/rc-select/hooks/useAllowClear.js +35 -0
- package/lib/tntd-select/rc-select/hooks/useAllowClear.js.map +1 -0
- package/lib/tntd-select/rc-select/hooks/useBaseProps.d.ts +14 -0
- package/lib/tntd-select/rc-select/hooks/useBaseProps.d.ts.map +1 -0
- package/lib/tntd-select/rc-select/hooks/useBaseProps.js +21 -0
- package/lib/tntd-select/rc-select/hooks/useBaseProps.js.map +1 -0
- package/lib/tntd-select/rc-select/hooks/useCache.d.ts +8 -0
- package/lib/tntd-select/rc-select/hooks/useCache.d.ts.map +1 -0
- package/lib/tntd-select/rc-select/hooks/useCache.js +49 -0
- package/lib/tntd-select/rc-select/hooks/useCache.js.map +1 -0
- package/lib/tntd-select/rc-select/hooks/useDelayReset.d.ts +6 -0
- package/lib/tntd-select/rc-select/hooks/useDelayReset.d.ts.map +1 -0
- package/lib/{tntd-form/_util/hooks/useFlexGapSupport.js → tntd-select/rc-select/hooks/useDelayReset.js} +25 -9
- package/lib/tntd-select/rc-select/hooks/useDelayReset.js.map +1 -0
- package/lib/tntd-select/rc-select/hooks/useFilterOptions.d.ts +4 -0
- package/lib/tntd-select/rc-select/hooks/useFilterOptions.d.ts.map +1 -0
- package/lib/tntd-select/rc-select/hooks/useFilterOptions.js +72 -0
- package/lib/tntd-select/rc-select/hooks/useFilterOptions.js.map +1 -0
- package/lib/tntd-select/rc-select/hooks/useId.d.ts +6 -0
- package/lib/tntd-select/rc-select/hooks/useId.d.ts.map +1 -0
- package/lib/{tntd-form/_util/hooks/useForceUpdate.js → tntd-select/rc-select/hooks/useId.js} +32 -8
- package/lib/tntd-select/rc-select/hooks/useId.js.map +1 -0
- package/lib/tntd-select/rc-select/hooks/useLayoutEffect.d.ts +6 -0
- package/lib/tntd-select/rc-select/hooks/useLayoutEffect.d.ts.map +1 -0
- package/lib/tntd-select/rc-select/hooks/useLayoutEffect.js +26 -0
- package/lib/tntd-select/rc-select/hooks/useLayoutEffect.js.map +1 -0
- package/lib/tntd-select/rc-select/hooks/useLock.d.ts +8 -0
- package/lib/tntd-select/rc-select/hooks/useLock.d.ts.map +1 -0
- package/lib/tntd-select/rc-select/hooks/useLock.js +39 -0
- package/lib/tntd-select/rc-select/hooks/useLock.js.map +1 -0
- package/lib/tntd-select/rc-select/hooks/useOptions.d.ts +12 -0
- package/lib/tntd-select/rc-select/hooks/useOptions.d.ts.map +1 -0
- package/lib/tntd-select/rc-select/hooks/useOptions.js +53 -0
- package/lib/tntd-select/rc-select/hooks/useOptions.js.map +1 -0
- package/lib/tntd-select/rc-select/hooks/useRefFunc.d.ts +6 -0
- package/lib/tntd-select/rc-select/hooks/useRefFunc.d.ts.map +1 -0
- package/lib/tntd-select/rc-select/hooks/useRefFunc.js +22 -0
- package/lib/tntd-select/rc-select/hooks/useRefFunc.js.map +1 -0
- package/lib/tntd-select/rc-select/hooks/useSelectTriggerControl.d.ts +2 -0
- package/lib/tntd-select/rc-select/hooks/useSelectTriggerControl.d.ts.map +1 -0
- package/lib/tntd-select/rc-select/hooks/useSelectTriggerControl.js +43 -0
- package/lib/tntd-select/rc-select/hooks/useSelectTriggerControl.js.map +1 -0
- package/lib/tntd-select/rc-select/index.d.ts +11 -0
- package/lib/tntd-select/rc-select/index.d.ts.map +1 -0
- package/lib/tntd-select/rc-select/index.js +38 -0
- package/lib/tntd-select/rc-select/index.js.map +1 -0
- package/lib/tntd-select/rc-select/interface.d.ts +23 -0
- package/lib/tntd-select/rc-select/interface.d.ts.map +1 -0
- package/lib/tntd-select/rc-select/interface.js +5 -0
- package/lib/tntd-select/rc-select/interface.js.map +1 -0
- package/lib/tntd-select/rc-select/utils/commonUtil.d.ts +10 -0
- package/lib/tntd-select/rc-select/utils/commonUtil.d.ts.map +1 -0
- package/lib/tntd-select/rc-select/utils/commonUtil.js +43 -0
- package/lib/tntd-select/rc-select/utils/commonUtil.js.map +1 -0
- package/lib/tntd-select/rc-select/utils/keyUtil.d.ts +3 -0
- package/lib/tntd-select/rc-select/utils/keyUtil.d.ts.map +1 -0
- package/lib/tntd-select/rc-select/utils/keyUtil.js +16 -0
- package/lib/tntd-select/rc-select/utils/keyUtil.js.map +1 -0
- package/lib/tntd-select/rc-select/utils/legacyUtil.d.ts +4 -0
- package/lib/tntd-select/rc-select/utils/legacyUtil.d.ts.map +1 -0
- package/lib/tntd-select/rc-select/utils/legacyUtil.js +60 -0
- package/lib/tntd-select/rc-select/utils/legacyUtil.js.map +1 -0
- package/lib/tntd-select/rc-select/utils/platformUtil.d.ts +2 -0
- package/lib/tntd-select/rc-select/utils/platformUtil.d.ts.map +1 -0
- package/lib/tntd-select/rc-select/utils/platformUtil.js +10 -0
- package/lib/tntd-select/rc-select/utils/platformUtil.js.map +1 -0
- package/lib/tntd-select/rc-select/utils/valueUtil.d.ts +24 -0
- package/lib/tntd-select/rc-select/utils/valueUtil.d.ts.map +1 -0
- package/lib/tntd-select/rc-select/utils/valueUtil.js +132 -0
- package/lib/tntd-select/rc-select/utils/valueUtil.js.map +1 -0
- package/lib/tntd-select/rc-select/utils/warningPropsUtil.d.ts +5 -0
- package/lib/tntd-select/rc-select/utils/warningPropsUtil.d.ts.map +1 -0
- package/lib/tntd-select/rc-select/utils/warningPropsUtil.js +127 -0
- package/lib/tntd-select/rc-select/utils/warningPropsUtil.js.map +1 -0
- package/lib/tooltip/style/index.d.ts +3 -0
- package/lib/tooltip/style/index.d.ts.map +1 -0
- package/lib/tooltip/style/index.js +4 -0
- package/lib/tooltip/style/index.js.map +1 -0
- package/lib/tooltip/style/index.less +187 -0
- package/lib/transfer/style/customize.less +62 -0
- package/lib/transfer/style/index.d.ts +7 -0
- package/lib/transfer/style/index.d.ts.map +1 -0
- package/lib/transfer/style/index.js +8 -0
- package/lib/transfer/style/index.js.map +1 -0
- package/lib/transfer/style/index.less +191 -0
- package/lib/tree/style/directory.less +95 -0
- package/lib/tree/style/index.d.ts +3 -0
- package/lib/tree/style/index.d.ts.map +1 -0
- package/lib/tree/style/index.js +4 -0
- package/lib/tree/style/index.js.map +1 -0
- package/lib/tree/style/index.less +280 -0
- package/lib/tree/style/mixin.less +29 -0
- package/lib/tree-select/style/index.d.ts +5 -0
- package/lib/tree-select/style/index.d.ts.map +1 -0
- package/lib/tree-select/style/index.js +6 -0
- package/lib/tree-select/style/index.js.map +1 -0
- package/lib/tree-select/style/index.less +191 -0
- package/lib/typography/style/index.d.ts +5 -0
- package/lib/typography/style/index.d.ts.map +1 -0
- package/lib/typography/style/index.js +6 -0
- package/lib/typography/style/index.js.map +1 -0
- package/lib/typography/style/index.less +204 -0
- package/lib/upload/style/index.d.ts +5 -0
- package/lib/upload/style/index.d.ts.map +1 -0
- package/lib/upload/style/index.js +6 -0
- package/lib/upload/style/index.js.map +1 -0
- package/lib/upload/style/index.less +542 -0
- package/lib/utils/lang.d.ts.map +1 -1
- package/lib/utils/lang.js +5 -0
- package/lib/utils/lang.js.map +1 -1
- package/lib/version/style/index.d.ts +2 -0
- package/lib/version/style/index.d.ts.map +1 -0
- package/lib/version/style/index.js +3 -0
- package/lib/version/style/index.js.map +1 -0
- package/package.json +1 -1
- package/es/tntd-form/_util/context.js.map +0 -1
- package/es/tntd-form/_util/defaultRenderEmpty.js.map +0 -1
- package/es/tntd-form/_util/hooks/useFlexGapSupport.js +0 -9
- package/es/tntd-form/_util/hooks/useFlexGapSupport.js.map +0 -1
- package/es/tntd-form/_util/hooks/useForceUpdate.js +0 -5
- package/es/tntd-form/_util/hooks/useForceUpdate.js.map +0 -1
- package/es/tntd-form/_util/responsiveObserve.js +0 -59
- package/es/tntd-form/_util/responsiveObserve.js.map +0 -1
- package/es/tntd-form/_util/styleChecker.js +0 -26
- package/es/tntd-form/_util/styleChecker.js.map +0 -1
- package/es/tntd-form/grid/RowContext.js.map +0 -1
- package/es/tntd-form/grid/col.js.map +0 -1
- package/es/tntd-form/grid/hooks/useBreakpoint.js.map +0 -1
- package/es/tntd-form/grid/index.js.map +0 -1
- package/es/tntd-form/grid/row.js.map +0 -1
- package/es/tntd-form/grid/style/index.js.map +0 -1
- package/lib/tntd-form/_util/context.d.ts.map +0 -1
- package/lib/tntd-form/_util/context.js.map +0 -1
- package/lib/tntd-form/_util/defaultRenderEmpty.d.ts.map +0 -1
- package/lib/tntd-form/_util/defaultRenderEmpty.js.map +0 -1
- package/lib/tntd-form/_util/hooks/useFlexGapSupport.d.ts +0 -3
- package/lib/tntd-form/_util/hooks/useFlexGapSupport.d.ts.map +0 -1
- package/lib/tntd-form/_util/hooks/useFlexGapSupport.js.map +0 -1
- package/lib/tntd-form/_util/hooks/useForceUpdate.d.ts +0 -3
- package/lib/tntd-form/_util/hooks/useForceUpdate.d.ts.map +0 -1
- package/lib/tntd-form/_util/hooks/useForceUpdate.js.map +0 -1
- package/lib/tntd-form/_util/responsiveObserve.d.ts +0 -22
- package/lib/tntd-form/_util/responsiveObserve.d.ts.map +0 -1
- package/lib/tntd-form/_util/responsiveObserve.js +0 -73
- package/lib/tntd-form/_util/responsiveObserve.js.map +0 -1
- package/lib/tntd-form/_util/styleChecker.d.ts +0 -5
- package/lib/tntd-form/_util/styleChecker.d.ts.map +0 -1
- package/lib/tntd-form/_util/styleChecker.js +0 -42
- package/lib/tntd-form/_util/styleChecker.js.map +0 -1
- package/lib/tntd-form/grid/RowContext.d.ts.map +0 -1
- package/lib/tntd-form/grid/RowContext.js.map +0 -1
- package/lib/tntd-form/grid/col.d.ts.map +0 -1
- package/lib/tntd-form/grid/col.js.map +0 -1
- package/lib/tntd-form/grid/hooks/useBreakpoint.d.ts.map +0 -1
- package/lib/tntd-form/grid/hooks/useBreakpoint.js.map +0 -1
- package/lib/tntd-form/grid/index.d.ts.map +0 -1
- package/lib/tntd-form/grid/index.js.map +0 -1
- package/lib/tntd-form/grid/row.d.ts.map +0 -1
- package/lib/tntd-form/grid/row.js.map +0 -1
- package/lib/tntd-form/grid/style/index.d.ts.map +0 -1
- package/lib/tntd-form/grid/style/index.js.map +0 -1
- /package/es/{tntd-form/grid → affix}/style/index.js +0 -0
- /package/es/{tntd-form/grid → grid-v4}/RowContext.js +0 -0
- /package/es/{tntd-form/grid → grid-v4}/hooks/useBreakpoint.js +0 -0
- /package/es/{tntd-form/grid → grid-v4}/index.js +0 -0
- /package/es/{tntd-form → tntd-select}/_util/context.js +0 -0
- /package/es/{tntd-form → tntd-select}/_util/defaultRenderEmpty.js +0 -0
- /package/lib/{tntd-form/grid → affix}/style/index.d.ts +0 -0
- /package/lib/{tntd-form/grid → affix}/style/index.js +0 -0
- /package/lib/{tntd-form/grid → grid-v4}/RowContext.d.ts +0 -0
- /package/lib/{tntd-form/grid → grid-v4}/RowContext.js +0 -0
- /package/lib/{tntd-form/grid → grid-v4}/col.d.ts +0 -0
- /package/lib/{tntd-form/grid → grid-v4}/col.js +0 -0
- /package/lib/{tntd-form/grid → grid-v4}/hooks/useBreakpoint.d.ts +0 -0
- /package/lib/{tntd-form/grid → grid-v4}/hooks/useBreakpoint.js +0 -0
- /package/lib/{tntd-form/grid → grid-v4}/index.d.ts +0 -0
- /package/lib/{tntd-form/grid → grid-v4}/index.js +0 -0
- /package/lib/{tntd-form/grid → grid-v4}/row.d.ts +0 -0
- /package/lib/{tntd-form → tntd-select}/_util/context.d.ts +0 -0
- /package/lib/{tntd-form → tntd-select}/_util/context.js +0 -0
- /package/lib/{tntd-form → tntd-select}/_util/defaultRenderEmpty.d.ts +0 -0
- /package/lib/{tntd-form → tntd-select}/_util/defaultRenderEmpty.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getIcons.js","sourceRoot":"","sources":["../../../src/tntd-select/_util/getIcons.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAI3B,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,EAC/B,UAAU,EACV,SAAS,EACT,oBAAoB,EACpB,UAAU,EACV,OAAO,EACP,QAAQ,EACR,WAAW,EACX,SAAS,EACT,SAAS,EACT,YAAY,GAYb;IACC,aAAa;IACb,MAAM,eAAe,GAAG,SAAS,aAAT,SAAS,cAAT,SAAS,GAAI,oBAAC,IAAI,IAAC,IAAI,EAAC,cAAc,EAAC,KAAK,EAAC,QAAQ,GAAG,CAAA;IAEhF,2BAA2B;IAC3B,MAAM,iBAAiB,GAAG,CAAC,SAAqB,EAAE,EAAE,CAAC,CACnD;QACG,SAAS,KAAK,KAAK,IAAI,SAAS;QAChC,WAAW,IAAI,YAAY,CAC3B,CACJ,CAAA;IAED,kBAAkB;IAClB,IAAI,gBAAgB,GAAG,IAAI,CAAA;IAC3B,IAAI,UAAU,KAAK,SAAS,EAAE;QAC5B,gBAAgB,GAAG,iBAAiB,CAAC,UAAU,CAAC,CAAA;KACjD;SAAM,IAAI,OAAO,EAAE;QAClB,gBAAgB,GAAG,iBAAiB,CAAC,oBAAC,IAAI,IAAC,IAAI,EAAC,SAAS,GAAG,CAAC,CAAA;KAC9D;SAAM;QACL,MAAM,OAAO,GAAG,GAAG,SAAS,SAAS,CAAA;QACrC,gBAAgB,GAAG,CAAC,EAAE,IAAI,EAAE,UAAU,EAA0C,EAAE,EAAE;YAClF,IAAI,IAAI,IAAI,UAAU,EAAE;gBACtB,OAAO,iBAAiB,CAAC,oBAAC,IAAI,IAAC,SAAS,EAAE,OAAO,EAAE,IAAI,EAAC,QAAQ,GAAG,CAAC,CAAA;aACrE;YACD,OAAO,iBAAiB,CAAC,oBAAC,IAAI,IAAC,SAAS,EAAE,OAAO,EAAE,IAAI,EAAC,MAAM,GAAG,CAAC,CAAA;QACpE,CAAC,CAAA;KACF;IAED,oBAAoB;IACpB,IAAI,cAAc,GAAG,IAAI,CAAA;IACzB,IAAI,oBAAoB,KAAK,SAAS,EAAE;QACtC,cAAc,GAAG,oBAAoB,CAAA;KACtC;SAAM,IAAI,QAAQ,EAAE;QACnB,cAAc,GAAG,oBAAC,IAAI,IAAC,IAAI,EAAC,OAAO,GAAG,CAAA;KACvC;SAAM;QACL,cAAc,GAAG,IAAI,CAAA;KACtB;IAED,IAAI,gBAAgB,GAAG,IAAI,CAAA;IAC3B,IAAI,UAAU,KAAK,SAAS,EAAE;QAC5B,gBAAgB,GAAG,UAAU,CAAA;KAC9B;SAAM;QACL,gBAAgB,GAAG,oBAAC,IAAI,IAAC,IAAI,EAAC,OAAO,GAAG,CAAA;KACzC;IAED,OAAO;QACL,SAAS,EAAE,eAAe;QAC1B,UAAU,EAAE,gBAAgB;QAC5B,QAAQ,EAAE,cAAc;QACxB,UAAU,EAAE,gBAAgB;KAC7B,CAAA;AACH,CAAC","sourcesContent":["import type { ReactNode } from 'react'\nimport * as React from 'react'\nimport { Icon } from 'antd'\n\ntype RenderNode = React.ReactNode | ((props: any) => React.ReactNode)\n\nexport default function getIcons({\n suffixIcon,\n clearIcon,\n menuItemSelectedIcon,\n removeIcon,\n loading,\n multiple,\n hasFeedback,\n prefixCls,\n showArrow,\n feedbackIcon,\n}: {\n suffixIcon?: React.ReactNode\n clearIcon?: RenderNode\n menuItemSelectedIcon?: RenderNode\n removeIcon?: RenderNode\n loading?: boolean\n multiple?: boolean\n hasFeedback?: boolean\n feedbackIcon?: ReactNode\n prefixCls: string\n showArrow?: boolean\n}) {\n // Clear Icon\n const mergedClearIcon = clearIcon ?? <Icon type=\"close-circle\" theme=\"filled\" />\n\n // Validation Feedback Icon\n const getSuffixIconNode = (arrowIcon?: ReactNode) => (\n <>\n {showArrow !== false && arrowIcon}\n {hasFeedback && feedbackIcon}\n </>\n )\n\n // Arrow item icon\n let mergedSuffixIcon = null\n if (suffixIcon !== undefined) {\n mergedSuffixIcon = getSuffixIconNode(suffixIcon)\n } else if (loading) {\n mergedSuffixIcon = getSuffixIconNode(<Icon type=\"loading\" />)\n } else {\n const iconCls = `${prefixCls}-suffix`\n mergedSuffixIcon = ({ open, showSearch }: { open: boolean; showSearch: boolean }) => {\n if (open && showSearch) {\n return getSuffixIconNode(<Icon className={iconCls} type=\"search\" />)\n }\n return getSuffixIconNode(<Icon className={iconCls} type=\"down\" />)\n }\n }\n\n // Checked item icon\n let mergedItemIcon = null\n if (menuItemSelectedIcon !== undefined) {\n mergedItemIcon = menuItemSelectedIcon\n } else if (multiple) {\n mergedItemIcon = <Icon type=\"check\" />\n } else {\n mergedItemIcon = null\n }\n\n let mergedRemoveIcon = null\n if (removeIcon !== undefined) {\n mergedRemoveIcon = removeIcon\n } else {\n mergedRemoveIcon = <Icon type=\"close\" />\n }\n\n return {\n clearIcon: mergedClearIcon,\n suffixIcon: mergedSuffixIcon,\n itemIcon: mergedItemIcon,\n removeIcon: mergedRemoveIcon,\n }\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"interface.js","sourceRoot":"","sources":["../../../src/tntd-select/_util/interface.ts"],"names":[],"mappings":"AAMA,MAAM,CAAC,MAAM,KAAK,GAAG,CAAqB,GAAG,IAAO,EAAE,EAAE,CAAC,IAAI,CAAA;AAE7D,MAAM,gBAAgB,GAAG,KAAK,CAAC,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE,YAAY,EAAE,EAAE,CAAC,CAAA;AAI/E,MAAM,gBAAgB,GAAG,KAAK,CAAC,YAAY,EAAE,aAAa,EAAE,SAAS,EAAE,UAAU,CAAC,CAAA;AAIlF,MAAM,aAAa,GAAG,KAAK,CAAC,SAAS,EAAE,OAAO,EAAE,EAAE,CAAC,CAAA","sourcesContent":["import type { ReactElement, JSXElementConstructor } from 'react'\n\nexport type SizeType = 'small' | 'middle' | 'large' | undefined\n\nexport type DirectionType = 'ltr' | 'rtl' | undefined\n\nexport const tuple = <T extends string[]>(...args: T) => args\n\nconst ValidateStatuses = tuple('success', 'warning', 'error', 'validating', '')\n\nexport type ValidateStatus = typeof ValidateStatuses[number]\n\nconst SelectPlacements = tuple('bottomLeft', 'bottomRight', 'topLeft', 'topRight')\n\nexport type SelectCommonPlacement = typeof SelectPlacements[number]\n\nconst InputStatuses = tuple('warning', 'error', '')\n\nexport type InputStatus = typeof InputStatuses[number]\n\nexport interface SpaceCompactItemContextType {\n compactSize?: SizeType\n compactDirection?: 'horizontal' | 'vertical'\n isFirstItem?: boolean\n isLastItem?: boolean\n}\n\nexport interface FormItemStatusContextProps {\n isFormItemInput?: boolean\n status?: ValidateStatus\n hasFeedback?: boolean\n feedbackIcon?: React.ReactNode\n}\n\nexport type DropdownRender = (\n menu: ReactElement<any, string | JSXElementConstructor<any>>\n) => ReactElement<any, string | JSXElementConstructor<any>>\n"]}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { tuple } from './type';
|
|
2
|
+
// ================== Collapse Motion ==================
|
|
3
|
+
const getCollapsedHeight = () => ({
|
|
4
|
+
height: 0,
|
|
5
|
+
opacity: 0
|
|
6
|
+
});
|
|
7
|
+
const getRealHeight = node => {
|
|
8
|
+
const {
|
|
9
|
+
scrollHeight
|
|
10
|
+
} = node;
|
|
11
|
+
return {
|
|
12
|
+
height: scrollHeight,
|
|
13
|
+
opacity: 1
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
const getCurrentHeight = node => ({
|
|
17
|
+
height: node ? node.offsetHeight : 0
|
|
18
|
+
});
|
|
19
|
+
const skipOpacityTransition = (_, event) => (event === null || event === void 0 ? void 0 : event.deadline) === true || event.propertyName === 'height';
|
|
20
|
+
const collapseMotion = {
|
|
21
|
+
motionName: 'ant-motion-collapse',
|
|
22
|
+
onAppearStart: getCollapsedHeight,
|
|
23
|
+
onEnterStart: getCollapsedHeight,
|
|
24
|
+
onAppearActive: getRealHeight,
|
|
25
|
+
onEnterActive: getRealHeight,
|
|
26
|
+
onLeaveStart: getCurrentHeight,
|
|
27
|
+
onLeaveActive: getCollapsedHeight,
|
|
28
|
+
onAppearEnd: skipOpacityTransition,
|
|
29
|
+
onEnterEnd: skipOpacityTransition,
|
|
30
|
+
onLeaveEnd: skipOpacityTransition,
|
|
31
|
+
motionDeadline: 500
|
|
32
|
+
};
|
|
33
|
+
const SelectPlacements = tuple('bottomLeft', 'bottomRight', 'topLeft', 'topRight');
|
|
34
|
+
const getTransitionDirection = placement => {
|
|
35
|
+
if (placement !== undefined && (placement === 'topLeft' || placement === 'topRight')) {
|
|
36
|
+
return `slide-down`;
|
|
37
|
+
}
|
|
38
|
+
return `slide-up`;
|
|
39
|
+
};
|
|
40
|
+
const getTransitionName = (rootPrefixCls, motion, transitionName) => {
|
|
41
|
+
if (transitionName !== undefined) {
|
|
42
|
+
return transitionName;
|
|
43
|
+
}
|
|
44
|
+
return `${rootPrefixCls}-${motion}`;
|
|
45
|
+
};
|
|
46
|
+
export { getTransitionName, getTransitionDirection };
|
|
47
|
+
export default collapseMotion;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"motion.js","sourceRoot":"","sources":["../../../src/tntd-select/_util/motion.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAE/B,wDAAwD;AACxD,MAAM,kBAAkB,GAAuB,GAAG,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC;AACjF,MAAM,aAAa,GAAuB,IAAI,CAAC,EAAE;IAC/C,MAAM,EAAE,YAAY,EAAE,GAAG,IAAI,CAAC;IAC9B,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;AAC9C,CAAC,CAAC;AACF,MAAM,gBAAgB,GAAuB,IAAI,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;AAChG,MAAM,qBAAqB,GAA0B,CAAC,CAAC,EAAE,KAAkB,EAAE,EAAE,CAC7E,CAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,QAAQ,MAAK,IAAI,IAAK,KAAyB,CAAC,YAAY,KAAK,QAAQ,CAAC;AAEnF,MAAM,cAAc,GAAmB;IACrC,UAAU,EAAE,qBAAqB;IACjC,aAAa,EAAE,kBAAkB;IACjC,YAAY,EAAE,kBAAkB;IAChC,cAAc,EAAE,aAAa;IAC7B,aAAa,EAAE,aAAa;IAC5B,YAAY,EAAE,gBAAgB;IAC9B,aAAa,EAAE,kBAAkB;IACjC,WAAW,EAAE,qBAAqB;IAClC,UAAU,EAAE,qBAAqB;IACjC,UAAU,EAAE,qBAAqB;IACjC,cAAc,EAAE,GAAG;CACpB,CAAC;AAEF,MAAM,gBAAgB,GAAG,KAAK,CAAC,YAAY,EAAE,aAAa,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC;AAGnF,MAAM,sBAAsB,GAAG,CAAC,SAA4C,EAAE,EAAE;IAC9E,IAAI,SAAS,KAAK,SAAS,IAAI,CAAC,SAAS,KAAK,SAAS,IAAI,SAAS,KAAK,UAAU,CAAC,EAAE;QACpF,OAAO,YAAY,CAAC;KACrB;IACD,OAAO,UAAU,CAAC;AACpB,CAAC,CAAC;AAEF,MAAM,iBAAiB,GAAG,CAAC,aAAqB,EAAE,MAAc,EAAE,cAAuB,EAAE,EAAE;IAC3F,IAAI,cAAc,KAAK,SAAS,EAAE;QAChC,OAAO,cAAc,CAAC;KACvB;IACD,OAAO,GAAG,aAAa,IAAI,MAAM,EAAE,CAAC;AACtC,CAAC,CAAC;AACF,OAAO,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,CAAC;AACrD,eAAe,cAAc,CAAC","sourcesContent":["import type { CSSMotionProps, MotionEndEventHandler, MotionEventHandler } from 'rc-motion';\nimport type { MotionEvent } from 'rc-motion/lib/interface';\nimport { tuple } from './type';\n\n// ================== Collapse Motion ==================\nconst getCollapsedHeight: MotionEventHandler = () => ({ height: 0, opacity: 0 });\nconst getRealHeight: MotionEventHandler = node => {\n const { scrollHeight } = node;\n return { height: scrollHeight, opacity: 1 };\n};\nconst getCurrentHeight: MotionEventHandler = node => ({ height: node ? node.offsetHeight : 0 });\nconst skipOpacityTransition: MotionEndEventHandler = (_, event: MotionEvent) =>\n event?.deadline === true || (event as TransitionEvent).propertyName === 'height';\n\nconst collapseMotion: CSSMotionProps = {\n motionName: 'ant-motion-collapse',\n onAppearStart: getCollapsedHeight,\n onEnterStart: getCollapsedHeight,\n onAppearActive: getRealHeight,\n onEnterActive: getRealHeight,\n onLeaveStart: getCurrentHeight,\n onLeaveActive: getCollapsedHeight,\n onAppearEnd: skipOpacityTransition,\n onEnterEnd: skipOpacityTransition,\n onLeaveEnd: skipOpacityTransition,\n motionDeadline: 500,\n};\n\nconst SelectPlacements = tuple('bottomLeft', 'bottomRight', 'topLeft', 'topRight');\nexport type SelectCommonPlacement = typeof SelectPlacements[number];\n\nconst getTransitionDirection = (placement: SelectCommonPlacement | undefined) => {\n if (placement !== undefined && (placement === 'topLeft' || placement === 'topRight')) {\n return `slide-down`;\n }\n return `slide-up`;\n};\n\nconst getTransitionName = (rootPrefixCls: string, motion: string, transitionName?: string) => {\n if (transitionName !== undefined) {\n return transitionName;\n }\n return `${rootPrefixCls}-${motion}`;\n};\nexport { getTransitionName, getTransitionDirection };\nexport default collapseMotion;"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"type.js","sourceRoot":"","sources":["../../../src/tntd-select/_util/type.ts"],"names":[],"mappings":"AAAA,qHAAqH;AACrH,MAAM,CAAC,MAAM,KAAK,GAAG,CAAqB,GAAG,IAAO,EAAE,EAAE,CAAC,IAAI,CAAC;AAE9D,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAqB,GAAG,IAAO,EAAE,EAAE,CAAC,IAAI,CAAC","sourcesContent":["// https://stackoverflow.com/questions/46176165/ways-to-get-string-literal-type-of-array-values-without-enum-overhead\nexport const tuple = <T extends string[]>(...args: T) => args;\n\nexport const tupleNum = <T extends number[]>(...args: T) => args;\n\n/**\n * https://stackoverflow.com/a/59187769 Extract the type of an element of an array/tuple without\n * performing indexing\n */\nexport type ElementOf<T> = T extends (infer E)[] ? E : T extends readonly (infer F)[] ? F : never;\n\n/** https://github.com/Microsoft/TypeScript/issues/29729 */\nexport type LiteralUnion<T extends U, U> = T | (U & {});\n"]}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import classNames from 'classnames';
|
|
3
|
+
export const SpaceCompactItemContext = React.createContext(null);
|
|
4
|
+
export const useCompactItemContext = (prefixCls, direction) => {
|
|
5
|
+
const compactItemContext = React.useContext(SpaceCompactItemContext);
|
|
6
|
+
const compactItemClassnames = React.useMemo(() => {
|
|
7
|
+
if (!compactItemContext) return '';
|
|
8
|
+
const {
|
|
9
|
+
compactDirection,
|
|
10
|
+
isFirstItem,
|
|
11
|
+
isLastItem
|
|
12
|
+
} = compactItemContext;
|
|
13
|
+
const separator = compactDirection === 'vertical' ? '-vertical-' : '-';
|
|
14
|
+
return classNames({
|
|
15
|
+
[`${prefixCls}-compact${separator}item`]: true,
|
|
16
|
+
[`${prefixCls}-compact${separator}first-item`]: isFirstItem,
|
|
17
|
+
[`${prefixCls}-compact${separator}last-item`]: isLastItem,
|
|
18
|
+
[`${prefixCls}-compact${separator}item-rtl`]: direction === 'rtl'
|
|
19
|
+
});
|
|
20
|
+
}, [prefixCls, direction, compactItemContext]);
|
|
21
|
+
return {
|
|
22
|
+
compactSize: compactItemContext === null || compactItemContext === void 0 ? void 0 : compactItemContext.compactSize,
|
|
23
|
+
compactDirection: compactItemContext === null || compactItemContext === void 0 ? void 0 : compactItemContext.compactDirection,
|
|
24
|
+
compactItemClassnames
|
|
25
|
+
};
|
|
26
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useCompactItemContext.js","sourceRoot":"","sources":["../../../src/tntd-select/_util/useCompactItemContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,UAAU,MAAM,YAAY,CAAA;AAEnC,MAAM,CAAC,MAAM,uBAAuB,GAAG,KAAK,CAAC,aAAa,CAAqC,IAAI,CAAC,CAAA;AAEpG,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,SAAiB,EAAE,SAAwB,EAAE,EAAE;IACnF,MAAM,kBAAkB,GAAG,KAAK,CAAC,UAAU,CAAC,uBAAuB,CAAC,CAAA;IAEpE,MAAM,qBAAqB,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,EAAE;QAC/C,IAAI,CAAC,kBAAkB;YAAE,OAAO,EAAE,CAAA;QAElC,MAAM,EAAE,gBAAgB,EAAE,WAAW,EAAE,UAAU,EAAE,GAAG,kBAAkB,CAAA;QACxE,MAAM,SAAS,GAAG,gBAAgB,KAAK,UAAU,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,GAAG,CAAA;QAEtE,OAAO,UAAU,CAAC;YAChB,CAAC,GAAG,SAAS,WAAW,SAAS,MAAM,CAAC,EAAE,IAAI;YAC9C,CAAC,GAAG,SAAS,WAAW,SAAS,YAAY,CAAC,EAAE,WAAW;YAC3D,CAAC,GAAG,SAAS,WAAW,SAAS,WAAW,CAAC,EAAE,UAAU;YACzD,CAAC,GAAG,SAAS,WAAW,SAAS,UAAU,CAAC,EAAE,SAAS,KAAK,KAAK;SAClE,CAAC,CAAA;IACJ,CAAC,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,kBAAkB,CAAC,CAAC,CAAA;IAE9C,OAAO;QACL,WAAW,EAAE,kBAAkB,aAAlB,kBAAkB,uBAAlB,kBAAkB,CAAE,WAAW;QAC5C,gBAAgB,EAAE,kBAAkB,aAAlB,kBAAkB,uBAAlB,kBAAkB,CAAE,gBAAgB;QACtD,qBAAqB;KACtB,CAAA;AACH,CAAC,CAAA","sourcesContent":["import * as React from 'react'\nimport type { DirectionType, SpaceCompactItemContextType } from './interface'\nimport classNames from 'classnames'\n\nexport const SpaceCompactItemContext = React.createContext<SpaceCompactItemContextType | null>(null)\n\nexport const useCompactItemContext = (prefixCls: string, direction: DirectionType) => {\n const compactItemContext = React.useContext(SpaceCompactItemContext)\n\n const compactItemClassnames = React.useMemo(() => {\n if (!compactItemContext) return ''\n\n const { compactDirection, isFirstItem, isLastItem } = compactItemContext\n const separator = compactDirection === 'vertical' ? '-vertical-' : '-'\n\n return classNames({\n [`${prefixCls}-compact${separator}item`]: true,\n [`${prefixCls}-compact${separator}first-item`]: isFirstItem,\n [`${prefixCls}-compact${separator}last-item`]: isLastItem,\n [`${prefixCls}-compact${separator}item-rtl`]: direction === 'rtl',\n })\n }, [prefixCls, direction, compactItemContext])\n\n return {\n compactSize: compactItemContext?.compactSize,\n compactDirection: compactItemContext?.compactDirection,\n compactItemClassnames,\n }\n}\n"]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import rcWarning, { resetWarned } from 'rc-util/lib/warning';
|
|
2
|
+
function noop() {}
|
|
3
|
+
// eslint-disable-next-line import/no-mutable-exports
|
|
4
|
+
let warning = noop;
|
|
5
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
6
|
+
warning = (valid, component, message) => {
|
|
7
|
+
rcWarning(valid, `[antd: ${component}] ${message}`);
|
|
8
|
+
// StrictMode will inject console which will not throw warning in React 17.
|
|
9
|
+
if (process.env.NODE_ENV === 'test') {
|
|
10
|
+
resetWarned();
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
export default warning;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"warning.js","sourceRoot":"","sources":["../../../src/tntd-select/_util/warning.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,EAAE,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AAE5D,SAAS,IAAI,KAAI,CAAC;AAIlB,qDAAqD;AACrD,IAAI,OAAO,GAAY,IAAI,CAAA;AAC3B,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,YAAY,EAAE;IACzC,OAAO,GAAG,CAAC,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,EAAE;QACtC,SAAS,CAAC,KAAK,EAAE,UAAU,SAAS,KAAK,OAAO,EAAE,CAAC,CAAA;QAEnD,2EAA2E;QAC3E,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,MAAM,EAAE;YACnC,WAAW,EAAE,CAAA;SACd;IACH,CAAC,CAAA;CACF;AAED,eAAe,OAAO,CAAA","sourcesContent":["import rcWarning, { resetWarned } from 'rc-util/lib/warning'\n\nfunction noop() {}\n\ntype Warning = (valid: boolean, component: string, message?: string) => void\n\n// eslint-disable-next-line import/no-mutable-exports\nlet warning: Warning = noop\nif (process.env.NODE_ENV !== 'production') {\n warning = (valid, component, message) => {\n rcWarning(valid, `[antd: ${component}] ${message}`)\n\n // StrictMode will inject console which will not throw warning in React 17.\n if (process.env.NODE_ENV === 'test') {\n resetWarned()\n }\n }\n}\n\nexport default warning\n"]}
|
|
@@ -0,0 +1,524 @@
|
|
|
1
|
+
var __rest = this && this.__rest || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
4
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
5
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
6
|
+
}
|
|
7
|
+
return t;
|
|
8
|
+
};
|
|
9
|
+
import classNames from 'classnames';
|
|
10
|
+
import useLayoutEffect from 'rc-util/lib/hooks/useLayoutEffect';
|
|
11
|
+
import useMergedState from 'rc-util/lib/hooks/useMergedState';
|
|
12
|
+
import isMobile from 'rc-util/lib/isMobile';
|
|
13
|
+
import KeyCode from 'rc-util/lib/KeyCode';
|
|
14
|
+
import { useComposeRef } from 'rc-util/lib/ref';
|
|
15
|
+
import * as React from 'react';
|
|
16
|
+
import { useAllowClear } from './hooks/useAllowClear';
|
|
17
|
+
import { BaseSelectContext } from './hooks/useBaseProps';
|
|
18
|
+
import useDelayReset from './hooks/useDelayReset';
|
|
19
|
+
import useLock from './hooks/useLock';
|
|
20
|
+
import useSelectTriggerControl from './hooks/useSelectTriggerControl';
|
|
21
|
+
import Selector from './Selector';
|
|
22
|
+
import SelectTrigger from './SelectTrigger';
|
|
23
|
+
import TransBtn from './TransBtn';
|
|
24
|
+
import { getSeparatedContent } from './utils/valueUtil';
|
|
25
|
+
const DEFAULT_OMIT_PROPS = ['value', 'onChange', 'removeIcon', 'placeholder', 'autoFocus', 'maxTagCount', 'maxTagTextLength', 'maxTagPlaceholder', 'choiceTransitionName', 'onInputKeyDown', 'onPopupScroll', 'tabIndex'];
|
|
26
|
+
export function isMultiple(mode) {
|
|
27
|
+
return mode === 'tags' || mode === 'multiple';
|
|
28
|
+
}
|
|
29
|
+
const BaseSelect = React.forwardRef((props, ref) => {
|
|
30
|
+
var _a;
|
|
31
|
+
const {
|
|
32
|
+
id,
|
|
33
|
+
prefixCls,
|
|
34
|
+
className,
|
|
35
|
+
showSearch,
|
|
36
|
+
tagRender,
|
|
37
|
+
direction,
|
|
38
|
+
omitDomProps,
|
|
39
|
+
// Value
|
|
40
|
+
displayValues,
|
|
41
|
+
onDisplayValuesChange,
|
|
42
|
+
emptyOptions,
|
|
43
|
+
notFoundContent = 'Not Found',
|
|
44
|
+
onClear,
|
|
45
|
+
// Mode
|
|
46
|
+
mode,
|
|
47
|
+
// Status
|
|
48
|
+
disabled,
|
|
49
|
+
loading,
|
|
50
|
+
// Customize Input
|
|
51
|
+
getInputElement,
|
|
52
|
+
getRawInputElement,
|
|
53
|
+
// Open
|
|
54
|
+
open,
|
|
55
|
+
defaultOpen,
|
|
56
|
+
onDropdownVisibleChange,
|
|
57
|
+
// Active
|
|
58
|
+
activeValue,
|
|
59
|
+
onActiveValueChange,
|
|
60
|
+
activeDescendantId,
|
|
61
|
+
// Search
|
|
62
|
+
searchValue,
|
|
63
|
+
autoClearSearchValue,
|
|
64
|
+
onSearch,
|
|
65
|
+
onSearchSplit,
|
|
66
|
+
tokenSeparators,
|
|
67
|
+
// Icons
|
|
68
|
+
allowClear,
|
|
69
|
+
suffixIcon,
|
|
70
|
+
clearIcon,
|
|
71
|
+
// Dropdown
|
|
72
|
+
OptionList,
|
|
73
|
+
animation,
|
|
74
|
+
transitionName,
|
|
75
|
+
dropdownStyle,
|
|
76
|
+
dropdownClassName,
|
|
77
|
+
dropdownMatchSelectWidth,
|
|
78
|
+
dropdownRender,
|
|
79
|
+
dropdownAlign,
|
|
80
|
+
placement,
|
|
81
|
+
builtinPlacements,
|
|
82
|
+
getPopupContainer,
|
|
83
|
+
// Focus
|
|
84
|
+
showAction = [],
|
|
85
|
+
onFocus,
|
|
86
|
+
onBlur,
|
|
87
|
+
// Rest Events
|
|
88
|
+
onKeyUp,
|
|
89
|
+
onKeyDown,
|
|
90
|
+
onMouseDown
|
|
91
|
+
} = props,
|
|
92
|
+
// Rest Props
|
|
93
|
+
restProps = __rest(props, ["id", "prefixCls", "className", "showSearch", "tagRender", "direction", "omitDomProps", "displayValues", "onDisplayValuesChange", "emptyOptions", "notFoundContent", "onClear", "mode", "disabled", "loading", "getInputElement", "getRawInputElement", "open", "defaultOpen", "onDropdownVisibleChange", "activeValue", "onActiveValueChange", "activeDescendantId", "searchValue", "autoClearSearchValue", "onSearch", "onSearchSplit", "tokenSeparators", "allowClear", "suffixIcon", "clearIcon", "OptionList", "animation", "transitionName", "dropdownStyle", "dropdownClassName", "dropdownMatchSelectWidth", "dropdownRender", "dropdownAlign", "placement", "builtinPlacements", "getPopupContainer", "showAction", "onFocus", "onBlur", "onKeyUp", "onKeyDown", "onMouseDown"]);
|
|
94
|
+
// ============================== MISC ==============================
|
|
95
|
+
const multiple = isMultiple(mode);
|
|
96
|
+
const mergedShowSearch = (showSearch !== undefined ? showSearch : multiple) || mode === 'combobox';
|
|
97
|
+
const domProps = Object.assign({}, restProps);
|
|
98
|
+
DEFAULT_OMIT_PROPS.forEach(propName => {
|
|
99
|
+
delete domProps[propName];
|
|
100
|
+
});
|
|
101
|
+
omitDomProps === null || omitDomProps === void 0 ? void 0 : omitDomProps.forEach(propName => {
|
|
102
|
+
delete domProps[propName];
|
|
103
|
+
});
|
|
104
|
+
// ============================= Mobile =============================
|
|
105
|
+
const [mobile, setMobile] = React.useState(false);
|
|
106
|
+
React.useEffect(() => {
|
|
107
|
+
// Only update on the client side
|
|
108
|
+
setMobile(isMobile());
|
|
109
|
+
}, []);
|
|
110
|
+
// ============================== Refs ==============================
|
|
111
|
+
const containerRef = React.useRef(null);
|
|
112
|
+
const selectorDomRef = React.useRef(null);
|
|
113
|
+
const triggerRef = React.useRef(null);
|
|
114
|
+
const selectorRef = React.useRef(null);
|
|
115
|
+
const listRef = React.useRef(null);
|
|
116
|
+
const blurRef = React.useRef(false);
|
|
117
|
+
/** Used for component focused management */
|
|
118
|
+
const [mockFocused, setMockFocused, cancelSetMockFocused] = useDelayReset();
|
|
119
|
+
// =========================== Imperative ===========================
|
|
120
|
+
React.useImperativeHandle(ref, () => {
|
|
121
|
+
var _a, _b;
|
|
122
|
+
return {
|
|
123
|
+
focus: (_a = selectorRef.current) === null || _a === void 0 ? void 0 : _a.focus,
|
|
124
|
+
blur: (_b = selectorRef.current) === null || _b === void 0 ? void 0 : _b.blur,
|
|
125
|
+
scrollTo: arg => {
|
|
126
|
+
var _a;
|
|
127
|
+
return (_a = listRef.current) === null || _a === void 0 ? void 0 : _a.scrollTo(arg);
|
|
128
|
+
}
|
|
129
|
+
};
|
|
130
|
+
});
|
|
131
|
+
// ========================== Search Value ==========================
|
|
132
|
+
const mergedSearchValue = React.useMemo(() => {
|
|
133
|
+
var _a;
|
|
134
|
+
if (mode !== 'combobox') {
|
|
135
|
+
return searchValue;
|
|
136
|
+
}
|
|
137
|
+
const val = (_a = displayValues[0]) === null || _a === void 0 ? void 0 : _a.value;
|
|
138
|
+
return typeof val === 'string' || typeof val === 'number' ? String(val) : '';
|
|
139
|
+
}, [searchValue, mode, displayValues]);
|
|
140
|
+
// ========================== Custom Input ==========================
|
|
141
|
+
// Only works in `combobox`
|
|
142
|
+
const customizeInputElement = mode === 'combobox' && typeof getInputElement === 'function' && getInputElement() || null;
|
|
143
|
+
// Used for customize replacement for `rc-cascader`
|
|
144
|
+
const customizeRawInputElement = typeof getRawInputElement === 'function' && getRawInputElement();
|
|
145
|
+
const customizeRawInputRef = useComposeRef(selectorDomRef, (_a = customizeRawInputElement === null || customizeRawInputElement === void 0 ? void 0 : customizeRawInputElement.props) === null || _a === void 0 ? void 0 : _a.ref);
|
|
146
|
+
// ============================== Open ==============================
|
|
147
|
+
// SSR not support Portal which means we need delay `open` for the first time render
|
|
148
|
+
const [rendered, setRendered] = React.useState(false);
|
|
149
|
+
useLayoutEffect(() => {
|
|
150
|
+
setRendered(true);
|
|
151
|
+
}, []);
|
|
152
|
+
const [innerOpen, setInnerOpen] = useMergedState(false, {
|
|
153
|
+
defaultValue: defaultOpen,
|
|
154
|
+
value: open
|
|
155
|
+
});
|
|
156
|
+
let mergedOpen = rendered ? innerOpen : false;
|
|
157
|
+
// Not trigger `open` in `combobox` when `notFoundContent` is empty
|
|
158
|
+
const emptyListContent = !notFoundContent && emptyOptions;
|
|
159
|
+
if (disabled || emptyListContent && mergedOpen && mode === 'combobox') {
|
|
160
|
+
mergedOpen = false;
|
|
161
|
+
}
|
|
162
|
+
const triggerOpen = emptyListContent ? false : mergedOpen;
|
|
163
|
+
const onToggleOpen = React.useCallback(newOpen => {
|
|
164
|
+
const nextOpen = newOpen !== undefined ? newOpen : !mergedOpen;
|
|
165
|
+
if (!disabled) {
|
|
166
|
+
setInnerOpen(nextOpen);
|
|
167
|
+
if (mergedOpen !== nextOpen) {
|
|
168
|
+
onDropdownVisibleChange === null || onDropdownVisibleChange === void 0 ? void 0 : onDropdownVisibleChange(nextOpen);
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
}, [disabled, mergedOpen, setInnerOpen, onDropdownVisibleChange]);
|
|
172
|
+
// ============================= Search =============================
|
|
173
|
+
const tokenWithEnter = React.useMemo(() => (tokenSeparators || []).some(tokenSeparator => ['\n', '\r\n'].includes(tokenSeparator)), [tokenSeparators]);
|
|
174
|
+
const onInternalSearch = (searchText, fromTyping, isCompositing) => {
|
|
175
|
+
let ret = true;
|
|
176
|
+
let newSearchText = searchText;
|
|
177
|
+
onActiveValueChange === null || onActiveValueChange === void 0 ? void 0 : onActiveValueChange(null);
|
|
178
|
+
// Check if match the `tokenSeparators`
|
|
179
|
+
const patchLabels = isCompositing ? null : getSeparatedContent(searchText, tokenSeparators);
|
|
180
|
+
// Ignore combobox since it's not split-able
|
|
181
|
+
if (mode !== 'combobox' && patchLabels) {
|
|
182
|
+
newSearchText = '';
|
|
183
|
+
onSearchSplit === null || onSearchSplit === void 0 ? void 0 : onSearchSplit(patchLabels);
|
|
184
|
+
// Should close when paste finish
|
|
185
|
+
onToggleOpen(false);
|
|
186
|
+
// Tell Selector that break next actions
|
|
187
|
+
ret = false;
|
|
188
|
+
}
|
|
189
|
+
if (onSearch && mergedSearchValue !== newSearchText) {
|
|
190
|
+
onSearch(newSearchText, {
|
|
191
|
+
source: fromTyping ? 'typing' : 'effect'
|
|
192
|
+
});
|
|
193
|
+
}
|
|
194
|
+
return ret;
|
|
195
|
+
};
|
|
196
|
+
// Only triggered when menu is closed & mode is tags
|
|
197
|
+
// If menu is open, OptionList will take charge
|
|
198
|
+
// If mode isn't tags, press enter is not meaningful when you can't see any option
|
|
199
|
+
const onInternalSearchSubmit = searchText => {
|
|
200
|
+
// prevent empty tags from appearing when you click the Enter button
|
|
201
|
+
if (!searchText || !searchText.trim()) {
|
|
202
|
+
return;
|
|
203
|
+
}
|
|
204
|
+
onSearch(searchText, {
|
|
205
|
+
source: 'submit'
|
|
206
|
+
});
|
|
207
|
+
};
|
|
208
|
+
// Close will clean up single mode search text
|
|
209
|
+
React.useEffect(() => {
|
|
210
|
+
if (!mergedOpen && !multiple && mode !== 'combobox') {
|
|
211
|
+
onInternalSearch('', false, false);
|
|
212
|
+
}
|
|
213
|
+
}, [mergedOpen]);
|
|
214
|
+
// ============================ Disabled ============================
|
|
215
|
+
// Close dropdown & remove focus state when disabled change
|
|
216
|
+
React.useEffect(() => {
|
|
217
|
+
if (innerOpen && disabled) {
|
|
218
|
+
setInnerOpen(false);
|
|
219
|
+
}
|
|
220
|
+
// After onBlur is triggered, the focused does not need to be reset
|
|
221
|
+
if (disabled && !blurRef.current) {
|
|
222
|
+
setMockFocused(false);
|
|
223
|
+
}
|
|
224
|
+
}, [disabled]);
|
|
225
|
+
// ============================ Keyboard ============================
|
|
226
|
+
/**
|
|
227
|
+
* We record input value here to check if can press to clean up by backspace
|
|
228
|
+
* - null: Key is not down, this is reset by key up
|
|
229
|
+
* - true: Search text is empty when first time backspace down
|
|
230
|
+
* - false: Search text is not empty when first time backspace down
|
|
231
|
+
*/
|
|
232
|
+
const [getClearLock, setClearLock] = useLock();
|
|
233
|
+
// KeyDown
|
|
234
|
+
const onInternalKeyDown = (event, ...rest) => {
|
|
235
|
+
const clearLock = getClearLock();
|
|
236
|
+
const {
|
|
237
|
+
which
|
|
238
|
+
} = event;
|
|
239
|
+
if (which === KeyCode.ENTER) {
|
|
240
|
+
// Do not submit form when type in the input
|
|
241
|
+
if (mode !== 'combobox') {
|
|
242
|
+
event.preventDefault();
|
|
243
|
+
}
|
|
244
|
+
// We only manage open state here, close logic should handle by list component
|
|
245
|
+
if (!mergedOpen) {
|
|
246
|
+
onToggleOpen(true);
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
setClearLock(!!mergedSearchValue);
|
|
250
|
+
// Remove value by `backspace`
|
|
251
|
+
if (which === KeyCode.BACKSPACE && !clearLock && multiple && !mergedSearchValue && displayValues.length) {
|
|
252
|
+
const cloneDisplayValues = [...displayValues];
|
|
253
|
+
let removedDisplayValue = null;
|
|
254
|
+
for (let i = cloneDisplayValues.length - 1; i >= 0; i -= 1) {
|
|
255
|
+
const current = cloneDisplayValues[i];
|
|
256
|
+
if (!current.disabled) {
|
|
257
|
+
cloneDisplayValues.splice(i, 1);
|
|
258
|
+
removedDisplayValue = current;
|
|
259
|
+
break;
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
if (removedDisplayValue) {
|
|
263
|
+
onDisplayValuesChange(cloneDisplayValues, {
|
|
264
|
+
type: 'remove',
|
|
265
|
+
values: [removedDisplayValue]
|
|
266
|
+
});
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
if (mergedOpen && listRef.current) {
|
|
270
|
+
listRef.current.onKeyDown(event, ...rest);
|
|
271
|
+
}
|
|
272
|
+
onKeyDown === null || onKeyDown === void 0 ? void 0 : onKeyDown(event, ...rest);
|
|
273
|
+
};
|
|
274
|
+
// KeyUp
|
|
275
|
+
const onInternalKeyUp = (event, ...rest) => {
|
|
276
|
+
if (mergedOpen && listRef.current) {
|
|
277
|
+
listRef.current.onKeyUp(event, ...rest);
|
|
278
|
+
}
|
|
279
|
+
onKeyUp === null || onKeyUp === void 0 ? void 0 : onKeyUp(event, ...rest);
|
|
280
|
+
};
|
|
281
|
+
// ============================ Selector ============================
|
|
282
|
+
const onSelectorRemove = val => {
|
|
283
|
+
const newValues = displayValues.filter(i => i !== val);
|
|
284
|
+
onDisplayValuesChange(newValues, {
|
|
285
|
+
type: 'remove',
|
|
286
|
+
values: [val]
|
|
287
|
+
});
|
|
288
|
+
};
|
|
289
|
+
// ========================== Focus / Blur ==========================
|
|
290
|
+
/** Record real focus status */
|
|
291
|
+
const focusRef = React.useRef(false);
|
|
292
|
+
const onContainerFocus = (...args) => {
|
|
293
|
+
setMockFocused(true);
|
|
294
|
+
if (!disabled) {
|
|
295
|
+
if (onFocus && !focusRef.current) {
|
|
296
|
+
onFocus(...args);
|
|
297
|
+
}
|
|
298
|
+
// `showAction` should handle `focus` if set
|
|
299
|
+
if (showAction.includes('focus')) {
|
|
300
|
+
onToggleOpen(true);
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
focusRef.current = true;
|
|
304
|
+
};
|
|
305
|
+
const onContainerBlur = (...args) => {
|
|
306
|
+
blurRef.current = true;
|
|
307
|
+
setMockFocused(false, () => {
|
|
308
|
+
focusRef.current = false;
|
|
309
|
+
blurRef.current = false;
|
|
310
|
+
onToggleOpen(false);
|
|
311
|
+
});
|
|
312
|
+
if (disabled) {
|
|
313
|
+
return;
|
|
314
|
+
}
|
|
315
|
+
if (mergedSearchValue) {
|
|
316
|
+
// `tags` mode should move `searchValue` into values
|
|
317
|
+
if (mode === 'tags') {
|
|
318
|
+
onSearch(mergedSearchValue, {
|
|
319
|
+
source: 'submit'
|
|
320
|
+
});
|
|
321
|
+
} else if (mode === 'multiple') {
|
|
322
|
+
// `multiple` mode only clean the search value but not trigger event
|
|
323
|
+
onSearch('', {
|
|
324
|
+
source: 'blur'
|
|
325
|
+
});
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
if (onBlur) {
|
|
329
|
+
onBlur(...args);
|
|
330
|
+
}
|
|
331
|
+
};
|
|
332
|
+
// Give focus back of Select
|
|
333
|
+
const activeTimeoutIds = [];
|
|
334
|
+
React.useEffect(() => () => {
|
|
335
|
+
activeTimeoutIds.forEach(timeoutId => clearTimeout(timeoutId));
|
|
336
|
+
activeTimeoutIds.splice(0, activeTimeoutIds.length);
|
|
337
|
+
}, []);
|
|
338
|
+
const onInternalMouseDown = (event, ...restArgs) => {
|
|
339
|
+
var _a;
|
|
340
|
+
const {
|
|
341
|
+
target
|
|
342
|
+
} = event;
|
|
343
|
+
const popupElement = (_a = triggerRef.current) === null || _a === void 0 ? void 0 : _a.getPopupElement();
|
|
344
|
+
// We should give focus back to selector if clicked item is not focusable
|
|
345
|
+
if (popupElement && popupElement.contains(target)) {
|
|
346
|
+
const timeoutId = setTimeout(() => {
|
|
347
|
+
var _a;
|
|
348
|
+
const index = activeTimeoutIds.indexOf(timeoutId);
|
|
349
|
+
if (index !== -1) {
|
|
350
|
+
activeTimeoutIds.splice(index, 1);
|
|
351
|
+
}
|
|
352
|
+
cancelSetMockFocused();
|
|
353
|
+
if (!mobile && !popupElement.contains(document.activeElement)) {
|
|
354
|
+
(_a = selectorRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
355
|
+
}
|
|
356
|
+
});
|
|
357
|
+
activeTimeoutIds.push(timeoutId);
|
|
358
|
+
}
|
|
359
|
+
onMouseDown === null || onMouseDown === void 0 ? void 0 : onMouseDown(event, ...restArgs);
|
|
360
|
+
};
|
|
361
|
+
// ============================ Dropdown ============================
|
|
362
|
+
const [, forceUpdate] = React.useState({});
|
|
363
|
+
// We need force update here since popup dom is render async
|
|
364
|
+
function onPopupMouseEnter() {
|
|
365
|
+
forceUpdate({});
|
|
366
|
+
}
|
|
367
|
+
// Used for raw custom input trigger
|
|
368
|
+
let onTriggerVisibleChange;
|
|
369
|
+
if (customizeRawInputElement) {
|
|
370
|
+
onTriggerVisibleChange = newOpen => {
|
|
371
|
+
onToggleOpen(newOpen);
|
|
372
|
+
};
|
|
373
|
+
}
|
|
374
|
+
// Close when click on non-select element
|
|
375
|
+
useSelectTriggerControl(() => {
|
|
376
|
+
var _a;
|
|
377
|
+
return [containerRef.current, (_a = triggerRef.current) === null || _a === void 0 ? void 0 : _a.getPopupElement()];
|
|
378
|
+
}, triggerOpen, onToggleOpen, !!customizeRawInputElement);
|
|
379
|
+
// ============================ Context =============================
|
|
380
|
+
const baseSelectContext = React.useMemo(() => Object.assign(Object.assign({}, props), {
|
|
381
|
+
notFoundContent,
|
|
382
|
+
open: mergedOpen,
|
|
383
|
+
triggerOpen,
|
|
384
|
+
id,
|
|
385
|
+
showSearch: mergedShowSearch,
|
|
386
|
+
multiple,
|
|
387
|
+
toggleOpen: onToggleOpen
|
|
388
|
+
}), [props, notFoundContent, triggerOpen, mergedOpen, id, mergedShowSearch, multiple, onToggleOpen]);
|
|
389
|
+
// ==================================================================
|
|
390
|
+
// == Render ==
|
|
391
|
+
// ==================================================================
|
|
392
|
+
// ============================= Arrow ==============================
|
|
393
|
+
const showSuffixIcon = !!suffixIcon || loading;
|
|
394
|
+
let arrowNode;
|
|
395
|
+
if (showSuffixIcon) {
|
|
396
|
+
arrowNode = React.createElement(TransBtn, {
|
|
397
|
+
className: classNames(`${prefixCls}-arrow`, {
|
|
398
|
+
[`${prefixCls}-arrow-loading`]: loading
|
|
399
|
+
}),
|
|
400
|
+
customizeIcon: suffixIcon,
|
|
401
|
+
customizeIconProps: {
|
|
402
|
+
loading,
|
|
403
|
+
searchValue: mergedSearchValue,
|
|
404
|
+
open: mergedOpen,
|
|
405
|
+
focused: mockFocused,
|
|
406
|
+
showSearch: mergedShowSearch
|
|
407
|
+
}
|
|
408
|
+
});
|
|
409
|
+
}
|
|
410
|
+
// ============================= Clear ==============================
|
|
411
|
+
const onClearMouseDown = () => {
|
|
412
|
+
var _a;
|
|
413
|
+
onClear === null || onClear === void 0 ? void 0 : onClear();
|
|
414
|
+
(_a = selectorRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
415
|
+
onDisplayValuesChange([], {
|
|
416
|
+
type: 'clear',
|
|
417
|
+
values: displayValues
|
|
418
|
+
});
|
|
419
|
+
onInternalSearch('', false, false);
|
|
420
|
+
};
|
|
421
|
+
const {
|
|
422
|
+
allowClear: mergedAllowClear,
|
|
423
|
+
clearIcon: clearNode
|
|
424
|
+
} = useAllowClear(prefixCls, onClearMouseDown, displayValues, allowClear, clearIcon, disabled, mergedSearchValue, mode);
|
|
425
|
+
// =========================== OptionList ===========================
|
|
426
|
+
const optionList = React.createElement(OptionList, {
|
|
427
|
+
ref: listRef
|
|
428
|
+
});
|
|
429
|
+
// ============================= Select =============================
|
|
430
|
+
const mergedClassName = classNames(prefixCls, className, {
|
|
431
|
+
[`${prefixCls}-focused`]: mockFocused,
|
|
432
|
+
[`${prefixCls}-multiple`]: multiple,
|
|
433
|
+
[`${prefixCls}-single`]: !multiple,
|
|
434
|
+
[`${prefixCls}-allow-clear`]: allowClear,
|
|
435
|
+
[`${prefixCls}-show-arrow`]: showSuffixIcon,
|
|
436
|
+
[`${prefixCls}-disabled`]: disabled,
|
|
437
|
+
[`${prefixCls}-loading`]: loading,
|
|
438
|
+
[`${prefixCls}-open`]: mergedOpen,
|
|
439
|
+
[`${prefixCls}-customize-input`]: customizeInputElement,
|
|
440
|
+
[`${prefixCls}-show-search`]: mergedShowSearch
|
|
441
|
+
});
|
|
442
|
+
// >>> Selector
|
|
443
|
+
const selectorNode = React.createElement(SelectTrigger, {
|
|
444
|
+
ref: triggerRef,
|
|
445
|
+
disabled: disabled,
|
|
446
|
+
prefixCls: prefixCls,
|
|
447
|
+
visible: triggerOpen,
|
|
448
|
+
popupElement: optionList,
|
|
449
|
+
animation: animation,
|
|
450
|
+
transitionName: transitionName,
|
|
451
|
+
dropdownStyle: dropdownStyle,
|
|
452
|
+
dropdownClassName: dropdownClassName,
|
|
453
|
+
direction: direction,
|
|
454
|
+
dropdownMatchSelectWidth: dropdownMatchSelectWidth,
|
|
455
|
+
dropdownRender: dropdownRender,
|
|
456
|
+
dropdownAlign: dropdownAlign,
|
|
457
|
+
placement: placement,
|
|
458
|
+
builtinPlacements: builtinPlacements,
|
|
459
|
+
getPopupContainer: getPopupContainer,
|
|
460
|
+
empty: emptyOptions,
|
|
461
|
+
getTriggerDOMNode: () => selectorDomRef.current,
|
|
462
|
+
onPopupVisibleChange: onTriggerVisibleChange,
|
|
463
|
+
onPopupMouseEnter: onPopupMouseEnter
|
|
464
|
+
}, customizeRawInputElement ? React.cloneElement(customizeRawInputElement, {
|
|
465
|
+
ref: customizeRawInputRef
|
|
466
|
+
}) : React.createElement(Selector, Object.assign({}, props, {
|
|
467
|
+
domRef: selectorDomRef,
|
|
468
|
+
prefixCls: prefixCls,
|
|
469
|
+
inputElement: customizeInputElement,
|
|
470
|
+
ref: selectorRef,
|
|
471
|
+
id: id,
|
|
472
|
+
showSearch: mergedShowSearch,
|
|
473
|
+
autoClearSearchValue: autoClearSearchValue,
|
|
474
|
+
mode: mode,
|
|
475
|
+
activeDescendantId: activeDescendantId,
|
|
476
|
+
tagRender: tagRender,
|
|
477
|
+
values: displayValues,
|
|
478
|
+
open: mergedOpen,
|
|
479
|
+
onToggleOpen: onToggleOpen,
|
|
480
|
+
activeValue: activeValue,
|
|
481
|
+
searchValue: mergedSearchValue,
|
|
482
|
+
onSearch: onInternalSearch,
|
|
483
|
+
onSearchSubmit: onInternalSearchSubmit,
|
|
484
|
+
onRemove: onSelectorRemove,
|
|
485
|
+
tokenWithEnter: tokenWithEnter
|
|
486
|
+
})));
|
|
487
|
+
// >>> Render
|
|
488
|
+
let renderNode;
|
|
489
|
+
// Render raw
|
|
490
|
+
if (customizeRawInputElement) {
|
|
491
|
+
renderNode = selectorNode;
|
|
492
|
+
} else {
|
|
493
|
+
renderNode = React.createElement("div", Object.assign({
|
|
494
|
+
className: mergedClassName
|
|
495
|
+
}, domProps, {
|
|
496
|
+
ref: containerRef,
|
|
497
|
+
onMouseDown: onInternalMouseDown,
|
|
498
|
+
onKeyDown: onInternalKeyDown,
|
|
499
|
+
onKeyUp: onInternalKeyUp,
|
|
500
|
+
onFocus: onContainerFocus,
|
|
501
|
+
onBlur: onContainerBlur
|
|
502
|
+
}), mockFocused && !mergedOpen && React.createElement("span", {
|
|
503
|
+
style: {
|
|
504
|
+
width: 0,
|
|
505
|
+
height: 0,
|
|
506
|
+
position: 'absolute',
|
|
507
|
+
overflow: 'hidden',
|
|
508
|
+
opacity: 0
|
|
509
|
+
},
|
|
510
|
+
"aria-live": "polite"
|
|
511
|
+
}, `${displayValues.map(({
|
|
512
|
+
label,
|
|
513
|
+
value
|
|
514
|
+
}) => ['number', 'string'].includes(typeof label) ? label : value).join(', ')}`), selectorNode, arrowNode, mergedAllowClear && clearNode);
|
|
515
|
+
}
|
|
516
|
+
return React.createElement(BaseSelectContext.Provider, {
|
|
517
|
+
value: baseSelectContext
|
|
518
|
+
}, renderNode);
|
|
519
|
+
});
|
|
520
|
+
// Set display name for dev
|
|
521
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
522
|
+
BaseSelect.displayName = 'BaseSelect';
|
|
523
|
+
}
|
|
524
|
+
export default BaseSelect;
|