tntd 2.7.30 → 2.7.32
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/ellipsis/index.js +2 -0
- package/es/ellipsis/index.js.map +1 -1
- package/es/form/form.js +37 -38
- package/es/form/form.js.map +1 -1
- package/es/tntd-form/_util/context.js.map +1 -0
- package/es/tntd-form/_util/defaultRenderEmpty.js.map +1 -0
- package/es/tntd-form/_util/hooks/useFlexGapSupport.js +9 -0
- package/es/tntd-form/_util/hooks/useFlexGapSupport.js.map +1 -0
- package/es/tntd-form/_util/hooks/useForceUpdate.js +5 -0
- package/es/tntd-form/_util/hooks/useForceUpdate.js.map +1 -0
- package/es/tntd-form/_util/responsiveObserve.js +59 -0
- package/es/tntd-form/_util/responsiveObserve.js.map +1 -0
- package/es/tntd-form/_util/styleChecker.js +26 -0
- package/es/tntd-form/_util/styleChecker.js.map +1 -0
- package/es/tntd-form/grid/RowContext.js.map +1 -0
- package/es/{grid-v4 → tntd-form/grid}/col.js +1 -0
- package/es/tntd-form/grid/col.js.map +1 -0
- package/es/tntd-form/grid/hooks/useBreakpoint.js.map +1 -0
- package/es/tntd-form/grid/index.js.map +1 -0
- package/es/{grid-v4 → tntd-form/grid}/row.js +0 -1
- package/es/tntd-form/grid/row.js.map +1 -0
- package/es/tntd-form/grid/style/index.js.map +1 -0
- package/lib/ellipsis/index.d.ts.map +1 -1
- package/lib/ellipsis/index.js +2 -0
- package/lib/ellipsis/index.js.map +1 -1
- package/lib/form/form.d.ts +1 -2
- package/lib/form/form.d.ts.map +1 -1
- package/lib/form/form.js +41 -40
- package/lib/form/form.js.map +1 -1
- package/lib/tntd-form/_util/context.d.ts.map +1 -0
- package/lib/tntd-form/_util/context.js.map +1 -0
- package/lib/tntd-form/_util/defaultRenderEmpty.d.ts.map +1 -0
- package/lib/tntd-form/_util/defaultRenderEmpty.js.map +1 -0
- package/lib/tntd-form/_util/hooks/useFlexGapSupport.d.ts +3 -0
- package/lib/tntd-form/_util/hooks/useFlexGapSupport.d.ts.map +1 -0
- package/lib/{tntd-select/rc-select/hooks/useDelayReset.js → tntd-form/_util/hooks/useFlexGapSupport.js} +9 -25
- package/lib/tntd-form/_util/hooks/useFlexGapSupport.js.map +1 -0
- package/lib/tntd-form/_util/hooks/useForceUpdate.d.ts +3 -0
- package/lib/tntd-form/_util/hooks/useForceUpdate.d.ts.map +1 -0
- package/lib/{tntd-select/rc-select/hooks/useId.js → tntd-form/_util/hooks/useForceUpdate.js} +8 -32
- package/lib/tntd-form/_util/hooks/useForceUpdate.js.map +1 -0
- package/lib/tntd-form/_util/responsiveObserve.d.ts +22 -0
- package/lib/tntd-form/_util/responsiveObserve.d.ts.map +1 -0
- package/lib/tntd-form/_util/responsiveObserve.js +73 -0
- package/lib/tntd-form/_util/responsiveObserve.js.map +1 -0
- package/lib/tntd-form/_util/styleChecker.d.ts +5 -0
- package/lib/tntd-form/_util/styleChecker.d.ts.map +1 -0
- package/lib/tntd-form/_util/styleChecker.js +42 -0
- package/lib/tntd-form/_util/styleChecker.js.map +1 -0
- package/lib/tntd-form/grid/RowContext.d.ts.map +1 -0
- package/lib/tntd-form/grid/RowContext.js.map +1 -0
- package/lib/tntd-form/grid/col.d.ts.map +1 -0
- package/lib/tntd-form/grid/col.js.map +1 -0
- package/lib/tntd-form/grid/hooks/useBreakpoint.d.ts.map +1 -0
- package/lib/tntd-form/grid/hooks/useBreakpoint.js.map +1 -0
- package/lib/tntd-form/grid/index.d.ts.map +1 -0
- package/lib/tntd-form/grid/index.js.map +1 -0
- package/lib/tntd-form/grid/row.d.ts.map +1 -0
- package/lib/{grid-v4 → tntd-form/grid}/row.js +0 -1
- package/lib/tntd-form/grid/row.js.map +1 -0
- package/lib/tntd-form/grid/style/index.d.ts.map +1 -0
- package/lib/tntd-form/grid/style/index.js.map +1 -0
- package/lib/tntd-form/tntd-form.stories.d.ts +1 -1
- package/package.json +1 -1
- package/themes/common/index.less +3 -3
- package/es/affix/style/index.js.map +0 -1
- package/es/affix/style/index.less +0 -6
- package/es/alert/style/index.js +0 -2
- package/es/alert/style/index.js.map +0 -1
- package/es/alert/style/index.less +0 -188
- package/es/anchor/style/index.js +0 -4
- package/es/anchor/style/index.js.map +0 -1
- package/es/anchor/style/index.less +0 -82
- package/es/auto-complete/style/index.js +0 -5
- package/es/auto-complete/style/index.js.map +0 -1
- package/es/auto-complete/style/index.less +0 -92
- package/es/avatar/style/index.js +0 -2
- package/es/avatar/style/index.js.map +0 -1
- package/es/avatar/style/index.less +0 -59
- package/es/back-top/style/index.js +0 -2
- package/es/back-top/style/index.js.map +0 -1
- package/es/back-top/style/index.less +0 -42
- package/es/back-top/style/responsive.less +0 -11
- package/es/badge/style/index.js +0 -2
- package/es/badge/style/index.js.map +0 -1
- package/es/badge/style/index.less +0 -190
- package/es/breadcrumb/style/index.js +0 -4
- package/es/breadcrumb/style/index.js.map +0 -1
- package/es/breadcrumb/style/index.less +0 -51
- package/es/button/style/index.js +0 -2
- package/es/button/style/index.js.map +0 -1
- package/es/button/style/index.less +0 -224
- package/es/button/style/mixin.less +0 -357
- package/es/calendar/style/index.js +0 -5
- package/es/calendar/style/index.js.map +0 -1
- package/es/calendar/style/index.less +0 -278
- package/es/card/style/index.js +0 -6
- package/es/card/style/index.js.map +0 -1
- package/es/card/style/index.less +0 -263
- package/es/card/style/size.less +0 -25
- package/es/carousel/style/index.js +0 -2
- package/es/carousel/style/index.js.map +0 -1
- package/es/carousel/style/index.less +0 -238
- package/es/cascader/style/index.js +0 -5
- package/es/cascader/style/index.js.map +0 -1
- package/es/cascader/style/index.less +0 -227
- package/es/checkbox/style/index.js +0 -2
- package/es/checkbox/style/index.js.map +0 -1
- package/es/checkbox/style/index.less +0 -4
- package/es/checkbox/style/mixin.less +0 -220
- package/es/col/style/index.js +0 -4
- package/es/col/style/index.js.map +0 -1
- package/es/collapse/style/index.js +0 -2
- package/es/collapse/style/index.js.map +0 -1
- package/es/collapse/style/index.less +0 -134
- package/es/comment/style/index.js +0 -2
- package/es/comment/style/index.js.map +0 -1
- package/es/comment/style/index.less +0 -93
- package/es/config-provider/style/index.js +0 -1
- package/es/config-provider/style/index.js.map +0 -1
- package/es/config-provider/style/index.less +0 -2
- package/es/date-picker/style/Calendar.less +0 -402
- package/es/date-picker/style/DecadePanel.less +0 -81
- package/es/date-picker/style/MonthPanel.less +0 -86
- package/es/date-picker/style/MonthPicker.less +0 -11
- package/es/date-picker/style/Picker.less +0 -113
- package/es/date-picker/style/RangePicker.less +0 -248
- package/es/date-picker/style/TimePicker.less +0 -151
- package/es/date-picker/style/WeekPicker.less +0 -21
- package/es/date-picker/style/YearPanel.less +0 -85
- package/es/date-picker/style/index.js +0 -7
- package/es/date-picker/style/index.js.map +0 -1
- package/es/date-picker/style/index.less +0 -17
- package/es/descriptions/style/index.js +0 -2
- package/es/descriptions/style/index.js.map +0 -1
- package/es/descriptions/style/index.less +0 -144
- package/es/divider/style/index.js +0 -2
- package/es/divider/style/index.js.map +0 -1
- package/es/divider/style/index.less +0 -109
- package/es/drawer/style/drawer.less +0 -230
- package/es/drawer/style/index.js +0 -3
- package/es/drawer/style/index.js.map +0 -1
- package/es/drawer/style/index.less +0 -3
- package/es/dropdown/style/index.js +0 -4
- package/es/dropdown/style/index.js.map +0 -1
- package/es/dropdown/style/index.less +0 -282
- package/es/empty/style/index.js +0 -2
- package/es/empty/style/index.js.map +0 -1
- package/es/empty/style/index.less +0 -52
- package/es/form/style/index.js +0 -4
- package/es/form/style/index.js.map +0 -1
- package/es/form/style/index.less +0 -653
- package/es/form/style/mixin.less +0 -126
- package/es/grid-v4/RowContext.js.map +0 -1
- package/es/grid-v4/col.js.map +0 -1
- package/es/grid-v4/hooks/useBreakpoint.js.map +0 -1
- package/es/grid-v4/index.js.map +0 -1
- package/es/grid-v4/row.js.map +0 -1
- package/es/grid-v4/style/index.js +0 -2
- package/es/grid-v4/style/index.js.map +0 -1
- package/es/grid-v4/style/index.less +0 -124
- package/es/grid-v4/style/mixin.less +0 -57
- package/es/grid-v4/style/rtl.less +0 -69
- package/es/handle/handle.js +0 -138
- package/es/handle/handle.js.map +0 -1
- package/es/icon/style/index.js +0 -2
- package/es/icon/style/index.js.map +0 -1
- package/es/icon/style/index.less +0 -4
- package/es/input/style/index.js +0 -4
- package/es/input/style/index.js.map +0 -1
- package/es/input/style/index.less +0 -57
- package/es/input/style/mixin.less +0 -449
- package/es/input/style/search-input.less +0 -34
- package/es/input-number/style/index.js +0 -2
- package/es/input-number/style/index.js.map +0 -1
- package/es/input-number/style/index.less +0 -179
- package/es/layout/style/index.js +0 -2
- package/es/layout/style/index.js.map +0 -1
- package/es/layout/style/index.less +0 -124
- package/es/layout/style/light.less +0 -15
- package/es/list/style/bordered.less +0 -41
- package/es/list/style/index.js +0 -7
- package/es/list/style/index.js.map +0 -1
- package/es/list/style/index.less +0 -234
- package/es/list/style/responsive.less +0 -40
- package/es/locale-provider/style/index.js +0 -1
- package/es/locale-provider/style/index.js.map +0 -1
- package/es/locale-provider/style/index.less +0 -2
- package/es/mention/index.js +0 -4
- package/es/mention/index.js.map +0 -1
- package/es/mentions/style/index.js +0 -4
- package/es/mentions/style/index.js.map +0 -1
- package/es/mentions/style/index.less +0 -164
- package/es/menu/style/dark.less +0 -139
- package/es/menu/style/index.js +0 -5
- package/es/menu/style/index.js.map +0 -1
- package/es/menu/style/index.less +0 -515
- package/es/message/style/index.js +0 -2
- package/es/message/style/index.js.map +0 -1
- package/es/message/style/index.less +0 -75
- package/es/modal/style/confirm.less +0 -78
- package/es/modal/style/index.js +0 -4
- package/es/modal/style/index.js.map +0 -1
- package/es/modal/style/index.less +0 -4
- package/es/modal/style/modal.less +0 -165
- package/es/notification/style/index.js +0 -2
- package/es/notification/style/index.js.map +0 -1
- package/es/notification/style/index.less +0 -199
- package/es/page-header/style/index.js +0 -4
- package/es/page-header/style/index.js.map +0 -1
- package/es/page-header/style/index.less +0 -119
- package/es/pagination/style/index.js +0 -4
- package/es/pagination/style/index.js.map +0 -1
- package/es/pagination/style/index.less +0 -400
- package/es/popconfirm/style/index.js +0 -5
- package/es/popconfirm/style/index.js.map +0 -1
- package/es/popover/style/index.js +0 -4
- package/es/popover/style/index.js.map +0 -1
- package/es/popover/style/index.less +0 -205
- package/es/progress/style/index.js +0 -2
- package/es/progress/style/index.js.map +0 -1
- package/es/progress/style/index.less +0 -182
- package/es/radio/style/index.js +0 -2
- package/es/radio/style/index.js.map +0 -1
- package/es/radio/style/index.less +0 -327
- package/es/rate/style/index.js +0 -4
- package/es/rate/style/index.js.map +0 -1
- package/es/rate/style/index.less +0 -85
- package/es/result/style/index.js +0 -2
- package/es/result/style/index.js.map +0 -1
- package/es/result/style/index.less +0 -71
- package/es/row/style/index.js +0 -4
- package/es/row/style/index.js.map +0 -1
- package/es/select/style/index.js +0 -4
- package/es/select/style/index.js.map +0 -1
- package/es/select/style/index.less +0 -604
- package/es/skeleton/style/index.js +0 -2
- package/es/skeleton/style/index.js.map +0 -1
- package/es/skeleton/style/index.less +0 -130
- package/es/slider/style/index.js +0 -4
- package/es/slider/style/index.js.map +0 -1
- package/es/slider/style/index.less +0 -197
- package/es/spin/style/index.js +0 -2
- package/es/spin/style/index.js.map +0 -1
- package/es/spin/style/index.less +0 -214
- package/es/statistic/style/index.js +0 -2
- package/es/statistic/style/index.js.map +0 -1
- package/es/statistic/style/index.less +0 -40
- package/es/steps/style/compatibility.less +0 -50
- package/es/steps/style/custom-icon.less +0 -31
- package/es/steps/style/index.js +0 -2
- package/es/steps/style/index.js.map +0 -1
- package/es/steps/style/label-placement.less +0 -38
- package/es/steps/style/progress-dot.less +0 -80
- package/es/steps/style/vertical.less +0 -74
- package/es/style/color/bezierEasing.less +0 -110
- package/es/style/color/colorPalette.less +0 -75
- package/es/style/color/colors.less +0 -149
- package/es/style/color/tinyColor.less +0 -1184
- package/es/style/core/base.less +0 -510
- package/es/style/core/iconfont.less +0 -19
- package/es/style/core/index.less +0 -4
- package/es/style/core/motion/fade.less +0 -31
- package/es/style/core/motion/move.less +0 -120
- package/es/style/core/motion/other.less +0 -40
- package/es/style/core/motion/slide.less +0 -120
- package/es/style/core/motion/swing.less +0 -34
- package/es/style/core/motion/zoom.less +0 -162
- package/es/style/core/motion.less +0 -20
- package/es/style/index.js +0 -1
- package/es/style/index.js.map +0 -1
- package/es/style/index.less +0 -2
- package/es/style/mixins/clearfix.less +0 -13
- package/es/style/mixins/compatibility.less +0 -22
- package/es/style/mixins/iconfont.less +0 -43
- package/es/style/mixins/index.less +0 -10
- package/es/style/mixins/motion.less +0 -35
- package/es/style/mixins/operation-unit.less +0 -18
- package/es/style/mixins/reset.less +0 -13
- package/es/style/mixins/size.less +0 -10
- package/es/style/mixins/typography.less +0 -49
- package/es/style/themes/default.less +0 -699
- package/es/style/themes/index.less +0 -1
- package/es/style/v2-compatible-reset.js +0 -1
- package/es/style/v2-compatible-reset.js.map +0 -1
- package/es/style/v2-compatible-reset.less +0 -51
- package/es/switch/style/index.js +0 -2
- package/es/switch/style/index.js.map +0 -1
- package/es/switch/style/index.less +0 -178
- package/es/table/style/index.js +0 -10
- package/es/table/style/index.js.map +0 -1
- package/es/table/style/index.less +0 -800
- package/es/table/style/size.less +0 -179
- package/es/tabs/style/card-style.less +0 -186
- package/es/tabs/style/index.js +0 -2
- package/es/tabs/style/index.js.map +0 -1
- package/es/tabs/style/index.less +0 -436
- package/es/tag/style/index.js +0 -2
- package/es/tag/style/index.js.map +0 -1
- package/es/tag/style/index.less +0 -106
- package/es/time-picker/style/index.js +0 -2
- package/es/time-picker/style/index.js.map +0 -1
- package/es/time-picker/style/index.less +0 -246
- package/es/timeline/style/index.js +0 -2
- package/es/timeline/style/index.js.map +0 -1
- package/es/timeline/style/index.less +0 -167
- package/es/tntd-form/TntdForm/components/Item.js +0 -55
- package/es/tntd-form/TntdForm/components/Item.js.map +0 -1
- package/es/tntd-form/TntdForm/components/ItemComp.js +0 -186
- package/es/tntd-form/TntdForm/components/ItemComp.js.map +0 -1
- package/es/tntd-form/TntdForm/components/List.js +0 -102
- package/es/tntd-form/TntdForm/components/List.js.map +0 -1
- package/es/tntd-form/TntdForm/index.js +0 -55
- package/es/tntd-form/TntdForm/index.js.map +0 -1
- package/es/tntd-form/TntdForm/interface.js +0 -1
- package/es/tntd-form/TntdForm/interface.js.map +0 -1
- package/es/tntd-form/TntdForm/store.js +0 -2
- package/es/tntd-form/TntdForm/store.js.map +0 -1
- package/es/tntd-form/TntdForm/utils.js +0 -219
- package/es/tntd-form/TntdForm/utils.js.map +0 -1
- package/es/tntd-select/_util/DisabledContext.js +0 -12
- package/es/tntd-select/_util/DisabledContext.js.map +0 -1
- package/es/tntd-select/_util/FormItemInputContext.js +0 -2
- package/es/tntd-select/_util/FormItemInputContext.js.map +0 -1
- package/es/tntd-select/_util/PurePanel.js +0 -66
- package/es/tntd-select/_util/PurePanel.js.map +0 -1
- package/es/tntd-select/_util/SizeContext.js +0 -2
- package/es/tntd-select/_util/SizeContext.js.map +0 -1
- package/es/tntd-select/_util/context.js.map +0 -1
- package/es/tntd-select/_util/defaultRenderEmpty.js.map +0 -1
- package/es/tntd-select/_util/getIcons.js +0 -74
- package/es/tntd-select/_util/getIcons.js.map +0 -1
- package/es/tntd-select/_util/interface.js +0 -4
- package/es/tntd-select/_util/interface.js.map +0 -1
- package/es/tntd-select/_util/motion.js +0 -47
- package/es/tntd-select/_util/motion.js.map +0 -1
- package/es/tntd-select/_util/type.js +0 -3
- package/es/tntd-select/_util/type.js.map +0 -1
- package/es/tntd-select/_util/useCompactItemContext.js +0 -26
- package/es/tntd-select/_util/useCompactItemContext.js.map +0 -1
- package/es/tntd-select/_util/warning.js +0 -14
- package/es/tntd-select/_util/warning.js.map +0 -1
- package/es/tntd-select/rc-select/BaseSelect.js +0 -524
- package/es/tntd-select/rc-select/BaseSelect.js.map +0 -1
- package/es/tntd-select/rc-select/OptGroup.js +0 -4
- package/es/tntd-select/rc-select/OptGroup.js.map +0 -1
- package/es/tntd-select/rc-select/Option.js +0 -4
- package/es/tntd-select/rc-select/Option.js.map +0 -1
- package/es/tntd-select/rc-select/OptionList.js +0 -346
- package/es/tntd-select/rc-select/OptionList.js.map +0 -1
- package/es/tntd-select/rc-select/Select.js +0 -440
- package/es/tntd-select/rc-select/Select.js.map +0 -1
- package/es/tntd-select/rc-select/SelectContext.js +0 -3
- package/es/tntd-select/rc-select/SelectContext.js.map +0 -1
- package/es/tntd-select/rc-select/SelectTrigger.js +0 -130
- package/es/tntd-select/rc-select/SelectTrigger.js.map +0 -1
- package/es/tntd-select/rc-select/Selector/Input.js +0 -103
- package/es/tntd-select/rc-select/Selector/Input.js.map +0 -1
- package/es/tntd-select/rc-select/Selector/MultipleSelector.js +0 -171
- package/es/tntd-select/rc-select/Selector/MultipleSelector.js.map +0 -1
- package/es/tntd-select/rc-select/Selector/SingleSelector.js +0 -98
- package/es/tntd-select/rc-select/Selector/SingleSelector.js.map +0 -1
- package/es/tntd-select/rc-select/Selector/index.js +0 -158
- package/es/tntd-select/rc-select/Selector/index.js.map +0 -1
- package/es/tntd-select/rc-select/TransBtn.js +0 -36
- package/es/tntd-select/rc-select/TransBtn.js.map +0 -1
- package/es/tntd-select/rc-select/hooks/useAllowClear.js +0 -24
- package/es/tntd-select/rc-select/hooks/useAllowClear.js.map +0 -1
- package/es/tntd-select/rc-select/hooks/useBaseProps.js +0 -9
- package/es/tntd-select/rc-select/hooks/useBaseProps.js.map +0 -1
- package/es/tntd-select/rc-select/hooks/useCache.js +0 -38
- package/es/tntd-select/rc-select/hooks/useCache.js.map +0 -1
- package/es/tntd-select/rc-select/hooks/useDelayReset.js +0 -23
- package/es/tntd-select/rc-select/hooks/useDelayReset.js.map +0 -1
- package/es/tntd-select/rc-select/hooks/useFilterOptions.js +0 -55
- package/es/tntd-select/rc-select/hooks/useFilterOptions.js.map +0 -1
- package/es/tntd-select/rc-select/hooks/useId.js +0 -26
- package/es/tntd-select/rc-select/hooks/useId.js.map +0 -1
- package/es/tntd-select/rc-select/hooks/useLayoutEffect.js +0 -16
- package/es/tntd-select/rc-select/hooks/useLayoutEffect.js.map +0 -1
- package/es/tntd-select/rc-select/hooks/useLock.js +0 -25
- package/es/tntd-select/rc-select/hooks/useLock.js.map +0 -1
- package/es/tntd-select/rc-select/hooks/useOptions.js +0 -43
- package/es/tntd-select/rc-select/hooks/useOptions.js.map +0 -1
- package/es/tntd-select/rc-select/hooks/useRefFunc.js +0 -13
- package/es/tntd-select/rc-select/hooks/useRefFunc.js.map +0 -1
- package/es/tntd-select/rc-select/hooks/useSelectTriggerControl.js +0 -28
- package/es/tntd-select/rc-select/hooks/useSelectTriggerControl.js.map +0 -1
- package/es/tntd-select/rc-select/index.js +0 -7
- package/es/tntd-select/rc-select/index.js.map +0 -1
- package/es/tntd-select/rc-select/interface.js +0 -1
- package/es/tntd-select/rc-select/interface.js.map +0 -1
- package/es/tntd-select/rc-select/utils/commonUtil.js +0 -30
- package/es/tntd-select/rc-select/utils/commonUtil.js.map +0 -1
- package/es/tntd-select/rc-select/utils/keyUtil.js +0 -9
- package/es/tntd-select/rc-select/utils/keyUtil.js.map +0 -1
- package/es/tntd-select/rc-select/utils/legacyUtil.js +0 -55
- package/es/tntd-select/rc-select/utils/legacyUtil.js.map +0 -1
- package/es/tntd-select/rc-select/utils/platformUtil.js +0 -4
- package/es/tntd-select/rc-select/utils/platformUtil.js.map +0 -1
- package/es/tntd-select/rc-select/utils/valueUtil.js +0 -112
- package/es/tntd-select/rc-select/utils/valueUtil.js.map +0 -1
- package/es/tntd-select/rc-select/utils/warningPropsUtil.js +0 -112
- package/es/tntd-select/rc-select/utils/warningPropsUtil.js.map +0 -1
- package/es/tooltip/style/index.js +0 -2
- package/es/tooltip/style/index.js.map +0 -1
- package/es/tooltip/style/index.less +0 -187
- package/es/transfer/style/customize.less +0 -62
- package/es/transfer/style/index.js +0 -7
- package/es/transfer/style/index.js.map +0 -1
- package/es/transfer/style/index.less +0 -191
- package/es/tree/style/directory.less +0 -95
- package/es/tree/style/index.js +0 -2
- package/es/tree/style/index.js.map +0 -1
- package/es/tree/style/index.less +0 -280
- package/es/tree/style/mixin.less +0 -29
- package/es/tree-select/style/index.js +0 -6
- package/es/tree-select/style/index.js.map +0 -1
- package/es/tree-select/style/index.less +0 -191
- package/es/typography/style/index.js +0 -5
- package/es/typography/style/index.js.map +0 -1
- package/es/typography/style/index.less +0 -204
- package/es/upload/style/index.js +0 -5
- package/es/upload/style/index.js.map +0 -1
- package/es/upload/style/index.less +0 -542
- package/es/version/style/index.js +0 -2
- package/es/version/style/index.js.map +0 -1
- package/lib/affix/style/index.d.ts.map +0 -1
- package/lib/affix/style/index.js.map +0 -1
- package/lib/affix/style/index.less +0 -6
- package/lib/alert/style/index.d.ts +0 -3
- package/lib/alert/style/index.d.ts.map +0 -1
- package/lib/alert/style/index.js +0 -4
- package/lib/alert/style/index.js.map +0 -1
- package/lib/alert/style/index.less +0 -188
- package/lib/anchor/style/index.d.ts +0 -4
- package/lib/anchor/style/index.d.ts.map +0 -1
- package/lib/anchor/style/index.js +0 -5
- package/lib/anchor/style/index.js.map +0 -1
- package/lib/anchor/style/index.less +0 -82
- package/lib/auto-complete/style/index.d.ts +0 -5
- package/lib/auto-complete/style/index.d.ts.map +0 -1
- package/lib/auto-complete/style/index.js +0 -6
- package/lib/auto-complete/style/index.js.map +0 -1
- package/lib/auto-complete/style/index.less +0 -92
- package/lib/avatar/style/index.d.ts +0 -3
- package/lib/avatar/style/index.d.ts.map +0 -1
- package/lib/avatar/style/index.js +0 -4
- package/lib/avatar/style/index.js.map +0 -1
- package/lib/avatar/style/index.less +0 -59
- package/lib/back-top/style/index.d.ts +0 -3
- package/lib/back-top/style/index.d.ts.map +0 -1
- package/lib/back-top/style/index.js +0 -4
- package/lib/back-top/style/index.js.map +0 -1
- package/lib/back-top/style/index.less +0 -42
- package/lib/back-top/style/responsive.less +0 -11
- package/lib/badge/style/index.d.ts +0 -3
- package/lib/badge/style/index.d.ts.map +0 -1
- package/lib/badge/style/index.js +0 -4
- package/lib/badge/style/index.js.map +0 -1
- package/lib/badge/style/index.less +0 -190
- package/lib/breadcrumb/style/index.d.ts +0 -5
- package/lib/breadcrumb/style/index.d.ts.map +0 -1
- package/lib/breadcrumb/style/index.js +0 -6
- package/lib/breadcrumb/style/index.js.map +0 -1
- package/lib/breadcrumb/style/index.less +0 -51
- package/lib/button/style/index.d.ts +0 -3
- package/lib/button/style/index.d.ts.map +0 -1
- package/lib/button/style/index.js +0 -4
- package/lib/button/style/index.js.map +0 -1
- package/lib/button/style/index.less +0 -224
- package/lib/button/style/mixin.less +0 -357
- package/lib/calendar/style/index.d.ts +0 -5
- package/lib/calendar/style/index.d.ts.map +0 -1
- package/lib/calendar/style/index.js +0 -6
- package/lib/calendar/style/index.js.map +0 -1
- package/lib/calendar/style/index.less +0 -278
- package/lib/card/style/index.d.ts +0 -6
- package/lib/card/style/index.d.ts.map +0 -1
- package/lib/card/style/index.js +0 -7
- package/lib/card/style/index.js.map +0 -1
- package/lib/card/style/index.less +0 -263
- package/lib/card/style/size.less +0 -25
- package/lib/carousel/style/index.d.ts +0 -3
- package/lib/carousel/style/index.d.ts.map +0 -1
- package/lib/carousel/style/index.js +0 -4
- package/lib/carousel/style/index.js.map +0 -1
- package/lib/carousel/style/index.less +0 -238
- package/lib/cascader/style/index.d.ts +0 -5
- package/lib/cascader/style/index.d.ts.map +0 -1
- package/lib/cascader/style/index.js +0 -6
- package/lib/cascader/style/index.js.map +0 -1
- package/lib/cascader/style/index.less +0 -227
- package/lib/checkbox/style/index.d.ts +0 -3
- package/lib/checkbox/style/index.d.ts.map +0 -1
- package/lib/checkbox/style/index.js +0 -4
- package/lib/checkbox/style/index.js.map +0 -1
- package/lib/checkbox/style/index.less +0 -4
- package/lib/checkbox/style/mixin.less +0 -220
- package/lib/col/style/index.d.ts +0 -3
- package/lib/col/style/index.d.ts.map +0 -1
- package/lib/col/style/index.js +0 -4
- package/lib/col/style/index.js.map +0 -1
- package/lib/collapse/style/index.d.ts +0 -3
- package/lib/collapse/style/index.d.ts.map +0 -1
- package/lib/collapse/style/index.js +0 -4
- package/lib/collapse/style/index.js.map +0 -1
- package/lib/collapse/style/index.less +0 -134
- package/lib/comment/style/index.d.ts +0 -3
- package/lib/comment/style/index.d.ts.map +0 -1
- package/lib/comment/style/index.js +0 -4
- package/lib/comment/style/index.js.map +0 -1
- package/lib/comment/style/index.less +0 -93
- package/lib/config-provider/style/index.d.ts +0 -2
- package/lib/config-provider/style/index.d.ts.map +0 -1
- package/lib/config-provider/style/index.js +0 -3
- package/lib/config-provider/style/index.js.map +0 -1
- package/lib/config-provider/style/index.less +0 -2
- package/lib/date-picker/style/Calendar.less +0 -402
- package/lib/date-picker/style/DecadePanel.less +0 -81
- package/lib/date-picker/style/MonthPanel.less +0 -86
- package/lib/date-picker/style/MonthPicker.less +0 -11
- package/lib/date-picker/style/Picker.less +0 -113
- package/lib/date-picker/style/RangePicker.less +0 -248
- package/lib/date-picker/style/TimePicker.less +0 -151
- package/lib/date-picker/style/WeekPicker.less +0 -21
- package/lib/date-picker/style/YearPanel.less +0 -85
- package/lib/date-picker/style/index.d.ts +0 -6
- package/lib/date-picker/style/index.d.ts.map +0 -1
- package/lib/date-picker/style/index.js +0 -7
- package/lib/date-picker/style/index.js.map +0 -1
- package/lib/date-picker/style/index.less +0 -17
- package/lib/descriptions/style/index.d.ts +0 -3
- package/lib/descriptions/style/index.d.ts.map +0 -1
- package/lib/descriptions/style/index.js +0 -4
- package/lib/descriptions/style/index.js.map +0 -1
- package/lib/descriptions/style/index.less +0 -144
- package/lib/divider/style/index.d.ts +0 -3
- package/lib/divider/style/index.d.ts.map +0 -1
- package/lib/divider/style/index.js +0 -4
- package/lib/divider/style/index.js.map +0 -1
- package/lib/divider/style/index.less +0 -109
- package/lib/drawer/style/drawer.less +0 -230
- package/lib/drawer/style/index.d.ts +0 -3
- package/lib/drawer/style/index.d.ts.map +0 -1
- package/lib/drawer/style/index.js +0 -4
- package/lib/drawer/style/index.js.map +0 -1
- package/lib/drawer/style/index.less +0 -3
- package/lib/dropdown/style/index.d.ts +0 -4
- package/lib/dropdown/style/index.d.ts.map +0 -1
- package/lib/dropdown/style/index.js +0 -5
- package/lib/dropdown/style/index.js.map +0 -1
- package/lib/dropdown/style/index.less +0 -282
- package/lib/empty/style/index.d.ts +0 -3
- package/lib/empty/style/index.d.ts.map +0 -1
- package/lib/empty/style/index.js +0 -4
- package/lib/empty/style/index.js.map +0 -1
- package/lib/empty/style/index.less +0 -52
- package/lib/form/style/index.d.ts +0 -4
- package/lib/form/style/index.d.ts.map +0 -1
- package/lib/form/style/index.js +0 -5
- package/lib/form/style/index.js.map +0 -1
- package/lib/form/style/index.less +0 -653
- package/lib/form/style/mixin.less +0 -126
- package/lib/grid-v4/RowContext.d.ts.map +0 -1
- package/lib/grid-v4/RowContext.js.map +0 -1
- package/lib/grid-v4/col.d.ts.map +0 -1
- package/lib/grid-v4/col.js.map +0 -1
- package/lib/grid-v4/hooks/useBreakpoint.d.ts.map +0 -1
- package/lib/grid-v4/hooks/useBreakpoint.js.map +0 -1
- package/lib/grid-v4/index.d.ts.map +0 -1
- package/lib/grid-v4/index.js.map +0 -1
- package/lib/grid-v4/row.d.ts.map +0 -1
- package/lib/grid-v4/row.js.map +0 -1
- package/lib/grid-v4/style/index.d.ts +0 -2
- package/lib/grid-v4/style/index.d.ts.map +0 -1
- package/lib/grid-v4/style/index.js +0 -3
- package/lib/grid-v4/style/index.js.map +0 -1
- package/lib/grid-v4/style/index.less +0 -124
- package/lib/grid-v4/style/mixin.less +0 -57
- package/lib/grid-v4/style/rtl.less +0 -69
- package/lib/handle/handle.d.ts +0 -3
- package/lib/handle/handle.d.ts.map +0 -1
- package/lib/handle/handle.js +0 -181
- package/lib/handle/handle.js.map +0 -1
- package/lib/icon/style/index.d.ts +0 -3
- package/lib/icon/style/index.d.ts.map +0 -1
- package/lib/icon/style/index.js +0 -4
- package/lib/icon/style/index.js.map +0 -1
- package/lib/icon/style/index.less +0 -4
- package/lib/input/style/index.d.ts +0 -4
- package/lib/input/style/index.d.ts.map +0 -1
- package/lib/input/style/index.js +0 -5
- package/lib/input/style/index.js.map +0 -1
- package/lib/input/style/index.less +0 -57
- package/lib/input/style/mixin.less +0 -449
- package/lib/input/style/search-input.less +0 -34
- package/lib/input-number/style/index.d.ts +0 -3
- package/lib/input-number/style/index.d.ts.map +0 -1
- package/lib/input-number/style/index.js +0 -4
- package/lib/input-number/style/index.js.map +0 -1
- package/lib/input-number/style/index.less +0 -179
- package/lib/layout/style/index.d.ts +0 -3
- package/lib/layout/style/index.d.ts.map +0 -1
- package/lib/layout/style/index.js +0 -4
- package/lib/layout/style/index.js.map +0 -1
- package/lib/layout/style/index.less +0 -124
- package/lib/layout/style/light.less +0 -15
- package/lib/list/style/bordered.less +0 -41
- package/lib/list/style/index.d.ts +0 -7
- package/lib/list/style/index.d.ts.map +0 -1
- package/lib/list/style/index.js +0 -8
- package/lib/list/style/index.js.map +0 -1
- package/lib/list/style/index.less +0 -234
- package/lib/list/style/responsive.less +0 -40
- package/lib/locale-provider/style/index.d.ts +0 -2
- package/lib/locale-provider/style/index.d.ts.map +0 -1
- package/lib/locale-provider/style/index.js +0 -3
- package/lib/locale-provider/style/index.js.map +0 -1
- package/lib/locale-provider/style/index.less +0 -2
- package/lib/mention/index.js +0 -25
- package/lib/mentions/style/index.d.ts +0 -4
- package/lib/mentions/style/index.d.ts.map +0 -1
- package/lib/mentions/style/index.js +0 -5
- package/lib/mentions/style/index.js.map +0 -1
- package/lib/mentions/style/index.less +0 -164
- package/lib/menu/style/dark.less +0 -139
- package/lib/menu/style/index.d.ts +0 -4
- package/lib/menu/style/index.d.ts.map +0 -1
- package/lib/menu/style/index.js +0 -5
- package/lib/menu/style/index.js.map +0 -1
- package/lib/menu/style/index.less +0 -515
- package/lib/message/style/index.d.ts +0 -3
- package/lib/message/style/index.d.ts.map +0 -1
- package/lib/message/style/index.js +0 -4
- package/lib/message/style/index.js.map +0 -1
- package/lib/message/style/index.less +0 -75
- package/lib/modal/style/confirm.less +0 -78
- package/lib/modal/style/index.d.ts +0 -4
- package/lib/modal/style/index.d.ts.map +0 -1
- package/lib/modal/style/index.js +0 -5
- package/lib/modal/style/index.js.map +0 -1
- package/lib/modal/style/index.less +0 -4
- package/lib/modal/style/modal.less +0 -165
- package/lib/notification/style/index.d.ts +0 -3
- package/lib/notification/style/index.d.ts.map +0 -1
- package/lib/notification/style/index.js +0 -4
- package/lib/notification/style/index.js.map +0 -1
- package/lib/notification/style/index.less +0 -199
- package/lib/page-header/style/index.d.ts +0 -4
- package/lib/page-header/style/index.d.ts.map +0 -1
- package/lib/page-header/style/index.js +0 -5
- package/lib/page-header/style/index.js.map +0 -1
- package/lib/page-header/style/index.less +0 -119
- package/lib/pagination/style/index.d.ts +0 -4
- package/lib/pagination/style/index.d.ts.map +0 -1
- package/lib/pagination/style/index.js +0 -5
- package/lib/pagination/style/index.js.map +0 -1
- package/lib/pagination/style/index.less +0 -400
- package/lib/popconfirm/style/index.d.ts +0 -4
- package/lib/popconfirm/style/index.d.ts.map +0 -1
- package/lib/popconfirm/style/index.js +0 -5
- package/lib/popconfirm/style/index.js.map +0 -1
- package/lib/popover/style/index.d.ts +0 -3
- package/lib/popover/style/index.d.ts.map +0 -1
- package/lib/popover/style/index.js +0 -4
- package/lib/popover/style/index.js.map +0 -1
- package/lib/popover/style/index.less +0 -205
- package/lib/progress/style/index.d.ts +0 -3
- package/lib/progress/style/index.d.ts.map +0 -1
- package/lib/progress/style/index.js +0 -4
- package/lib/progress/style/index.js.map +0 -1
- package/lib/progress/style/index.less +0 -182
- package/lib/radio/style/index.d.ts +0 -3
- package/lib/radio/style/index.d.ts.map +0 -1
- package/lib/radio/style/index.js +0 -4
- package/lib/radio/style/index.js.map +0 -1
- package/lib/radio/style/index.less +0 -327
- package/lib/rate/style/index.d.ts +0 -4
- package/lib/rate/style/index.d.ts.map +0 -1
- package/lib/rate/style/index.js +0 -5
- package/lib/rate/style/index.js.map +0 -1
- package/lib/rate/style/index.less +0 -85
- package/lib/result/style/index.d.ts +0 -3
- package/lib/result/style/index.d.ts.map +0 -1
- package/lib/result/style/index.js +0 -4
- package/lib/result/style/index.js.map +0 -1
- package/lib/result/style/index.less +0 -71
- package/lib/row/style/index.d.ts +0 -3
- package/lib/row/style/index.d.ts.map +0 -1
- package/lib/row/style/index.js +0 -4
- package/lib/row/style/index.js.map +0 -1
- package/lib/select/style/index.d.ts +0 -4
- package/lib/select/style/index.d.ts.map +0 -1
- package/lib/select/style/index.js +0 -5
- package/lib/select/style/index.js.map +0 -1
- package/lib/select/style/index.less +0 -604
- package/lib/skeleton/style/index.d.ts +0 -3
- package/lib/skeleton/style/index.d.ts.map +0 -1
- package/lib/skeleton/style/index.js +0 -4
- package/lib/skeleton/style/index.js.map +0 -1
- package/lib/skeleton/style/index.less +0 -130
- package/lib/slider/style/index.d.ts +0 -4
- package/lib/slider/style/index.d.ts.map +0 -1
- package/lib/slider/style/index.js +0 -5
- package/lib/slider/style/index.js.map +0 -1
- package/lib/slider/style/index.less +0 -197
- package/lib/spin/style/index.d.ts +0 -3
- package/lib/spin/style/index.d.ts.map +0 -1
- package/lib/spin/style/index.js +0 -4
- package/lib/spin/style/index.js.map +0 -1
- package/lib/spin/style/index.less +0 -214
- package/lib/statistic/style/index.d.ts +0 -3
- package/lib/statistic/style/index.d.ts.map +0 -1
- package/lib/statistic/style/index.js +0 -4
- package/lib/statistic/style/index.js.map +0 -1
- package/lib/statistic/style/index.less +0 -40
- package/lib/steps/style/compatibility.less +0 -50
- package/lib/steps/style/custom-icon.less +0 -31
- package/lib/steps/style/index.d.ts +0 -3
- package/lib/steps/style/index.d.ts.map +0 -1
- package/lib/steps/style/index.js +0 -4
- package/lib/steps/style/index.js.map +0 -1
- package/lib/steps/style/label-placement.less +0 -38
- package/lib/steps/style/progress-dot.less +0 -80
- package/lib/steps/style/vertical.less +0 -74
- package/lib/style/color/bezierEasing.less +0 -110
- package/lib/style/color/colorPalette.less +0 -75
- package/lib/style/color/colors.less +0 -149
- package/lib/style/color/tinyColor.less +0 -1184
- package/lib/style/core/base.less +0 -510
- package/lib/style/core/iconfont.less +0 -19
- package/lib/style/core/index.less +0 -4
- package/lib/style/core/motion/fade.less +0 -31
- package/lib/style/core/motion/move.less +0 -120
- package/lib/style/core/motion/other.less +0 -40
- package/lib/style/core/motion/slide.less +0 -120
- package/lib/style/core/motion/swing.less +0 -34
- package/lib/style/core/motion/zoom.less +0 -162
- package/lib/style/core/motion.less +0 -20
- package/lib/style/index.d.ts +0 -2
- package/lib/style/index.d.ts.map +0 -1
- package/lib/style/index.js +0 -3
- package/lib/style/index.js.map +0 -1
- package/lib/style/index.less +0 -2
- package/lib/style/mixins/clearfix.less +0 -13
- package/lib/style/mixins/compatibility.less +0 -22
- package/lib/style/mixins/iconfont.less +0 -43
- package/lib/style/mixins/index.less +0 -10
- package/lib/style/mixins/motion.less +0 -35
- package/lib/style/mixins/operation-unit.less +0 -18
- package/lib/style/mixins/reset.less +0 -13
- package/lib/style/mixins/size.less +0 -10
- package/lib/style/mixins/typography.less +0 -49
- package/lib/style/themes/default.less +0 -699
- package/lib/style/themes/index.less +0 -1
- package/lib/style/v2-compatible-reset.d.ts +0 -2
- package/lib/style/v2-compatible-reset.d.ts.map +0 -1
- package/lib/style/v2-compatible-reset.js +0 -3
- package/lib/style/v2-compatible-reset.js.map +0 -1
- package/lib/style/v2-compatible-reset.less +0 -51
- package/lib/switch/style/index.d.ts +0 -3
- package/lib/switch/style/index.d.ts.map +0 -1
- package/lib/switch/style/index.js +0 -4
- package/lib/switch/style/index.js.map +0 -1
- package/lib/switch/style/index.less +0 -178
- package/lib/table/style/index.d.ts +0 -9
- package/lib/table/style/index.d.ts.map +0 -1
- package/lib/table/style/index.js +0 -10
- package/lib/table/style/index.js.map +0 -1
- package/lib/table/style/index.less +0 -800
- package/lib/table/style/size.less +0 -179
- package/lib/tabs/style/card-style.less +0 -186
- package/lib/tabs/style/index.d.ts +0 -3
- package/lib/tabs/style/index.d.ts.map +0 -1
- package/lib/tabs/style/index.js +0 -4
- package/lib/tabs/style/index.js.map +0 -1
- package/lib/tabs/style/index.less +0 -436
- package/lib/tag/style/index.d.ts +0 -3
- package/lib/tag/style/index.d.ts.map +0 -1
- package/lib/tag/style/index.js +0 -4
- package/lib/tag/style/index.js.map +0 -1
- package/lib/tag/style/index.less +0 -106
- package/lib/time-picker/style/index.d.ts +0 -3
- package/lib/time-picker/style/index.d.ts.map +0 -1
- package/lib/time-picker/style/index.js +0 -4
- package/lib/time-picker/style/index.js.map +0 -1
- package/lib/time-picker/style/index.less +0 -246
- package/lib/timeline/style/index.d.ts +0 -3
- package/lib/timeline/style/index.d.ts.map +0 -1
- package/lib/timeline/style/index.js +0 -4
- package/lib/timeline/style/index.js.map +0 -1
- package/lib/timeline/style/index.less +0 -167
- package/lib/tntd-form/TntdForm/components/Item.js +0 -65
- package/lib/tntd-form/TntdForm/components/ItemComp.js +0 -215
- package/lib/tntd-form/TntdForm/components/List.js +0 -123
- package/lib/tntd-form/TntdForm/index.js +0 -72
- package/lib/tntd-form/TntdForm/interface.js +0 -5
- package/lib/tntd-form/TntdForm/store.js +0 -10
- package/lib/tntd-form/TntdForm/utils.js +0 -239
- package/lib/tntd-select/_util/DisabledContext.d.ts +0 -10
- package/lib/tntd-select/_util/DisabledContext.d.ts.map +0 -1
- package/lib/tntd-select/_util/DisabledContext.js +0 -22
- package/lib/tntd-select/_util/DisabledContext.js.map +0 -1
- package/lib/tntd-select/_util/FormItemInputContext.d.ts +0 -4
- package/lib/tntd-select/_util/FormItemInputContext.d.ts.map +0 -1
- package/lib/tntd-select/_util/FormItemInputContext.js +0 -12
- package/lib/tntd-select/_util/FormItemInputContext.js.map +0 -1
- package/lib/tntd-select/_util/PurePanel.d.ts +0 -9
- package/lib/tntd-select/_util/PurePanel.d.ts.map +0 -1
- package/lib/tntd-select/_util/PurePanel.js +0 -90
- package/lib/tntd-select/_util/PurePanel.js.map +0 -1
- package/lib/tntd-select/_util/SizeContext.d.ts +0 -4
- package/lib/tntd-select/_util/SizeContext.d.ts.map +0 -1
- package/lib/tntd-select/_util/SizeContext.js +0 -12
- package/lib/tntd-select/_util/SizeContext.js.map +0 -1
- package/lib/tntd-select/_util/context.d.ts.map +0 -1
- package/lib/tntd-select/_util/context.js.map +0 -1
- package/lib/tntd-select/_util/defaultRenderEmpty.d.ts.map +0 -1
- package/lib/tntd-select/_util/defaultRenderEmpty.js.map +0 -1
- package/lib/tntd-select/_util/getIcons.d.ts +0 -25
- package/lib/tntd-select/_util/getIcons.d.ts.map +0 -1
- package/lib/tntd-select/_util/getIcons.js +0 -84
- package/lib/tntd-select/_util/getIcons.js.map +0 -1
- package/lib/tntd-select/_util/interface.d.ts +0 -25
- package/lib/tntd-select/_util/interface.d.ts.map +0 -1
- package/lib/tntd-select/_util/interface.js +0 -16
- package/lib/tntd-select/_util/interface.js.map +0 -1
- package/lib/tntd-select/_util/motion.d.ts +0 -9
- package/lib/tntd-select/_util/motion.d.ts.map +0 -1
- package/lib/tntd-select/_util/motion.js +0 -59
- package/lib/tntd-select/_util/motion.js.map +0 -1
- package/lib/tntd-select/_util/type.d.ts +0 -10
- package/lib/tntd-select/_util/type.d.ts.map +0 -1
- package/lib/tntd-select/_util/type.js +0 -21
- package/lib/tntd-select/_util/type.js.map +0 -1
- package/lib/tntd-select/_util/useCompactItemContext.d.ts +0 -9
- package/lib/tntd-select/_util/useCompactItemContext.d.ts.map +0 -1
- package/lib/tntd-select/_util/useCompactItemContext.js +0 -35
- package/lib/tntd-select/_util/useCompactItemContext.js.map +0 -1
- package/lib/tntd-select/_util/warning.d.ts +0 -4
- package/lib/tntd-select/_util/warning.d.ts.map +0 -1
- package/lib/tntd-select/_util/warning.js +0 -24
- package/lib/tntd-select/_util/warning.js.map +0 -1
- package/lib/tntd-select/rc-select/BaseSelect.d.ts +0 -114
- package/lib/tntd-select/rc-select/BaseSelect.d.ts.map +0 -1
- package/lib/tntd-select/rc-select/BaseSelect.js +0 -566
- package/lib/tntd-select/rc-select/BaseSelect.js.map +0 -1
- package/lib/tntd-select/rc-select/OptGroup.d.ts +0 -13
- package/lib/tntd-select/rc-select/OptGroup.d.ts.map +0 -1
- package/lib/tntd-select/rc-select/OptGroup.js +0 -13
- package/lib/tntd-select/rc-select/OptGroup.js.map +0 -1
- package/lib/tntd-select/rc-select/Option.d.ts +0 -15
- package/lib/tntd-select/rc-select/Option.d.ts.map +0 -1
- package/lib/tntd-select/rc-select/Option.js +0 -13
- package/lib/tntd-select/rc-select/Option.js.map +0 -1
- package/lib/tntd-select/rc-select/OptionList.d.ts +0 -11
- package/lib/tntd-select/rc-select/OptionList.d.ts.map +0 -1
- package/lib/tntd-select/rc-select/OptionList.js +0 -372
- package/lib/tntd-select/rc-select/OptionList.js.map +0 -1
- package/lib/tntd-select/rc-select/Select.d.ts +0 -115
- package/lib/tntd-select/rc-select/Select.d.ts.map +0 -1
- package/lib/tntd-select/rc-select/Select.js +0 -509
- package/lib/tntd-select/rc-select/Select.js.map +0 -1
- package/lib/tntd-select/rc-select/SelectContext.d.ts +0 -23
- package/lib/tntd-select/rc-select/SelectContext.d.ts.map +0 -1
- package/lib/tntd-select/rc-select/SelectContext.js +0 -13
- package/lib/tntd-select/rc-select/SelectContext.js.map +0 -1
- package/lib/tntd-select/rc-select/SelectTrigger.d.ts +0 -31
- package/lib/tntd-select/rc-select/SelectTrigger.d.ts.map +0 -1
- package/lib/tntd-select/rc-select/SelectTrigger.js +0 -149
- package/lib/tntd-select/rc-select/SelectTrigger.js.map +0 -1
- package/lib/tntd-select/rc-select/Selector/Input.d.ts +0 -27
- package/lib/tntd-select/rc-select/Selector/Input.d.ts.map +0 -1
- package/lib/tntd-select/rc-select/Selector/Input.js +0 -110
- package/lib/tntd-select/rc-select/Selector/Input.js.map +0 -1
- package/lib/tntd-select/rc-select/Selector/MultipleSelector.d.ts +0 -17
- package/lib/tntd-select/rc-select/Selector/MultipleSelector.d.ts.map +0 -1
- package/lib/tntd-select/rc-select/Selector/MultipleSelector.js +0 -193
- package/lib/tntd-select/rc-select/Selector/MultipleSelector.js.map +0 -1
- package/lib/tntd-select/rc-select/Selector/SingleSelector.d.ts +0 -9
- package/lib/tntd-select/rc-select/Selector/SingleSelector.d.ts.map +0 -1
- package/lib/tntd-select/rc-select/Selector/SingleSelector.js +0 -116
- package/lib/tntd-select/rc-select/Selector/SingleSelector.js.map +0 -1
- package/lib/tntd-select/rc-select/Selector/index.d.ts +0 -83
- package/lib/tntd-select/rc-select/Selector/index.d.ts.map +0 -1
- package/lib/tntd-select/rc-select/Selector/index.js +0 -159
- package/lib/tntd-select/rc-select/Selector/index.js.map +0 -1
- package/lib/tntd-select/rc-select/TransBtn.d.ts +0 -13
- package/lib/tntd-select/rc-select/TransBtn.d.ts.map +0 -1
- package/lib/tntd-select/rc-select/TransBtn.js +0 -48
- package/lib/tntd-select/rc-select/TransBtn.js.map +0 -1
- package/lib/tntd-select/rc-select/hooks/useAllowClear.d.ts +0 -9
- package/lib/tntd-select/rc-select/hooks/useAllowClear.d.ts.map +0 -1
- package/lib/tntd-select/rc-select/hooks/useAllowClear.js +0 -35
- package/lib/tntd-select/rc-select/hooks/useAllowClear.js.map +0 -1
- package/lib/tntd-select/rc-select/hooks/useBaseProps.d.ts +0 -14
- package/lib/tntd-select/rc-select/hooks/useBaseProps.d.ts.map +0 -1
- package/lib/tntd-select/rc-select/hooks/useBaseProps.js +0 -21
- package/lib/tntd-select/rc-select/hooks/useBaseProps.js.map +0 -1
- package/lib/tntd-select/rc-select/hooks/useCache.d.ts +0 -8
- package/lib/tntd-select/rc-select/hooks/useCache.d.ts.map +0 -1
- package/lib/tntd-select/rc-select/hooks/useCache.js +0 -49
- package/lib/tntd-select/rc-select/hooks/useCache.js.map +0 -1
- package/lib/tntd-select/rc-select/hooks/useDelayReset.d.ts +0 -6
- package/lib/tntd-select/rc-select/hooks/useDelayReset.d.ts.map +0 -1
- package/lib/tntd-select/rc-select/hooks/useDelayReset.js.map +0 -1
- package/lib/tntd-select/rc-select/hooks/useFilterOptions.d.ts +0 -4
- package/lib/tntd-select/rc-select/hooks/useFilterOptions.d.ts.map +0 -1
- package/lib/tntd-select/rc-select/hooks/useFilterOptions.js +0 -72
- package/lib/tntd-select/rc-select/hooks/useFilterOptions.js.map +0 -1
- package/lib/tntd-select/rc-select/hooks/useId.d.ts +0 -6
- package/lib/tntd-select/rc-select/hooks/useId.d.ts.map +0 -1
- package/lib/tntd-select/rc-select/hooks/useId.js.map +0 -1
- package/lib/tntd-select/rc-select/hooks/useLayoutEffect.d.ts +0 -6
- package/lib/tntd-select/rc-select/hooks/useLayoutEffect.d.ts.map +0 -1
- package/lib/tntd-select/rc-select/hooks/useLayoutEffect.js +0 -26
- package/lib/tntd-select/rc-select/hooks/useLayoutEffect.js.map +0 -1
- package/lib/tntd-select/rc-select/hooks/useLock.d.ts +0 -8
- package/lib/tntd-select/rc-select/hooks/useLock.d.ts.map +0 -1
- package/lib/tntd-select/rc-select/hooks/useLock.js +0 -39
- package/lib/tntd-select/rc-select/hooks/useLock.js.map +0 -1
- package/lib/tntd-select/rc-select/hooks/useOptions.d.ts +0 -12
- package/lib/tntd-select/rc-select/hooks/useOptions.d.ts.map +0 -1
- package/lib/tntd-select/rc-select/hooks/useOptions.js +0 -53
- package/lib/tntd-select/rc-select/hooks/useOptions.js.map +0 -1
- package/lib/tntd-select/rc-select/hooks/useRefFunc.d.ts +0 -6
- package/lib/tntd-select/rc-select/hooks/useRefFunc.d.ts.map +0 -1
- package/lib/tntd-select/rc-select/hooks/useRefFunc.js +0 -22
- package/lib/tntd-select/rc-select/hooks/useRefFunc.js.map +0 -1
- package/lib/tntd-select/rc-select/hooks/useSelectTriggerControl.d.ts +0 -2
- package/lib/tntd-select/rc-select/hooks/useSelectTriggerControl.d.ts.map +0 -1
- package/lib/tntd-select/rc-select/hooks/useSelectTriggerControl.js +0 -43
- package/lib/tntd-select/rc-select/hooks/useSelectTriggerControl.js.map +0 -1
- package/lib/tntd-select/rc-select/index.d.ts +0 -11
- package/lib/tntd-select/rc-select/index.d.ts.map +0 -1
- package/lib/tntd-select/rc-select/index.js +0 -38
- package/lib/tntd-select/rc-select/index.js.map +0 -1
- package/lib/tntd-select/rc-select/interface.d.ts +0 -23
- package/lib/tntd-select/rc-select/interface.d.ts.map +0 -1
- package/lib/tntd-select/rc-select/interface.js +0 -5
- package/lib/tntd-select/rc-select/interface.js.map +0 -1
- package/lib/tntd-select/rc-select/utils/commonUtil.d.ts +0 -10
- package/lib/tntd-select/rc-select/utils/commonUtil.d.ts.map +0 -1
- package/lib/tntd-select/rc-select/utils/commonUtil.js +0 -43
- package/lib/tntd-select/rc-select/utils/commonUtil.js.map +0 -1
- package/lib/tntd-select/rc-select/utils/keyUtil.d.ts +0 -3
- package/lib/tntd-select/rc-select/utils/keyUtil.d.ts.map +0 -1
- package/lib/tntd-select/rc-select/utils/keyUtil.js +0 -16
- package/lib/tntd-select/rc-select/utils/keyUtil.js.map +0 -1
- package/lib/tntd-select/rc-select/utils/legacyUtil.d.ts +0 -4
- package/lib/tntd-select/rc-select/utils/legacyUtil.d.ts.map +0 -1
- package/lib/tntd-select/rc-select/utils/legacyUtil.js +0 -60
- package/lib/tntd-select/rc-select/utils/legacyUtil.js.map +0 -1
- package/lib/tntd-select/rc-select/utils/platformUtil.d.ts +0 -2
- package/lib/tntd-select/rc-select/utils/platformUtil.d.ts.map +0 -1
- package/lib/tntd-select/rc-select/utils/platformUtil.js +0 -10
- package/lib/tntd-select/rc-select/utils/platformUtil.js.map +0 -1
- package/lib/tntd-select/rc-select/utils/valueUtil.d.ts +0 -24
- package/lib/tntd-select/rc-select/utils/valueUtil.d.ts.map +0 -1
- package/lib/tntd-select/rc-select/utils/valueUtil.js +0 -132
- package/lib/tntd-select/rc-select/utils/valueUtil.js.map +0 -1
- package/lib/tntd-select/rc-select/utils/warningPropsUtil.d.ts +0 -5
- package/lib/tntd-select/rc-select/utils/warningPropsUtil.d.ts.map +0 -1
- package/lib/tntd-select/rc-select/utils/warningPropsUtil.js +0 -127
- package/lib/tntd-select/rc-select/utils/warningPropsUtil.js.map +0 -1
- package/lib/tooltip/style/index.d.ts +0 -3
- package/lib/tooltip/style/index.d.ts.map +0 -1
- package/lib/tooltip/style/index.js +0 -4
- package/lib/tooltip/style/index.js.map +0 -1
- package/lib/tooltip/style/index.less +0 -187
- package/lib/transfer/style/customize.less +0 -62
- package/lib/transfer/style/index.d.ts +0 -7
- package/lib/transfer/style/index.d.ts.map +0 -1
- package/lib/transfer/style/index.js +0 -8
- package/lib/transfer/style/index.js.map +0 -1
- package/lib/transfer/style/index.less +0 -191
- package/lib/tree/style/directory.less +0 -95
- package/lib/tree/style/index.d.ts +0 -3
- package/lib/tree/style/index.d.ts.map +0 -1
- package/lib/tree/style/index.js +0 -4
- package/lib/tree/style/index.js.map +0 -1
- package/lib/tree/style/index.less +0 -280
- package/lib/tree/style/mixin.less +0 -29
- package/lib/tree-select/style/index.d.ts +0 -5
- package/lib/tree-select/style/index.d.ts.map +0 -1
- package/lib/tree-select/style/index.js +0 -6
- package/lib/tree-select/style/index.js.map +0 -1
- package/lib/tree-select/style/index.less +0 -191
- package/lib/typography/style/index.d.ts +0 -5
- package/lib/typography/style/index.d.ts.map +0 -1
- package/lib/typography/style/index.js +0 -6
- package/lib/typography/style/index.js.map +0 -1
- package/lib/typography/style/index.less +0 -204
- package/lib/upload/style/index.d.ts +0 -5
- package/lib/upload/style/index.d.ts.map +0 -1
- package/lib/upload/style/index.js +0 -6
- package/lib/upload/style/index.js.map +0 -1
- package/lib/upload/style/index.less +0 -542
- package/lib/version/style/index.d.ts +0 -2
- package/lib/version/style/index.d.ts.map +0 -1
- package/lib/version/style/index.js +0 -3
- package/lib/version/style/index.js.map +0 -1
- /package/es/{tntd-select → tntd-form}/_util/context.js +0 -0
- /package/es/{tntd-select → tntd-form}/_util/defaultRenderEmpty.js +0 -0
- /package/es/{grid-v4 → tntd-form/grid}/RowContext.js +0 -0
- /package/es/{grid-v4 → tntd-form/grid}/hooks/useBreakpoint.js +0 -0
- /package/es/{grid-v4 → tntd-form/grid}/index.js +0 -0
- /package/es/{affix → tntd-form/grid}/style/index.js +0 -0
- /package/lib/{tntd-select → tntd-form}/_util/context.d.ts +0 -0
- /package/lib/{tntd-select → tntd-form}/_util/context.js +0 -0
- /package/lib/{tntd-select → tntd-form}/_util/defaultRenderEmpty.d.ts +0 -0
- /package/lib/{tntd-select → tntd-form}/_util/defaultRenderEmpty.js +0 -0
- /package/lib/{grid-v4 → tntd-form/grid}/RowContext.d.ts +0 -0
- /package/lib/{grid-v4 → tntd-form/grid}/RowContext.js +0 -0
- /package/lib/{grid-v4 → tntd-form/grid}/col.d.ts +0 -0
- /package/lib/{grid-v4 → tntd-form/grid}/col.js +0 -0
- /package/lib/{grid-v4 → tntd-form/grid}/hooks/useBreakpoint.d.ts +0 -0
- /package/lib/{grid-v4 → tntd-form/grid}/hooks/useBreakpoint.js +0 -0
- /package/lib/{grid-v4 → tntd-form/grid}/index.d.ts +0 -0
- /package/lib/{grid-v4 → tntd-form/grid}/index.js +0 -0
- /package/lib/{grid-v4 → tntd-form/grid}/row.d.ts +0 -0
- /package/lib/{affix → tntd-form/grid}/style/index.d.ts +0 -0
- /package/lib/{affix → tntd-form/grid}/style/index.js +0 -0
|
@@ -1 +0,0 @@
|
|
|
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"]}
|
|
@@ -1 +0,0 @@
|
|
|
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"]}
|
|
@@ -1,47 +0,0 @@
|
|
|
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;
|
|
@@ -1 +0,0 @@
|
|
|
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;"]}
|
|
@@ -1 +0,0 @@
|
|
|
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"]}
|
|
@@ -1,26 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
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"]}
|
|
@@ -1,14 +0,0 @@
|
|
|
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;
|
|
@@ -1 +0,0 @@
|
|
|
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"]}
|
|
@@ -1,524 +0,0 @@
|
|
|
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;
|