tntd 2.7.30 → 2.7.31

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (581) hide show
  1. package/es/ellipsis/index.js +2 -0
  2. package/es/ellipsis/index.js.map +1 -1
  3. package/lib/ellipsis/index.d.ts.map +1 -1
  4. package/lib/ellipsis/index.js +2 -0
  5. package/lib/ellipsis/index.js.map +1 -1
  6. package/package.json +1 -1
  7. package/themes/common/index.less +3 -3
  8. package/es/affix/style/index.less +0 -6
  9. package/es/alert/style/index.less +0 -188
  10. package/es/anchor/style/index.less +0 -82
  11. package/es/auto-complete/style/index.less +0 -92
  12. package/es/avatar/style/index.less +0 -59
  13. package/es/back-top/style/index.less +0 -42
  14. package/es/back-top/style/responsive.less +0 -11
  15. package/es/badge/style/index.less +0 -190
  16. package/es/breadcrumb/style/index.less +0 -51
  17. package/es/button/style/index.less +0 -224
  18. package/es/button/style/mixin.less +0 -357
  19. package/es/calendar/style/index.less +0 -278
  20. package/es/card/style/index.less +0 -263
  21. package/es/card/style/size.less +0 -25
  22. package/es/carousel/style/index.less +0 -238
  23. package/es/cascader/style/index.less +0 -227
  24. package/es/checkbox/style/index.less +0 -4
  25. package/es/checkbox/style/mixin.less +0 -220
  26. package/es/collapse/style/index.less +0 -134
  27. package/es/comment/style/index.less +0 -93
  28. package/es/config-provider/style/index.less +0 -2
  29. package/es/date-picker/style/Calendar.less +0 -402
  30. package/es/date-picker/style/DecadePanel.less +0 -81
  31. package/es/date-picker/style/MonthPanel.less +0 -86
  32. package/es/date-picker/style/MonthPicker.less +0 -11
  33. package/es/date-picker/style/Picker.less +0 -113
  34. package/es/date-picker/style/RangePicker.less +0 -248
  35. package/es/date-picker/style/TimePicker.less +0 -151
  36. package/es/date-picker/style/WeekPicker.less +0 -21
  37. package/es/date-picker/style/YearPanel.less +0 -85
  38. package/es/date-picker/style/index.less +0 -17
  39. package/es/descriptions/style/index.less +0 -144
  40. package/es/divider/style/index.less +0 -109
  41. package/es/drawer/style/drawer.less +0 -230
  42. package/es/drawer/style/index.less +0 -3
  43. package/es/dropdown/style/index.less +0 -282
  44. package/es/empty/style/index.less +0 -52
  45. package/es/form/style/index.less +0 -653
  46. package/es/form/style/mixin.less +0 -126
  47. package/es/grid-v4/style/index.less +0 -124
  48. package/es/grid-v4/style/mixin.less +0 -57
  49. package/es/grid-v4/style/rtl.less +0 -69
  50. package/es/handle/handle.js +0 -138
  51. package/es/handle/handle.js.map +0 -1
  52. package/es/icon/style/index.less +0 -4
  53. package/es/input/style/index.less +0 -57
  54. package/es/input/style/mixin.less +0 -449
  55. package/es/input/style/search-input.less +0 -34
  56. package/es/input-number/style/index.less +0 -179
  57. package/es/layout/style/index.less +0 -124
  58. package/es/layout/style/light.less +0 -15
  59. package/es/list/style/bordered.less +0 -41
  60. package/es/list/style/index.less +0 -234
  61. package/es/list/style/responsive.less +0 -40
  62. package/es/locale-provider/style/index.less +0 -2
  63. package/es/mention/index.js +0 -4
  64. package/es/mention/index.js.map +0 -1
  65. package/es/mentions/style/index.less +0 -164
  66. package/es/menu/style/dark.less +0 -139
  67. package/es/menu/style/index.less +0 -515
  68. package/es/message/style/index.less +0 -75
  69. package/es/modal/style/confirm.less +0 -78
  70. package/es/modal/style/index.less +0 -4
  71. package/es/modal/style/modal.less +0 -165
  72. package/es/notification/style/index.less +0 -199
  73. package/es/page-header/style/index.less +0 -119
  74. package/es/pagination/style/index.less +0 -400
  75. package/es/popover/style/index.less +0 -205
  76. package/es/progress/style/index.less +0 -182
  77. package/es/radio/style/index.less +0 -327
  78. package/es/rate/style/index.less +0 -85
  79. package/es/result/style/index.less +0 -71
  80. package/es/select/style/index.less +0 -604
  81. package/es/skeleton/style/index.less +0 -130
  82. package/es/slider/style/index.less +0 -197
  83. package/es/spin/style/index.less +0 -214
  84. package/es/statistic/style/index.less +0 -40
  85. package/es/steps/style/compatibility.less +0 -50
  86. package/es/steps/style/custom-icon.less +0 -31
  87. package/es/steps/style/label-placement.less +0 -38
  88. package/es/steps/style/progress-dot.less +0 -80
  89. package/es/steps/style/vertical.less +0 -74
  90. package/es/style/color/bezierEasing.less +0 -110
  91. package/es/style/color/colorPalette.less +0 -75
  92. package/es/style/color/colors.less +0 -149
  93. package/es/style/color/tinyColor.less +0 -1184
  94. package/es/style/core/base.less +0 -510
  95. package/es/style/core/iconfont.less +0 -19
  96. package/es/style/core/index.less +0 -4
  97. package/es/style/core/motion/fade.less +0 -31
  98. package/es/style/core/motion/move.less +0 -120
  99. package/es/style/core/motion/other.less +0 -40
  100. package/es/style/core/motion/slide.less +0 -120
  101. package/es/style/core/motion/swing.less +0 -34
  102. package/es/style/core/motion/zoom.less +0 -162
  103. package/es/style/core/motion.less +0 -20
  104. package/es/style/index.less +0 -2
  105. package/es/style/mixins/clearfix.less +0 -13
  106. package/es/style/mixins/compatibility.less +0 -22
  107. package/es/style/mixins/iconfont.less +0 -43
  108. package/es/style/mixins/index.less +0 -10
  109. package/es/style/mixins/motion.less +0 -35
  110. package/es/style/mixins/operation-unit.less +0 -18
  111. package/es/style/mixins/reset.less +0 -13
  112. package/es/style/mixins/size.less +0 -10
  113. package/es/style/mixins/typography.less +0 -49
  114. package/es/style/themes/default.less +0 -699
  115. package/es/style/themes/index.less +0 -1
  116. package/es/style/v2-compatible-reset.less +0 -51
  117. package/es/switch/style/index.less +0 -178
  118. package/es/table/style/index.less +0 -800
  119. package/es/table/style/size.less +0 -179
  120. package/es/tabs/style/card-style.less +0 -186
  121. package/es/tabs/style/index.less +0 -436
  122. package/es/tag/style/index.less +0 -106
  123. package/es/time-picker/style/index.less +0 -246
  124. package/es/timeline/style/index.less +0 -167
  125. package/es/tntd-form/TntdForm/components/Item.js +0 -55
  126. package/es/tntd-form/TntdForm/components/Item.js.map +0 -1
  127. package/es/tntd-form/TntdForm/components/ItemComp.js +0 -186
  128. package/es/tntd-form/TntdForm/components/ItemComp.js.map +0 -1
  129. package/es/tntd-form/TntdForm/components/List.js +0 -102
  130. package/es/tntd-form/TntdForm/components/List.js.map +0 -1
  131. package/es/tntd-form/TntdForm/index.js +0 -55
  132. package/es/tntd-form/TntdForm/index.js.map +0 -1
  133. package/es/tntd-form/TntdForm/interface.js +0 -1
  134. package/es/tntd-form/TntdForm/interface.js.map +0 -1
  135. package/es/tntd-form/TntdForm/store.js +0 -2
  136. package/es/tntd-form/TntdForm/store.js.map +0 -1
  137. package/es/tntd-form/TntdForm/utils.js +0 -219
  138. package/es/tntd-form/TntdForm/utils.js.map +0 -1
  139. package/es/tntd-form/_util/motion.js +0 -47
  140. package/es/tntd-form/_util/motion.js.map +0 -1
  141. package/es/tntd-form/_util/reactNode.js +0 -16
  142. package/es/tntd-form/_util/reactNode.js.map +0 -1
  143. package/es/tntd-form/_util/scrollTo.js +0 -35
  144. package/es/tntd-form/_util/scrollTo.js.map +0 -1
  145. package/es/tntd-form/_util/type.js +0 -3
  146. package/es/tntd-form/_util/type.js.map +0 -1
  147. package/es/tntd-form/_util/warning.js +0 -5
  148. package/es/tntd-form/_util/warning.js.map +0 -1
  149. package/es/tntd-form/_util/wave.js +0 -168
  150. package/es/tntd-form/_util/wave.js.map +0 -1
  151. package/es/tntd-form/tntd-form.stories.js +0 -836
  152. package/es/tntd-form/tntd-form.stories.js.map +0 -1
  153. package/es/tntd-select/_util/DisabledContext.js +0 -12
  154. package/es/tntd-select/_util/DisabledContext.js.map +0 -1
  155. package/es/tntd-select/_util/FormItemInputContext.js +0 -2
  156. package/es/tntd-select/_util/FormItemInputContext.js.map +0 -1
  157. package/es/tntd-select/_util/PurePanel.js +0 -66
  158. package/es/tntd-select/_util/PurePanel.js.map +0 -1
  159. package/es/tntd-select/_util/SizeContext.js +0 -2
  160. package/es/tntd-select/_util/SizeContext.js.map +0 -1
  161. package/es/tntd-select/_util/context.js +0 -12
  162. package/es/tntd-select/_util/context.js.map +0 -1
  163. package/es/tntd-select/_util/defaultRenderEmpty.js +0 -31
  164. package/es/tntd-select/_util/defaultRenderEmpty.js.map +0 -1
  165. package/es/tntd-select/_util/getIcons.js +0 -74
  166. package/es/tntd-select/_util/getIcons.js.map +0 -1
  167. package/es/tntd-select/_util/interface.js +0 -4
  168. package/es/tntd-select/_util/interface.js.map +0 -1
  169. package/es/tntd-select/_util/motion.js +0 -47
  170. package/es/tntd-select/_util/motion.js.map +0 -1
  171. package/es/tntd-select/_util/type.js +0 -3
  172. package/es/tntd-select/_util/type.js.map +0 -1
  173. package/es/tntd-select/_util/useCompactItemContext.js +0 -26
  174. package/es/tntd-select/_util/useCompactItemContext.js.map +0 -1
  175. package/es/tntd-select/_util/warning.js +0 -14
  176. package/es/tntd-select/_util/warning.js.map +0 -1
  177. package/es/tntd-select/rc-select/BaseSelect.js +0 -524
  178. package/es/tntd-select/rc-select/BaseSelect.js.map +0 -1
  179. package/es/tntd-select/rc-select/OptGroup.js +0 -4
  180. package/es/tntd-select/rc-select/OptGroup.js.map +0 -1
  181. package/es/tntd-select/rc-select/Option.js +0 -4
  182. package/es/tntd-select/rc-select/Option.js.map +0 -1
  183. package/es/tntd-select/rc-select/OptionList.js +0 -346
  184. package/es/tntd-select/rc-select/OptionList.js.map +0 -1
  185. package/es/tntd-select/rc-select/Select.js +0 -440
  186. package/es/tntd-select/rc-select/Select.js.map +0 -1
  187. package/es/tntd-select/rc-select/SelectContext.js +0 -3
  188. package/es/tntd-select/rc-select/SelectContext.js.map +0 -1
  189. package/es/tntd-select/rc-select/SelectTrigger.js +0 -130
  190. package/es/tntd-select/rc-select/SelectTrigger.js.map +0 -1
  191. package/es/tntd-select/rc-select/Selector/Input.js +0 -103
  192. package/es/tntd-select/rc-select/Selector/Input.js.map +0 -1
  193. package/es/tntd-select/rc-select/Selector/MultipleSelector.js +0 -171
  194. package/es/tntd-select/rc-select/Selector/MultipleSelector.js.map +0 -1
  195. package/es/tntd-select/rc-select/Selector/SingleSelector.js +0 -98
  196. package/es/tntd-select/rc-select/Selector/SingleSelector.js.map +0 -1
  197. package/es/tntd-select/rc-select/Selector/index.js +0 -158
  198. package/es/tntd-select/rc-select/Selector/index.js.map +0 -1
  199. package/es/tntd-select/rc-select/TransBtn.js +0 -36
  200. package/es/tntd-select/rc-select/TransBtn.js.map +0 -1
  201. package/es/tntd-select/rc-select/hooks/useAllowClear.js +0 -24
  202. package/es/tntd-select/rc-select/hooks/useAllowClear.js.map +0 -1
  203. package/es/tntd-select/rc-select/hooks/useBaseProps.js +0 -9
  204. package/es/tntd-select/rc-select/hooks/useBaseProps.js.map +0 -1
  205. package/es/tntd-select/rc-select/hooks/useCache.js +0 -38
  206. package/es/tntd-select/rc-select/hooks/useCache.js.map +0 -1
  207. package/es/tntd-select/rc-select/hooks/useDelayReset.js +0 -23
  208. package/es/tntd-select/rc-select/hooks/useDelayReset.js.map +0 -1
  209. package/es/tntd-select/rc-select/hooks/useFilterOptions.js +0 -55
  210. package/es/tntd-select/rc-select/hooks/useFilterOptions.js.map +0 -1
  211. package/es/tntd-select/rc-select/hooks/useId.js +0 -26
  212. package/es/tntd-select/rc-select/hooks/useId.js.map +0 -1
  213. package/es/tntd-select/rc-select/hooks/useLayoutEffect.js +0 -16
  214. package/es/tntd-select/rc-select/hooks/useLayoutEffect.js.map +0 -1
  215. package/es/tntd-select/rc-select/hooks/useLock.js +0 -25
  216. package/es/tntd-select/rc-select/hooks/useLock.js.map +0 -1
  217. package/es/tntd-select/rc-select/hooks/useOptions.js +0 -43
  218. package/es/tntd-select/rc-select/hooks/useOptions.js.map +0 -1
  219. package/es/tntd-select/rc-select/hooks/useRefFunc.js +0 -13
  220. package/es/tntd-select/rc-select/hooks/useRefFunc.js.map +0 -1
  221. package/es/tntd-select/rc-select/hooks/useSelectTriggerControl.js +0 -28
  222. package/es/tntd-select/rc-select/hooks/useSelectTriggerControl.js.map +0 -1
  223. package/es/tntd-select/rc-select/index.js +0 -7
  224. package/es/tntd-select/rc-select/index.js.map +0 -1
  225. package/es/tntd-select/rc-select/interface.js +0 -1
  226. package/es/tntd-select/rc-select/interface.js.map +0 -1
  227. package/es/tntd-select/rc-select/utils/commonUtil.js +0 -30
  228. package/es/tntd-select/rc-select/utils/commonUtil.js.map +0 -1
  229. package/es/tntd-select/rc-select/utils/keyUtil.js +0 -9
  230. package/es/tntd-select/rc-select/utils/keyUtil.js.map +0 -1
  231. package/es/tntd-select/rc-select/utils/legacyUtil.js +0 -55
  232. package/es/tntd-select/rc-select/utils/legacyUtil.js.map +0 -1
  233. package/es/tntd-select/rc-select/utils/platformUtil.js +0 -4
  234. package/es/tntd-select/rc-select/utils/platformUtil.js.map +0 -1
  235. package/es/tntd-select/rc-select/utils/valueUtil.js +0 -112
  236. package/es/tntd-select/rc-select/utils/valueUtil.js.map +0 -1
  237. package/es/tntd-select/rc-select/utils/warningPropsUtil.js +0 -112
  238. package/es/tntd-select/rc-select/utils/warningPropsUtil.js.map +0 -1
  239. package/es/tooltip/style/index.less +0 -187
  240. package/es/transfer/style/customize.less +0 -62
  241. package/es/transfer/style/index.less +0 -191
  242. package/es/tree/style/directory.less +0 -95
  243. package/es/tree/style/index.less +0 -280
  244. package/es/tree/style/mixin.less +0 -29
  245. package/es/tree-select/style/index.less +0 -191
  246. package/es/typography/style/index.less +0 -204
  247. package/es/upload/style/index.less +0 -542
  248. package/lib/affix/style/index.less +0 -6
  249. package/lib/alert/style/index.less +0 -188
  250. package/lib/anchor/style/index.less +0 -82
  251. package/lib/auto-complete/style/index.less +0 -92
  252. package/lib/avatar/style/index.less +0 -59
  253. package/lib/back-top/style/index.less +0 -42
  254. package/lib/back-top/style/responsive.less +0 -11
  255. package/lib/badge/style/index.less +0 -190
  256. package/lib/breadcrumb/style/index.less +0 -51
  257. package/lib/button/style/index.less +0 -224
  258. package/lib/button/style/mixin.less +0 -357
  259. package/lib/calendar/style/index.less +0 -278
  260. package/lib/card/style/index.less +0 -263
  261. package/lib/card/style/size.less +0 -25
  262. package/lib/carousel/style/index.less +0 -238
  263. package/lib/cascader/style/index.less +0 -227
  264. package/lib/checkbox/style/index.less +0 -4
  265. package/lib/checkbox/style/mixin.less +0 -220
  266. package/lib/collapse/style/index.less +0 -134
  267. package/lib/comment/style/index.less +0 -93
  268. package/lib/config-provider/style/index.less +0 -2
  269. package/lib/date-picker/style/Calendar.less +0 -402
  270. package/lib/date-picker/style/DecadePanel.less +0 -81
  271. package/lib/date-picker/style/MonthPanel.less +0 -86
  272. package/lib/date-picker/style/MonthPicker.less +0 -11
  273. package/lib/date-picker/style/Picker.less +0 -113
  274. package/lib/date-picker/style/RangePicker.less +0 -248
  275. package/lib/date-picker/style/TimePicker.less +0 -151
  276. package/lib/date-picker/style/WeekPicker.less +0 -21
  277. package/lib/date-picker/style/YearPanel.less +0 -85
  278. package/lib/date-picker/style/index.less +0 -17
  279. package/lib/descriptions/style/index.less +0 -144
  280. package/lib/divider/style/index.less +0 -109
  281. package/lib/drawer/style/drawer.less +0 -230
  282. package/lib/drawer/style/index.less +0 -3
  283. package/lib/dropdown/style/index.less +0 -282
  284. package/lib/empty/style/index.less +0 -52
  285. package/lib/form/style/index.less +0 -653
  286. package/lib/form/style/mixin.less +0 -126
  287. package/lib/grid-v4/style/index.less +0 -124
  288. package/lib/grid-v4/style/mixin.less +0 -57
  289. package/lib/grid-v4/style/rtl.less +0 -69
  290. package/lib/handle/handle.d.ts +0 -3
  291. package/lib/handle/handle.d.ts.map +0 -1
  292. package/lib/handle/handle.js +0 -181
  293. package/lib/handle/handle.js.map +0 -1
  294. package/lib/icon/style/index.less +0 -4
  295. package/lib/input/style/index.less +0 -57
  296. package/lib/input/style/mixin.less +0 -449
  297. package/lib/input/style/search-input.less +0 -34
  298. package/lib/input-number/style/index.less +0 -179
  299. package/lib/layout/style/index.less +0 -124
  300. package/lib/layout/style/light.less +0 -15
  301. package/lib/list/style/bordered.less +0 -41
  302. package/lib/list/style/index.less +0 -234
  303. package/lib/list/style/responsive.less +0 -40
  304. package/lib/locale-provider/style/index.less +0 -2
  305. package/lib/mention/index.js +0 -25
  306. package/lib/mentions/style/index.less +0 -164
  307. package/lib/menu/style/dark.less +0 -139
  308. package/lib/menu/style/index.less +0 -515
  309. package/lib/message/style/index.less +0 -75
  310. package/lib/modal/style/confirm.less +0 -78
  311. package/lib/modal/style/index.less +0 -4
  312. package/lib/modal/style/modal.less +0 -165
  313. package/lib/notification/style/index.less +0 -199
  314. package/lib/page-header/style/index.less +0 -119
  315. package/lib/pagination/style/index.less +0 -400
  316. package/lib/popover/style/index.less +0 -205
  317. package/lib/progress/style/index.less +0 -182
  318. package/lib/radio/style/index.less +0 -327
  319. package/lib/rate/style/index.less +0 -85
  320. package/lib/result/style/index.less +0 -71
  321. package/lib/select/style/index.less +0 -604
  322. package/lib/skeleton/style/index.less +0 -130
  323. package/lib/slider/style/index.less +0 -197
  324. package/lib/spin/style/index.less +0 -214
  325. package/lib/statistic/style/index.less +0 -40
  326. package/lib/steps/style/compatibility.less +0 -50
  327. package/lib/steps/style/custom-icon.less +0 -31
  328. package/lib/steps/style/label-placement.less +0 -38
  329. package/lib/steps/style/progress-dot.less +0 -80
  330. package/lib/steps/style/vertical.less +0 -74
  331. package/lib/style/color/bezierEasing.less +0 -110
  332. package/lib/style/color/colorPalette.less +0 -75
  333. package/lib/style/color/colors.less +0 -149
  334. package/lib/style/color/tinyColor.less +0 -1184
  335. package/lib/style/core/base.less +0 -510
  336. package/lib/style/core/iconfont.less +0 -19
  337. package/lib/style/core/index.less +0 -4
  338. package/lib/style/core/motion/fade.less +0 -31
  339. package/lib/style/core/motion/move.less +0 -120
  340. package/lib/style/core/motion/other.less +0 -40
  341. package/lib/style/core/motion/slide.less +0 -120
  342. package/lib/style/core/motion/swing.less +0 -34
  343. package/lib/style/core/motion/zoom.less +0 -162
  344. package/lib/style/core/motion.less +0 -20
  345. package/lib/style/index.less +0 -2
  346. package/lib/style/mixins/clearfix.less +0 -13
  347. package/lib/style/mixins/compatibility.less +0 -22
  348. package/lib/style/mixins/iconfont.less +0 -43
  349. package/lib/style/mixins/index.less +0 -10
  350. package/lib/style/mixins/motion.less +0 -35
  351. package/lib/style/mixins/operation-unit.less +0 -18
  352. package/lib/style/mixins/reset.less +0 -13
  353. package/lib/style/mixins/size.less +0 -10
  354. package/lib/style/mixins/typography.less +0 -49
  355. package/lib/style/themes/default.less +0 -699
  356. package/lib/style/themes/index.less +0 -1
  357. package/lib/style/v2-compatible-reset.less +0 -51
  358. package/lib/switch/style/index.less +0 -178
  359. package/lib/table/style/index.less +0 -800
  360. package/lib/table/style/size.less +0 -179
  361. package/lib/tabs/style/card-style.less +0 -186
  362. package/lib/tabs/style/index.less +0 -436
  363. package/lib/tag/style/index.less +0 -106
  364. package/lib/time-picker/style/index.less +0 -246
  365. package/lib/timeline/style/index.less +0 -167
  366. package/lib/tntd-form/TntdForm/components/Item.js +0 -65
  367. package/lib/tntd-form/TntdForm/components/ItemComp.js +0 -215
  368. package/lib/tntd-form/TntdForm/components/List.js +0 -123
  369. package/lib/tntd-form/TntdForm/index.js +0 -72
  370. package/lib/tntd-form/TntdForm/interface.js +0 -5
  371. package/lib/tntd-form/TntdForm/store.js +0 -10
  372. package/lib/tntd-form/TntdForm/utils.js +0 -239
  373. package/lib/tntd-form/_util/motion.d.ts +0 -9
  374. package/lib/tntd-form/_util/motion.d.ts.map +0 -1
  375. package/lib/tntd-form/_util/motion.js +0 -59
  376. package/lib/tntd-form/_util/motion.js.map +0 -1
  377. package/lib/tntd-form/_util/reactNode.d.ts +0 -9
  378. package/lib/tntd-form/_util/reactNode.d.ts.map +0 -1
  379. package/lib/tntd-form/_util/reactNode.js +0 -27
  380. package/lib/tntd-form/_util/reactNode.js.map +0 -1
  381. package/lib/tntd-form/_util/scrollTo.d.ts +0 -1
  382. package/lib/tntd-form/_util/scrollTo.d.ts.map +0 -1
  383. package/lib/tntd-form/_util/scrollTo.js +0 -35
  384. package/lib/tntd-form/_util/scrollTo.js.map +0 -1
  385. package/lib/tntd-form/_util/type.d.ts +0 -4
  386. package/lib/tntd-form/_util/type.d.ts.map +0 -1
  387. package/lib/tntd-form/_util/type.js +0 -21
  388. package/lib/tntd-form/_util/type.js.map +0 -1
  389. package/lib/tntd-form/_util/warning.d.ts +0 -5
  390. package/lib/tntd-form/_util/warning.d.ts.map +0 -1
  391. package/lib/tntd-form/_util/warning.js +0 -20
  392. package/lib/tntd-form/_util/warning.js.map +0 -1
  393. package/lib/tntd-form/_util/wave.d.ts +0 -1
  394. package/lib/tntd-form/_util/wave.d.ts.map +0 -1
  395. package/lib/tntd-form/_util/wave.js +0 -168
  396. package/lib/tntd-form/_util/wave.js.map +0 -1
  397. package/lib/tntd-form/tntd-form.stories.d.ts +0 -33
  398. package/lib/tntd-form/tntd-form.stories.d.ts.map +0 -1
  399. package/lib/tntd-form/tntd-form.stories.js +0 -943
  400. package/lib/tntd-form/tntd-form.stories.js.map +0 -1
  401. package/lib/tntd-select/_util/DisabledContext.d.ts +0 -10
  402. package/lib/tntd-select/_util/DisabledContext.d.ts.map +0 -1
  403. package/lib/tntd-select/_util/DisabledContext.js +0 -22
  404. package/lib/tntd-select/_util/DisabledContext.js.map +0 -1
  405. package/lib/tntd-select/_util/FormItemInputContext.d.ts +0 -4
  406. package/lib/tntd-select/_util/FormItemInputContext.d.ts.map +0 -1
  407. package/lib/tntd-select/_util/FormItemInputContext.js +0 -12
  408. package/lib/tntd-select/_util/FormItemInputContext.js.map +0 -1
  409. package/lib/tntd-select/_util/PurePanel.d.ts +0 -9
  410. package/lib/tntd-select/_util/PurePanel.d.ts.map +0 -1
  411. package/lib/tntd-select/_util/PurePanel.js +0 -90
  412. package/lib/tntd-select/_util/PurePanel.js.map +0 -1
  413. package/lib/tntd-select/_util/SizeContext.d.ts +0 -4
  414. package/lib/tntd-select/_util/SizeContext.d.ts.map +0 -1
  415. package/lib/tntd-select/_util/SizeContext.js +0 -12
  416. package/lib/tntd-select/_util/SizeContext.js.map +0 -1
  417. package/lib/tntd-select/_util/context.d.ts +0 -42
  418. package/lib/tntd-select/_util/context.d.ts.map +0 -1
  419. package/lib/tntd-select/_util/context.js +0 -22
  420. package/lib/tntd-select/_util/context.js.map +0 -1
  421. package/lib/tntd-select/_util/defaultRenderEmpty.d.ts +0 -5
  422. package/lib/tntd-select/_util/defaultRenderEmpty.d.ts.map +0 -1
  423. package/lib/tntd-select/_util/defaultRenderEmpty.js +0 -44
  424. package/lib/tntd-select/_util/defaultRenderEmpty.js.map +0 -1
  425. package/lib/tntd-select/_util/getIcons.d.ts +0 -25
  426. package/lib/tntd-select/_util/getIcons.d.ts.map +0 -1
  427. package/lib/tntd-select/_util/getIcons.js +0 -84
  428. package/lib/tntd-select/_util/getIcons.js.map +0 -1
  429. package/lib/tntd-select/_util/interface.d.ts +0 -25
  430. package/lib/tntd-select/_util/interface.d.ts.map +0 -1
  431. package/lib/tntd-select/_util/interface.js +0 -16
  432. package/lib/tntd-select/_util/interface.js.map +0 -1
  433. package/lib/tntd-select/_util/motion.d.ts +0 -9
  434. package/lib/tntd-select/_util/motion.d.ts.map +0 -1
  435. package/lib/tntd-select/_util/motion.js +0 -59
  436. package/lib/tntd-select/_util/motion.js.map +0 -1
  437. package/lib/tntd-select/_util/type.d.ts +0 -10
  438. package/lib/tntd-select/_util/type.d.ts.map +0 -1
  439. package/lib/tntd-select/_util/type.js +0 -21
  440. package/lib/tntd-select/_util/type.js.map +0 -1
  441. package/lib/tntd-select/_util/useCompactItemContext.d.ts +0 -9
  442. package/lib/tntd-select/_util/useCompactItemContext.d.ts.map +0 -1
  443. package/lib/tntd-select/_util/useCompactItemContext.js +0 -35
  444. package/lib/tntd-select/_util/useCompactItemContext.js.map +0 -1
  445. package/lib/tntd-select/_util/warning.d.ts +0 -4
  446. package/lib/tntd-select/_util/warning.d.ts.map +0 -1
  447. package/lib/tntd-select/_util/warning.js +0 -24
  448. package/lib/tntd-select/_util/warning.js.map +0 -1
  449. package/lib/tntd-select/rc-select/BaseSelect.d.ts +0 -114
  450. package/lib/tntd-select/rc-select/BaseSelect.d.ts.map +0 -1
  451. package/lib/tntd-select/rc-select/BaseSelect.js +0 -566
  452. package/lib/tntd-select/rc-select/BaseSelect.js.map +0 -1
  453. package/lib/tntd-select/rc-select/OptGroup.d.ts +0 -13
  454. package/lib/tntd-select/rc-select/OptGroup.d.ts.map +0 -1
  455. package/lib/tntd-select/rc-select/OptGroup.js +0 -13
  456. package/lib/tntd-select/rc-select/OptGroup.js.map +0 -1
  457. package/lib/tntd-select/rc-select/Option.d.ts +0 -15
  458. package/lib/tntd-select/rc-select/Option.d.ts.map +0 -1
  459. package/lib/tntd-select/rc-select/Option.js +0 -13
  460. package/lib/tntd-select/rc-select/Option.js.map +0 -1
  461. package/lib/tntd-select/rc-select/OptionList.d.ts +0 -11
  462. package/lib/tntd-select/rc-select/OptionList.d.ts.map +0 -1
  463. package/lib/tntd-select/rc-select/OptionList.js +0 -372
  464. package/lib/tntd-select/rc-select/OptionList.js.map +0 -1
  465. package/lib/tntd-select/rc-select/Select.d.ts +0 -115
  466. package/lib/tntd-select/rc-select/Select.d.ts.map +0 -1
  467. package/lib/tntd-select/rc-select/Select.js +0 -509
  468. package/lib/tntd-select/rc-select/Select.js.map +0 -1
  469. package/lib/tntd-select/rc-select/SelectContext.d.ts +0 -23
  470. package/lib/tntd-select/rc-select/SelectContext.d.ts.map +0 -1
  471. package/lib/tntd-select/rc-select/SelectContext.js +0 -13
  472. package/lib/tntd-select/rc-select/SelectContext.js.map +0 -1
  473. package/lib/tntd-select/rc-select/SelectTrigger.d.ts +0 -31
  474. package/lib/tntd-select/rc-select/SelectTrigger.d.ts.map +0 -1
  475. package/lib/tntd-select/rc-select/SelectTrigger.js +0 -149
  476. package/lib/tntd-select/rc-select/SelectTrigger.js.map +0 -1
  477. package/lib/tntd-select/rc-select/Selector/Input.d.ts +0 -27
  478. package/lib/tntd-select/rc-select/Selector/Input.d.ts.map +0 -1
  479. package/lib/tntd-select/rc-select/Selector/Input.js +0 -110
  480. package/lib/tntd-select/rc-select/Selector/Input.js.map +0 -1
  481. package/lib/tntd-select/rc-select/Selector/MultipleSelector.d.ts +0 -17
  482. package/lib/tntd-select/rc-select/Selector/MultipleSelector.d.ts.map +0 -1
  483. package/lib/tntd-select/rc-select/Selector/MultipleSelector.js +0 -193
  484. package/lib/tntd-select/rc-select/Selector/MultipleSelector.js.map +0 -1
  485. package/lib/tntd-select/rc-select/Selector/SingleSelector.d.ts +0 -9
  486. package/lib/tntd-select/rc-select/Selector/SingleSelector.d.ts.map +0 -1
  487. package/lib/tntd-select/rc-select/Selector/SingleSelector.js +0 -116
  488. package/lib/tntd-select/rc-select/Selector/SingleSelector.js.map +0 -1
  489. package/lib/tntd-select/rc-select/Selector/index.d.ts +0 -83
  490. package/lib/tntd-select/rc-select/Selector/index.d.ts.map +0 -1
  491. package/lib/tntd-select/rc-select/Selector/index.js +0 -159
  492. package/lib/tntd-select/rc-select/Selector/index.js.map +0 -1
  493. package/lib/tntd-select/rc-select/TransBtn.d.ts +0 -13
  494. package/lib/tntd-select/rc-select/TransBtn.d.ts.map +0 -1
  495. package/lib/tntd-select/rc-select/TransBtn.js +0 -48
  496. package/lib/tntd-select/rc-select/TransBtn.js.map +0 -1
  497. package/lib/tntd-select/rc-select/hooks/useAllowClear.d.ts +0 -9
  498. package/lib/tntd-select/rc-select/hooks/useAllowClear.d.ts.map +0 -1
  499. package/lib/tntd-select/rc-select/hooks/useAllowClear.js +0 -35
  500. package/lib/tntd-select/rc-select/hooks/useAllowClear.js.map +0 -1
  501. package/lib/tntd-select/rc-select/hooks/useBaseProps.d.ts +0 -14
  502. package/lib/tntd-select/rc-select/hooks/useBaseProps.d.ts.map +0 -1
  503. package/lib/tntd-select/rc-select/hooks/useBaseProps.js +0 -21
  504. package/lib/tntd-select/rc-select/hooks/useBaseProps.js.map +0 -1
  505. package/lib/tntd-select/rc-select/hooks/useCache.d.ts +0 -8
  506. package/lib/tntd-select/rc-select/hooks/useCache.d.ts.map +0 -1
  507. package/lib/tntd-select/rc-select/hooks/useCache.js +0 -49
  508. package/lib/tntd-select/rc-select/hooks/useCache.js.map +0 -1
  509. package/lib/tntd-select/rc-select/hooks/useDelayReset.d.ts +0 -6
  510. package/lib/tntd-select/rc-select/hooks/useDelayReset.d.ts.map +0 -1
  511. package/lib/tntd-select/rc-select/hooks/useDelayReset.js +0 -44
  512. package/lib/tntd-select/rc-select/hooks/useDelayReset.js.map +0 -1
  513. package/lib/tntd-select/rc-select/hooks/useFilterOptions.d.ts +0 -4
  514. package/lib/tntd-select/rc-select/hooks/useFilterOptions.d.ts.map +0 -1
  515. package/lib/tntd-select/rc-select/hooks/useFilterOptions.js +0 -72
  516. package/lib/tntd-select/rc-select/hooks/useFilterOptions.js.map +0 -1
  517. package/lib/tntd-select/rc-select/hooks/useId.d.ts +0 -6
  518. package/lib/tntd-select/rc-select/hooks/useId.d.ts.map +0 -1
  519. package/lib/tntd-select/rc-select/hooks/useId.js +0 -48
  520. package/lib/tntd-select/rc-select/hooks/useId.js.map +0 -1
  521. package/lib/tntd-select/rc-select/hooks/useLayoutEffect.d.ts +0 -6
  522. package/lib/tntd-select/rc-select/hooks/useLayoutEffect.d.ts.map +0 -1
  523. package/lib/tntd-select/rc-select/hooks/useLayoutEffect.js +0 -26
  524. package/lib/tntd-select/rc-select/hooks/useLayoutEffect.js.map +0 -1
  525. package/lib/tntd-select/rc-select/hooks/useLock.d.ts +0 -8
  526. package/lib/tntd-select/rc-select/hooks/useLock.d.ts.map +0 -1
  527. package/lib/tntd-select/rc-select/hooks/useLock.js +0 -39
  528. package/lib/tntd-select/rc-select/hooks/useLock.js.map +0 -1
  529. package/lib/tntd-select/rc-select/hooks/useOptions.d.ts +0 -12
  530. package/lib/tntd-select/rc-select/hooks/useOptions.d.ts.map +0 -1
  531. package/lib/tntd-select/rc-select/hooks/useOptions.js +0 -53
  532. package/lib/tntd-select/rc-select/hooks/useOptions.js.map +0 -1
  533. package/lib/tntd-select/rc-select/hooks/useRefFunc.d.ts +0 -6
  534. package/lib/tntd-select/rc-select/hooks/useRefFunc.d.ts.map +0 -1
  535. package/lib/tntd-select/rc-select/hooks/useRefFunc.js +0 -22
  536. package/lib/tntd-select/rc-select/hooks/useRefFunc.js.map +0 -1
  537. package/lib/tntd-select/rc-select/hooks/useSelectTriggerControl.d.ts +0 -2
  538. package/lib/tntd-select/rc-select/hooks/useSelectTriggerControl.d.ts.map +0 -1
  539. package/lib/tntd-select/rc-select/hooks/useSelectTriggerControl.js +0 -43
  540. package/lib/tntd-select/rc-select/hooks/useSelectTriggerControl.js.map +0 -1
  541. package/lib/tntd-select/rc-select/index.d.ts +0 -11
  542. package/lib/tntd-select/rc-select/index.d.ts.map +0 -1
  543. package/lib/tntd-select/rc-select/index.js +0 -38
  544. package/lib/tntd-select/rc-select/index.js.map +0 -1
  545. package/lib/tntd-select/rc-select/interface.d.ts +0 -23
  546. package/lib/tntd-select/rc-select/interface.d.ts.map +0 -1
  547. package/lib/tntd-select/rc-select/interface.js +0 -5
  548. package/lib/tntd-select/rc-select/interface.js.map +0 -1
  549. package/lib/tntd-select/rc-select/utils/commonUtil.d.ts +0 -10
  550. package/lib/tntd-select/rc-select/utils/commonUtil.d.ts.map +0 -1
  551. package/lib/tntd-select/rc-select/utils/commonUtil.js +0 -43
  552. package/lib/tntd-select/rc-select/utils/commonUtil.js.map +0 -1
  553. package/lib/tntd-select/rc-select/utils/keyUtil.d.ts +0 -3
  554. package/lib/tntd-select/rc-select/utils/keyUtil.d.ts.map +0 -1
  555. package/lib/tntd-select/rc-select/utils/keyUtil.js +0 -16
  556. package/lib/tntd-select/rc-select/utils/keyUtil.js.map +0 -1
  557. package/lib/tntd-select/rc-select/utils/legacyUtil.d.ts +0 -4
  558. package/lib/tntd-select/rc-select/utils/legacyUtil.d.ts.map +0 -1
  559. package/lib/tntd-select/rc-select/utils/legacyUtil.js +0 -60
  560. package/lib/tntd-select/rc-select/utils/legacyUtil.js.map +0 -1
  561. package/lib/tntd-select/rc-select/utils/platformUtil.d.ts +0 -2
  562. package/lib/tntd-select/rc-select/utils/platformUtil.d.ts.map +0 -1
  563. package/lib/tntd-select/rc-select/utils/platformUtil.js +0 -10
  564. package/lib/tntd-select/rc-select/utils/platformUtil.js.map +0 -1
  565. package/lib/tntd-select/rc-select/utils/valueUtil.d.ts +0 -24
  566. package/lib/tntd-select/rc-select/utils/valueUtil.d.ts.map +0 -1
  567. package/lib/tntd-select/rc-select/utils/valueUtil.js +0 -132
  568. package/lib/tntd-select/rc-select/utils/valueUtil.js.map +0 -1
  569. package/lib/tntd-select/rc-select/utils/warningPropsUtil.d.ts +0 -5
  570. package/lib/tntd-select/rc-select/utils/warningPropsUtil.d.ts.map +0 -1
  571. package/lib/tntd-select/rc-select/utils/warningPropsUtil.js +0 -127
  572. package/lib/tntd-select/rc-select/utils/warningPropsUtil.js.map +0 -1
  573. package/lib/tooltip/style/index.less +0 -187
  574. package/lib/transfer/style/customize.less +0 -62
  575. package/lib/transfer/style/index.less +0 -191
  576. package/lib/tree/style/directory.less +0 -95
  577. package/lib/tree/style/index.less +0 -280
  578. package/lib/tree/style/mixin.less +0 -29
  579. package/lib/tree-select/style/index.less +0 -191
  580. package/lib/typography/style/index.less +0 -204
  581. package/lib/upload/style/index.less +0 -542
@@ -1,36 +0,0 @@
1
- import * as React from 'react';
2
- import classNames from 'classnames';
3
- const TransBtn = ({
4
- className,
5
- customizeIcon,
6
- customizeIconProps,
7
- onMouseDown,
8
- onClick,
9
- children
10
- }) => {
11
- let icon;
12
- if (typeof customizeIcon === 'function') {
13
- icon = customizeIcon(customizeIconProps);
14
- } else {
15
- icon = customizeIcon;
16
- }
17
- return React.createElement("span", {
18
- className: className,
19
- onMouseDown: event => {
20
- event.preventDefault();
21
- if (onMouseDown) {
22
- onMouseDown(event);
23
- }
24
- },
25
- style: {
26
- userSelect: 'none',
27
- WebkitUserSelect: 'none'
28
- },
29
- unselectable: "on",
30
- onClick: onClick,
31
- "aria-hidden": true
32
- }, icon !== undefined ? icon : React.createElement("span", {
33
- className: classNames(className.split(/\s+/).map(cls => `${cls}-icon`))
34
- }, children));
35
- };
36
- export default TransBtn;
@@ -1 +0,0 @@
1
- {"version":3,"file":"TransBtn.js","sourceRoot":"","sources":["../../../src/tntd-select/rc-select/TransBtn.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,UAAU,MAAM,YAAY,CAAC;AAYpC,MAAM,QAAQ,GAA4B,CAAC,EACzC,SAAS,EACT,aAAa,EACb,kBAAkB,EAClB,WAAW,EACX,OAAO,EACP,QAAQ,GACT,EAAE,EAAE;IACH,IAAI,IAAqB,CAAC;IAE1B,IAAI,OAAO,aAAa,KAAK,UAAU,EAAE;QACvC,IAAI,GAAG,aAAa,CAAC,kBAAkB,CAAC,CAAC;KAC1C;SAAM;QACL,IAAI,GAAG,aAAa,CAAC;KACtB;IAED,OAAO,CACL,8BACE,SAAS,EAAE,SAAS,EACpB,WAAW,EAAE,CAAC,KAAK,EAAE,EAAE;YACrB,KAAK,CAAC,cAAc,EAAE,CAAC;YACvB,IAAI,WAAW,EAAE;gBACf,WAAW,CAAC,KAAK,CAAC,CAAC;aACpB;QACH,CAAC,EACD,KAAK,EAAE;YACL,UAAU,EAAE,MAAM;YAClB,gBAAgB,EAAE,MAAM;SACzB,EACD,YAAY,EAAC,IAAI,EACjB,OAAO,EAAE,OAAO,yBAGf,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,CACpB,IAAI,CACL,CAAC,CAAC,CAAC,CACF,8BAAM,SAAS,EAAE,UAAU,CAAC,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,GAAG,OAAO,CAAC,CAAC,IAC5E,QAAQ,CACJ,CACR,CACI,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,QAAQ,CAAC","sourcesContent":["import * as React from 'react';\nimport classNames from 'classnames';\nimport type { RenderNode } from './BaseSelect';\n\nexport interface TransBtnProps {\n className: string;\n customizeIcon: RenderNode;\n customizeIconProps?: any;\n onMouseDown?: React.MouseEventHandler<HTMLSpanElement>;\n onClick?: React.MouseEventHandler<HTMLSpanElement>;\n children?: React.ReactNode;\n}\n\nconst TransBtn: React.FC<TransBtnProps> = ({\n className,\n customizeIcon,\n customizeIconProps,\n onMouseDown,\n onClick,\n children,\n}) => {\n let icon: React.ReactNode;\n\n if (typeof customizeIcon === 'function') {\n icon = customizeIcon(customizeIconProps);\n } else {\n icon = customizeIcon;\n }\n\n return (\n <span\n className={className}\n onMouseDown={(event) => {\n event.preventDefault();\n if (onMouseDown) {\n onMouseDown(event);\n }\n }}\n style={{\n userSelect: 'none',\n WebkitUserSelect: 'none',\n }}\n unselectable=\"on\"\n onClick={onClick}\n aria-hidden\n >\n {icon !== undefined ? (\n icon\n ) : (\n <span className={classNames(className.split(/\\s+/).map((cls) => `${cls}-icon`))}>\n {children}\n </span>\n )}\n </span>\n );\n};\n\nexport default TransBtn;\n"]}
@@ -1,24 +0,0 @@
1
- import TransBtn from '../TransBtn';
2
- import React from 'react';
3
- export function useAllowClear(prefixCls, onClearMouseDown, displayValues, allowClear, clearIcon, disabled = false, mergedSearchValue, mode) {
4
- const mergedClearIcon = React.useMemo(() => {
5
- if (typeof allowClear === "object") {
6
- return allowClear.clearIcon;
7
- }
8
- if (!!clearIcon) return clearIcon;
9
- }, [allowClear, clearIcon]);
10
- const mergedAllowClear = React.useMemo(() => {
11
- if (!disabled && !!allowClear && (displayValues.length || mergedSearchValue) && !(mode === 'combobox' && mergedSearchValue === '')) {
12
- return true;
13
- }
14
- return false;
15
- }, [allowClear, disabled, displayValues.length, mergedSearchValue, mode]);
16
- return {
17
- allowClear: mergedAllowClear,
18
- clearIcon: React.createElement(TransBtn, {
19
- className: `${prefixCls}-clear`,
20
- onMouseDown: onClearMouseDown,
21
- customizeIcon: mergedClearIcon
22
- }, "\u00D7")
23
- };
24
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"useAllowClear.js","sourceRoot":"","sources":["../../../../src/tntd-select/rc-select/hooks/useAllowClear.tsx"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,aAAa,CAAC;AAGnC,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,UAAU,aAAa,CACzB,SAAS,EACT,gBAAgB,EAChB,aAAiC,EACjC,UAAgD,EAChD,SAAqB,EACrB,QAAQ,GAAG,KAAK,EAChB,iBAA0B,EAC1B,IAAW;IAEX,MAAM,eAAe,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,EAAE;QACvC,IAAI,OAAO,UAAU,KAAK,QAAQ,EAAE;YAChC,OAAO,UAAU,CAAC,SAAS,CAAC;SAC/B;QACD,IAAI,CAAC,CAAC,SAAS;YAAE,OAAO,SAAS,CAAC;IACtC,CAAC,EAAE,CAAC,UAAU,EAAE,SAAS,CAAC,CAAC,CAAC;IAG5B,MAAM,gBAAgB,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,EAAE;QACxC,IACI,CAAC,QAAQ;YACT,CAAC,CAAC,UAAU;YACZ,CAAC,aAAa,CAAC,MAAM,IAAI,iBAAiB,CAAC;YAC3C,CAAC,CAAC,IAAI,KAAK,UAAU,IAAI,iBAAiB,KAAK,EAAE,CAAC,EACpD;YACE,OAAO,IAAI,CAAC;SACf;QACD,OAAO,KAAK,CAAC;IACjB,CAAC,EAAE,CAAC,UAAU,EAAE,QAAQ,EAAE,aAAa,CAAC,MAAM,EAAE,iBAAiB,EAAE,IAAI,CAAC,CAAC,CAAC;IAE1E,OAAO;QACH,UAAU,EAAE,gBAAgB;QAC5B,SAAS,EAAE,CACP,oBAAC,QAAQ,IACL,SAAS,EAAE,GAAG,SAAS,QAAQ,EAC/B,WAAW,EAAE,gBAAgB,EAC7B,aAAa,EAAE,eAAe,aAGvB,CACd;KACJ,CAAC;AACN,CAAC","sourcesContent":["import TransBtn from '../TransBtn';\nimport type { DisplayValueType, Mode } from '../interface';\nimport type { ReactNode } from 'react';\nimport React from 'react';\n\nexport function useAllowClear(\n prefixCls,\n onClearMouseDown,\n displayValues: DisplayValueType[],\n allowClear?: boolean | { clearIcon?: ReactNode },\n clearIcon?: ReactNode,\n disabled = false,\n mergedSearchValue?: string,\n mode?: Mode\n) {\n const mergedClearIcon = React.useMemo(() => {\n if (typeof allowClear === \"object\") {\n return allowClear.clearIcon;\n }\n if (!!clearIcon) return clearIcon;\n }, [allowClear, clearIcon]);\n\n\n const mergedAllowClear = React.useMemo(() => {\n if (\n !disabled &&\n !!allowClear &&\n (displayValues.length || mergedSearchValue) &&\n !(mode === 'combobox' && mergedSearchValue === '')\n ) {\n return true;\n }\n return false;\n }, [allowClear, disabled, displayValues.length, mergedSearchValue, mode]);\n\n return {\n allowClear: mergedAllowClear,\n clearIcon: (\n <TransBtn\n className={`${prefixCls}-clear`}\n onMouseDown={onClearMouseDown}\n customizeIcon={mergedClearIcon}\n >\n ×\n </TransBtn>\n )\n };\n}\n"]}
@@ -1,9 +0,0 @@
1
- /**
2
- * BaseSelect provide some parsed data into context.
3
- * You can use this hooks to get them.
4
- */
5
- import * as React from 'react';
6
- export const BaseSelectContext = React.createContext(null);
7
- export default function useBaseProps() {
8
- return React.useContext(BaseSelectContext);
9
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"useBaseProps.js","sourceRoot":"","sources":["../../../../src/tntd-select/rc-select/hooks/useBaseProps.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAS/B,MAAM,CAAC,MAAM,iBAAiB,GAAG,KAAK,CAAC,aAAa,CAAyB,IAAI,CAAC,CAAC;AAEnF,MAAM,CAAC,OAAO,UAAU,YAAY;IAClC,OAAO,KAAK,CAAC,UAAU,CAAC,iBAAiB,CAAC,CAAC;AAC7C,CAAC","sourcesContent":["/**\n * BaseSelect provide some parsed data into context.\n * You can use this hooks to get them.\n */\n\nimport * as React from 'react';\nimport type { BaseSelectProps } from '../BaseSelect';\n\nexport interface BaseSelectContextProps extends BaseSelectProps {\n triggerOpen: boolean;\n multiple: boolean;\n toggleOpen: (open?: boolean) => void;\n}\n\nexport const BaseSelectContext = React.createContext<BaseSelectContextProps>(null);\n\nexport default function useBaseProps() {\n return React.useContext(BaseSelectContext);\n}\n"]}
@@ -1,38 +0,0 @@
1
- import * as React from 'react';
2
- /**
3
- * Cache `value` related LabeledValue & options.
4
- */
5
- export default ((labeledValues, valueOptions) => {
6
- const cacheRef = React.useRef({
7
- values: new Map(),
8
- options: new Map()
9
- });
10
- const filledLabeledValues = React.useMemo(() => {
11
- const {
12
- values: prevValueCache,
13
- options: prevOptionCache
14
- } = cacheRef.current;
15
- // Fill label by cache
16
- const patchedValues = labeledValues.map(item => {
17
- var _a;
18
- if (item.label === undefined) {
19
- return Object.assign(Object.assign({}, item), {
20
- label: (_a = prevValueCache.get(item.value)) === null || _a === void 0 ? void 0 : _a.label
21
- });
22
- }
23
- return item;
24
- });
25
- // Refresh cache
26
- const valueCache = new Map();
27
- const optionCache = new Map();
28
- patchedValues.forEach(item => {
29
- valueCache.set(item.value, item);
30
- optionCache.set(item.value, valueOptions.get(item.value) || prevOptionCache.get(item.value));
31
- });
32
- cacheRef.current.values = valueCache;
33
- cacheRef.current.options = optionCache;
34
- return patchedValues;
35
- }, [labeledValues, valueOptions]);
36
- const getOption = React.useCallback(val => valueOptions.get(val) || cacheRef.current.options.get(val), [valueOptions]);
37
- return [filledLabeledValues, getOption];
38
- });
@@ -1 +0,0 @@
1
- {"version":3,"file":"useCache.js","sourceRoot":"","sources":["../../../../src/tntd-select/rc-select/hooks/useCache.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B;;GAEG;AACH,eAAe,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"]}
@@ -1,23 +0,0 @@
1
- import * as React from 'react';
2
- /**
3
- * Similar with `useLock`, but this hook will always execute last value.
4
- * When set to `true`, it will keep `true` for a short time even if `false` is set.
5
- */
6
- export default function useDelayReset(timeout = 10) {
7
- const [bool, setBool] = React.useState(false);
8
- const delayRef = React.useRef(null);
9
- const cancelLatest = () => {
10
- window.clearTimeout(delayRef.current);
11
- };
12
- React.useEffect(() => cancelLatest, []);
13
- const delaySetBool = (value, callback) => {
14
- cancelLatest();
15
- delayRef.current = window.setTimeout(() => {
16
- setBool(value);
17
- if (callback) {
18
- callback();
19
- }
20
- }, timeout);
21
- };
22
- return [bool, delaySetBool, cancelLatest];
23
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"useDelayReset.js","sourceRoot":"","sources":["../../../../src/tntd-select/rc-select/hooks/useDelayReset.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,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","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"]}
@@ -1,55 +0,0 @@
1
- import * as React from 'react';
2
- import { toArray } from '../utils/commonUtil';
3
- import { injectPropsWithOption } from '../utils/valueUtil';
4
- function includes(test, search) {
5
- return toArray(test).join('').toUpperCase().includes(search);
6
- }
7
- export default ((options, fieldNames, searchValue, filterOption, optionFilterProp) => React.useMemo(() => {
8
- if (!searchValue || filterOption === false) {
9
- return options;
10
- }
11
- const {
12
- options: fieldOptions,
13
- label: fieldLabel,
14
- value: fieldValue
15
- } = fieldNames;
16
- const filteredOptions = [];
17
- const customizeFilter = typeof filterOption === 'function';
18
- const upperSearch = searchValue.toUpperCase();
19
- const filterFunc = customizeFilter ? filterOption : (_, option) => {
20
- // Use provided `optionFilterProp`
21
- if (optionFilterProp) {
22
- return includes(option[optionFilterProp], upperSearch);
23
- }
24
- // Auto select `label` or `value` by option type
25
- if (option[fieldOptions]) {
26
- // hack `fieldLabel` since `OptionGroup` children is not `label`
27
- return includes(option[fieldLabel !== 'children' ? fieldLabel : 'label'], upperSearch);
28
- }
29
- return includes(option[fieldValue], upperSearch);
30
- };
31
- const wrapOption = customizeFilter ? opt => injectPropsWithOption(opt) : opt => opt;
32
- options.forEach(item => {
33
- // Group should check child options
34
- if (item[fieldOptions]) {
35
- // Check group first
36
- const matchGroup = filterFunc(searchValue, wrapOption(item));
37
- if (matchGroup) {
38
- filteredOptions.push(item);
39
- } else {
40
- // Check option
41
- const subOptions = item[fieldOptions].filter(subItem => filterFunc(searchValue, wrapOption(subItem)));
42
- if (subOptions.length) {
43
- filteredOptions.push(Object.assign(Object.assign({}, item), {
44
- [fieldOptions]: subOptions
45
- }));
46
- }
47
- }
48
- return;
49
- }
50
- if (filterFunc(searchValue, wrapOption(item))) {
51
- filteredOptions.push(item);
52
- }
53
- });
54
- return filteredOptions;
55
- }, [options, filterOption, optionFilterProp, searchValue, fieldNames]));
@@ -1 +0,0 @@
1
- {"version":3,"file":"useFilterOptions.js","sourceRoot":"","sources":["../../../../src/tntd-select/rc-select/hooks/useFilterOptions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAE9C,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAE3D,SAAS,QAAQ,CAAC,IAAqB,EAAE,MAAc;IACrD,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;AAC/D,CAAC;AAED,eAAe,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,qBAAqB,CAAC,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"]}
@@ -1,26 +0,0 @@
1
- import * as React from 'react';
2
- import canUseDom from 'rc-util/lib/Dom/canUseDom';
3
- let uuid = 0;
4
- /** Is client side and not jsdom */
5
- export const isBrowserClient = process.env.NODE_ENV !== 'test' && canUseDom();
6
- /** Get unique id for accessibility usage */
7
- export function getUUID() {
8
- let retId;
9
- // Test never reach
10
- /* istanbul ignore if */
11
- if (isBrowserClient) {
12
- retId = uuid;
13
- uuid += 1;
14
- } else {
15
- retId = 'TEST_OR_SSR';
16
- }
17
- return retId;
18
- }
19
- export default function useId(id) {
20
- // Inner id for accessibility usage. Only work in client side
21
- const [innerId, setInnerId] = React.useState();
22
- React.useEffect(() => {
23
- setInnerId(`rc_select_${getUUID()}`);
24
- }, []);
25
- return id || innerId;
26
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"useId.js","sourceRoot":"","sources":["../../../../src/tntd-select/rc-select/hooks/useId.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,SAAS,MAAM,2BAA2B,CAAC;AAElD,IAAI,IAAI,GAAG,CAAC,CAAC;AAEb,mCAAmC;AACnC,MAAM,CAAC,MAAM,eAAe,GAAG,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,MAAM,IAAI,SAAS,EAAE,CAAC;AAE9E,4CAA4C;AAC5C,MAAM,UAAU,OAAO;IACrB,IAAI,KAAsB,CAAC;IAE3B,mBAAmB;IACnB,wBAAwB;IACxB,IAAI,eAAe,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;AAED,MAAM,CAAC,OAAO,UAAU,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","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"]}
@@ -1,16 +0,0 @@
1
- /* eslint-disable react-hooks/rules-of-hooks */
2
- import * as React from 'react';
3
- import { isBrowserClient } from '../utils/commonUtil';
4
- /**
5
- * Wrap `React.useLayoutEffect` which will not throw warning message in test env
6
- */
7
- export default function useLayoutEffect(effect, deps) {
8
- // Never happen in test env
9
- if (isBrowserClient) {
10
- /* istanbul ignore next */
11
- React.useLayoutEffect(effect, deps);
12
- } else {
13
- React.useEffect(effect, deps);
14
- }
15
- }
16
- /* eslint-enable */
@@ -1 +0,0 @@
1
- {"version":3,"file":"useLayoutEffect.js","sourceRoot":"","sources":["../../../../src/tntd-select/rc-select/hooks/useLayoutEffect.ts"],"names":[],"mappings":"AAAA,+CAA+C;AAC/C,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAEtD;;GAEG;AACH,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,MAA4B,EAAE,IAA2B;IAC/F,2BAA2B;IAC3B,IAAI,eAAe,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;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"]}
@@ -1,25 +0,0 @@
1
- import * as React from 'react';
2
- /**
3
- * Locker return cached mark.
4
- * If set to `true`, will return `true` in a short time even if set `false`.
5
- * If set to `false` and then set to `true`, will change to `true`.
6
- * And after time duration, it will back to `null` automatically.
7
- */
8
- export default function useLock(duration = 250) {
9
- const lockRef = React.useRef(null);
10
- const timeoutRef = React.useRef(null);
11
- // Clean up
12
- React.useEffect(() => () => {
13
- window.clearTimeout(timeoutRef.current);
14
- }, []);
15
- function doLock(locked) {
16
- if (locked || lockRef.current === null) {
17
- lockRef.current = locked;
18
- }
19
- window.clearTimeout(timeoutRef.current);
20
- timeoutRef.current = window.setTimeout(() => {
21
- lockRef.current = null;
22
- }, duration);
23
- }
24
- return [() => lockRef.current, doLock];
25
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"useLock.js","sourceRoot":"","sources":["../../../../src/tntd-select/rc-select/hooks/useLock.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,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","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"]}
@@ -1,43 +0,0 @@
1
- import * as React from 'react';
2
- import { convertChildrenToData } from '../utils/legacyUtil';
3
- /**
4
- * Parse `children` to `options` if `options` is not provided.
5
- * Then flatten the `options`.
6
- */
7
- export default function useOptions(options, children, fieldNames, optionFilterProp, optionLabelProp) {
8
- return React.useMemo(() => {
9
- let mergedOptions = options;
10
- const childrenAsData = !options;
11
- if (childrenAsData) {
12
- mergedOptions = convertChildrenToData(children);
13
- }
14
- const valueOptions = new Map();
15
- const labelOptions = new Map();
16
- const setLabelOptions = (labelOptionsMap, option, key) => {
17
- if (key && typeof key === 'string') {
18
- labelOptionsMap.set(option[key], option);
19
- }
20
- };
21
- function dig(optionList, isChildren = false) {
22
- // for loop to speed up collection speed
23
- for (let i = 0; i < optionList.length; i += 1) {
24
- const option = optionList[i];
25
- if (!option[fieldNames.options] || isChildren) {
26
- valueOptions.set(option[fieldNames.value], option);
27
- setLabelOptions(labelOptions, option, fieldNames.label);
28
- // https://github.com/ant-design/ant-design/issues/35304
29
- setLabelOptions(labelOptions, option, optionFilterProp);
30
- setLabelOptions(labelOptions, option, optionLabelProp);
31
- } else {
32
- dig(option[fieldNames.options], true);
33
- }
34
- }
35
- }
36
- dig(mergedOptions);
37
- return {
38
- options: mergedOptions,
39
- valueOptions,
40
- labelOptions
41
- };
42
- }, [options, children, fieldNames, optionFilterProp, optionLabelProp]);
43
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"useOptions.js","sourceRoot":"","sources":["../../../../src/tntd-select/rc-select/hooks/useOptions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAE5D;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,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,qBAAqB,CAAC,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","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"]}
@@ -1,13 +0,0 @@
1
- import * as React from 'react';
2
- /**
3
- * Same as `React.useCallback` but always return a memoized function
4
- * but redirect to real function.
5
- */
6
- export default function useRefFunc(callback) {
7
- const funcRef = React.useRef();
8
- funcRef.current = callback;
9
- const cacheFn = React.useCallback((...args) => {
10
- return funcRef.current(...args);
11
- }, []);
12
- return cacheFn;
13
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"useRefFunc.js","sourceRoot":"","sources":["../../../../src/tntd-select/rc-select/hooks/useRefFunc.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,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","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"]}
@@ -1,28 +0,0 @@
1
- import * as React from 'react';
2
- export default function useSelectTriggerControl(elements, open, triggerOpen, customizedTrigger) {
3
- const propsRef = React.useRef(null);
4
- propsRef.current = {
5
- open,
6
- triggerOpen,
7
- customizedTrigger
8
- };
9
- React.useEffect(() => {
10
- function onGlobalMouseDown(event) {
11
- var _a;
12
- // If trigger is customized, Trigger will take control of popupVisible
13
- if ((_a = propsRef.current) === null || _a === void 0 ? void 0 : _a.customizedTrigger) {
14
- return;
15
- }
16
- let target = event.target;
17
- if (target.shadowRoot && event.composed) {
18
- target = event.composedPath()[0] || target;
19
- }
20
- if (propsRef.current.open && elements().filter(element => element).every(element => !element.contains(target) && element !== target)) {
21
- // Should trigger close
22
- propsRef.current.triggerOpen(false);
23
- }
24
- }
25
- window.addEventListener('mousedown', onGlobalMouseDown);
26
- return () => window.removeEventListener('mousedown', onGlobalMouseDown);
27
- }, []);
28
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"useSelectTriggerControl.js","sourceRoot":"","sources":["../../../../src/tntd-select/rc-select/hooks/useSelectTriggerControl.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,MAAM,CAAC,OAAO,UAAU,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","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"]}
@@ -1,7 +0,0 @@
1
- import Select from './Select';
2
- import Option from './Option';
3
- import OptGroup from './OptGroup';
4
- import BaseSelect from './BaseSelect';
5
- import useBaseProps from './hooks/useBaseProps';
6
- export { Option, OptGroup, BaseSelect, useBaseProps };
7
- export default Select;
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tntd-select/rc-select/index.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,UAAU,CAAC;AAC9B,OAAO,MAAM,MAAM,UAAU,CAAC;AAC9B,OAAO,QAAQ,MAAM,YAAY,CAAC;AAElC,OAAO,UAAU,MAAM,cAAc,CAAC;AAEtC,OAAO,YAAY,MAAM,sBAAsB,CAAC;AAEhD,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAE,YAAY,EAAE,CAAC;AAGtD,eAAe,MAAM,CAAC","sourcesContent":["import Select from './Select';\nimport Option from './Option';\nimport OptGroup from './OptGroup';\nimport type { SelectProps } from './Select';\nimport BaseSelect from './BaseSelect';\nimport type { BaseSelectProps, BaseSelectRef, BaseSelectPropsWithoutPrivate } from './BaseSelect';\nimport useBaseProps from './hooks/useBaseProps';\n\nexport { Option, OptGroup, BaseSelect, useBaseProps };\nexport type { SelectProps, BaseSelectProps, BaseSelectRef, BaseSelectPropsWithoutPrivate };\n\nexport default Select;\n"]}
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- {"version":3,"file":"interface.js","sourceRoot":"","sources":["../../../src/tntd-select/rc-select/interface.ts"],"names":[],"mappings":"","sourcesContent":["import type * as React from 'react';\n\nexport type RawValueType = string | number;\nexport interface FlattenOptionData<OptionType> {\n label?: React.ReactNode;\n data: OptionType;\n key: React.Key;\n value?: RawValueType;\n groupOption?: boolean;\n group?: boolean;\n}\n\nexport interface DisplayValueType {\n key?: React.Key;\n value?: RawValueType;\n label?: React.ReactNode;\n title?: string | number;\n disabled?: boolean;\n}\n\nexport type RenderNode = React.ReactNode | ((props: any) => React.ReactNode);\n\nexport type RenderDOMFunc = (props: any) => HTMLElement;\n\nexport type Mode = 'multiple' | 'tags' | 'combobox';\n\nexport type Placement = 'bottomLeft' | 'bottomRight' | 'topLeft' | 'topRight';\n\nexport type DisplayInfoType = 'add' | 'remove' | 'clear';\n\n"]}
@@ -1,30 +0,0 @@
1
- export function toArray(value) {
2
- if (Array.isArray(value)) {
3
- return value;
4
- }
5
- return value !== undefined ? [value] : [];
6
- }
7
- export const isClient = typeof window !== 'undefined' && window.document && window.document.documentElement;
8
- /** Is client side and not jsdom */
9
- export const isBrowserClient = process.env.NODE_ENV !== 'test' && isClient;
10
- export function hasValue(value) {
11
- return value !== undefined && value !== null;
12
- }
13
- /** combo mode no value judgment function */
14
- export function isComboNoValue(value) {
15
- return !value && value !== 0;
16
- }
17
- function isTitleType(title) {
18
- return ['string', 'number'].includes(typeof title);
19
- }
20
- export function getTitle(item) {
21
- let title = undefined;
22
- if (item) {
23
- if (isTitleType(item.title)) {
24
- title = item.title.toString();
25
- } else if (isTitleType(item.label)) {
26
- title = item.label.toString();
27
- }
28
- }
29
- return title;
30
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"commonUtil.js","sourceRoot":"","sources":["../../../../src/tntd-select/rc-select/utils/commonUtil.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,OAAO,CAAI,KAAc;IACvC,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;QACxB,OAAO,KAAK,CAAC;KACd;IACD,OAAO,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;AAC5C,CAAC;AAED,MAAM,CAAC,MAAM,QAAQ,GACnB,OAAO,MAAM,KAAK,WAAW,IAAI,MAAM,CAAC,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,eAAe,CAAC;AAEtF,mCAAmC;AACnC,MAAM,CAAC,MAAM,eAAe,GAAG,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,MAAM,IAAI,QAAQ,CAAC;AAE3E,MAAM,UAAU,QAAQ,CAAC,KAAK;IAC5B,OAAO,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI,CAAC;AAC/C,CAAC;AAED,4CAA4C;AAC5C,MAAM,UAAU,cAAc,CAAC,KAAK;IAClC,OAAO,CAAC,KAAK,IAAI,KAAK,KAAK,CAAC,CAAC;AAC/B,CAAC;AAED,SAAS,WAAW,CAAC,KAAU;IAC7B,OAAO,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC,QAAQ,CAAC,OAAO,KAAK,CAAC,CAAC;AACrD,CAAC;AAED,MAAM,UAAU,QAAQ,CAAC,IAAsB;IAC7C,IAAI,KAAK,GAAW,SAAS,CAAC;IAC9B,IAAI,IAAI,EAAE;QACR,IAAI,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE;YAC3B,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC;SAC/B;aAAM,IAAI,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE;YAClC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC;SAC/B;KACF;IAED,OAAO,KAAK,CAAC;AACf,CAAC","sourcesContent":["import type { DisplayValueType } from '../BaseSelect';\n\nexport function toArray<T>(value: T | T[]): T[] {\n if (Array.isArray(value)) {\n return value;\n }\n return value !== undefined ? [value] : [];\n}\n\nexport const isClient =\n typeof window !== 'undefined' && window.document && window.document.documentElement;\n\n/** Is client side and not jsdom */\nexport const isBrowserClient = process.env.NODE_ENV !== 'test' && isClient;\n\nexport function hasValue(value) {\n return value !== undefined && value !== null;\n}\n\n/** combo mode no value judgment function */\nexport function isComboNoValue(value) {\n return !value && value !== 0;\n}\n\nfunction isTitleType(title: any) {\n return ['string', 'number'].includes(typeof title);\n}\n\nexport function getTitle(item: DisplayValueType): string {\n let title: string = undefined;\n if (item) {\n if (isTitleType(item.title)) {\n title = item.title.toString();\n } else if (isTitleType(item.label)) {\n title = item.label.toString();\n }\n }\n\n return title;\n}\n"]}
@@ -1,9 +0,0 @@
1
- import KeyCode from 'rc-util/lib/KeyCode';
2
- /** keyCode Judgment function */
3
- export function isValidateOpenKey(currentKeyCode) {
4
- return ![
5
- // System function button
6
- KeyCode.ESC, KeyCode.SHIFT, KeyCode.BACKSPACE, KeyCode.TAB, KeyCode.WIN_KEY, KeyCode.ALT, KeyCode.META, KeyCode.WIN_KEY_RIGHT, KeyCode.CTRL, KeyCode.SEMICOLON, KeyCode.EQUALS, KeyCode.CAPS_LOCK, KeyCode.CONTEXT_MENU,
7
- // F1-F12
8
- KeyCode.F1, KeyCode.F2, KeyCode.F3, KeyCode.F4, KeyCode.F5, KeyCode.F6, KeyCode.F7, KeyCode.F8, KeyCode.F9, KeyCode.F10, KeyCode.F11, KeyCode.F12].includes(currentKeyCode);
9
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"keyUtil.js","sourceRoot":"","sources":["../../../../src/tntd-select/rc-select/utils/keyUtil.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,qBAAqB,CAAC;AAE1C,gCAAgC;AAChC,MAAM,UAAU,iBAAiB,CAAC,cAAsB;IACtD,OAAO,CAAC;QACN,yBAAyB;QACzB,OAAO,CAAC,GAAG;QACX,OAAO,CAAC,KAAK;QACb,OAAO,CAAC,SAAS;QACjB,OAAO,CAAC,GAAG;QACX,OAAO,CAAC,OAAO;QACf,OAAO,CAAC,GAAG;QACX,OAAO,CAAC,IAAI;QACZ,OAAO,CAAC,aAAa;QACrB,OAAO,CAAC,IAAI;QACZ,OAAO,CAAC,SAAS;QACjB,OAAO,CAAC,MAAM;QACd,OAAO,CAAC,SAAS;QACjB,OAAO,CAAC,YAAY;QACpB,SAAS;QACT,OAAO,CAAC,EAAE;QACV,OAAO,CAAC,EAAE;QACV,OAAO,CAAC,EAAE;QACV,OAAO,CAAC,EAAE;QACV,OAAO,CAAC,EAAE;QACV,OAAO,CAAC,EAAE;QACV,OAAO,CAAC,EAAE;QACV,OAAO,CAAC,EAAE;QACV,OAAO,CAAC,EAAE;QACV,OAAO,CAAC,GAAG;QACX,OAAO,CAAC,GAAG;QACX,OAAO,CAAC,GAAG;KACZ,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC;AAC7B,CAAC","sourcesContent":["import KeyCode from 'rc-util/lib/KeyCode';\n\n/** keyCode Judgment function */\nexport function isValidateOpenKey(currentKeyCode: number): boolean {\n return ![\n // System function button\n KeyCode.ESC,\n KeyCode.SHIFT,\n KeyCode.BACKSPACE,\n KeyCode.TAB,\n KeyCode.WIN_KEY,\n KeyCode.ALT,\n KeyCode.META,\n KeyCode.WIN_KEY_RIGHT,\n KeyCode.CTRL,\n KeyCode.SEMICOLON,\n KeyCode.EQUALS,\n KeyCode.CAPS_LOCK,\n KeyCode.CONTEXT_MENU,\n // F1-F12\n KeyCode.F1,\n KeyCode.F2,\n KeyCode.F3,\n KeyCode.F4,\n KeyCode.F5,\n KeyCode.F6,\n KeyCode.F7,\n KeyCode.F8,\n KeyCode.F9,\n KeyCode.F10,\n KeyCode.F11,\n KeyCode.F12,\n ].includes(currentKeyCode);\n}\n"]}
@@ -1,55 +0,0 @@
1
- var __rest = this && this.__rest || function (s, e) {
2
- var t = {};
3
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
4
- if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
5
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
6
- }
7
- return t;
8
- };
9
- import * as React from 'react';
10
- import toArray from 'rc-util/lib/Children/toArray';
11
- function convertNodeToOption(node) {
12
- const _a = node,
13
- {
14
- key
15
- } = _a,
16
- _b = _a.props,
17
- {
18
- children,
19
- value
20
- } = _b,
21
- restProps = __rest(_b, ["children", "value"]);
22
- return Object.assign({
23
- key,
24
- value: value !== undefined ? value : key,
25
- children
26
- }, restProps);
27
- }
28
- export function convertChildrenToData(nodes, optionOnly = false) {
29
- return toArray(nodes).map((node, index) => {
30
- if (!React.isValidElement(node) || !node.type) {
31
- return null;
32
- }
33
- const _a = node,
34
- {
35
- type: {
36
- isSelectOptGroup
37
- },
38
- key
39
- } = _a,
40
- _b = _a.props,
41
- {
42
- children
43
- } = _b,
44
- restProps = __rest(_b, ["children"]);
45
- if (optionOnly || !isSelectOptGroup) {
46
- return convertNodeToOption(node);
47
- }
48
- return Object.assign(Object.assign({
49
- key: `__RC_SELECT_GRP__${key === null ? index : key}__`,
50
- label: key
51
- }, restProps), {
52
- options: convertChildrenToData(children)
53
- });
54
- }).filter(data => data);
55
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"legacyUtil.js","sourceRoot":"","sources":["../../../../src/tntd-select/rc-select/utils/legacyUtil.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,OAAO,MAAM,8BAA8B,CAAC;AAGnD,SAAS,mBAAmB,CAC1B,IAAwB;IAExB,MAAM,KAGF,IAA0B,EAHxB,EACJ,GAAG,OAEyB,EAD5B,aAAwC,EAAxC,EAAS,QAAQ,EAAE,KAAK,OAAgB,EAAX,SAAS,cAA/B,qBAAiC,CACZ,CAAC;IAE/B,uBAAS,GAAG,EAAE,KAAK,EAAE,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,EAAE,QAAQ,IAAK,SAAS,EAAG;AACnF,CAAC;AAED,MAAM,UAAU,qBAAqB,CACnC,KAAsB,EACtB,aAAsB,KAAK;IAE3B,OAAO,OAAO,CAAC,KAAK,CAAC;SAClB,GAAG,CAAC,CAAC,IAAwB,EAAE,KAAa,EAAqB,EAAE;QAClE,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE;YAC7C,OAAO,IAAI,CAAC;SACb;QAED,MAAM,KAIF,IAEH,EANK,EACJ,IAAI,EAAE,EAAE,gBAAgB,EAAE,EAC1B,GAAG,OAIJ,EAHC,aAAiC,EAAjC,EAAS,QAAQ,OAAgB,EAAX,SAAS,cAAxB,YAA0B,CAGlC,CAAC;QAEF,IAAI,UAAU,IAAI,CAAC,gBAAgB,EAAE;YACnC,OAAO,mBAAmB,CAAC,IAAI,CAAC,CAAC;SAClC;QAED,qCACE,GAAG,EAAE,oBAAoB,GAAG,KAAK,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,IAAI,EACvD,KAAK,EAAE,GAAG,IACP,SAAS,KACZ,OAAO,EAAE,qBAAqB,CAAC,QAAQ,CAAC,IACxC;IACJ,CAAC,CAAC;SACD,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC;AAC5B,CAAC","sourcesContent":["import * as React from 'react';\nimport toArray from 'rc-util/lib/Children/toArray';\nimport type { BaseOptionType, DefaultOptionType } from '../Select';\n\nfunction convertNodeToOption<OptionType extends BaseOptionType = DefaultOptionType>(\n node: React.ReactElement,\n): OptionType {\n const {\n key,\n props: { children, value, ...restProps },\n } = node as React.ReactElement;\n\n return { key, value: value !== undefined ? value : key, children, ...restProps };\n}\n\nexport function convertChildrenToData<OptionType extends BaseOptionType = DefaultOptionType>(\n nodes: React.ReactNode,\n optionOnly: boolean = false,\n): OptionType[] {\n return toArray(nodes)\n .map((node: React.ReactElement, index: number): OptionType | null => {\n if (!React.isValidElement(node) || !node.type) {\n return null;\n }\n\n const {\n type: { isSelectOptGroup },\n key,\n props: { children, ...restProps },\n } = node as React.ReactElement & {\n type: { isSelectOptGroup?: boolean };\n };\n\n if (optionOnly || !isSelectOptGroup) {\n return convertNodeToOption(node);\n }\n\n return {\n key: `__RC_SELECT_GRP__${key === null ? index : key}__`,\n label: key,\n ...restProps,\n options: convertChildrenToData(children),\n };\n })\n .filter((data) => data);\n}\n"]}
@@ -1,4 +0,0 @@
1
- /* istanbul ignore file */
2
- export function isPlatformMac() {
3
- return /(mac\sos|macintosh)/i.test(navigator.appVersion);
4
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"platformUtil.js","sourceRoot":"","sources":["../../../../src/tntd-select/rc-select/utils/platformUtil.ts"],"names":[],"mappings":"AAAA,0BAA0B;AAC1B,MAAM,UAAU,aAAa;IAC3B,OAAO,sBAAsB,CAAC,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;AAC3D,CAAC","sourcesContent":["/* istanbul ignore file */\nexport function isPlatformMac(): boolean {\n return /(mac\\sos|macintosh)/i.test(navigator.appVersion);\n}\n"]}