@rockshin/tao-ui 0.0.59 → 0.1.0

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 (420) hide show
  1. package/README.md +5 -1
  2. package/component-manifest.json +1 -1
  3. package/dist/components/affix/affix.css +1 -1
  4. package/dist/components/affix/affix.d.ts +1 -0
  5. package/dist/components/affix/affix.js +18 -17
  6. package/dist/components/alert/alert.css +123 -119
  7. package/dist/components/alert/alert.js +78 -188
  8. package/dist/components/app/app-modals.js +49 -98
  9. package/dist/components/app/app-notices.d.ts +2 -2
  10. package/dist/components/app/app-notices.js +294 -243
  11. package/dist/components/app/app-types.d.ts +6 -3
  12. package/dist/components/app/app.css +185 -183
  13. package/dist/components/app/app.js +1 -1
  14. package/dist/components/auto-complete/auto-complete.css +30 -28
  15. package/dist/components/auto-complete/auto-complete.d.ts +3 -1
  16. package/dist/components/auto-complete/auto-complete.js +2 -1
  17. package/dist/components/badge/badge.js +42 -127
  18. package/dist/components/border-beam/border-beam.css +1 -1
  19. package/dist/components/border-beam/border-beam.d.ts +1 -0
  20. package/dist/components/border-beam/border-beam.js +1 -0
  21. package/dist/components/breadcrumb/breadcrumb.css +123 -120
  22. package/dist/components/breadcrumb/breadcrumb.js +160 -265
  23. package/dist/components/button/button.d.ts +1 -1
  24. package/dist/components/button/button.js +52 -151
  25. package/dist/components/calendar/calendar.js +28 -27
  26. package/dist/components/card/card-tabs.d.ts +56 -5
  27. package/dist/components/card/card-tabs.js +214 -468
  28. package/dist/components/card/card.d.ts +1 -2
  29. package/dist/components/card/card.js +64 -226
  30. package/dist/components/carousel/carousel.css +1 -1
  31. package/dist/components/carousel/carousel.d.ts +59 -4
  32. package/dist/components/carousel/carousel.js +299 -243
  33. package/dist/components/cascader/cascader.css +186 -184
  34. package/dist/components/cascader/cascader.d.ts +3 -1
  35. package/dist/components/cascader/cascader.js +29 -34
  36. package/dist/components/checkbox/checkbox.css +93 -90
  37. package/dist/components/checkbox/checkbox.d.ts +1 -1
  38. package/dist/components/checkbox/checkbox.js +171 -499
  39. package/dist/components/collapse/collapse-panels.js +145 -400
  40. package/dist/components/collapse/collapse.css +172 -170
  41. package/dist/components/collapse/collapse.d.ts +1 -1
  42. package/dist/components/collapse/collapse.js +62 -181
  43. package/dist/components/color-picker/color-picker.css +1 -1
  44. package/dist/components/color-picker/color-picker.js +418 -981
  45. package/dist/components/context-menu/context-menu.css +4 -4
  46. package/dist/components/context-menu/context-menu.d.ts +3 -1
  47. package/dist/components/context-menu/context-menu.js +54 -135
  48. package/dist/components/date-picker/calendar/calendar-grid.js +41 -41
  49. package/dist/components/date-picker/calendar/calendar-header.js +171 -337
  50. package/dist/components/date-picker/calendar/month-grid.js +33 -103
  51. package/dist/components/date-picker/calendar/time-panel.js +84 -209
  52. package/dist/components/date-picker/calendar/year-grid.js +36 -105
  53. package/dist/components/date-picker/date-localization.js +1 -1
  54. package/dist/components/date-picker/date-picker.css +599 -642
  55. package/dist/components/date-picker/date-picker.d.ts +2 -1
  56. package/dist/components/date-picker/date-picker.js +96 -105
  57. package/dist/components/date-picker/presets.js +12 -37
  58. package/dist/components/date-picker/range-picker.d.ts +2 -1
  59. package/dist/components/date-picker/range-picker.js +222 -255
  60. package/dist/components/date-picker/types.d.ts +2 -1
  61. package/dist/components/descriptions/descriptions.css +1 -1
  62. package/dist/components/descriptions/descriptions.js +30 -39
  63. package/dist/components/drawer/drawer.css +202 -200
  64. package/dist/components/drawer/drawer.js +28 -34
  65. package/dist/components/dropdown/dropdown-core.d.ts +32 -0
  66. package/dist/components/dropdown/dropdown-core.js +156 -0
  67. package/dist/components/dropdown/dropdown.css +38 -36
  68. package/dist/components/dropdown/dropdown.d.ts +4 -30
  69. package/dist/components/dropdown/dropdown.js +91 -271
  70. package/dist/components/empty/empty.css +30 -28
  71. package/dist/components/empty/empty.js +81 -236
  72. package/dist/components/float-button/float-button.css +1 -1
  73. package/dist/components/float-button/float-button.js +38 -48
  74. package/dist/components/form/field-control.js +2 -3
  75. package/dist/components/form/form-item.js +67 -129
  76. package/dist/components/form/form.css +36 -34
  77. package/dist/components/form/form.d.ts +1 -1
  78. package/dist/components/form/form.js +29 -100
  79. package/dist/components/form/index.d.ts +1 -1
  80. package/dist/components/form/use-form.js +48 -66
  81. package/dist/components/form-actions/form-actions.d.ts +1 -0
  82. package/dist/components/form-actions/form-actions.js +10 -36
  83. package/dist/components/form-field/form-field-view.d.ts +1 -0
  84. package/dist/components/form-field/form-field-view.js +81 -288
  85. package/dist/components/form-field/form-field.js +13 -31
  86. package/dist/components/form-field/form.css +74 -72
  87. package/dist/components/form-section/form-section.d.ts +1 -0
  88. package/dist/components/form-section/form-section.js +38 -91
  89. package/dist/components/image/image-icons.js +16 -31
  90. package/dist/components/image/image.css +1 -1
  91. package/dist/components/image/image.js +298 -911
  92. package/dist/components/input/base-input.d.ts +3 -1
  93. package/dist/components/input/base-input.js +8 -7
  94. package/dist/components/input/input-shared.css +62 -60
  95. package/dist/components/input/input-shared.d.ts +1 -1
  96. package/dist/components/input/input-shared.js +56 -100
  97. package/dist/components/input/input.css +222 -220
  98. package/dist/components/input/otp.d.ts +2 -1
  99. package/dist/components/input/otp.js +143 -324
  100. package/dist/components/input/password.js +12 -67
  101. package/dist/components/input/search.js +13 -13
  102. package/dist/components/input-number/input-number.d.ts +4 -2
  103. package/dist/components/input-number/input-number.js +30 -137
  104. package/dist/components/list/list-pagination.css +107 -105
  105. package/dist/components/list/list-pagination.d.ts +56 -5
  106. package/dist/components/list/list-pagination.js +249 -316
  107. package/dist/components/list/list.css +179 -177
  108. package/dist/components/list/list.js +170 -604
  109. package/dist/components/listy/listy.css +55 -53
  110. package/dist/components/listy/listy.d.ts +43 -4
  111. package/dist/components/listy/listy.js +198 -216
  112. package/dist/components/masonry/masonry.css +1 -1
  113. package/dist/components/masonry/masonry.d.ts +1 -0
  114. package/dist/components/masonry/masonry.js +90 -244
  115. package/dist/components/mentions/mentions.css +153 -151
  116. package/dist/components/mentions/mentions.d.ts +53 -11
  117. package/dist/components/mentions/mentions.js +291 -75
  118. package/dist/components/menu/menu-render.d.ts +7 -0
  119. package/dist/components/menu/menu-render.js +156 -302
  120. package/dist/components/menu/menu.css +142 -140
  121. package/dist/components/modal/confirm-dialog.js +19 -24
  122. package/dist/components/modal/modal.css +165 -162
  123. package/dist/components/modal/modal.js +285 -731
  124. package/dist/components/modal/use-modal.js +25 -25
  125. package/dist/components/pagination/pagination.css +134 -131
  126. package/dist/components/pagination/pagination.d.ts +4 -3
  127. package/dist/components/pagination/pagination.js +138 -281
  128. package/dist/components/popconfirm/popconfirm.css +38 -36
  129. package/dist/components/popconfirm/popconfirm.js +105 -288
  130. package/dist/components/popover/popover.css +89 -87
  131. package/dist/components/popover/popover.js +189 -469
  132. package/dist/components/progress/progress.css +153 -151
  133. package/dist/components/progress/progress.js +34 -43
  134. package/dist/components/qr-code/qr-code.css +36 -34
  135. package/dist/components/qr-code/qr-code.js +83 -277
  136. package/dist/components/radio/radio.css +95 -92
  137. package/dist/components/radio/radio.d.ts +1 -1
  138. package/dist/components/radio/radio.js +114 -376
  139. package/dist/components/rate/rate.css +80 -78
  140. package/dist/components/rate/rate.d.ts +34 -6
  141. package/dist/components/rate/rate.js +160 -244
  142. package/dist/components/result/result.css +59 -57
  143. package/dist/components/result/result.d.ts +1 -0
  144. package/dist/components/result/result.js +118 -291
  145. package/dist/components/scroll-area/scroll-area.css +160 -148
  146. package/dist/components/scroll-area/scroll-area.js +284 -488
  147. package/dist/components/segmented/segmented.css +1 -1
  148. package/dist/components/segmented/segmented.js +59 -58
  149. package/dist/components/select/mobile-select.css +166 -164
  150. package/dist/components/select/mobile-select.js +48 -131
  151. package/dist/components/select/select-icons.js +59 -128
  152. package/dist/components/select/select-model.js +1 -1
  153. package/dist/components/select/select-searchable-list.js +19 -19
  154. package/dist/components/select/select-tags.js +70 -156
  155. package/dist/components/select/select-types.d.ts +2 -1
  156. package/dist/components/select/select.css +509 -506
  157. package/dist/components/select/select.d.ts +1 -0
  158. package/dist/components/select/select.js +67 -65
  159. package/dist/components/select/use-select-selection.js +181 -261
  160. package/dist/components/skeleton/skeleton.css +105 -103
  161. package/dist/components/skeleton/skeleton.js +140 -399
  162. package/dist/components/slider/slider.css +160 -158
  163. package/dist/components/slider/slider.d.ts +45 -6
  164. package/dist/components/slider/slider.js +359 -74
  165. package/dist/components/sonner/index.d.ts +1 -1
  166. package/dist/components/sonner/sonner.css +190 -182
  167. package/dist/components/sonner/sonner.js +12 -11
  168. package/dist/components/spinner/spinner.css +80 -76
  169. package/dist/components/spinner/spinner.d.ts +1 -1
  170. package/dist/components/spinner/spinner.js +75 -219
  171. package/dist/components/splitter/splitter.css +157 -154
  172. package/dist/components/splitter/splitter.js +271 -448
  173. package/dist/components/statistic/statistic.css +1 -1
  174. package/dist/components/statistic/statistic.js +121 -406
  175. package/dist/components/status-icon/status-icon.js +14 -26
  176. package/dist/components/steps/steps-icons.js +63 -100
  177. package/dist/components/steps/steps.css +817 -807
  178. package/dist/components/steps/steps.d.ts +1 -1
  179. package/dist/components/steps/steps.js +38 -94
  180. package/dist/components/steps/use-display-steps.js +21 -54
  181. package/dist/components/switch/switch-touch.css +17 -15
  182. package/dist/components/switch/switch.css +192 -190
  183. package/dist/components/switch/switch.js +63 -196
  184. package/dist/components/table/table-filter.d.ts +3 -1
  185. package/dist/components/table/table-filter.js +72 -133
  186. package/dist/components/table/table-icons.js +77 -152
  187. package/dist/components/table/table-summary.js +30 -77
  188. package/dist/components/table/table-types.d.ts +2 -1
  189. package/dist/components/table/table.css +468 -465
  190. package/dist/components/table/table.js +86 -84
  191. package/dist/components/table/use-table-data.js +137 -248
  192. package/dist/components/tabs/tabs.css +123 -120
  193. package/dist/components/tabs/tabs.d.ts +4 -3
  194. package/dist/components/tabs/tabs.js +157 -322
  195. package/dist/components/tag/tag.css +231 -221
  196. package/dist/components/tag/tag.js +110 -248
  197. package/dist/components/textarea/textarea.css +2 -1
  198. package/dist/components/textarea/textarea.d.ts +3 -1
  199. package/dist/components/textarea/textarea.js +16 -15
  200. package/dist/components/time-picker/time-picker.d.ts +1 -0
  201. package/dist/components/time-picker/time-picker.js +91 -221
  202. package/dist/components/timeline/timeline.css +1 -1
  203. package/dist/components/timeline/timeline.js +17 -17
  204. package/dist/components/tooltip/tooltip.css +79 -77
  205. package/dist/components/tooltip/tooltip.d.ts +1 -1
  206. package/dist/components/tooltip/tooltip.js +111 -263
  207. package/dist/components/tour/tour.css +1 -1
  208. package/dist/components/tour/tour.d.ts +59 -6
  209. package/dist/components/tour/tour.js +343 -622
  210. package/dist/components/transfer/transfer-list.js +19 -19
  211. package/dist/components/transfer/transfer-parts.js +63 -139
  212. package/dist/components/transfer/transfer.css +192 -190
  213. package/dist/components/transfer/transfer.js +57 -56
  214. package/dist/components/tree/tree-check.js +25 -32
  215. package/dist/components/tree/tree-keyboard.js +1 -1
  216. package/dist/components/tree/tree.css +204 -200
  217. package/dist/components/tree/tree.js +139 -277
  218. package/dist/components/tree-select/select-engine.css +200 -197
  219. package/dist/components/tree-select/select-engine.js +11 -38
  220. package/dist/components/tree-select/tree-select.css +21 -19
  221. package/dist/components/tree-select/tree-select.d.ts +3 -1
  222. package/dist/components/tree-select/tree-select.js +12 -10
  223. package/dist/components/upload/upload.js +193 -308
  224. package/dist/components/watermark/watermark-context.js +8 -14
  225. package/dist/components/watermark/watermark.css +1 -1
  226. package/dist/components/watermark/watermark.js +209 -400
  227. package/dist/docs/components/stack.doc.js +1 -1
  228. package/dist/docs/components/table.doc.js +1 -1
  229. package/dist/entries/affix.d.ts +0 -2
  230. package/dist/entries/affix.js +0 -2
  231. package/dist/entries/alert.d.ts +0 -2
  232. package/dist/entries/alert.js +0 -2
  233. package/dist/entries/app.d.ts +0 -2
  234. package/dist/entries/app.js +0 -2
  235. package/dist/entries/auto-complete.d.ts +0 -2
  236. package/dist/entries/auto-complete.js +0 -2
  237. package/dist/entries/avatar.d.ts +0 -2
  238. package/dist/entries/avatar.js +0 -2
  239. package/dist/entries/badge.d.ts +0 -2
  240. package/dist/entries/badge.js +0 -2
  241. package/dist/entries/border-beam.d.ts +0 -2
  242. package/dist/entries/border-beam.js +0 -2
  243. package/dist/entries/breadcrumb.d.ts +0 -2
  244. package/dist/entries/breadcrumb.js +0 -2
  245. package/dist/entries/button.d.ts +0 -2
  246. package/dist/entries/button.js +0 -2
  247. package/dist/entries/calendar.d.ts +0 -2
  248. package/dist/entries/calendar.js +0 -2
  249. package/dist/entries/card.d.ts +0 -2
  250. package/dist/entries/card.js +0 -2
  251. package/dist/entries/carousel.d.ts +0 -2
  252. package/dist/entries/carousel.js +0 -2
  253. package/dist/entries/cascader.d.ts +0 -2
  254. package/dist/entries/cascader.js +0 -2
  255. package/dist/entries/checkbox.d.ts +0 -2
  256. package/dist/entries/checkbox.js +0 -2
  257. package/dist/entries/collapse.d.ts +0 -2
  258. package/dist/entries/collapse.js +0 -2
  259. package/dist/entries/color-picker.d.ts +0 -2
  260. package/dist/entries/color-picker.js +0 -2
  261. package/dist/entries/context-menu.d.ts +0 -2
  262. package/dist/entries/context-menu.js +0 -2
  263. package/dist/entries/date-picker.d.ts +0 -2
  264. package/dist/entries/date-picker.js +0 -2
  265. package/dist/entries/descriptions.d.ts +0 -2
  266. package/dist/entries/descriptions.js +0 -2
  267. package/dist/entries/divider.d.ts +0 -2
  268. package/dist/entries/divider.js +0 -2
  269. package/dist/entries/drawer.d.ts +0 -2
  270. package/dist/entries/drawer.js +0 -2
  271. package/dist/entries/dropdown.d.ts +0 -2
  272. package/dist/entries/dropdown.js +0 -2
  273. package/dist/entries/empty.d.ts +0 -2
  274. package/dist/entries/empty.js +0 -2
  275. package/dist/entries/float-button.d.ts +0 -2
  276. package/dist/entries/float-button.js +0 -2
  277. package/dist/entries/form-actions.d.ts +0 -2
  278. package/dist/entries/form-actions.js +0 -2
  279. package/dist/entries/form-field.d.ts +0 -2
  280. package/dist/entries/form-field.js +0 -2
  281. package/dist/entries/form-layout.d.ts +0 -2
  282. package/dist/entries/form-layout.js +0 -2
  283. package/dist/entries/form-section.d.ts +0 -2
  284. package/dist/entries/form-section.js +0 -2
  285. package/dist/entries/form.d.ts +1 -3
  286. package/dist/entries/form.js +0 -2
  287. package/dist/entries/image.d.ts +0 -2
  288. package/dist/entries/image.js +0 -2
  289. package/dist/entries/input-number.d.ts +0 -2
  290. package/dist/entries/input-number.js +0 -2
  291. package/dist/entries/input.d.ts +1 -3
  292. package/dist/entries/input.js +0 -2
  293. package/dist/entries/list.d.ts +0 -2
  294. package/dist/entries/list.js +0 -2
  295. package/dist/entries/listy.d.ts +0 -2
  296. package/dist/entries/listy.js +0 -2
  297. package/dist/entries/masonry.d.ts +0 -2
  298. package/dist/entries/masonry.js +0 -2
  299. package/dist/entries/mentions.d.ts +0 -2
  300. package/dist/entries/mentions.js +0 -2
  301. package/dist/entries/modal.d.ts +0 -2
  302. package/dist/entries/modal.js +0 -2
  303. package/dist/entries/number-input.d.ts +0 -2
  304. package/dist/entries/number-input.js +0 -2
  305. package/dist/entries/pagination.d.ts +0 -2
  306. package/dist/entries/pagination.js +0 -2
  307. package/dist/entries/popconfirm.d.ts +0 -2
  308. package/dist/entries/popconfirm.js +0 -2
  309. package/dist/entries/popover.d.ts +0 -2
  310. package/dist/entries/popover.js +0 -2
  311. package/dist/entries/progress.d.ts +0 -2
  312. package/dist/entries/progress.js +0 -2
  313. package/dist/entries/provider.d.ts +1 -3
  314. package/dist/entries/provider.js +1 -3
  315. package/dist/entries/qr-code.d.ts +0 -2
  316. package/dist/entries/qr-code.js +0 -2
  317. package/dist/entries/radio.d.ts +0 -2
  318. package/dist/entries/radio.js +0 -2
  319. package/dist/entries/range-picker.d.ts +0 -2
  320. package/dist/entries/range-picker.js +0 -2
  321. package/dist/entries/rate.d.ts +0 -2
  322. package/dist/entries/rate.js +0 -2
  323. package/dist/entries/result.d.ts +0 -2
  324. package/dist/entries/result.js +0 -2
  325. package/dist/entries/scroll-area.d.ts +0 -2
  326. package/dist/entries/scroll-area.js +0 -2
  327. package/dist/entries/segmented.d.ts +0 -2
  328. package/dist/entries/segmented.js +0 -2
  329. package/dist/entries/select.d.ts +0 -2
  330. package/dist/entries/select.js +0 -2
  331. package/dist/entries/skeleton.d.ts +0 -2
  332. package/dist/entries/skeleton.js +0 -2
  333. package/dist/entries/slider.d.ts +0 -2
  334. package/dist/entries/slider.js +0 -2
  335. package/dist/entries/sonner.d.ts +0 -2
  336. package/dist/entries/sonner.js +0 -2
  337. package/dist/entries/spinner.d.ts +0 -2
  338. package/dist/entries/spinner.js +0 -2
  339. package/dist/entries/splitter.d.ts +0 -2
  340. package/dist/entries/splitter.js +0 -2
  341. package/dist/entries/stack.d.ts +0 -2
  342. package/dist/entries/stack.js +0 -2
  343. package/dist/entries/statistic.d.ts +0 -2
  344. package/dist/entries/statistic.js +0 -2
  345. package/dist/entries/steps.d.ts +0 -2
  346. package/dist/entries/steps.js +0 -2
  347. package/dist/entries/switch.d.ts +0 -2
  348. package/dist/entries/switch.js +0 -2
  349. package/dist/entries/table.d.ts +0 -2
  350. package/dist/entries/table.js +0 -2
  351. package/dist/entries/tabs.d.ts +0 -2
  352. package/dist/entries/tabs.js +0 -2
  353. package/dist/entries/tag.d.ts +0 -2
  354. package/dist/entries/tag.js +0 -2
  355. package/dist/entries/textarea.d.ts +0 -2
  356. package/dist/entries/textarea.js +0 -2
  357. package/dist/entries/time-picker.d.ts +0 -2
  358. package/dist/entries/time-picker.js +0 -2
  359. package/dist/entries/timeline.d.ts +0 -2
  360. package/dist/entries/timeline.js +0 -2
  361. package/dist/entries/tooltip.d.ts +0 -2
  362. package/dist/entries/tooltip.js +0 -2
  363. package/dist/entries/tour.d.ts +0 -2
  364. package/dist/entries/tour.js +0 -2
  365. package/dist/entries/transfer.d.ts +0 -2
  366. package/dist/entries/transfer.js +0 -2
  367. package/dist/entries/tree-select.d.ts +0 -2
  368. package/dist/entries/tree-select.js +0 -2
  369. package/dist/entries/tree.d.ts +0 -2
  370. package/dist/entries/tree.js +0 -2
  371. package/dist/entries/upload.d.ts +0 -2
  372. package/dist/entries/upload.js +0 -2
  373. package/dist/entries/watermark.d.ts +0 -2
  374. package/dist/entries/watermark.js +0 -2
  375. package/dist/index.d.ts +5 -7
  376. package/dist/index.js +2 -4
  377. package/dist/layouts/form-layout/form-layout.d.ts +1 -0
  378. package/dist/layouts/form-layout/form-layout.js +10 -36
  379. package/dist/layouts/stack/layout.css +46 -44
  380. package/dist/layouts/stack/stack.d.ts +1 -0
  381. package/dist/layouts/stack/stack.js +16 -69
  382. package/dist/locales/ar-EG.js +25 -2
  383. package/dist/locales/create-locale.d.ts +1 -2
  384. package/dist/locales/create-locale.js +0 -28
  385. package/dist/locales/de-DE.js +25 -2
  386. package/dist/locales/en-US.js +24 -1
  387. package/dist/locales/es-ES.js +25 -2
  388. package/dist/locales/fr-FR.js +25 -2
  389. package/dist/locales/hi-IN.js +25 -2
  390. package/dist/locales/id-ID.js +25 -2
  391. package/dist/locales/index.d.ts +10 -10
  392. package/dist/locales/index.js +9 -9
  393. package/dist/locales/it-IT.js +25 -2
  394. package/dist/locales/ja-JP.js +25 -2
  395. package/dist/locales/ko-KR.js +25 -2
  396. package/dist/locales/pt-BR.js +25 -2
  397. package/dist/locales/ru-RU.js +25 -2
  398. package/dist/locales/th-TH.js +25 -2
  399. package/dist/locales/tr-TR.js +25 -2
  400. package/dist/locales/vi-VN.js +25 -2
  401. package/dist/locales/zh-CN.js +25 -2
  402. package/dist/locales/zh-TW.js +25 -2
  403. package/dist/number-input/number-input.js +24 -81
  404. package/dist/number-input/use-number-input.d.ts +1 -0
  405. package/dist/number-input/use-number-input.js +47 -43
  406. package/dist/provider/locale.d.ts +1 -1
  407. package/dist/provider/tao-context.d.ts +38 -0
  408. package/dist/provider/tao-context.js +92 -0
  409. package/dist/provider/tao-portal-scope.d.ts +14 -0
  410. package/dist/provider/tao-portal-scope.js +54 -0
  411. package/dist/provider/tao-provider.d.ts +5 -55
  412. package/dist/provider/tao-provider.js +94 -364
  413. package/dist/theme/control.css +106 -122
  414. package/dist/theme/theme.css +4 -2
  415. package/dist/utils/dialog-content.js +55 -210
  416. package/dist/utils/overlay.js +15 -30
  417. package/dist/utils/rc-compat.d.ts +13 -0
  418. package/dist/utils/rc-compat.js +48 -0
  419. package/dist/utils/refs.js +5 -19
  420. package/package.json +10 -16
@@ -1,5 +1,4 @@
1
1
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
2
- import { c } from "react-compiler-runtime";
3
2
  import { useCallback, useMemo, useRef, useState } from "react";
4
3
  import { useTaoConfig } from "../../provider/tao-provider.js";
5
4
  import { useMobileTitle } from "../../utils/field-label.js";
@@ -48,13 +47,13 @@ function MobileSelectContentInner({ options, value, onChange, onMultiChange, sho
48
47
  const knownValues = new Set(knownOptions.map((option)=>option.value));
49
48
  const available = 'tags' === mode ? [
50
49
  ...options,
51
- ...selectedOptions.filter((option_0)=>!knownValues.has(option_0.value))
50
+ ...selectedOptions.filter((option)=>!knownValues.has(option.value))
52
51
  ] : options;
53
52
  const committed = hideSelected && multiple && valueArray.length ? new Set(valueArray) : void 0;
54
53
  const searching = showSearch && !!search;
55
54
  if (!committed && !searching) return available;
56
55
  const filter = filterOption ?? defaultFilter;
57
- return filterTree(available, (query, option_1)=>!committed?.has(option_1.value) && (!searching || filter(query, option_1)), search);
56
+ return filterTree(available, (query, option)=>!committed?.has(option.value) && (!searching || filter(query, option)), search);
58
57
  }, [
59
58
  options,
60
59
  knownOptions,
@@ -98,7 +97,7 @@ function MobileSelectContentInner({ options, value, onChange, onMultiChange, sho
98
97
  ]);
99
98
  let optIndex = 0;
100
99
  const renderItem = (opt)=>{
101
- const index_0 = optIndex++;
100
+ const index = optIndex++;
102
101
  const isSelected = multiple ? draftSet.has(opt.value) : opt.value === value;
103
102
  const itemDisabled = disabled || opt.disabled || multiple && null != maxCount && draft.length >= maxCount && !isSelected;
104
103
  return /*#__PURE__*/ jsxs("button", {
@@ -117,7 +116,7 @@ function MobileSelectContentInner({ options, value, onChange, onMultiChange, sho
117
116
  "data-tao-has-desc": null != opt.description || void 0,
118
117
  children: [
119
118
  optionRender ? optionRender(opt, {
120
- index: index_0
119
+ index
121
120
  }) : /*#__PURE__*/ jsxs(Fragment, {
122
121
  children: [
123
122
  null != opt.icon && /*#__PURE__*/ jsx("span", {
@@ -187,13 +186,13 @@ function MobileSelectContentInner({ options, value, onChange, onMultiChange, sho
187
186
  onCompositionEnd: ()=>{
188
187
  composingRef.current = false;
189
188
  },
190
- onKeyDown: (e_0)=>{
191
- if (composingRef.current || e_0.nativeEvent.isComposing || 229 === e_0.keyCode) return;
189
+ onKeyDown: (e)=>{
190
+ if (composingRef.current || e.nativeEvent.isComposing || 229 === e.keyCode) return;
192
191
  if (!multiple) return;
193
- if ('Enter' === e_0.key) {
194
- e_0.preventDefault();
192
+ if ('Enter' === e.key) {
193
+ e.preventDefault();
195
194
  createTag();
196
- } else if (tokenSeparators?.includes(e_0.key) && createTag()) e_0.preventDefault();
195
+ } else if (tokenSeparators?.includes(e.key) && createTag()) e.preventDefault();
197
196
  },
198
197
  placeholder: locale.searchPlaceholder,
199
198
  "aria-label": locale.searchOptions
@@ -203,7 +202,7 @@ function MobileSelectContentInner({ options, value, onChange, onMultiChange, sho
203
202
  /*#__PURE__*/ jsxs("div", {
204
203
  "data-tao-sheet-list": "",
205
204
  children: [
206
- 'tags' === mode && search.trim() && !draftSet.has(search.trim()) && !knownOptions.some((option_2)=>option_2.value === search.trim() || option_2.label === search.trim()) && /*#__PURE__*/ jsx("button", {
205
+ 'tags' === mode && search.trim() && !draftSet.has(search.trim()) && !knownOptions.some((option)=>option.value === search.trim() || ('string' == typeof option.label || 'number' == typeof option.label) && String(option.label) === search.trim()) && /*#__PURE__*/ jsx("button", {
207
206
  type: "button",
208
207
  "data-tao-sheet-item": "",
209
208
  className: classNames?.item,
@@ -233,129 +232,47 @@ function MobileSelectContentInner({ options, value, onChange, onMultiChange, sho
233
232
  ]
234
233
  });
235
234
  }
236
- function MobileSelectDrawer(t0) {
237
- const $ = c(31);
238
- let classNames;
239
- let direction;
240
- let mobileTitle;
241
- let onClose;
242
- let open;
243
- let placeholder;
244
- let popupRender;
245
- let rest;
246
- let styles;
247
- if ($[0] !== t0) {
248
- ({ direction, open, mobileTitle, onClose, placeholder, classNames, styles, popupRender, ...rest } = t0);
249
- $[0] = t0;
250
- $[1] = classNames;
251
- $[2] = direction;
252
- $[3] = mobileTitle;
253
- $[4] = onClose;
254
- $[5] = open;
255
- $[6] = placeholder;
256
- $[7] = popupRender;
257
- $[8] = rest;
258
- $[9] = styles;
259
- } else {
260
- classNames = $[1];
261
- direction = $[2];
262
- mobileTitle = $[3];
263
- onClose = $[4];
264
- open = $[5];
265
- placeholder = $[6];
266
- popupRender = $[7];
267
- rest = $[8];
268
- styles = $[9];
269
- }
235
+ function MobileSelectDrawer({ direction, open, mobileTitle, onClose, placeholder, classNames, styles, popupRender, ...rest }) {
270
236
  const { locale } = useTaoConfig();
271
237
  const title = useMobileTitle(mobileTitle, locale.select);
272
- let t1;
273
- if ($[10] !== classNames || $[11] !== onClose || $[12] !== placeholder || $[13] !== rest || $[14] !== styles) {
274
- t1 = /*#__PURE__*/ jsx(MobileSelectContentInner, {
275
- onClose: onClose,
276
- placeholder: placeholder,
277
- classNames: classNames,
278
- styles: styles,
279
- ...rest
280
- });
281
- $[10] = classNames;
282
- $[11] = onClose;
283
- $[12] = placeholder;
284
- $[13] = rest;
285
- $[14] = styles;
286
- $[15] = t1;
287
- } else t1 = $[15];
288
- const content = t1;
289
- const t2 = classNames?.popup;
290
- let t3;
291
- if ($[16] !== t2) {
292
- t3 = {
293
- root: t2
294
- };
295
- $[16] = t2;
296
- $[17] = t3;
297
- } else t3 = $[17];
298
- const t4 = styles?.popup;
299
- let t5;
300
- if ($[18] !== t4) {
301
- t5 = {
302
- root: t4
303
- };
304
- $[18] = t4;
305
- $[19] = t5;
306
- } else t5 = $[19];
307
- let t6;
308
- if ($[20] !== content || $[21] !== popupRender) {
309
- t6 = popupRender ? popupRender(content) : content;
310
- $[20] = content;
311
- $[21] = popupRender;
312
- $[22] = t6;
313
- } else t6 = $[22];
314
- let t7;
315
- if ($[23] !== direction || $[24] !== onClose || $[25] !== open || $[26] !== t3 || $[27] !== t5 || $[28] !== t6 || $[29] !== title) {
316
- t7 = /*#__PURE__*/ jsx(Drawer, {
317
- direction: direction,
318
- open: open,
319
- onClose: onClose,
320
- placement: "bottom",
321
- title: title,
322
- height: "70vh",
323
- classNames: t3,
324
- styles: t5,
325
- children: t6
326
- });
327
- $[23] = direction;
328
- $[24] = onClose;
329
- $[25] = open;
330
- $[26] = t3;
331
- $[27] = t5;
332
- $[28] = t6;
333
- $[29] = title;
334
- $[30] = t7;
335
- } else t7 = $[30];
336
- return t7;
238
+ const content = /*#__PURE__*/ jsx(MobileSelectContentInner, {
239
+ onClose: onClose,
240
+ placeholder: placeholder,
241
+ classNames: classNames,
242
+ styles: styles,
243
+ ...rest
244
+ });
245
+ return /*#__PURE__*/ jsx(Drawer, {
246
+ direction: direction,
247
+ open: open,
248
+ onClose: onClose,
249
+ placement: "bottom",
250
+ title: title,
251
+ height: "70vh",
252
+ classNames: {
253
+ root: classNames?.popup
254
+ },
255
+ styles: {
256
+ root: styles?.popup
257
+ },
258
+ children: popupRender ? popupRender(content) : content
259
+ });
337
260
  }
338
261
  function CheckIcon() {
339
- const $ = c(1);
340
- let t0;
341
- if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
342
- t0 = /*#__PURE__*/ jsx("svg", {
343
- "aria-hidden": "true",
344
- focusable: "false",
345
- width: "18",
346
- height: "18",
347
- viewBox: "0 0 24 24",
348
- fill: "none",
349
- stroke: "currentColor",
350
- strokeWidth: "2.5",
351
- strokeLinecap: "round",
352
- strokeLinejoin: "round",
353
- children: /*#__PURE__*/ jsx("polyline", {
354
- points: "20 6 9 17 4 12"
355
- })
356
- });
357
- $[0] = t0;
358
- } else t0 = $[0];
359
- return t0;
262
+ return /*#__PURE__*/ jsx("svg", {
263
+ "aria-hidden": "true",
264
+ focusable: "false",
265
+ width: "18",
266
+ height: "18",
267
+ viewBox: "0 0 24 24",
268
+ fill: "none",
269
+ stroke: "currentColor",
270
+ strokeWidth: "2.5",
271
+ strokeLinecap: "round",
272
+ strokeLinejoin: "round",
273
+ children: /*#__PURE__*/ jsx("polyline", {
274
+ points: "20 6 9 17 4 12"
275
+ })
276
+ });
360
277
  }
361
278
  export { MobileSelectContentInner as MobileSelectContent, MobileSelectDrawer };
@@ -1,141 +1,72 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
- import { c } from "react-compiler-runtime";
3
2
  function ChevronDownIcon() {
4
- const $ = c(1);
5
- let t0;
6
- if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
7
- t0 = /*#__PURE__*/ jsx(Icon, {
8
- size: 16,
9
- strokeWidth: 2,
10
- children: /*#__PURE__*/ jsx("path", {
11
- d: "m6 9 6 6 6-6"
12
- })
13
- });
14
- $[0] = t0;
15
- } else t0 = $[0];
16
- return t0;
3
+ return /*#__PURE__*/ jsx(Icon, {
4
+ size: 16,
5
+ strokeWidth: 2,
6
+ children: /*#__PURE__*/ jsx("path", {
7
+ d: "m6 9 6 6 6-6"
8
+ })
9
+ });
17
10
  }
18
11
  function CheckIcon() {
19
- const $ = c(1);
20
- let t0;
21
- if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
22
- t0 = /*#__PURE__*/ jsx(Icon, {
23
- size: 16,
24
- strokeWidth: 2.5,
25
- children: /*#__PURE__*/ jsx("polyline", {
26
- points: "20 6 9 17 4 12"
27
- })
28
- });
29
- $[0] = t0;
30
- } else t0 = $[0];
31
- return t0;
12
+ return /*#__PURE__*/ jsx(Icon, {
13
+ size: 16,
14
+ strokeWidth: 2.5,
15
+ children: /*#__PURE__*/ jsx("polyline", {
16
+ points: "20 6 9 17 4 12"
17
+ })
18
+ });
32
19
  }
33
- function CloseIcon(t0) {
34
- const $ = c(4);
35
- const { small: t1 } = t0;
36
- const small = void 0 === t1 ? false : t1;
37
- const t2 = small ? 10 : 14;
38
- const t3 = small ? 2.5 : 2;
39
- let t4;
40
- if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
41
- t4 = /*#__PURE__*/ jsx("path", {
20
+ function CloseIcon({ small = false }) {
21
+ return /*#__PURE__*/ jsx(Icon, {
22
+ size: small ? 10 : 14,
23
+ strokeWidth: small ? 2.5 : 2,
24
+ children: /*#__PURE__*/ jsx("path", {
42
25
  d: "M18 6 6 18M6 6l12 12"
43
- });
44
- $[0] = t4;
45
- } else t4 = $[0];
46
- let t5;
47
- if ($[1] !== t2 || $[2] !== t3) {
48
- t5 = /*#__PURE__*/ jsx(Icon, {
49
- size: t2,
50
- strokeWidth: t3,
51
- children: t4
52
- });
53
- $[1] = t2;
54
- $[2] = t3;
55
- $[3] = t5;
56
- } else t5 = $[3];
57
- return t5;
26
+ })
27
+ });
58
28
  }
59
29
  function SearchIcon() {
60
- const $ = c(1);
61
- let t0;
62
- if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
63
- t0 = /*#__PURE__*/ jsxs(Icon, {
64
- size: 14,
65
- strokeWidth: 2,
66
- children: [
67
- /*#__PURE__*/ jsx("circle", {
68
- cx: "11",
69
- cy: "11",
70
- r: "8"
71
- }),
72
- /*#__PURE__*/ jsx("path", {
73
- d: "m21 21-4.3-4.3"
74
- })
75
- ]
76
- });
77
- $[0] = t0;
78
- } else t0 = $[0];
79
- return t0;
30
+ return /*#__PURE__*/ jsxs(Icon, {
31
+ size: 14,
32
+ strokeWidth: 2,
33
+ children: [
34
+ /*#__PURE__*/ jsx("circle", {
35
+ cx: "11",
36
+ cy: "11",
37
+ r: "8"
38
+ }),
39
+ /*#__PURE__*/ jsx("path", {
40
+ d: "m21 21-4.3-4.3"
41
+ })
42
+ ]
43
+ });
80
44
  }
81
45
  function LoadingIcon() {
82
- const $ = c(1);
83
- let t0;
84
- if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
85
- t0 = /*#__PURE__*/ jsx(Icon, {
86
- size: 16,
87
- strokeWidth: 2,
88
- "data-tao-select-loading": "",
89
- children: /*#__PURE__*/ jsx("path", {
90
- d: "M21 12a9 9 0 1 1-6.219-8.56"
91
- })
92
- });
93
- $[0] = t0;
94
- } else t0 = $[0];
95
- return t0;
46
+ return /*#__PURE__*/ jsx(Icon, {
47
+ size: 16,
48
+ strokeWidth: 2,
49
+ "data-tao-select-loading": "",
50
+ children: /*#__PURE__*/ jsx("path", {
51
+ d: "M21 12a9 9 0 1 1-6.219-8.56"
52
+ })
53
+ });
96
54
  }
97
- function Icon(t0) {
98
- const $ = c(10);
99
- let children;
100
- let props;
101
- let size;
102
- let strokeWidth;
103
- if ($[0] !== t0) {
104
- ({ size, strokeWidth, children, ...props } = t0);
105
- $[0] = t0;
106
- $[1] = children;
107
- $[2] = props;
108
- $[3] = size;
109
- $[4] = strokeWidth;
110
- } else {
111
- children = $[1];
112
- props = $[2];
113
- size = $[3];
114
- strokeWidth = $[4];
115
- }
116
- let t1;
117
- if ($[5] !== children || $[6] !== props || $[7] !== size || $[8] !== strokeWidth) {
118
- t1 = /*#__PURE__*/ jsx("svg", {
119
- width: size,
120
- height: size,
121
- viewBox: "0 0 24 24",
122
- fill: "none",
123
- stroke: "currentColor",
124
- strokeWidth: strokeWidth,
125
- strokeLinecap: "round",
126
- strokeLinejoin: "round",
127
- "aria-hidden": "true",
128
- focusable: "false",
129
- role: "presentation",
130
- ...props,
131
- children: children
132
- });
133
- $[5] = children;
134
- $[6] = props;
135
- $[7] = size;
136
- $[8] = strokeWidth;
137
- $[9] = t1;
138
- } else t1 = $[9];
139
- return t1;
55
+ function Icon({ size, strokeWidth, children, ...props }) {
56
+ return /*#__PURE__*/ jsx("svg", {
57
+ width: size,
58
+ height: size,
59
+ viewBox: "0 0 24 24",
60
+ fill: "none",
61
+ stroke: "currentColor",
62
+ strokeWidth: strokeWidth,
63
+ strokeLinecap: "round",
64
+ strokeLinejoin: "round",
65
+ "aria-hidden": "true",
66
+ focusable: "false",
67
+ role: "presentation",
68
+ ...props,
69
+ children: children
70
+ });
140
71
  }
141
72
  export { CheckIcon, ChevronDownIcon, CloseIcon, LoadingIcon, SearchIcon };
@@ -8,7 +8,7 @@ function buildSelectIndex(options) {
8
8
  forEachLeafOption(options, (option)=>{
9
9
  if (!optionByValue.has(option.value)) optionByValue.set(option.value, option);
10
10
  if (!optionByToken.has(option.value)) optionByToken.set(option.value, option);
11
- if ('string' == typeof option.label && !optionByToken.has(option.label)) optionByToken.set(option.label, option);
11
+ if (('string' == typeof option.label || 'number' == typeof option.label) && !optionByToken.has(String(option.label))) optionByToken.set(String(option.label), option);
12
12
  });
13
13
  return {
14
14
  optionByValue,
@@ -17,13 +17,13 @@ function SearchableSelectList({ id, options, resultCount, searchableOptions, act
17
17
  selectedValues
18
18
  ]);
19
19
  let itemIndex = 0;
20
- const renderItem = (option_0)=>{
20
+ const renderItem = (option)=>{
21
21
  const renderIndex = itemIndex++;
22
- const optionIndex = indexByValue.get(option_0.value);
23
- const isSelected = selectedValueSet.has(option_0.value);
24
- const isDisabled = disabled || option_0.disabled || maxCountReached && !isSelected;
22
+ const optionIndex = indexByValue.get(option.value);
23
+ const isSelected = selectedValueSet.has(option.value);
24
+ const isDisabled = disabled || option.disabled || maxCountReached && !isSelected;
25
25
  return /*#__PURE__*/ jsxs("button", {
26
- id: `${id}-option-${encodeURIComponent(option_0.value)}`,
26
+ id: `${id}-option-${encodeURIComponent(option.value)}`,
27
27
  type: "button",
28
28
  role: "option",
29
29
  "aria-selected": isSelected,
@@ -32,9 +32,9 @@ function SearchableSelectList({ id, options, resultCount, searchableOptions, act
32
32
  "data-tao-select-item": "",
33
33
  "data-tao-label-wrap": optionLabelWrap || void 0,
34
34
  "data-tao-selected": multiple && isSelected ? '' : void 0,
35
- "data-tao-has-desc": null != option_0.description || void 0,
35
+ "data-tao-has-desc": null != option.description || void 0,
36
36
  "data-state": isSelected ? 'checked' : 'unchecked',
37
- "data-highlighted": activeValue === option_0.value ? '' : void 0,
37
+ "data-highlighted": activeValue === option.value ? '' : void 0,
38
38
  className: cx(classNames?.item),
39
39
  style: styles?.item,
40
40
  onPointerDown: (event)=>event.preventDefault(),
@@ -43,19 +43,19 @@ function SearchableSelectList({ id, options, resultCount, searchableOptions, act
43
43
  },
44
44
  onClick: ()=>{
45
45
  if (isDisabled) return;
46
- onValueChange(option_0.value);
46
+ onValueChange(option.value);
47
47
  if (!multiple) onClose();
48
48
  },
49
49
  children: [
50
- optionRender ? optionRender(option_0, {
50
+ optionRender ? optionRender(option, {
51
51
  index: renderIndex
52
52
  }) : /*#__PURE__*/ jsxs(Fragment, {
53
53
  children: [
54
- null != option_0.icon && /*#__PURE__*/ jsx("span", {
54
+ null != option.icon && /*#__PURE__*/ jsx("span", {
55
55
  "data-tao-select-item-icon": "",
56
56
  className: cx(classNames?.itemIcon),
57
57
  style: styles?.itemIcon,
58
- children: option_0.icon
58
+ children: option.icon
59
59
  }),
60
60
  /*#__PURE__*/ jsxs("span", {
61
61
  "data-tao-select-item-main": "",
@@ -64,13 +64,13 @@ function SearchableSelectList({ id, options, resultCount, searchableOptions, act
64
64
  children: [
65
65
  /*#__PURE__*/ jsx("span", {
66
66
  "data-tao-select-item-label": "",
67
- children: option_0.label
67
+ children: option.label
68
68
  }),
69
- null != option_0.description && /*#__PURE__*/ jsx("span", {
69
+ null != option.description && /*#__PURE__*/ jsx("span", {
70
70
  "data-tao-select-item-desc": "",
71
71
  className: cx(classNames?.itemDesc),
72
72
  style: styles?.itemDesc,
73
- children: option_0.description
73
+ children: option.description
74
74
  })
75
75
  ]
76
76
  })
@@ -81,9 +81,9 @@ function SearchableSelectList({ id, options, resultCount, searchableOptions, act
81
81
  children: /*#__PURE__*/ jsx(CheckIcon, {})
82
82
  })
83
83
  ]
84
- }, option_0.value);
84
+ }, option.value);
85
85
  };
86
- const renderTree = (items)=>items.map((option_1)=>option_1.options ? /*#__PURE__*/ jsxs("fieldset", {
86
+ const renderTree = (items)=>items.map((option)=>option.options ? /*#__PURE__*/ jsxs("fieldset", {
87
87
  "data-tao-select-group": "",
88
88
  className: cx(classNames?.group),
89
89
  style: styles?.group,
@@ -92,11 +92,11 @@ function SearchableSelectList({ id, options, resultCount, searchableOptions, act
92
92
  "data-tao-select-group-label": "",
93
93
  className: cx(classNames?.groupLabel),
94
94
  style: styles?.groupLabel,
95
- children: option_1.label
95
+ children: option.label
96
96
  }),
97
- renderTree(option_1.options)
97
+ renderTree(option.options)
98
98
  ]
99
- }, option_1.value) : renderItem(option_1));
99
+ }, option.value) : renderItem(option));
100
100
  return /*#__PURE__*/ jsx("div", {
101
101
  id: id,
102
102
  role: "listbox",