tntd 2.7.29 → 2.7.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/affix/style/index.js.map +1 -0
- package/es/affix/style/index.less +6 -0
- package/es/alert/style/index.js +2 -0
- package/es/alert/style/index.js.map +1 -0
- package/es/alert/style/index.less +188 -0
- package/es/anchor/style/index.js +4 -0
- package/es/anchor/style/index.js.map +1 -0
- package/es/anchor/style/index.less +82 -0
- package/es/auto-complete/style/index.js +5 -0
- package/es/auto-complete/style/index.js.map +1 -0
- package/es/auto-complete/style/index.less +92 -0
- package/es/avatar/style/index.js +2 -0
- package/es/avatar/style/index.js.map +1 -0
- package/es/avatar/style/index.less +59 -0
- package/es/back-top/style/index.js +2 -0
- package/es/back-top/style/index.js.map +1 -0
- package/es/back-top/style/index.less +42 -0
- package/es/back-top/style/responsive.less +11 -0
- package/es/badge/style/index.js +2 -0
- package/es/badge/style/index.js.map +1 -0
- package/es/badge/style/index.less +190 -0
- package/es/breadcrumb/style/index.js +4 -0
- package/es/breadcrumb/style/index.js.map +1 -0
- package/es/breadcrumb/style/index.less +51 -0
- package/es/button/style/index.js +2 -0
- package/es/button/style/index.js.map +1 -0
- package/es/button/style/index.less +224 -0
- package/es/button/style/mixin.less +357 -0
- package/es/calendar/style/index.js +5 -0
- package/es/calendar/style/index.js.map +1 -0
- package/es/calendar/style/index.less +278 -0
- package/es/card/style/index.js +6 -0
- package/es/card/style/index.js.map +1 -0
- package/es/card/style/index.less +263 -0
- package/es/card/style/size.less +25 -0
- package/es/carousel/style/index.js +2 -0
- package/es/carousel/style/index.js.map +1 -0
- package/es/carousel/style/index.less +238 -0
- package/es/cascader/style/index.js +5 -0
- package/es/cascader/style/index.js.map +1 -0
- package/es/cascader/style/index.less +227 -0
- package/es/checkbox/style/index.js +2 -0
- package/es/checkbox/style/index.js.map +1 -0
- package/es/checkbox/style/index.less +4 -0
- package/es/checkbox/style/mixin.less +220 -0
- package/es/col/style/index.js +4 -0
- package/es/col/style/index.js.map +1 -0
- package/es/collapse/style/index.js +2 -0
- package/es/collapse/style/index.js.map +1 -0
- package/es/collapse/style/index.less +134 -0
- package/es/comment/style/index.js +2 -0
- package/es/comment/style/index.js.map +1 -0
- package/es/comment/style/index.less +93 -0
- package/es/config-provider/style/index.js +1 -0
- package/es/config-provider/style/index.js.map +1 -0
- package/es/config-provider/style/index.less +2 -0
- package/es/date-picker/style/Calendar.less +402 -0
- package/es/date-picker/style/DecadePanel.less +81 -0
- package/es/date-picker/style/MonthPanel.less +86 -0
- package/es/date-picker/style/MonthPicker.less +11 -0
- package/es/date-picker/style/Picker.less +113 -0
- package/es/date-picker/style/RangePicker.less +248 -0
- package/es/date-picker/style/TimePicker.less +151 -0
- package/es/date-picker/style/WeekPicker.less +21 -0
- package/es/date-picker/style/YearPanel.less +85 -0
- package/es/date-picker/style/index.js +7 -0
- package/es/date-picker/style/index.js.map +1 -0
- package/es/date-picker/style/index.less +17 -0
- package/es/descriptions/style/index.js +2 -0
- package/es/descriptions/style/index.js.map +1 -0
- package/es/descriptions/style/index.less +144 -0
- package/es/divider/style/index.js +2 -0
- package/es/divider/style/index.js.map +1 -0
- package/es/divider/style/index.less +109 -0
- package/es/drawer/style/drawer.less +230 -0
- package/es/drawer/style/index.js +3 -0
- package/es/drawer/style/index.js.map +1 -0
- package/es/drawer/style/index.less +3 -0
- package/es/dropdown/style/index.js +4 -0
- package/es/dropdown/style/index.js.map +1 -0
- package/es/dropdown/style/index.less +282 -0
- package/es/empty/style/index.js +2 -0
- package/es/empty/style/index.js.map +1 -0
- package/es/empty/style/index.less +52 -0
- package/es/form/style/index.js +4 -0
- package/es/form/style/index.js.map +1 -0
- package/es/form/style/index.less +653 -0
- package/es/form/style/mixin.less +126 -0
- package/es/grid-v4/RowContext.js.map +1 -0
- package/es/{tntd-form/grid → grid-v4}/col.js +0 -1
- package/es/grid-v4/col.js.map +1 -0
- package/es/grid-v4/hooks/useBreakpoint.js.map +1 -0
- package/es/grid-v4/index.js.map +1 -0
- package/es/{tntd-form/grid → grid-v4}/row.js +1 -0
- package/es/grid-v4/row.js.map +1 -0
- package/es/grid-v4/style/index.js +2 -0
- package/es/grid-v4/style/index.js.map +1 -0
- package/es/grid-v4/style/index.less +124 -0
- package/es/grid-v4/style/mixin.less +57 -0
- package/es/grid-v4/style/rtl.less +69 -0
- package/es/handle/handle.js +138 -0
- package/es/handle/handle.js.map +1 -0
- package/es/icon/style/index.js +2 -0
- package/es/icon/style/index.js.map +1 -0
- package/es/icon/style/index.less +4 -0
- package/es/input/style/index.js +4 -0
- package/es/input/style/index.js.map +1 -0
- package/es/input/style/index.less +57 -0
- package/es/input/style/mixin.less +449 -0
- package/es/input/style/search-input.less +34 -0
- package/es/input-number/style/index.js +2 -0
- package/es/input-number/style/index.js.map +1 -0
- package/es/input-number/style/index.less +179 -0
- package/es/layout/style/index.js +2 -0
- package/es/layout/style/index.js.map +1 -0
- package/es/layout/style/index.less +124 -0
- package/es/layout/style/light.less +15 -0
- package/es/list/style/bordered.less +41 -0
- package/es/list/style/index.js +7 -0
- package/es/list/style/index.js.map +1 -0
- package/es/list/style/index.less +234 -0
- package/es/list/style/responsive.less +40 -0
- package/es/locale-provider/style/index.js +1 -0
- package/es/locale-provider/style/index.js.map +1 -0
- package/es/locale-provider/style/index.less +2 -0
- package/es/mention/index.js +4 -0
- package/es/mention/index.js.map +1 -0
- package/es/mentions/style/index.js +4 -0
- package/es/mentions/style/index.js.map +1 -0
- package/es/mentions/style/index.less +164 -0
- package/es/menu/style/dark.less +139 -0
- package/es/menu/style/index.js +5 -0
- package/es/menu/style/index.js.map +1 -0
- package/es/menu/style/index.less +515 -0
- package/es/message/style/index.js +2 -0
- package/es/message/style/index.js.map +1 -0
- package/es/message/style/index.less +75 -0
- package/es/modal/style/confirm.less +78 -0
- package/es/modal/style/index.js +4 -0
- package/es/modal/style/index.js.map +1 -0
- package/es/modal/style/index.less +4 -0
- package/es/modal/style/modal.less +165 -0
- package/es/notification/style/index.js +2 -0
- package/es/notification/style/index.js.map +1 -0
- package/es/notification/style/index.less +199 -0
- package/es/page-header/style/index.js +4 -0
- package/es/page-header/style/index.js.map +1 -0
- package/es/page-header/style/index.less +119 -0
- package/es/pagination/style/index.js +4 -0
- package/es/pagination/style/index.js.map +1 -0
- package/es/pagination/style/index.less +400 -0
- package/es/popconfirm/style/index.js +5 -0
- package/es/popconfirm/style/index.js.map +1 -0
- package/es/popover/style/index.js +4 -0
- package/es/popover/style/index.js.map +1 -0
- package/es/popover/style/index.less +205 -0
- package/es/progress/style/index.js +2 -0
- package/es/progress/style/index.js.map +1 -0
- package/es/progress/style/index.less +182 -0
- package/es/radio/style/index.js +2 -0
- package/es/radio/style/index.js.map +1 -0
- package/es/radio/style/index.less +327 -0
- package/es/rate/style/index.js +4 -0
- package/es/rate/style/index.js.map +1 -0
- package/es/rate/style/index.less +85 -0
- package/es/result/style/index.js +2 -0
- package/es/result/style/index.js.map +1 -0
- package/es/result/style/index.less +71 -0
- package/es/row/style/index.js +4 -0
- package/es/row/style/index.js.map +1 -0
- package/es/select/style/index.js +4 -0
- package/es/select/style/index.js.map +1 -0
- package/es/select/style/index.less +604 -0
- package/es/skeleton/style/index.js +2 -0
- package/es/skeleton/style/index.js.map +1 -0
- package/es/skeleton/style/index.less +130 -0
- package/es/slider/style/index.js +4 -0
- package/es/slider/style/index.js.map +1 -0
- package/es/slider/style/index.less +197 -0
- package/es/spin/style/index.js +2 -0
- package/es/spin/style/index.js.map +1 -0
- package/es/spin/style/index.less +214 -0
- package/es/statistic/style/index.js +2 -0
- package/es/statistic/style/index.js.map +1 -0
- package/es/statistic/style/index.less +40 -0
- package/es/steps/style/compatibility.less +50 -0
- package/es/steps/style/custom-icon.less +31 -0
- package/es/steps/style/index.js +2 -0
- package/es/steps/style/index.js.map +1 -0
- package/es/steps/style/label-placement.less +38 -0
- package/es/steps/style/progress-dot.less +80 -0
- package/es/steps/style/vertical.less +74 -0
- package/es/style/color/bezierEasing.less +110 -0
- package/es/style/color/colorPalette.less +75 -0
- package/es/style/color/colors.less +149 -0
- package/es/style/color/tinyColor.less +1184 -0
- package/es/style/core/base.less +510 -0
- package/es/style/core/iconfont.less +19 -0
- package/es/style/core/index.less +4 -0
- package/es/style/core/motion/fade.less +31 -0
- package/es/style/core/motion/move.less +120 -0
- package/es/style/core/motion/other.less +40 -0
- package/es/style/core/motion/slide.less +120 -0
- package/es/style/core/motion/swing.less +34 -0
- package/es/style/core/motion/zoom.less +162 -0
- package/es/style/core/motion.less +20 -0
- package/es/style/index.js +1 -0
- package/es/style/index.js.map +1 -0
- package/es/style/index.less +2 -0
- package/es/style/mixins/clearfix.less +13 -0
- package/es/style/mixins/compatibility.less +22 -0
- package/es/style/mixins/iconfont.less +43 -0
- package/es/style/mixins/index.less +10 -0
- package/es/style/mixins/motion.less +35 -0
- package/es/style/mixins/operation-unit.less +18 -0
- package/es/style/mixins/reset.less +13 -0
- package/es/style/mixins/size.less +10 -0
- package/es/style/mixins/typography.less +49 -0
- package/es/style/themes/default.less +699 -0
- package/es/style/themes/index.less +1 -0
- package/es/style/v2-compatible-reset.js +1 -0
- package/es/style/v2-compatible-reset.js.map +1 -0
- package/es/style/v2-compatible-reset.less +51 -0
- package/es/switch/style/index.js +2 -0
- package/es/switch/style/index.js.map +1 -0
- package/es/switch/style/index.less +178 -0
- package/es/table/style/index.js +10 -0
- package/es/table/style/index.js.map +1 -0
- package/es/table/style/index.less +800 -0
- package/es/table/style/size.less +179 -0
- package/es/tabs/style/card-style.less +186 -0
- package/es/tabs/style/index.js +2 -0
- package/es/tabs/style/index.js.map +1 -0
- package/es/tabs/style/index.less +436 -0
- package/es/tabs/tabs.js +8 -5
- package/es/tabs/tabs.js.map +1 -1
- package/es/tag/style/index.js +2 -0
- package/es/tag/style/index.js.map +1 -0
- package/es/tag/style/index.less +106 -0
- package/es/time-picker/style/index.js +2 -0
- package/es/time-picker/style/index.js.map +1 -0
- package/es/time-picker/style/index.less +246 -0
- package/es/timeline/style/index.js +2 -0
- package/es/timeline/style/index.js.map +1 -0
- package/es/timeline/style/index.less +167 -0
- package/es/tntd-form/TntdForm/components/Item.js +55 -0
- package/es/tntd-form/TntdForm/components/Item.js.map +1 -0
- package/es/tntd-form/TntdForm/components/ItemComp.js +186 -0
- package/es/tntd-form/TntdForm/components/ItemComp.js.map +1 -0
- package/es/tntd-form/TntdForm/components/List.js +102 -0
- package/es/tntd-form/TntdForm/components/List.js.map +1 -0
- package/es/tntd-form/TntdForm/index.js +55 -0
- package/es/tntd-form/TntdForm/index.js.map +1 -0
- package/es/tntd-form/TntdForm/interface.js +1 -0
- package/es/tntd-form/TntdForm/interface.js.map +1 -0
- package/es/tntd-form/TntdForm/store.js +2 -0
- package/es/tntd-form/TntdForm/store.js.map +1 -0
- package/es/tntd-form/TntdForm/utils.js +219 -0
- package/es/tntd-form/TntdForm/utils.js.map +1 -0
- package/es/tntd-select/_util/DisabledContext.js +12 -0
- package/es/tntd-select/_util/DisabledContext.js.map +1 -0
- package/es/tntd-select/_util/FormItemInputContext.js +2 -0
- package/es/tntd-select/_util/FormItemInputContext.js.map +1 -0
- package/es/tntd-select/_util/PurePanel.js +66 -0
- package/es/tntd-select/_util/PurePanel.js.map +1 -0
- package/es/tntd-select/_util/SizeContext.js +2 -0
- package/es/tntd-select/_util/SizeContext.js.map +1 -0
- package/es/tntd-select/_util/context.js.map +1 -0
- package/es/tntd-select/_util/defaultRenderEmpty.js.map +1 -0
- package/es/tntd-select/_util/getIcons.js +74 -0
- package/es/tntd-select/_util/getIcons.js.map +1 -0
- package/es/tntd-select/_util/interface.js +4 -0
- package/es/tntd-select/_util/interface.js.map +1 -0
- package/es/tntd-select/_util/motion.js +47 -0
- package/es/tntd-select/_util/motion.js.map +1 -0
- package/es/tntd-select/_util/type.js +3 -0
- package/es/tntd-select/_util/type.js.map +1 -0
- package/es/tntd-select/_util/useCompactItemContext.js +26 -0
- package/es/tntd-select/_util/useCompactItemContext.js.map +1 -0
- package/es/tntd-select/_util/warning.js +14 -0
- package/es/tntd-select/_util/warning.js.map +1 -0
- package/es/tntd-select/rc-select/BaseSelect.js +524 -0
- package/es/tntd-select/rc-select/BaseSelect.js.map +1 -0
- package/es/tntd-select/rc-select/OptGroup.js +4 -0
- package/es/tntd-select/rc-select/OptGroup.js.map +1 -0
- package/es/tntd-select/rc-select/Option.js +4 -0
- package/es/tntd-select/rc-select/Option.js.map +1 -0
- package/es/tntd-select/rc-select/OptionList.js +346 -0
- package/es/tntd-select/rc-select/OptionList.js.map +1 -0
- package/es/tntd-select/rc-select/Select.js +440 -0
- package/es/tntd-select/rc-select/Select.js.map +1 -0
- package/es/tntd-select/rc-select/SelectContext.js +3 -0
- package/es/tntd-select/rc-select/SelectContext.js.map +1 -0
- package/es/tntd-select/rc-select/SelectTrigger.js +130 -0
- package/es/tntd-select/rc-select/SelectTrigger.js.map +1 -0
- package/es/tntd-select/rc-select/Selector/Input.js +103 -0
- package/es/tntd-select/rc-select/Selector/Input.js.map +1 -0
- package/es/tntd-select/rc-select/Selector/MultipleSelector.js +171 -0
- package/es/tntd-select/rc-select/Selector/MultipleSelector.js.map +1 -0
- package/es/tntd-select/rc-select/Selector/SingleSelector.js +98 -0
- package/es/tntd-select/rc-select/Selector/SingleSelector.js.map +1 -0
- package/es/tntd-select/rc-select/Selector/index.js +158 -0
- package/es/tntd-select/rc-select/Selector/index.js.map +1 -0
- package/es/tntd-select/rc-select/TransBtn.js +36 -0
- package/es/tntd-select/rc-select/TransBtn.js.map +1 -0
- package/es/tntd-select/rc-select/hooks/useAllowClear.js +24 -0
- package/es/tntd-select/rc-select/hooks/useAllowClear.js.map +1 -0
- package/es/tntd-select/rc-select/hooks/useBaseProps.js +9 -0
- package/es/tntd-select/rc-select/hooks/useBaseProps.js.map +1 -0
- package/es/tntd-select/rc-select/hooks/useCache.js +38 -0
- package/es/tntd-select/rc-select/hooks/useCache.js.map +1 -0
- package/es/tntd-select/rc-select/hooks/useDelayReset.js +23 -0
- package/es/tntd-select/rc-select/hooks/useDelayReset.js.map +1 -0
- package/es/tntd-select/rc-select/hooks/useFilterOptions.js +55 -0
- package/es/tntd-select/rc-select/hooks/useFilterOptions.js.map +1 -0
- package/es/tntd-select/rc-select/hooks/useId.js +26 -0
- package/es/tntd-select/rc-select/hooks/useId.js.map +1 -0
- package/es/tntd-select/rc-select/hooks/useLayoutEffect.js +16 -0
- package/es/tntd-select/rc-select/hooks/useLayoutEffect.js.map +1 -0
- package/es/tntd-select/rc-select/hooks/useLock.js +25 -0
- package/es/tntd-select/rc-select/hooks/useLock.js.map +1 -0
- package/es/tntd-select/rc-select/hooks/useOptions.js +43 -0
- package/es/tntd-select/rc-select/hooks/useOptions.js.map +1 -0
- package/es/tntd-select/rc-select/hooks/useRefFunc.js +13 -0
- package/es/tntd-select/rc-select/hooks/useRefFunc.js.map +1 -0
- package/es/tntd-select/rc-select/hooks/useSelectTriggerControl.js +28 -0
- package/es/tntd-select/rc-select/hooks/useSelectTriggerControl.js.map +1 -0
- package/es/tntd-select/rc-select/index.js +7 -0
- package/es/tntd-select/rc-select/index.js.map +1 -0
- package/es/tntd-select/rc-select/interface.js +1 -0
- package/es/tntd-select/rc-select/interface.js.map +1 -0
- package/es/tntd-select/rc-select/utils/commonUtil.js +30 -0
- package/es/tntd-select/rc-select/utils/commonUtil.js.map +1 -0
- package/es/tntd-select/rc-select/utils/keyUtil.js +9 -0
- package/es/tntd-select/rc-select/utils/keyUtil.js.map +1 -0
- package/es/tntd-select/rc-select/utils/legacyUtil.js +55 -0
- package/es/tntd-select/rc-select/utils/legacyUtil.js.map +1 -0
- package/es/tntd-select/rc-select/utils/platformUtil.js +4 -0
- package/es/tntd-select/rc-select/utils/platformUtil.js.map +1 -0
- package/es/tntd-select/rc-select/utils/valueUtil.js +112 -0
- package/es/tntd-select/rc-select/utils/valueUtil.js.map +1 -0
- package/es/tntd-select/rc-select/utils/warningPropsUtil.js +112 -0
- package/es/tntd-select/rc-select/utils/warningPropsUtil.js.map +1 -0
- package/es/tooltip/style/index.js +2 -0
- package/es/tooltip/style/index.js.map +1 -0
- package/es/tooltip/style/index.less +187 -0
- package/es/transfer/style/customize.less +62 -0
- package/es/transfer/style/index.js +7 -0
- package/es/transfer/style/index.js.map +1 -0
- package/es/transfer/style/index.less +191 -0
- package/es/tree/style/directory.less +95 -0
- package/es/tree/style/index.js +2 -0
- package/es/tree/style/index.js.map +1 -0
- package/es/tree/style/index.less +280 -0
- package/es/tree/style/mixin.less +29 -0
- package/es/tree-select/style/index.js +6 -0
- package/es/tree-select/style/index.js.map +1 -0
- package/es/tree-select/style/index.less +191 -0
- package/es/typography/style/index.js +5 -0
- package/es/typography/style/index.js.map +1 -0
- package/es/typography/style/index.less +204 -0
- package/es/upload/style/index.js +5 -0
- package/es/upload/style/index.js.map +1 -0
- package/es/upload/style/index.less +542 -0
- package/es/utils/lang.js +5 -0
- package/es/utils/lang.js.map +1 -1
- package/es/version/style/index.js +2 -0
- package/es/version/style/index.js.map +1 -0
- package/lib/affix/style/index.d.ts.map +1 -0
- package/lib/affix/style/index.js.map +1 -0
- package/lib/affix/style/index.less +6 -0
- package/lib/alert/style/index.d.ts +3 -0
- package/lib/alert/style/index.d.ts.map +1 -0
- package/lib/alert/style/index.js +4 -0
- package/lib/alert/style/index.js.map +1 -0
- package/lib/alert/style/index.less +188 -0
- package/lib/anchor/style/index.d.ts +4 -0
- package/lib/anchor/style/index.d.ts.map +1 -0
- package/lib/anchor/style/index.js +5 -0
- package/lib/anchor/style/index.js.map +1 -0
- package/lib/anchor/style/index.less +82 -0
- package/lib/auto-complete/style/index.d.ts +5 -0
- package/lib/auto-complete/style/index.d.ts.map +1 -0
- package/lib/auto-complete/style/index.js +6 -0
- package/lib/auto-complete/style/index.js.map +1 -0
- package/lib/auto-complete/style/index.less +92 -0
- package/lib/avatar/style/index.d.ts +3 -0
- package/lib/avatar/style/index.d.ts.map +1 -0
- package/lib/avatar/style/index.js +4 -0
- package/lib/avatar/style/index.js.map +1 -0
- package/lib/avatar/style/index.less +59 -0
- package/lib/back-top/style/index.d.ts +3 -0
- package/lib/back-top/style/index.d.ts.map +1 -0
- package/lib/back-top/style/index.js +4 -0
- package/lib/back-top/style/index.js.map +1 -0
- package/lib/back-top/style/index.less +42 -0
- package/lib/back-top/style/responsive.less +11 -0
- package/lib/badge/style/index.d.ts +3 -0
- package/lib/badge/style/index.d.ts.map +1 -0
- package/lib/badge/style/index.js +4 -0
- package/lib/badge/style/index.js.map +1 -0
- package/lib/badge/style/index.less +190 -0
- package/lib/breadcrumb/style/index.d.ts +5 -0
- package/lib/breadcrumb/style/index.d.ts.map +1 -0
- package/lib/breadcrumb/style/index.js +6 -0
- package/lib/breadcrumb/style/index.js.map +1 -0
- package/lib/breadcrumb/style/index.less +51 -0
- package/lib/button/style/index.d.ts +3 -0
- package/lib/button/style/index.d.ts.map +1 -0
- package/lib/button/style/index.js +4 -0
- package/lib/button/style/index.js.map +1 -0
- package/lib/button/style/index.less +224 -0
- package/lib/button/style/mixin.less +357 -0
- package/lib/calendar/style/index.d.ts +5 -0
- package/lib/calendar/style/index.d.ts.map +1 -0
- package/lib/calendar/style/index.js +6 -0
- package/lib/calendar/style/index.js.map +1 -0
- package/lib/calendar/style/index.less +278 -0
- package/lib/card/style/index.d.ts +6 -0
- package/lib/card/style/index.d.ts.map +1 -0
- package/lib/card/style/index.js +7 -0
- package/lib/card/style/index.js.map +1 -0
- package/lib/card/style/index.less +263 -0
- package/lib/card/style/size.less +25 -0
- package/lib/carousel/style/index.d.ts +3 -0
- package/lib/carousel/style/index.d.ts.map +1 -0
- package/lib/carousel/style/index.js +4 -0
- package/lib/carousel/style/index.js.map +1 -0
- package/lib/carousel/style/index.less +238 -0
- package/lib/cascader/style/index.d.ts +5 -0
- package/lib/cascader/style/index.d.ts.map +1 -0
- package/lib/cascader/style/index.js +6 -0
- package/lib/cascader/style/index.js.map +1 -0
- package/lib/cascader/style/index.less +227 -0
- package/lib/checkbox/style/index.d.ts +3 -0
- package/lib/checkbox/style/index.d.ts.map +1 -0
- package/lib/checkbox/style/index.js +4 -0
- package/lib/checkbox/style/index.js.map +1 -0
- package/lib/checkbox/style/index.less +4 -0
- package/lib/checkbox/style/mixin.less +220 -0
- package/lib/col/style/index.d.ts +3 -0
- package/lib/col/style/index.d.ts.map +1 -0
- package/lib/col/style/index.js +4 -0
- package/lib/col/style/index.js.map +1 -0
- package/lib/collapse/style/index.d.ts +3 -0
- package/lib/collapse/style/index.d.ts.map +1 -0
- package/lib/collapse/style/index.js +4 -0
- package/lib/collapse/style/index.js.map +1 -0
- package/lib/collapse/style/index.less +134 -0
- package/lib/comment/style/index.d.ts +3 -0
- package/lib/comment/style/index.d.ts.map +1 -0
- package/lib/comment/style/index.js +4 -0
- package/lib/comment/style/index.js.map +1 -0
- package/lib/comment/style/index.less +93 -0
- package/lib/config-provider/style/index.d.ts +2 -0
- package/lib/config-provider/style/index.d.ts.map +1 -0
- package/lib/config-provider/style/index.js +3 -0
- package/lib/config-provider/style/index.js.map +1 -0
- package/lib/config-provider/style/index.less +2 -0
- package/lib/date-picker/style/Calendar.less +402 -0
- package/lib/date-picker/style/DecadePanel.less +81 -0
- package/lib/date-picker/style/MonthPanel.less +86 -0
- package/lib/date-picker/style/MonthPicker.less +11 -0
- package/lib/date-picker/style/Picker.less +113 -0
- package/lib/date-picker/style/RangePicker.less +248 -0
- package/lib/date-picker/style/TimePicker.less +151 -0
- package/lib/date-picker/style/WeekPicker.less +21 -0
- package/lib/date-picker/style/YearPanel.less +85 -0
- package/lib/date-picker/style/index.d.ts +6 -0
- package/lib/date-picker/style/index.d.ts.map +1 -0
- package/lib/date-picker/style/index.js +7 -0
- package/lib/date-picker/style/index.js.map +1 -0
- package/lib/date-picker/style/index.less +17 -0
- package/lib/descriptions/style/index.d.ts +3 -0
- package/lib/descriptions/style/index.d.ts.map +1 -0
- package/lib/descriptions/style/index.js +4 -0
- package/lib/descriptions/style/index.js.map +1 -0
- package/lib/descriptions/style/index.less +144 -0
- package/lib/divider/style/index.d.ts +3 -0
- package/lib/divider/style/index.d.ts.map +1 -0
- package/lib/divider/style/index.js +4 -0
- package/lib/divider/style/index.js.map +1 -0
- package/lib/divider/style/index.less +109 -0
- package/lib/drawer/style/drawer.less +230 -0
- package/lib/drawer/style/index.d.ts +3 -0
- package/lib/drawer/style/index.d.ts.map +1 -0
- package/lib/drawer/style/index.js +4 -0
- package/lib/drawer/style/index.js.map +1 -0
- package/lib/drawer/style/index.less +3 -0
- package/lib/dropdown/style/index.d.ts +4 -0
- package/lib/dropdown/style/index.d.ts.map +1 -0
- package/lib/dropdown/style/index.js +5 -0
- package/lib/dropdown/style/index.js.map +1 -0
- package/lib/dropdown/style/index.less +282 -0
- package/lib/empty/style/index.d.ts +3 -0
- package/lib/empty/style/index.d.ts.map +1 -0
- package/lib/empty/style/index.js +4 -0
- package/lib/empty/style/index.js.map +1 -0
- package/lib/empty/style/index.less +52 -0
- package/lib/form/style/index.d.ts +4 -0
- package/lib/form/style/index.d.ts.map +1 -0
- package/lib/form/style/index.js +5 -0
- package/lib/form/style/index.js.map +1 -0
- package/lib/form/style/index.less +653 -0
- package/lib/form/style/mixin.less +126 -0
- package/lib/grid-v4/RowContext.d.ts.map +1 -0
- package/lib/grid-v4/RowContext.js.map +1 -0
- package/lib/grid-v4/col.d.ts.map +1 -0
- package/lib/grid-v4/col.js.map +1 -0
- package/lib/grid-v4/hooks/useBreakpoint.d.ts.map +1 -0
- package/lib/grid-v4/hooks/useBreakpoint.js.map +1 -0
- package/lib/grid-v4/index.d.ts.map +1 -0
- package/lib/grid-v4/index.js.map +1 -0
- package/lib/grid-v4/row.d.ts.map +1 -0
- package/lib/{tntd-form/grid → grid-v4}/row.js +1 -0
- package/lib/grid-v4/row.js.map +1 -0
- package/lib/grid-v4/style/index.d.ts +2 -0
- package/lib/grid-v4/style/index.d.ts.map +1 -0
- package/lib/grid-v4/style/index.js +3 -0
- package/lib/grid-v4/style/index.js.map +1 -0
- package/lib/grid-v4/style/index.less +124 -0
- package/lib/grid-v4/style/mixin.less +57 -0
- package/lib/grid-v4/style/rtl.less +69 -0
- package/lib/handle/handle.d.ts +3 -0
- package/lib/handle/handle.d.ts.map +1 -0
- package/lib/handle/handle.js +181 -0
- package/lib/handle/handle.js.map +1 -0
- package/lib/icon/style/index.d.ts +3 -0
- package/lib/icon/style/index.d.ts.map +1 -0
- package/lib/icon/style/index.js +4 -0
- package/lib/icon/style/index.js.map +1 -0
- package/lib/icon/style/index.less +4 -0
- package/lib/input/style/index.d.ts +4 -0
- package/lib/input/style/index.d.ts.map +1 -0
- package/lib/input/style/index.js +5 -0
- package/lib/input/style/index.js.map +1 -0
- package/lib/input/style/index.less +57 -0
- package/lib/input/style/mixin.less +449 -0
- package/lib/input/style/search-input.less +34 -0
- package/lib/input-number/style/index.d.ts +3 -0
- package/lib/input-number/style/index.d.ts.map +1 -0
- package/lib/input-number/style/index.js +4 -0
- package/lib/input-number/style/index.js.map +1 -0
- package/lib/input-number/style/index.less +179 -0
- package/lib/layout/style/index.d.ts +3 -0
- package/lib/layout/style/index.d.ts.map +1 -0
- package/lib/layout/style/index.js +4 -0
- package/lib/layout/style/index.js.map +1 -0
- package/lib/layout/style/index.less +124 -0
- package/lib/layout/style/light.less +15 -0
- package/lib/list/style/bordered.less +41 -0
- package/lib/list/style/index.d.ts +7 -0
- package/lib/list/style/index.d.ts.map +1 -0
- package/lib/list/style/index.js +8 -0
- package/lib/list/style/index.js.map +1 -0
- package/lib/list/style/index.less +234 -0
- package/lib/list/style/responsive.less +40 -0
- package/lib/locale-provider/style/index.d.ts +2 -0
- package/lib/locale-provider/style/index.d.ts.map +1 -0
- package/lib/locale-provider/style/index.js +3 -0
- package/lib/locale-provider/style/index.js.map +1 -0
- package/lib/locale-provider/style/index.less +2 -0
- package/lib/mention/index.js +25 -0
- package/lib/mentions/style/index.d.ts +4 -0
- package/lib/mentions/style/index.d.ts.map +1 -0
- package/lib/mentions/style/index.js +5 -0
- package/lib/mentions/style/index.js.map +1 -0
- package/lib/mentions/style/index.less +164 -0
- package/lib/menu/style/dark.less +139 -0
- package/lib/menu/style/index.d.ts +4 -0
- package/lib/menu/style/index.d.ts.map +1 -0
- package/lib/menu/style/index.js +5 -0
- package/lib/menu/style/index.js.map +1 -0
- package/lib/menu/style/index.less +515 -0
- package/lib/message/style/index.d.ts +3 -0
- package/lib/message/style/index.d.ts.map +1 -0
- package/lib/message/style/index.js +4 -0
- package/lib/message/style/index.js.map +1 -0
- package/lib/message/style/index.less +75 -0
- package/lib/modal/style/confirm.less +78 -0
- package/lib/modal/style/index.d.ts +4 -0
- package/lib/modal/style/index.d.ts.map +1 -0
- package/lib/modal/style/index.js +5 -0
- package/lib/modal/style/index.js.map +1 -0
- package/lib/modal/style/index.less +4 -0
- package/lib/modal/style/modal.less +165 -0
- package/lib/notification/style/index.d.ts +3 -0
- package/lib/notification/style/index.d.ts.map +1 -0
- package/lib/notification/style/index.js +4 -0
- package/lib/notification/style/index.js.map +1 -0
- package/lib/notification/style/index.less +199 -0
- package/lib/page-header/style/index.d.ts +4 -0
- package/lib/page-header/style/index.d.ts.map +1 -0
- package/lib/page-header/style/index.js +5 -0
- package/lib/page-header/style/index.js.map +1 -0
- package/lib/page-header/style/index.less +119 -0
- package/lib/pagination/style/index.d.ts +4 -0
- package/lib/pagination/style/index.d.ts.map +1 -0
- package/lib/pagination/style/index.js +5 -0
- package/lib/pagination/style/index.js.map +1 -0
- package/lib/pagination/style/index.less +400 -0
- package/lib/popconfirm/style/index.d.ts +4 -0
- package/lib/popconfirm/style/index.d.ts.map +1 -0
- package/lib/popconfirm/style/index.js +5 -0
- package/lib/popconfirm/style/index.js.map +1 -0
- package/lib/popover/style/index.d.ts +3 -0
- package/lib/popover/style/index.d.ts.map +1 -0
- package/lib/popover/style/index.js +4 -0
- package/lib/popover/style/index.js.map +1 -0
- package/lib/popover/style/index.less +205 -0
- package/lib/progress/style/index.d.ts +3 -0
- package/lib/progress/style/index.d.ts.map +1 -0
- package/lib/progress/style/index.js +4 -0
- package/lib/progress/style/index.js.map +1 -0
- package/lib/progress/style/index.less +182 -0
- package/lib/radio/style/index.d.ts +3 -0
- package/lib/radio/style/index.d.ts.map +1 -0
- package/lib/radio/style/index.js +4 -0
- package/lib/radio/style/index.js.map +1 -0
- package/lib/radio/style/index.less +327 -0
- package/lib/rate/style/index.d.ts +4 -0
- package/lib/rate/style/index.d.ts.map +1 -0
- package/lib/rate/style/index.js +5 -0
- package/lib/rate/style/index.js.map +1 -0
- package/lib/rate/style/index.less +85 -0
- package/lib/result/style/index.d.ts +3 -0
- package/lib/result/style/index.d.ts.map +1 -0
- package/lib/result/style/index.js +4 -0
- package/lib/result/style/index.js.map +1 -0
- package/lib/result/style/index.less +71 -0
- package/lib/row/style/index.d.ts +3 -0
- package/lib/row/style/index.d.ts.map +1 -0
- package/lib/row/style/index.js +4 -0
- package/lib/row/style/index.js.map +1 -0
- package/lib/select/style/index.d.ts +4 -0
- package/lib/select/style/index.d.ts.map +1 -0
- package/lib/select/style/index.js +5 -0
- package/lib/select/style/index.js.map +1 -0
- package/lib/select/style/index.less +604 -0
- package/lib/skeleton/style/index.d.ts +3 -0
- package/lib/skeleton/style/index.d.ts.map +1 -0
- package/lib/skeleton/style/index.js +4 -0
- package/lib/skeleton/style/index.js.map +1 -0
- package/lib/skeleton/style/index.less +130 -0
- package/lib/slider/style/index.d.ts +4 -0
- package/lib/slider/style/index.d.ts.map +1 -0
- package/lib/slider/style/index.js +5 -0
- package/lib/slider/style/index.js.map +1 -0
- package/lib/slider/style/index.less +197 -0
- package/lib/spin/style/index.d.ts +3 -0
- package/lib/spin/style/index.d.ts.map +1 -0
- package/lib/spin/style/index.js +4 -0
- package/lib/spin/style/index.js.map +1 -0
- package/lib/spin/style/index.less +214 -0
- package/lib/statistic/style/index.d.ts +3 -0
- package/lib/statistic/style/index.d.ts.map +1 -0
- package/lib/statistic/style/index.js +4 -0
- package/lib/statistic/style/index.js.map +1 -0
- package/lib/statistic/style/index.less +40 -0
- package/lib/steps/style/compatibility.less +50 -0
- package/lib/steps/style/custom-icon.less +31 -0
- package/lib/steps/style/index.d.ts +3 -0
- package/lib/steps/style/index.d.ts.map +1 -0
- package/lib/steps/style/index.js +4 -0
- package/lib/steps/style/index.js.map +1 -0
- package/lib/steps/style/label-placement.less +38 -0
- package/lib/steps/style/progress-dot.less +80 -0
- package/lib/steps/style/vertical.less +74 -0
- package/lib/style/color/bezierEasing.less +110 -0
- package/lib/style/color/colorPalette.less +75 -0
- package/lib/style/color/colors.less +149 -0
- package/lib/style/color/tinyColor.less +1184 -0
- package/lib/style/core/base.less +510 -0
- package/lib/style/core/iconfont.less +19 -0
- package/lib/style/core/index.less +4 -0
- package/lib/style/core/motion/fade.less +31 -0
- package/lib/style/core/motion/move.less +120 -0
- package/lib/style/core/motion/other.less +40 -0
- package/lib/style/core/motion/slide.less +120 -0
- package/lib/style/core/motion/swing.less +34 -0
- package/lib/style/core/motion/zoom.less +162 -0
- package/lib/style/core/motion.less +20 -0
- package/lib/style/index.d.ts +2 -0
- package/lib/style/index.d.ts.map +1 -0
- package/lib/style/index.js +3 -0
- package/lib/style/index.js.map +1 -0
- package/lib/style/index.less +2 -0
- package/lib/style/mixins/clearfix.less +13 -0
- package/lib/style/mixins/compatibility.less +22 -0
- package/lib/style/mixins/iconfont.less +43 -0
- package/lib/style/mixins/index.less +10 -0
- package/lib/style/mixins/motion.less +35 -0
- package/lib/style/mixins/operation-unit.less +18 -0
- package/lib/style/mixins/reset.less +13 -0
- package/lib/style/mixins/size.less +10 -0
- package/lib/style/mixins/typography.less +49 -0
- package/lib/style/themes/default.less +699 -0
- package/lib/style/themes/index.less +1 -0
- package/lib/style/v2-compatible-reset.d.ts +2 -0
- package/lib/style/v2-compatible-reset.d.ts.map +1 -0
- package/lib/style/v2-compatible-reset.js +3 -0
- package/lib/style/v2-compatible-reset.js.map +1 -0
- package/lib/style/v2-compatible-reset.less +51 -0
- package/lib/switch/style/index.d.ts +3 -0
- package/lib/switch/style/index.d.ts.map +1 -0
- package/lib/switch/style/index.js +4 -0
- package/lib/switch/style/index.js.map +1 -0
- package/lib/switch/style/index.less +178 -0
- package/lib/table/style/index.d.ts +9 -0
- package/lib/table/style/index.d.ts.map +1 -0
- package/lib/table/style/index.js +10 -0
- package/lib/table/style/index.js.map +1 -0
- package/lib/table/style/index.less +800 -0
- package/lib/table/style/size.less +179 -0
- package/lib/tabs/style/card-style.less +186 -0
- package/lib/tabs/style/index.d.ts +3 -0
- package/lib/tabs/style/index.d.ts.map +1 -0
- package/lib/tabs/style/index.js +4 -0
- package/lib/tabs/style/index.js.map +1 -0
- package/lib/tabs/style/index.less +436 -0
- package/lib/tabs/tabs.d.ts +1 -0
- package/lib/tabs/tabs.d.ts.map +1 -1
- package/lib/tabs/tabs.js +7 -4
- package/lib/tabs/tabs.js.map +1 -1
- package/lib/tag/style/index.d.ts +3 -0
- package/lib/tag/style/index.d.ts.map +1 -0
- package/lib/tag/style/index.js +4 -0
- package/lib/tag/style/index.js.map +1 -0
- package/lib/tag/style/index.less +106 -0
- package/lib/time-picker/style/index.d.ts +3 -0
- package/lib/time-picker/style/index.d.ts.map +1 -0
- package/lib/time-picker/style/index.js +4 -0
- package/lib/time-picker/style/index.js.map +1 -0
- package/lib/time-picker/style/index.less +246 -0
- package/lib/timeline/style/index.d.ts +3 -0
- package/lib/timeline/style/index.d.ts.map +1 -0
- package/lib/timeline/style/index.js +4 -0
- package/lib/timeline/style/index.js.map +1 -0
- package/lib/timeline/style/index.less +167 -0
- package/lib/tntd-form/TntdForm/components/Item.js +65 -0
- package/lib/tntd-form/TntdForm/components/ItemComp.js +215 -0
- package/lib/tntd-form/TntdForm/components/List.js +123 -0
- package/lib/tntd-form/TntdForm/index.js +72 -0
- package/lib/tntd-form/TntdForm/interface.js +5 -0
- package/lib/tntd-form/TntdForm/store.js +10 -0
- package/lib/tntd-form/TntdForm/utils.js +239 -0
- package/lib/tntd-form/tntd-form.stories.d.ts +1 -1
- package/lib/tntd-select/_util/DisabledContext.d.ts +10 -0
- package/lib/tntd-select/_util/DisabledContext.d.ts.map +1 -0
- package/lib/tntd-select/_util/DisabledContext.js +22 -0
- package/lib/tntd-select/_util/DisabledContext.js.map +1 -0
- package/lib/tntd-select/_util/FormItemInputContext.d.ts +4 -0
- package/lib/tntd-select/_util/FormItemInputContext.d.ts.map +1 -0
- package/lib/tntd-select/_util/FormItemInputContext.js +12 -0
- package/lib/tntd-select/_util/FormItemInputContext.js.map +1 -0
- package/lib/tntd-select/_util/PurePanel.d.ts +9 -0
- package/lib/tntd-select/_util/PurePanel.d.ts.map +1 -0
- package/lib/tntd-select/_util/PurePanel.js +90 -0
- package/lib/tntd-select/_util/PurePanel.js.map +1 -0
- package/lib/tntd-select/_util/SizeContext.d.ts +4 -0
- package/lib/tntd-select/_util/SizeContext.d.ts.map +1 -0
- package/lib/tntd-select/_util/SizeContext.js +12 -0
- package/lib/tntd-select/_util/SizeContext.js.map +1 -0
- package/lib/tntd-select/_util/context.d.ts.map +1 -0
- package/lib/tntd-select/_util/context.js.map +1 -0
- package/lib/tntd-select/_util/defaultRenderEmpty.d.ts.map +1 -0
- package/lib/tntd-select/_util/defaultRenderEmpty.js.map +1 -0
- package/lib/tntd-select/_util/getIcons.d.ts +25 -0
- package/lib/tntd-select/_util/getIcons.d.ts.map +1 -0
- package/lib/tntd-select/_util/getIcons.js +84 -0
- package/lib/tntd-select/_util/getIcons.js.map +1 -0
- package/lib/tntd-select/_util/interface.d.ts +25 -0
- package/lib/tntd-select/_util/interface.d.ts.map +1 -0
- package/lib/tntd-select/_util/interface.js +16 -0
- package/lib/tntd-select/_util/interface.js.map +1 -0
- package/lib/tntd-select/_util/motion.d.ts +9 -0
- package/lib/tntd-select/_util/motion.d.ts.map +1 -0
- package/lib/tntd-select/_util/motion.js +59 -0
- package/lib/tntd-select/_util/motion.js.map +1 -0
- package/lib/tntd-select/_util/type.d.ts +10 -0
- package/lib/tntd-select/_util/type.d.ts.map +1 -0
- package/lib/tntd-select/_util/type.js +21 -0
- package/lib/tntd-select/_util/type.js.map +1 -0
- package/lib/tntd-select/_util/useCompactItemContext.d.ts +9 -0
- package/lib/tntd-select/_util/useCompactItemContext.d.ts.map +1 -0
- package/lib/tntd-select/_util/useCompactItemContext.js +35 -0
- package/lib/tntd-select/_util/useCompactItemContext.js.map +1 -0
- package/lib/tntd-select/_util/warning.d.ts +4 -0
- package/lib/tntd-select/_util/warning.d.ts.map +1 -0
- package/lib/tntd-select/_util/warning.js +24 -0
- package/lib/tntd-select/_util/warning.js.map +1 -0
- package/lib/tntd-select/rc-select/BaseSelect.d.ts +114 -0
- package/lib/tntd-select/rc-select/BaseSelect.d.ts.map +1 -0
- package/lib/tntd-select/rc-select/BaseSelect.js +566 -0
- package/lib/tntd-select/rc-select/BaseSelect.js.map +1 -0
- package/lib/tntd-select/rc-select/OptGroup.d.ts +13 -0
- package/lib/tntd-select/rc-select/OptGroup.d.ts.map +1 -0
- package/lib/tntd-select/rc-select/OptGroup.js +13 -0
- package/lib/tntd-select/rc-select/OptGroup.js.map +1 -0
- package/lib/tntd-select/rc-select/Option.d.ts +15 -0
- package/lib/tntd-select/rc-select/Option.d.ts.map +1 -0
- package/lib/tntd-select/rc-select/Option.js +13 -0
- package/lib/tntd-select/rc-select/Option.js.map +1 -0
- package/lib/tntd-select/rc-select/OptionList.d.ts +11 -0
- package/lib/tntd-select/rc-select/OptionList.d.ts.map +1 -0
- package/lib/tntd-select/rc-select/OptionList.js +372 -0
- package/lib/tntd-select/rc-select/OptionList.js.map +1 -0
- package/lib/tntd-select/rc-select/Select.d.ts +115 -0
- package/lib/tntd-select/rc-select/Select.d.ts.map +1 -0
- package/lib/tntd-select/rc-select/Select.js +509 -0
- package/lib/tntd-select/rc-select/Select.js.map +1 -0
- package/lib/tntd-select/rc-select/SelectContext.d.ts +23 -0
- package/lib/tntd-select/rc-select/SelectContext.d.ts.map +1 -0
- package/lib/tntd-select/rc-select/SelectContext.js +13 -0
- package/lib/tntd-select/rc-select/SelectContext.js.map +1 -0
- package/lib/tntd-select/rc-select/SelectTrigger.d.ts +31 -0
- package/lib/tntd-select/rc-select/SelectTrigger.d.ts.map +1 -0
- package/lib/tntd-select/rc-select/SelectTrigger.js +149 -0
- package/lib/tntd-select/rc-select/SelectTrigger.js.map +1 -0
- package/lib/tntd-select/rc-select/Selector/Input.d.ts +27 -0
- package/lib/tntd-select/rc-select/Selector/Input.d.ts.map +1 -0
- package/lib/tntd-select/rc-select/Selector/Input.js +110 -0
- package/lib/tntd-select/rc-select/Selector/Input.js.map +1 -0
- package/lib/tntd-select/rc-select/Selector/MultipleSelector.d.ts +17 -0
- package/lib/tntd-select/rc-select/Selector/MultipleSelector.d.ts.map +1 -0
- package/lib/tntd-select/rc-select/Selector/MultipleSelector.js +193 -0
- package/lib/tntd-select/rc-select/Selector/MultipleSelector.js.map +1 -0
- package/lib/tntd-select/rc-select/Selector/SingleSelector.d.ts +9 -0
- package/lib/tntd-select/rc-select/Selector/SingleSelector.d.ts.map +1 -0
- package/lib/tntd-select/rc-select/Selector/SingleSelector.js +116 -0
- package/lib/tntd-select/rc-select/Selector/SingleSelector.js.map +1 -0
- package/lib/tntd-select/rc-select/Selector/index.d.ts +83 -0
- package/lib/tntd-select/rc-select/Selector/index.d.ts.map +1 -0
- package/lib/tntd-select/rc-select/Selector/index.js +159 -0
- package/lib/tntd-select/rc-select/Selector/index.js.map +1 -0
- package/lib/tntd-select/rc-select/TransBtn.d.ts +13 -0
- package/lib/tntd-select/rc-select/TransBtn.d.ts.map +1 -0
- package/lib/tntd-select/rc-select/TransBtn.js +48 -0
- package/lib/tntd-select/rc-select/TransBtn.js.map +1 -0
- package/lib/tntd-select/rc-select/hooks/useAllowClear.d.ts +9 -0
- package/lib/tntd-select/rc-select/hooks/useAllowClear.d.ts.map +1 -0
- package/lib/tntd-select/rc-select/hooks/useAllowClear.js +35 -0
- package/lib/tntd-select/rc-select/hooks/useAllowClear.js.map +1 -0
- package/lib/tntd-select/rc-select/hooks/useBaseProps.d.ts +14 -0
- package/lib/tntd-select/rc-select/hooks/useBaseProps.d.ts.map +1 -0
- package/lib/tntd-select/rc-select/hooks/useBaseProps.js +21 -0
- package/lib/tntd-select/rc-select/hooks/useBaseProps.js.map +1 -0
- package/lib/tntd-select/rc-select/hooks/useCache.d.ts +8 -0
- package/lib/tntd-select/rc-select/hooks/useCache.d.ts.map +1 -0
- package/lib/tntd-select/rc-select/hooks/useCache.js +49 -0
- package/lib/tntd-select/rc-select/hooks/useCache.js.map +1 -0
- package/lib/tntd-select/rc-select/hooks/useDelayReset.d.ts +6 -0
- package/lib/tntd-select/rc-select/hooks/useDelayReset.d.ts.map +1 -0
- package/lib/{tntd-form/_util/hooks/useFlexGapSupport.js → tntd-select/rc-select/hooks/useDelayReset.js} +25 -9
- package/lib/tntd-select/rc-select/hooks/useDelayReset.js.map +1 -0
- package/lib/tntd-select/rc-select/hooks/useFilterOptions.d.ts +4 -0
- package/lib/tntd-select/rc-select/hooks/useFilterOptions.d.ts.map +1 -0
- package/lib/tntd-select/rc-select/hooks/useFilterOptions.js +72 -0
- package/lib/tntd-select/rc-select/hooks/useFilterOptions.js.map +1 -0
- package/lib/tntd-select/rc-select/hooks/useId.d.ts +6 -0
- package/lib/tntd-select/rc-select/hooks/useId.d.ts.map +1 -0
- package/lib/{tntd-form/_util/hooks/useForceUpdate.js → tntd-select/rc-select/hooks/useId.js} +32 -8
- package/lib/tntd-select/rc-select/hooks/useId.js.map +1 -0
- package/lib/tntd-select/rc-select/hooks/useLayoutEffect.d.ts +6 -0
- package/lib/tntd-select/rc-select/hooks/useLayoutEffect.d.ts.map +1 -0
- package/lib/tntd-select/rc-select/hooks/useLayoutEffect.js +26 -0
- package/lib/tntd-select/rc-select/hooks/useLayoutEffect.js.map +1 -0
- package/lib/tntd-select/rc-select/hooks/useLock.d.ts +8 -0
- package/lib/tntd-select/rc-select/hooks/useLock.d.ts.map +1 -0
- package/lib/tntd-select/rc-select/hooks/useLock.js +39 -0
- package/lib/tntd-select/rc-select/hooks/useLock.js.map +1 -0
- package/lib/tntd-select/rc-select/hooks/useOptions.d.ts +12 -0
- package/lib/tntd-select/rc-select/hooks/useOptions.d.ts.map +1 -0
- package/lib/tntd-select/rc-select/hooks/useOptions.js +53 -0
- package/lib/tntd-select/rc-select/hooks/useOptions.js.map +1 -0
- package/lib/tntd-select/rc-select/hooks/useRefFunc.d.ts +6 -0
- package/lib/tntd-select/rc-select/hooks/useRefFunc.d.ts.map +1 -0
- package/lib/tntd-select/rc-select/hooks/useRefFunc.js +22 -0
- package/lib/tntd-select/rc-select/hooks/useRefFunc.js.map +1 -0
- package/lib/tntd-select/rc-select/hooks/useSelectTriggerControl.d.ts +2 -0
- package/lib/tntd-select/rc-select/hooks/useSelectTriggerControl.d.ts.map +1 -0
- package/lib/tntd-select/rc-select/hooks/useSelectTriggerControl.js +43 -0
- package/lib/tntd-select/rc-select/hooks/useSelectTriggerControl.js.map +1 -0
- package/lib/tntd-select/rc-select/index.d.ts +11 -0
- package/lib/tntd-select/rc-select/index.d.ts.map +1 -0
- package/lib/tntd-select/rc-select/index.js +38 -0
- package/lib/tntd-select/rc-select/index.js.map +1 -0
- package/lib/tntd-select/rc-select/interface.d.ts +23 -0
- package/lib/tntd-select/rc-select/interface.d.ts.map +1 -0
- package/lib/tntd-select/rc-select/interface.js +5 -0
- package/lib/tntd-select/rc-select/interface.js.map +1 -0
- package/lib/tntd-select/rc-select/utils/commonUtil.d.ts +10 -0
- package/lib/tntd-select/rc-select/utils/commonUtil.d.ts.map +1 -0
- package/lib/tntd-select/rc-select/utils/commonUtil.js +43 -0
- package/lib/tntd-select/rc-select/utils/commonUtil.js.map +1 -0
- package/lib/tntd-select/rc-select/utils/keyUtil.d.ts +3 -0
- package/lib/tntd-select/rc-select/utils/keyUtil.d.ts.map +1 -0
- package/lib/tntd-select/rc-select/utils/keyUtil.js +16 -0
- package/lib/tntd-select/rc-select/utils/keyUtil.js.map +1 -0
- package/lib/tntd-select/rc-select/utils/legacyUtil.d.ts +4 -0
- package/lib/tntd-select/rc-select/utils/legacyUtil.d.ts.map +1 -0
- package/lib/tntd-select/rc-select/utils/legacyUtil.js +60 -0
- package/lib/tntd-select/rc-select/utils/legacyUtil.js.map +1 -0
- package/lib/tntd-select/rc-select/utils/platformUtil.d.ts +2 -0
- package/lib/tntd-select/rc-select/utils/platformUtil.d.ts.map +1 -0
- package/lib/tntd-select/rc-select/utils/platformUtil.js +10 -0
- package/lib/tntd-select/rc-select/utils/platformUtil.js.map +1 -0
- package/lib/tntd-select/rc-select/utils/valueUtil.d.ts +24 -0
- package/lib/tntd-select/rc-select/utils/valueUtil.d.ts.map +1 -0
- package/lib/tntd-select/rc-select/utils/valueUtil.js +132 -0
- package/lib/tntd-select/rc-select/utils/valueUtil.js.map +1 -0
- package/lib/tntd-select/rc-select/utils/warningPropsUtil.d.ts +5 -0
- package/lib/tntd-select/rc-select/utils/warningPropsUtil.d.ts.map +1 -0
- package/lib/tntd-select/rc-select/utils/warningPropsUtil.js +127 -0
- package/lib/tntd-select/rc-select/utils/warningPropsUtil.js.map +1 -0
- package/lib/tooltip/style/index.d.ts +3 -0
- package/lib/tooltip/style/index.d.ts.map +1 -0
- package/lib/tooltip/style/index.js +4 -0
- package/lib/tooltip/style/index.js.map +1 -0
- package/lib/tooltip/style/index.less +187 -0
- package/lib/transfer/style/customize.less +62 -0
- package/lib/transfer/style/index.d.ts +7 -0
- package/lib/transfer/style/index.d.ts.map +1 -0
- package/lib/transfer/style/index.js +8 -0
- package/lib/transfer/style/index.js.map +1 -0
- package/lib/transfer/style/index.less +191 -0
- package/lib/tree/style/directory.less +95 -0
- package/lib/tree/style/index.d.ts +3 -0
- package/lib/tree/style/index.d.ts.map +1 -0
- package/lib/tree/style/index.js +4 -0
- package/lib/tree/style/index.js.map +1 -0
- package/lib/tree/style/index.less +280 -0
- package/lib/tree/style/mixin.less +29 -0
- package/lib/tree-select/style/index.d.ts +5 -0
- package/lib/tree-select/style/index.d.ts.map +1 -0
- package/lib/tree-select/style/index.js +6 -0
- package/lib/tree-select/style/index.js.map +1 -0
- package/lib/tree-select/style/index.less +191 -0
- package/lib/typography/style/index.d.ts +5 -0
- package/lib/typography/style/index.d.ts.map +1 -0
- package/lib/typography/style/index.js +6 -0
- package/lib/typography/style/index.js.map +1 -0
- package/lib/typography/style/index.less +204 -0
- package/lib/upload/style/index.d.ts +5 -0
- package/lib/upload/style/index.d.ts.map +1 -0
- package/lib/upload/style/index.js +6 -0
- package/lib/upload/style/index.js.map +1 -0
- package/lib/upload/style/index.less +542 -0
- package/lib/utils/lang.d.ts.map +1 -1
- package/lib/utils/lang.js +5 -0
- package/lib/utils/lang.js.map +1 -1
- package/lib/version/style/index.d.ts +2 -0
- package/lib/version/style/index.d.ts.map +1 -0
- package/lib/version/style/index.js +3 -0
- package/lib/version/style/index.js.map +1 -0
- package/package.json +1 -1
- package/es/tntd-form/_util/context.js.map +0 -1
- package/es/tntd-form/_util/defaultRenderEmpty.js.map +0 -1
- package/es/tntd-form/_util/hooks/useFlexGapSupport.js +0 -9
- package/es/tntd-form/_util/hooks/useFlexGapSupport.js.map +0 -1
- package/es/tntd-form/_util/hooks/useForceUpdate.js +0 -5
- package/es/tntd-form/_util/hooks/useForceUpdate.js.map +0 -1
- package/es/tntd-form/_util/responsiveObserve.js +0 -59
- package/es/tntd-form/_util/responsiveObserve.js.map +0 -1
- package/es/tntd-form/_util/styleChecker.js +0 -26
- package/es/tntd-form/_util/styleChecker.js.map +0 -1
- package/es/tntd-form/grid/RowContext.js.map +0 -1
- package/es/tntd-form/grid/col.js.map +0 -1
- package/es/tntd-form/grid/hooks/useBreakpoint.js.map +0 -1
- package/es/tntd-form/grid/index.js.map +0 -1
- package/es/tntd-form/grid/row.js.map +0 -1
- package/es/tntd-form/grid/style/index.js.map +0 -1
- package/lib/tntd-form/_util/context.d.ts.map +0 -1
- package/lib/tntd-form/_util/context.js.map +0 -1
- package/lib/tntd-form/_util/defaultRenderEmpty.d.ts.map +0 -1
- package/lib/tntd-form/_util/defaultRenderEmpty.js.map +0 -1
- package/lib/tntd-form/_util/hooks/useFlexGapSupport.d.ts +0 -3
- package/lib/tntd-form/_util/hooks/useFlexGapSupport.d.ts.map +0 -1
- package/lib/tntd-form/_util/hooks/useFlexGapSupport.js.map +0 -1
- package/lib/tntd-form/_util/hooks/useForceUpdate.d.ts +0 -3
- package/lib/tntd-form/_util/hooks/useForceUpdate.d.ts.map +0 -1
- package/lib/tntd-form/_util/hooks/useForceUpdate.js.map +0 -1
- package/lib/tntd-form/_util/responsiveObserve.d.ts +0 -22
- package/lib/tntd-form/_util/responsiveObserve.d.ts.map +0 -1
- package/lib/tntd-form/_util/responsiveObserve.js +0 -73
- package/lib/tntd-form/_util/responsiveObserve.js.map +0 -1
- package/lib/tntd-form/_util/styleChecker.d.ts +0 -5
- package/lib/tntd-form/_util/styleChecker.d.ts.map +0 -1
- package/lib/tntd-form/_util/styleChecker.js +0 -42
- package/lib/tntd-form/_util/styleChecker.js.map +0 -1
- package/lib/tntd-form/grid/RowContext.d.ts.map +0 -1
- package/lib/tntd-form/grid/RowContext.js.map +0 -1
- package/lib/tntd-form/grid/col.d.ts.map +0 -1
- package/lib/tntd-form/grid/col.js.map +0 -1
- package/lib/tntd-form/grid/hooks/useBreakpoint.d.ts.map +0 -1
- package/lib/tntd-form/grid/hooks/useBreakpoint.js.map +0 -1
- package/lib/tntd-form/grid/index.d.ts.map +0 -1
- package/lib/tntd-form/grid/index.js.map +0 -1
- package/lib/tntd-form/grid/row.d.ts.map +0 -1
- package/lib/tntd-form/grid/row.js.map +0 -1
- package/lib/tntd-form/grid/style/index.d.ts.map +0 -1
- package/lib/tntd-form/grid/style/index.js.map +0 -1
- /package/es/{tntd-form/grid → affix}/style/index.js +0 -0
- /package/es/{tntd-form/grid → grid-v4}/RowContext.js +0 -0
- /package/es/{tntd-form/grid → grid-v4}/hooks/useBreakpoint.js +0 -0
- /package/es/{tntd-form/grid → grid-v4}/index.js +0 -0
- /package/es/{tntd-form → tntd-select}/_util/context.js +0 -0
- /package/es/{tntd-form → tntd-select}/_util/defaultRenderEmpty.js +0 -0
- /package/lib/{tntd-form/grid → affix}/style/index.d.ts +0 -0
- /package/lib/{tntd-form/grid → affix}/style/index.js +0 -0
- /package/lib/{tntd-form/grid → grid-v4}/RowContext.d.ts +0 -0
- /package/lib/{tntd-form/grid → grid-v4}/RowContext.js +0 -0
- /package/lib/{tntd-form/grid → grid-v4}/col.d.ts +0 -0
- /package/lib/{tntd-form/grid → grid-v4}/col.js +0 -0
- /package/lib/{tntd-form/grid → grid-v4}/hooks/useBreakpoint.d.ts +0 -0
- /package/lib/{tntd-form/grid → grid-v4}/hooks/useBreakpoint.js +0 -0
- /package/lib/{tntd-form/grid → grid-v4}/index.d.ts +0 -0
- /package/lib/{tntd-form/grid → grid-v4}/index.js +0 -0
- /package/lib/{tntd-form/grid → grid-v4}/row.d.ts +0 -0
- /package/lib/{tntd-form → tntd-select}/_util/context.d.ts +0 -0
- /package/lib/{tntd-form → tntd-select}/_util/context.js +0 -0
- /package/lib/{tntd-form → tntd-select}/_util/defaultRenderEmpty.d.ts +0 -0
- /package/lib/{tntd-form → tntd-select}/_util/defaultRenderEmpty.js +0 -0
|
@@ -0,0 +1,509 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
var _useMergedState5 = _interopRequireDefault(require("rc-util/lib/hooks/useMergedState"));
|
|
8
|
+
var _warning = _interopRequireDefault(require("rc-util/lib/warning"));
|
|
9
|
+
var React = _interopRequireWildcard(require("react"));
|
|
10
|
+
var _BaseSelect = _interopRequireWildcard(require("./BaseSelect"));
|
|
11
|
+
var _OptGroup = _interopRequireDefault(require("./OptGroup"));
|
|
12
|
+
var _Option = _interopRequireDefault(require("./Option"));
|
|
13
|
+
var _OptionList = _interopRequireDefault(require("./OptionList"));
|
|
14
|
+
var _SelectContext = _interopRequireDefault(require("./SelectContext"));
|
|
15
|
+
var _useCache3 = _interopRequireDefault(require("./hooks/useCache"));
|
|
16
|
+
var _useFilterOptions = _interopRequireDefault(require("./hooks/useFilterOptions"));
|
|
17
|
+
var _useId = _interopRequireDefault(require("./hooks/useId"));
|
|
18
|
+
var _useOptions = _interopRequireDefault(require("./hooks/useOptions"));
|
|
19
|
+
var _useRefFunc = _interopRequireDefault(require("./hooks/useRefFunc"));
|
|
20
|
+
var _commonUtil = require("./utils/commonUtil");
|
|
21
|
+
var _valueUtil = require("./utils/valueUtil");
|
|
22
|
+
var _warningPropsUtil = _interopRequireWildcard(require("./utils/warningPropsUtil"));
|
|
23
|
+
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); }
|
|
24
|
+
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; }
|
|
25
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
26
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
27
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
28
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
29
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
30
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
31
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
32
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
33
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
34
|
+
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."); }
|
|
35
|
+
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); }
|
|
36
|
+
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; }
|
|
37
|
+
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; } }
|
|
38
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
39
|
+
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); }
|
|
40
|
+
/**
|
|
41
|
+
* To match accessibility requirement, we always provide an input in the component.
|
|
42
|
+
* Other element will not set `tabIndex` to avoid `onBlur` sequence problem.
|
|
43
|
+
* For focused select, we set `aria-live="polite"` to update the accessibility content.
|
|
44
|
+
*
|
|
45
|
+
* ref:
|
|
46
|
+
* - keyboard: https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/listbox_role#Keyboard_interactions
|
|
47
|
+
*
|
|
48
|
+
* New api:
|
|
49
|
+
* - listHeight
|
|
50
|
+
* - listItemHeight
|
|
51
|
+
* - component
|
|
52
|
+
*
|
|
53
|
+
* Remove deprecated api:
|
|
54
|
+
* - multiple
|
|
55
|
+
* - tags
|
|
56
|
+
* - combobox
|
|
57
|
+
* - firstActiveValue
|
|
58
|
+
* - dropdownMenuStyle
|
|
59
|
+
* - openClassName (Not list in api)
|
|
60
|
+
*
|
|
61
|
+
* Update:
|
|
62
|
+
* - `backfill` only support `combobox` mode
|
|
63
|
+
* - `combobox` mode not support `labelInValue` since it's meaningless
|
|
64
|
+
* - `getInputElement` only support `combobox` mode
|
|
65
|
+
* - `onChange` return OptionData instead of ReactNode
|
|
66
|
+
* - `filterOption` `onChange` `onSelect` accept OptionData instead of ReactNode
|
|
67
|
+
* - `combobox` mode trigger `onChange` will get `undefined` if no `value` match in Option
|
|
68
|
+
* - `combobox` mode not support `optionLabelProp`
|
|
69
|
+
*/
|
|
70
|
+
var __rest = void 0 && (void 0).__rest || function (s, e) {
|
|
71
|
+
var t = {};
|
|
72
|
+
for (var p in s) {
|
|
73
|
+
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
74
|
+
}
|
|
75
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
76
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
77
|
+
}
|
|
78
|
+
return t;
|
|
79
|
+
};
|
|
80
|
+
var OMIT_DOM_PROPS = ['inputValue'];
|
|
81
|
+
function isRawValue(value) {
|
|
82
|
+
return !value || _typeof(value) !== 'object';
|
|
83
|
+
}
|
|
84
|
+
var Select = React.forwardRef(function (props, ref) {
|
|
85
|
+
var id = props.id,
|
|
86
|
+
mode = props.mode,
|
|
87
|
+
_props$prefixCls = props.prefixCls,
|
|
88
|
+
prefixCls = _props$prefixCls === void 0 ? 'rc-select' : _props$prefixCls,
|
|
89
|
+
backfill = props.backfill,
|
|
90
|
+
fieldNames = props.fieldNames,
|
|
91
|
+
inputValue = props.inputValue,
|
|
92
|
+
searchValue = props.searchValue,
|
|
93
|
+
onSearch = props.onSearch,
|
|
94
|
+
_props$autoClearSearc = props.autoClearSearchValue,
|
|
95
|
+
autoClearSearchValue = _props$autoClearSearc === void 0 ? true : _props$autoClearSearc,
|
|
96
|
+
onSelect = props.onSelect,
|
|
97
|
+
onDeselect = props.onDeselect,
|
|
98
|
+
_props$dropdownMatchS = props.dropdownMatchSelectWidth,
|
|
99
|
+
dropdownMatchSelectWidth = _props$dropdownMatchS === void 0 ? true : _props$dropdownMatchS,
|
|
100
|
+
filterOption = props.filterOption,
|
|
101
|
+
filterSort = props.filterSort,
|
|
102
|
+
optionFilterProp = props.optionFilterProp,
|
|
103
|
+
optionLabelProp = props.optionLabelProp,
|
|
104
|
+
options = props.options,
|
|
105
|
+
optionRender = props.optionRender,
|
|
106
|
+
children = props.children,
|
|
107
|
+
defaultActiveFirstOption = props.defaultActiveFirstOption,
|
|
108
|
+
menuItemSelectedIcon = props.menuItemSelectedIcon,
|
|
109
|
+
virtual = props.virtual,
|
|
110
|
+
direction = props.direction,
|
|
111
|
+
_props$listHeight = props.listHeight,
|
|
112
|
+
listHeight = _props$listHeight === void 0 ? 200 : _props$listHeight,
|
|
113
|
+
_props$listItemHeight = props.listItemHeight,
|
|
114
|
+
listItemHeight = _props$listItemHeight === void 0 ? 20 : _props$listItemHeight,
|
|
115
|
+
value = props.value,
|
|
116
|
+
defaultValue = props.defaultValue,
|
|
117
|
+
labelInValue = props.labelInValue,
|
|
118
|
+
onChange = props.onChange,
|
|
119
|
+
restProps = __rest(props, ["id", "mode", "prefixCls", "backfill", "fieldNames", "inputValue", "searchValue", "onSearch", "autoClearSearchValue", "onSelect", "onDeselect", "dropdownMatchSelectWidth", "filterOption", "filterSort", "optionFilterProp", "optionLabelProp", "options", "optionRender", "children", "defaultActiveFirstOption", "menuItemSelectedIcon", "virtual", "direction", "listHeight", "listItemHeight", "value", "defaultValue", "labelInValue", "onChange"]);
|
|
120
|
+
var mergedId = (0, _useId["default"])(id);
|
|
121
|
+
var multiple = (0, _BaseSelect.isMultiple)(mode);
|
|
122
|
+
var childrenAsData = !!(!options && children);
|
|
123
|
+
var mergedFilterOption = React.useMemo(function () {
|
|
124
|
+
if (filterOption === undefined && mode === 'combobox') {
|
|
125
|
+
return false;
|
|
126
|
+
}
|
|
127
|
+
return filterOption;
|
|
128
|
+
}, [filterOption, mode]);
|
|
129
|
+
// ========================= FieldNames =========================
|
|
130
|
+
var mergedFieldNames = React.useMemo(function () {
|
|
131
|
+
return (0, _valueUtil.fillFieldNames)(fieldNames, childrenAsData);
|
|
132
|
+
}, /* eslint-disable react-hooks/exhaustive-deps */
|
|
133
|
+
[
|
|
134
|
+
// We stringify fieldNames to avoid unnecessary re-renders.
|
|
135
|
+
JSON.stringify(fieldNames), childrenAsData]);
|
|
136
|
+
// =========================== Search ===========================
|
|
137
|
+
var _useMergedState = (0, _useMergedState5["default"])('', {
|
|
138
|
+
value: searchValue !== undefined ? searchValue : inputValue,
|
|
139
|
+
postState: function postState(search) {
|
|
140
|
+
return search || '';
|
|
141
|
+
}
|
|
142
|
+
}),
|
|
143
|
+
_useMergedState2 = _slicedToArray(_useMergedState, 2),
|
|
144
|
+
mergedSearchValue = _useMergedState2[0],
|
|
145
|
+
setSearchValue = _useMergedState2[1];
|
|
146
|
+
// =========================== Option ===========================
|
|
147
|
+
var parsedOptions = (0, _useOptions["default"])(options, children, mergedFieldNames, optionFilterProp, optionLabelProp);
|
|
148
|
+
var valueOptions = parsedOptions.valueOptions,
|
|
149
|
+
labelOptions = parsedOptions.labelOptions,
|
|
150
|
+
mergedOptions = parsedOptions.options;
|
|
151
|
+
// ========================= Wrap Value =========================
|
|
152
|
+
var convert2LabelValues = React.useCallback(function (draftValues) {
|
|
153
|
+
// Convert to array
|
|
154
|
+
var valueList = (0, _commonUtil.toArray)(draftValues);
|
|
155
|
+
// Convert to labelInValue type
|
|
156
|
+
return valueList.map(function (val) {
|
|
157
|
+
var _a, _b;
|
|
158
|
+
var rawValue;
|
|
159
|
+
var rawLabel;
|
|
160
|
+
var rawKey;
|
|
161
|
+
var rawDisabled;
|
|
162
|
+
var rawTitle;
|
|
163
|
+
// Fill label & value
|
|
164
|
+
if (isRawValue(val)) {
|
|
165
|
+
rawValue = val;
|
|
166
|
+
} else {
|
|
167
|
+
rawKey = val.key;
|
|
168
|
+
rawLabel = val.label;
|
|
169
|
+
rawValue = (_a = val.value) !== null && _a !== void 0 ? _a : rawKey;
|
|
170
|
+
}
|
|
171
|
+
var option = valueOptions.get(rawValue);
|
|
172
|
+
if (option) {
|
|
173
|
+
// Fill missing props
|
|
174
|
+
if (rawLabel === undefined) rawLabel = option === null || option === void 0 ? void 0 : option[optionLabelProp || mergedFieldNames.label];
|
|
175
|
+
if (rawKey === undefined) rawKey = (_b = option === null || option === void 0 ? void 0 : option.key) !== null && _b !== void 0 ? _b : rawValue;
|
|
176
|
+
rawDisabled = option === null || option === void 0 ? void 0 : option.disabled;
|
|
177
|
+
rawTitle = option === null || option === void 0 ? void 0 : option.title;
|
|
178
|
+
// Warning if label not same as provided
|
|
179
|
+
if (process.env.NODE_ENV !== 'production' && !optionLabelProp) {
|
|
180
|
+
var optionLabel = option === null || option === void 0 ? void 0 : option[mergedFieldNames.label];
|
|
181
|
+
if (optionLabel !== undefined && !React.isValidElement(optionLabel) && !React.isValidElement(rawLabel) && optionLabel !== rawLabel) {
|
|
182
|
+
(0, _warning["default"])(false, '`label` of `value` is not same as `label` in Select options.');
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
return {
|
|
187
|
+
label: rawLabel,
|
|
188
|
+
value: rawValue,
|
|
189
|
+
key: rawKey,
|
|
190
|
+
disabled: rawDisabled,
|
|
191
|
+
title: rawTitle
|
|
192
|
+
};
|
|
193
|
+
});
|
|
194
|
+
}, [mergedFieldNames, optionLabelProp, valueOptions]);
|
|
195
|
+
// =========================== Values ===========================
|
|
196
|
+
var _useMergedState3 = (0, _useMergedState5["default"])(defaultValue, {
|
|
197
|
+
value: value
|
|
198
|
+
}),
|
|
199
|
+
_useMergedState4 = _slicedToArray(_useMergedState3, 2),
|
|
200
|
+
internalValue = _useMergedState4[0],
|
|
201
|
+
setInternalValue = _useMergedState4[1];
|
|
202
|
+
// Merged value with LabelValueType
|
|
203
|
+
var rawLabeledValues = React.useMemo(function () {
|
|
204
|
+
var _a;
|
|
205
|
+
var values = convert2LabelValues(internalValue);
|
|
206
|
+
// combobox no need save value when it's no value (exclude value equal 0)
|
|
207
|
+
if (mode === 'combobox' && (0, _commonUtil.isComboNoValue)((_a = values[0]) === null || _a === void 0 ? void 0 : _a.value)) {
|
|
208
|
+
return [];
|
|
209
|
+
}
|
|
210
|
+
return values;
|
|
211
|
+
}, [internalValue, convert2LabelValues, mode]);
|
|
212
|
+
// Fill label with cache to avoid option remove
|
|
213
|
+
var _useCache = (0, _useCache3["default"])(rawLabeledValues, valueOptions),
|
|
214
|
+
_useCache2 = _slicedToArray(_useCache, 2),
|
|
215
|
+
mergedValues = _useCache2[0],
|
|
216
|
+
getMixedOption = _useCache2[1];
|
|
217
|
+
var displayValues = React.useMemo(function () {
|
|
218
|
+
// `null` need show as placeholder instead
|
|
219
|
+
// https://github.com/ant-design/ant-design/issues/25057
|
|
220
|
+
if (!mode && mergedValues.length === 1) {
|
|
221
|
+
var firstValue = mergedValues[0];
|
|
222
|
+
if (firstValue.value === null && (firstValue.label === null || firstValue.label === undefined)) {
|
|
223
|
+
return [];
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
return mergedValues.map(function (item) {
|
|
227
|
+
var _a;
|
|
228
|
+
return Object.assign(Object.assign({}, item), {
|
|
229
|
+
label: (_a = item.label) !== null && _a !== void 0 ? _a : item.value
|
|
230
|
+
});
|
|
231
|
+
});
|
|
232
|
+
}, [mode, mergedValues]);
|
|
233
|
+
/** Convert `displayValues` to raw value type set */
|
|
234
|
+
var rawValues = React.useMemo(function () {
|
|
235
|
+
return new Set(mergedValues.map(function (val) {
|
|
236
|
+
return val.value;
|
|
237
|
+
}));
|
|
238
|
+
}, [mergedValues]);
|
|
239
|
+
React.useEffect(function () {
|
|
240
|
+
var _a;
|
|
241
|
+
if (mode === 'combobox') {
|
|
242
|
+
var strValue = (_a = mergedValues[0]) === null || _a === void 0 ? void 0 : _a.value;
|
|
243
|
+
setSearchValue((0, _commonUtil.hasValue)(strValue) ? String(strValue) : '');
|
|
244
|
+
}
|
|
245
|
+
}, [mergedValues]);
|
|
246
|
+
// ======================= Display Option =======================
|
|
247
|
+
// Create a placeholder item if not exist in `options`
|
|
248
|
+
var createTagOption = (0, _useRefFunc["default"])(function (val, label) {
|
|
249
|
+
var _ref;
|
|
250
|
+
var mergedLabel = label !== null && label !== void 0 ? label : val;
|
|
251
|
+
return _ref = {}, _defineProperty(_ref, mergedFieldNames.value, val), _defineProperty(_ref, mergedFieldNames.label, mergedLabel), _ref;
|
|
252
|
+
});
|
|
253
|
+
// Fill tag as option if mode is `tags`
|
|
254
|
+
var filledTagOptions = React.useMemo(function () {
|
|
255
|
+
if (mode !== 'tags') {
|
|
256
|
+
return mergedOptions;
|
|
257
|
+
}
|
|
258
|
+
// >>> Tag mode
|
|
259
|
+
var cloneOptions = _toConsumableArray(mergedOptions);
|
|
260
|
+
// Check if value exist in options (include new patch item)
|
|
261
|
+
var existOptions = function existOptions(val) {
|
|
262
|
+
return valueOptions.has(val);
|
|
263
|
+
};
|
|
264
|
+
// Fill current value as option
|
|
265
|
+
_toConsumableArray(mergedValues).sort(function (a, b) {
|
|
266
|
+
return a.value < b.value ? -1 : 1;
|
|
267
|
+
}).forEach(function (item) {
|
|
268
|
+
var val = item.value;
|
|
269
|
+
if (!existOptions(val)) {
|
|
270
|
+
cloneOptions.push(createTagOption(val, item.label));
|
|
271
|
+
}
|
|
272
|
+
});
|
|
273
|
+
return cloneOptions;
|
|
274
|
+
}, [createTagOption, mergedOptions, valueOptions, mergedValues, mode]);
|
|
275
|
+
var filteredOptions = (0, _useFilterOptions["default"])(filledTagOptions, mergedFieldNames, mergedSearchValue, mergedFilterOption, optionFilterProp);
|
|
276
|
+
// Fill options with search value if needed
|
|
277
|
+
var filledSearchOptions = React.useMemo(function () {
|
|
278
|
+
if (mode !== 'tags' || !mergedSearchValue || filteredOptions.some(function (item) {
|
|
279
|
+
return item[optionFilterProp || 'value'] === mergedSearchValue;
|
|
280
|
+
})) {
|
|
281
|
+
return filteredOptions;
|
|
282
|
+
}
|
|
283
|
+
// ignore when search value equal select input value
|
|
284
|
+
if (filteredOptions.some(function (item) {
|
|
285
|
+
return item[mergedFieldNames.value] === mergedSearchValue;
|
|
286
|
+
})) {
|
|
287
|
+
return filteredOptions;
|
|
288
|
+
}
|
|
289
|
+
// Fill search value as option
|
|
290
|
+
return [createTagOption(mergedSearchValue)].concat(_toConsumableArray(filteredOptions));
|
|
291
|
+
}, [createTagOption, optionFilterProp, mode, filteredOptions, mergedSearchValue, mergedFieldNames]);
|
|
292
|
+
var orderedFilteredOptions = React.useMemo(function () {
|
|
293
|
+
if (!filterSort) {
|
|
294
|
+
return filledSearchOptions;
|
|
295
|
+
}
|
|
296
|
+
return _toConsumableArray(filledSearchOptions).sort(function (a, b) {
|
|
297
|
+
return filterSort(a, b);
|
|
298
|
+
});
|
|
299
|
+
}, [filledSearchOptions, filterSort]);
|
|
300
|
+
var displayOptions = React.useMemo(function () {
|
|
301
|
+
return (0, _valueUtil.flattenOptions)(orderedFilteredOptions, {
|
|
302
|
+
fieldNames: mergedFieldNames,
|
|
303
|
+
childrenAsData: childrenAsData
|
|
304
|
+
});
|
|
305
|
+
}, [orderedFilteredOptions, mergedFieldNames, childrenAsData]);
|
|
306
|
+
// =========================== Change ===========================
|
|
307
|
+
var triggerChange = function triggerChange(values) {
|
|
308
|
+
var labeledValues = convert2LabelValues(values);
|
|
309
|
+
setInternalValue(labeledValues);
|
|
310
|
+
if (onChange && (
|
|
311
|
+
// Trigger event only when value changed
|
|
312
|
+
labeledValues.length !== mergedValues.length || labeledValues.some(function (newVal, index) {
|
|
313
|
+
var _a;
|
|
314
|
+
return ((_a = mergedValues[index]) === null || _a === void 0 ? void 0 : _a.value) !== (newVal === null || newVal === void 0 ? void 0 : newVal.value);
|
|
315
|
+
}))) {
|
|
316
|
+
var returnValues = labelInValue ? labeledValues : labeledValues.map(function (v) {
|
|
317
|
+
return v.value;
|
|
318
|
+
});
|
|
319
|
+
var returnOptions = labeledValues.map(function (v) {
|
|
320
|
+
return (0, _valueUtil.injectPropsWithOption)(getMixedOption(v.value));
|
|
321
|
+
});
|
|
322
|
+
onChange(
|
|
323
|
+
// Value
|
|
324
|
+
multiple ? returnValues : returnValues[0],
|
|
325
|
+
// Option
|
|
326
|
+
multiple ? returnOptions : returnOptions[0]);
|
|
327
|
+
}
|
|
328
|
+
};
|
|
329
|
+
// ======================= Accessibility ========================
|
|
330
|
+
var _React$useState = React.useState(null),
|
|
331
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
332
|
+
activeValue = _React$useState2[0],
|
|
333
|
+
setActiveValue = _React$useState2[1];
|
|
334
|
+
var _React$useState3 = React.useState(0),
|
|
335
|
+
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
336
|
+
accessibilityIndex = _React$useState4[0],
|
|
337
|
+
setAccessibilityIndex = _React$useState4[1];
|
|
338
|
+
var mergedDefaultActiveFirstOption = defaultActiveFirstOption !== undefined ? defaultActiveFirstOption : mode !== 'combobox';
|
|
339
|
+
var onActiveValue = React.useCallback(function (active, index) {
|
|
340
|
+
var _ref2 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},
|
|
341
|
+
_ref2$source = _ref2.source,
|
|
342
|
+
source = _ref2$source === void 0 ? 'keyboard' : _ref2$source;
|
|
343
|
+
setAccessibilityIndex(index);
|
|
344
|
+
if (backfill && mode === 'combobox' && active !== null && source === 'keyboard') {
|
|
345
|
+
setActiveValue(String(active));
|
|
346
|
+
}
|
|
347
|
+
}, [backfill, mode]);
|
|
348
|
+
// ========================= OptionList =========================
|
|
349
|
+
var triggerSelect = function triggerSelect(val, selected, type) {
|
|
350
|
+
var getSelectEnt = function getSelectEnt() {
|
|
351
|
+
var _a;
|
|
352
|
+
var option = getMixedOption(val);
|
|
353
|
+
return [labelInValue ? {
|
|
354
|
+
label: option === null || option === void 0 ? void 0 : option[mergedFieldNames.label],
|
|
355
|
+
value: val,
|
|
356
|
+
key: (_a = option === null || option === void 0 ? void 0 : option.key) !== null && _a !== void 0 ? _a : val
|
|
357
|
+
} : val, (0, _valueUtil.injectPropsWithOption)(option)];
|
|
358
|
+
};
|
|
359
|
+
if (selected && onSelect) {
|
|
360
|
+
var _getSelectEnt = getSelectEnt(),
|
|
361
|
+
_getSelectEnt2 = _slicedToArray(_getSelectEnt, 2),
|
|
362
|
+
wrappedValue = _getSelectEnt2[0],
|
|
363
|
+
option = _getSelectEnt2[1];
|
|
364
|
+
onSelect(wrappedValue, option);
|
|
365
|
+
} else if (!selected && onDeselect && type !== 'clear') {
|
|
366
|
+
var _getSelectEnt3 = getSelectEnt(),
|
|
367
|
+
_getSelectEnt4 = _slicedToArray(_getSelectEnt3, 2),
|
|
368
|
+
_wrappedValue = _getSelectEnt4[0],
|
|
369
|
+
_option = _getSelectEnt4[1];
|
|
370
|
+
onDeselect(_wrappedValue, _option);
|
|
371
|
+
}
|
|
372
|
+
};
|
|
373
|
+
// Used for OptionList selection
|
|
374
|
+
var onInternalSelect = (0, _useRefFunc["default"])(function (val, info) {
|
|
375
|
+
var cloneValues;
|
|
376
|
+
// Single mode always trigger select only with option list
|
|
377
|
+
var mergedSelect = multiple ? info.selected : true;
|
|
378
|
+
if (mergedSelect) {
|
|
379
|
+
cloneValues = multiple ? [].concat(_toConsumableArray(mergedValues), [val]) : [val];
|
|
380
|
+
} else {
|
|
381
|
+
cloneValues = mergedValues.filter(function (v) {
|
|
382
|
+
return v.value !== val;
|
|
383
|
+
});
|
|
384
|
+
}
|
|
385
|
+
triggerChange(cloneValues);
|
|
386
|
+
triggerSelect(val, mergedSelect);
|
|
387
|
+
// Clean search value if single or configured
|
|
388
|
+
if (mode === 'combobox') {
|
|
389
|
+
// setSearchValue(String(val));
|
|
390
|
+
setActiveValue('');
|
|
391
|
+
} else if (!_BaseSelect.isMultiple || autoClearSearchValue) {
|
|
392
|
+
setSearchValue('');
|
|
393
|
+
setActiveValue('');
|
|
394
|
+
}
|
|
395
|
+
});
|
|
396
|
+
// ======================= Display Change =======================
|
|
397
|
+
// BaseSelect display values change
|
|
398
|
+
var onDisplayValuesChange = function onDisplayValuesChange(nextValues, info) {
|
|
399
|
+
triggerChange(nextValues);
|
|
400
|
+
var type = info.type,
|
|
401
|
+
values = info.values;
|
|
402
|
+
if (type === 'remove' || type === 'clear') {
|
|
403
|
+
values.forEach(function (item) {
|
|
404
|
+
triggerSelect(item.value, false, type);
|
|
405
|
+
});
|
|
406
|
+
}
|
|
407
|
+
};
|
|
408
|
+
// =========================== Search ===========================
|
|
409
|
+
var onInternalSearch = function onInternalSearch(searchText, info) {
|
|
410
|
+
setSearchValue(searchText);
|
|
411
|
+
setActiveValue(null);
|
|
412
|
+
// [Submit] Tag mode should flush input
|
|
413
|
+
if (info.source === 'submit') {
|
|
414
|
+
var formatted = (searchText || '').trim();
|
|
415
|
+
// prevent empty tags from appearing when you click the Enter button
|
|
416
|
+
if (formatted) {
|
|
417
|
+
var newRawValues = Array.from(new Set([].concat(_toConsumableArray(rawValues), [formatted])));
|
|
418
|
+
triggerChange(newRawValues);
|
|
419
|
+
triggerSelect(formatted, true);
|
|
420
|
+
setSearchValue('');
|
|
421
|
+
}
|
|
422
|
+
return;
|
|
423
|
+
}
|
|
424
|
+
if (info.source !== 'blur') {
|
|
425
|
+
if (mode === 'combobox') {
|
|
426
|
+
triggerChange(searchText);
|
|
427
|
+
}
|
|
428
|
+
onSearch === null || onSearch === void 0 ? void 0 : onSearch(searchText);
|
|
429
|
+
}
|
|
430
|
+
};
|
|
431
|
+
var onInternalSearchSplit = function onInternalSearchSplit(words) {
|
|
432
|
+
var patchValues = words;
|
|
433
|
+
if (mode !== 'tags') {
|
|
434
|
+
patchValues = words.map(function (word) {
|
|
435
|
+
var opt = labelOptions.get(word);
|
|
436
|
+
return opt === null || opt === void 0 ? void 0 : opt.value;
|
|
437
|
+
}).filter(function (val) {
|
|
438
|
+
return val !== undefined;
|
|
439
|
+
});
|
|
440
|
+
}
|
|
441
|
+
var newRawValues = Array.from(new Set([].concat(_toConsumableArray(rawValues), _toConsumableArray(patchValues))));
|
|
442
|
+
triggerChange(newRawValues);
|
|
443
|
+
newRawValues.forEach(function (newRawValue) {
|
|
444
|
+
triggerSelect(newRawValue, true);
|
|
445
|
+
});
|
|
446
|
+
};
|
|
447
|
+
// ========================== Context ===========================
|
|
448
|
+
var selectContext = React.useMemo(function () {
|
|
449
|
+
var realVirtual = virtual !== false && dropdownMatchSelectWidth !== false;
|
|
450
|
+
return Object.assign(Object.assign({}, parsedOptions), {
|
|
451
|
+
flattenOptions: displayOptions,
|
|
452
|
+
onActiveValue: onActiveValue,
|
|
453
|
+
defaultActiveFirstOption: mergedDefaultActiveFirstOption,
|
|
454
|
+
onSelect: onInternalSelect,
|
|
455
|
+
menuItemSelectedIcon: menuItemSelectedIcon,
|
|
456
|
+
rawValues: rawValues,
|
|
457
|
+
fieldNames: mergedFieldNames,
|
|
458
|
+
virtual: realVirtual,
|
|
459
|
+
direction: direction,
|
|
460
|
+
listHeight: listHeight,
|
|
461
|
+
listItemHeight: listItemHeight,
|
|
462
|
+
childrenAsData: childrenAsData,
|
|
463
|
+
optionRender: optionRender
|
|
464
|
+
});
|
|
465
|
+
}, [parsedOptions, displayOptions, onActiveValue, mergedDefaultActiveFirstOption, onInternalSelect, menuItemSelectedIcon, rawValues, mergedFieldNames, virtual, dropdownMatchSelectWidth, listHeight, listItemHeight, childrenAsData, optionRender]);
|
|
466
|
+
// ========================== Warning ===========================
|
|
467
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
468
|
+
(0, _warningPropsUtil["default"])(props);
|
|
469
|
+
(0, _warningPropsUtil.warningNullOptions)(mergedOptions, mergedFieldNames);
|
|
470
|
+
}
|
|
471
|
+
// ==============================================================
|
|
472
|
+
// == Render ==
|
|
473
|
+
// ==============================================================
|
|
474
|
+
return React.createElement(_SelectContext["default"].Provider, {
|
|
475
|
+
value: selectContext
|
|
476
|
+
}, React.createElement(_BaseSelect["default"], Object.assign({}, restProps, {
|
|
477
|
+
// >>> MISC
|
|
478
|
+
id: mergedId,
|
|
479
|
+
prefixCls: prefixCls,
|
|
480
|
+
ref: ref,
|
|
481
|
+
omitDomProps: OMIT_DOM_PROPS,
|
|
482
|
+
mode: mode,
|
|
483
|
+
// >>> Values
|
|
484
|
+
displayValues: displayValues,
|
|
485
|
+
onDisplayValuesChange: onDisplayValuesChange,
|
|
486
|
+
// >>> Trigger
|
|
487
|
+
direction: direction,
|
|
488
|
+
// >>> Search
|
|
489
|
+
searchValue: mergedSearchValue,
|
|
490
|
+
onSearch: onInternalSearch,
|
|
491
|
+
autoClearSearchValue: autoClearSearchValue,
|
|
492
|
+
onSearchSplit: onInternalSearchSplit,
|
|
493
|
+
dropdownMatchSelectWidth: dropdownMatchSelectWidth,
|
|
494
|
+
// >>> OptionList
|
|
495
|
+
OptionList: _OptionList["default"],
|
|
496
|
+
emptyOptions: !displayOptions.length,
|
|
497
|
+
// >>> Accessibility
|
|
498
|
+
activeValue: activeValue,
|
|
499
|
+
activeDescendantId: "".concat(mergedId, "_list_").concat(accessibilityIndex)
|
|
500
|
+
})));
|
|
501
|
+
});
|
|
502
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
503
|
+
Select.displayName = 'Select';
|
|
504
|
+
}
|
|
505
|
+
var TypedSelect = Select;
|
|
506
|
+
TypedSelect.Option = _Option["default"];
|
|
507
|
+
TypedSelect.OptGroup = _OptGroup["default"];
|
|
508
|
+
var _default = TypedSelect;
|
|
509
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Select.js","sourceRoot":"","sources":["../../../src/tntd-select/rc-select/Select.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,sFAA8D;AAC9D,kEAA0C;AAC1C,6CAA+B;AAS/B,2DAAsD;AACtD,0DAA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AAc,EAC5B,IAAI,EAAE,IAAI;YACV,aAAa;YACb,aAAa,EAAE,aAAa,EAC5B,qBAAqB,EAAE,qBAAqB;YAC5C,cAAc;YACd,SAAS,EAAE,SAAS;YACpB,aAAa;YACb,WAAW,EAAE,iBAAiB,EAC9B,QAAQ,EAAE,gBAAgB,EAC1B,oBAAoB,EAAE,oBAAoB,EAC1C,aAAa,EAAE,qBAAqB,EACpC,wBAAwB,EAAE,wBAAwB;YAClD,iBAAiB;YACjB,UAAU,EAAE,oBAAU,EACtB,YAAY,EAAE,CAAC,cAAc,CAAC,MAAM;YACpC,oBAAoB;YACpB,WAAW,EAAE,WAAW,EACxB,kBAAkB,EAAE,GAAG,QAAQ,SAAS,kBAAkB,EAAE,IAC5D,CACqB,CAC1B,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,YAAY,EAAE;IACzC,MAAM,CAAC,WAAW,GAAG,QAAQ,CAAC;CAC/B;AAED,MAAM,WAAW,GAAG,MAUnB,CAAC;AAEF,WAAW,CAAC,MAAM,GAAG,gBAAM,CAAC;AAC5B,WAAW,CAAC,QAAQ,GAAG,kBAAQ,CAAC;AAEhC,kBAAe,WAAW,CAAC","sourcesContent":["/**\n * To match accessibility requirement, we always provide an input in the component.\n * Other element will not set `tabIndex` to avoid `onBlur` sequence problem.\n * For focused select, we set `aria-live=\"polite\"` to update the accessibility content.\n *\n * ref:\n * - keyboard: https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/listbox_role#Keyboard_interactions\n *\n * New api:\n * - listHeight\n * - listItemHeight\n * - component\n *\n * Remove deprecated api:\n * - multiple\n * - tags\n * - combobox\n * - firstActiveValue\n * - dropdownMenuStyle\n * - openClassName (Not list in api)\n *\n * Update:\n * - `backfill` only support `combobox` mode\n * - `combobox` mode not support `labelInValue` since it's meaningless\n * - `getInputElement` only support `combobox` mode\n * - `onChange` return OptionData instead of ReactNode\n * - `filterOption` `onChange` `onSelect` accept OptionData instead of ReactNode\n * - `combobox` mode trigger `onChange` will get `undefined` if no `value` match in Option\n * - `combobox` mode not support `optionLabelProp`\n */\n\nimport useMergedState from 'rc-util/lib/hooks/useMergedState';\nimport warning from 'rc-util/lib/warning';\nimport * as React from 'react';\nimport type {\n BaseSelectProps,\n BaseSelectPropsWithoutPrivate,\n BaseSelectRef,\n DisplayInfoType,\n DisplayValueType,\n RenderNode,\n} from './BaseSelect';\nimport BaseSelect, { isMultiple } from './BaseSelect';\nimport OptGroup from './OptGroup';\nimport Option from './Option';\nimport OptionList from './OptionList';\nimport SelectContext from './SelectContext';\nimport useCache from './hooks/useCache';\nimport useFilterOptions from './hooks/useFilterOptions';\nimport useId from './hooks/useId';\nimport useOptions from './hooks/useOptions';\nimport useRefFunc from './hooks/useRefFunc';\nimport type { FlattenOptionData } from './interface';\nimport { hasValue, isComboNoValue, toArray } from './utils/commonUtil';\nimport { fillFieldNames, flattenOptions, injectPropsWithOption } from './utils/valueUtil';\nimport warningProps, { warningNullOptions } from './utils/warningPropsUtil';\n\nconst OMIT_DOM_PROPS = ['inputValue'];\n\nexport type OnActiveValue = (\n active: RawValueType,\n index: number,\n info?: { source?: 'keyboard' | 'mouse' },\n) => void;\n\nexport type OnInternalSelect = (value: RawValueType, info: { selected: boolean }) => void;\n\nexport type RawValueType = string | number;\nexport interface LabelInValueType {\n label: React.ReactNode;\n value: RawValueType;\n /** @deprecated `key` is useless since it should always same as `value` */\n key?: React.Key;\n}\n\nexport type DraftValueType =\n | RawValueType\n | LabelInValueType\n | DisplayValueType\n | (RawValueType | LabelInValueType | DisplayValueType)[];\n\nexport type FilterFunc<OptionType> = (inputValue: string, option?: OptionType) => boolean;\n\nexport interface FieldNames {\n value?: string;\n label?: string;\n groupLabel?: string;\n options?: string;\n}\n\nexport interface BaseOptionType {\n disabled?: boolean;\n [name: string]: any;\n}\n\nexport interface DefaultOptionType extends BaseOptionType {\n label: React.ReactNode;\n value?: string | number | null;\n children?: Omit<DefaultOptionType, 'children'>[];\n}\n\nexport type SelectHandler<ValueType, OptionType extends BaseOptionType = DefaultOptionType> = (\n value: ValueType,\n option: OptionType,\n) => void;\n\ntype ArrayElementType<T> = T extends (infer E)[] ? E : T;\n\nexport interface SelectProps<ValueType = any, OptionType extends BaseOptionType = DefaultOptionType>\n extends BaseSelectPropsWithoutPrivate {\n prefixCls?: string;\n id?: string;\n\n backfill?: boolean;\n\n // >>> Field Names\n fieldNames?: FieldNames;\n\n // >>> Search\n /** @deprecated Use `searchValue` instead */\n inputValue?: string;\n searchValue?: string;\n onSearch?: (value: string) => void;\n autoClearSearchValue?: boolean;\n\n // >>> Select\n onSelect?: SelectHandler<ArrayElementType<ValueType>, OptionType>;\n onDeselect?: SelectHandler<ArrayElementType<ValueType>, OptionType>;\n\n // >>> Options\n /**\n * In Select, `false` means do nothing.\n * In TreeSelect, `false` will highlight match item.\n * It's by design.\n */\n filterOption?: boolean | FilterFunc<OptionType>;\n filterSort?: (optionA: OptionType, optionB: OptionType) => number;\n optionFilterProp?: string;\n optionLabelProp?: string;\n children?: React.ReactNode;\n options?: OptionType[];\n optionRender?: (\n oriOption: FlattenOptionData<BaseOptionType>,\n info: { index: number },\n ) => React.ReactNode;\n defaultActiveFirstOption?: boolean;\n virtual?: boolean;\n direction?: 'ltr' | 'rtl';\n listHeight?: number;\n listItemHeight?: number;\n\n // >>> Icon\n menuItemSelectedIcon?: RenderNode;\n\n mode?: 'combobox' | 'multiple' | 'tags';\n labelInValue?: boolean;\n value?: ValueType | null;\n defaultValue?: ValueType | null;\n onChange?: (value: ValueType, option: OptionType | OptionType[]) => void;\n}\n\nfunction isRawValue(value: DraftValueType): value is RawValueType {\n return !value || typeof value !== 'object';\n}\n\nconst Select = React.forwardRef(\n (props: SelectProps<any, DefaultOptionType>, ref: React.Ref<BaseSelectRef>) => {\n const {\n id,\n mode,\n prefixCls = 'rc-select',\n backfill,\n fieldNames,\n\n // Search\n inputValue,\n searchValue,\n onSearch,\n autoClearSearchValue = true,\n\n // Select\n onSelect,\n onDeselect,\n dropdownMatchSelectWidth = true,\n\n // Options\n filterOption,\n filterSort,\n optionFilterProp,\n optionLabelProp,\n options,\n optionRender,\n children,\n defaultActiveFirstOption,\n menuItemSelectedIcon,\n virtual,\n direction,\n listHeight = 200,\n listItemHeight = 20,\n\n // Value\n value,\n defaultValue,\n labelInValue,\n onChange,\n\n ...restProps\n } = props;\n\n const mergedId = useId(id);\n const multiple = isMultiple(mode);\n const childrenAsData = !!(!options && children);\n\n const mergedFilterOption = React.useMemo(() => {\n if (filterOption === undefined && mode === 'combobox') {\n return false;\n }\n return filterOption;\n }, [filterOption, mode]);\n\n // ========================= FieldNames =========================\n const mergedFieldNames = React.useMemo(\n () => fillFieldNames(fieldNames, childrenAsData),\n /* eslint-disable react-hooks/exhaustive-deps */\n [\n // We stringify fieldNames to avoid unnecessary re-renders.\n JSON.stringify(fieldNames),\n childrenAsData,\n ],\n /* eslint-enable react-hooks/exhaustive-deps */\n );\n\n // =========================== Search ===========================\n const [mergedSearchValue, setSearchValue] = useMergedState('', {\n value: searchValue !== undefined ? searchValue : inputValue,\n postState: (search) => search || '',\n });\n\n // =========================== Option ===========================\n const parsedOptions = useOptions(\n options,\n children,\n mergedFieldNames,\n optionFilterProp,\n optionLabelProp,\n );\n const { valueOptions, labelOptions, options: mergedOptions } = parsedOptions;\n\n // ========================= Wrap Value =========================\n const convert2LabelValues = React.useCallback(\n (draftValues: DraftValueType) => {\n // Convert to array\n const valueList = toArray(draftValues);\n\n // Convert to labelInValue type\n return valueList.map((val) => {\n let rawValue: RawValueType;\n let rawLabel: React.ReactNode;\n let rawKey: React.Key;\n let rawDisabled: boolean | undefined;\n let rawTitle: string;\n\n // Fill label & value\n if (isRawValue(val)) {\n rawValue = val;\n } else {\n rawKey = val.key;\n rawLabel = val.label;\n rawValue = val.value ?? rawKey;\n }\n\n const option = valueOptions.get(rawValue);\n if (option) {\n // Fill missing props\n if (rawLabel === undefined)\n rawLabel = option?.[optionLabelProp || mergedFieldNames.label];\n if (rawKey === undefined) rawKey = option?.key ?? rawValue;\n rawDisabled = option?.disabled;\n rawTitle = option?.title;\n\n // Warning if label not same as provided\n if (process.env.NODE_ENV !== 'production' && !optionLabelProp) {\n const optionLabel = option?.[mergedFieldNames.label];\n if (\n optionLabel !== undefined &&\n !React.isValidElement(optionLabel) &&\n !React.isValidElement(rawLabel) &&\n optionLabel !== rawLabel\n ) {\n warning(false, '`label` of `value` is not same as `label` in Select options.');\n }\n }\n }\n\n return {\n label: rawLabel,\n value: rawValue,\n key: rawKey,\n disabled: rawDisabled,\n title: rawTitle,\n };\n });\n },\n [mergedFieldNames, optionLabelProp, valueOptions],\n );\n\n // =========================== Values ===========================\n const [internalValue, setInternalValue] = useMergedState(defaultValue, {\n value,\n });\n\n // Merged value with LabelValueType\n const rawLabeledValues = React.useMemo(() => {\n const values = convert2LabelValues(internalValue);\n\n // combobox no need save value when it's no value (exclude value equal 0)\n if (mode === 'combobox' && isComboNoValue(values[0]?.value)) {\n return [];\n }\n\n return values;\n }, [internalValue, convert2LabelValues, mode]);\n\n // Fill label with cache to avoid option remove\n const [mergedValues, getMixedOption] = useCache(rawLabeledValues, valueOptions);\n\n const displayValues = React.useMemo(() => {\n // `null` need show as placeholder instead\n // https://github.com/ant-design/ant-design/issues/25057\n if (!mode && mergedValues.length === 1) {\n const firstValue = mergedValues[0];\n if (\n firstValue.value === null &&\n (firstValue.label === null || firstValue.label === undefined)\n ) {\n return [];\n }\n }\n\n return mergedValues.map((item) => ({\n ...item,\n label: item.label ?? item.value,\n }));\n }, [mode, mergedValues]);\n\n /** Convert `displayValues` to raw value type set */\n const rawValues = React.useMemo(\n () => new Set(mergedValues.map((val) => val.value)),\n [mergedValues],\n );\n\n React.useEffect(() => {\n if (mode === 'combobox') {\n const strValue = mergedValues[0]?.value;\n setSearchValue(hasValue(strValue) ? String(strValue) : '');\n }\n }, [mergedValues]);\n\n // ======================= Display Option =======================\n // Create a placeholder item if not exist in `options`\n const createTagOption = useRefFunc((val: RawValueType, label?: React.ReactNode) => {\n const mergedLabel = label ?? val;\n return {\n [mergedFieldNames.value]: val,\n [mergedFieldNames.label]: mergedLabel,\n } as DefaultOptionType;\n });\n\n // Fill tag as option if mode is `tags`\n const filledTagOptions = React.useMemo(() => {\n if (mode !== 'tags') {\n return mergedOptions;\n }\n\n // >>> Tag mode\n const cloneOptions = [...mergedOptions];\n\n // Check if value exist in options (include new patch item)\n const existOptions = (val: RawValueType) => valueOptions.has(val);\n\n // Fill current value as option\n [...mergedValues]\n .sort((a, b) => (a.value < b.value ? -1 : 1))\n .forEach((item) => {\n const val = item.value;\n\n if (!existOptions(val)) {\n cloneOptions.push(createTagOption(val, item.label));\n }\n });\n\n return cloneOptions;\n }, [createTagOption, mergedOptions, valueOptions, mergedValues, mode]);\n\n const filteredOptions = useFilterOptions(\n filledTagOptions,\n mergedFieldNames,\n mergedSearchValue,\n mergedFilterOption,\n optionFilterProp,\n );\n\n // Fill options with search value if needed\n const filledSearchOptions = React.useMemo(() => {\n if (\n mode !== 'tags' ||\n !mergedSearchValue ||\n filteredOptions.some((item) => item[optionFilterProp || 'value'] === mergedSearchValue)\n ) {\n return filteredOptions;\n }\n // ignore when search value equal select input value\n if (filteredOptions.some((item) => item[mergedFieldNames.value] === mergedSearchValue)) {\n return filteredOptions;\n }\n // Fill search value as option\n return [createTagOption(mergedSearchValue), ...filteredOptions];\n }, [\n createTagOption,\n optionFilterProp,\n mode,\n filteredOptions,\n mergedSearchValue,\n mergedFieldNames,\n ]);\n\n const orderedFilteredOptions = React.useMemo(() => {\n if (!filterSort) {\n return filledSearchOptions;\n }\n\n return [...filledSearchOptions].sort((a, b) => filterSort(a, b));\n }, [filledSearchOptions, filterSort]);\n\n const displayOptions = React.useMemo(\n () =>\n flattenOptions(orderedFilteredOptions, {\n fieldNames: mergedFieldNames,\n childrenAsData,\n }),\n [orderedFilteredOptions, mergedFieldNames, childrenAsData],\n );\n\n // =========================== Change ===========================\n const triggerChange = (values: DraftValueType) => {\n const labeledValues = convert2LabelValues(values);\n setInternalValue(labeledValues);\n\n if (\n onChange &&\n // Trigger event only when value changed\n (labeledValues.length !== mergedValues.length ||\n labeledValues.some((newVal, index) => mergedValues[index]?.value !== newVal?.value))\n ) {\n const returnValues = labelInValue ? labeledValues : labeledValues.map((v) => v.value);\n const returnOptions = labeledValues.map((v) =>\n injectPropsWithOption(getMixedOption(v.value)),\n );\n\n onChange(\n // Value\n multiple ? returnValues : returnValues[0],\n // Option\n multiple ? returnOptions : returnOptions[0],\n );\n }\n };\n\n // ======================= Accessibility ========================\n const [activeValue, setActiveValue] = React.useState<string>(null);\n const [accessibilityIndex, setAccessibilityIndex] = React.useState(0);\n const mergedDefaultActiveFirstOption =\n defaultActiveFirstOption !== undefined ? defaultActiveFirstOption : mode !== 'combobox';\n\n const onActiveValue: OnActiveValue = React.useCallback(\n (active, index, { source = 'keyboard' } = {}) => {\n setAccessibilityIndex(index);\n\n if (backfill && mode === 'combobox' && active !== null && source === 'keyboard') {\n setActiveValue(String(active));\n }\n },\n [backfill, mode],\n );\n\n // ========================= OptionList =========================\n const triggerSelect = (val: RawValueType, selected: boolean, type?: DisplayInfoType) => {\n const getSelectEnt = (): [RawValueType | LabelInValueType, DefaultOptionType] => {\n const option = getMixedOption(val);\n return [\n labelInValue\n ? {\n label: option?.[mergedFieldNames.label],\n value: val,\n key: option?.key ?? val,\n }\n : val,\n injectPropsWithOption(option),\n ];\n };\n\n if (selected && onSelect) {\n const [wrappedValue, option] = getSelectEnt();\n onSelect(wrappedValue, option);\n } else if (!selected && onDeselect && type !== 'clear') {\n const [wrappedValue, option] = getSelectEnt();\n onDeselect(wrappedValue, option);\n }\n };\n\n // Used for OptionList selection\n const onInternalSelect = useRefFunc<OnInternalSelect>((val, info) => {\n let cloneValues: (RawValueType | DisplayValueType)[];\n\n // Single mode always trigger select only with option list\n const mergedSelect = multiple ? info.selected : true;\n\n if (mergedSelect) {\n cloneValues = multiple ? [...mergedValues, val] : [val];\n } else {\n cloneValues = mergedValues.filter((v) => v.value !== val);\n }\n\n triggerChange(cloneValues);\n triggerSelect(val, mergedSelect);\n\n // Clean search value if single or configured\n if (mode === 'combobox') {\n // setSearchValue(String(val));\n setActiveValue('');\n } else if (!isMultiple || autoClearSearchValue) {\n setSearchValue('');\n setActiveValue('');\n }\n });\n\n // ======================= Display Change =======================\n // BaseSelect display values change\n const onDisplayValuesChange: BaseSelectProps['onDisplayValuesChange'] = (nextValues, info) => {\n triggerChange(nextValues);\n const { type, values } = info;\n\n if (type === 'remove' || type === 'clear') {\n values.forEach((item) => {\n triggerSelect(item.value, false, type);\n });\n }\n };\n\n // =========================== Search ===========================\n const onInternalSearch: BaseSelectProps['onSearch'] = (searchText, info) => {\n setSearchValue(searchText);\n setActiveValue(null);\n\n // [Submit] Tag mode should flush input\n if (info.source === 'submit') {\n const formatted = (searchText || '').trim();\n // prevent empty tags from appearing when you click the Enter button\n if (formatted) {\n const newRawValues = Array.from(new Set<RawValueType>([...rawValues, formatted]));\n triggerChange(newRawValues);\n triggerSelect(formatted, true);\n setSearchValue('');\n }\n\n return;\n }\n\n if (info.source !== 'blur') {\n if (mode === 'combobox') {\n triggerChange(searchText);\n }\n\n onSearch?.(searchText);\n }\n };\n\n const onInternalSearchSplit: BaseSelectProps['onSearchSplit'] = (words) => {\n let patchValues: RawValueType[] = words;\n\n if (mode !== 'tags') {\n patchValues = words\n .map((word) => {\n const opt = labelOptions.get(word);\n return opt?.value;\n })\n .filter((val) => val !== undefined);\n }\n\n const newRawValues = Array.from(new Set<RawValueType>([...rawValues, ...patchValues]));\n triggerChange(newRawValues);\n newRawValues.forEach((newRawValue) => {\n triggerSelect(newRawValue, true);\n });\n };\n\n // ========================== Context ===========================\n const selectContext = React.useMemo(() => {\n const realVirtual = virtual !== false && dropdownMatchSelectWidth !== false;\n return {\n ...parsedOptions,\n flattenOptions: displayOptions,\n onActiveValue,\n defaultActiveFirstOption: mergedDefaultActiveFirstOption,\n onSelect: onInternalSelect,\n menuItemSelectedIcon,\n rawValues,\n fieldNames: mergedFieldNames,\n virtual: realVirtual,\n direction,\n listHeight,\n listItemHeight,\n childrenAsData,\n optionRender,\n };\n }, [\n parsedOptions,\n displayOptions,\n onActiveValue,\n mergedDefaultActiveFirstOption,\n onInternalSelect,\n menuItemSelectedIcon,\n rawValues,\n mergedFieldNames,\n virtual,\n dropdownMatchSelectWidth,\n listHeight,\n listItemHeight,\n childrenAsData,\n optionRender,\n ]);\n\n // ========================== Warning ===========================\n if (process.env.NODE_ENV !== 'production') {\n warningProps(props);\n warningNullOptions(mergedOptions, mergedFieldNames);\n }\n\n // ==============================================================\n // == Render ==\n // ==============================================================\n return (\n <SelectContext.Provider value={selectContext}>\n <BaseSelect\n {...restProps}\n // >>> MISC\n id={mergedId}\n prefixCls={prefixCls}\n ref={ref}\n omitDomProps={OMIT_DOM_PROPS}\n mode={mode}\n // >>> Values\n displayValues={displayValues}\n onDisplayValuesChange={onDisplayValuesChange}\n // >>> Trigger\n direction={direction}\n // >>> Search\n searchValue={mergedSearchValue}\n onSearch={onInternalSearch}\n autoClearSearchValue={autoClearSearchValue}\n onSearchSplit={onInternalSearchSplit}\n dropdownMatchSelectWidth={dropdownMatchSelectWidth}\n // >>> OptionList\n OptionList={OptionList}\n emptyOptions={!displayOptions.length}\n // >>> Accessibility\n activeValue={activeValue}\n activeDescendantId={`${mergedId}_list_${accessibilityIndex}`}\n />\n </SelectContext.Provider>\n );\n },\n);\n\nif (process.env.NODE_ENV !== 'production') {\n Select.displayName = 'Select';\n}\n\nconst TypedSelect = Select as unknown as (<\n ValueType = any,\n OptionType extends BaseOptionType | DefaultOptionType = DefaultOptionType,\n>(\n props: React.PropsWithChildren<SelectProps<ValueType, OptionType>> & {\n ref?: React.Ref<BaseSelectRef>;\n },\n) => React.ReactElement) & {\n Option: typeof Option;\n OptGroup: typeof OptGroup;\n};\n\nTypedSelect.Option = Option;\nTypedSelect.OptGroup = OptGroup;\n\nexport default TypedSelect;\n"]}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { RawValueType, RenderNode } from './BaseSelect';
|
|
3
|
+
import type { BaseOptionType, FieldNames, OnActiveValue, OnInternalSelect, SelectProps } from './Select';
|
|
4
|
+
import type { FlattenOptionData } from './interface';
|
|
5
|
+
export interface SelectContextProps {
|
|
6
|
+
options: BaseOptionType[];
|
|
7
|
+
optionRender?: SelectProps['optionRender'];
|
|
8
|
+
flattenOptions: FlattenOptionData<BaseOptionType>[];
|
|
9
|
+
onActiveValue: OnActiveValue;
|
|
10
|
+
defaultActiveFirstOption?: boolean;
|
|
11
|
+
onSelect: OnInternalSelect;
|
|
12
|
+
menuItemSelectedIcon?: RenderNode;
|
|
13
|
+
rawValues: Set<RawValueType>;
|
|
14
|
+
fieldNames?: FieldNames;
|
|
15
|
+
virtual?: boolean;
|
|
16
|
+
direction?: 'ltr' | 'rtl';
|
|
17
|
+
listHeight?: number;
|
|
18
|
+
listItemHeight?: number;
|
|
19
|
+
childrenAsData?: boolean;
|
|
20
|
+
}
|
|
21
|
+
declare const SelectContext: React.Context<SelectContextProps>;
|
|
22
|
+
export default SelectContext;
|
|
23
|
+
//# sourceMappingURL=SelectContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SelectContext.d.ts","sourceRoot":"","sources":["../../../src/tntd-select/rc-select/SelectContext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC7D,OAAO,KAAK,EACV,cAAc,EACd,UAAU,EACV,aAAa,EACb,gBAAgB,EAChB,WAAW,EACZ,MAAM,UAAU,CAAC;AAClB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAGrD,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,cAAc,EAAE,CAAC;IAC1B,YAAY,CAAC,EAAE,WAAW,CAAC,cAAc,CAAC,CAAC;IAC3C,cAAc,EAAE,iBAAiB,CAAC,cAAc,CAAC,EAAE,CAAC;IACpD,aAAa,EAAE,aAAa,CAAC;IAC7B,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,oBAAoB,CAAC,EAAE,UAAU,CAAC;IAClC,SAAS,EAAE,GAAG,CAAC,YAAY,CAAC,CAAC;IAC7B,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,KAAK,GAAG,KAAK,CAAC;IAC1B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED,QAAA,MAAM,aAAa,mCAAgD,CAAC;AAEpE,eAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
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
|
+
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); }
|
|
10
|
+
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; }
|
|
11
|
+
var SelectContext = React.createContext(null);
|
|
12
|
+
var _default = SelectContext;
|
|
13
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SelectContext.js","sourceRoot":"","sources":["../../../src/tntd-select/rc-select/SelectContext.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAA+B;AA6B/B,MAAM,aAAa,GAAG,KAAK,CAAC,aAAa,CAAqB,IAAI,CAAC,CAAC;AAEpE,kBAAe,aAAa,CAAC","sourcesContent":["import * as React from 'react';\nimport type { RawValueType, RenderNode } from './BaseSelect';\nimport type {\n BaseOptionType,\n FieldNames,\n OnActiveValue,\n OnInternalSelect,\n SelectProps,\n} from './Select';\nimport type { FlattenOptionData } from './interface';\n\n// Use any here since we do not get the type during compilation\nexport interface SelectContextProps {\n options: BaseOptionType[];\n optionRender?: SelectProps['optionRender'];\n flattenOptions: FlattenOptionData<BaseOptionType>[];\n onActiveValue: OnActiveValue;\n defaultActiveFirstOption?: boolean;\n onSelect: OnInternalSelect;\n menuItemSelectedIcon?: RenderNode;\n rawValues: Set<RawValueType>;\n fieldNames?: FieldNames;\n virtual?: boolean;\n direction?: 'ltr' | 'rtl';\n listHeight?: number;\n listItemHeight?: number;\n childrenAsData?: boolean;\n}\n\nconst SelectContext = React.createContext<SelectContextProps>(null);\n\nexport default SelectContext;\n"]}
|