@wisdomgarden/torque 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 (568) hide show
  1. package/README.md +75 -0
  2. package/dist/common/components.types.d.ts +60 -0
  3. package/dist/common/components.types.js +1 -0
  4. package/dist/common/dayjs.d.ts +7 -0
  5. package/dist/common/dayjs.js +10 -0
  6. package/dist/common/use-css-variable-value.d.ts +6 -0
  7. package/dist/common/use-css-variable-value.js +23 -0
  8. package/dist/common/use-css-variable-values.d.ts +10 -0
  9. package/dist/common/use-css-variable-values.js +25 -0
  10. package/dist/common/use-form-wrapper-props.d.ts +48 -0
  11. package/dist/common/use-form-wrapper-props.js +59 -0
  12. package/dist/common/use-ime-safe-input.d.ts +10 -0
  13. package/dist/common/use-ime-safe-input.js +23 -0
  14. package/dist/common/use-notification-a11y.d.ts +4 -0
  15. package/dist/common/use-notification-a11y.js +18 -0
  16. package/dist/common/use-sticky-box.d.ts +9 -0
  17. package/dist/common/use-sticky-box.js +217 -0
  18. package/dist/common/util.d.ts +5 -0
  19. package/dist/common/util.js +14 -0
  20. package/dist/components/_inner/base-select/common/searchable.d.ts +5 -0
  21. package/dist/components/_inner/base-select/common/searchable.js +6 -0
  22. package/dist/components/_inner/base-select/common/select.types.d.ts +169 -0
  23. package/dist/components/_inner/base-select/common/select.types.js +1 -0
  24. package/dist/components/_inner/base-select/search-select/index.d.ts +6 -0
  25. package/dist/components/_inner/base-select/search-select/index.js +106 -0
  26. package/dist/components/_inner/base-select/search-select/search-select.module.css.js +10 -0
  27. package/dist/components/_inner/base-select/single-select/index.d.ts +1 -0
  28. package/dist/components/_inner/base-select/single-select/index.js +5 -0
  29. package/dist/components/_inner/base-select/single-select/single-select.d.ts +5 -0
  30. package/dist/components/_inner/base-select/single-select/single-select.js +58 -0
  31. package/dist/components/_inner/base-select/target/single-select-target.d.ts +15 -0
  32. package/dist/components/_inner/base-select/target/single-select-target.js +56 -0
  33. package/dist/components/_inner/bottom-action/bottom-action-item.d.ts +11 -0
  34. package/dist/components/_inner/bottom-action/bottom-action-item.js +140 -0
  35. package/dist/components/_inner/bottom-action/bottom-action.d.ts +6 -0
  36. package/dist/components/_inner/bottom-action/bottom-action.js +161 -0
  37. package/dist/components/_inner/bottom-action/bottom-action.module.css.js +46 -0
  38. package/dist/components/_inner/bottom-action/bottom-action.types.d.ts +117 -0
  39. package/dist/components/_inner/bottom-action/index.d.ts +2 -0
  40. package/dist/components/_inner/bottom-action/index.js +5 -0
  41. package/dist/components/_inner/drawer/base-bottom-drawer.d.ts +32 -0
  42. package/dist/components/_inner/drawer/base-bottom-drawer.js +91 -0
  43. package/dist/components/_inner/drawer/base-bottom-drawer.module.css.js +18 -0
  44. package/dist/components/_inner/dropdown/empty-state.d.ts +6 -0
  45. package/dist/components/_inner/dropdown/empty-state.js +16 -0
  46. package/dist/components/_inner/dropdown/empty-state.module.css.js +12 -0
  47. package/dist/components/_inner/dropdown/options-drop-down.d.ts +22 -0
  48. package/dist/components/_inner/dropdown/options-drop-down.js +95 -0
  49. package/dist/components/_inner/dropdown/options-drop-down.module.css.js +18 -0
  50. package/dist/components/_inner/menu/_mobile/menu.mobile.d.ts +11 -0
  51. package/dist/components/_inner/menu/_mobile/menu.mobile.js +15 -0
  52. package/dist/components/_inner/menu/_web/menu-web.module.css.js +18 -0
  53. package/dist/components/_inner/menu/_web/menu.web.d.ts +6 -0
  54. package/dist/components/_inner/menu/_web/menu.web.js +198 -0
  55. package/dist/components/_inner/number/number-input-left.d.ts +5 -0
  56. package/dist/components/_inner/number/number-input-left.js +29 -0
  57. package/dist/components/_inner/number/number-input-right.d.ts +6 -0
  58. package/dist/components/_inner/number/number-input-right.js +62 -0
  59. package/dist/components/_inner/number/number.module.css.js +12 -0
  60. package/dist/components/_inner/table/head/table-head-filter-multi-select.d.ts +25 -0
  61. package/dist/components/_inner/table/head/table-head-filter-multi-select.js +139 -0
  62. package/dist/components/_inner/table/head/table-head-filter-search.d.ts +18 -0
  63. package/dist/components/_inner/table/head/table-head-filter-search.js +102 -0
  64. package/dist/components/_inner/table/head/table-head-filter-single-select.d.ts +21 -0
  65. package/dist/components/_inner/table/head/table-head-filter-single-select.js +76 -0
  66. package/dist/components/_inner/table/head/table-head-sort.d.ts +16 -0
  67. package/dist/components/_inner/table/head/table-head-sort.js +51 -0
  68. package/dist/components/_inner/table/head/table-head.module.css.js +40 -0
  69. package/dist/components/_inner/table/index.d.ts +5 -0
  70. package/dist/components/_inner/table/index.js +13 -0
  71. package/dist/components/_inner/table/table-header-title.d.ts +7 -0
  72. package/dist/components/_inner/table/table-header-title.js +24 -0
  73. package/dist/components/_inner/table/table-header-title.module.css.js +12 -0
  74. package/dist/components/_inner/tags-input/hooks/use-height-transition.d.ts +15 -0
  75. package/dist/components/_inner/tags-input/hooks/use-height-transition.js +31 -0
  76. package/dist/components/_inner/tags-input/hooks/use-is-wrapped.d.ts +12 -0
  77. package/dist/components/_inner/tags-input/hooks/use-is-wrapped.js +24 -0
  78. package/dist/components/_inner/tags-input/index.d.ts +2 -0
  79. package/dist/components/_inner/tags-input/index.js +5 -0
  80. package/dist/components/_inner/tags-input/styles/tags-input.module.css.js +48 -0
  81. package/dist/components/_inner/tags-input/tags-input-tag.d.ts +13 -0
  82. package/dist/components/_inner/tags-input/tags-input-tag.js +53 -0
  83. package/dist/components/_inner/tags-input/tags-input.d.ts +9 -0
  84. package/dist/components/_inner/tags-input/tags-input.js +143 -0
  85. package/dist/components/_inner/tags-input/tags-input.types.d.ts +57 -0
  86. package/dist/components/alert/alert.d.ts +6 -0
  87. package/dist/components/alert/alert.js +102 -0
  88. package/dist/components/alert/alert.module.css.js +20 -0
  89. package/dist/components/alert/alert.types.d.ts +18 -0
  90. package/dist/components/alert/index.d.ts +2 -0
  91. package/dist/components/alert/index.js +6 -0
  92. package/dist/components/base-input/base-input.d.ts +5 -0
  93. package/dist/components/base-input/base-input.js +143 -0
  94. package/dist/components/base-input/base-input.types.d.ts +89 -0
  95. package/dist/components/base-input/index.d.ts +5 -0
  96. package/dist/components/base-input/index.js +11 -0
  97. package/dist/components/base-input/styles/base-input-variables.module.css.js +8 -0
  98. package/dist/components/base-input/styles/base-input.module.css.js +24 -0
  99. package/dist/components/base-input/subs/base-input-left-section.d.ts +10 -0
  100. package/dist/components/base-input/subs/base-input-left-section.js +29 -0
  101. package/dist/components/base-input/subs/base-input-right-section.d.ts +23 -0
  102. package/dist/components/base-input/subs/base-input-right-section.js +87 -0
  103. package/dist/components/base-input/subs/base-input-target.d.ts +11 -0
  104. package/dist/components/base-input/subs/base-input-target.js +35 -0
  105. package/dist/components/base-input/subs/base-input-wrapper.d.ts +18 -0
  106. package/dist/components/base-input/subs/base-input-wrapper.js +51 -0
  107. package/dist/components/base-input/util.d.ts +8 -0
  108. package/dist/components/base-input/util.js +16 -0
  109. package/dist/components/bottom-drawer/bottom-drawer.d.ts +6 -0
  110. package/dist/components/bottom-drawer/bottom-drawer.js +16 -0
  111. package/dist/components/bottom-drawer/index.d.ts +2 -0
  112. package/dist/components/bottom-drawer/index.js +5 -0
  113. package/dist/components/box/box.d.ts +2 -0
  114. package/dist/components/box/box.js +27 -0
  115. package/dist/components/box/box.module.css.js +8 -0
  116. package/dist/components/box/box.types.d.ts +36 -0
  117. package/dist/components/box/index.d.ts +2 -0
  118. package/dist/components/box/index.js +5 -0
  119. package/dist/components/button/button.d.ts +17 -0
  120. package/dist/components/button/button.js +91 -0
  121. package/dist/components/button/button.types.d.ts +88 -0
  122. package/dist/components/button/index.d.ts +2 -0
  123. package/dist/components/button/index.js +5 -0
  124. package/dist/components/button/styles/button-variables.module.css.js +8 -0
  125. package/dist/components/button/styles/button.module.css.js +18 -0
  126. package/dist/components/checkbox/checkbox-group.d.ts +7 -0
  127. package/dist/components/checkbox/checkbox-group.js +51 -0
  128. package/dist/components/checkbox/checkbox-variables.module.css.js +8 -0
  129. package/dist/components/checkbox/checkbox.d.ts +9 -0
  130. package/dist/components/checkbox/checkbox.js +93 -0
  131. package/dist/components/checkbox/checkbox.module.css.js +12 -0
  132. package/dist/components/checkbox/checkbox.types.d.ts +41 -0
  133. package/dist/components/checkbox/index.d.ts +3 -0
  134. package/dist/components/checkbox/index.js +8 -0
  135. package/dist/components/combobox/combobox-context.d.ts +9 -0
  136. package/dist/components/combobox/combobox-context.js +15 -0
  137. package/dist/components/combobox/combobox-dropdown.d.ts +13 -0
  138. package/dist/components/combobox/combobox-dropdown.js +35 -0
  139. package/dist/components/combobox/combobox-infinite-dropdown.d.ts +51 -0
  140. package/dist/components/combobox/combobox-infinite-dropdown.js +56 -0
  141. package/dist/components/combobox/combobox-option.d.ts +3 -0
  142. package/dist/components/combobox/combobox-option.js +50 -0
  143. package/dist/components/combobox/combobox-options.d.ts +8 -0
  144. package/dist/components/combobox/combobox-options.js +38 -0
  145. package/dist/components/combobox/combobox-search.d.ts +27 -0
  146. package/dist/components/combobox/combobox-search.js +29 -0
  147. package/dist/components/combobox/combobox-target.d.ts +15 -0
  148. package/dist/components/combobox/combobox-target.js +49 -0
  149. package/dist/components/combobox/combobox.d.ts +61 -0
  150. package/dist/components/combobox/combobox.js +53 -0
  151. package/dist/components/combobox/combobox.types.d.ts +58 -0
  152. package/dist/components/combobox/hooks/use-combobox-search-input.d.ts +11 -0
  153. package/dist/components/combobox/hooks/use-combobox-search-input.js +22 -0
  154. package/dist/components/combobox/hooks/use-combobox-target-key-down.d.ts +12 -0
  155. package/dist/components/combobox/hooks/use-combobox-target-key-down.js +35 -0
  156. package/dist/components/combobox/hooks/use-combobox.d.ts +58 -0
  157. package/dist/components/combobox/hooks/use-combobox.js +90 -0
  158. package/dist/components/combobox/index.d.ts +5 -0
  159. package/dist/components/combobox/index.js +9 -0
  160. package/dist/components/combobox/styles/combobox.module.css.js +14 -0
  161. package/dist/components/combobox/subs/combobox-bottom-drawer-dropdown.d.ts +10 -0
  162. package/dist/components/combobox/subs/combobox-bottom-drawer-dropdown.js +14 -0
  163. package/dist/components/combobox/subs/combobox-bottom-drawer-target.d.ts +3 -0
  164. package/dist/components/combobox/subs/combobox-bottom-drawer-target.js +20 -0
  165. package/dist/components/data-filter/data-filter-content.d.ts +13 -0
  166. package/dist/components/data-filter/data-filter-content.js +46 -0
  167. package/dist/components/data-filter/data-filter-drawer.d.ts +19 -0
  168. package/dist/components/data-filter/data-filter-drawer.js +73 -0
  169. package/dist/components/data-filter/data-filter-inline.d.ts +6 -0
  170. package/dist/components/data-filter/data-filter-inline.js +12 -0
  171. package/dist/components/data-filter/data-filter-panel.d.ts +13 -0
  172. package/dist/components/data-filter/data-filter-panel.js +40 -0
  173. package/dist/components/data-filter/data-filter.d.ts +2 -0
  174. package/dist/components/data-filter/data-filter.js +94 -0
  175. package/dist/components/data-filter/data-filter.module.css.js +56 -0
  176. package/dist/components/data-filter/data-filter.types.d.ts +29 -0
  177. package/dist/components/data-filter/filter-condition-tags/filter-condition-tags.d.ts +16 -0
  178. package/dist/components/data-filter/filter-condition-tags/filter-condition-tags.js +114 -0
  179. package/dist/components/data-filter/filter-condition-tags/index.d.ts +1 -0
  180. package/dist/components/data-filter/filter-condition-tags/index.js +5 -0
  181. package/dist/components/data-filter/hooks/use-data-filter-open-state.d.ts +10 -0
  182. package/dist/components/data-filter/hooks/use-data-filter-open-state.js +21 -0
  183. package/dist/components/data-filter/hooks/use-data-filter-state.d.ts +11 -0
  184. package/dist/components/data-filter/hooks/use-data-filter-state.js +48 -0
  185. package/dist/components/data-filter/index.d.ts +3 -0
  186. package/dist/components/data-filter/index.js +7 -0
  187. package/dist/components/date-picker/components/common/calendar-header.d.ts +10 -0
  188. package/dist/components/date-picker/components/common/calendar-header.js +70 -0
  189. package/dist/components/date-picker/components/common/calendar-panel.d.ts +6 -0
  190. package/dist/components/date-picker/components/common/calendar-panel.js +133 -0
  191. package/dist/components/date-picker/components/common/date-cell.d.ts +8 -0
  192. package/dist/components/date-picker/components/common/date-cell.js +46 -0
  193. package/dist/components/date-picker/components/common/decade-view.d.ts +8 -0
  194. package/dist/components/date-picker/components/common/decade-view.js +36 -0
  195. package/dist/components/date-picker/components/common/month-view.d.ts +5 -0
  196. package/dist/components/date-picker/components/common/month-view.js +65 -0
  197. package/dist/components/date-picker/components/common/picker-footer.d.ts +28 -0
  198. package/dist/components/date-picker/components/common/picker-footer.js +29 -0
  199. package/dist/components/date-picker/components/common/picker-sections.d.ts +14 -0
  200. package/dist/components/date-picker/components/common/picker-sections.js +31 -0
  201. package/dist/components/date-picker/components/common/picker-target-input.d.ts +7 -0
  202. package/dist/components/date-picker/components/common/picker-target-input.js +11 -0
  203. package/dist/components/date-picker/components/common/time-column.d.ts +6 -0
  204. package/dist/components/date-picker/components/common/time-column.js +121 -0
  205. package/dist/components/date-picker/components/common/time-input-row.d.ts +20 -0
  206. package/dist/components/date-picker/components/common/time-input-row.js +65 -0
  207. package/dist/components/date-picker/components/common/time-panel.d.ts +6 -0
  208. package/dist/components/date-picker/components/common/time-panel.js +86 -0
  209. package/dist/components/date-picker/components/common/year-view.d.ts +8 -0
  210. package/dist/components/date-picker/components/common/year-view.js +36 -0
  211. package/dist/components/date-picker/components/picker-focus-context.d.ts +21 -0
  212. package/dist/components/date-picker/components/picker-focus-context.js +16 -0
  213. package/dist/components/date-picker/components/range/range-panel.d.ts +33 -0
  214. package/dist/components/date-picker/components/range/range-panel.js +101 -0
  215. package/dist/components/date-picker/components/range/range-shell.d.ts +6 -0
  216. package/dist/components/date-picker/components/range/range-shell.js +110 -0
  217. package/dist/components/date-picker/components/single/picker-shell.d.ts +6 -0
  218. package/dist/components/date-picker/components/single/picker-shell.js +109 -0
  219. package/dist/components/date-picker/date-picker.d.ts +6 -0
  220. package/dist/components/date-picker/date-picker.js +76 -0
  221. package/dist/components/date-picker/date-picker.types.d.ts +543 -0
  222. package/dist/components/date-picker/date-picker.types.js +5 -0
  223. package/dist/components/date-picker/date-range-picker.d.ts +5 -0
  224. package/dist/components/date-picker/date-range-picker.js +103 -0
  225. package/dist/components/date-picker/date-time-picker.d.ts +6 -0
  226. package/dist/components/date-picker/date-time-picker.js +181 -0
  227. package/dist/components/date-picker/date-time-range-picker.d.ts +6 -0
  228. package/dist/components/date-picker/date-time-range-picker.js +157 -0
  229. package/dist/components/date-picker/hooks/date-disabled.d.ts +27 -0
  230. package/dist/components/date-picker/hooks/date-disabled.js +60 -0
  231. package/dist/components/date-picker/hooks/time-utils.d.ts +17 -0
  232. package/dist/components/date-picker/hooks/time-utils.js +14 -0
  233. package/dist/components/date-picker/hooks/use-calendar.d.ts +12 -0
  234. package/dist/components/date-picker/hooks/use-calendar.js +28 -0
  235. package/dist/components/date-picker/hooks/use-date-parser.d.ts +17 -0
  236. package/dist/components/date-picker/hooks/use-date-parser.js +16 -0
  237. package/dist/components/date-picker/hooks/use-grid-keyboard.d.ts +22 -0
  238. package/dist/components/date-picker/hooks/use-grid-keyboard.js +74 -0
  239. package/dist/components/date-picker/hooks/use-range-draft.d.ts +61 -0
  240. package/dist/components/date-picker/hooks/use-range-draft.js +84 -0
  241. package/dist/components/date-picker/hooks/use-range-session.d.ts +14 -0
  242. package/dist/components/date-picker/hooks/use-range-session.js +11 -0
  243. package/dist/components/date-picker/hooks/use-resolved-format.d.ts +15 -0
  244. package/dist/components/date-picker/hooks/use-resolved-format.js +25 -0
  245. package/dist/components/date-picker/index.d.ts +21 -0
  246. package/dist/components/date-picker/index.js +15 -0
  247. package/dist/components/date-picker/styles/calendar-header.module.css.js +14 -0
  248. package/dist/components/date-picker/styles/calendar-panel.module.css.js +12 -0
  249. package/dist/components/date-picker/styles/date-cell.module.css.js +8 -0
  250. package/dist/components/date-picker/styles/month-view.module.css.js +12 -0
  251. package/dist/components/date-picker/styles/panel-layout.module.css.js +12 -0
  252. package/dist/components/date-picker/styles/picker-footer.module.css.js +10 -0
  253. package/dist/components/date-picker/styles/picker-shell.module.css.js +12 -0
  254. package/dist/components/date-picker/styles/range-panel.module.css.js +12 -0
  255. package/dist/components/date-picker/styles/time-column.module.css.js +10 -0
  256. package/dist/components/date-picker/styles/time-input-row.module.css.js +16 -0
  257. package/dist/components/date-picker/styles/time-panel.module.css.js +8 -0
  258. package/dist/components/date-picker/styles/year-view.module.css.js +10 -0
  259. package/dist/components/date-picker/time-picker.d.ts +6 -0
  260. package/dist/components/date-picker/time-picker.js +81 -0
  261. package/dist/components/date-picker/time-range-picker.d.ts +6 -0
  262. package/dist/components/date-picker/time-range-picker.js +135 -0
  263. package/dist/components/drawer/drawer-events.d.ts +28 -0
  264. package/dist/components/drawer/drawer-events.js +14 -0
  265. package/dist/components/drawer/drawer.d.ts +33 -0
  266. package/dist/components/drawer/drawer.js +86 -0
  267. package/dist/components/drawer/drawer.module.css.js +34 -0
  268. package/dist/components/drawer/drawes.d.ts +4 -0
  269. package/dist/components/drawer/drawes.js +82 -0
  270. package/dist/components/drawer/index.d.ts +4 -0
  271. package/dist/components/drawer/index.js +9 -0
  272. package/dist/components/filter/filter-popover.d.ts +11 -0
  273. package/dist/components/filter/filter-popover.js +53 -0
  274. package/dist/components/filter/filter.d.ts +5 -0
  275. package/dist/components/filter/filter.js +29 -0
  276. package/dist/components/filter/filter.module.css.js +12 -0
  277. package/dist/components/filter/filter.types.d.ts +27 -0
  278. package/dist/components/filter/filter.types.js +1 -0
  279. package/dist/components/filter/icon-filter.d.ts +6 -0
  280. package/dist/components/filter/icon-filter.js +25 -0
  281. package/dist/components/filter/index.d.ts +4 -0
  282. package/dist/components/filter/index.js +9 -0
  283. package/dist/components/filter/multi-filter.d.ts +5 -0
  284. package/dist/components/filter/multi-filter.js +52 -0
  285. package/dist/components/flex/flex.d.ts +9 -0
  286. package/dist/components/flex/flex.js +28 -0
  287. package/dist/components/flex/flex.module.css.js +8 -0
  288. package/dist/components/flex/index.d.ts +2 -0
  289. package/dist/components/flex/index.js +5 -0
  290. package/dist/components/flex/layout.types.d.ts +69 -0
  291. package/dist/components/form-wrapper/form-item-wrapper-defaults-context.d.ts +10 -0
  292. package/dist/components/form-wrapper/form-item-wrapper-defaults-context.js +19 -0
  293. package/dist/components/form-wrapper/form-item-wrapper.d.ts +5 -0
  294. package/dist/components/form-wrapper/form-item-wrapper.js +111 -0
  295. package/dist/components/form-wrapper/form-item-wrapper.module.css.js +28 -0
  296. package/dist/components/form-wrapper/form-wrapper.types.d.ts +15 -0
  297. package/dist/components/form-wrapper/index.d.ts +3 -0
  298. package/dist/components/form-wrapper/index.js +8 -0
  299. package/dist/components/group/group.d.ts +8 -0
  300. package/dist/components/group/group.js +36 -0
  301. package/dist/components/group/group.module.css.js +8 -0
  302. package/dist/components/group/index.d.ts +1 -0
  303. package/dist/components/group/index.js +5 -0
  304. package/dist/components/icon-button/icon-button.d.ts +20 -0
  305. package/dist/components/icon-button/icon-button.js +20 -0
  306. package/dist/components/icon-button/icon-button.module.css.js +8 -0
  307. package/dist/components/icon-button/icon-button.types.d.ts +7 -0
  308. package/dist/components/icon-button/index.d.ts +2 -0
  309. package/dist/components/icon-button/index.js +5 -0
  310. package/dist/components/link-button/index.d.ts +1 -0
  311. package/dist/components/link-button/index.js +5 -0
  312. package/dist/components/link-button/link-button.d.ts +31 -0
  313. package/dist/components/link-button/link-button.js +31 -0
  314. package/dist/components/link-icon-button/index.d.ts +1 -0
  315. package/dist/components/link-icon-button/index.js +5 -0
  316. package/dist/components/link-icon-button/link-icon-button.d.ts +37 -0
  317. package/dist/components/link-icon-button/link-icon-button.js +30 -0
  318. package/dist/components/menu/index.d.ts +2 -0
  319. package/dist/components/menu/index.js +5 -0
  320. package/dist/components/menu/menu.d.ts +33 -0
  321. package/dist/components/menu/menu.js +17 -0
  322. package/dist/components/menu/menu.types.d.ts +46 -0
  323. package/dist/components/message/index.d.ts +2 -0
  324. package/dist/components/message/index.js +5 -0
  325. package/dist/components/message/message.d.ts +2 -0
  326. package/dist/components/message/message.js +42 -0
  327. package/dist/components/message/message.module.css.js +14 -0
  328. package/dist/components/message/message.types.d.ts +7 -0
  329. package/dist/components/message/messages.d.ts +10 -0
  330. package/dist/components/message/messages.js +37 -0
  331. package/dist/components/modal/index.d.ts +2 -0
  332. package/dist/components/modal/index.js +5 -0
  333. package/dist/components/modal/modal.d.ts +6 -0
  334. package/dist/components/modal/modal.js +51 -0
  335. package/dist/components/modal/modal.module.css.js +10 -0
  336. package/dist/components/multi-select/base-multi-select.d.ts +3 -0
  337. package/dist/components/multi-select/base-multi-select.js +100 -0
  338. package/dist/components/multi-select/index.d.ts +1 -0
  339. package/dist/components/multi-select/index.js +5 -0
  340. package/dist/components/multi-select/multi-select-input.d.ts +29 -0
  341. package/dist/components/multi-select/multi-select-input.js +74 -0
  342. package/dist/components/multi-select/multi-select.d.ts +28 -0
  343. package/dist/components/multi-select/multi-select.js +34 -0
  344. package/dist/components/multi-select/multi-select.mobile.d.ts +4 -0
  345. package/dist/components/multi-select/multi-select.mobile.js +59 -0
  346. package/dist/components/multi-select/multi-select.types.d.ts +56 -0
  347. package/dist/components/multi-select/multi-select.types.js +1 -0
  348. package/dist/components/multi-select/styles/base-multi-select.module.css.js +16 -0
  349. package/dist/components/notifications/index.d.ts +3 -0
  350. package/dist/components/notifications/index.js +7 -0
  351. package/dist/components/notifications/notification.d.ts +11 -0
  352. package/dist/components/notifications/notification.js +79 -0
  353. package/dist/components/notifications/notification.module.css.js +14 -0
  354. package/dist/components/notifications/notification.types.d.ts +25 -0
  355. package/dist/components/notifications/notifications.d.ts +42 -0
  356. package/dist/components/notifications/notifications.js +42 -0
  357. package/dist/components/number-input/index.d.ts +2 -0
  358. package/dist/components/number-input/index.js +5 -0
  359. package/dist/components/number-input/number-input.d.ts +8 -0
  360. package/dist/components/number-input/number-input.js +161 -0
  361. package/dist/components/number-input/number-input.module.css.js +8 -0
  362. package/dist/components/number-input/number-input.types.d.ts +65 -0
  363. package/dist/components/paper/index.d.ts +1 -0
  364. package/dist/components/paper/index.js +5 -0
  365. package/dist/components/paper/paper.d.ts +7 -0
  366. package/dist/components/paper/paper.js +15 -0
  367. package/dist/components/paper/paper.module.css.js +8 -0
  368. package/dist/components/password-input/index.d.ts +2 -0
  369. package/dist/components/password-input/index.js +5 -0
  370. package/dist/components/password-input/password-input.d.ts +15 -0
  371. package/dist/components/password-input/password-input.js +32 -0
  372. package/dist/components/popover/hooks.d.ts +17 -0
  373. package/dist/components/popover/hooks.js +131 -0
  374. package/dist/components/popover/index.d.ts +8 -0
  375. package/dist/components/popover/index.js +13 -0
  376. package/dist/components/popover/popover-context.d.ts +4 -0
  377. package/dist/components/popover/popover-context.js +16 -0
  378. package/dist/components/popover/popover-dropdown.d.ts +3 -0
  379. package/dist/components/popover/popover-dropdown.js +149 -0
  380. package/dist/components/popover/popover-stack.d.ts +10 -0
  381. package/dist/components/popover/popover-stack.js +24 -0
  382. package/dist/components/popover/popover-target.d.ts +3 -0
  383. package/dist/components/popover/popover-target.js +55 -0
  384. package/dist/components/popover/popover.d.ts +3 -0
  385. package/dist/components/popover/popover.js +175 -0
  386. package/dist/components/popover/popover.types.d.ts +211 -0
  387. package/dist/components/popover/styles/popover.module.css.js +12 -0
  388. package/dist/components/radio/index.d.ts +8 -0
  389. package/dist/components/radio/index.js +12 -0
  390. package/dist/components/radio/radio-group.d.ts +18 -0
  391. package/dist/components/radio/radio-group.js +54 -0
  392. package/dist/components/radio/radio-variables.module.css.js +8 -0
  393. package/dist/components/radio/radio.d.ts +17 -0
  394. package/dist/components/radio/radio.js +56 -0
  395. package/dist/components/radio/radio.module.css.js +14 -0
  396. package/dist/components/radio/radio.types.d.ts +59 -0
  397. package/dist/components/select/index.d.ts +3 -0
  398. package/dist/components/select/index.js +5 -0
  399. package/dist/components/select/select.d.ts +15 -0
  400. package/dist/components/select/select.js +48 -0
  401. package/dist/components/select/select.mobile.d.ts +12 -0
  402. package/dist/components/select/select.mobile.js +53 -0
  403. package/dist/components/stack/index.d.ts +1 -0
  404. package/dist/components/stack/index.js +5 -0
  405. package/dist/components/stack/stack.d.ts +6 -0
  406. package/dist/components/stack/stack.js +10 -0
  407. package/dist/components/sticky-box.d.ts +2 -0
  408. package/dist/components/sticky-box.js +10 -0
  409. package/dist/components/switch/index.d.ts +4 -0
  410. package/dist/components/switch/index.js +7 -0
  411. package/dist/components/switch/switch-group.d.ts +26 -0
  412. package/dist/components/switch/switch-group.js +12 -0
  413. package/dist/components/switch/switch.d.ts +27 -0
  414. package/dist/components/switch/switch.js +23 -0
  415. package/dist/components/switch/switch.module.css.js +7 -0
  416. package/dist/components/tab/index.d.ts +7 -0
  417. package/dist/components/tab/index.js +13 -0
  418. package/dist/components/tab/styles/tabs-variables.module.css.js +8 -0
  419. package/dist/components/tab/styles/tabs.module.css.js +22 -0
  420. package/dist/components/tab/subs/tabs-link-tab.d.ts +10 -0
  421. package/dist/components/tab/subs/tabs-link-tab.js +28 -0
  422. package/dist/components/tab/subs/tabs-list.d.ts +6 -0
  423. package/dist/components/tab/subs/tabs-list.js +59 -0
  424. package/dist/components/tab/subs/tabs-panel.d.ts +6 -0
  425. package/dist/components/tab/subs/tabs-panel.js +40 -0
  426. package/dist/components/tab/subs/tabs-tab.d.ts +6 -0
  427. package/dist/components/tab/subs/tabs-tab.js +52 -0
  428. package/dist/components/tab/tabs-context.d.ts +3 -0
  429. package/dist/components/tab/tabs-context.js +13 -0
  430. package/dist/components/tab/tabs.d.ts +20 -0
  431. package/dist/components/tab/tabs.js +83 -0
  432. package/dist/components/tab/tabs.types.d.ts +107 -0
  433. package/dist/components/tab/use-tabs-data-props.d.ts +9 -0
  434. package/dist/components/tab/use-tabs-data-props.js +12 -0
  435. package/dist/components/tab/use-tabs-keyboard-navigation.d.ts +13 -0
  436. package/dist/components/tab/use-tabs-keyboard-navigation.js +44 -0
  437. package/dist/components/table/index.d.ts +3 -0
  438. package/dist/components/table/index.js +16 -0
  439. package/dist/components/table/table.d.ts +23 -0
  440. package/dist/components/table/table.js +159 -0
  441. package/dist/components/table/table.module.css.js +56 -0
  442. package/dist/components/table/table.types.d.ts +55 -0
  443. package/dist/components/table-pagination/index.d.ts +3 -0
  444. package/dist/components/table-pagination/index.js +8 -0
  445. package/dist/components/table-pagination/pagination.d.ts +10 -0
  446. package/dist/components/table-pagination/pagination.js +115 -0
  447. package/dist/components/table-pagination/pagination.module.css.js +14 -0
  448. package/dist/components/table-pagination/table-pagination.d.ts +15 -0
  449. package/dist/components/table-pagination/table-pagination.js +123 -0
  450. package/dist/components/table-pagination/table-pagination.module.css.js +18 -0
  451. package/dist/components/tag/closable-tag.d.ts +2 -0
  452. package/dist/components/tag/closable-tag.js +35 -0
  453. package/dist/components/tag/icon-tag.d.ts +2 -0
  454. package/dist/components/tag/icon-tag.js +36 -0
  455. package/dist/components/tag/index.d.ts +5 -0
  456. package/dist/components/tag/index.js +11 -0
  457. package/dist/components/tag/link-tag.d.ts +11 -0
  458. package/dist/components/tag/link-tag.js +31 -0
  459. package/dist/components/tag/styles/tag-variables.module.css.js +8 -0
  460. package/dist/components/tag/styles/tag.module.css.js +18 -0
  461. package/dist/components/tag/tag.d.ts +28 -0
  462. package/dist/components/tag/tag.js +40 -0
  463. package/dist/components/tag/tag.types.d.ts +72 -0
  464. package/dist/components/text/index.d.ts +2 -0
  465. package/dist/components/text/index.js +5 -0
  466. package/dist/components/text/text.d.ts +3 -0
  467. package/dist/components/text/text.js +36 -0
  468. package/dist/components/text/text.module.css.js +8 -0
  469. package/dist/components/text/text.types.d.ts +11 -0
  470. package/dist/components/text-area/index.d.ts +2 -0
  471. package/dist/components/text-area/index.js +5 -0
  472. package/dist/components/text-area/text-area.d.ts +9 -0
  473. package/dist/components/text-area/text-area.js +125 -0
  474. package/dist/components/text-area/text-area.module.css.js +22 -0
  475. package/dist/components/text-area/text-area.types.d.ts +46 -0
  476. package/dist/components/text-input/index.d.ts +2 -0
  477. package/dist/components/text-input/index.js +5 -0
  478. package/dist/components/text-input/text-input.d.ts +14 -0
  479. package/dist/components/text-input/text-input.js +24 -0
  480. package/dist/components/tooltip/floating-arrow.d.ts +13 -0
  481. package/dist/components/tooltip/floating-arrow.js +40 -0
  482. package/dist/components/tooltip/get-arrow-position-styles.d.ts +11 -0
  483. package/dist/components/tooltip/get-arrow-position-styles.js +63 -0
  484. package/dist/components/tooltip/index.d.ts +54 -0
  485. package/dist/components/tooltip/index.js +150 -0
  486. package/dist/components/tooltip/styles.module.css.js +10 -0
  487. package/dist/components/tooltip/types.d.ts +13 -0
  488. package/dist/components/tooltip/use-merged-events.d.ts +18 -0
  489. package/dist/components/tooltip/use-merged-events.js +22 -0
  490. package/dist/components/tooltip/use-tooltip-trigger.d.ts +13 -0
  491. package/dist/components/tooltip/use-tooltip-trigger.js +59 -0
  492. package/dist/components/tooltip/utils.d.ts +4 -0
  493. package/dist/components/tooltip/utils.js +35 -0
  494. package/dist/components/tree/hooks/use-custom-click-behavior-feature.d.ts +16 -0
  495. package/dist/components/tree/hooks/use-custom-click-behavior-feature.js +125 -0
  496. package/dist/components/tree/hooks/use-tree-animation.d.ts +12 -0
  497. package/dist/components/tree/hooks/use-tree-animation.js +111 -0
  498. package/dist/components/tree/hooks/use-tree-config.d.ts +22 -0
  499. package/dist/components/tree/hooks/use-tree-config.js +96 -0
  500. package/dist/components/tree/hooks/use-tree-search.d.ts +19 -0
  501. package/dist/components/tree/hooks/use-tree-search.js +57 -0
  502. package/dist/components/tree/hooks/use-tree-value.d.ts +16 -0
  503. package/dist/components/tree/hooks/use-tree-value.js +37 -0
  504. package/dist/components/tree/hooks/use-tree.d.ts +13 -0
  505. package/dist/components/tree/hooks/use-tree.js +111 -0
  506. package/dist/components/tree/index.d.ts +7 -0
  507. package/dist/components/tree/index.js +16 -0
  508. package/dist/components/tree/styles/tree.module.css.js +44 -0
  509. package/dist/components/tree/tree-content.d.ts +15 -0
  510. package/dist/components/tree/tree-content.js +77 -0
  511. package/dist/components/tree/tree-context.d.ts +19 -0
  512. package/dist/components/tree/tree-context.js +13 -0
  513. package/dist/components/tree/tree-node-list.d.ts +9 -0
  514. package/dist/components/tree/tree-node-list.js +21 -0
  515. package/dist/components/tree/tree-node.d.ts +11 -0
  516. package/dist/components/tree/tree-node.js +137 -0
  517. package/dist/components/tree/tree.d.ts +20 -0
  518. package/dist/components/tree/tree.js +22 -0
  519. package/dist/components/tree/tree.types.d.ts +126 -0
  520. package/dist/components/tree-select/index.d.ts +2 -0
  521. package/dist/components/tree-select/index.js +5 -0
  522. package/dist/components/tree-select/styles/tree-select.module.css.js +20 -0
  523. package/dist/components/tree-select/tree-select-dropdown.d.ts +9 -0
  524. package/dist/components/tree-select/tree-select-dropdown.js +36 -0
  525. package/dist/components/tree-select/tree-select-target.d.ts +18 -0
  526. package/dist/components/tree-select/tree-select-target.js +116 -0
  527. package/dist/components/tree-select/tree-select.d.ts +21 -0
  528. package/dist/components/tree-select/tree-select.js +201 -0
  529. package/dist/components/tree-select/tree-select.types.d.ts +39 -0
  530. package/dist/components/unstyled-button/index.d.ts +1 -0
  531. package/dist/components/unstyled-button/index.js +5 -0
  532. package/dist/components/unstyled-button/unstyled-button.d.ts +3 -0
  533. package/dist/components/unstyled-button/unstyled-button.js +19 -0
  534. package/dist/components/unstyled-button/unstyled-button.module.css.js +8 -0
  535. package/dist/components/virtualized-tree-select/index.d.ts +2 -0
  536. package/dist/components/virtualized-tree-select/index.js +5 -0
  537. package/dist/components/virtualized-tree-select/virtualized-tree-select.d.ts +25 -0
  538. package/dist/components/virtualized-tree-select/virtualized-tree-select.js +253 -0
  539. package/dist/components/virtualized-tree-select/virtualized-tree-select.module.css.js +20 -0
  540. package/dist/index.css +1 -0
  541. package/dist/index.d.ts +53 -0
  542. package/dist/index.js +214 -0
  543. package/dist/locale/ar.d.ts +2 -0
  544. package/dist/locale/ar.js +58 -0
  545. package/dist/locale/en.d.ts +2 -0
  546. package/dist/locale/en.js +58 -0
  547. package/dist/locale/index.d.ts +6 -0
  548. package/dist/locale/index.js +15 -0
  549. package/dist/locale/ko.d.ts +2 -0
  550. package/dist/locale/ko.js +58 -0
  551. package/dist/locale/types.d.ts +55 -0
  552. package/dist/locale/types.js +8 -0
  553. package/dist/locale/zh-Hans.d.ts +2 -0
  554. package/dist/locale/zh-Hans.js +58 -0
  555. package/dist/locale/zh-Hant.d.ts +2 -0
  556. package/dist/locale/zh-Hant.js +58 -0
  557. package/dist/node_modules/.pnpm/react-number-format@5.4.5_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/react-number-format/dist/react-number-format.es.js +572 -0
  558. package/dist/provider/hooks.d.ts +24 -0
  559. package/dist/provider/hooks.js +26 -0
  560. package/dist/provider/index.d.ts +7 -0
  561. package/dist/provider/index.js +16 -0
  562. package/dist/provider/ui-context.d.ts +16 -0
  563. package/dist/provider/ui-context.js +14 -0
  564. package/dist/provider/ui-link.d.ts +22 -0
  565. package/dist/provider/ui-link.js +10 -0
  566. package/dist/provider/ui-provider.d.ts +19 -0
  567. package/dist/provider/ui-provider.js +21 -0
  568. package/package.json +198 -0
@@ -0,0 +1,57 @@
1
+ import { SimpleComponentSizeBase } from '../../../common/components.types';
2
+ /**
3
+ * 单个标签数据
4
+ */
5
+ export interface TagItem {
6
+ /** 唯一标识,与外部 value 对应 */
7
+ id: string;
8
+ /** 显示文本 */
9
+ label: string;
10
+ }
11
+ /**
12
+ * TagsInput 组件 Props
13
+ *
14
+ * 与业务数据结构解耦:父组件负责将 value[] 解析为 TagItem[],
15
+ * 本组件只负责渲染和交互。
16
+ */
17
+ export interface TagsInputProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'children'> {
18
+ /** 当前已选标签列表(父组件预先解析好 label) */
19
+ tags?: TagItem[];
20
+ /** 移除某个标签时的回调,参数为该标签的 id */
21
+ onRemove?: (id: string) => void;
22
+ /** 点击整个输入框时的回调(用于打开下拉) */
23
+ onClick?: React.MouseEventHandler<HTMLDivElement>;
24
+ /**
25
+ * 搜索输入框插槽(searchable 模式下由父组件传入)。
26
+ * 不传时若无已选标签则显示 placeholder。
27
+ */
28
+ renderInput?: () => React.ReactNode;
29
+ /** 占位提示文本 */
30
+ placeholder?: string;
31
+ /**
32
+ * 单行模式:超过 2 个标签时折叠显示为 "+N..."
33
+ * @default true
34
+ */
35
+ singleLine?: boolean;
36
+ /** 下拉是否已打开,用于控制箭头旋转方向 */
37
+ dropdownOpened?: boolean;
38
+ /**
39
+ * 点击右侧箭头时的回调。传入后箭头变为可点击的开关;
40
+ * 不传时箭头保持纯装饰(`pointer-events-none`),点击穿透到整个输入区域。
41
+ */
42
+ onToggleDropdown?: () => void;
43
+ /** 尺寸 */
44
+ size?: SimpleComponentSizeBase;
45
+ /** 边框圆角风格 */
46
+ borderRadius?: 'full' | 'sm';
47
+ /** 关联的 HTML id */
48
+ ref?: React.Ref<HTMLInputElement>;
49
+ /** 错误状态,触发红色边框 */
50
+ error?: boolean | string;
51
+ /** 禁用整个输入区域 */
52
+ disabled?: boolean;
53
+ /** 有值时是否显示清除按钮 */
54
+ clearable?: boolean;
55
+ /** 点击清除按钮时的回调 */
56
+ onClear?: () => void;
57
+ }
@@ -0,0 +1,6 @@
1
+ import { AlertProps } from './alert.types';
2
+ /**
3
+ * 显示警示或者状态信息的组件
4
+ */
5
+ export declare const Alert: import("react").NamedExoticComponent<AlertProps>;
6
+ export declare const AlertSkeleton: () => import("react").JSX.Element;
@@ -0,0 +1,102 @@
1
+ "use client";
2
+ import { jsxs as a, jsx as r } from "react/jsx-runtime";
3
+ import { Skeleton as O } from "@mantine/core";
4
+ import { useId as g } from "@mantine/hooks";
5
+ import { Icon as z } from "@wisdomgarden/torque-icons";
6
+ import { clsx as B } from "clsx";
7
+ import { memo as M, useState as h, useRef as T, useLayoutEffect as _, useCallback as j } from "react";
8
+ import "../../provider/ui-context.js";
9
+ import { useLocale as E } from "../../provider/hooks.js";
10
+ import { Box as l } from "../box/box.js";
11
+ import { IconButton as H } from "../icon-button/icon-button.js";
12
+ import { Paper as L } from "../paper/paper.js";
13
+ import { Text as w } from "../text/text.js";
14
+ import e from "./alert.module.css.js";
15
+ const U = {
16
+ info: "info-fill",
17
+ success: "success-fill",
18
+ warning: "warning-fill-triangle",
19
+ wrong: "error-fill",
20
+ air: "copilot/generate"
21
+ }, W = {
22
+ info: "status",
23
+ success: "status",
24
+ warning: "alert",
25
+ wrong: "alert",
26
+ air: "alert"
27
+ }, D = 50, oe = M(function({
28
+ status: o,
29
+ title: i,
30
+ message: s,
31
+ closable: c = !0,
32
+ radius: t,
33
+ className: A,
34
+ children: R,
35
+ renderRight: m,
36
+ ...x
37
+ }) {
38
+ const N = E(), [v, I] = h(!0), [S, k] = h("full"), u = T(null);
39
+ _(() => {
40
+ if (t) return;
41
+ const n = u.current;
42
+ if (!n) return;
43
+ const d = () => {
44
+ const C = n.getBoundingClientRect().height > D ? "md" : "full";
45
+ k(C);
46
+ };
47
+ if (d(), typeof ResizeObserver > "u") return;
48
+ const b = new ResizeObserver(d);
49
+ return b.observe(n), () => b.disconnect();
50
+ }, [t]);
51
+ const y = j(() => {
52
+ I(!1);
53
+ }, []), f = g(), p = g();
54
+ return v && /* @__PURE__ */ a(
55
+ L,
56
+ {
57
+ ref: u,
58
+ radius: t ?? S,
59
+ className: B(e.alert, A),
60
+ "data-status": o,
61
+ role: W[o],
62
+ "aria-live": o === "wrong" || o === "warning" ? "assertive" : "polite",
63
+ "aria-atomic": "true",
64
+ "aria-labelledby": f,
65
+ "aria-label": i,
66
+ "aria-description": s,
67
+ "aria-describedby": p,
68
+ ...x,
69
+ children: [
70
+ /* @__PURE__ */ r(l, { className: e.iconWrapper, children: /* @__PURE__ */ r(
71
+ z,
72
+ {
73
+ name: U[o],
74
+ className: e.icon,
75
+ "aria-hidden": "true"
76
+ }
77
+ ) }),
78
+ /* @__PURE__ */ a(l, { className: e.content, children: [
79
+ /* @__PURE__ */ r(w, { id: f, component: "span", className: e.title, children: i }),
80
+ /* @__PURE__ */ r(w, { id: p, component: "span", children: s ?? R })
81
+ ] }),
82
+ (c || m) && /* @__PURE__ */ a(l, { className: e.closeWrapper, children: [
83
+ m?.(),
84
+ c && /* @__PURE__ */ r(
85
+ H,
86
+ {
87
+ variant: "text",
88
+ color: "regular",
89
+ iconName: "close",
90
+ onClick: y,
91
+ "aria-label": N.closeAlert
92
+ }
93
+ )
94
+ ] })
95
+ ]
96
+ }
97
+ );
98
+ }), te = () => /* @__PURE__ */ r(O, { className: e.skeleton });
99
+ export {
100
+ oe as Alert,
101
+ te as AlertSkeleton
102
+ };
@@ -0,0 +1,20 @@
1
+ "use client";
2
+ const e = "_alert_1a9me_2", t = "_iconWrapper_1a9me_39", n = "_icon_1a9me_39", o = "_content_1a9me_80", c = "_title_1a9me_87", _ = "_closeWrapper_1a9me_91", a = "_skeleton_1a9me_101", s = {
3
+ alert: e,
4
+ iconWrapper: t,
5
+ icon: n,
6
+ content: o,
7
+ title: c,
8
+ closeWrapper: _,
9
+ skeleton: a
10
+ };
11
+ export {
12
+ e as alert,
13
+ _ as closeWrapper,
14
+ o as content,
15
+ s as default,
16
+ n as icon,
17
+ t as iconWrapper,
18
+ a as skeleton,
19
+ c as title
20
+ };
@@ -0,0 +1,18 @@
1
+ export interface AlertProps {
2
+ /** 警告状态类型:info(信息)、success(成功)、warning(警告)、wrong(错误)、air(AIR 专属) */
3
+ status: 'info' | 'success' | 'warning' | 'wrong' | 'air';
4
+ /** 圆角大小;未传时高度不超过 50px 使用 full,超过 50px 使用 md */
5
+ radius?: 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'full';
6
+ /** 警告标题 */
7
+ title?: string;
8
+ /** 警告详细信息内容 */
9
+ message?: string;
10
+ /** 是否显示关闭按钮 */
11
+ closable?: boolean;
12
+ /** 自定义 CSS 类名,作用在最外层div上 */
13
+ className?: string;
14
+ /** 右侧区域的自定义渲染函数 */
15
+ renderRight?: () => React.ReactNode;
16
+ /** 子节点内容 */
17
+ children?: React.ReactNode;
18
+ }
@@ -0,0 +1,2 @@
1
+ export type { AlertProps } from './alert.types';
2
+ export { Alert, AlertSkeleton } from './alert';
@@ -0,0 +1,6 @@
1
+ "use client";
2
+ import { Alert as l, AlertSkeleton as r } from "./alert.js";
3
+ export {
4
+ l as Alert,
5
+ r as AlertSkeleton
6
+ };
@@ -0,0 +1,5 @@
1
+ import { BaseInputProps } from './base-input.types';
2
+ export declare const BaseInput: {
3
+ (props: BaseInputProps): import("react").JSX.Element;
4
+ displayName: string;
5
+ };
@@ -0,0 +1,143 @@
1
+ "use client";
2
+ import { jsxs as te, jsx as l } from "react/jsx-runtime";
3
+ import { useMergedRef as ne } from "@mantine/hooks";
4
+ import { useRef as oe, useState as re } from "react";
5
+ import { useImeSafeInput as ie } from "../../common/use-ime-safe-input.js";
6
+ import { BaseInputLeftSection as ae } from "./subs/base-input-left-section.js";
7
+ import { BaseInputRightSection as se } from "./subs/base-input-right-section.js";
8
+ import { BaseInputTarget as ue } from "./subs/base-input-target.js";
9
+ import { BaseInputWrapper as le } from "./subs/base-input-wrapper.js";
10
+ const ce = (t) => typeof t == "string" ? t : typeof t == "number" ? String(t) : "", me = (t) => {
11
+ const {
12
+ classNames: i,
13
+ size: I = "md",
14
+ borderRadius: b = "full",
15
+ error: c,
16
+ disabled: a,
17
+ pointer: v,
18
+ onClick: S,
19
+ onMouseEnter: y,
20
+ onMouseLeave: B,
21
+ leftIconName: R,
22
+ leftIconUseOriginalColor: E,
23
+ renderLeftSection: L,
24
+ clearable: N,
25
+ rightIconName: x,
26
+ rightToolTipContent: V,
27
+ rightIconAriaLabel: M,
28
+ rightIconClassName: O,
29
+ rightIconColor: T,
30
+ rightIconUseOriginalColor: j,
31
+ onRightIconClick: k,
32
+ disableMaxLengthLabel: m,
33
+ renderRightSection: w,
34
+ renderRoot: A,
35
+ hideValue: D,
36
+ textColor: U,
37
+ children: z,
38
+ ref: W,
39
+ onChange: d,
40
+ onClear: _,
41
+ value: e,
42
+ defaultValue: s,
43
+ maxLength: u,
44
+ className: de,
45
+ wrapperRef: $,
46
+ imeSafe: q = !0,
47
+ onCompositionStart: F,
48
+ onCompositionEnd: G,
49
+ ...p
50
+ } = t, o = oe(null), H = ne(W, o), [J, f] = re(() => typeof s == "string" ? s : typeof e == "string" ? e : typeof e == "number" ? String(e) : ""), r = ie(e, (n) => {
51
+ const h = o.current, ee = {
52
+ nativeEvent: new Event("input"),
53
+ target: h ?? { value: n },
54
+ currentTarget: h ?? { value: n }
55
+ };
56
+ d?.(ee);
57
+ }), g = q && e !== void 0, K = (n) => {
58
+ f(n.target.value), d?.(n);
59
+ }, P = (n) => {
60
+ e === void 0 && o.current && (o.current.value = ""), f(""), o.current?.focus(), _?.(n);
61
+ }, Q = !m && !!u && typeof e == "string", C = t.id && Q ? `${t.id}-counter` : void 0, X = [p["aria-describedby"], C].filter(Boolean).join(" ") || void 0, Y = g ? {
62
+ value: r.value,
63
+ onChange: r.onChange,
64
+ onCompositionStart: r.onCompositionStart,
65
+ onCompositionEnd: r.onCompositionEnd
66
+ } : {
67
+ value: e,
68
+ onChange: K,
69
+ onCompositionStart: F,
70
+ onCompositionEnd: G
71
+ }, Z = g ? ce(r.value) : J;
72
+ return /* @__PURE__ */ te(
73
+ le,
74
+ {
75
+ ref: $,
76
+ classNames: i,
77
+ size: I,
78
+ borderRadius: b,
79
+ error: c,
80
+ disabled: a,
81
+ pointer: v,
82
+ inputRef: o,
83
+ onClick: S,
84
+ onMouseEnter: y,
85
+ onMouseLeave: B,
86
+ children: [
87
+ /* @__PURE__ */ l(
88
+ ae,
89
+ {
90
+ leftIconName: R,
91
+ leftIconUseOriginalColor: E,
92
+ classNames: i,
93
+ renderLeftSection: L
94
+ }
95
+ ),
96
+ /* @__PURE__ */ l(
97
+ ue,
98
+ {
99
+ ref: H,
100
+ error: c,
101
+ disabled: a,
102
+ ...Y,
103
+ defaultValue: s,
104
+ maxLength: u,
105
+ hideValue: D,
106
+ textColor: U,
107
+ classNames: i,
108
+ renderRoot: A,
109
+ ...p,
110
+ "aria-describedby": X,
111
+ children: z
112
+ }
113
+ ),
114
+ /* @__PURE__ */ l(
115
+ se,
116
+ {
117
+ clearable: N,
118
+ rightIconName: x,
119
+ rightToolTipContent: V,
120
+ rightIconAriaLabel: M,
121
+ rightIconClassName: O,
122
+ rightIconColor: T,
123
+ rightIconUseOriginalColor: j,
124
+ onRightIconClick: k,
125
+ disableMaxLengthLabel: m,
126
+ maxLength: u,
127
+ value: e,
128
+ disabled: a,
129
+ classNames: i,
130
+ renderRightSection: w,
131
+ internalValue: Z,
132
+ onClear: P,
133
+ counterId: C
134
+ }
135
+ )
136
+ ]
137
+ }
138
+ );
139
+ };
140
+ me.displayName = "BaseInput";
141
+ export {
142
+ me as BaseInput
143
+ };
@@ -0,0 +1,89 @@
1
+ import React from 'react';
2
+ import { FormProps, InputSize, InputWrapProps, RefProps, RootClassNameProps } from '../../common/components.types';
3
+ import { ButtonColor } from '../button/button.types';
4
+ import type { IconName } from '@wisdomgarden/torque-icons';
5
+ /**
6
+ * 基础输入框组件属性
7
+ */
8
+ export interface InnerInputProps extends InputWrapProps, FormProps, RootClassNameProps, RefProps<HTMLInputElement>, Omit<React.InputHTMLAttributes<HTMLInputElement>, 'form' | 'size'> {
9
+ /** 是否显示清空按钮 */
10
+ clearable?: boolean;
11
+ /** 后置图标名称 */
12
+ rightIconName?: IconName;
13
+ /** 后置图标的 Tooltip 提示内容 */
14
+ rightToolTipContent?: string;
15
+ /** 后置图标按钮的可访问标签,onRightIconClick 存在时应提供 */
16
+ rightIconAriaLabel?: string;
17
+ /** 后置图标的自定义类名 */
18
+ rightIconClassName?: string;
19
+ /** 后置图标按钮的颜色,默认 secondary(text-2) */
20
+ rightIconColor?: ButtonColor;
21
+ /** 前置图标名称 */
22
+ leftIconName?: IconName;
23
+ /** 前置图标是否使用其原色(多色 SVG) */
24
+ leftIconUseOriginalColor?: boolean;
25
+ /** 后置图标是否使用其原色(多色 SVG) */
26
+ rightIconUseOriginalColor?: boolean;
27
+ /** 输入框尺寸 */
28
+ size?: InputSize;
29
+ /** 错误状态或错误提示信息 */
30
+ error?: boolean | string;
31
+ /** 设置了 maxLength 时,是否隐藏右侧的字符长度统计标签 */
32
+ disableMaxLengthLabel?: boolean;
33
+ /** 点击清空按钮时的回调事件 */
34
+ onClear?: (e?: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
35
+ /** 点击后置图标时的回调事件 */
36
+ onRightIconClick?: (e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
37
+ /** 文本颜色 */
38
+ textColor?: string;
39
+ /** 输入框的圆角大小 */
40
+ borderRadius?: 'sm' | 'full';
41
+ /** 鼠标悬停时是否显示为指针手型(通常用于不可输入但可点击的场景,如 Select) */
42
+ pointer?: boolean;
43
+ /** 是否隐藏输入框内的值 */
44
+ hideValue?: boolean;
45
+ /**
46
+ * 自定义根节点渲染函数,接收完整的 wrapper props(className、data 属性、事件等),
47
+ * 由调用方决定渲染什么元素
48
+ */
49
+ renderRoot?: (props: Record<string, any>) => any;
50
+ /**
51
+ * 各内部层的额外 className,与内部样式合并
52
+ */
53
+ classNames?: BaseInputClassNames;
54
+ /**
55
+ * 完全自定义左侧区域渲染。
56
+ * 提供此 prop 时,leftIconName / leftIconUseOriginalColor 被忽略。
57
+ */
58
+ renderLeftSection?: React.ReactNode;
59
+ /**
60
+ * 完全自定义右侧区域渲染。
61
+ * 提供此 prop 时,rightIconName / clearable / disableMaxLengthLabel 等被忽略。
62
+ */
63
+ renderRightSection?: React.ReactNode;
64
+ /**
65
+ * 外层容器 div 的 ref
66
+ */
67
+ wrapperRef?: React.Ref<HTMLDivElement>;
68
+ /**
69
+ * 是否启用中文输入法安全模式。
70
+ * 默认 `true`:中文输入过程中不触发 `onChange`,输入法确认后(compositionend)再提交最终值,
71
+ * 避免拼音中间态触发搜索/过滤等副作用。
72
+ * 显式传 `false` 可恢复原生行为(每次按键都触发 onChange)。
73
+ */
74
+ imeSafe?: boolean;
75
+ }
76
+ /**
77
+ * 各内部层的额外 className,与内部样式合并(追加,不替换)
78
+ */
79
+ export interface BaseInputClassNames {
80
+ /** 外层容器 div */
81
+ wrapper?: string;
82
+ /** 原生 <input> 元素 */
83
+ input?: string;
84
+ /** 左侧区域容器 */
85
+ leftSection?: string;
86
+ /** 右侧区域容器 */
87
+ rightSection?: string;
88
+ }
89
+ export type BaseInputProps = InnerInputProps;
@@ -0,0 +1,5 @@
1
+ export { BaseInput } from './base-input';
2
+ export { BaseInputWrapper } from './subs/base-input-wrapper';
3
+ export { BaseInputTarget } from './subs/base-input-target';
4
+ export * from './util';
5
+ export type * from './base-input.types';
@@ -0,0 +1,11 @@
1
+ "use client";
2
+ import { BaseInput as o } from "./base-input.js";
3
+ import { BaseInputWrapper as t } from "./subs/base-input-wrapper.js";
4
+ import { BaseInputTarget as m } from "./subs/base-input-target.js";
5
+ import { getFormProps as f } from "./util.js";
6
+ export {
7
+ o as BaseInput,
8
+ m as BaseInputTarget,
9
+ t as BaseInputWrapper,
10
+ f as getFormProps
11
+ };
@@ -0,0 +1,8 @@
1
+ "use client";
2
+ const t = "_inputVar_z2vhf_2", a = {
3
+ inputVar: t
4
+ };
5
+ export {
6
+ a as default,
7
+ t as inputVar
8
+ };
@@ -0,0 +1,24 @@
1
+ "use client";
2
+ const t = "_inputRoot_16s57_2", n = "_inputNative_16s57_19", e = "_inputNativeHidden_16s57_43", i = "_leftSection_16s57_47", o = "_rightSection_16s57_55", s = "_maxLengthLabel_16s57_61", _ = "_disabledRight_16s57_68", a = "_clearButton_16s57_72", c = "_noInteraction_16s57_77", l = {
3
+ inputRoot: t,
4
+ inputNative: n,
5
+ inputNativeHidden: e,
6
+ leftSection: i,
7
+ rightSection: o,
8
+ maxLengthLabel: s,
9
+ disabledRight: _,
10
+ clearButton: a,
11
+ noInteraction: c
12
+ };
13
+ export {
14
+ a as clearButton,
15
+ l as default,
16
+ _ as disabledRight,
17
+ n as inputNative,
18
+ e as inputNativeHidden,
19
+ t as inputRoot,
20
+ i as leftSection,
21
+ s as maxLengthLabel,
22
+ c as noInteraction,
23
+ o as rightSection
24
+ };
@@ -0,0 +1,10 @@
1
+ import { BaseInputClassNames } from '../base-input.types';
2
+ import type { IconName } from '@wisdomgarden/torque-icons';
3
+ interface BaseInputLeftSectionProps {
4
+ readonly leftIconName?: IconName;
5
+ readonly leftIconUseOriginalColor?: boolean;
6
+ readonly classNames?: BaseInputClassNames;
7
+ readonly renderLeftSection?: React.ReactNode;
8
+ }
9
+ export declare const BaseInputLeftSection: ({ leftIconName, leftIconUseOriginalColor, classNames, renderLeftSection, }: BaseInputLeftSectionProps) => import("react").JSX.Element | null;
10
+ export {};
@@ -0,0 +1,29 @@
1
+ "use client";
2
+ import { jsx as r, Fragment as o } from "react/jsx-runtime";
3
+ import { Icon as s } from "@wisdomgarden/torque-icons";
4
+ import { clsx as l } from "clsx";
5
+ import m from "../styles/base-input.module.css.js";
6
+ const p = ({
7
+ leftIconName: i,
8
+ leftIconUseOriginalColor: e,
9
+ classNames: n,
10
+ renderLeftSection: t
11
+ }) => t !== void 0 ? /* @__PURE__ */ r(o, { children: t }) : i ? /* @__PURE__ */ r(
12
+ "span",
13
+ {
14
+ className: l(m.leftSection, n?.leftSection),
15
+ "aria-hidden": "true",
16
+ children: /* @__PURE__ */ r(
17
+ s,
18
+ {
19
+ name: i,
20
+ width: 16,
21
+ height: 16,
22
+ useOriginalColor: e
23
+ }
24
+ )
25
+ }
26
+ ) : null;
27
+ export {
28
+ p as BaseInputLeftSection
29
+ };
@@ -0,0 +1,23 @@
1
+ import { BaseInputClassNames, BaseInputProps } from '../base-input.types';
2
+ import type { IconName } from '@wisdomgarden/torque-icons';
3
+ interface BaseInputRightSectionProps {
4
+ readonly clearable?: boolean;
5
+ readonly rightIconName?: IconName;
6
+ readonly rightToolTipContent?: string;
7
+ readonly rightIconAriaLabel?: string;
8
+ readonly rightIconClassName?: string;
9
+ readonly rightIconColor?: BaseInputProps['rightIconColor'];
10
+ readonly rightIconUseOriginalColor?: boolean;
11
+ readonly onRightIconClick?: BaseInputProps['onRightIconClick'];
12
+ readonly disableMaxLengthLabel?: boolean;
13
+ readonly maxLength?: number;
14
+ readonly value?: BaseInputProps['value'];
15
+ readonly disabled?: boolean;
16
+ readonly classNames?: BaseInputClassNames;
17
+ readonly renderRightSection?: React.ReactNode;
18
+ readonly internalValue: string;
19
+ readonly onClear: (e?: React.MouseEvent<HTMLButtonElement>) => void;
20
+ readonly counterId?: string;
21
+ }
22
+ export declare const BaseInputRightSection: ({ clearable, rightIconName, rightToolTipContent, rightIconAriaLabel, rightIconClassName, rightIconColor, rightIconUseOriginalColor, onRightIconClick, disableMaxLengthLabel, maxLength, value, disabled, classNames, renderRightSection, internalValue, onClear, counterId, }: BaseInputRightSectionProps) => import("react").JSX.Element | null;
23
+ export {};
@@ -0,0 +1,87 @@
1
+ "use client";
2
+ import { jsx as e, Fragment as M, jsxs as x } from "react/jsx-runtime";
3
+ import { clsx as i } from "clsx";
4
+ import "../../../provider/ui-context.js";
5
+ import "react";
6
+ import { useLocale as P } from "../../../provider/hooks.js";
7
+ import { IconButton as v } from "../../icon-button/icon-button.js";
8
+ import { Tooltip as A } from "../../tooltip/index.js";
9
+ import a from "../styles/base-input.module.css.js";
10
+ const I = ({
11
+ clearable: g,
12
+ rightIconName: c,
13
+ rightToolTipContent: t,
14
+ rightIconAriaLabel: l,
15
+ rightIconClassName: w,
16
+ rightIconColor: B,
17
+ rightIconUseOriginalColor: N,
18
+ onRightIconClick: r,
19
+ disableMaxLengthLabel: b,
20
+ maxLength: m,
21
+ value: s,
22
+ disabled: n,
23
+ classNames: p,
24
+ renderRightSection: d,
25
+ internalValue: y,
26
+ onClear: L,
27
+ counterId: S
28
+ }) => {
29
+ const j = P();
30
+ if (d !== void 0)
31
+ return /* @__PURE__ */ e(M, { children: d });
32
+ const u = g && (y || s) && !n, f = !!c, h = !b && !!m && typeof s == "string";
33
+ if (!u && !f && !h && !p?.rightSection)
34
+ return null;
35
+ r && !l && !t && console.warn(
36
+ "[BaseInput]: 当提供 onRightIconClick 时,必须同时提供 rightIconAriaLabel 或 rightToolTipContent,以确保按钮可访问(WCAG 4.1.2)。"
37
+ );
38
+ const D = i(
39
+ w,
40
+ n && a.disabledRight,
41
+ !t && !r && a.noInteraction
42
+ );
43
+ return /* @__PURE__ */ x("span", { className: i(a.rightSection, p?.rightSection), children: [
44
+ u && /* @__PURE__ */ e(
45
+ v,
46
+ {
47
+ className: i(
48
+ a.clearButton,
49
+ n && a.disabledRight
50
+ ),
51
+ disabled: n,
52
+ iconName: "icon-clear-input",
53
+ variant: "text",
54
+ "aria-label": j.clear,
55
+ color: "secondary",
56
+ onMouseDown: (o) => o.preventDefault(),
57
+ onClick: (o) => {
58
+ o.stopPropagation(), L(o);
59
+ }
60
+ }
61
+ ),
62
+ f && /* @__PURE__ */ e(A, { label: t, disabled: !t, children: /* @__PURE__ */ e(
63
+ v,
64
+ {
65
+ className: D,
66
+ renderRoot: r ? void 0 : (o) => /* @__PURE__ */ e("span", { ...o }),
67
+ iconName: c,
68
+ variant: "text",
69
+ useOriginalColor: N,
70
+ "aria-label": r ? l ?? t ?? "" : void 0,
71
+ "aria-hidden": r ? void 0 : !0,
72
+ onClick: r ? (o) => {
73
+ o.stopPropagation(), r(o);
74
+ } : void 0,
75
+ color: B ?? "secondary"
76
+ }
77
+ ) }),
78
+ h && /* @__PURE__ */ x("span", { id: S, className: a.maxLengthLabel, children: [
79
+ s.length,
80
+ "/",
81
+ m
82
+ ] })
83
+ ] });
84
+ };
85
+ export {
86
+ I as BaseInputRightSection
87
+ };
@@ -0,0 +1,11 @@
1
+ import { BaseInputClassNames, BaseInputProps } from '../base-input.types';
2
+ interface BaseInputTargetProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size'> {
3
+ readonly ref: React.Ref<HTMLInputElement>;
4
+ readonly error?: boolean | string;
5
+ readonly hideValue?: boolean;
6
+ readonly textColor?: string;
7
+ readonly classNames?: BaseInputClassNames;
8
+ readonly renderRoot?: BaseInputProps['renderRoot'];
9
+ }
10
+ export declare const BaseInputTarget: ({ ref, error, hideValue, textColor, classNames, renderRoot, children, required, ...rest }: BaseInputTargetProps) => any;
11
+ export {};