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,116 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports["default"] = void 0;
|
|
8
|
-
var React = _interopRequireWildcard(require("react"));
|
|
9
|
-
var _pickAttrs = _interopRequireDefault(require("rc-util/lib/pickAttrs"));
|
|
10
|
-
var _Input = _interopRequireDefault(require("./Input"));
|
|
11
|
-
var _commonUtil = require("../utils/commonUtil");
|
|
12
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
13
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
14
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
15
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
16
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
17
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
18
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
19
|
-
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0) { ; } } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
20
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
21
|
-
var SingleSelector = function SingleSelector(props) {
|
|
22
|
-
var inputElement = props.inputElement,
|
|
23
|
-
prefixCls = props.prefixCls,
|
|
24
|
-
id = props.id,
|
|
25
|
-
inputRef = props.inputRef,
|
|
26
|
-
disabled = props.disabled,
|
|
27
|
-
autoFocus = props.autoFocus,
|
|
28
|
-
autoComplete = props.autoComplete,
|
|
29
|
-
activeDescendantId = props.activeDescendantId,
|
|
30
|
-
mode = props.mode,
|
|
31
|
-
open = props.open,
|
|
32
|
-
values = props.values,
|
|
33
|
-
placeholder = props.placeholder,
|
|
34
|
-
tabIndex = props.tabIndex,
|
|
35
|
-
showSearch = props.showSearch,
|
|
36
|
-
searchValue = props.searchValue,
|
|
37
|
-
activeValue = props.activeValue,
|
|
38
|
-
maxLength = props.maxLength,
|
|
39
|
-
onInputKeyDown = props.onInputKeyDown,
|
|
40
|
-
onInputMouseDown = props.onInputMouseDown,
|
|
41
|
-
onInputChange = props.onInputChange,
|
|
42
|
-
onInputPaste = props.onInputPaste,
|
|
43
|
-
onInputCompositionStart = props.onInputCompositionStart,
|
|
44
|
-
onInputCompositionEnd = props.onInputCompositionEnd,
|
|
45
|
-
title = props.title;
|
|
46
|
-
var _React$useState = React.useState(false),
|
|
47
|
-
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
48
|
-
inputChanged = _React$useState2[0],
|
|
49
|
-
setInputChanged = _React$useState2[1];
|
|
50
|
-
var combobox = mode === 'combobox';
|
|
51
|
-
var inputEditable = combobox || showSearch;
|
|
52
|
-
var item = values[0];
|
|
53
|
-
var inputValue = searchValue || '';
|
|
54
|
-
if (combobox && activeValue && !inputChanged) {
|
|
55
|
-
inputValue = activeValue;
|
|
56
|
-
}
|
|
57
|
-
React.useEffect(function () {
|
|
58
|
-
if (combobox) {
|
|
59
|
-
setInputChanged(false);
|
|
60
|
-
}
|
|
61
|
-
}, [combobox, activeValue]);
|
|
62
|
-
// Not show text when closed expect combobox mode
|
|
63
|
-
var hasTextInput = mode !== 'combobox' && !open && !showSearch ? false : !!inputValue;
|
|
64
|
-
// Get title of selection item
|
|
65
|
-
var selectionTitle = title === undefined ? (0, _commonUtil.getTitle)(item) : title;
|
|
66
|
-
var renderPlaceholder = function renderPlaceholder() {
|
|
67
|
-
if (item) {
|
|
68
|
-
return null;
|
|
69
|
-
}
|
|
70
|
-
var hiddenStyle = hasTextInput ? {
|
|
71
|
-
visibility: 'hidden'
|
|
72
|
-
} : undefined;
|
|
73
|
-
return React.createElement("span", {
|
|
74
|
-
className: "".concat(prefixCls, "-selection-placeholder"),
|
|
75
|
-
style: hiddenStyle
|
|
76
|
-
}, placeholder);
|
|
77
|
-
};
|
|
78
|
-
return React.createElement(React.Fragment, null, React.createElement("span", {
|
|
79
|
-
className: "".concat(prefixCls, "-selection-search")
|
|
80
|
-
}, React.createElement(_Input["default"], {
|
|
81
|
-
ref: inputRef,
|
|
82
|
-
prefixCls: prefixCls,
|
|
83
|
-
id: id,
|
|
84
|
-
open: open,
|
|
85
|
-
inputElement: inputElement,
|
|
86
|
-
disabled: disabled,
|
|
87
|
-
autoFocus: autoFocus,
|
|
88
|
-
autoComplete: autoComplete,
|
|
89
|
-
editable: inputEditable,
|
|
90
|
-
activeDescendantId: activeDescendantId,
|
|
91
|
-
value: inputValue,
|
|
92
|
-
onKeyDown: onInputKeyDown,
|
|
93
|
-
onMouseDown: onInputMouseDown,
|
|
94
|
-
onChange: function onChange(e) {
|
|
95
|
-
setInputChanged(true);
|
|
96
|
-
onInputChange(e);
|
|
97
|
-
},
|
|
98
|
-
onPaste: onInputPaste,
|
|
99
|
-
onCompositionStart: onInputCompositionStart,
|
|
100
|
-
onCompositionEnd: onInputCompositionEnd,
|
|
101
|
-
tabIndex: tabIndex,
|
|
102
|
-
attrs: (0, _pickAttrs["default"])(props, true),
|
|
103
|
-
maxLength: combobox ? maxLength : undefined
|
|
104
|
-
})), !combobox && item ? React.createElement("span", {
|
|
105
|
-
className: "".concat(prefixCls, "-selection-item"),
|
|
106
|
-
title: selectionTitle,
|
|
107
|
-
// 当 Select 已经选中选项时,还需 selection 隐藏但留在原地占位
|
|
108
|
-
// https://github.com/ant-design/ant-design/issues/27688
|
|
109
|
-
// https://github.com/ant-design/ant-design/issues/41530
|
|
110
|
-
style: hasTextInput ? {
|
|
111
|
-
visibility: 'hidden'
|
|
112
|
-
} : undefined
|
|
113
|
-
}, item.label) : null, renderPlaceholder());
|
|
114
|
-
};
|
|
115
|
-
var _default = SingleSelector;
|
|
116
|
-
exports["default"] = _default;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SingleSelector.js","sourceRoot":"","sources":["../../../../src/tntd-select/rc-select/Selector/SingleSelector.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAA+B;AAC/B,sEAA8C;AAC9C,oDAA4B;AAE5B,oDAA+C;AAO/C,MAAM,cAAc,GAA4B,CAAC,KAAK,EAAE,EAAE;IACxD,MAAM,EACJ,YAAY,EACZ,SAAS,EACT,EAAE,EACF,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,YAAY,EACZ,kBAAkB,EAClB,IAAI,EAC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AAI,CAAC,KAAK,CACN,CACR,CAAC,CAAC,CAAC,IAAI;QAGP,iBAAiB,EAAE,CACnB,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,cAAc,CAAC","sourcesContent":["import * as React from 'react';\nimport pickAttrs from 'rc-util/lib/pickAttrs';\nimport Input from './Input';\nimport type { InnerSelectorProps } from '.';\nimport { getTitle } from '../utils/commonUtil';\n\ninterface SelectorProps extends InnerSelectorProps {\n inputElement: React.ReactElement;\n activeValue: string;\n}\n\nconst SingleSelector: React.FC<SelectorProps> = (props) => {\n const {\n inputElement,\n prefixCls,\n id,\n inputRef,\n disabled,\n autoFocus,\n autoComplete,\n activeDescendantId,\n mode,\n open,\n values,\n placeholder,\n tabIndex,\n\n showSearch,\n searchValue,\n activeValue,\n maxLength,\n\n onInputKeyDown,\n onInputMouseDown,\n onInputChange,\n onInputPaste,\n onInputCompositionStart,\n onInputCompositionEnd,\n title,\n } = props;\n\n const [inputChanged, setInputChanged] = React.useState(false);\n\n const combobox = mode === 'combobox';\n const inputEditable = combobox || showSearch;\n const item = values[0];\n\n let inputValue: string = searchValue || '';\n if (combobox && activeValue && !inputChanged) {\n inputValue = activeValue;\n }\n\n React.useEffect(() => {\n if (combobox) {\n setInputChanged(false);\n }\n }, [combobox, activeValue]);\n\n // Not show text when closed expect combobox mode\n const hasTextInput = mode !== 'combobox' && !open && !showSearch ? false : !!inputValue;\n\n // Get title of selection item\n const selectionTitle = title === undefined ? getTitle(item) : title;\n\n const renderPlaceholder = () => {\n if (item) {\n return null;\n }\n const hiddenStyle = hasTextInput ? { visibility: 'hidden' } as React.CSSProperties : undefined;\n return (\n <span\n className={`${prefixCls}-selection-placeholder`}\n style={hiddenStyle}\n >\n {placeholder}\n </span>\n );\n };\n\n return (\n <>\n <span className={`${prefixCls}-selection-search`}>\n <Input\n ref={inputRef}\n prefixCls={prefixCls}\n id={id}\n open={open}\n inputElement={inputElement}\n disabled={disabled}\n autoFocus={autoFocus}\n autoComplete={autoComplete}\n editable={inputEditable}\n activeDescendantId={activeDescendantId}\n value={inputValue}\n onKeyDown={onInputKeyDown}\n onMouseDown={onInputMouseDown}\n onChange={(e) => {\n setInputChanged(true);\n onInputChange(e as any);\n }}\n onPaste={onInputPaste}\n onCompositionStart={onInputCompositionStart}\n onCompositionEnd={onInputCompositionEnd}\n tabIndex={tabIndex}\n attrs={pickAttrs(props, true)}\n maxLength={combobox ? maxLength : undefined}\n />\n </span>\n\n {/* Display value */}\n {(!combobox && item) ? (\n <span\n className={`${prefixCls}-selection-item`}\n title={selectionTitle}\n // 当 Select 已经选中选项时,还需 selection 隐藏但留在原地占位\n // https://github.com/ant-design/ant-design/issues/27688\n // https://github.com/ant-design/ant-design/issues/41530\n style={hasTextInput ? { visibility: 'hidden' } as React.CSSProperties : undefined}\n >\n {item.label}\n </span>\n ) : null}\n\n {/* Display placeholder */}\n {renderPlaceholder()}\n </>\n );\n};\n\nexport default SingleSelector;\n"]}
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Cursor rule:
|
|
3
|
-
* 1. Only `showSearch` enabled
|
|
4
|
-
* 2. Only `open` is `true`
|
|
5
|
-
* 3. When typing, set `open` to `true` which hit rule of 2
|
|
6
|
-
*
|
|
7
|
-
* Accessibility:
|
|
8
|
-
* - https://www.w3.org/TR/wai-aria-practices/examples/combobox/aria1.1pattern/listbox-combo.html
|
|
9
|
-
*/
|
|
10
|
-
import * as React from 'react';
|
|
11
|
-
import type { ScrollTo } from 'rc-virtual-list/lib/List';
|
|
12
|
-
import type { CustomTagProps, DisplayValueType, Mode, RenderNode } from '../BaseSelect';
|
|
13
|
-
export interface InnerSelectorProps {
|
|
14
|
-
prefixCls: string;
|
|
15
|
-
id: string;
|
|
16
|
-
mode: Mode;
|
|
17
|
-
title?: string;
|
|
18
|
-
inputRef: React.Ref<HTMLInputElement | HTMLTextAreaElement>;
|
|
19
|
-
placeholder?: React.ReactNode;
|
|
20
|
-
disabled?: boolean;
|
|
21
|
-
autoFocus?: boolean;
|
|
22
|
-
autoComplete?: string;
|
|
23
|
-
values: DisplayValueType[];
|
|
24
|
-
showSearch?: boolean;
|
|
25
|
-
searchValue: string;
|
|
26
|
-
autoClearSearchValue?: boolean;
|
|
27
|
-
activeDescendantId?: string;
|
|
28
|
-
open: boolean;
|
|
29
|
-
tabIndex?: number;
|
|
30
|
-
maxLength?: number;
|
|
31
|
-
onInputKeyDown: React.KeyboardEventHandler<HTMLInputElement | HTMLTextAreaElement>;
|
|
32
|
-
onInputMouseDown: React.MouseEventHandler<HTMLInputElement | HTMLTextAreaElement>;
|
|
33
|
-
onInputChange: React.ChangeEventHandler<HTMLInputElement | HTMLTextAreaElement>;
|
|
34
|
-
onInputPaste: React.ClipboardEventHandler<HTMLInputElement | HTMLTextAreaElement>;
|
|
35
|
-
onInputCompositionStart: React.CompositionEventHandler<HTMLInputElement | HTMLTextAreaElement>;
|
|
36
|
-
onInputCompositionEnd: React.CompositionEventHandler<HTMLInputElement | HTMLTextAreaElement>;
|
|
37
|
-
}
|
|
38
|
-
export interface RefSelectorProps {
|
|
39
|
-
focus: () => void;
|
|
40
|
-
blur: () => void;
|
|
41
|
-
scrollTo?: ScrollTo;
|
|
42
|
-
}
|
|
43
|
-
export interface SelectorProps {
|
|
44
|
-
id: string;
|
|
45
|
-
prefixCls: string;
|
|
46
|
-
showSearch?: boolean;
|
|
47
|
-
open: boolean;
|
|
48
|
-
/** Display in the Selector value, it's not same as `value` prop */
|
|
49
|
-
values: DisplayValueType[];
|
|
50
|
-
mode: Mode;
|
|
51
|
-
searchValue: string;
|
|
52
|
-
activeValue: string;
|
|
53
|
-
autoClearSearchValue: boolean;
|
|
54
|
-
inputElement: JSX.Element;
|
|
55
|
-
maxLength?: number;
|
|
56
|
-
autoFocus?: boolean;
|
|
57
|
-
activeDescendantId?: string;
|
|
58
|
-
tabIndex?: number;
|
|
59
|
-
disabled?: boolean;
|
|
60
|
-
placeholder?: React.ReactNode;
|
|
61
|
-
removeIcon?: RenderNode;
|
|
62
|
-
maxTagCount?: number | 'responsive';
|
|
63
|
-
maxTagTextLength?: number;
|
|
64
|
-
maxTagPlaceholder?: React.ReactNode | ((omittedValues: DisplayValueType[]) => React.ReactNode);
|
|
65
|
-
tagRender?: (props: CustomTagProps) => React.ReactElement;
|
|
66
|
-
/** Check if `tokenSeparators` contains `\n` or `\r\n` */
|
|
67
|
-
tokenWithEnter?: boolean;
|
|
68
|
-
choiceTransitionName?: string;
|
|
69
|
-
onToggleOpen: (open?: boolean) => void;
|
|
70
|
-
/** `onSearch` returns go next step boolean to check if need do toggle open */
|
|
71
|
-
onSearch: (searchText: string, fromTyping: boolean, isCompositing: boolean) => boolean;
|
|
72
|
-
onSearchSubmit?: (searchText: string) => void;
|
|
73
|
-
onRemove: (value: DisplayValueType) => void;
|
|
74
|
-
onInputKeyDown?: React.KeyboardEventHandler<HTMLInputElement | HTMLTextAreaElement>;
|
|
75
|
-
/**
|
|
76
|
-
* @private get real dom for trigger align.
|
|
77
|
-
* This may be removed after React provides replacement of `findDOMNode`
|
|
78
|
-
*/
|
|
79
|
-
domRef: React.Ref<HTMLDivElement>;
|
|
80
|
-
}
|
|
81
|
-
declare const ForwardSelector: React.ForwardRefExoticComponent<SelectorProps & React.RefAttributes<RefSelectorProps>>;
|
|
82
|
-
export default ForwardSelector;
|
|
83
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/tntd-select/rc-select/Selector/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAIzD,OAAO,KAAK,EAAE,cAAc,EAAE,gBAAgB,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAGxF,MAAM,WAAW,kBAAkB;IACjC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aAAa,EAAE,OAAO,KAAK,OAAO,CAAC;IACvF,cAAc,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9C,QAAQ,EAAE,CAAC,KAAK,EAAE,gBAAgB,KAAK,IAAI,CAAC;IAC5C,cAAc,CAAC,EAAE,KAAK,CAAC,oBAAoB,CAAC,gBAAgB,GAAG,mBAAmB,CAAC,CAAC;IAEpF;;;OAGG;IACH,MAAM,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;CACnC;AAgLD,QAAA,MAAM,eAAe,wFAA8D,CAAC;AAGpF,eAAe,eAAe,CAAC"}
|
|
@@ -1,159 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports["default"] = void 0;
|
|
8
|
-
var React = _interopRequireWildcard(require("react"));
|
|
9
|
-
var _KeyCode = _interopRequireDefault(require("rc-util/lib/KeyCode"));
|
|
10
|
-
var _MultipleSelector = _interopRequireDefault(require("./MultipleSelector"));
|
|
11
|
-
var _SingleSelector = _interopRequireDefault(require("./SingleSelector"));
|
|
12
|
-
var _useLock3 = _interopRequireDefault(require("../hooks/useLock"));
|
|
13
|
-
var _keyUtil = require("../utils/keyUtil");
|
|
14
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
15
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
16
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
17
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
18
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
19
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
20
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
21
|
-
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0) { ; } } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
22
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
23
|
-
var Selector = function Selector(props, ref) {
|
|
24
|
-
var inputRef = (0, React.useRef)(null);
|
|
25
|
-
var compositionStatusRef = (0, React.useRef)(false);
|
|
26
|
-
var prefixCls = props.prefixCls,
|
|
27
|
-
open = props.open,
|
|
28
|
-
mode = props.mode,
|
|
29
|
-
showSearch = props.showSearch,
|
|
30
|
-
tokenWithEnter = props.tokenWithEnter,
|
|
31
|
-
autoClearSearchValue = props.autoClearSearchValue,
|
|
32
|
-
onSearch = props.onSearch,
|
|
33
|
-
onSearchSubmit = props.onSearchSubmit,
|
|
34
|
-
onToggleOpen = props.onToggleOpen,
|
|
35
|
-
onInputKeyDown = props.onInputKeyDown,
|
|
36
|
-
domRef = props.domRef;
|
|
37
|
-
// ======================= Ref =======================
|
|
38
|
-
React.useImperativeHandle(ref, function () {
|
|
39
|
-
return {
|
|
40
|
-
focus: function focus() {
|
|
41
|
-
inputRef.current.focus();
|
|
42
|
-
},
|
|
43
|
-
blur: function blur() {
|
|
44
|
-
inputRef.current.blur();
|
|
45
|
-
}
|
|
46
|
-
};
|
|
47
|
-
});
|
|
48
|
-
// ====================== Input ======================
|
|
49
|
-
var _useLock = (0, _useLock3["default"])(0),
|
|
50
|
-
_useLock2 = _slicedToArray(_useLock, 2),
|
|
51
|
-
getInputMouseDown = _useLock2[0],
|
|
52
|
-
setInputMouseDown = _useLock2[1];
|
|
53
|
-
var onInternalInputKeyDown = function onInternalInputKeyDown(event) {
|
|
54
|
-
var which = event.which;
|
|
55
|
-
if (which === _KeyCode["default"].UP || which === _KeyCode["default"].DOWN) {
|
|
56
|
-
event.preventDefault();
|
|
57
|
-
}
|
|
58
|
-
if (onInputKeyDown) {
|
|
59
|
-
onInputKeyDown(event);
|
|
60
|
-
}
|
|
61
|
-
if (which === _KeyCode["default"].ENTER && mode === 'tags' && !compositionStatusRef.current && !open) {
|
|
62
|
-
// When menu isn't open, OptionList won't trigger a value change
|
|
63
|
-
// So when enter is pressed, the tag's input value should be emitted here to let selector know
|
|
64
|
-
onSearchSubmit === null || onSearchSubmit === void 0 ? void 0 : onSearchSubmit(event.target.value);
|
|
65
|
-
}
|
|
66
|
-
if ((0, _keyUtil.isValidateOpenKey)(which)) {
|
|
67
|
-
onToggleOpen(true);
|
|
68
|
-
}
|
|
69
|
-
};
|
|
70
|
-
/**
|
|
71
|
-
* We can not use `findDOMNode` sine it will get warning,
|
|
72
|
-
* have to use timer to check if is input element.
|
|
73
|
-
*/
|
|
74
|
-
var onInternalInputMouseDown = function onInternalInputMouseDown() {
|
|
75
|
-
setInputMouseDown(true);
|
|
76
|
-
};
|
|
77
|
-
// When paste come, ignore next onChange
|
|
78
|
-
var pastedTextRef = (0, React.useRef)(null);
|
|
79
|
-
var triggerOnSearch = function triggerOnSearch(value) {
|
|
80
|
-
if (onSearch(value, true, compositionStatusRef.current) !== false) {
|
|
81
|
-
onToggleOpen(true);
|
|
82
|
-
}
|
|
83
|
-
};
|
|
84
|
-
var onInputCompositionStart = function onInputCompositionStart() {
|
|
85
|
-
compositionStatusRef.current = true;
|
|
86
|
-
};
|
|
87
|
-
var onInputCompositionEnd = function onInputCompositionEnd(e) {
|
|
88
|
-
compositionStatusRef.current = false;
|
|
89
|
-
// Trigger search again to support `tokenSeparators` with typewriting
|
|
90
|
-
if (mode !== 'combobox') {
|
|
91
|
-
triggerOnSearch(e.target.value);
|
|
92
|
-
}
|
|
93
|
-
};
|
|
94
|
-
var onInputChange = function onInputChange(event) {
|
|
95
|
-
var value = event.target.value;
|
|
96
|
-
// Pasted text should replace back to origin content
|
|
97
|
-
if (tokenWithEnter && pastedTextRef.current && /[\r\n]/.test(pastedTextRef.current)) {
|
|
98
|
-
// CRLF will be treated as a single space for input element
|
|
99
|
-
var replacedText = pastedTextRef.current.replace(/[\r\n]+$/, '').replace(/\r\n/g, ' ').replace(/[\r\n]/g, ' ');
|
|
100
|
-
value = value.replace(replacedText, pastedTextRef.current);
|
|
101
|
-
}
|
|
102
|
-
pastedTextRef.current = null;
|
|
103
|
-
triggerOnSearch(value);
|
|
104
|
-
};
|
|
105
|
-
var onInputPaste = function onInputPaste(e) {
|
|
106
|
-
var clipboardData = e.clipboardData;
|
|
107
|
-
var value = clipboardData.getData('text');
|
|
108
|
-
pastedTextRef.current = value;
|
|
109
|
-
};
|
|
110
|
-
var onClick = function onClick(_ref) {
|
|
111
|
-
var target = _ref.target;
|
|
112
|
-
if (target !== inputRef.current) {
|
|
113
|
-
// Should focus input if click the selector
|
|
114
|
-
var isIE = document.body.style.msTouchAction !== undefined;
|
|
115
|
-
if (isIE) {
|
|
116
|
-
setTimeout(function () {
|
|
117
|
-
inputRef.current.focus();
|
|
118
|
-
});
|
|
119
|
-
} else {
|
|
120
|
-
inputRef.current.focus();
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
};
|
|
124
|
-
var onMouseDown = function onMouseDown(event) {
|
|
125
|
-
var inputMouseDown = getInputMouseDown();
|
|
126
|
-
// when mode is combobox, don't prevent default behavior
|
|
127
|
-
// https://github.com/ant-design/ant-design/issues/37320
|
|
128
|
-
if (event.target !== inputRef.current && !inputMouseDown && mode !== 'combobox') {
|
|
129
|
-
event.preventDefault();
|
|
130
|
-
}
|
|
131
|
-
if (mode !== 'combobox' && (!showSearch || !inputMouseDown) || !open) {
|
|
132
|
-
if (open && autoClearSearchValue !== false) {
|
|
133
|
-
onSearch('', true, false);
|
|
134
|
-
}
|
|
135
|
-
onToggleOpen();
|
|
136
|
-
}
|
|
137
|
-
};
|
|
138
|
-
// ================= Inner Selector ==================
|
|
139
|
-
var sharedProps = {
|
|
140
|
-
inputRef: inputRef,
|
|
141
|
-
onInputKeyDown: onInternalInputKeyDown,
|
|
142
|
-
onInputMouseDown: onInternalInputMouseDown,
|
|
143
|
-
onInputChange: onInputChange,
|
|
144
|
-
onInputPaste: onInputPaste,
|
|
145
|
-
onInputCompositionStart: onInputCompositionStart,
|
|
146
|
-
onInputCompositionEnd: onInputCompositionEnd
|
|
147
|
-
};
|
|
148
|
-
var selectNode = mode === 'multiple' || mode === 'tags' ? React.createElement(_MultipleSelector["default"], Object.assign({}, props, sharedProps)) : React.createElement(_SingleSelector["default"], Object.assign({}, props, sharedProps));
|
|
149
|
-
return React.createElement("div", {
|
|
150
|
-
ref: domRef,
|
|
151
|
-
className: "".concat(prefixCls, "-selector"),
|
|
152
|
-
onClick: onClick,
|
|
153
|
-
onMouseDown: onMouseDown
|
|
154
|
-
}, selectNode);
|
|
155
|
-
};
|
|
156
|
-
var ForwardSelector = React.forwardRef(Selector);
|
|
157
|
-
ForwardSelector.displayName = 'Selector';
|
|
158
|
-
var _default = ForwardSelector;
|
|
159
|
-
exports["default"] = _default;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/tntd-select/rc-select/Selector/index.tsx"],"names":[],"mappings":";AAAA;;;;;;;;GAQG;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,6CAA+B;AAC/B,iCAA+B;AAC/B,kEAA0C;AAE1C,0EAAkD;AAClD,sEAA8C;AAC9C,+DAAuC;AAEvC,8CAAqD;AAmFrD,MAAM,QAAQ,GAAkE,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;IAC7F,MAAM,QAAQ,GAAG,IAAA,cAAM,EAAmB,IAAI,CAAC,CAAC;IAChD,MAAM,oBAAoB,GAAG,IAAA,cAAM,EAAU,KAAK,CAAC,CAAC;IAEpD,MAAM,EACJ,SAAS,EACT,IAAI,EACJ,IAAI,EACJ,UAAU,EACV,cAAc,EAEd,oBAAoB,EA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tD,MAAM,WAAW,GAAG;QAClB,QAAQ;QACR,cAAc,EAAE,sBAAsB;QACtC,gBAAgB,EAAE,wBAAwB;QAC1C,aAAa;QACb,YAAY;QACZ,uBAAuB;QACvB,qBAAqB;KACtB,CAAC;IAEF,MAAM,UAAU,GACd,IAAI,KAAK,UAAU,IAAI,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,CACvC,oBAAC,0BAAgB,oBAAK,KAAK,EAAM,WAAW,EAAI,CACjD,CAAC,CAAC,CAAC,CACF,oBAAC,wBAAc,oBAAK,KAAK,EAAM,WAAW,EAAI,CAC/C,CAAC;IAEJ,OAAO,CACL,6BACE,GAAG,EAAE,MAAM,EACX,SAAS,EAAE,GAAG,SAAS,WAAW,EAClC,OAAO,EAAE,OAAO,EAChB,WAAW,EAAE,WAAW,IAEvB,UAAU,CACP,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,eAAe,GAAG,KAAK,CAAC,UAAU,CAAkC,QAAQ,CAAC,CAAC;AACpF,eAAe,CAAC,WAAW,GAAG,UAAU,CAAC;AAEzC,kBAAe,eAAe,CAAC","sourcesContent":["/**\n * Cursor rule:\n * 1. Only `showSearch` enabled\n * 2. Only `open` is `true`\n * 3. When typing, set `open` to `true` which hit rule of 2\n *\n * Accessibility:\n * - https://www.w3.org/TR/wai-aria-practices/examples/combobox/aria1.1pattern/listbox-combo.html\n */\n\nimport * as React from 'react';\nimport { useRef } from 'react';\nimport KeyCode from 'rc-util/lib/KeyCode';\nimport type { ScrollTo } from 'rc-virtual-list/lib/List';\nimport MultipleSelector from './MultipleSelector';\nimport SingleSelector from './SingleSelector';\nimport useLock from '../hooks/useLock';\nimport type { CustomTagProps, DisplayValueType, Mode, RenderNode } from '../BaseSelect';\nimport { isValidateOpenKey } from '../utils/keyUtil';\n\nexport interface InnerSelectorProps {\n prefixCls: string;\n id: string;\n mode: Mode;\n title?: string;\n\n inputRef: React.Ref<HTMLInputElement | HTMLTextAreaElement>;\n placeholder?: React.ReactNode;\n disabled?: boolean;\n autoFocus?: boolean;\n autoComplete?: string;\n values: DisplayValueType[];\n showSearch?: boolean;\n searchValue: string;\n autoClearSearchValue?: boolean;\n activeDescendantId?: string;\n open: boolean;\n tabIndex?: number;\n maxLength?: number;\n\n onInputKeyDown: React.KeyboardEventHandler<HTMLInputElement | HTMLTextAreaElement>;\n onInputMouseDown: React.MouseEventHandler<HTMLInputElement | HTMLTextAreaElement>;\n onInputChange: React.ChangeEventHandler<HTMLInputElement | HTMLTextAreaElement>;\n onInputPaste: React.ClipboardEventHandler<HTMLInputElement | HTMLTextAreaElement>;\n onInputCompositionStart: React.CompositionEventHandler<HTMLInputElement | HTMLTextAreaElement>;\n onInputCompositionEnd: React.CompositionEventHandler<HTMLInputElement | HTMLTextAreaElement>;\n}\n\nexport interface RefSelectorProps {\n focus: () => void;\n blur: () => void;\n scrollTo?: ScrollTo;\n}\n\nexport interface SelectorProps {\n id: string;\n prefixCls: string;\n showSearch?: boolean;\n open: boolean;\n /** Display in the Selector value, it's not same as `value` prop */\n values: DisplayValueType[];\n mode: Mode;\n searchValue: string;\n activeValue: string;\n autoClearSearchValue: boolean;\n inputElement: JSX.Element;\n maxLength?: number;\n\n autoFocus?: boolean;\n activeDescendantId?: string;\n tabIndex?: number;\n disabled?: boolean;\n placeholder?: React.ReactNode;\n removeIcon?: RenderNode;\n\n // Tags\n maxTagCount?: number | 'responsive';\n maxTagTextLength?: number;\n maxTagPlaceholder?: React.ReactNode | ((omittedValues: DisplayValueType[]) => React.ReactNode);\n tagRender?: (props: CustomTagProps) => React.ReactElement;\n\n /** Check if `tokenSeparators` contains `\\n` or `\\r\\n` */\n tokenWithEnter?: boolean;\n\n // Motion\n choiceTransitionName?: string;\n\n onToggleOpen: (open?: boolean) => void;\n /** `onSearch` returns go next step boolean to check if need do toggle open */\n onSearch: (searchText: string, fromTyping: boolean, isCompositing: boolean) => boolean;\n onSearchSubmit?: (searchText: string) => void;\n onRemove: (value: DisplayValueType) => void;\n onInputKeyDown?: React.KeyboardEventHandler<HTMLInputElement | HTMLTextAreaElement>;\n\n /**\n * @private get real dom for trigger align.\n * This may be removed after React provides replacement of `findDOMNode`\n */\n domRef: React.Ref<HTMLDivElement>;\n}\n\nconst Selector: React.RefForwardingComponent<RefSelectorProps, SelectorProps> = (props, ref) => {\n const inputRef = useRef<HTMLInputElement>(null);\n const compositionStatusRef = useRef<boolean>(false);\n\n const {\n prefixCls,\n open,\n mode,\n showSearch,\n tokenWithEnter,\n\n autoClearSearchValue,\n\n onSearch,\n onSearchSubmit,\n onToggleOpen,\n onInputKeyDown,\n\n domRef,\n } = props;\n\n // ======================= Ref =======================\n React.useImperativeHandle(ref, () => ({\n focus: () => {\n inputRef.current.focus();\n },\n blur: () => {\n inputRef.current.blur();\n },\n }));\n\n // ====================== Input ======================\n const [getInputMouseDown, setInputMouseDown] = useLock(0);\n\n const onInternalInputKeyDown: React.KeyboardEventHandler<HTMLInputElement> = (event) => {\n const { which } = event;\n\n if (which === KeyCode.UP || which === KeyCode.DOWN) {\n event.preventDefault();\n }\n\n if (onInputKeyDown) {\n onInputKeyDown(event);\n }\n\n if (which === KeyCode.ENTER && mode === 'tags' && !compositionStatusRef.current && !open) {\n // When menu isn't open, OptionList won't trigger a value change\n // So when enter is pressed, the tag's input value should be emitted here to let selector know\n onSearchSubmit?.((event.target as HTMLInputElement).value);\n }\n\n if (isValidateOpenKey(which)) {\n onToggleOpen(true);\n }\n };\n\n /**\n * We can not use `findDOMNode` sine it will get warning,\n * have to use timer to check if is input element.\n */\n const onInternalInputMouseDown: React.MouseEventHandler<HTMLInputElement> = () => {\n setInputMouseDown(true);\n };\n\n // When paste come, ignore next onChange\n const pastedTextRef = useRef<string>(null);\n\n const triggerOnSearch = (value: string) => {\n if (onSearch(value, true, compositionStatusRef.current) !== false) {\n onToggleOpen(true);\n }\n };\n\n const onInputCompositionStart = () => {\n compositionStatusRef.current = true;\n };\n\n const onInputCompositionEnd: React.CompositionEventHandler<HTMLInputElement> = (e) => {\n compositionStatusRef.current = false;\n\n // Trigger search again to support `tokenSeparators` with typewriting\n if (mode !== 'combobox') {\n triggerOnSearch((e.target as HTMLInputElement).value);\n }\n };\n\n const onInputChange: React.ChangeEventHandler<HTMLInputElement> = (event) => {\n let {\n target: { value },\n } = event;\n\n // Pasted text should replace back to origin content\n if (tokenWithEnter && pastedTextRef.current && /[\\r\\n]/.test(pastedTextRef.current)) {\n // CRLF will be treated as a single space for input element\n const replacedText = pastedTextRef.current\n .replace(/[\\r\\n]+$/, '')\n .replace(/\\r\\n/g, ' ')\n .replace(/[\\r\\n]/g, ' ');\n value = value.replace(replacedText, pastedTextRef.current);\n }\n\n pastedTextRef.current = null;\n\n triggerOnSearch(value);\n };\n\n const onInputPaste: React.ClipboardEventHandler = (e) => {\n const { clipboardData } = e;\n const value = clipboardData.getData('text');\n\n pastedTextRef.current = value;\n };\n\n const onClick = ({ target }) => {\n if (target !== inputRef.current) {\n // Should focus input if click the selector\n const isIE = (document.body.style as any).msTouchAction !== undefined;\n if (isIE) {\n setTimeout(() => {\n inputRef.current.focus();\n });\n } else {\n inputRef.current.focus();\n }\n }\n };\n\n const onMouseDown: React.MouseEventHandler<HTMLElement> = (event) => {\n const inputMouseDown = getInputMouseDown();\n\n // when mode is combobox, don't prevent default behavior\n // https://github.com/ant-design/ant-design/issues/37320\n if (event.target !== inputRef.current && !inputMouseDown && mode !== 'combobox') {\n event.preventDefault();\n }\n\n if ((mode !== 'combobox' && (!showSearch || !inputMouseDown)) || !open) {\n if (open && autoClearSearchValue !== false) {\n onSearch('', true, false);\n }\n onToggleOpen();\n }\n };\n\n // ================= Inner Selector ==================\n const sharedProps = {\n inputRef,\n onInputKeyDown: onInternalInputKeyDown,\n onInputMouseDown: onInternalInputMouseDown,\n onInputChange,\n onInputPaste,\n onInputCompositionStart,\n onInputCompositionEnd,\n };\n\n const selectNode =\n mode === 'multiple' || mode === 'tags' ? (\n <MultipleSelector {...props} {...sharedProps} />\n ) : (\n <SingleSelector {...props} {...sharedProps} />\n );\n\n return (\n <div\n ref={domRef}\n className={`${prefixCls}-selector`}\n onClick={onClick}\n onMouseDown={onMouseDown}\n >\n {selectNode}\n </div>\n );\n};\n\nconst ForwardSelector = React.forwardRef<RefSelectorProps, SelectorProps>(Selector);\nForwardSelector.displayName = 'Selector';\n\nexport default ForwardSelector;\n"]}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import type { RenderNode } from './BaseSelect';
|
|
3
|
-
export interface TransBtnProps {
|
|
4
|
-
className: string;
|
|
5
|
-
customizeIcon: RenderNode;
|
|
6
|
-
customizeIconProps?: any;
|
|
7
|
-
onMouseDown?: React.MouseEventHandler<HTMLSpanElement>;
|
|
8
|
-
onClick?: React.MouseEventHandler<HTMLSpanElement>;
|
|
9
|
-
children?: React.ReactNode;
|
|
10
|
-
}
|
|
11
|
-
declare const TransBtn: React.FC<TransBtnProps>;
|
|
12
|
-
export default TransBtn;
|
|
13
|
-
//# sourceMappingURL=TransBtn.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TransBtn.d.ts","sourceRoot":"","sources":["../../../src/tntd-select/rc-select/TransBtn.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C,MAAM,WAAW,aAAa;IAC5B,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,UAAU,CAAC;IAC1B,kBAAkB,CAAC,EAAE,GAAG,CAAC;IACzB,WAAW,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC,eAAe,CAAC,CAAC;IACvD,OAAO,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC,eAAe,CAAC,CAAC;IACnD,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED,QAAA,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CA0CrC,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports["default"] = void 0;
|
|
8
|
-
var React = _interopRequireWildcard(require("react"));
|
|
9
|
-
var _classnames = _interopRequireDefault(require("classnames"));
|
|
10
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
11
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
12
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
13
|
-
var TransBtn = function TransBtn(_ref) {
|
|
14
|
-
var className = _ref.className,
|
|
15
|
-
customizeIcon = _ref.customizeIcon,
|
|
16
|
-
customizeIconProps = _ref.customizeIconProps,
|
|
17
|
-
_onMouseDown = _ref.onMouseDown,
|
|
18
|
-
onClick = _ref.onClick,
|
|
19
|
-
children = _ref.children;
|
|
20
|
-
var icon;
|
|
21
|
-
if (typeof customizeIcon === 'function') {
|
|
22
|
-
icon = customizeIcon(customizeIconProps);
|
|
23
|
-
} else {
|
|
24
|
-
icon = customizeIcon;
|
|
25
|
-
}
|
|
26
|
-
return React.createElement("span", {
|
|
27
|
-
className: className,
|
|
28
|
-
onMouseDown: function onMouseDown(event) {
|
|
29
|
-
event.preventDefault();
|
|
30
|
-
if (_onMouseDown) {
|
|
31
|
-
_onMouseDown(event);
|
|
32
|
-
}
|
|
33
|
-
},
|
|
34
|
-
style: {
|
|
35
|
-
userSelect: 'none',
|
|
36
|
-
WebkitUserSelect: 'none'
|
|
37
|
-
},
|
|
38
|
-
unselectable: "on",
|
|
39
|
-
onClick: onClick,
|
|
40
|
-
"aria-hidden": true
|
|
41
|
-
}, icon !== undefined ? icon : React.createElement("span", {
|
|
42
|
-
className: (0, _classnames["default"])(className.split(/\s+/).map(function (cls) {
|
|
43
|
-
return "".concat(cls, "-icon");
|
|
44
|
-
}))
|
|
45
|
-
}, children));
|
|
46
|
-
};
|
|
47
|
-
var _default = TransBtn;
|
|
48
|
-
exports["default"] = _default;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TransBtn.js","sourceRoot":"","sources":["../../../src/tntd-select/rc-select/TransBtn.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAA+B;AAC/B,4DAAoC;AAYpC,MAAM,QAAQ,GAA4B,CAAC,EACzC,SAAS,EACT,aAAa,EACb,kBAAkB,EAClB,WAAW,EACX,OAAO,EACP,QAAQ,GACT,EAAE,EAAE;IACH,IAAI,IAAqB,CAAC;IAE1B,IAAI,OAAO,aAAa,KAAK,UAAU,EAAE;QACvC,IAAI,GAAG,aAAa,CAAC,kBAAkB,CAAC,CAAC;KAC1C;SAAM;QACL,IAAI,GAAG,aAAa,CAAC;KACtB;IAED,OAAO,CACL,8BACE,SAAS,EAAE,SAAS,EACpB,WAAW,EAAE,CAAC,KAAK,EAAE,EAAE;YACrB,KAAK,CAAC,cAAc,EAAE,CAAC;YACvB,IAAI,WAAW,EAAE;gBACf,WAAW,CAAC,KAAK,CAAC,CAAC;aACpB;QACH,CAAC,EACD,KAAK,EAAE;YACL,UAAU,EAAE,MAAM;YAClB,gBAAgB,EAAE,MAAM;SACzB,EACD,YAAY,EAAC,IAAI,EACjB,OAAO,EAAE,OAAO,yBAGf,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,CACpB,IAAI,CACL,CAAC,CAAC,CAAC,CACF,8BAAM,SAAS,EAAE,IAAA,oBAAU,EAAC,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,GAAG,OAAO,CAAC,CAAC,IAC5E,QAAQ,CACJ,CACR,CACI,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,QAAQ,CAAC","sourcesContent":["import * as React from 'react';\nimport classNames from 'classnames';\nimport type { RenderNode } from './BaseSelect';\n\nexport interface TransBtnProps {\n className: string;\n customizeIcon: RenderNode;\n customizeIconProps?: any;\n onMouseDown?: React.MouseEventHandler<HTMLSpanElement>;\n onClick?: React.MouseEventHandler<HTMLSpanElement>;\n children?: React.ReactNode;\n}\n\nconst TransBtn: React.FC<TransBtnProps> = ({\n className,\n customizeIcon,\n customizeIconProps,\n onMouseDown,\n onClick,\n children,\n}) => {\n let icon: React.ReactNode;\n\n if (typeof customizeIcon === 'function') {\n icon = customizeIcon(customizeIconProps);\n } else {\n icon = customizeIcon;\n }\n\n return (\n <span\n className={className}\n onMouseDown={(event) => {\n event.preventDefault();\n if (onMouseDown) {\n onMouseDown(event);\n }\n }}\n style={{\n userSelect: 'none',\n WebkitUserSelect: 'none',\n }}\n unselectable=\"on\"\n onClick={onClick}\n aria-hidden\n >\n {icon !== undefined ? (\n icon\n ) : (\n <span className={classNames(className.split(/\\s+/).map((cls) => `${cls}-icon`))}>\n {children}\n </span>\n )}\n </span>\n );\n};\n\nexport default TransBtn;\n"]}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { DisplayValueType, Mode } from '../interface';
|
|
2
|
-
import type { ReactNode } from 'react';
|
|
3
|
-
export declare function useAllowClear(prefixCls: any, onClearMouseDown: any, displayValues: DisplayValueType[], allowClear?: boolean | {
|
|
4
|
-
clearIcon?: ReactNode;
|
|
5
|
-
}, clearIcon?: ReactNode, disabled?: boolean, mergedSearchValue?: string, mode?: Mode): {
|
|
6
|
-
allowClear: boolean;
|
|
7
|
-
clearIcon: JSX.Element;
|
|
8
|
-
};
|
|
9
|
-
//# sourceMappingURL=useAllowClear.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useAllowClear.d.ts","sourceRoot":"","sources":["../../../../src/tntd-select/rc-select/hooks/useAllowClear.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAC3D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,wBAAgB,aAAa,CACzB,SAAS,KAAA,EACT,gBAAgB,KAAA,EAChB,aAAa,EAAE,gBAAgB,EAAE,EACjC,UAAU,CAAC,EAAE,OAAO,GAAG;IAAE,SAAS,CAAC,EAAE,SAAS,CAAA;CAAE,EAChD,SAAS,CAAC,EAAE,SAAS,EACrB,QAAQ,UAAQ,EAChB,iBAAiB,CAAC,EAAE,MAAM,EAC1B,IAAI,CAAC,EAAE,IAAI;;;EAkCd"}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.useAllowClear = useAllowClear;
|
|
7
|
-
var _TransBtn = _interopRequireDefault(require("../TransBtn"));
|
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
10
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
11
|
-
function useAllowClear(prefixCls, onClearMouseDown, displayValues, allowClear, clearIcon) {
|
|
12
|
-
var disabled = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : false;
|
|
13
|
-
var mergedSearchValue = arguments.length > 6 ? arguments[6] : undefined;
|
|
14
|
-
var mode = arguments.length > 7 ? arguments[7] : undefined;
|
|
15
|
-
var mergedClearIcon = _react["default"].useMemo(function () {
|
|
16
|
-
if (_typeof(allowClear) === "object") {
|
|
17
|
-
return allowClear.clearIcon;
|
|
18
|
-
}
|
|
19
|
-
if (!!clearIcon) return clearIcon;
|
|
20
|
-
}, [allowClear, clearIcon]);
|
|
21
|
-
var mergedAllowClear = _react["default"].useMemo(function () {
|
|
22
|
-
if (!disabled && !!allowClear && (displayValues.length || mergedSearchValue) && !(mode === 'combobox' && mergedSearchValue === '')) {
|
|
23
|
-
return true;
|
|
24
|
-
}
|
|
25
|
-
return false;
|
|
26
|
-
}, [allowClear, disabled, displayValues.length, mergedSearchValue, mode]);
|
|
27
|
-
return {
|
|
28
|
-
allowClear: mergedAllowClear,
|
|
29
|
-
clearIcon: _react["default"].createElement(_TransBtn["default"], {
|
|
30
|
-
className: "".concat(prefixCls, "-clear"),
|
|
31
|
-
onMouseDown: onClearMouseDown,
|
|
32
|
-
customizeIcon: mergedClearIcon
|
|
33
|
-
}, "\xD7")
|
|
34
|
-
};
|
|
35
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useAllowClear.js","sourceRoot":"","sources":["../../../../src/tntd-select/rc-select/hooks/useAllowClear.tsx"],"names":[],"mappings":";;;;;;AAAA,2DAAmC;AAGnC,kDAA0B;AAE1B,SAAgB,aAAa,CACzB,SAAS,EACT,gBAAgB,EAChB,aAAiC,EACjC,UAAgD,EAChD,SAAqB,EACrB,QAAQ,GAAG,KAAK,EAChB,iBAA0B,EAC1B,IAAW;IAEX,MAAM,eAAe,GAAG,eAAK,CAAC,OAAO,CAAC,GAAG,EAAE;QACvC,IAAI,OAAO,UAAU,KAAK,QAAQ,EAAE;YAChC,OAAO,UAAU,CAAC,SAAS,CAAC;SAC/B;QACD,IAAI,CAAC,CAAC,SAAS;YAAE,OAAO,SAAS,CAAC;IACtC,CAAC,EAAE,CAAC,UAAU,EAAE,SAAS,CAAC,CAAC,CAAC;IAG5B,MAAM,gBAAgB,GAAG,eAAK,CAAC,OAAO,CAAC,GAAG,EAAE;QACxC,IACI,CAAC,QAAQ;YACT,CAAC,CAAC,UAAU;YACZ,CAAC,aAAa,CAAC,MAAM,IAAI,iBAAiB,CAAC;YAC3C,CAAC,CAAC,IAAI,KAAK,UAAU,IAAI,iBAAiB,KAAK,EAAE,CAAC,EACpD;YACE,OAAO,IAAI,CAAC;SACf;QACD,OAAO,KAAK,CAAC;IACjB,CAAC,EAAE,CAAC,UAAU,EAAE,QAAQ,EAAE,aAAa,CAAC,MAAM,EAAE,iBAAiB,EAAE,IAAI,CAAC,CAAC,CAAC;IAE1E,OAAO;QACH,UAAU,EAAE,gBAAgB;QAC5B,SAAS,EAAE,CACP,8BAAC,kBAAQ,IACL,SAAS,EAAE,GAAG,SAAS,QAAQ,EAC/B,WAAW,EAAE,gBAAgB,EAC7B,aAAa,EAAE,eAAe,aAGvB,CACd;KACJ,CAAC;AACN,CAAC;AA1CD,sCA0CC","sourcesContent":["import TransBtn from '../TransBtn';\nimport type { DisplayValueType, Mode } from '../interface';\nimport type { ReactNode } from 'react';\nimport React from 'react';\n\nexport function useAllowClear(\n prefixCls,\n onClearMouseDown,\n displayValues: DisplayValueType[],\n allowClear?: boolean | { clearIcon?: ReactNode },\n clearIcon?: ReactNode,\n disabled = false,\n mergedSearchValue?: string,\n mode?: Mode\n) {\n const mergedClearIcon = React.useMemo(() => {\n if (typeof allowClear === \"object\") {\n return allowClear.clearIcon;\n }\n if (!!clearIcon) return clearIcon;\n }, [allowClear, clearIcon]);\n\n\n const mergedAllowClear = React.useMemo(() => {\n if (\n !disabled &&\n !!allowClear &&\n (displayValues.length || mergedSearchValue) &&\n !(mode === 'combobox' && mergedSearchValue === '')\n ) {\n return true;\n }\n return false;\n }, [allowClear, disabled, displayValues.length, mergedSearchValue, mode]);\n\n return {\n allowClear: mergedAllowClear,\n clearIcon: (\n <TransBtn\n className={`${prefixCls}-clear`}\n onMouseDown={onClearMouseDown}\n customizeIcon={mergedClearIcon}\n >\n ×\n </TransBtn>\n )\n };\n}\n"]}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* BaseSelect provide some parsed data into context.
|
|
3
|
-
* You can use this hooks to get them.
|
|
4
|
-
*/
|
|
5
|
-
import * as React from 'react';
|
|
6
|
-
import type { BaseSelectProps } from '../BaseSelect';
|
|
7
|
-
export interface BaseSelectContextProps extends BaseSelectProps {
|
|
8
|
-
triggerOpen: boolean;
|
|
9
|
-
multiple: boolean;
|
|
10
|
-
toggleOpen: (open?: boolean) => void;
|
|
11
|
-
}
|
|
12
|
-
export declare const BaseSelectContext: React.Context<BaseSelectContextProps>;
|
|
13
|
-
export default function useBaseProps(): BaseSelectContextProps;
|
|
14
|
-
//# sourceMappingURL=useBaseProps.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useBaseProps.d.ts","sourceRoot":"","sources":["../../../../src/tntd-select/rc-select/hooks/useBaseProps.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAErD,MAAM,WAAW,sBAAuB,SAAQ,eAAe;IAC7D,WAAW,EAAE,OAAO,CAAC;IACrB,QAAQ,EAAE,OAAO,CAAC;IAClB,UAAU,EAAE,CAAC,IAAI,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;CACtC;AAED,eAAO,MAAM,iBAAiB,uCAAoD,CAAC;AAEnF,MAAM,CAAC,OAAO,UAAU,YAAY,2BAEnC"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.BaseSelectContext = void 0;
|
|
8
|
-
exports["default"] = useBaseProps;
|
|
9
|
-
var React = _interopRequireWildcard(require("react"));
|
|
10
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
11
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
12
|
-
/**
|
|
13
|
-
* BaseSelect provide some parsed data into context.
|
|
14
|
-
* You can use this hooks to get them.
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
var BaseSelectContext = React.createContext(null);
|
|
18
|
-
exports.BaseSelectContext = BaseSelectContext;
|
|
19
|
-
function useBaseProps() {
|
|
20
|
-
return React.useContext(BaseSelectContext);
|
|
21
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useBaseProps.js","sourceRoot":"","sources":["../../../../src/tntd-select/rc-select/hooks/useBaseProps.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,6CAA+B;AASlB,QAAA,iBAAiB,GAAG,KAAK,CAAC,aAAa,CAAyB,IAAI,CAAC,CAAC;AAEnF,SAAwB,YAAY;IAClC,OAAO,KAAK,CAAC,UAAU,CAAC,yBAAiB,CAAC,CAAC;AAC7C,CAAC;AAFD,+BAEC","sourcesContent":["/**\n * BaseSelect provide some parsed data into context.\n * You can use this hooks to get them.\n */\n\nimport * as React from 'react';\nimport type { BaseSelectProps } from '../BaseSelect';\n\nexport interface BaseSelectContextProps extends BaseSelectProps {\n triggerOpen: boolean;\n multiple: boolean;\n toggleOpen: (open?: boolean) => void;\n}\n\nexport const BaseSelectContext = React.createContext<BaseSelectContextProps>(null);\n\nexport default function useBaseProps() {\n return React.useContext(BaseSelectContext);\n}\n"]}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { RawValueType } from '../BaseSelect';
|
|
2
|
-
import type { DefaultOptionType, LabelInValueType } from '../Select';
|
|
3
|
-
declare const _default: (labeledValues: LabelInValueType[], valueOptions: Map<RawValueType, DefaultOptionType>) => [LabelInValueType[], (val: RawValueType) => DefaultOptionType];
|
|
4
|
-
/**
|
|
5
|
-
* Cache `value` related LabeledValue & options.
|
|
6
|
-
*/
|
|
7
|
-
export default _default;
|
|
8
|
-
//# sourceMappingURL=useCache.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useCache.d.ts","sourceRoot":"","sources":["../../../../src/tntd-select/rc-select/hooks/useCache.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAClD,OAAO,KAAK,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;wCAMpD,gBAAgB,EAAE,gBACnB,IAAI,YAAY,EAAE,iBAAiB,CAAC,gCACtB,YAAY,KAAK,iBAAiB;AANhE;;GAEG;AACH,wBA6CE"}
|