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,49 @@
|
|
|
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
|
+
/**
|
|
12
|
+
* Cache `value` related LabeledValue & options.
|
|
13
|
+
*/
|
|
14
|
+
var _default = function _default(labeledValues, valueOptions) {
|
|
15
|
+
var cacheRef = React.useRef({
|
|
16
|
+
values: new Map(),
|
|
17
|
+
options: new Map()
|
|
18
|
+
});
|
|
19
|
+
var filledLabeledValues = React.useMemo(function () {
|
|
20
|
+
var _cacheRef$current = cacheRef.current,
|
|
21
|
+
prevValueCache = _cacheRef$current.values,
|
|
22
|
+
prevOptionCache = _cacheRef$current.options;
|
|
23
|
+
// Fill label by cache
|
|
24
|
+
var patchedValues = labeledValues.map(function (item) {
|
|
25
|
+
var _a;
|
|
26
|
+
if (item.label === undefined) {
|
|
27
|
+
return Object.assign(Object.assign({}, item), {
|
|
28
|
+
label: (_a = prevValueCache.get(item.value)) === null || _a === void 0 ? void 0 : _a.label
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
return item;
|
|
32
|
+
});
|
|
33
|
+
// Refresh cache
|
|
34
|
+
var valueCache = new Map();
|
|
35
|
+
var optionCache = new Map();
|
|
36
|
+
patchedValues.forEach(function (item) {
|
|
37
|
+
valueCache.set(item.value, item);
|
|
38
|
+
optionCache.set(item.value, valueOptions.get(item.value) || prevOptionCache.get(item.value));
|
|
39
|
+
});
|
|
40
|
+
cacheRef.current.values = valueCache;
|
|
41
|
+
cacheRef.current.options = optionCache;
|
|
42
|
+
return patchedValues;
|
|
43
|
+
}, [labeledValues, valueOptions]);
|
|
44
|
+
var getOption = React.useCallback(function (val) {
|
|
45
|
+
return valueOptions.get(val) || cacheRef.current.options.get(val);
|
|
46
|
+
}, [valueOptions]);
|
|
47
|
+
return [filledLabeledValues, getOption];
|
|
48
|
+
};
|
|
49
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useCache.js","sourceRoot":"","sources":["../../../../src/tntd-select/rc-select/hooks/useCache.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAA+B;AAI/B;;GAEG;AACH,kBAAe,CACb,aAAiC,EACjC,YAAkD,EACc,EAAE;IAClE,MAAM,QAAQ,GAAG,KAAK,CAAC,MAAM,CAAC;QAC5B,MAAM,EAAE,IAAI,GAAG,EAAkC;QACjD,OAAO,EAAE,IAAI,GAAG,EAAmC;KACpD,CAAC,CAAC;IAEH,MAAM,mBAAmB,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,EAAE;QAC7C,MAAM,EAAE,MAAM,EAAE,cAAc,EAAE,OAAO,EAAE,eAAe,EAAE,GAAG,QAAQ,CAAC,OAAO,CAAC;QAE9E,sBAAsB;QACtB,MAAM,aAAa,GAAG,aAAa,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;;YAC/C,IAAI,IAAI,CAAC,KAAK,KAAK,SAAS,EAAE;gBAC5B,uCACK,IAAI,KACP,KAAK,EAAE,MAAA,cAAc,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,0CAAE,KAAK,IAC5C;aACH;YAED,OAAO,IAAI,CAAC;QACd,CAAC,CAAC,CAAC;QAEH,gBAAgB;QAChB,MAAM,UAAU,GAAG,IAAI,GAAG,EAAkC,CAAC;QAC7D,MAAM,WAAW,GAAG,IAAI,GAAG,EAAmC,CAAC;QAE/D,aAAa,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;YAC7B,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;YACjC,WAAW,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,EAAE,YAAY,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,eAAe,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;QAC/F,CAAC,CAAC,CAAC;QAEH,QAAQ,CAAC,OAAO,CAAC,MAAM,GAAG,UAAU,CAAC;QACrC,QAAQ,CAAC,OAAO,CAAC,OAAO,GAAG,WAAW,CAAC;QAEvC,OAAO,aAAa,CAAC;IACvB,CAAC,EAAE,CAAC,aAAa,EAAE,YAAY,CAAC,CAAC,CAAC;IAElC,MAAM,SAAS,GAAG,KAAK,CAAC,WAAW,CACjC,CAAC,GAAiB,EAAE,EAAE,CAAC,YAAY,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,EACjF,CAAC,YAAY,CAAC,CACf,CAAC;IAEF,OAAO,CAAC,mBAAmB,EAAE,SAAS,CAAC,CAAC;AAC1C,CAAC,CAAC","sourcesContent":["import * as React from 'react';\nimport type { RawValueType } from '../BaseSelect';\nimport type { DefaultOptionType, LabelInValueType } from '../Select';\n\n/**\n * Cache `value` related LabeledValue & options.\n */\nexport default (\n labeledValues: LabelInValueType[],\n valueOptions: Map<RawValueType, DefaultOptionType>,\n): [LabelInValueType[], (val: RawValueType) => DefaultOptionType] => {\n const cacheRef = React.useRef({\n values: new Map<RawValueType, LabelInValueType>(),\n options: new Map<RawValueType, DefaultOptionType>(),\n });\n\n const filledLabeledValues = React.useMemo(() => {\n const { values: prevValueCache, options: prevOptionCache } = cacheRef.current;\n\n // Fill label by cache\n const patchedValues = labeledValues.map((item) => {\n if (item.label === undefined) {\n return {\n ...item,\n label: prevValueCache.get(item.value)?.label,\n };\n }\n\n return item;\n });\n\n // Refresh cache\n const valueCache = new Map<RawValueType, LabelInValueType>();\n const optionCache = new Map<RawValueType, DefaultOptionType>();\n\n patchedValues.forEach((item) => {\n valueCache.set(item.value, item);\n optionCache.set(item.value, valueOptions.get(item.value) || prevOptionCache.get(item.value));\n });\n\n cacheRef.current.values = valueCache;\n cacheRef.current.options = optionCache;\n\n return patchedValues;\n }, [labeledValues, valueOptions]);\n\n const getOption = React.useCallback(\n (val: RawValueType) => valueOptions.get(val) || cacheRef.current.options.get(val),\n [valueOptions],\n );\n\n return [filledLabeledValues, getOption];\n};\n"]}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Similar with `useLock`, but this hook will always execute last value.
|
|
3
|
+
* When set to `true`, it will keep `true` for a short time even if `false` is set.
|
|
4
|
+
*/
|
|
5
|
+
export default function useDelayReset(timeout?: number): [boolean, (val: boolean, callback?: () => void) => void, () => void];
|
|
6
|
+
//# sourceMappingURL=useDelayReset.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useDelayReset.d.ts","sourceRoot":"","sources":["../../../../src/tntd-select/rc-select/hooks/useDelayReset.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,aAAa,CACnC,OAAO,GAAE,MAAW,GACnB,CAAC,OAAO,EAAE,CAAC,GAAG,EAAE,OAAO,EAAE,QAAQ,CAAC,EAAE,MAAM,IAAI,KAAK,IAAI,EAAE,MAAM,IAAI,CAAC,CAsBtE"}
|
|
@@ -4,9 +4,8 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports["default"] =
|
|
7
|
+
exports["default"] = useDelayReset;
|
|
8
8
|
var React = _interopRequireWildcard(require("react"));
|
|
9
|
-
var _styleChecker = require("../styleChecker");
|
|
10
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); }
|
|
11
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; }
|
|
12
11
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
@@ -15,14 +14,31 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
15
14
|
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; }
|
|
16
15
|
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; } }
|
|
17
16
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
18
|
-
|
|
17
|
+
/**
|
|
18
|
+
* Similar with `useLock`, but this hook will always execute last value.
|
|
19
|
+
* When set to `true`, it will keep `true` for a short time even if `false` is set.
|
|
20
|
+
*/
|
|
21
|
+
function useDelayReset() {
|
|
22
|
+
var timeout = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 10;
|
|
19
23
|
var _React$useState = React.useState(false),
|
|
20
24
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
21
|
-
|
|
22
|
-
|
|
25
|
+
bool = _React$useState2[0],
|
|
26
|
+
setBool = _React$useState2[1];
|
|
27
|
+
var delayRef = React.useRef(null);
|
|
28
|
+
var cancelLatest = function cancelLatest() {
|
|
29
|
+
window.clearTimeout(delayRef.current);
|
|
30
|
+
};
|
|
23
31
|
React.useEffect(function () {
|
|
24
|
-
|
|
32
|
+
return cancelLatest;
|
|
25
33
|
}, []);
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
34
|
+
var delaySetBool = function delaySetBool(value, callback) {
|
|
35
|
+
cancelLatest();
|
|
36
|
+
delayRef.current = window.setTimeout(function () {
|
|
37
|
+
setBool(value);
|
|
38
|
+
if (callback) {
|
|
39
|
+
callback();
|
|
40
|
+
}
|
|
41
|
+
}, timeout);
|
|
42
|
+
};
|
|
43
|
+
return [bool, delaySetBool, cancelLatest];
|
|
44
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useDelayReset.js","sourceRoot":"","sources":["../../../../src/tntd-select/rc-select/hooks/useDelayReset.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAA+B;AAE/B;;;GAGG;AACH,SAAwB,aAAa,CACnC,UAAkB,EAAE;IAEpB,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAU,KAAK,CAAC,CAAC;IACvD,MAAM,QAAQ,GAAG,KAAK,CAAC,MAAM,CAAS,IAAI,CAAC,CAAC;IAE5C,MAAM,YAAY,GAAG,GAAG,EAAE;QACxB,MAAM,CAAC,YAAY,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;IACxC,CAAC,CAAC;IAEF,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC,YAAY,EAAE,EAAE,CAAC,CAAC;IAExC,MAAM,YAAY,GAAG,CAAC,KAAc,EAAE,QAAoB,EAAE,EAAE;QAC5D,YAAY,EAAE,CAAC;QAEf,QAAQ,CAAC,OAAO,GAAG,MAAM,CAAC,UAAU,CAAC,GAAG,EAAE;YACxC,OAAO,CAAC,KAAK,CAAC,CAAC;YACf,IAAI,QAAQ,EAAE;gBACZ,QAAQ,EAAE,CAAC;aACZ;QACH,CAAC,EAAE,OAAO,CAAC,CAAC;IACd,CAAC,CAAC;IAEF,OAAO,CAAC,IAAI,EAAE,YAAY,EAAE,YAAY,CAAC,CAAC;AAC5C,CAAC;AAxBD,gCAwBC","sourcesContent":["import * as React from 'react';\n\n/**\n * Similar with `useLock`, but this hook will always execute last value.\n * When set to `true`, it will keep `true` for a short time even if `false` is set.\n */\nexport default function useDelayReset(\n timeout: number = 10,\n): [boolean, (val: boolean, callback?: () => void) => void, () => void] {\n const [bool, setBool] = React.useState<boolean>(false);\n const delayRef = React.useRef<number>(null);\n\n const cancelLatest = () => {\n window.clearTimeout(delayRef.current);\n };\n\n React.useEffect(() => cancelLatest, []);\n\n const delaySetBool = (value: boolean, callback: () => void) => {\n cancelLatest();\n\n delayRef.current = window.setTimeout(() => {\n setBool(value);\n if (callback) {\n callback();\n }\n }, timeout);\n };\n\n return [bool, delaySetBool, cancelLatest];\n}\n"]}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { FieldNames, DefaultOptionType, SelectProps } from '../Select';
|
|
2
|
+
declare const _default: (options: DefaultOptionType[], fieldNames: FieldNames, searchValue?: string | undefined, filterOption?: SelectProps['filterOption'], optionFilterProp?: string | undefined) => DefaultOptionType[];
|
|
3
|
+
export default _default;
|
|
4
|
+
//# sourceMappingURL=useFilterOptions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useFilterOptions.d.ts","sourceRoot":"","sources":["../../../../src/tntd-select/rc-select/hooks/useFilterOptions.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;kCAQjE,iBAAiB,EAAE,cAChB,UAAU,mDAEP,WAAW,CAAC,cAAc,CAAC;AAJ5C,wBAoEyE"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
var React = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _commonUtil = require("../utils/commonUtil");
|
|
9
|
+
var _valueUtil = require("../utils/valueUtil");
|
|
10
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
11
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
12
|
+
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); }
|
|
13
|
+
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; }
|
|
14
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
15
|
+
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); }
|
|
16
|
+
function includes(test, search) {
|
|
17
|
+
return (0, _commonUtil.toArray)(test).join('').toUpperCase().includes(search);
|
|
18
|
+
}
|
|
19
|
+
var _default = function _default(options, fieldNames, searchValue, filterOption, optionFilterProp) {
|
|
20
|
+
return React.useMemo(function () {
|
|
21
|
+
if (!searchValue || filterOption === false) {
|
|
22
|
+
return options;
|
|
23
|
+
}
|
|
24
|
+
var fieldOptions = fieldNames.options,
|
|
25
|
+
fieldLabel = fieldNames.label,
|
|
26
|
+
fieldValue = fieldNames.value;
|
|
27
|
+
var filteredOptions = [];
|
|
28
|
+
var customizeFilter = typeof filterOption === 'function';
|
|
29
|
+
var upperSearch = searchValue.toUpperCase();
|
|
30
|
+
var filterFunc = customizeFilter ? filterOption : function (_, option) {
|
|
31
|
+
// Use provided `optionFilterProp`
|
|
32
|
+
if (optionFilterProp) {
|
|
33
|
+
return includes(option[optionFilterProp], upperSearch);
|
|
34
|
+
}
|
|
35
|
+
// Auto select `label` or `value` by option type
|
|
36
|
+
if (option[fieldOptions]) {
|
|
37
|
+
// hack `fieldLabel` since `OptionGroup` children is not `label`
|
|
38
|
+
return includes(option[fieldLabel !== 'children' ? fieldLabel : 'label'], upperSearch);
|
|
39
|
+
}
|
|
40
|
+
return includes(option[fieldValue], upperSearch);
|
|
41
|
+
};
|
|
42
|
+
var wrapOption = customizeFilter ? function (opt) {
|
|
43
|
+
return (0, _valueUtil.injectPropsWithOption)(opt);
|
|
44
|
+
} : function (opt) {
|
|
45
|
+
return opt;
|
|
46
|
+
};
|
|
47
|
+
options.forEach(function (item) {
|
|
48
|
+
// Group should check child options
|
|
49
|
+
if (item[fieldOptions]) {
|
|
50
|
+
// Check group first
|
|
51
|
+
var matchGroup = filterFunc(searchValue, wrapOption(item));
|
|
52
|
+
if (matchGroup) {
|
|
53
|
+
filteredOptions.push(item);
|
|
54
|
+
} else {
|
|
55
|
+
// Check option
|
|
56
|
+
var subOptions = item[fieldOptions].filter(function (subItem) {
|
|
57
|
+
return filterFunc(searchValue, wrapOption(subItem));
|
|
58
|
+
});
|
|
59
|
+
if (subOptions.length) {
|
|
60
|
+
filteredOptions.push(Object.assign(Object.assign({}, item), _defineProperty({}, fieldOptions, subOptions)));
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
if (filterFunc(searchValue, wrapOption(item))) {
|
|
66
|
+
filteredOptions.push(item);
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
return filteredOptions;
|
|
70
|
+
}, [options, filterOption, optionFilterProp, searchValue, fieldNames]);
|
|
71
|
+
};
|
|
72
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useFilterOptions.js","sourceRoot":"","sources":["../../../../src/tntd-select/rc-select/hooks/useFilterOptions.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAA+B;AAC/B,oDAA8C;AAE9C,kDAA2D;AAE3D,SAAS,QAAQ,CAAC,IAAqB,EAAE,MAAc;IACrD,OAAO,IAAA,oBAAO,EAAC,IAAI,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;AAC/D,CAAC;AAED,kBAAe,CACb,OAA4B,EAC5B,UAAsB,EACtB,WAAoB,EACpB,YAA0C,EAC1C,gBAAyB,EACzB,EAAE,CACF,KAAK,CAAC,OAAO,CAAC,GAAG,EAAE;IACjB,IAAI,CAAC,WAAW,IAAI,YAAY,KAAK,KAAK,EAAE;QAC1C,OAAO,OAAO,CAAC;KAChB;IAED,MAAM,EAAE,OAAO,EAAE,YAAY,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,EAAE,GAAG,UAAU,CAAC;IACnF,MAAM,eAAe,GAAwB,EAAE,CAAC;IAEhD,MAAM,eAAe,GAAG,OAAO,YAAY,KAAK,UAAU,CAAC;IAE3D,MAAM,WAAW,GAAG,WAAW,CAAC,WAAW,EAAE,CAAC;IAC9C,MAAM,UAAU,GAAG,eAAe;QAChC,CAAC,CAAC,YAAY;QACd,CAAC,CAAC,CAAC,CAAS,EAAE,MAAyB,EAAE,EAAE;YACvC,kCAAkC;YAClC,IAAI,gBAAgB,EAAE;gBACpB,OAAO,QAAQ,CAAC,MAAM,CAAC,gBAAgB,CAAC,EAAE,WAAW,CAAC,CAAC;aACxD;YAED,gDAAgD;YAChD,IAAI,MAAM,CAAC,YAAY,CAAC,EAAE;gBACxB,gEAAgE;gBAChE,OAAO,QAAQ,CAAC,MAAM,CAAC,UAAU,KAAK,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,EAAE,WAAW,CAAC,CAAC;aACxF;YAED,OAAO,QAAQ,CAAC,MAAM,CAAC,UAAU,CAAC,EAAE,WAAW,CAAC,CAAC;QACnD,CAAC,CAAC;IAEN,MAAM,UAAU,GAAkD,eAAe;QAC/E,CAAC,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,IAAA,iCAAqB,EAAC,GAAG,CAAC;QACrC,CAAC,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC;IAEjB,OAAO,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;QACvB,mCAAmC;QACnC,IAAI,IAAI,CAAC,YAAY,CAAC,EAAE;YACtB,oBAAoB;YACpB,MAAM,UAAU,GAAG,UAAU,CAAC,WAAW,EAAE,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC;YAC7D,IAAI,UAAU,EAAE;gBACd,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;aAC5B;iBAAM;gBACL,eAAe;gBACf,MAAM,UAAU,GAAG,IAAI,CAAC,YAAY,CAAC,CAAC,MAAM,CAAC,CAAC,OAA0B,EAAE,EAAE,CAC1E,UAAU,CAAC,WAAW,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC,CAC7C,CAAC;gBACF,IAAI,UAAU,CAAC,MAAM,EAAE;oBACrB,eAAe,CAAC,IAAI,iCACf,IAAI,KACP,CAAC,YAAY,CAAC,EAAE,UAAU,IAC1B,CAAC;iBACJ;aACF;YAED,OAAO;SACR;QAED,IAAI,UAAU,CAAC,WAAW,EAAE,UAAU,CAAC,IAAI,CAAC,CAAC,EAAE;YAC7C,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;SAC5B;IACH,CAAC,CAAC,CAAC;IAEH,OAAO,eAAe,CAAC;AACzB,CAAC,EAAE,CAAC,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,WAAW,EAAE,UAAU,CAAC,CAAC,CAAC","sourcesContent":["import * as React from 'react';\nimport { toArray } from '../utils/commonUtil';\nimport type { FieldNames, DefaultOptionType, SelectProps } from '../Select';\nimport { injectPropsWithOption } from '../utils/valueUtil';\n\nfunction includes(test: React.ReactNode, search: string) {\n return toArray(test).join('').toUpperCase().includes(search);\n}\n\nexport default (\n options: DefaultOptionType[],\n fieldNames: FieldNames,\n searchValue?: string,\n filterOption?: SelectProps['filterOption'],\n optionFilterProp?: string,\n) =>\n React.useMemo(() => {\n if (!searchValue || filterOption === false) {\n return options;\n }\n\n const { options: fieldOptions, label: fieldLabel, value: fieldValue } = fieldNames;\n const filteredOptions: DefaultOptionType[] = [];\n\n const customizeFilter = typeof filterOption === 'function';\n\n const upperSearch = searchValue.toUpperCase();\n const filterFunc = customizeFilter\n ? filterOption\n : (_: string, option: DefaultOptionType) => {\n // Use provided `optionFilterProp`\n if (optionFilterProp) {\n return includes(option[optionFilterProp], upperSearch);\n }\n\n // Auto select `label` or `value` by option type\n if (option[fieldOptions]) {\n // hack `fieldLabel` since `OptionGroup` children is not `label`\n return includes(option[fieldLabel !== 'children' ? fieldLabel : 'label'], upperSearch);\n }\n\n return includes(option[fieldValue], upperSearch);\n };\n\n const wrapOption: (opt: DefaultOptionType) => DefaultOptionType = customizeFilter\n ? (opt) => injectPropsWithOption(opt)\n : (opt) => opt;\n\n options.forEach((item) => {\n // Group should check child options\n if (item[fieldOptions]) {\n // Check group first\n const matchGroup = filterFunc(searchValue, wrapOption(item));\n if (matchGroup) {\n filteredOptions.push(item);\n } else {\n // Check option\n const subOptions = item[fieldOptions].filter((subItem: DefaultOptionType) =>\n filterFunc(searchValue, wrapOption(subItem)),\n );\n if (subOptions.length) {\n filteredOptions.push({\n ...item,\n [fieldOptions]: subOptions,\n });\n }\n }\n\n return;\n }\n\n if (filterFunc(searchValue, wrapOption(item))) {\n filteredOptions.push(item);\n }\n });\n\n return filteredOptions;\n }, [options, filterOption, optionFilterProp, searchValue, fieldNames]);\n"]}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/** Is client side and not jsdom */
|
|
2
|
+
export declare const isBrowserClient: boolean;
|
|
3
|
+
/** Get unique id for accessibility usage */
|
|
4
|
+
export declare function getUUID(): number | string;
|
|
5
|
+
export default function useId(id?: string): string | undefined;
|
|
6
|
+
//# sourceMappingURL=useId.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useId.d.ts","sourceRoot":"","sources":["../../../../src/tntd-select/rc-select/hooks/useId.ts"],"names":[],"mappings":"AAKA,mCAAmC;AACnC,eAAO,MAAM,eAAe,SAAiD,CAAC;AAE9E,4CAA4C;AAC5C,wBAAgB,OAAO,IAAI,MAAM,GAAG,MAAM,CAazC;AAED,MAAM,CAAC,OAAO,UAAU,KAAK,CAAC,EAAE,CAAC,EAAE,MAAM,sBAOxC"}
|
package/lib/{tntd-form/_util/hooks/useForceUpdate.js → tntd-select/rc-select/hooks/useId.js}
RENAMED
|
@@ -4,8 +4,12 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports["default"] =
|
|
7
|
+
exports["default"] = useId;
|
|
8
|
+
exports.getUUID = getUUID;
|
|
9
|
+
exports.isBrowserClient = void 0;
|
|
8
10
|
var React = _interopRequireWildcard(require("react"));
|
|
11
|
+
var _canUseDom = _interopRequireDefault(require("rc-util/lib/Dom/canUseDom"));
|
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
9
13
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
10
14
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
11
15
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
@@ -14,11 +18,31 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
14
18
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
15
19
|
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0) { ; } } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
16
20
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
var uuid = 0;
|
|
22
|
+
/** Is client side and not jsdom */
|
|
23
|
+
var isBrowserClient = process.env.NODE_ENV !== 'test' && (0, _canUseDom["default"])();
|
|
24
|
+
/** Get unique id for accessibility usage */
|
|
25
|
+
exports.isBrowserClient = isBrowserClient;
|
|
26
|
+
function getUUID() {
|
|
27
|
+
var retId;
|
|
28
|
+
// Test never reach
|
|
29
|
+
/* istanbul ignore if */
|
|
30
|
+
if (isBrowserClient) {
|
|
31
|
+
retId = uuid;
|
|
32
|
+
uuid += 1;
|
|
33
|
+
} else {
|
|
34
|
+
retId = 'TEST_OR_SSR';
|
|
35
|
+
}
|
|
36
|
+
return retId;
|
|
37
|
+
}
|
|
38
|
+
function useId(id) {
|
|
39
|
+
// Inner id for accessibility usage. Only work in client side
|
|
40
|
+
var _React$useState = React.useState(),
|
|
41
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
42
|
+
innerId = _React$useState2[0],
|
|
43
|
+
setInnerId = _React$useState2[1];
|
|
44
|
+
React.useEffect(function () {
|
|
45
|
+
setInnerId("rc_select_".concat(getUUID()));
|
|
46
|
+
}, []);
|
|
47
|
+
return id || innerId;
|
|
24
48
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useId.js","sourceRoot":"","sources":["../../../../src/tntd-select/rc-select/hooks/useId.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAA+B;AAC/B,0EAAkD;AAElD,IAAI,IAAI,GAAG,CAAC,CAAC;AAEb,mCAAmC;AACtB,QAAA,eAAe,GAAG,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,MAAM,IAAI,IAAA,mBAAS,GAAE,CAAC;AAE9E,4CAA4C;AAC5C,SAAgB,OAAO;IACrB,IAAI,KAAsB,CAAC;IAE3B,mBAAmB;IACnB,wBAAwB;IACxB,IAAI,uBAAe,EAAE;QACnB,KAAK,GAAG,IAAI,CAAC;QACb,IAAI,IAAI,CAAC,CAAC;KACX;SAAM;QACL,KAAK,GAAG,aAAa,CAAC;KACvB;IAED,OAAO,KAAK,CAAC;AACf,CAAC;AAbD,0BAaC;AAED,SAAwB,KAAK,CAAC,EAAW;IACvC,6DAA6D;IAC7D,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,KAAK,CAAC,QAAQ,EAAU,CAAC;IACvD,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,UAAU,CAAC,aAAa,OAAO,EAAE,EAAE,CAAC,CAAC;IACvC,CAAC,EAAE,EAAE,CAAC,CAAC;IACP,OAAO,EAAE,IAAI,OAAO,CAAC;AACvB,CAAC;AAPD,wBAOC","sourcesContent":["import * as React from 'react';\nimport canUseDom from 'rc-util/lib/Dom/canUseDom';\n\nlet uuid = 0;\n\n/** Is client side and not jsdom */\nexport const isBrowserClient = process.env.NODE_ENV !== 'test' && canUseDom();\n\n/** Get unique id for accessibility usage */\nexport function getUUID(): number | string {\n let retId: string | number;\n\n // Test never reach\n /* istanbul ignore if */\n if (isBrowserClient) {\n retId = uuid;\n uuid += 1;\n } else {\n retId = 'TEST_OR_SSR';\n }\n\n return retId;\n}\n\nexport default function useId(id?: string) {\n // Inner id for accessibility usage. Only work in client side\n const [innerId, setInnerId] = React.useState<string>();\n React.useEffect(() => {\n setInnerId(`rc_select_${getUUID()}`);\n }, []);\n return id || innerId;\n}\n"]}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Wrap `React.useLayoutEffect` which will not throw warning message in test env
|
|
4
|
+
*/
|
|
5
|
+
export default function useLayoutEffect(effect: React.EffectCallback, deps?: React.DependencyList): void;
|
|
6
|
+
//# sourceMappingURL=useLayoutEffect.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useLayoutEffect.d.ts","sourceRoot":"","sources":["../../../../src/tntd-select/rc-select/hooks/useLayoutEffect.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B;;GAEG;AACH,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,MAAM,EAAE,KAAK,CAAC,cAAc,EAAE,IAAI,CAAC,EAAE,KAAK,CAAC,cAAc,QAQhG"}
|
|
@@ -0,0 +1,26 @@
|
|
|
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"] = useLayoutEffect;
|
|
8
|
+
var React = _interopRequireWildcard(require("react"));
|
|
9
|
+
var _commonUtil = require("../utils/commonUtil");
|
|
10
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
11
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
12
|
+
/* eslint-disable react-hooks/rules-of-hooks */
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Wrap `React.useLayoutEffect` which will not throw warning message in test env
|
|
16
|
+
*/
|
|
17
|
+
function useLayoutEffect(effect, deps) {
|
|
18
|
+
// Never happen in test env
|
|
19
|
+
if (_commonUtil.isBrowserClient) {
|
|
20
|
+
/* istanbul ignore next */
|
|
21
|
+
React.useLayoutEffect(effect, deps);
|
|
22
|
+
} else {
|
|
23
|
+
React.useEffect(effect, deps);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
/* eslint-enable */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useLayoutEffect.js","sourceRoot":"","sources":["../../../../src/tntd-select/rc-select/hooks/useLayoutEffect.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAA+C;AAC/C,6CAA+B;AAC/B,oDAAsD;AAEtD;;GAEG;AACH,SAAwB,eAAe,CAAC,MAA4B,EAAE,IAA2B;IAC/F,2BAA2B;IAC3B,IAAI,4BAAe,EAAE;QACnB,0BAA0B;QAC1B,KAAK,CAAC,eAAe,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;KACrC;SAAM;QACL,KAAK,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;KAC/B;AACH,CAAC;AARD,kCAQC;AACD,mBAAmB","sourcesContent":["/* eslint-disable react-hooks/rules-of-hooks */\nimport * as React from 'react';\nimport { isBrowserClient } from '../utils/commonUtil';\n\n/**\n * Wrap `React.useLayoutEffect` which will not throw warning message in test env\n */\nexport default function useLayoutEffect(effect: React.EffectCallback, deps?: React.DependencyList) {\n // Never happen in test env\n if (isBrowserClient) {\n /* istanbul ignore next */\n React.useLayoutEffect(effect, deps);\n } else {\n React.useEffect(effect, deps);\n }\n}\n/* eslint-enable */\n"]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Locker return cached mark.
|
|
3
|
+
* If set to `true`, will return `true` in a short time even if set `false`.
|
|
4
|
+
* If set to `false` and then set to `true`, will change to `true`.
|
|
5
|
+
* And after time duration, it will back to `null` automatically.
|
|
6
|
+
*/
|
|
7
|
+
export default function useLock(duration?: number): [() => boolean, (lock: boolean) => void];
|
|
8
|
+
//# sourceMappingURL=useLock.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useLock.d.ts","sourceRoot":"","sources":["../../../../src/tntd-select/rc-select/hooks/useLock.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,OAAO,CAAC,QAAQ,GAAE,MAAY,GAAG,CAAC,MAAM,OAAO,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC,CAwBhG"}
|
|
@@ -0,0 +1,39 @@
|
|
|
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"] = useLock;
|
|
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
|
+
/**
|
|
12
|
+
* Locker return cached mark.
|
|
13
|
+
* If set to `true`, will return `true` in a short time even if set `false`.
|
|
14
|
+
* If set to `false` and then set to `true`, will change to `true`.
|
|
15
|
+
* And after time duration, it will back to `null` automatically.
|
|
16
|
+
*/
|
|
17
|
+
function useLock() {
|
|
18
|
+
var duration = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 250;
|
|
19
|
+
var lockRef = React.useRef(null);
|
|
20
|
+
var timeoutRef = React.useRef(null);
|
|
21
|
+
// Clean up
|
|
22
|
+
React.useEffect(function () {
|
|
23
|
+
return function () {
|
|
24
|
+
window.clearTimeout(timeoutRef.current);
|
|
25
|
+
};
|
|
26
|
+
}, []);
|
|
27
|
+
function doLock(locked) {
|
|
28
|
+
if (locked || lockRef.current === null) {
|
|
29
|
+
lockRef.current = locked;
|
|
30
|
+
}
|
|
31
|
+
window.clearTimeout(timeoutRef.current);
|
|
32
|
+
timeoutRef.current = window.setTimeout(function () {
|
|
33
|
+
lockRef.current = null;
|
|
34
|
+
}, duration);
|
|
35
|
+
}
|
|
36
|
+
return [function () {
|
|
37
|
+
return lockRef.current;
|
|
38
|
+
}, doLock];
|
|
39
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useLock.js","sourceRoot":"","sources":["../../../../src/tntd-select/rc-select/hooks/useLock.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAA+B;AAE/B;;;;;GAKG;AACH,SAAwB,OAAO,CAAC,WAAmB,GAAG;IACpD,MAAM,OAAO,GAAG,KAAK,CAAC,MAAM,CAAU,IAAI,CAAC,CAAC;IAC5C,MAAM,UAAU,GAAG,KAAK,CAAC,MAAM,CAAS,IAAI,CAAC,CAAC;IAE9C,WAAW;IACX,KAAK,CAAC,SAAS,CACb,GAAG,EAAE,CAAC,GAAG,EAAE;QACT,MAAM,CAAC,YAAY,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;IAC1C,CAAC,EACD,EAAE,CACH,CAAC;IAEF,SAAS,MAAM,CAAC,MAAe;QAC7B,IAAI,MAAM,IAAI,OAAO,CAAC,OAAO,KAAK,IAAI,EAAE;YACtC,OAAO,CAAC,OAAO,GAAG,MAAM,CAAC;SAC1B;QAED,MAAM,CAAC,YAAY,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;QACxC,UAAU,CAAC,OAAO,GAAG,MAAM,CAAC,UAAU,CAAC,GAAG,EAAE;YAC1C,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC;QACzB,CAAC,EAAE,QAAQ,CAAC,CAAC;IACf,CAAC;IAED,OAAO,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;AACzC,CAAC;AAxBD,0BAwBC","sourcesContent":["import * as React from 'react';\n\n/**\n * Locker return cached mark.\n * If set to `true`, will return `true` in a short time even if set `false`.\n * If set to `false` and then set to `true`, will change to `true`.\n * And after time duration, it will back to `null` automatically.\n */\nexport default function useLock(duration: number = 250): [() => boolean, (lock: boolean) => void] {\n const lockRef = React.useRef<boolean>(null);\n const timeoutRef = React.useRef<number>(null);\n\n // Clean up\n React.useEffect(\n () => () => {\n window.clearTimeout(timeoutRef.current);\n },\n [],\n );\n\n function doLock(locked: boolean) {\n if (locked || lockRef.current === null) {\n lockRef.current = locked;\n }\n\n window.clearTimeout(timeoutRef.current);\n timeoutRef.current = window.setTimeout(() => {\n lockRef.current = null;\n }, duration);\n }\n\n return [() => lockRef.current, doLock];\n}\n"]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { FieldNames, RawValueType } from '../Select';
|
|
3
|
+
/**
|
|
4
|
+
* Parse `children` to `options` if `options` is not provided.
|
|
5
|
+
* Then flatten the `options`.
|
|
6
|
+
*/
|
|
7
|
+
export default function useOptions<OptionType>(options: OptionType[], children: React.ReactNode, fieldNames: FieldNames, optionFilterProp: string, optionLabelProp: string): {
|
|
8
|
+
options: OptionType[];
|
|
9
|
+
valueOptions: Map<RawValueType, OptionType>;
|
|
10
|
+
labelOptions: Map<React.ReactNode, OptionType>;
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=useOptions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useOptions.d.ts","sourceRoot":"","sources":["../../../../src/tntd-select/rc-select/hooks/useOptions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAG1D;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,UAAU,EAC3C,OAAO,EAAE,UAAU,EAAE,EACrB,QAAQ,EAAE,KAAK,CAAC,SAAS,EACzB,UAAU,EAAE,UAAU,EACtB,gBAAgB,EAAE,MAAM,EACxB,eAAe,EAAE,MAAM;;;;EA0CxB"}
|
|
@@ -0,0 +1,53 @@
|
|
|
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"] = useOptions;
|
|
8
|
+
var React = _interopRequireWildcard(require("react"));
|
|
9
|
+
var _legacyUtil = require("../utils/legacyUtil");
|
|
10
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
11
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
12
|
+
/**
|
|
13
|
+
* Parse `children` to `options` if `options` is not provided.
|
|
14
|
+
* Then flatten the `options`.
|
|
15
|
+
*/
|
|
16
|
+
function useOptions(options, children, fieldNames, optionFilterProp, optionLabelProp) {
|
|
17
|
+
return React.useMemo(function () {
|
|
18
|
+
var mergedOptions = options;
|
|
19
|
+
var childrenAsData = !options;
|
|
20
|
+
if (childrenAsData) {
|
|
21
|
+
mergedOptions = (0, _legacyUtil.convertChildrenToData)(children);
|
|
22
|
+
}
|
|
23
|
+
var valueOptions = new Map();
|
|
24
|
+
var labelOptions = new Map();
|
|
25
|
+
var setLabelOptions = function setLabelOptions(labelOptionsMap, option, key) {
|
|
26
|
+
if (key && typeof key === 'string') {
|
|
27
|
+
labelOptionsMap.set(option[key], option);
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
function dig(optionList) {
|
|
31
|
+
var isChildren = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
32
|
+
// for loop to speed up collection speed
|
|
33
|
+
for (var i = 0; i < optionList.length; i += 1) {
|
|
34
|
+
var option = optionList[i];
|
|
35
|
+
if (!option[fieldNames.options] || isChildren) {
|
|
36
|
+
valueOptions.set(option[fieldNames.value], option);
|
|
37
|
+
setLabelOptions(labelOptions, option, fieldNames.label);
|
|
38
|
+
// https://github.com/ant-design/ant-design/issues/35304
|
|
39
|
+
setLabelOptions(labelOptions, option, optionFilterProp);
|
|
40
|
+
setLabelOptions(labelOptions, option, optionLabelProp);
|
|
41
|
+
} else {
|
|
42
|
+
dig(option[fieldNames.options], true);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
dig(mergedOptions);
|
|
47
|
+
return {
|
|
48
|
+
options: mergedOptions,
|
|
49
|
+
valueOptions: valueOptions,
|
|
50
|
+
labelOptions: labelOptions
|
|
51
|
+
};
|
|
52
|
+
}, [options, children, fieldNames, optionFilterProp, optionLabelProp]);
|
|
53
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useOptions.js","sourceRoot":"","sources":["../../../../src/tntd-select/rc-select/hooks/useOptions.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAA+B;AAE/B,oDAA4D;AAE5D;;;GAGG;AACH,SAAwB,UAAU,CAChC,OAAqB,EACrB,QAAyB,EACzB,UAAsB,EACtB,gBAAwB,EACxB,eAAuB;IAEvB,OAAO,KAAK,CAAC,OAAO,CAAC,GAAG,EAAE;QACxB,IAAI,aAAa,GAAG,OAAO,CAAC;QAC5B,MAAM,cAAc,GAAG,CAAC,OAAO,CAAC;QAEhC,IAAI,cAAc,EAAE;YAClB,aAAa,GAAG,IAAA,kCAAqB,EAAC,QAAQ,CAAC,CAAC;SACjD;QAED,MAAM,YAAY,GAAG,IAAI,GAAG,EAA4B,CAAC;QACzD,MAAM,YAAY,GAAG,IAAI,GAAG,EAA+B,CAAC;QAE5D,MAAM,eAAe,GAAG,CAAC,eAAe,EAAE,MAAM,EAAE,GAAG,EAAE,EAAE;YACvD,IAAI,GAAG,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE;gBAClC,eAAe,CAAC,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC,CAAC;aAC1C;QACH,CAAC,CAAC;QAEF,SAAS,GAAG,CAAC,UAAwB,EAAE,UAAU,GAAG,KAAK;YACvD,wCAAwC;YACxC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,UAAU,CAAC,MAAM,EAAE,CAAC,IAAI,CAAC,EAAE;gBAC7C,MAAM,MAAM,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC;gBAC7B,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,UAAU,EAAE;oBAC7C,YAAY,CAAC,GAAG,CAAC,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC,CAAC;oBACnD,eAAe,CAAC,YAAY,EAAE,MAAM,EAAE,UAAU,CAAC,KAAK,CAAC,CAAC;oBACxD,wDAAwD;oBACxD,eAAe,CAAC,YAAY,EAAE,MAAM,EAAE,gBAAgB,CAAC,CAAC;oBACxD,eAAe,CAAC,YAAY,EAAE,MAAM,EAAE,eAAe,CAAC,CAAC;iBACxD;qBAAM;oBACL,GAAG,CAAC,MAAM,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE,IAAI,CAAC,CAAC;iBACvC;aACF;QACH,CAAC;QACD,GAAG,CAAC,aAAa,CAAC,CAAC;QAEnB,OAAO;YACL,OAAO,EAAE,aAAa;YACtB,YAAY;YACZ,YAAY;SACb,CAAC;IACJ,CAAC,EAAE,CAAC,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,gBAAgB,EAAE,eAAe,CAAC,CAAC,CAAC;AACzE,CAAC;AA/CD,6BA+CC","sourcesContent":["import * as React from 'react';\nimport type { FieldNames, RawValueType } from '../Select';\nimport { convertChildrenToData } from '../utils/legacyUtil';\n\n/**\n * Parse `children` to `options` if `options` is not provided.\n * Then flatten the `options`.\n */\nexport default function useOptions<OptionType>(\n options: OptionType[],\n children: React.ReactNode,\n fieldNames: FieldNames,\n optionFilterProp: string,\n optionLabelProp: string,\n) {\n return React.useMemo(() => {\n let mergedOptions = options;\n const childrenAsData = !options;\n\n if (childrenAsData) {\n mergedOptions = convertChildrenToData(children);\n }\n\n const valueOptions = new Map<RawValueType, OptionType>();\n const labelOptions = new Map<React.ReactNode, OptionType>();\n\n const setLabelOptions = (labelOptionsMap, option, key) => {\n if (key && typeof key === 'string') {\n labelOptionsMap.set(option[key], option);\n }\n };\n\n function dig(optionList: OptionType[], isChildren = false) {\n // for loop to speed up collection speed\n for (let i = 0; i < optionList.length; i += 1) {\n const option = optionList[i];\n if (!option[fieldNames.options] || isChildren) {\n valueOptions.set(option[fieldNames.value], option);\n setLabelOptions(labelOptions, option, fieldNames.label);\n // https://github.com/ant-design/ant-design/issues/35304\n setLabelOptions(labelOptions, option, optionFilterProp);\n setLabelOptions(labelOptions, option, optionLabelProp);\n } else {\n dig(option[fieldNames.options], true);\n }\n }\n }\n dig(mergedOptions);\n\n return {\n options: mergedOptions,\n valueOptions,\n labelOptions,\n };\n }, [options, children, fieldNames, optionFilterProp, optionLabelProp]);\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useRefFunc.d.ts","sourceRoot":"","sources":["../../../../src/tntd-select/rc-select/hooks/useRefFunc.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,EAAE,QAAQ,EAAE,CAAC,GAAG,CAAC,CASpF"}
|
|
@@ -0,0 +1,22 @@
|
|
|
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"] = useRefFunc;
|
|
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
|
+
/**
|
|
12
|
+
* Same as `React.useCallback` but always return a memoized function
|
|
13
|
+
* but redirect to real function.
|
|
14
|
+
*/
|
|
15
|
+
function useRefFunc(callback) {
|
|
16
|
+
var funcRef = React.useRef();
|
|
17
|
+
funcRef.current = callback;
|
|
18
|
+
var cacheFn = React.useCallback(function () {
|
|
19
|
+
return funcRef.current.apply(funcRef, arguments);
|
|
20
|
+
}, []);
|
|
21
|
+
return cacheFn;
|
|
22
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useRefFunc.js","sourceRoot":"","sources":["../../../../src/tntd-select/rc-select/hooks/useRefFunc.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAA+B;AAE/B;;;GAGG;AACH,SAAwB,UAAU,CAAoC,QAAW;IAC/E,MAAM,OAAO,GAAG,KAAK,CAAC,MAAM,EAAK,CAAC;IAClC,OAAO,CAAC,OAAO,GAAG,QAAQ,CAAC;IAE3B,MAAM,OAAO,GAAG,KAAK,CAAC,WAAW,CAAC,CAAC,GAAG,IAAW,EAAE,EAAE;QACnD,OAAO,OAAO,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC,CAAC;IAClC,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,OAAc,CAAC;AACxB,CAAC;AATD,6BASC","sourcesContent":["import * as React from 'react';\n\n/**\n * Same as `React.useCallback` but always return a memoized function\n * but redirect to real function.\n */\nexport default function useRefFunc<T extends (...args: any[]) => any>(callback: T): T {\n const funcRef = React.useRef<T>();\n funcRef.current = callback;\n\n const cacheFn = React.useCallback((...args: any[]) => {\n return funcRef.current(...args);\n }, []);\n\n return cacheFn as any;\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSelectTriggerControl.d.ts","sourceRoot":"","sources":["../../../../src/tntd-select/rc-select/hooks/useSelectTriggerControl.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,OAAO,UAAU,uBAAuB,CAC7C,QAAQ,EAAE,MAAM,CAAC,WAAW,GAAG,SAAS,CAAC,EAAE,EAC3C,IAAI,EAAE,OAAO,EACb,WAAW,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,EACpC,iBAAiB,EAAE,OAAO,QAoC3B"}
|
|
@@ -0,0 +1,43 @@
|
|
|
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"] = useSelectTriggerControl;
|
|
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
|
+
function useSelectTriggerControl(elements, open, triggerOpen, customizedTrigger) {
|
|
12
|
+
var propsRef = React.useRef(null);
|
|
13
|
+
propsRef.current = {
|
|
14
|
+
open: open,
|
|
15
|
+
triggerOpen: triggerOpen,
|
|
16
|
+
customizedTrigger: customizedTrigger
|
|
17
|
+
};
|
|
18
|
+
React.useEffect(function () {
|
|
19
|
+
function onGlobalMouseDown(event) {
|
|
20
|
+
var _a;
|
|
21
|
+
// If trigger is customized, Trigger will take control of popupVisible
|
|
22
|
+
if ((_a = propsRef.current) === null || _a === void 0 ? void 0 : _a.customizedTrigger) {
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
var target = event.target;
|
|
26
|
+
if (target.shadowRoot && event.composed) {
|
|
27
|
+
target = event.composedPath()[0] || target;
|
|
28
|
+
}
|
|
29
|
+
if (propsRef.current.open && elements().filter(function (element) {
|
|
30
|
+
return element;
|
|
31
|
+
}).every(function (element) {
|
|
32
|
+
return !element.contains(target) && element !== target;
|
|
33
|
+
})) {
|
|
34
|
+
// Should trigger close
|
|
35
|
+
propsRef.current.triggerOpen(false);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
window.addEventListener('mousedown', onGlobalMouseDown);
|
|
39
|
+
return function () {
|
|
40
|
+
return window.removeEventListener('mousedown', onGlobalMouseDown);
|
|
41
|
+
};
|
|
42
|
+
}, []);
|
|
43
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSelectTriggerControl.js","sourceRoot":"","sources":["../../../../src/tntd-select/rc-select/hooks/useSelectTriggerControl.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAA+B;AAE/B,SAAwB,uBAAuB,CAC7C,QAA2C,EAC3C,IAAa,EACb,WAAoC,EACpC,iBAA0B;IAE1B,MAAM,QAAQ,GAAG,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IACpC,QAAQ,CAAC,OAAO,GAAG;QACjB,IAAI;QACJ,WAAW;QACX,iBAAiB;KAClB,CAAC;IAEF,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,SAAS,iBAAiB,CAAC,KAAiB;;YAC1C,sEAAsE;YACtE,IAAI,MAAA,QAAQ,CAAC,OAAO,0CAAE,iBAAiB,EAAE;gBACvC,OAAO;aACR;YAED,IAAI,MAAM,GAAG,KAAK,CAAC,MAAqB,CAAC;YAEzC,IAAI,MAAM,CAAC,UAAU,IAAI,KAAK,CAAC,QAAQ,EAAE;gBACvC,MAAM,GAAG,CAAC,KAAK,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC,IAAI,MAAM,CAAgB,CAAC;aAC7D;YAED,IACE,QAAQ,CAAC,OAAO,CAAC,IAAI;gBACrB,QAAQ,EAAE;qBACP,MAAM,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC;qBAC5B,KAAK,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,OAAO,KAAK,MAAM,CAAC,EACtE;gBACA,uBAAuB;gBACvB,QAAQ,CAAC,OAAO,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;aACrC;QACH,CAAC;QAED,MAAM,CAAC,gBAAgB,CAAC,WAAW,EAAE,iBAAiB,CAAC,CAAC;QACxD,OAAO,GAAG,EAAE,CAAC,MAAM,CAAC,mBAAmB,CAAC,WAAW,EAAE,iBAAiB,CAAC,CAAC;IAC1E,CAAC,EAAE,EAAE,CAAC,CAAC;AACT,CAAC;AAxCD,0CAwCC","sourcesContent":["import * as React from 'react';\n\nexport default function useSelectTriggerControl(\n elements: () => (HTMLElement | undefined)[],\n open: boolean,\n triggerOpen: (open: boolean) => void,\n customizedTrigger: boolean,\n) {\n const propsRef = React.useRef(null);\n propsRef.current = {\n open,\n triggerOpen,\n customizedTrigger,\n };\n\n React.useEffect(() => {\n function onGlobalMouseDown(event: MouseEvent) {\n // If trigger is customized, Trigger will take control of popupVisible\n if (propsRef.current?.customizedTrigger) {\n return;\n }\n\n let target = event.target as HTMLElement;\n\n if (target.shadowRoot && event.composed) {\n target = (event.composedPath()[0] || target) as HTMLElement;\n }\n\n if (\n propsRef.current.open &&\n elements()\n .filter((element) => element)\n .every((element) => !element.contains(target) && element !== target)\n ) {\n // Should trigger close\n propsRef.current.triggerOpen(false);\n }\n }\n\n window.addEventListener('mousedown', onGlobalMouseDown);\n return () => window.removeEventListener('mousedown', onGlobalMouseDown);\n }, []);\n}\n"]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import Select from './Select';
|
|
2
|
+
import Option from './Option';
|
|
3
|
+
import OptGroup from './OptGroup';
|
|
4
|
+
import type { SelectProps } from './Select';
|
|
5
|
+
import BaseSelect from './BaseSelect';
|
|
6
|
+
import type { BaseSelectProps, BaseSelectRef, BaseSelectPropsWithoutPrivate } from './BaseSelect';
|
|
7
|
+
import useBaseProps from './hooks/useBaseProps';
|
|
8
|
+
export { Option, OptGroup, BaseSelect, useBaseProps };
|
|
9
|
+
export type { SelectProps, BaseSelectProps, BaseSelectRef, BaseSelectPropsWithoutPrivate };
|
|
10
|
+
export default Select;
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|