tntd 2.7.30 → 2.7.31
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/lib/ellipsis/index.d.ts.map +1 -1
- package/lib/ellipsis/index.js +2 -0
- package/lib/ellipsis/index.js.map +1 -1
- package/package.json +1 -1
- package/themes/common/index.less +3 -3
- package/es/affix/style/index.less +0 -6
- package/es/alert/style/index.less +0 -188
- package/es/anchor/style/index.less +0 -82
- package/es/auto-complete/style/index.less +0 -92
- package/es/avatar/style/index.less +0 -59
- package/es/back-top/style/index.less +0 -42
- package/es/back-top/style/responsive.less +0 -11
- package/es/badge/style/index.less +0 -190
- package/es/breadcrumb/style/index.less +0 -51
- package/es/button/style/index.less +0 -224
- package/es/button/style/mixin.less +0 -357
- package/es/calendar/style/index.less +0 -278
- package/es/card/style/index.less +0 -263
- package/es/card/style/size.less +0 -25
- package/es/carousel/style/index.less +0 -238
- package/es/cascader/style/index.less +0 -227
- package/es/checkbox/style/index.less +0 -4
- package/es/checkbox/style/mixin.less +0 -220
- package/es/collapse/style/index.less +0 -134
- package/es/comment/style/index.less +0 -93
- 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.less +0 -17
- package/es/descriptions/style/index.less +0 -144
- package/es/divider/style/index.less +0 -109
- package/es/drawer/style/drawer.less +0 -230
- package/es/drawer/style/index.less +0 -3
- package/es/dropdown/style/index.less +0 -282
- package/es/empty/style/index.less +0 -52
- package/es/form/style/index.less +0 -653
- package/es/form/style/mixin.less +0 -126
- 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.less +0 -4
- 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.less +0 -179
- 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.less +0 -234
- package/es/list/style/responsive.less +0 -40
- 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.less +0 -164
- package/es/menu/style/dark.less +0 -139
- package/es/menu/style/index.less +0 -515
- package/es/message/style/index.less +0 -75
- package/es/modal/style/confirm.less +0 -78
- package/es/modal/style/index.less +0 -4
- package/es/modal/style/modal.less +0 -165
- package/es/notification/style/index.less +0 -199
- package/es/page-header/style/index.less +0 -119
- package/es/pagination/style/index.less +0 -400
- package/es/popover/style/index.less +0 -205
- package/es/progress/style/index.less +0 -182
- package/es/radio/style/index.less +0 -327
- package/es/rate/style/index.less +0 -85
- package/es/result/style/index.less +0 -71
- package/es/select/style/index.less +0 -604
- package/es/skeleton/style/index.less +0 -130
- package/es/slider/style/index.less +0 -197
- package/es/spin/style/index.less +0 -214
- 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/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.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.less +0 -51
- package/es/switch/style/index.less +0 -178
- 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.less +0 -436
- package/es/tag/style/index.less +0 -106
- package/es/time-picker/style/index.less +0 -246
- 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-form/_util/motion.js +0 -47
- package/es/tntd-form/_util/motion.js.map +0 -1
- package/es/tntd-form/_util/reactNode.js +0 -16
- package/es/tntd-form/_util/reactNode.js.map +0 -1
- package/es/tntd-form/_util/scrollTo.js +0 -35
- package/es/tntd-form/_util/scrollTo.js.map +0 -1
- package/es/tntd-form/_util/type.js +0 -3
- package/es/tntd-form/_util/type.js.map +0 -1
- package/es/tntd-form/_util/warning.js +0 -5
- package/es/tntd-form/_util/warning.js.map +0 -1
- package/es/tntd-form/_util/wave.js +0 -168
- package/es/tntd-form/_util/wave.js.map +0 -1
- package/es/tntd-form/tntd-form.stories.js +0 -836
- package/es/tntd-form/tntd-form.stories.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 +0 -12
- package/es/tntd-select/_util/context.js.map +0 -1
- package/es/tntd-select/_util/defaultRenderEmpty.js +0 -31
- 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.less +0 -187
- package/es/transfer/style/customize.less +0 -62
- package/es/transfer/style/index.less +0 -191
- package/es/tree/style/directory.less +0 -95
- package/es/tree/style/index.less +0 -280
- package/es/tree/style/mixin.less +0 -29
- package/es/tree-select/style/index.less +0 -191
- package/es/typography/style/index.less +0 -204
- package/es/upload/style/index.less +0 -542
- package/lib/affix/style/index.less +0 -6
- package/lib/alert/style/index.less +0 -188
- package/lib/anchor/style/index.less +0 -82
- package/lib/auto-complete/style/index.less +0 -92
- package/lib/avatar/style/index.less +0 -59
- package/lib/back-top/style/index.less +0 -42
- package/lib/back-top/style/responsive.less +0 -11
- package/lib/badge/style/index.less +0 -190
- package/lib/breadcrumb/style/index.less +0 -51
- package/lib/button/style/index.less +0 -224
- package/lib/button/style/mixin.less +0 -357
- package/lib/calendar/style/index.less +0 -278
- package/lib/card/style/index.less +0 -263
- package/lib/card/style/size.less +0 -25
- package/lib/carousel/style/index.less +0 -238
- package/lib/cascader/style/index.less +0 -227
- package/lib/checkbox/style/index.less +0 -4
- package/lib/checkbox/style/mixin.less +0 -220
- package/lib/collapse/style/index.less +0 -134
- package/lib/comment/style/index.less +0 -93
- 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.less +0 -17
- package/lib/descriptions/style/index.less +0 -144
- package/lib/divider/style/index.less +0 -109
- package/lib/drawer/style/drawer.less +0 -230
- package/lib/drawer/style/index.less +0 -3
- package/lib/dropdown/style/index.less +0 -282
- package/lib/empty/style/index.less +0 -52
- package/lib/form/style/index.less +0 -653
- package/lib/form/style/mixin.less +0 -126
- 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.less +0 -4
- 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.less +0 -179
- 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.less +0 -234
- package/lib/list/style/responsive.less +0 -40
- package/lib/locale-provider/style/index.less +0 -2
- package/lib/mention/index.js +0 -25
- package/lib/mentions/style/index.less +0 -164
- package/lib/menu/style/dark.less +0 -139
- package/lib/menu/style/index.less +0 -515
- package/lib/message/style/index.less +0 -75
- package/lib/modal/style/confirm.less +0 -78
- package/lib/modal/style/index.less +0 -4
- package/lib/modal/style/modal.less +0 -165
- package/lib/notification/style/index.less +0 -199
- package/lib/page-header/style/index.less +0 -119
- package/lib/pagination/style/index.less +0 -400
- package/lib/popover/style/index.less +0 -205
- package/lib/progress/style/index.less +0 -182
- package/lib/radio/style/index.less +0 -327
- package/lib/rate/style/index.less +0 -85
- package/lib/result/style/index.less +0 -71
- package/lib/select/style/index.less +0 -604
- package/lib/skeleton/style/index.less +0 -130
- package/lib/slider/style/index.less +0 -197
- package/lib/spin/style/index.less +0 -214
- 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/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.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.less +0 -51
- package/lib/switch/style/index.less +0 -178
- 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.less +0 -436
- package/lib/tag/style/index.less +0 -106
- package/lib/time-picker/style/index.less +0 -246
- 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-form/_util/motion.d.ts +0 -9
- package/lib/tntd-form/_util/motion.d.ts.map +0 -1
- package/lib/tntd-form/_util/motion.js +0 -59
- package/lib/tntd-form/_util/motion.js.map +0 -1
- package/lib/tntd-form/_util/reactNode.d.ts +0 -9
- package/lib/tntd-form/_util/reactNode.d.ts.map +0 -1
- package/lib/tntd-form/_util/reactNode.js +0 -27
- package/lib/tntd-form/_util/reactNode.js.map +0 -1
- package/lib/tntd-form/_util/scrollTo.d.ts +0 -1
- package/lib/tntd-form/_util/scrollTo.d.ts.map +0 -1
- package/lib/tntd-form/_util/scrollTo.js +0 -35
- package/lib/tntd-form/_util/scrollTo.js.map +0 -1
- package/lib/tntd-form/_util/type.d.ts +0 -4
- package/lib/tntd-form/_util/type.d.ts.map +0 -1
- package/lib/tntd-form/_util/type.js +0 -21
- package/lib/tntd-form/_util/type.js.map +0 -1
- package/lib/tntd-form/_util/warning.d.ts +0 -5
- package/lib/tntd-form/_util/warning.d.ts.map +0 -1
- package/lib/tntd-form/_util/warning.js +0 -20
- package/lib/tntd-form/_util/warning.js.map +0 -1
- package/lib/tntd-form/_util/wave.d.ts +0 -1
- package/lib/tntd-form/_util/wave.d.ts.map +0 -1
- package/lib/tntd-form/_util/wave.js +0 -168
- package/lib/tntd-form/_util/wave.js.map +0 -1
- package/lib/tntd-form/tntd-form.stories.d.ts +0 -33
- package/lib/tntd-form/tntd-form.stories.d.ts.map +0 -1
- package/lib/tntd-form/tntd-form.stories.js +0 -943
- package/lib/tntd-form/tntd-form.stories.js.map +0 -1
- 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 +0 -42
- package/lib/tntd-select/_util/context.d.ts.map +0 -1
- package/lib/tntd-select/_util/context.js +0 -22
- package/lib/tntd-select/_util/context.js.map +0 -1
- package/lib/tntd-select/_util/defaultRenderEmpty.d.ts +0 -5
- package/lib/tntd-select/_util/defaultRenderEmpty.d.ts.map +0 -1
- package/lib/tntd-select/_util/defaultRenderEmpty.js +0 -44
- 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 +0 -44
- 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 +0 -48
- 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.less +0 -187
- package/lib/transfer/style/customize.less +0 -62
- package/lib/transfer/style/index.less +0 -191
- package/lib/tree/style/directory.less +0 -95
- package/lib/tree/style/index.less +0 -280
- package/lib/tree/style/mixin.less +0 -29
- package/lib/tree-select/style/index.less +0 -191
- package/lib/typography/style/index.less +0 -204
- package/lib/upload/style/index.less +0 -542
|
@@ -1,524 +0,0 @@
|
|
|
1
|
-
var __rest = this && this.__rest || function (s, e) {
|
|
2
|
-
var t = {};
|
|
3
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
4
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
5
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
6
|
-
}
|
|
7
|
-
return t;
|
|
8
|
-
};
|
|
9
|
-
import classNames from 'classnames';
|
|
10
|
-
import useLayoutEffect from 'rc-util/lib/hooks/useLayoutEffect';
|
|
11
|
-
import useMergedState from 'rc-util/lib/hooks/useMergedState';
|
|
12
|
-
import isMobile from 'rc-util/lib/isMobile';
|
|
13
|
-
import KeyCode from 'rc-util/lib/KeyCode';
|
|
14
|
-
import { useComposeRef } from 'rc-util/lib/ref';
|
|
15
|
-
import * as React from 'react';
|
|
16
|
-
import { useAllowClear } from './hooks/useAllowClear';
|
|
17
|
-
import { BaseSelectContext } from './hooks/useBaseProps';
|
|
18
|
-
import useDelayReset from './hooks/useDelayReset';
|
|
19
|
-
import useLock from './hooks/useLock';
|
|
20
|
-
import useSelectTriggerControl from './hooks/useSelectTriggerControl';
|
|
21
|
-
import Selector from './Selector';
|
|
22
|
-
import SelectTrigger from './SelectTrigger';
|
|
23
|
-
import TransBtn from './TransBtn';
|
|
24
|
-
import { getSeparatedContent } from './utils/valueUtil';
|
|
25
|
-
const DEFAULT_OMIT_PROPS = ['value', 'onChange', 'removeIcon', 'placeholder', 'autoFocus', 'maxTagCount', 'maxTagTextLength', 'maxTagPlaceholder', 'choiceTransitionName', 'onInputKeyDown', 'onPopupScroll', 'tabIndex'];
|
|
26
|
-
export function isMultiple(mode) {
|
|
27
|
-
return mode === 'tags' || mode === 'multiple';
|
|
28
|
-
}
|
|
29
|
-
const BaseSelect = React.forwardRef((props, ref) => {
|
|
30
|
-
var _a;
|
|
31
|
-
const {
|
|
32
|
-
id,
|
|
33
|
-
prefixCls,
|
|
34
|
-
className,
|
|
35
|
-
showSearch,
|
|
36
|
-
tagRender,
|
|
37
|
-
direction,
|
|
38
|
-
omitDomProps,
|
|
39
|
-
// Value
|
|
40
|
-
displayValues,
|
|
41
|
-
onDisplayValuesChange,
|
|
42
|
-
emptyOptions,
|
|
43
|
-
notFoundContent = 'Not Found',
|
|
44
|
-
onClear,
|
|
45
|
-
// Mode
|
|
46
|
-
mode,
|
|
47
|
-
// Status
|
|
48
|
-
disabled,
|
|
49
|
-
loading,
|
|
50
|
-
// Customize Input
|
|
51
|
-
getInputElement,
|
|
52
|
-
getRawInputElement,
|
|
53
|
-
// Open
|
|
54
|
-
open,
|
|
55
|
-
defaultOpen,
|
|
56
|
-
onDropdownVisibleChange,
|
|
57
|
-
// Active
|
|
58
|
-
activeValue,
|
|
59
|
-
onActiveValueChange,
|
|
60
|
-
activeDescendantId,
|
|
61
|
-
// Search
|
|
62
|
-
searchValue,
|
|
63
|
-
autoClearSearchValue,
|
|
64
|
-
onSearch,
|
|
65
|
-
onSearchSplit,
|
|
66
|
-
tokenSeparators,
|
|
67
|
-
// Icons
|
|
68
|
-
allowClear,
|
|
69
|
-
suffixIcon,
|
|
70
|
-
clearIcon,
|
|
71
|
-
// Dropdown
|
|
72
|
-
OptionList,
|
|
73
|
-
animation,
|
|
74
|
-
transitionName,
|
|
75
|
-
dropdownStyle,
|
|
76
|
-
dropdownClassName,
|
|
77
|
-
dropdownMatchSelectWidth,
|
|
78
|
-
dropdownRender,
|
|
79
|
-
dropdownAlign,
|
|
80
|
-
placement,
|
|
81
|
-
builtinPlacements,
|
|
82
|
-
getPopupContainer,
|
|
83
|
-
// Focus
|
|
84
|
-
showAction = [],
|
|
85
|
-
onFocus,
|
|
86
|
-
onBlur,
|
|
87
|
-
// Rest Events
|
|
88
|
-
onKeyUp,
|
|
89
|
-
onKeyDown,
|
|
90
|
-
onMouseDown
|
|
91
|
-
} = props,
|
|
92
|
-
// Rest Props
|
|
93
|
-
restProps = __rest(props, ["id", "prefixCls", "className", "showSearch", "tagRender", "direction", "omitDomProps", "displayValues", "onDisplayValuesChange", "emptyOptions", "notFoundContent", "onClear", "mode", "disabled", "loading", "getInputElement", "getRawInputElement", "open", "defaultOpen", "onDropdownVisibleChange", "activeValue", "onActiveValueChange", "activeDescendantId", "searchValue", "autoClearSearchValue", "onSearch", "onSearchSplit", "tokenSeparators", "allowClear", "suffixIcon", "clearIcon", "OptionList", "animation", "transitionName", "dropdownStyle", "dropdownClassName", "dropdownMatchSelectWidth", "dropdownRender", "dropdownAlign", "placement", "builtinPlacements", "getPopupContainer", "showAction", "onFocus", "onBlur", "onKeyUp", "onKeyDown", "onMouseDown"]);
|
|
94
|
-
// ============================== MISC ==============================
|
|
95
|
-
const multiple = isMultiple(mode);
|
|
96
|
-
const mergedShowSearch = (showSearch !== undefined ? showSearch : multiple) || mode === 'combobox';
|
|
97
|
-
const domProps = Object.assign({}, restProps);
|
|
98
|
-
DEFAULT_OMIT_PROPS.forEach(propName => {
|
|
99
|
-
delete domProps[propName];
|
|
100
|
-
});
|
|
101
|
-
omitDomProps === null || omitDomProps === void 0 ? void 0 : omitDomProps.forEach(propName => {
|
|
102
|
-
delete domProps[propName];
|
|
103
|
-
});
|
|
104
|
-
// ============================= Mobile =============================
|
|
105
|
-
const [mobile, setMobile] = React.useState(false);
|
|
106
|
-
React.useEffect(() => {
|
|
107
|
-
// Only update on the client side
|
|
108
|
-
setMobile(isMobile());
|
|
109
|
-
}, []);
|
|
110
|
-
// ============================== Refs ==============================
|
|
111
|
-
const containerRef = React.useRef(null);
|
|
112
|
-
const selectorDomRef = React.useRef(null);
|
|
113
|
-
const triggerRef = React.useRef(null);
|
|
114
|
-
const selectorRef = React.useRef(null);
|
|
115
|
-
const listRef = React.useRef(null);
|
|
116
|
-
const blurRef = React.useRef(false);
|
|
117
|
-
/** Used for component focused management */
|
|
118
|
-
const [mockFocused, setMockFocused, cancelSetMockFocused] = useDelayReset();
|
|
119
|
-
// =========================== Imperative ===========================
|
|
120
|
-
React.useImperativeHandle(ref, () => {
|
|
121
|
-
var _a, _b;
|
|
122
|
-
return {
|
|
123
|
-
focus: (_a = selectorRef.current) === null || _a === void 0 ? void 0 : _a.focus,
|
|
124
|
-
blur: (_b = selectorRef.current) === null || _b === void 0 ? void 0 : _b.blur,
|
|
125
|
-
scrollTo: arg => {
|
|
126
|
-
var _a;
|
|
127
|
-
return (_a = listRef.current) === null || _a === void 0 ? void 0 : _a.scrollTo(arg);
|
|
128
|
-
}
|
|
129
|
-
};
|
|
130
|
-
});
|
|
131
|
-
// ========================== Search Value ==========================
|
|
132
|
-
const mergedSearchValue = React.useMemo(() => {
|
|
133
|
-
var _a;
|
|
134
|
-
if (mode !== 'combobox') {
|
|
135
|
-
return searchValue;
|
|
136
|
-
}
|
|
137
|
-
const val = (_a = displayValues[0]) === null || _a === void 0 ? void 0 : _a.value;
|
|
138
|
-
return typeof val === 'string' || typeof val === 'number' ? String(val) : '';
|
|
139
|
-
}, [searchValue, mode, displayValues]);
|
|
140
|
-
// ========================== Custom Input ==========================
|
|
141
|
-
// Only works in `combobox`
|
|
142
|
-
const customizeInputElement = mode === 'combobox' && typeof getInputElement === 'function' && getInputElement() || null;
|
|
143
|
-
// Used for customize replacement for `rc-cascader`
|
|
144
|
-
const customizeRawInputElement = typeof getRawInputElement === 'function' && getRawInputElement();
|
|
145
|
-
const customizeRawInputRef = useComposeRef(selectorDomRef, (_a = customizeRawInputElement === null || customizeRawInputElement === void 0 ? void 0 : customizeRawInputElement.props) === null || _a === void 0 ? void 0 : _a.ref);
|
|
146
|
-
// ============================== Open ==============================
|
|
147
|
-
// SSR not support Portal which means we need delay `open` for the first time render
|
|
148
|
-
const [rendered, setRendered] = React.useState(false);
|
|
149
|
-
useLayoutEffect(() => {
|
|
150
|
-
setRendered(true);
|
|
151
|
-
}, []);
|
|
152
|
-
const [innerOpen, setInnerOpen] = useMergedState(false, {
|
|
153
|
-
defaultValue: defaultOpen,
|
|
154
|
-
value: open
|
|
155
|
-
});
|
|
156
|
-
let mergedOpen = rendered ? innerOpen : false;
|
|
157
|
-
// Not trigger `open` in `combobox` when `notFoundContent` is empty
|
|
158
|
-
const emptyListContent = !notFoundContent && emptyOptions;
|
|
159
|
-
if (disabled || emptyListContent && mergedOpen && mode === 'combobox') {
|
|
160
|
-
mergedOpen = false;
|
|
161
|
-
}
|
|
162
|
-
const triggerOpen = emptyListContent ? false : mergedOpen;
|
|
163
|
-
const onToggleOpen = React.useCallback(newOpen => {
|
|
164
|
-
const nextOpen = newOpen !== undefined ? newOpen : !mergedOpen;
|
|
165
|
-
if (!disabled) {
|
|
166
|
-
setInnerOpen(nextOpen);
|
|
167
|
-
if (mergedOpen !== nextOpen) {
|
|
168
|
-
onDropdownVisibleChange === null || onDropdownVisibleChange === void 0 ? void 0 : onDropdownVisibleChange(nextOpen);
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
}, [disabled, mergedOpen, setInnerOpen, onDropdownVisibleChange]);
|
|
172
|
-
// ============================= Search =============================
|
|
173
|
-
const tokenWithEnter = React.useMemo(() => (tokenSeparators || []).some(tokenSeparator => ['\n', '\r\n'].includes(tokenSeparator)), [tokenSeparators]);
|
|
174
|
-
const onInternalSearch = (searchText, fromTyping, isCompositing) => {
|
|
175
|
-
let ret = true;
|
|
176
|
-
let newSearchText = searchText;
|
|
177
|
-
onActiveValueChange === null || onActiveValueChange === void 0 ? void 0 : onActiveValueChange(null);
|
|
178
|
-
// Check if match the `tokenSeparators`
|
|
179
|
-
const patchLabels = isCompositing ? null : getSeparatedContent(searchText, tokenSeparators);
|
|
180
|
-
// Ignore combobox since it's not split-able
|
|
181
|
-
if (mode !== 'combobox' && patchLabels) {
|
|
182
|
-
newSearchText = '';
|
|
183
|
-
onSearchSplit === null || onSearchSplit === void 0 ? void 0 : onSearchSplit(patchLabels);
|
|
184
|
-
// Should close when paste finish
|
|
185
|
-
onToggleOpen(false);
|
|
186
|
-
// Tell Selector that break next actions
|
|
187
|
-
ret = false;
|
|
188
|
-
}
|
|
189
|
-
if (onSearch && mergedSearchValue !== newSearchText) {
|
|
190
|
-
onSearch(newSearchText, {
|
|
191
|
-
source: fromTyping ? 'typing' : 'effect'
|
|
192
|
-
});
|
|
193
|
-
}
|
|
194
|
-
return ret;
|
|
195
|
-
};
|
|
196
|
-
// Only triggered when menu is closed & mode is tags
|
|
197
|
-
// If menu is open, OptionList will take charge
|
|
198
|
-
// If mode isn't tags, press enter is not meaningful when you can't see any option
|
|
199
|
-
const onInternalSearchSubmit = searchText => {
|
|
200
|
-
// prevent empty tags from appearing when you click the Enter button
|
|
201
|
-
if (!searchText || !searchText.trim()) {
|
|
202
|
-
return;
|
|
203
|
-
}
|
|
204
|
-
onSearch(searchText, {
|
|
205
|
-
source: 'submit'
|
|
206
|
-
});
|
|
207
|
-
};
|
|
208
|
-
// Close will clean up single mode search text
|
|
209
|
-
React.useEffect(() => {
|
|
210
|
-
if (!mergedOpen && !multiple && mode !== 'combobox') {
|
|
211
|
-
onInternalSearch('', false, false);
|
|
212
|
-
}
|
|
213
|
-
}, [mergedOpen]);
|
|
214
|
-
// ============================ Disabled ============================
|
|
215
|
-
// Close dropdown & remove focus state when disabled change
|
|
216
|
-
React.useEffect(() => {
|
|
217
|
-
if (innerOpen && disabled) {
|
|
218
|
-
setInnerOpen(false);
|
|
219
|
-
}
|
|
220
|
-
// After onBlur is triggered, the focused does not need to be reset
|
|
221
|
-
if (disabled && !blurRef.current) {
|
|
222
|
-
setMockFocused(false);
|
|
223
|
-
}
|
|
224
|
-
}, [disabled]);
|
|
225
|
-
// ============================ Keyboard ============================
|
|
226
|
-
/**
|
|
227
|
-
* We record input value here to check if can press to clean up by backspace
|
|
228
|
-
* - null: Key is not down, this is reset by key up
|
|
229
|
-
* - true: Search text is empty when first time backspace down
|
|
230
|
-
* - false: Search text is not empty when first time backspace down
|
|
231
|
-
*/
|
|
232
|
-
const [getClearLock, setClearLock] = useLock();
|
|
233
|
-
// KeyDown
|
|
234
|
-
const onInternalKeyDown = (event, ...rest) => {
|
|
235
|
-
const clearLock = getClearLock();
|
|
236
|
-
const {
|
|
237
|
-
which
|
|
238
|
-
} = event;
|
|
239
|
-
if (which === KeyCode.ENTER) {
|
|
240
|
-
// Do not submit form when type in the input
|
|
241
|
-
if (mode !== 'combobox') {
|
|
242
|
-
event.preventDefault();
|
|
243
|
-
}
|
|
244
|
-
// We only manage open state here, close logic should handle by list component
|
|
245
|
-
if (!mergedOpen) {
|
|
246
|
-
onToggleOpen(true);
|
|
247
|
-
}
|
|
248
|
-
}
|
|
249
|
-
setClearLock(!!mergedSearchValue);
|
|
250
|
-
// Remove value by `backspace`
|
|
251
|
-
if (which === KeyCode.BACKSPACE && !clearLock && multiple && !mergedSearchValue && displayValues.length) {
|
|
252
|
-
const cloneDisplayValues = [...displayValues];
|
|
253
|
-
let removedDisplayValue = null;
|
|
254
|
-
for (let i = cloneDisplayValues.length - 1; i >= 0; i -= 1) {
|
|
255
|
-
const current = cloneDisplayValues[i];
|
|
256
|
-
if (!current.disabled) {
|
|
257
|
-
cloneDisplayValues.splice(i, 1);
|
|
258
|
-
removedDisplayValue = current;
|
|
259
|
-
break;
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
if (removedDisplayValue) {
|
|
263
|
-
onDisplayValuesChange(cloneDisplayValues, {
|
|
264
|
-
type: 'remove',
|
|
265
|
-
values: [removedDisplayValue]
|
|
266
|
-
});
|
|
267
|
-
}
|
|
268
|
-
}
|
|
269
|
-
if (mergedOpen && listRef.current) {
|
|
270
|
-
listRef.current.onKeyDown(event, ...rest);
|
|
271
|
-
}
|
|
272
|
-
onKeyDown === null || onKeyDown === void 0 ? void 0 : onKeyDown(event, ...rest);
|
|
273
|
-
};
|
|
274
|
-
// KeyUp
|
|
275
|
-
const onInternalKeyUp = (event, ...rest) => {
|
|
276
|
-
if (mergedOpen && listRef.current) {
|
|
277
|
-
listRef.current.onKeyUp(event, ...rest);
|
|
278
|
-
}
|
|
279
|
-
onKeyUp === null || onKeyUp === void 0 ? void 0 : onKeyUp(event, ...rest);
|
|
280
|
-
};
|
|
281
|
-
// ============================ Selector ============================
|
|
282
|
-
const onSelectorRemove = val => {
|
|
283
|
-
const newValues = displayValues.filter(i => i !== val);
|
|
284
|
-
onDisplayValuesChange(newValues, {
|
|
285
|
-
type: 'remove',
|
|
286
|
-
values: [val]
|
|
287
|
-
});
|
|
288
|
-
};
|
|
289
|
-
// ========================== Focus / Blur ==========================
|
|
290
|
-
/** Record real focus status */
|
|
291
|
-
const focusRef = React.useRef(false);
|
|
292
|
-
const onContainerFocus = (...args) => {
|
|
293
|
-
setMockFocused(true);
|
|
294
|
-
if (!disabled) {
|
|
295
|
-
if (onFocus && !focusRef.current) {
|
|
296
|
-
onFocus(...args);
|
|
297
|
-
}
|
|
298
|
-
// `showAction` should handle `focus` if set
|
|
299
|
-
if (showAction.includes('focus')) {
|
|
300
|
-
onToggleOpen(true);
|
|
301
|
-
}
|
|
302
|
-
}
|
|
303
|
-
focusRef.current = true;
|
|
304
|
-
};
|
|
305
|
-
const onContainerBlur = (...args) => {
|
|
306
|
-
blurRef.current = true;
|
|
307
|
-
setMockFocused(false, () => {
|
|
308
|
-
focusRef.current = false;
|
|
309
|
-
blurRef.current = false;
|
|
310
|
-
onToggleOpen(false);
|
|
311
|
-
});
|
|
312
|
-
if (disabled) {
|
|
313
|
-
return;
|
|
314
|
-
}
|
|
315
|
-
if (mergedSearchValue) {
|
|
316
|
-
// `tags` mode should move `searchValue` into values
|
|
317
|
-
if (mode === 'tags') {
|
|
318
|
-
onSearch(mergedSearchValue, {
|
|
319
|
-
source: 'submit'
|
|
320
|
-
});
|
|
321
|
-
} else if (mode === 'multiple') {
|
|
322
|
-
// `multiple` mode only clean the search value but not trigger event
|
|
323
|
-
onSearch('', {
|
|
324
|
-
source: 'blur'
|
|
325
|
-
});
|
|
326
|
-
}
|
|
327
|
-
}
|
|
328
|
-
if (onBlur) {
|
|
329
|
-
onBlur(...args);
|
|
330
|
-
}
|
|
331
|
-
};
|
|
332
|
-
// Give focus back of Select
|
|
333
|
-
const activeTimeoutIds = [];
|
|
334
|
-
React.useEffect(() => () => {
|
|
335
|
-
activeTimeoutIds.forEach(timeoutId => clearTimeout(timeoutId));
|
|
336
|
-
activeTimeoutIds.splice(0, activeTimeoutIds.length);
|
|
337
|
-
}, []);
|
|
338
|
-
const onInternalMouseDown = (event, ...restArgs) => {
|
|
339
|
-
var _a;
|
|
340
|
-
const {
|
|
341
|
-
target
|
|
342
|
-
} = event;
|
|
343
|
-
const popupElement = (_a = triggerRef.current) === null || _a === void 0 ? void 0 : _a.getPopupElement();
|
|
344
|
-
// We should give focus back to selector if clicked item is not focusable
|
|
345
|
-
if (popupElement && popupElement.contains(target)) {
|
|
346
|
-
const timeoutId = setTimeout(() => {
|
|
347
|
-
var _a;
|
|
348
|
-
const index = activeTimeoutIds.indexOf(timeoutId);
|
|
349
|
-
if (index !== -1) {
|
|
350
|
-
activeTimeoutIds.splice(index, 1);
|
|
351
|
-
}
|
|
352
|
-
cancelSetMockFocused();
|
|
353
|
-
if (!mobile && !popupElement.contains(document.activeElement)) {
|
|
354
|
-
(_a = selectorRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
355
|
-
}
|
|
356
|
-
});
|
|
357
|
-
activeTimeoutIds.push(timeoutId);
|
|
358
|
-
}
|
|
359
|
-
onMouseDown === null || onMouseDown === void 0 ? void 0 : onMouseDown(event, ...restArgs);
|
|
360
|
-
};
|
|
361
|
-
// ============================ Dropdown ============================
|
|
362
|
-
const [, forceUpdate] = React.useState({});
|
|
363
|
-
// We need force update here since popup dom is render async
|
|
364
|
-
function onPopupMouseEnter() {
|
|
365
|
-
forceUpdate({});
|
|
366
|
-
}
|
|
367
|
-
// Used for raw custom input trigger
|
|
368
|
-
let onTriggerVisibleChange;
|
|
369
|
-
if (customizeRawInputElement) {
|
|
370
|
-
onTriggerVisibleChange = newOpen => {
|
|
371
|
-
onToggleOpen(newOpen);
|
|
372
|
-
};
|
|
373
|
-
}
|
|
374
|
-
// Close when click on non-select element
|
|
375
|
-
useSelectTriggerControl(() => {
|
|
376
|
-
var _a;
|
|
377
|
-
return [containerRef.current, (_a = triggerRef.current) === null || _a === void 0 ? void 0 : _a.getPopupElement()];
|
|
378
|
-
}, triggerOpen, onToggleOpen, !!customizeRawInputElement);
|
|
379
|
-
// ============================ Context =============================
|
|
380
|
-
const baseSelectContext = React.useMemo(() => Object.assign(Object.assign({}, props), {
|
|
381
|
-
notFoundContent,
|
|
382
|
-
open: mergedOpen,
|
|
383
|
-
triggerOpen,
|
|
384
|
-
id,
|
|
385
|
-
showSearch: mergedShowSearch,
|
|
386
|
-
multiple,
|
|
387
|
-
toggleOpen: onToggleOpen
|
|
388
|
-
}), [props, notFoundContent, triggerOpen, mergedOpen, id, mergedShowSearch, multiple, onToggleOpen]);
|
|
389
|
-
// ==================================================================
|
|
390
|
-
// == Render ==
|
|
391
|
-
// ==================================================================
|
|
392
|
-
// ============================= Arrow ==============================
|
|
393
|
-
const showSuffixIcon = !!suffixIcon || loading;
|
|
394
|
-
let arrowNode;
|
|
395
|
-
if (showSuffixIcon) {
|
|
396
|
-
arrowNode = React.createElement(TransBtn, {
|
|
397
|
-
className: classNames(`${prefixCls}-arrow`, {
|
|
398
|
-
[`${prefixCls}-arrow-loading`]: loading
|
|
399
|
-
}),
|
|
400
|
-
customizeIcon: suffixIcon,
|
|
401
|
-
customizeIconProps: {
|
|
402
|
-
loading,
|
|
403
|
-
searchValue: mergedSearchValue,
|
|
404
|
-
open: mergedOpen,
|
|
405
|
-
focused: mockFocused,
|
|
406
|
-
showSearch: mergedShowSearch
|
|
407
|
-
}
|
|
408
|
-
});
|
|
409
|
-
}
|
|
410
|
-
// ============================= Clear ==============================
|
|
411
|
-
const onClearMouseDown = () => {
|
|
412
|
-
var _a;
|
|
413
|
-
onClear === null || onClear === void 0 ? void 0 : onClear();
|
|
414
|
-
(_a = selectorRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
415
|
-
onDisplayValuesChange([], {
|
|
416
|
-
type: 'clear',
|
|
417
|
-
values: displayValues
|
|
418
|
-
});
|
|
419
|
-
onInternalSearch('', false, false);
|
|
420
|
-
};
|
|
421
|
-
const {
|
|
422
|
-
allowClear: mergedAllowClear,
|
|
423
|
-
clearIcon: clearNode
|
|
424
|
-
} = useAllowClear(prefixCls, onClearMouseDown, displayValues, allowClear, clearIcon, disabled, mergedSearchValue, mode);
|
|
425
|
-
// =========================== OptionList ===========================
|
|
426
|
-
const optionList = React.createElement(OptionList, {
|
|
427
|
-
ref: listRef
|
|
428
|
-
});
|
|
429
|
-
// ============================= Select =============================
|
|
430
|
-
const mergedClassName = classNames(prefixCls, className, {
|
|
431
|
-
[`${prefixCls}-focused`]: mockFocused,
|
|
432
|
-
[`${prefixCls}-multiple`]: multiple,
|
|
433
|
-
[`${prefixCls}-single`]: !multiple,
|
|
434
|
-
[`${prefixCls}-allow-clear`]: allowClear,
|
|
435
|
-
[`${prefixCls}-show-arrow`]: showSuffixIcon,
|
|
436
|
-
[`${prefixCls}-disabled`]: disabled,
|
|
437
|
-
[`${prefixCls}-loading`]: loading,
|
|
438
|
-
[`${prefixCls}-open`]: mergedOpen,
|
|
439
|
-
[`${prefixCls}-customize-input`]: customizeInputElement,
|
|
440
|
-
[`${prefixCls}-show-search`]: mergedShowSearch
|
|
441
|
-
});
|
|
442
|
-
// >>> Selector
|
|
443
|
-
const selectorNode = React.createElement(SelectTrigger, {
|
|
444
|
-
ref: triggerRef,
|
|
445
|
-
disabled: disabled,
|
|
446
|
-
prefixCls: prefixCls,
|
|
447
|
-
visible: triggerOpen,
|
|
448
|
-
popupElement: optionList,
|
|
449
|
-
animation: animation,
|
|
450
|
-
transitionName: transitionName,
|
|
451
|
-
dropdownStyle: dropdownStyle,
|
|
452
|
-
dropdownClassName: dropdownClassName,
|
|
453
|
-
direction: direction,
|
|
454
|
-
dropdownMatchSelectWidth: dropdownMatchSelectWidth,
|
|
455
|
-
dropdownRender: dropdownRender,
|
|
456
|
-
dropdownAlign: dropdownAlign,
|
|
457
|
-
placement: placement,
|
|
458
|
-
builtinPlacements: builtinPlacements,
|
|
459
|
-
getPopupContainer: getPopupContainer,
|
|
460
|
-
empty: emptyOptions,
|
|
461
|
-
getTriggerDOMNode: () => selectorDomRef.current,
|
|
462
|
-
onPopupVisibleChange: onTriggerVisibleChange,
|
|
463
|
-
onPopupMouseEnter: onPopupMouseEnter
|
|
464
|
-
}, customizeRawInputElement ? React.cloneElement(customizeRawInputElement, {
|
|
465
|
-
ref: customizeRawInputRef
|
|
466
|
-
}) : React.createElement(Selector, Object.assign({}, props, {
|
|
467
|
-
domRef: selectorDomRef,
|
|
468
|
-
prefixCls: prefixCls,
|
|
469
|
-
inputElement: customizeInputElement,
|
|
470
|
-
ref: selectorRef,
|
|
471
|
-
id: id,
|
|
472
|
-
showSearch: mergedShowSearch,
|
|
473
|
-
autoClearSearchValue: autoClearSearchValue,
|
|
474
|
-
mode: mode,
|
|
475
|
-
activeDescendantId: activeDescendantId,
|
|
476
|
-
tagRender: tagRender,
|
|
477
|
-
values: displayValues,
|
|
478
|
-
open: mergedOpen,
|
|
479
|
-
onToggleOpen: onToggleOpen,
|
|
480
|
-
activeValue: activeValue,
|
|
481
|
-
searchValue: mergedSearchValue,
|
|
482
|
-
onSearch: onInternalSearch,
|
|
483
|
-
onSearchSubmit: onInternalSearchSubmit,
|
|
484
|
-
onRemove: onSelectorRemove,
|
|
485
|
-
tokenWithEnter: tokenWithEnter
|
|
486
|
-
})));
|
|
487
|
-
// >>> Render
|
|
488
|
-
let renderNode;
|
|
489
|
-
// Render raw
|
|
490
|
-
if (customizeRawInputElement) {
|
|
491
|
-
renderNode = selectorNode;
|
|
492
|
-
} else {
|
|
493
|
-
renderNode = React.createElement("div", Object.assign({
|
|
494
|
-
className: mergedClassName
|
|
495
|
-
}, domProps, {
|
|
496
|
-
ref: containerRef,
|
|
497
|
-
onMouseDown: onInternalMouseDown,
|
|
498
|
-
onKeyDown: onInternalKeyDown,
|
|
499
|
-
onKeyUp: onInternalKeyUp,
|
|
500
|
-
onFocus: onContainerFocus,
|
|
501
|
-
onBlur: onContainerBlur
|
|
502
|
-
}), mockFocused && !mergedOpen && React.createElement("span", {
|
|
503
|
-
style: {
|
|
504
|
-
width: 0,
|
|
505
|
-
height: 0,
|
|
506
|
-
position: 'absolute',
|
|
507
|
-
overflow: 'hidden',
|
|
508
|
-
opacity: 0
|
|
509
|
-
},
|
|
510
|
-
"aria-live": "polite"
|
|
511
|
-
}, `${displayValues.map(({
|
|
512
|
-
label,
|
|
513
|
-
value
|
|
514
|
-
}) => ['number', 'string'].includes(typeof label) ? label : value).join(', ')}`), selectorNode, arrowNode, mergedAllowClear && clearNode);
|
|
515
|
-
}
|
|
516
|
-
return React.createElement(BaseSelectContext.Provider, {
|
|
517
|
-
value: baseSelectContext
|
|
518
|
-
}, renderNode);
|
|
519
|
-
});
|
|
520
|
-
// Set display name for dev
|
|
521
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
522
|
-
BaseSelect.displayName = 'BaseSelect';
|
|
523
|
-
}
|
|
524
|
-
export default BaseSelect;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"BaseSelect.js","sourceRoot":"","sources":["../../../src/tntd-select/rc-select/BaseSelect.tsx"],"names":[],"mappings":";;;;;;;;;;;AACA,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,eAAe,MAAM,mCAAmC,CAAC;AAChE,OAAO,cAAc,MAAM,kCAAkC,CAAC;AAC9D,OAAO,QAAQ,MAAM,sBAAsB,CAAC;AAC5C,OAAO,OAAO,MAAM,qBAAqB,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,aAAa,MAAM,uBAAuB,CAAC;AAClD,OAAO,OAAO,MAAM,iBAAiB,CAAC;AACtC,OAAO,uBAAuB,MAAM,iCAAiC,CAAC;AAWtE,OAAO,QAAQ,MAAM,YAAY,CAAC;AAElC,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAC5C,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAYxD,MAAM,kBAAkB,GAAG;IACzB,OAAO;IACP,UAAU;IACV,YAAY;IACZ,aAAa;IACb,WAAW;IACX,aAAa;IACb,kBAAkB;IAClB,mBAAmB;IACnB,sBAAsB;IACtB,gBAAgB;IAChB,eAAe;IACf,UAAU;CACF,CAAC;AA0JX,MAAM,UAAU,UAAU,CAAC,IAAU;IACnC,OAAO,IAAI,KAAK,MAAM,IAAI,IAAI,KAAK,UAAU,CAAC;AAChD,CAAC;AAED,MAAM,UAAU,GAAG,KAAK,CAAC,UAAU,CAAC,CAAC,KAAsB,EAAE,GAA6B,EA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AAW,GAAG,YAAY,CAAC;CACvC;AAED,eAAe,UAAU,CAAC","sourcesContent":["import type { AlignType, BuildInPlacements } from '@rc-component/trigger/lib/interface';\nimport classNames from 'classnames';\nimport useLayoutEffect from 'rc-util/lib/hooks/useLayoutEffect';\nimport useMergedState from 'rc-util/lib/hooks/useMergedState';\nimport isMobile from 'rc-util/lib/isMobile';\nimport KeyCode from 'rc-util/lib/KeyCode';\nimport { useComposeRef } from 'rc-util/lib/ref';\nimport type { ScrollConfig, ScrollTo } from 'rc-virtual-list/lib/List';\nimport * as React from 'react';\nimport { useAllowClear } from './hooks/useAllowClear';\nimport { BaseSelectContext } from './hooks/useBaseProps';\nimport useDelayReset from './hooks/useDelayReset';\nimport useLock from './hooks/useLock';\nimport useSelectTriggerControl from './hooks/useSelectTriggerControl';\nimport type {\n DisplayInfoType,\n DisplayValueType,\n Mode,\n Placement,\n RawValueType,\n RenderDOMFunc,\n RenderNode,\n} from './interface';\nimport type { RefSelectorProps } from './Selector';\nimport Selector from './Selector';\nimport type { RefTriggerProps } from './SelectTrigger';\nimport SelectTrigger from './SelectTrigger';\nimport TransBtn from './TransBtn';\nimport { getSeparatedContent } from './utils/valueUtil';\n\nexport type {\n DisplayInfoType,\n DisplayValueType,\n Mode,\n Placement,\n RenderDOMFunc,\n RenderNode,\n RawValueType,\n};\n\nconst DEFAULT_OMIT_PROPS = [\n 'value',\n 'onChange',\n 'removeIcon',\n 'placeholder',\n 'autoFocus',\n 'maxTagCount',\n 'maxTagTextLength',\n 'maxTagPlaceholder',\n 'choiceTransitionName',\n 'onInputKeyDown',\n 'onPopupScroll',\n 'tabIndex',\n] as const;\nexport interface RefOptionListProps {\n onKeyDown: React.KeyboardEventHandler;\n onKeyUp: React.KeyboardEventHandler;\n scrollTo?: (args: number | ScrollConfig) => void;\n}\n\nexport type CustomTagProps = {\n label: React.ReactNode;\n value: any;\n disabled: boolean;\n onClose: (event?: React.MouseEvent<HTMLElement, MouseEvent>) => void;\n closable: boolean;\n};\n\nexport interface BaseSelectRef {\n focus: () => void;\n blur: () => void;\n scrollTo: ScrollTo;\n}\n\nexport interface BaseSelectPrivateProps {\n // >>> MISC\n id: string;\n prefixCls: string;\n omitDomProps?: string[];\n\n // >>> Value\n displayValues: DisplayValueType[];\n onDisplayValuesChange: (\n values: DisplayValueType[],\n info: {\n type: DisplayInfoType;\n values: DisplayValueType[];\n },\n ) => void;\n\n // >>> Active\n /** Current dropdown list active item string value */\n activeValue?: string;\n /** Link search input with target element */\n activeDescendantId?: string;\n onActiveValueChange?: (value: string | null) => void;\n\n // >>> Search\n searchValue: string;\n autoClearSearchValue?: boolean;\n /** Trigger onSearch, return false to prevent trigger open event */\n onSearch: (\n searchValue: string,\n info: {\n source:\n | 'typing' //User typing\n | 'effect' // Code logic trigger\n | 'submit' // tag mode only\n | 'blur'; // Not trigger event\n },\n ) => void;\n /** Trigger when search text match the `tokenSeparators`. Will provide split content */\n onSearchSplit?: (words: string[]) => void;\n\n // >>> Dropdown\n OptionList: React.ForwardRefExoticComponent<\n React.PropsWithoutRef<any> & React.RefAttributes<RefOptionListProps>\n >;\n /** Tell if provided `options` is empty */\n emptyOptions: boolean;\n}\n\nexport type BaseSelectPropsWithoutPrivate = Omit<BaseSelectProps, keyof BaseSelectPrivateProps>;\n\nexport interface BaseSelectProps extends BaseSelectPrivateProps, React.AriaAttributes {\n className?: string;\n style?: React.CSSProperties;\n title?: string;\n showSearch?: boolean;\n tagRender?: (props: CustomTagProps) => React.ReactElement;\n direction?: 'ltr' | 'rtl';\n maxLength?: number;\n\n // MISC\n tabIndex?: number;\n autoFocus?: boolean;\n notFoundContent?: React.ReactNode;\n placeholder?: React.ReactNode;\n onClear?: () => void;\n\n choiceTransitionName?: string;\n\n // >>> Mode\n mode?: Mode;\n\n // >>> Status\n disabled?: boolean;\n loading?: boolean;\n\n // >>> Open\n open?: boolean;\n defaultOpen?: boolean;\n onDropdownVisibleChange?: (open: boolean) => void;\n\n // >>> Customize Input\n /** @private Internal usage. Do not use in your production. */\n getInputElement?: () => JSX.Element;\n /** @private Internal usage. Do not use in your production. */\n getRawInputElement?: () => JSX.Element;\n\n // >>> Selector\n maxTagTextLength?: number;\n maxTagCount?: number | 'responsive';\n maxTagPlaceholder?: React.ReactNode | ((omittedValues: DisplayValueType[]) => React.ReactNode);\n\n // >>> Search\n tokenSeparators?: string[];\n\n // >>> Icons\n allowClear?: boolean | { clearIcon?: RenderNode };\n suffixIcon?: RenderNode;\n /**\n * Clear all icon\n * @deprecated Please use `allowClear` instead\n **/\n clearIcon?: RenderNode;\n /** Selector remove icon */\n removeIcon?: RenderNode;\n\n // >>> Dropdown\n animation?: string;\n transitionName?: string;\n dropdownStyle?: React.CSSProperties;\n dropdownClassName?: string;\n dropdownMatchSelectWidth?: boolean | number;\n dropdownRender?: (menu: React.ReactElement) => React.ReactElement;\n dropdownAlign?: AlignType;\n placement?: Placement;\n builtinPlacements?: BuildInPlacements;\n getPopupContainer?: RenderDOMFunc;\n\n // >>> Focus\n showAction?: ('focus' | 'click')[];\n onBlur?: React.FocusEventHandler<HTMLElement>;\n onFocus?: React.FocusEventHandler<HTMLElement>;\n\n // >>> Rest Events\n onKeyUp?: React.KeyboardEventHandler<HTMLDivElement>;\n onKeyDown?: React.KeyboardEventHandler<HTMLDivElement>;\n onMouseDown?: React.MouseEventHandler<HTMLDivElement>;\n onPopupScroll?: React.UIEventHandler<HTMLDivElement>;\n onInputKeyDown?: React.KeyboardEventHandler<HTMLInputElement | HTMLTextAreaElement>;\n onMouseEnter?: React.MouseEventHandler<HTMLDivElement>;\n onMouseLeave?: React.MouseEventHandler<HTMLDivElement>;\n onClick?: React.MouseEventHandler<HTMLDivElement>;\n}\n\nexport function isMultiple(mode: Mode) {\n return mode === 'tags' || mode === 'multiple';\n}\n\nconst BaseSelect = React.forwardRef((props: BaseSelectProps, ref: React.Ref<BaseSelectRef>) => {\n const {\n id,\n prefixCls,\n className,\n showSearch,\n tagRender,\n direction,\n omitDomProps,\n\n // Value\n displayValues,\n onDisplayValuesChange,\n emptyOptions,\n notFoundContent = 'Not Found',\n onClear,\n\n // Mode\n mode,\n\n // Status\n disabled,\n loading,\n\n // Customize Input\n getInputElement,\n getRawInputElement,\n\n // Open\n open,\n defaultOpen,\n onDropdownVisibleChange,\n\n // Active\n activeValue,\n onActiveValueChange,\n activeDescendantId,\n\n // Search\n searchValue,\n autoClearSearchValue,\n onSearch,\n onSearchSplit,\n tokenSeparators,\n\n // Icons\n allowClear,\n suffixIcon,\n clearIcon,\n\n // Dropdown\n OptionList,\n animation,\n transitionName,\n dropdownStyle,\n dropdownClassName,\n dropdownMatchSelectWidth,\n dropdownRender,\n dropdownAlign,\n placement,\n builtinPlacements,\n getPopupContainer,\n\n // Focus\n showAction = [],\n onFocus,\n onBlur,\n\n // Rest Events\n onKeyUp,\n onKeyDown,\n onMouseDown,\n\n // Rest Props\n ...restProps\n } = props;\n\n // ============================== MISC ==============================\n const multiple = isMultiple(mode);\n const mergedShowSearch =\n (showSearch !== undefined ? showSearch : multiple) || mode === 'combobox';\n\n const domProps = {\n ...restProps,\n } as Omit<keyof typeof restProps, (typeof DEFAULT_OMIT_PROPS)[number]>;\n\n DEFAULT_OMIT_PROPS.forEach((propName) => {\n delete domProps[propName];\n });\n\n omitDomProps?.forEach((propName) => {\n delete domProps[propName];\n });\n\n // ============================= Mobile =============================\n const [mobile, setMobile] = React.useState(false);\n React.useEffect(() => {\n // Only update on the client side\n setMobile(isMobile());\n }, []);\n\n // ============================== Refs ==============================\n const containerRef = React.useRef<HTMLDivElement>(null);\n const selectorDomRef = React.useRef<HTMLDivElement>(null);\n const triggerRef = React.useRef<RefTriggerProps>(null);\n const selectorRef = React.useRef<RefSelectorProps>(null);\n const listRef = React.useRef<RefOptionListProps>(null);\n const blurRef = React.useRef<boolean>(false);\n\n /** Used for component focused management */\n const [mockFocused, setMockFocused, cancelSetMockFocused] = useDelayReset();\n\n // =========================== Imperative ===========================\n React.useImperativeHandle(ref, () => ({\n focus: selectorRef.current?.focus,\n blur: selectorRef.current?.blur,\n scrollTo: (arg) => listRef.current?.scrollTo(arg),\n }));\n\n // ========================== Search Value ==========================\n const mergedSearchValue = React.useMemo(() => {\n if (mode !== 'combobox') {\n return searchValue;\n }\n\n const val = displayValues[0]?.value;\n\n return typeof val === 'string' || typeof val === 'number' ? String(val) : '';\n }, [searchValue, mode, displayValues]);\n\n // ========================== Custom Input ==========================\n // Only works in `combobox`\n const customizeInputElement: React.ReactElement =\n (mode === 'combobox' && typeof getInputElement === 'function' && getInputElement()) || null;\n\n // Used for customize replacement for `rc-cascader`\n const customizeRawInputElement: React.ReactElement =\n typeof getRawInputElement === 'function' && getRawInputElement();\n\n const customizeRawInputRef = useComposeRef<HTMLElement>(\n selectorDomRef,\n customizeRawInputElement?.props?.ref,\n );\n\n // ============================== Open ==============================\n // SSR not support Portal which means we need delay `open` for the first time render\n const [rendered, setRendered] = React.useState(false);\n useLayoutEffect(() => {\n setRendered(true);\n }, []);\n\n const [innerOpen, setInnerOpen] = useMergedState<boolean>(false, {\n defaultValue: defaultOpen,\n value: open,\n });\n\n let mergedOpen = rendered ? innerOpen : false;\n\n // Not trigger `open` in `combobox` when `notFoundContent` is empty\n const emptyListContent = !notFoundContent && emptyOptions;\n if (disabled || (emptyListContent && mergedOpen && mode === 'combobox')) {\n mergedOpen = false;\n }\n const triggerOpen = emptyListContent ? false : mergedOpen;\n\n const onToggleOpen = React.useCallback(\n (newOpen?: boolean) => {\n const nextOpen = newOpen !== undefined ? newOpen : !mergedOpen;\n\n if (!disabled) {\n setInnerOpen(nextOpen);\n\n if (mergedOpen !== nextOpen) {\n onDropdownVisibleChange?.(nextOpen);\n }\n }\n },\n [disabled, mergedOpen, setInnerOpen, onDropdownVisibleChange],\n );\n\n // ============================= Search =============================\n const tokenWithEnter = React.useMemo(\n () => (tokenSeparators || []).some((tokenSeparator) => ['\\n', '\\r\\n'].includes(tokenSeparator)),\n [tokenSeparators],\n );\n\n const onInternalSearch = (searchText: string, fromTyping: boolean, isCompositing: boolean) => {\n let ret = true;\n let newSearchText = searchText;\n onActiveValueChange?.(null);\n\n // Check if match the `tokenSeparators`\n const patchLabels: string[] = isCompositing\n ? null\n : getSeparatedContent(searchText, tokenSeparators);\n\n // Ignore combobox since it's not split-able\n if (mode !== 'combobox' && patchLabels) {\n newSearchText = '';\n\n onSearchSplit?.(patchLabels);\n\n // Should close when paste finish\n onToggleOpen(false);\n\n // Tell Selector that break next actions\n ret = false;\n }\n\n if (onSearch && mergedSearchValue !== newSearchText) {\n onSearch(newSearchText, {\n source: fromTyping ? 'typing' : 'effect',\n });\n }\n\n return ret;\n };\n\n // Only triggered when menu is closed & mode is tags\n // If menu is open, OptionList will take charge\n // If mode isn't tags, press enter is not meaningful when you can't see any option\n const onInternalSearchSubmit = (searchText: string) => {\n // prevent empty tags from appearing when you click the Enter button\n if (!searchText || !searchText.trim()) {\n return;\n }\n onSearch(searchText, { source: 'submit' });\n };\n\n // Close will clean up single mode search text\n React.useEffect(() => {\n if (!mergedOpen && !multiple && mode !== 'combobox') {\n onInternalSearch('', false, false);\n }\n }, [mergedOpen]);\n\n // ============================ Disabled ============================\n // Close dropdown & remove focus state when disabled change\n React.useEffect(() => {\n if (innerOpen && disabled) {\n setInnerOpen(false);\n }\n\n // After onBlur is triggered, the focused does not need to be reset\n if (disabled && !blurRef.current) {\n setMockFocused(false);\n }\n }, [disabled]);\n\n // ============================ Keyboard ============================\n /**\n * We record input value here to check if can press to clean up by backspace\n * - null: Key is not down, this is reset by key up\n * - true: Search text is empty when first time backspace down\n * - false: Search text is not empty when first time backspace down\n */\n const [getClearLock, setClearLock] = useLock();\n\n // KeyDown\n const onInternalKeyDown: React.KeyboardEventHandler<HTMLDivElement> = (event, ...rest) => {\n const clearLock = getClearLock();\n const { which } = event;\n\n if (which === KeyCode.ENTER) {\n // Do not submit form when type in the input\n if (mode !== 'combobox') {\n event.preventDefault();\n }\n\n // We only manage open state here, close logic should handle by list component\n if (!mergedOpen) {\n onToggleOpen(true);\n }\n }\n\n setClearLock(!!mergedSearchValue);\n\n // Remove value by `backspace`\n if (\n which === KeyCode.BACKSPACE &&\n !clearLock &&\n multiple &&\n !mergedSearchValue &&\n displayValues.length\n ) {\n const cloneDisplayValues = [...displayValues];\n let removedDisplayValue = null;\n\n for (let i = cloneDisplayValues.length - 1; i >= 0; i -= 1) {\n const current = cloneDisplayValues[i];\n\n if (!current.disabled) {\n cloneDisplayValues.splice(i, 1);\n removedDisplayValue = current;\n break;\n }\n }\n\n if (removedDisplayValue) {\n onDisplayValuesChange(cloneDisplayValues, {\n type: 'remove',\n values: [removedDisplayValue],\n });\n }\n }\n\n if (mergedOpen && listRef.current) {\n listRef.current.onKeyDown(event, ...rest);\n }\n\n onKeyDown?.(event, ...rest);\n };\n\n // KeyUp\n const onInternalKeyUp: React.KeyboardEventHandler<HTMLDivElement> = (event, ...rest) => {\n if (mergedOpen && listRef.current) {\n listRef.current.onKeyUp(event, ...rest);\n }\n\n onKeyUp?.(event, ...rest);\n };\n\n // ============================ Selector ============================\n const onSelectorRemove = (val: DisplayValueType) => {\n const newValues = displayValues.filter((i) => i !== val);\n\n onDisplayValuesChange(newValues, {\n type: 'remove',\n values: [val],\n });\n };\n\n // ========================== Focus / Blur ==========================\n /** Record real focus status */\n const focusRef = React.useRef<boolean>(false);\n\n const onContainerFocus: React.FocusEventHandler<HTMLElement> = (...args) => {\n setMockFocused(true);\n\n if (!disabled) {\n if (onFocus && !focusRef.current) {\n onFocus(...args);\n }\n\n // `showAction` should handle `focus` if set\n if (showAction.includes('focus')) {\n onToggleOpen(true);\n }\n }\n\n focusRef.current = true;\n };\n\n const onContainerBlur: React.FocusEventHandler<HTMLElement> = (...args) => {\n blurRef.current = true;\n\n setMockFocused(false, () => {\n focusRef.current = false;\n blurRef.current = false;\n onToggleOpen(false);\n });\n\n if (disabled) {\n return;\n }\n\n if (mergedSearchValue) {\n // `tags` mode should move `searchValue` into values\n if (mode === 'tags') {\n onSearch(mergedSearchValue, { source: 'submit' });\n } else if (mode === 'multiple') {\n // `multiple` mode only clean the search value but not trigger event\n onSearch('', {\n source: 'blur',\n });\n }\n }\n\n if (onBlur) {\n onBlur(...args);\n }\n };\n\n // Give focus back of Select\n const activeTimeoutIds: any[] = [];\n React.useEffect(\n () => () => {\n activeTimeoutIds.forEach((timeoutId) => clearTimeout(timeoutId));\n activeTimeoutIds.splice(0, activeTimeoutIds.length);\n },\n [],\n );\n\n const onInternalMouseDown: React.MouseEventHandler<HTMLDivElement> = (event, ...restArgs) => {\n const { target } = event;\n const popupElement: HTMLDivElement = triggerRef.current?.getPopupElement();\n\n // We should give focus back to selector if clicked item is not focusable\n if (popupElement && popupElement.contains(target as HTMLElement)) {\n const timeoutId = setTimeout(() => {\n const index = activeTimeoutIds.indexOf(timeoutId);\n if (index !== -1) {\n activeTimeoutIds.splice(index, 1);\n }\n\n cancelSetMockFocused();\n\n if (!mobile && !popupElement.contains(document.activeElement)) {\n selectorRef.current?.focus();\n }\n });\n\n activeTimeoutIds.push(timeoutId);\n }\n\n onMouseDown?.(event, ...restArgs);\n };\n\n // ============================ Dropdown ============================\n const [, forceUpdate] = React.useState({});\n // We need force update here since popup dom is render async\n function onPopupMouseEnter() {\n forceUpdate({});\n }\n\n // Used for raw custom input trigger\n let onTriggerVisibleChange: null | ((newOpen: boolean) => void);\n if (customizeRawInputElement) {\n onTriggerVisibleChange = (newOpen: boolean) => {\n onToggleOpen(newOpen);\n };\n }\n\n // Close when click on non-select element\n useSelectTriggerControl(\n () => [containerRef.current, triggerRef.current?.getPopupElement()],\n triggerOpen,\n onToggleOpen,\n !!customizeRawInputElement,\n );\n\n // ============================ Context =============================\n const baseSelectContext = React.useMemo(\n () => ({\n ...props,\n notFoundContent,\n open: mergedOpen,\n triggerOpen,\n id,\n showSearch: mergedShowSearch,\n multiple,\n toggleOpen: onToggleOpen,\n }),\n [props, notFoundContent, triggerOpen, mergedOpen, id, mergedShowSearch, multiple, onToggleOpen],\n );\n\n // ==================================================================\n // == Render ==\n // ==================================================================\n\n // ============================= Arrow ==============================\n const showSuffixIcon = !!suffixIcon || loading;\n let arrowNode: React.ReactNode;\n\n if (showSuffixIcon) {\n arrowNode = (\n <TransBtn\n className={classNames(`${prefixCls}-arrow`, {\n [`${prefixCls}-arrow-loading`]: loading,\n })}\n customizeIcon={suffixIcon}\n customizeIconProps={{\n loading,\n searchValue: mergedSearchValue,\n open: mergedOpen,\n focused: mockFocused,\n showSearch: mergedShowSearch,\n }}\n />\n );\n }\n\n // ============================= Clear ==============================\n const onClearMouseDown: React.MouseEventHandler<HTMLSpanElement> = () => {\n onClear?.();\n\n selectorRef.current?.focus();\n\n onDisplayValuesChange([], {\n type: 'clear',\n values: displayValues,\n });\n onInternalSearch('', false, false);\n };\n\n const { allowClear: mergedAllowClear, clearIcon: clearNode } = useAllowClear(\n prefixCls,\n onClearMouseDown,\n displayValues,\n allowClear,\n clearIcon,\n disabled,\n\n mergedSearchValue,\n mode,\n );\n\n // =========================== OptionList ===========================\n const optionList = <OptionList ref={listRef} />;\n\n // ============================= Select =============================\n const mergedClassName = classNames(prefixCls, className, {\n [`${prefixCls}-focused`]: mockFocused,\n [`${prefixCls}-multiple`]: multiple,\n [`${prefixCls}-single`]: !multiple,\n [`${prefixCls}-allow-clear`]: allowClear,\n [`${prefixCls}-show-arrow`]: showSuffixIcon,\n [`${prefixCls}-disabled`]: disabled,\n [`${prefixCls}-loading`]: loading,\n [`${prefixCls}-open`]: mergedOpen,\n [`${prefixCls}-customize-input`]: customizeInputElement,\n [`${prefixCls}-show-search`]: mergedShowSearch,\n });\n\n // >>> Selector\n const selectorNode = (\n <SelectTrigger\n ref={triggerRef}\n disabled={disabled}\n prefixCls={prefixCls}\n visible={triggerOpen}\n popupElement={optionList}\n animation={animation}\n transitionName={transitionName}\n dropdownStyle={dropdownStyle}\n dropdownClassName={dropdownClassName}\n direction={direction}\n dropdownMatchSelectWidth={dropdownMatchSelectWidth}\n dropdownRender={dropdownRender}\n dropdownAlign={dropdownAlign}\n placement={placement}\n builtinPlacements={builtinPlacements}\n getPopupContainer={getPopupContainer}\n empty={emptyOptions}\n getTriggerDOMNode={() => selectorDomRef.current}\n onPopupVisibleChange={onTriggerVisibleChange}\n onPopupMouseEnter={onPopupMouseEnter}\n >\n {customizeRawInputElement ? (\n React.cloneElement(customizeRawInputElement, {\n ref: customizeRawInputRef,\n })\n ) : (\n <Selector\n {...props}\n domRef={selectorDomRef}\n prefixCls={prefixCls}\n inputElement={customizeInputElement}\n ref={selectorRef}\n id={id}\n showSearch={mergedShowSearch}\n autoClearSearchValue={autoClearSearchValue}\n mode={mode}\n activeDescendantId={activeDescendantId}\n tagRender={tagRender}\n values={displayValues}\n open={mergedOpen}\n onToggleOpen={onToggleOpen}\n activeValue={activeValue}\n searchValue={mergedSearchValue}\n onSearch={onInternalSearch}\n onSearchSubmit={onInternalSearchSubmit}\n onRemove={onSelectorRemove}\n tokenWithEnter={tokenWithEnter}\n />\n )}\n </SelectTrigger>\n );\n\n // >>> Render\n let renderNode: React.ReactNode;\n\n // Render raw\n if (customizeRawInputElement) {\n renderNode = selectorNode;\n } else {\n renderNode = (\n <div\n className={mergedClassName}\n {...domProps}\n ref={containerRef}\n onMouseDown={onInternalMouseDown}\n onKeyDown={onInternalKeyDown}\n onKeyUp={onInternalKeyUp}\n onFocus={onContainerFocus}\n onBlur={onContainerBlur}\n >\n {mockFocused && !mergedOpen && (\n <span\n style={{\n width: 0,\n height: 0,\n position: 'absolute',\n overflow: 'hidden',\n opacity: 0,\n }}\n aria-live=\"polite\"\n >\n {/* Merge into one string to make screen reader work as expect */}\n {`${displayValues\n .map(({ label, value }) =>\n ['number', 'string'].includes(typeof label) ? label : value,\n )\n .join(', ')}`}\n </span>\n )}\n {selectorNode}\n {arrowNode}\n {mergedAllowClear && clearNode}\n </div>\n );\n }\n\n return (\n <BaseSelectContext.Provider value={baseSelectContext}>{renderNode}</BaseSelectContext.Provider>\n );\n});\n\n// Set display name for dev\nif (process.env.NODE_ENV !== 'production') {\n BaseSelect.displayName = 'BaseSelect';\n}\n\nexport default BaseSelect;\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"OptGroup.js","sourceRoot":"","sources":["../../../src/tntd-select/rc-select/OptGroup.tsx"],"names":[],"mappings":"AAaA,oDAAoD;AACpD,MAAM,QAAQ,GAAkB,GAAG,EAAE,CAAC,IAAI,CAAC;AAC3C,QAAQ,CAAC,gBAAgB,GAAG,IAAI,CAAC;AAEjC,eAAe,QAAQ,CAAC","sourcesContent":["/* istanbul ignore file */\nimport type * as React from 'react';\nimport type { DefaultOptionType } from './Select';\n\nexport interface OptGroupProps extends Omit<DefaultOptionType, 'options'> {\n children?: React.ReactNode;\n}\n\nexport interface OptionGroupFC extends React.FC<OptGroupProps> {\n /** Legacy for check if is a Option Group */\n isSelectOptGroup: boolean;\n}\n\n/** This is a placeholder, not real render in dom */\nconst OptGroup: OptionGroupFC = () => null;\nOptGroup.isSelectOptGroup = true;\n\nexport default OptGroup;\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Option.js","sourceRoot":"","sources":["../../../src/tntd-select/rc-select/Option.tsx"],"names":[],"mappings":"AAgBA,oDAAoD;AACpD,MAAM,MAAM,GAAa,GAAG,EAAE,CAAC,IAAI,CAAC;AACpC,MAAM,CAAC,cAAc,GAAG,IAAI,CAAC;AAE7B,eAAe,MAAM,CAAC","sourcesContent":["/* istanbul ignore file */\nimport type * as React from 'react';\nimport type { DefaultOptionType } from './Select';\n\nexport interface OptionProps extends Omit<DefaultOptionType, 'label'> {\n children: React.ReactNode;\n\n /** Save for customize data */\n [prop: string]: any; // eslint-disable-line @typescript-eslint/no-explicit-any\n}\n\nexport interface OptionFC extends React.FC<OptionProps> {\n /** Legacy for check if is a Option Group */\n isSelectOption: boolean;\n}\n\n/** This is a placeholder, not real render in dom */\nconst Option: OptionFC = () => null;\nOption.isSelectOption = true;\n\nexport default Option;\n"]}
|