@g4rcez/components 5.0.0 → 5.0.1

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 (366) hide show
  1. package/dist/{MotionConfig-BLwtdAWy.js → MotionConfig-DKKYqBH2.js} +2 -2
  2. package/dist/{MotionConfig-BLwtdAWy.js.map → MotionConfig-DKKYqBH2.js.map} +1 -1
  3. package/dist/{autocomplete-DVKTP0Il.js → autocomplete-D3VOTihi.js} +2 -2
  4. package/dist/{autocomplete-DVKTP0Il.js.map → autocomplete-D3VOTihi.js.map} +1 -1
  5. package/dist/{calendar-_DZjphH8.js → calendar-PCCZDUIL.js} +4 -4
  6. package/dist/{calendar-_DZjphH8.js.map → calendar-PCCZDUIL.js.map} +1 -1
  7. package/dist/components/display/alert.js +1 -1
  8. package/dist/components/display/calendar.js +1 -1
  9. package/dist/components/display/list.js +2 -2
  10. package/dist/components/display/notifications.js +1 -1
  11. package/dist/components/floating/expand.js +1 -1
  12. package/dist/components/floating/modal.js +1 -1
  13. package/dist/components/form/autocomplete.js +1 -1
  14. package/dist/components/form/date-picker.js +1 -1
  15. package/dist/components/form/file-upload.js +1 -1
  16. package/dist/components/table/table.js +1 -1
  17. package/dist/{date-picker-9q_Ki5Vu.js → date-picker-BhKEFZew.js} +2 -2
  18. package/dist/{date-picker-9q_Ki5Vu.js.map → date-picker-BhKEFZew.js.map} +1 -1
  19. package/dist/{dist-Buc00Zls.js → dist-BrGpYRaj.js} +56 -55
  20. package/dist/{dist-Buc00Zls.js.map → dist-BrGpYRaj.js.map} +1 -1
  21. package/dist/{file-upload-COk6_Bs5.js → file-upload-DWbZfeG5.js} +15 -15
  22. package/dist/{file-upload-COk6_Bs5.js.map → file-upload-DWbZfeG5.js.map} +1 -1
  23. package/dist/index.js +646 -647
  24. package/dist/index.js.map +1 -1
  25. package/dist/{modal-Cn-OaKRp.js → modal-Bz-61ays.js} +3 -3
  26. package/dist/{modal-Cn-OaKRp.js.map → modal-Bz-61ays.js.map} +1 -1
  27. package/dist/{notifications-l_B9J4Gx.js → notifications-MT4XkLov.js} +270 -269
  28. package/dist/{notifications-l_B9J4Gx.js.map → notifications-MT4XkLov.js.map} +1 -1
  29. package/dist/{proxy-Drpz0Avo.js → proxy-BcJ_5Dwq.js} +465 -468
  30. package/dist/{proxy-Drpz0Avo.js.map → proxy-BcJ_5Dwq.js.map} +1 -1
  31. package/dist/{table-Dql6Yzag.js → table-CUFbAI2k.js} +3 -3
  32. package/dist/{table-Dql6Yzag.js.map → table-CUFbAI2k.js.map} +1 -1
  33. package/package.json +1 -1
  34. package/dist/src/components/core/button.d.ts +0 -77
  35. package/dist/src/components/core/button.d.ts.map +0 -1
  36. package/dist/src/components/core/button.jsx +0 -79
  37. package/dist/src/components/core/heading.d.ts +0 -3
  38. package/dist/src/components/core/heading.d.ts.map +0 -1
  39. package/dist/src/components/core/heading.jsx +0 -4
  40. package/dist/src/components/core/polymorph.d.ts +0 -10
  41. package/dist/src/components/core/polymorph.d.ts.map +0 -1
  42. package/dist/src/components/core/polymorph.jsx +0 -5
  43. package/dist/src/components/core/render-on-view.d.ts +0 -7
  44. package/dist/src/components/core/render-on-view.d.ts.map +0 -1
  45. package/dist/src/components/core/render-on-view.jsx +0 -31
  46. package/dist/src/components/core/resizable.d.ts +0 -3
  47. package/dist/src/components/core/resizable.d.ts.map +0 -1
  48. package/dist/src/components/core/resizable.jsx +0 -51
  49. package/dist/src/components/core/slot.d.ts +0 -16
  50. package/dist/src/components/core/slot.d.ts.map +0 -1
  51. package/dist/src/components/core/slot.jsx +0 -156
  52. package/dist/src/components/core/tag.d.ts +0 -35
  53. package/dist/src/components/core/tag.d.ts.map +0 -1
  54. package/dist/src/components/core/tag.jsx +0 -53
  55. package/dist/src/components/core/typography.d.ts +0 -25
  56. package/dist/src/components/core/typography.d.ts.map +0 -1
  57. package/dist/src/components/core/typography.jsx +0 -20
  58. package/dist/src/components/display/alert.d.ts +0 -28
  59. package/dist/src/components/display/alert.d.ts.map +0 -1
  60. package/dist/src/components/display/alert.jsx +0 -61
  61. package/dist/src/components/display/calendar.d.ts +0 -42
  62. package/dist/src/components/display/calendar.d.ts.map +0 -1
  63. package/dist/src/components/display/calendar.jsx +0 -318
  64. package/dist/src/components/display/card.d.ts +0 -29
  65. package/dist/src/components/display/card.d.ts.map +0 -1
  66. package/dist/src/components/display/card.jsx +0 -43
  67. package/dist/src/components/display/empty.d.ts +0 -8
  68. package/dist/src/components/display/empty.d.ts.map +0 -1
  69. package/dist/src/components/display/empty.jsx +0 -11
  70. package/dist/src/components/display/list.d.ts +0 -16
  71. package/dist/src/components/display/list.d.ts.map +0 -1
  72. package/dist/src/components/display/list.jsx +0 -85
  73. package/dist/src/components/display/notifications.d.ts +0 -27
  74. package/dist/src/components/display/notifications.d.ts.map +0 -1
  75. package/dist/src/components/display/notifications.jsx +0 -130
  76. package/dist/src/components/display/progress.d.ts +0 -16
  77. package/dist/src/components/display/progress.d.ts.map +0 -1
  78. package/dist/src/components/display/progress.jsx +0 -21
  79. package/dist/src/components/display/shortcut.d.ts +0 -4
  80. package/dist/src/components/display/shortcut.d.ts.map +0 -1
  81. package/dist/src/components/display/shortcut.jsx +0 -23
  82. package/dist/src/components/display/skeleton.d.ts +0 -12
  83. package/dist/src/components/display/skeleton.d.ts.map +0 -1
  84. package/dist/src/components/display/skeleton.jsx +0 -19
  85. package/dist/src/components/display/spinner.d.ts +0 -5
  86. package/dist/src/components/display/spinner.d.ts.map +0 -1
  87. package/dist/src/components/display/spinner.jsx +0 -11
  88. package/dist/src/components/display/stats.d.ts +0 -12
  89. package/dist/src/components/display/stats.d.ts.map +0 -1
  90. package/dist/src/components/display/stats.jsx +0 -16
  91. package/dist/src/components/display/step.d.ts +0 -24
  92. package/dist/src/components/display/step.d.ts.map +0 -1
  93. package/dist/src/components/display/step.jsx +0 -145
  94. package/dist/src/components/display/tabs.d.ts +0 -24
  95. package/dist/src/components/display/tabs.d.ts.map +0 -1
  96. package/dist/src/components/display/tabs.jsx +0 -125
  97. package/dist/src/components/display/timeline.d.ts +0 -10
  98. package/dist/src/components/display/timeline.d.ts.map +0 -1
  99. package/dist/src/components/display/timeline.jsx +0 -25
  100. package/dist/src/components/floating/command-palette.d.ts +0 -49
  101. package/dist/src/components/floating/command-palette.d.ts.map +0 -1
  102. package/dist/src/components/floating/command-palette.jsx +0 -223
  103. package/dist/src/components/floating/dropdown.d.ts +0 -15
  104. package/dist/src/components/floating/dropdown.d.ts.map +0 -1
  105. package/dist/src/components/floating/dropdown.jsx +0 -56
  106. package/dist/src/components/floating/expand.d.ts +0 -11
  107. package/dist/src/components/floating/expand.d.ts.map +0 -1
  108. package/dist/src/components/floating/expand.jsx +0 -44
  109. package/dist/src/components/floating/menu.d.ts +0 -52
  110. package/dist/src/components/floating/menu.d.ts.map +0 -1
  111. package/dist/src/components/floating/menu.jsx +0 -165
  112. package/dist/src/components/floating/modal.d.ts +0 -60
  113. package/dist/src/components/floating/modal.d.ts.map +0 -1
  114. package/dist/src/components/floating/modal.jsx +0 -336
  115. package/dist/src/components/floating/toolbar.d.ts +0 -6
  116. package/dist/src/components/floating/toolbar.d.ts.map +0 -1
  117. package/dist/src/components/floating/toolbar.jsx +0 -5
  118. package/dist/src/components/floating/tooltip.d.ts +0 -17
  119. package/dist/src/components/floating/tooltip.d.ts.map +0 -1
  120. package/dist/src/components/floating/tooltip.jsx +0 -67
  121. package/dist/src/components/floating/wizard.d.ts +0 -26
  122. package/dist/src/components/floating/wizard.d.ts.map +0 -1
  123. package/dist/src/components/floating/wizard.jsx +0 -165
  124. package/dist/src/components/form/autocomplete.d.ts +0 -16
  125. package/dist/src/components/form/autocomplete.d.ts.map +0 -1
  126. package/dist/src/components/form/autocomplete.jsx +0 -290
  127. package/dist/src/components/form/checkbox.d.ts +0 -12
  128. package/dist/src/components/form/checkbox.d.ts.map +0 -1
  129. package/dist/src/components/form/checkbox.jsx +0 -12
  130. package/dist/src/components/form/date-picker.d.ts +0 -10
  131. package/dist/src/components/form/date-picker.d.ts.map +0 -1
  132. package/dist/src/components/form/date-picker.jsx +0 -115
  133. package/dist/src/components/form/file-upload.d.ts +0 -15
  134. package/dist/src/components/form/file-upload.d.ts.map +0 -1
  135. package/dist/src/components/form/file-upload.jsx +0 -138
  136. package/dist/src/components/form/form.d.ts +0 -3
  137. package/dist/src/components/form/form.d.ts.map +0 -1
  138. package/dist/src/components/form/form.jsx +0 -10
  139. package/dist/src/components/form/formReset.d.ts +0 -2
  140. package/dist/src/components/form/formReset.d.ts.map +0 -1
  141. package/dist/src/components/form/formReset.jsx +0 -17
  142. package/dist/src/components/form/free-text.d.ts +0 -11
  143. package/dist/src/components/form/free-text.d.ts.map +0 -1
  144. package/dist/src/components/form/free-text.jsx +0 -41
  145. package/dist/src/components/form/input-field.d.ts +0 -34
  146. package/dist/src/components/form/input-field.d.ts.map +0 -1
  147. package/dist/src/components/form/input-field.jsx +0 -58
  148. package/dist/src/components/form/input.d.ts +0 -52
  149. package/dist/src/components/form/input.d.ts.map +0 -1
  150. package/dist/src/components/form/input.jsx +0 -36
  151. package/dist/src/components/form/multi-select.d.ts +0 -19
  152. package/dist/src/components/form/multi-select.d.ts.map +0 -1
  153. package/dist/src/components/form/multi-select.jsx +0 -344
  154. package/dist/src/components/form/radiobox.d.ts +0 -7
  155. package/dist/src/components/form/radiobox.d.ts.map +0 -1
  156. package/dist/src/components/form/radiobox.jsx +0 -6
  157. package/dist/src/components/form/select.d.ts +0 -13
  158. package/dist/src/components/form/select.d.ts.map +0 -1
  159. package/dist/src/components/form/select.jsx +0 -44
  160. package/dist/src/components/form/slider.d.ts +0 -7
  161. package/dist/src/components/form/slider.d.ts.map +0 -1
  162. package/dist/src/components/form/slider.jsx +0 -45
  163. package/dist/src/components/form/switch.d.ts +0 -9
  164. package/dist/src/components/form/switch.d.ts.map +0 -1
  165. package/dist/src/components/form/switch.jsx +0 -46
  166. package/dist/src/components/form/task-list.d.ts +0 -3
  167. package/dist/src/components/form/task-list.d.ts.map +0 -1
  168. package/dist/src/components/form/task-list.jsx +0 -26
  169. package/dist/src/components/form/textarea.d.ts +0 -5
  170. package/dist/src/components/form/textarea.d.ts.map +0 -1
  171. package/dist/src/components/form/textarea.jsx +0 -26
  172. package/dist/src/components/index.d.ts +0 -45
  173. package/dist/src/components/index.d.ts.map +0 -1
  174. package/dist/src/components/index.js +0 -44
  175. package/dist/src/components/page-calendar/calendar-header.d.ts +0 -16
  176. package/dist/src/components/page-calendar/calendar-header.d.ts.map +0 -1
  177. package/dist/src/components/page-calendar/calendar-header.jsx +0 -83
  178. package/dist/src/components/page-calendar/day-view.d.ts +0 -12
  179. package/dist/src/components/page-calendar/day-view.d.ts.map +0 -1
  180. package/dist/src/components/page-calendar/day-view.jsx +0 -89
  181. package/dist/src/components/page-calendar/event-pill.d.ts +0 -9
  182. package/dist/src/components/page-calendar/event-pill.d.ts.map +0 -1
  183. package/dist/src/components/page-calendar/event-pill.jsx +0 -25
  184. package/dist/src/components/page-calendar/index.d.ts +0 -4
  185. package/dist/src/components/page-calendar/index.d.ts.map +0 -1
  186. package/dist/src/components/page-calendar/index.js +0 -2
  187. package/dist/src/components/page-calendar/month-view.d.ts +0 -11
  188. package/dist/src/components/page-calendar/month-view.d.ts.map +0 -1
  189. package/dist/src/components/page-calendar/month-view.jsx +0 -46
  190. package/dist/src/components/page-calendar/page-calendar.d.ts +0 -18
  191. package/dist/src/components/page-calendar/page-calendar.d.ts.map +0 -1
  192. package/dist/src/components/page-calendar/page-calendar.jsx +0 -41
  193. package/dist/src/components/page-calendar/page-calendar.types.d.ts +0 -18
  194. package/dist/src/components/page-calendar/page-calendar.types.d.ts.map +0 -1
  195. package/dist/src/components/page-calendar/page-calendar.types.js +0 -1
  196. package/dist/src/components/page-calendar/page-calendar.utils.d.ts +0 -24
  197. package/dist/src/components/page-calendar/page-calendar.utils.d.ts.map +0 -1
  198. package/dist/src/components/page-calendar/page-calendar.utils.js +0 -93
  199. package/dist/src/components/page-calendar/week-view.d.ts +0 -11
  200. package/dist/src/components/page-calendar/week-view.d.ts.map +0 -1
  201. package/dist/src/components/page-calendar/week-view.jsx +0 -66
  202. package/dist/src/components/table/filter.d.ts +0 -42
  203. package/dist/src/components/table/filter.d.ts.map +0 -1
  204. package/dist/src/components/table/filter.jsx +0 -169
  205. package/dist/src/components/table/group.d.ts +0 -17
  206. package/dist/src/components/table/group.d.ts.map +0 -1
  207. package/dist/src/components/table/group.jsx +0 -75
  208. package/dist/src/components/table/index.d.ts +0 -19
  209. package/dist/src/components/table/index.d.ts.map +0 -1
  210. package/dist/src/components/table/index.jsx +0 -63
  211. package/dist/src/components/table/inner-table.d.ts +0 -29
  212. package/dist/src/components/table/inner-table.d.ts.map +0 -1
  213. package/dist/src/components/table/inner-table.jsx +0 -102
  214. package/dist/src/components/table/metadata.d.ts +0 -4
  215. package/dist/src/components/table/metadata.d.ts.map +0 -1
  216. package/dist/src/components/table/metadata.jsx +0 -36
  217. package/dist/src/components/table/pagination.d.ts +0 -5
  218. package/dist/src/components/table/pagination.d.ts.map +0 -1
  219. package/dist/src/components/table/pagination.jsx +0 -74
  220. package/dist/src/components/table/row.d.ts +0 -11
  221. package/dist/src/components/table/row.d.ts.map +0 -1
  222. package/dist/src/components/table/row.jsx +0 -49
  223. package/dist/src/components/table/sort.d.ts +0 -28
  224. package/dist/src/components/table/sort.d.ts.map +0 -1
  225. package/dist/src/components/table/sort.jsx +0 -109
  226. package/dist/src/components/table/table-lib.d.ts +0 -135
  227. package/dist/src/components/table/table-lib.d.ts.map +0 -1
  228. package/dist/src/components/table/table-lib.js +0 -83
  229. package/dist/src/components/table/table.context.d.ts +0 -10
  230. package/dist/src/components/table/table.context.d.ts.map +0 -1
  231. package/dist/src/components/table/table.context.jsx +0 -5
  232. package/dist/src/components/table/thead.d.ts +0 -9
  233. package/dist/src/components/table/thead.d.ts.map +0 -1
  234. package/dist/src/components/table/thead.jsx +0 -103
  235. package/dist/src/config/context.d.ts +0 -21
  236. package/dist/src/config/context.d.ts.map +0 -1
  237. package/dist/src/config/context.js +0 -12
  238. package/dist/src/config/default-translations.d.ts +0 -94
  239. package/dist/src/config/default-translations.d.ts.map +0 -1
  240. package/dist/src/config/default-translations.jsx +0 -87
  241. package/dist/src/config/default-tweaks.d.ts +0 -13
  242. package/dist/src/config/default-tweaks.d.ts.map +0 -1
  243. package/dist/src/config/default-tweaks.js +0 -4
  244. package/dist/src/constants.d.ts +0 -3
  245. package/dist/src/constants.d.ts.map +0 -1
  246. package/dist/src/constants.js +0 -2
  247. package/dist/src/hooks/use-click-outside.d.ts +0 -3
  248. package/dist/src/hooks/use-click-outside.d.ts.map +0 -1
  249. package/dist/src/hooks/use-click-outside.js +0 -17
  250. package/dist/src/hooks/use-color-parser.d.ts +0 -2
  251. package/dist/src/hooks/use-color-parser.d.ts.map +0 -1
  252. package/dist/src/hooks/use-color-parser.js +0 -9
  253. package/dist/src/hooks/use-components-provider.d.ts +0 -15
  254. package/dist/src/hooks/use-components-provider.d.ts.map +0 -1
  255. package/dist/src/hooks/use-components-provider.jsx +0 -22
  256. package/dist/src/hooks/use-debounce.d.ts +0 -5
  257. package/dist/src/hooks/use-debounce.d.ts.map +0 -1
  258. package/dist/src/hooks/use-debounce.js +0 -12
  259. package/dist/src/hooks/use-floating-ref.d.ts +0 -2
  260. package/dist/src/hooks/use-floating-ref.d.ts.map +0 -1
  261. package/dist/src/hooks/use-floating-ref.js +0 -6
  262. package/dist/src/hooks/use-form.d.ts +0 -394
  263. package/dist/src/hooks/use-form.d.ts.map +0 -1
  264. package/dist/src/hooks/use-form.js +0 -563
  265. package/dist/src/hooks/use-hover.d.ts +0 -3
  266. package/dist/src/hooks/use-hover.d.ts.map +0 -1
  267. package/dist/src/hooks/use-hover.js +0 -18
  268. package/dist/src/hooks/use-input-id.d.ts +0 -4
  269. package/dist/src/hooks/use-input-id.d.ts.map +0 -1
  270. package/dist/src/hooks/use-input-id.js +0 -5
  271. package/dist/src/hooks/use-is-coarse-device.d.ts +0 -2
  272. package/dist/src/hooks/use-is-coarse-device.d.ts.map +0 -1
  273. package/dist/src/hooks/use-is-coarse-device.js +0 -12
  274. package/dist/src/hooks/use-locale.d.ts +0 -3
  275. package/dist/src/hooks/use-locale.d.ts.map +0 -1
  276. package/dist/src/hooks/use-locale.js +0 -10
  277. package/dist/src/hooks/use-media-query.d.ts +0 -2
  278. package/dist/src/hooks/use-media-query.d.ts.map +0 -1
  279. package/dist/src/hooks/use-media-query.js +0 -25
  280. package/dist/src/hooks/use-on-event.d.ts +0 -4
  281. package/dist/src/hooks/use-on-event.d.ts.map +0 -1
  282. package/dist/src/hooks/use-on-event.js +0 -10
  283. package/dist/src/hooks/use-parent.d.ts +0 -3
  284. package/dist/src/hooks/use-parent.d.ts.map +0 -1
  285. package/dist/src/hooks/use-parent.js +0 -21
  286. package/dist/src/hooks/use-preferences.d.ts +0 -2
  287. package/dist/src/hooks/use-preferences.d.ts.map +0 -1
  288. package/dist/src/hooks/use-preferences.js +0 -23
  289. package/dist/src/hooks/use-previous.d.ts +0 -2
  290. package/dist/src/hooks/use-previous.d.ts.map +0 -1
  291. package/dist/src/hooks/use-previous.js +0 -9
  292. package/dist/src/hooks/use-reactive.d.ts +0 -2
  293. package/dist/src/hooks/use-reactive.d.ts.map +0 -1
  294. package/dist/src/hooks/use-reactive.js +0 -9
  295. package/dist/src/hooks/use-remove-scroll.d.ts +0 -4
  296. package/dist/src/hooks/use-remove-scroll.d.ts.map +0 -1
  297. package/dist/src/hooks/use-remove-scroll.js +0 -48
  298. package/dist/src/hooks/use-resize-observer.d.ts +0 -2
  299. package/dist/src/hooks/use-resize-observer.d.ts.map +0 -1
  300. package/dist/src/hooks/use-resize-observer.js +0 -17
  301. package/dist/src/hooks/use-stable-ref.d.ts +0 -2
  302. package/dist/src/hooks/use-stable-ref.d.ts.map +0 -1
  303. package/dist/src/hooks/use-stable-ref.js +0 -9
  304. package/dist/src/hooks/use-swipe.d.ts +0 -8
  305. package/dist/src/hooks/use-swipe.d.ts.map +0 -1
  306. package/dist/src/hooks/use-swipe.js +0 -17
  307. package/dist/src/hooks/use-translations.d.ts +0 -92
  308. package/dist/src/hooks/use-translations.d.ts.map +0 -1
  309. package/dist/src/hooks/use-translations.js +0 -9
  310. package/dist/src/hooks/use-tweaks.d.ts +0 -3
  311. package/dist/src/hooks/use-tweaks.d.ts.map +0 -1
  312. package/dist/src/hooks/use-tweaks.js +0 -9
  313. package/dist/src/hooks/use-window-size.d.ts +0 -5
  314. package/dist/src/hooks/use-window-size.d.ts.map +0 -1
  315. package/dist/src/hooks/use-window-size.js +0 -14
  316. package/dist/src/index.d.ts +0 -22
  317. package/dist/src/index.d.ts.map +0 -1
  318. package/dist/src/index.js +0 -20
  319. package/dist/src/lib/combi-keys.d.ts +0 -15
  320. package/dist/src/lib/combi-keys.d.ts.map +0 -1
  321. package/dist/src/lib/combi-keys.js +0 -60
  322. package/dist/src/lib/dict.d.ts +0 -9
  323. package/dist/src/lib/dict.d.ts.map +0 -1
  324. package/dist/src/lib/dict.js +0 -28
  325. package/dist/src/lib/dom.d.ts +0 -20
  326. package/dist/src/lib/dom.d.ts.map +0 -1
  327. package/dist/src/lib/dom.js +0 -185
  328. package/dist/src/lib/fns.d.ts +0 -11
  329. package/dist/src/lib/fns.d.ts.map +0 -1
  330. package/dist/src/lib/fns.js +0 -46
  331. package/dist/src/lib/fzf.d.ts +0 -16
  332. package/dist/src/lib/fzf.d.ts.map +0 -1
  333. package/dist/src/lib/fzf.js +0 -115
  334. package/dist/src/lib/keyboard-area.d.ts +0 -16
  335. package/dist/src/lib/keyboard-area.d.ts.map +0 -1
  336. package/dist/src/lib/keyboard-area.js +0 -14
  337. package/dist/src/styles/common.d.ts +0 -8
  338. package/dist/src/styles/common.d.ts.map +0 -1
  339. package/dist/src/styles/common.js +0 -20
  340. package/dist/src/styles/components.d.ts +0 -3
  341. package/dist/src/styles/components.d.ts.map +0 -1
  342. package/dist/src/styles/components.js +0 -397
  343. package/dist/src/styles/dark.d.ts +0 -3
  344. package/dist/src/styles/dark.d.ts.map +0 -1
  345. package/dist/src/styles/dark.js +0 -217
  346. package/dist/src/styles/default-tokens.d.ts +0 -74
  347. package/dist/src/styles/default-tokens.d.ts.map +0 -1
  348. package/dist/src/styles/default-tokens.js +0 -41
  349. package/dist/src/styles/design-tokens.d.ts +0 -29
  350. package/dist/src/styles/design-tokens.d.ts.map +0 -1
  351. package/dist/src/styles/design-tokens.js +0 -73
  352. package/dist/src/styles/light.d.ts +0 -3
  353. package/dist/src/styles/light.d.ts.map +0 -1
  354. package/dist/src/styles/light.js +0 -217
  355. package/dist/src/styles/theme.d.ts +0 -3
  356. package/dist/src/styles/theme.d.ts.map +0 -1
  357. package/dist/src/styles/theme.js +0 -4
  358. package/dist/src/styles/theme.types.d.ts +0 -540
  359. package/dist/src/styles/theme.types.d.ts.map +0 -1
  360. package/dist/src/styles/theme.types.js +0 -1
  361. package/dist/src/types.d.ts +0 -26
  362. package/dist/src/types.d.ts.map +0 -1
  363. package/dist/src/types.js +0 -1
  364. package/dist/tsconfig.lib.tsbuildinfo +0 -1
  365. package/dist/with-selector-BAUQ-vKK.js +0 -187
  366. package/dist/with-selector-BAUQ-vKK.js.map +0 -1
@@ -1,115 +0,0 @@
1
- "use client";
2
- import { format, isValid, parse, startOfDay } from "date-fns";
3
- import { CalendarIcon } from "@phosphor-icons/react";
4
- import React, { forwardRef, Fragment, useEffect, useId, useMemo, useState } from "react";
5
- import { Is } from "sidekicker";
6
- import { useLocale } from "../../hooks/use-locale";
7
- import { useTranslations } from "../../hooks/use-translations";
8
- import { Calendar } from "../display/calendar";
9
- import { Dropdown } from "../floating/dropdown";
10
- import { Input } from "./input";
11
- const fixedDate = new Date(1970, 11, 31);
12
- const parts = {
13
- year: () => [/\d/, /\d/, /\d/, /\d/],
14
- month: () => [/\d/, /\d/],
15
- day: () => [/\d/, /\d/],
16
- hour: () => [/\d/, /\d/],
17
- minute: () => [/\d/, /\d/],
18
- literal: (str) => str.split(""),
19
- };
20
- const placeholders = {
21
- day: () => "dd",
22
- hour: () => "HH",
23
- month: () => "MM",
24
- minute: () => "mm",
25
- year: () => "yyyy",
26
- literal: (str) => str,
27
- };
28
- const partValues = {
29
- literal: (_, str) => str,
30
- year: (date) => date.getFullYear().toString(),
31
- day: (date) => date.getDate().toString().padStart(2, "0"),
32
- hour: (date) => date.getHours().toString().padStart(2, "0"),
33
- minute: (date) => date.getMinutes().toString().padStart(2, "0"),
34
- month: (date) => (date.getMonth() + 1).toString().padStart(2, "0"),
35
- };
36
- const formatParts = (datetimeFormat, date) => {
37
- try {
38
- return datetimeFormat.formatToParts(date).map((x) => {
39
- if (x.type === "literal" && x.value === ", ") {
40
- return { type: x.type, value: " " };
41
- }
42
- return x;
43
- });
44
- }
45
- catch {
46
- return [];
47
- }
48
- };
49
- const DATE_TIME_FORMAT = { day: "numeric", month: "numeric", year: "numeric", hour: "numeric", minute: "numeric" };
50
- const DATE_FORMAT = { day: "numeric", month: "numeric", year: "numeric" };
51
- export const DatePicker = forwardRef(({ date, locale: inputLocal, disabledDate, onChange, markToday, clickToClose, floating = true, type, ...props }, externalRef) => {
52
- const locale = useLocale(inputLocal);
53
- const labelId = useId();
54
- const translation = useTranslations();
55
- const datetimeFormat = useMemo(() => new Intl.DateTimeFormat(locale, type === "datetime" ? DATE_TIME_FORMAT : DATE_FORMAT), [locale, type]);
56
- const [innerDate, setInnerDate] = useState(date || undefined);
57
- const [open, setOpen] = useState(false);
58
- const mask = formatParts(datetimeFormat, fixedDate).flatMap((x) => Is.keyof(parts, x.type) ? parts[x.type](x.value) : []);
59
- const placeholder = useMemo(() => {
60
- return formatParts(datetimeFormat, fixedDate).reduce((acc, x) => acc + (Is.keyof(placeholders, x.type) ? placeholders[x.type](x.value) : ""), "");
61
- }, [datetimeFormat]);
62
- const isoDateEffect = date?.toISOString();
63
- const [value, setValue] = useState(!innerDate
64
- ? ""
65
- : formatParts(datetimeFormat, innerDate).reduce((acc, x) => acc + (Is.keyof(parts, x.type) ? partValues[x.type](innerDate, x.value) : ""), ""));
66
- const onChangeDateInput = (e) => {
67
- const v = e.target.value;
68
- setValue(v);
69
- if (mask.length === v.length) {
70
- const matches = mask.every((x, i) => {
71
- const c = v.charAt(i);
72
- return typeof x === "string" ? c === x : x.test(c);
73
- });
74
- if (matches) {
75
- const parsed = parse(v, placeholder, new Date());
76
- const d = type === "datetime" ? parsed : startOfDay(parsed);
77
- setInnerDate(d);
78
- return onChange?.(d);
79
- }
80
- }
81
- setInnerDate(undefined);
82
- return onChange?.(undefined);
83
- };
84
- useEffect(() => {
85
- if (isValid(date)) {
86
- setInnerDate(date);
87
- setValue(format(date, placeholder));
88
- }
89
- }, [isoDateEffect, placeholder, date]);
90
- const onChangeDate = (d) => {
91
- setInnerDate(d);
92
- onChange?.(d);
93
- if (clickToClose)
94
- setOpen(false);
95
- if (d)
96
- return setValue(format(d, placeholder));
97
- return setValue("");
98
- };
99
- const validDate = isValid(innerDate);
100
- const htmlValue = validDate ? innerDate.toISOString() : undefined;
101
- const CalendarComponent = (<Calendar {...props} type={type} locale={locale} changeOnlyOnClick markToday={markToday} onChange={onChangeDate} disabledDate={disabledDate} date={validDate ? innerDate : undefined}/>);
102
- return (<Fragment>
103
- <Input {...props} mask={mask} value={value} id={undefined} name={undefined} data-value={htmlValue} formNoValidate={!open} data-target={props.name} data-component="date-picker" onChange={onChangeDateInput} required={props.required ?? true} error={open ? undefined : props.error} placeholder={props.placeholder || translation.datepickerPlaceholder(placeholder)} right={floating ? (<Fragment>
104
- <input data-origin={props.name} defaultValue={htmlValue} form={props.form} hidden id={props.name} name={props.name} ref={externalRef} type="date"/>
105
- <Dropdown open={open} onChange={setOpen} buttonProps={{ "aria-describedby": labelId }} trigger={<span aria-labelledby={labelId}>
106
- <span id={labelId} className="sr-only">
107
- {translation.datePickerCalendarButtonLabel}
108
- </span>
109
- <CalendarIcon />
110
- </span>}>
111
- {CalendarComponent}
112
- </Dropdown>
113
- </Fragment>) : null}/>
114
- </Fragment>);
115
- });
@@ -1,15 +0,0 @@
1
- import React from "react";
2
- import { DropzoneProps } from "react-dropzone";
3
- import { Override } from "sidekicker";
4
- type Props = Override<React.ComponentProps<"input">, DropzoneProps> & {
5
- files?: File[];
6
- idle?: React.ReactElement;
7
- File?: React.FC<{
8
- file: File;
9
- }>;
10
- onDrop?: (file: File[]) => void;
11
- onDeleteFile?: (file: File) => void;
12
- };
13
- export declare const FileUpload: ({ idle, onDeleteFile, File, onDrop, ...props }: Props) => React.JSX.Element;
14
- export {};
15
- //# sourceMappingURL=file-upload.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"file-upload.d.ts","sourceRoot":"","sources":["../../../../src/components/form/file-upload.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAmE,MAAM,OAAO,CAAC;AACxF,OAAO,EAAE,aAAa,EAAe,MAAM,gBAAgB,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAatC,KAAK,KAAK,GAAG,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,EAAE,aAAa,CAAC,GAAG;IAClE,KAAK,CAAC,EAAE,IAAI,EAAE,CAAC;IACf,IAAI,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC;IAC1B,IAAI,CAAC,EAAE,KAAK,CAAC,EAAE,CAAC;QAAE,IAAI,EAAE,IAAI,CAAA;KAAE,CAAC,CAAC;IAChC,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,IAAI,CAAC;IAChC,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;CACvC,CAAC;AAoJF,eAAO,MAAM,UAAU,GAAI,gDAA8D,KAAK,sBAiC7F,CAAC"}
@@ -1,138 +0,0 @@
1
- "use client";
2
- import { WaveformIcon, FileIcon, FileCodeIcon, FileTextIcon, FileVideoIcon, FolderIcon, FolderOpenIcon, TableIcon, XIcon, } from "@phosphor-icons/react";
3
- import prettyBytes from "pretty-bytes";
4
- import React, { createContext, Fragment, useContext, useEffect, useState } from "react";
5
- import { useDropzone } from "react-dropzone";
6
- import { useTranslations } from "../../hooks/use-translations";
7
- import { Modal } from "../floating/modal";
8
- const Context = createContext([null, () => { }]);
9
- const useFileManager = () => useContext(Context);
10
- const getMimeType = (file) => {
11
- if (file.type.startsWith("image/"))
12
- return "img";
13
- if (file.type.startsWith("audio/"))
14
- return "audio";
15
- if (file.type.startsWith("video/"))
16
- return "video";
17
- return file.type;
18
- };
19
- const extensionMap = {
20
- csv: TableIcon,
21
- xls: TableIcon,
22
- mov: FileVideoIcon,
23
- mp4: FileVideoIcon,
24
- xlsx: TableIcon,
25
- pdf: FileTextIcon,
26
- txt: FileTextIcon,
27
- json: FileCodeIcon,
28
- mp3: WaveformIcon,
29
- };
30
- const ItemViewer = (props) => {
31
- const [, setManager] = useFileManager();
32
- const [info, setInfo] = useState({ url: "", type: "", size: "" });
33
- useEffect(() => {
34
- const file = props.file;
35
- const url = URL.createObjectURL(file);
36
- setInfo({ url, type: getMimeType(file), size: prettyBytes(file.size) });
37
- return () => URL.revokeObjectURL(url);
38
- }, [props.file]);
39
- const onViewFile = (e) => {
40
- e.stopPropagation();
41
- e.preventDefault();
42
- setManager({ ...info, file: props.file });
43
- };
44
- const onDeleteFile = (e) => {
45
- e.preventDefault();
46
- e.stopPropagation();
47
- props.onDeleteFile?.(props.file);
48
- };
49
- const fileName = props.file.name;
50
- const Icon = extensionMap[props.file.name.split(".").at(-1)] ?? FileIcon;
51
- const Element = info.type === "img" ? <img src={info.url} className="w-full object-contain" alt={props.file.name}/> : <Icon size={48}/>;
52
- return (<li className="flex w-full flex-row justify-between gap-file-upload-gap border-b border-card-border last:border-b-transparent">
53
- <div className="flex flex-col gap-file-upload-gap">
54
- <div className="flex flex-row items-center gap-file-upload-gap">
55
- <button type="button" onClick={onViewFile} aria-label={`View ${fileName}`} className="m-2 flex size-file-upload-thumb-size items-center justify-center overflow-hidden">
56
- {Element}
57
- </button>
58
- <div className="flex flex-col items-start justify-start text-left">
59
- <span>{props.file.name}</span>
60
- <span className="text-file-upload-text-size italic">{info.size}</span>
61
- </div>
62
- </div>
63
- {props.File ? (<div className="min-w-full flex-1">
64
- <props.File file={props.file}/>
65
- </div>) : null}
66
- </div>
67
- <div className="align-start flex justify-start py-file-upload-delete-py transition-colors duration-300 ease-linear hover:text-danger-hover">
68
- <button onClick={onDeleteFile} type="button" aria-label={`Remove ${fileName}`} className="flex size-6 items-center justify-center">
69
- <XIcon size={16} aria-hidden="true"/>
70
- </button>
71
- </div>
72
- </li>);
73
- };
74
- const FilesList = (props) => (<ul className="w-full space-y-8">
75
- {props.files.map((file) => {
76
- return <ItemViewer File={props.File} onDeleteFile={props.onDeleteFile} key={file.name} file={file}/>;
77
- })}
78
- </ul>);
79
- const Idle = (props) => {
80
- const t = useTranslations();
81
- const Icon = props.dragging ? FolderOpenIcon : FolderIcon;
82
- return (<div className="flex flex-col items-center justify-center">
83
- <div className="flex flex-col items-center justify-center gap-file-upload-inner-gap">
84
- <Icon className="text-primary" size={80}/>
85
- </div>
86
- <div className="my-file-upload-thumb-my flex flex-col items-center gap-file-upload-thumb-gap">
87
- <p>{t.uploadIdle}</p>
88
- <button className="text-primary underline" type="button">
89
- {t.uploadIdleButton}
90
- </button>
91
- </div>
92
- </div>);
93
- };
94
- const InteractiveArea = (props) => {
95
- if (props.isDragActive)
96
- return <Idle files={props.files} dragging/>;
97
- if (props.files.length > 0) {
98
- return <FilesList File={props.File} onDeleteFile={props.onDeleteFile} files={props.files}/>;
99
- }
100
- return <Fragment>{props.idle}</Fragment>;
101
- };
102
- const DefaultIdle = <Idle dragging={false}/>;
103
- const FileViewer = (props) => {
104
- const file = props.item.file;
105
- const type = props.item.type;
106
- return (<div className="flex flex-col gap-file-upload-gap">
107
- <p className="text-file-upload-text-name font-medium">{props.item.file.name}</p>
108
- <p className="text-file-upload-text-size">{props.item.size}</p>
109
- {type === "img" ? (<img className="container inline-block w-full max-w-96" src={props.item.url} alt={file.name}/>) : type === "video" ? (<video className="container block w-full max-w-96" src={props.item.url} controls muted/>) : type === "audio" ? (<figure>
110
- <audio controls src={props.item.url}>
111
- <track kind="captions"/>
112
- </audio>
113
- </figure>) : null}
114
- </div>);
115
- };
116
- export const FileUpload = ({ idle = DefaultIdle, onDeleteFile, File, onDrop, ...props }) => {
117
- const t = useTranslations();
118
- const state = useState(null);
119
- const [files, setFiles] = useState([]);
120
- const items = props.files ?? files;
121
- const close = () => state[1](null);
122
- const drop = (x) => {
123
- onDrop?.(x);
124
- setFiles((prev) => prev.concat(x));
125
- };
126
- const { getRootProps, getInputProps, isDragActive } = useDropzone({
127
- onDrop: drop,
128
- });
129
- return (<Context.Provider value={state}>
130
- <Modal overlayClickClose title={t.uploadDialogTitle} ariaTitle={t.uploadDialogTitle} open={state[0] !== null} onChange={close}>
131
- {state[0] ? <FileViewer item={state[0]}/> : null}
132
- </Modal>
133
- <div {...getRootProps()} aria-label={t.fileUploadZoneLabel} data-active={items ? items.length > 0 : false} className="flex flex-col items-center justify-center rounded-file-upload-radius border border-card-border p-file-upload-p text-foreground data-[active=true]:border-solid data-[active=false]:border-dashed data-[active=true]:border-transparent data-[active=true]:bg-card-background">
134
- <input {...getInputProps(props)} name={props.name} id={props.name}/>
135
- <InteractiveArea File={File} onDeleteFile={onDeleteFile} isDragActive={isDragActive} idle={idle} files={items}/>
136
- </div>
137
- </Context.Provider>);
138
- };
@@ -1,3 +0,0 @@
1
- import React from "react";
2
- export declare const Form: (props: React.ComponentProps<"form">) => React.JSX.Element;
3
- //# sourceMappingURL=form.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"form.d.ts","sourceRoot":"","sources":["../../../../src/components/form/form.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,eAAO,MAAM,IAAI,GAAI,OAAO,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,sBAOvD,CAAC"}
@@ -1,10 +0,0 @@
1
- "use client";
2
- import React from "react";
3
- export const Form = (props) => {
4
- const onSubmit = (e) => {
5
- e.persist();
6
- e.preventDefault();
7
- props.onSubmit?.(e);
8
- };
9
- return <form {...props} onSubmit={onSubmit}/>;
10
- };
@@ -1,2 +0,0 @@
1
- export declare const formReset: (form?: HTMLFormElement | null) => void;
2
- //# sourceMappingURL=formReset.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"formReset.d.ts","sourceRoot":"","sources":["../../../../src/components/form/formReset.tsx"],"names":[],"mappings":"AAEA,eAAO,MAAM,SAAS,GAAI,OAAO,eAAe,GAAG,IAAI,SAatD,CAAC"}
@@ -1,17 +0,0 @@
1
- const inputFields = ["INPUT", "SELECT"];
2
- export const formReset = (form) => {
3
- if (!form)
4
- return;
5
- const elements = Array.from(form.elements);
6
- elements.forEach((field) => {
7
- if (!inputFields.includes(field.tagName))
8
- return;
9
- if (field.tagName === "INPUT") {
10
- field.value = field.defaultValue;
11
- }
12
- if (field.tagName === "SELECT") {
13
- field.value = "";
14
- }
15
- field.setAttribute("data-initialized", "false");
16
- });
17
- };
@@ -1,11 +0,0 @@
1
- import MaskInput, { InputTypes } from "the-mask-input";
2
- import { Any, Override, ReactComponent } from "../../types";
3
- import { FeedbackProps, InputFieldProps } from "./input-field";
4
- type FreeTextTag = "input" | "textarea";
5
- export type FreeTextProps<T extends FreeTextTag, ExtraProps extends Any> = Override<InputFieldProps<T> & FeedbackProps & Partial<{
6
- next: string;
7
- type: InputTypes;
8
- }>, ExtraProps>;
9
- export declare const createFreeText: <const T extends FreeTextTag, const Html extends HTMLInputElement | HTMLTextAreaElement, Extra extends Any>(Element: "input" | "textarea" | typeof MaskInput, elementName: "input" | "textarea", defaultProps: FreeTextProps<T, Extra>, register?: (el: Html) => () => void) => ReactComponent<FreeTextProps<T, Extra>>;
10
- export {};
11
- //# sourceMappingURL=free-text.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"free-text.d.ts","sourceRoot":"","sources":["../../../../src/components/form/free-text.tsx"],"names":[],"mappings":"AAEA,OAAO,SAAS,EAAE,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAEvD,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAc,eAAe,EAAE,MAAM,eAAe,CAAC;AAE3E,KAAK,WAAW,GAAG,OAAO,GAAG,UAAU,CAAC;AAExC,MAAM,MAAM,aAAa,CAAC,CAAC,SAAS,WAAW,EAAE,UAAU,SAAS,GAAG,IAAI,QAAQ,CAC/E,eAAe,CAAC,CAAC,CAAC,GAAG,aAAa,GAAG,OAAO,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,UAAU,CAAA;CAAE,CAAC,EAChF,UAAU,CACb,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,KAAK,CAAC,CAAC,SAAS,WAAW,EAAE,KAAK,CAAC,IAAI,SAAS,gBAAgB,GAAG,mBAAmB,EAAE,KAAK,SAAS,GAAG,EACpI,SAAS,OAAO,GAAG,UAAU,GAAG,OAAO,SAAS,EAChD,aAAa,OAAO,GAAG,UAAU,EACjC,cAAc,aAAa,CAAC,CAAC,EAAE,KAAK,CAAC,EACrC,WAAW,CAAC,EAAE,EAAE,IAAI,KAAK,MAAM,IAAI,4CA2GtC,CAAC"}
@@ -1,41 +0,0 @@
1
- "use client";
2
- import React, { forwardRef, useEffect, useRef } from "react";
3
- import { css, initializeInputDataset, mergeRefs } from "../../lib/dom";
4
- import { InputField } from "./input-field";
5
- export const createFreeText = (Element, elementName, defaultProps, register) => {
6
- const FreeText = forwardRef(({ info, left, next, error, right, container, rightLabel, interactive, optionalText, type = "text", labelClassName, feedback = null, hideLeft = false, loading, hiddenLabel, ...props }, ref) => {
7
- const Render = Element;
8
- const id = props.id ?? props.name;
9
- const inputRef = useRef(null);
10
- useEffect(() => {
11
- if (inputRef.current === null)
12
- return;
13
- const input = inputRef.current;
14
- const focus = initializeInputDataset(inputRef.current);
15
- const registered = register?.(input);
16
- const goNextInputImpl = (e) => {
17
- const event = e;
18
- if (event.key === "Enter" && input.enterKeyHint === "next") {
19
- const focusNext = input.getAttribute("data-next");
20
- if (focusNext) {
21
- const el = document.getElementById(focusNext);
22
- if (el) {
23
- el.focus();
24
- return void event.preventDefault();
25
- }
26
- }
27
- }
28
- };
29
- input.addEventListener("keydown", goNextInputImpl);
30
- return () => {
31
- registered?.();
32
- focus();
33
- input.removeEventListener("keydown", goNextInputImpl);
34
- };
35
- }, []);
36
- return (<InputField {...defaultProps} info={info} left={left} error={error} right={right} form={props.form} loading={loading} name={props.name} feedback={feedback} hideLeft={hideLeft} title={props.title} rightLabel={rightLabel} disabled={props.disabled} hiddenLabel={hiddenLabel} interactive={interactive} required={props.required} componentName={elementName} id={props.name || props.id} optionalText={optionalText} labelClassName={labelClassName} placeholder={props.placeholder} container={css(container, defaultProps.container)}>
37
- <Render {...defaultProps} {...props} id={id} name={id} type={type} data-next={next} aria-busy={loading} aria-invalid={!!error} aria-disabled={props.disabled} aria-readonly={props.readOnly} aria-describedby={error ? `${id}-error` : undefined} ref={mergeRefs(ref, inputRef)} className={css("input placeholder-input-mask group h-input-height w-full flex-1", "rounded-input-radius bg-transparent px-input-padding-x py-input-padding-y text-input-text text-foreground", "outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary", "group-error:text-danger group-error:placeholder-input-mask-error", "resize-y group-focus-within:border-primary group-hover:border-primary", "disabled:cursor-not-allowed disabled:text-disabled", props.className)}/>
38
- </InputField>);
39
- });
40
- return FreeText;
41
- };
@@ -1,34 +0,0 @@
1
- import React, { type PropsWithChildren } from "react";
2
- import { type Label, Override } from "../../types";
3
- import { type PolymorphicProps } from "../core/polymorph";
4
- export type FeedbackProps = React.PropsWithChildren<Partial<{
5
- id: string;
6
- info: Label;
7
- title: Label;
8
- hideLeft: boolean;
9
- className: string;
10
- placeholder: string;
11
- reportStatus: boolean;
12
- hiddenLabel: boolean;
13
- }>>;
14
- export declare const InputFeedback: ({ reportStatus, id, hideLeft, className, info, children, title }: FeedbackProps) => React.JSX.Element;
15
- export type InputFieldProps<T extends "input" | "select" | "textarea"> = PolymorphicProps<Partial<Override<FeedbackProps, {
16
- id: string;
17
- info: Label;
18
- left: Label;
19
- name: string;
20
- right: Label;
21
- error: string;
22
- feedback: Label;
23
- loading: boolean;
24
- container: string;
25
- hideLeft: boolean;
26
- rightLabel: Label;
27
- placeholder: string;
28
- interactive: boolean;
29
- optionalText: string;
30
- componentName: string;
31
- labelClassName: string;
32
- }>>, T>;
33
- export declare const InputField: <T extends "input" | "select" | "textarea">(props: PropsWithChildren<InputFieldProps<T>>) => React.ReactElement;
34
- //# sourceMappingURL=input-field.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"input-field.d.ts","sourceRoot":"","sources":["../../../../src/components/form/input-field.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,EAAwB,KAAK,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAI5E,OAAO,EAAE,KAAK,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAG1D,MAAM,MAAM,aAAa,GAAG,KAAK,CAAC,iBAAiB,CAC/C,OAAO,CAAC;IACJ,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,KAAK,CAAC;IACZ,KAAK,EAAE,KAAK,CAAC;IACb,QAAQ,EAAE,OAAO,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,OAAO,CAAC;IACtB,WAAW,EAAE,OAAO,CAAC;CACxB,CAAC,CACL,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,kEAA0E,aAAa,sBA+CpH,CAAC;AAEF,MAAM,MAAM,eAAe,CAAC,CAAC,SAAS,OAAO,GAAG,QAAQ,GAAG,UAAU,IAAI,gBAAgB,CACrF,OAAO,CACH,QAAQ,CACJ,aAAa,EACb;IACI,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,KAAK,CAAC;IACZ,IAAI,EAAE,KAAK,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,KAAK,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,KAAK,CAAC;IAChB,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;IAClB,UAAU,EAAE,KAAK,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,OAAO,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,cAAc,EAAE,MAAM,CAAC;CAC1B,CACJ,CACJ,EACD,CAAC,CACJ,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,CAAC,CAAC,SAAS,OAAO,GAAG,QAAQ,GAAG,UAAU,EAAE,KAAK,EAAE,iBAAiB,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,KAAK,KAAK,CAAC,YAsGG,CAAC"}
@@ -1,58 +0,0 @@
1
- "use client";
2
- import { CheckCircleIcon, InfoIcon, XCircleIcon } from "@phosphor-icons/react";
3
- import React, { forwardRef, Fragment } from "react";
4
- import { useTranslations } from "../../hooks/use-translations";
5
- import { useTweaks } from "../../hooks/use-tweaks";
6
- import { css } from "../../lib/dom";
7
- import { Tooltip } from "../floating/tooltip";
8
- export const InputFeedback = ({ reportStatus, id, hideLeft = false, className, info, children, title }) => (<span className={css("w-full justify-between", hideLeft && children === null ? "hidden" : "flex", className)}>
9
- {hideLeft ? null : (<span className="flex items-center gap-1 transition-colors group-focus-within:text-primary group-hover:text-primary group-disabled:text-disabled group-error:text-danger">
10
- {title}
11
- {reportStatus || info ? (<span className="flex items-center justify-center gap-1">
12
- {info ? (<Tooltip as="button" type="button" aria-label={typeof info === "string" ? info : undefined} aria-describedby={typeof info === "string" ? undefined : id ? `tooltip-info-content-${id}` : undefined} title={<span className="cursor-help">
13
- <InfoIcon className="aspect-square size-3" aria-hidden="true" size={16}/>
14
- </span>}>
15
- <div id={id ? `tooltip-info-content-${id}` : undefined} className="w-full max-w-48 whitespace-break-spaces break-words">
16
- {info}
17
- </div>
18
- </Tooltip>) : null}
19
- {reportStatus ? (<span className="flex h-3 min-w-6 items-center">
20
- <CheckCircleIcon className="hidden aspect-square size-3 opacity-0 transition-opacity group-assert:block group-assert:text-success group-assert:opacity-100" aria-hidden="true" size={16}/>
21
- <XCircleIcon className="hidden aspect-square size-3 opacity-0 transition-opacity group-error:block group-error:opacity-100" aria-hidden="true" size={16}/>
22
- </span>) : null}
23
- </span>) : null}
24
- </span>)}
25
- {children}
26
- </span>);
27
- export const InputField = forwardRef(({ optionalText: _optionalText, left, rightLabel, container, feedback, interactive, right, info, children, error, form, id, labelClassName = "", name, title, componentName, placeholder, hideLeft = false, required, disabled, reportStatus, hiddenLabel, }, ref) => {
28
- const tweaks = useTweaks();
29
- const reportStatusDefault = reportStatus !== undefined ? reportStatus : tweaks.input.iconFeedback;
30
- const ID = id ?? name;
31
- const translation = useTranslations();
32
- const optionalText = _optionalText ?? translation.inputOptionalLabel;
33
- return (<fieldset ref={ref} form={form} disabled={disabled} data-error={!!error} aria-disabled={disabled} data-component={componentName} data-interactive={!!interactive} className={css("group flex min-h-0 min-w-0 max-w-full flex-col items-start", container)}>
34
- <label form={form} htmlFor={ID} className={css("relative inline-flex w-full max-w-full cursor-text flex-row flex-wrap justify-between gap-input-label-mb text-input-label-text transition-colors empty:hidden group-disabled:cursor-not-allowed group-error:text-danger")}>
35
- {hiddenLabel ? (<span className="sr-only">
36
- <InputFeedback info={info} hideLeft={hideLeft} reportStatus={reportStatusDefault} title={title} placeholder={placeholder}/>
37
- </span>) : (<InputFeedback info={info} title={title} hideLeft={hideLeft} placeholder={placeholder} reportStatus={reportStatusDefault}>
38
- {optionalText || rightLabel ? (<Fragment>
39
- {!required ? (<span aria-disabled={disabled} className="text-opacity-70 transition-colors group-focus-within:text-primary group-hover:text-primary aria-disabled:text-disabled">
40
- {optionalText}
41
- </span>) : null}
42
- {rightLabel ? <Fragment>{rightLabel}</Fragment> : null}
43
- </Fragment>) : null}
44
- </InputFeedback>)}
45
- <div className={css("group relative flex w-full flex-row flex-nowrap items-center gap-x-input-gap gap-y-input-inline rounded-input-radius border border-input-border bg-transparent transition-colors group-hover:border-primary group-disabled:border-disabled group-error:border-danger", labelClassName)}>
46
- {left ? <span className="flex flex-nowrap gap-input-slot-gap whitespace-nowrap pl-input-slot-pl">{left}</span> : null}
47
- {children}
48
- {right ? <span className="flex flex-nowrap gap-input-slot-gap whitespace-nowrap pr-input-slot-pr">{right}</span> : null}
49
- </div>
50
- </label>
51
- <p id={`${ID}-error`} role="alert" className="mt-input-hint-mt hidden whitespace-pre-wrap text-wrap text-input-hint-text empty:mt-0 empty:hidden group-has-[input:not(:focus):invalid[data-initialized=true]]:flex group-error:flex group-error:text-danger">
52
- {error}
53
- </p>
54
- <p className="mt-input-hint-mt text-input-hint-text empty:mt-0 empty:hidden group-has-[input:not(:focus):valid[data-initialized=true]]:block group-assert:block group-error:hidden">
55
- {feedback}
56
- </p>
57
- </fieldset>);
58
- }); // forwardRef return is non-generic; cast restores the polymorphic signature
@@ -1,52 +0,0 @@
1
- import { AllMasks, CurrencyCode, CurrencyInputProps, CurrencyMaskTypes, Locales, PercentInputMask, PercentInputProps, TheMaskProps } from "the-mask-input";
2
- import { FreeTextProps } from "./free-text";
3
- export type * from "the-mask-input";
4
- /**
5
- * Props for the Input component, extending FreeTextProps with mask functionality
6
- * Supports currency, percentage, and custom mask patterns
7
- */
8
- export type InputProps = FreeTextProps<"input", ({
9
- mask?: CurrencyMaskTypes;
10
- locale?: Locales;
11
- currency?: CurrencyCode | undefined;
12
- } & CurrencyInputProps) | ({
13
- mask?: PercentInputMask;
14
- locale?: Locales;
15
- currency?: undefined;
16
- } & PercentInputProps) | ({
17
- mask?: AllMasks | Array<string | RegExp> | ((p: string) => Array<string | RegExp> | AllMasks);
18
- locale?: undefined;
19
- currency?: undefined;
20
- } & TheMaskProps)>;
21
- /**
22
- * A text input component with advanced masking capabilities.
23
- *
24
- * Supports various input masks including:
25
- * - Currency formatting with locale support
26
- * - Percentage inputs
27
- * - Custom regex patterns
28
- * - Phone numbers, dates, and other formatted inputs
29
- *
30
- * @example
31
- * ```tsx
32
- * // Basic input
33
- * <Input placeholder="Enter text..." />
34
- *
35
- * // Phone number mask
36
- * <Input mask="(99) 99999-9999" placeholder="Phone" />
37
- *
38
- * // Currency input
39
- * <Input mask="currency" currency="USD" locale="en-US" />
40
- *
41
- * // Percentage input
42
- * <Input mask="percentage" />
43
- *
44
- * // Custom mask
45
- * <Input mask={["999.999.999-99"]} placeholder="CPF" />
46
- * ```
47
- *
48
- * @param props - Input props including mask, validation, and styling options
49
- * @returns A masked input component with form integration
50
- */
51
- export declare const Input: import("../..").ReactComponent<FreeTextProps<"input", InputProps>>;
52
- //# sourceMappingURL=input.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../../../src/components/form/input.tsx"],"names":[],"mappings":"AACA,OAAkB,EACd,QAAQ,EACR,YAAY,EACZ,kBAAkB,EAClB,iBAAiB,EACjB,OAAO,EACP,gBAAgB,EAChB,iBAAiB,EACjB,YAAY,EACf,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAkB,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5D,mBAAmB,gBAAgB,CAAC;AAEpC;;;GAGG;AACH,MAAM,MAAM,UAAU,GAAG,aAAa,CAClC,OAAO,EACL,CAAC;IACG,IAAI,CAAC,EAAE,iBAAiB,CAAC;IACzB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,YAAY,GAAG,SAAS,CAAC;CACvC,GAAG,kBAAkB,CAAC,GACvB,CAAC;IACG,IAAI,CAAC,EAAE,gBAAgB,CAAC;IACxB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACxB,GAAG,iBAAiB,CAAC,GACtB,CAAC;IACG,IAAI,CAAC,EAAE,QAAQ,GAAG,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,MAAM,KAAK,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,GAAG,QAAQ,CAAC,CAAC;IAC9F,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACxB,GAAG,YAAY,CAAC,CACtB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,eAAO,MAAM,KAAK,oEAEhB,CAAC"}
@@ -1,36 +0,0 @@
1
- "use client";
2
- import MaskInput from "the-mask-input";
3
- import { createFreeText } from "./free-text";
4
- /**
5
- * A text input component with advanced masking capabilities.
6
- *
7
- * Supports various input masks including:
8
- * - Currency formatting with locale support
9
- * - Percentage inputs
10
- * - Custom regex patterns
11
- * - Phone numbers, dates, and other formatted inputs
12
- *
13
- * @example
14
- * ```tsx
15
- * // Basic input
16
- * <Input placeholder="Enter text..." />
17
- *
18
- * // Phone number mask
19
- * <Input mask="(99) 99999-9999" placeholder="Phone" />
20
- *
21
- * // Currency input
22
- * <Input mask="currency" currency="USD" locale="en-US" />
23
- *
24
- * // Percentage input
25
- * <Input mask="percentage" />
26
- *
27
- * // Custom mask
28
- * <Input mask={["999.999.999-99"]} placeholder="CPF" />
29
- * ```
30
- *
31
- * @param props - Input props including mask, validation, and styling options
32
- * @returns A masked input component with form integration
33
- */
34
- export const Input = createFreeText(MaskInput, "input", {
35
- type: "text",
36
- });
@@ -1,19 +0,0 @@
1
- import React from "react";
2
- import { Label, Override } from "../../types";
3
- import { InputFieldProps } from "./input-field";
4
- import { type OptionProps } from "./select";
5
- export type MultiSelectItemProps = OptionProps & {
6
- Render?: React.FC<OptionProps>;
7
- };
8
- export type MultiSelectProps = Override<InputFieldProps<"input">, {
9
- title?: string;
10
- value?: string[];
11
- emptyMessage?: Label;
12
- selectedLabel?: string;
13
- defaultValue?: string[];
14
- dynamicOption?: boolean;
15
- options: MultiSelectItemProps[];
16
- onChangeOptions?: (options: string[]) => void;
17
- }>;
18
- export declare const MultiSelect: React.ForwardRefExoticComponent<Omit<MultiSelectProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
19
- //# sourceMappingURL=multi-select.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"multi-select.d.ts","sourceRoot":"","sources":["../../../../src/components/form/multi-select.tsx"],"names":[],"mappings":"AAkBA,OAAO,KAA6F,MAAM,OAAO,CAAC;AASlH,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAG9C,OAAO,EAAc,eAAe,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,UAAU,CAAC;AAE5C,MAAM,MAAM,oBAAoB,GAAG,WAAW,GAAG;IAC7C,MAAM,CAAC,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CAAC,CAAC;CAClC,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,QAAQ,CACnC,eAAe,CAAC,OAAO,CAAC,EACxB;IACI,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,YAAY,CAAC,EAAE,KAAK,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,OAAO,EAAE,oBAAoB,EAAE,CAAC;IAChC,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;CACjD,CACJ,CAAC;AA+DF,eAAO,MAAM,WAAW,wGAycvB,CAAC"}