@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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@g4rcez/components",
3
- "version": "5.0.0",
3
+ "version": "5.0.1",
4
4
  "private": false,
5
5
  "description": "Customizable react components.",
6
6
  "keywords": [
@@ -1,77 +0,0 @@
1
- import React, { PropsWithChildren } from "react";
2
- import { CvaVariants, type Label } from "../../types";
3
- import { PolymorphicProps } from "./polymorph";
4
- declare const variants: {
5
- size: {
6
- icon: string;
7
- big: string;
8
- default: string;
9
- min: string;
10
- tiny: string;
11
- small: string;
12
- };
13
- rounded: {
14
- rough: string;
15
- squared: string;
16
- default: string;
17
- circle: string;
18
- };
19
- theme: {
20
- raw: string;
21
- disabled: string;
22
- loading: string;
23
- main: string;
24
- info: string;
25
- warn: string;
26
- muted: string;
27
- danger: string;
28
- neutral: string;
29
- primary: string;
30
- success: string;
31
- secondary: string;
32
- "ghost-info": string;
33
- "ghost-warn": string;
34
- "ghost-danger": string;
35
- "ghost-primary": string;
36
- "ghost-success": string;
37
- "ghost-secondary": string;
38
- "ghost-muted": string;
39
- "ghost-neutral": string;
40
- };
41
- };
42
- type Variants = CvaVariants<typeof variants>;
43
- export type ButtonProps<T extends React.ElementType = "button"> = PropsWithChildren<PolymorphicProps<Variants & Partial<{
44
- /** Icon to display in the button */
45
- icon: Label;
46
- /** Whether the button is in a loading state */
47
- loading: boolean;
48
- }>, T>>;
49
- /**
50
- * A versatile button component with multiple variants, sizes, and states.
51
- *
52
- * @example
53
- * ```tsx
54
- * // Basic usage
55
- * <Button>Click me</Button>
56
- *
57
- * // With variants
58
- * <Button theme="primary" size="big">Primary Button</Button>
59
- *
60
- * // Loading state
61
- * <Button loading>Saving...</Button>
62
- *
63
- * // With icon
64
- * <Button icon={<Icon name="plus" />}>Add Item</Button>
65
- *
66
- * // As different element
67
- * <Button as="a" href="/link">Link Button</Button>
68
- * ```
69
- *
70
- * @template T - The HTML element type to render as
71
- * @param props - Button props including theme, size, loading state, etc.
72
- * @param ref - Forwarded ref to the button element
73
- * @returns A styled button component
74
- */
75
- export declare const Button: <T extends React.ElementType = "button">(_: ButtonProps<T>) => React.ReactNode;
76
- export {};
77
- //# sourceMappingURL=button.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../../src/components/core/button.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAc,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAE7D,OAAO,EAAE,WAAW,EAAE,KAAK,KAAK,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,EAAa,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE1D,QAAA,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsCb,CAAC;AAUF,KAAK,QAAQ,GAAG,WAAW,CAAC,OAAO,QAAQ,CAAC,CAAC;AAE7C,MAAM,MAAM,WAAW,CAAC,CAAC,SAAS,KAAK,CAAC,WAAW,GAAG,QAAQ,IAAI,iBAAiB,CAC/E,gBAAgB,CACZ,QAAQ,GACJ,OAAO,CAAC;IACJ,oCAAoC;IACpC,IAAI,EAAE,KAAK,CAAC;IACZ,+CAA+C;IAC/C,OAAO,EAAE,OAAO,CAAC;CACpB,CAAC,EACN,CAAC,CACJ,CACJ,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,eAAO,MAAM,MAAM,EAAE,CAAC,CAAC,SAAS,KAAK,CAAC,WAAW,GAAG,QAAQ,EAAE,CAAC,EAAE,WAAW,CAAC,CAAC,CAAC,KAAK,KAAK,CAAC,SAwBK,CAAC"}
@@ -1,79 +0,0 @@
1
- import { cva } from "class-variance-authority";
2
- import React, { forwardRef } from "react";
3
- import { css } from "../../lib/dom";
4
- import { Polymorph } from "./polymorph";
5
- const variants = {
6
- size: {
7
- icon: "p-button-padding-icon",
8
- big: "h-button-height-big px-button-padding-x-big py-button-padding-y-big",
9
- default: "h-button-height px-button-padding-x py-button-padding-y",
10
- min: "h-button-height-min px-button-padding-x-min py-button-padding-y-min text-typography-sm",
11
- tiny: "h-button-height-tiny px-button-padding-x-tiny py-button-padding-y-tiny text-typography-sm",
12
- small: "h-button-height-small px-button-padding-x-small py-button-padding-y-small text-typography-sm",
13
- },
14
- rounded: {
15
- rough: "rounded-button-radius-rough",
16
- squared: "rounded-button-radius-squared",
17
- default: "rounded-button-radius",
18
- circle: "rounded-full aspect-square",
19
- },
20
- theme: {
21
- raw: "",
22
- disabled: "bg-disabled opacity-70",
23
- loading: "animate-pulse bg-disabled",
24
- main: "bg-button-primary-bg text-button-primary-text",
25
- info: "bg-button-info-bg text-button-info-text",
26
- warn: "bg-button-warn-bg text-button-warn-text",
27
- muted: "bg-button-muted-bg text-button-muted-text",
28
- danger: "bg-button-danger-bg text-button-danger-text",
29
- neutral: "bg-transparent border-1 border-card-border",
30
- primary: "bg-button-primary-bg text-button-primary-text",
31
- success: "bg-button-success-bg text-button-success-text",
32
- secondary: "bg-button-secondary-bg text-button-secondary-text",
33
- "ghost-info": "bg-transparent hover:bg-info/20 border-0 border-transparent text-info",
34
- "ghost-warn": "bg-transparent hover:bg-warn/20 border-0 border-transparent text-warn",
35
- "ghost-danger": "bg-transparent hover:bg-danger/20 border-0 border-transparent text-danger",
36
- "ghost-primary": "bg-transparent hover:bg-primary/20 border-0 border-transparent text-primary",
37
- "ghost-success": "bg-transparent hover:bg-success/20 border-0 border-transparent text-success",
38
- "ghost-secondary": "bg-transparent hover:bg-secondary/20 border-0 border-transparent text-secondary",
39
- "ghost-muted": "bg-transparent hover:bg-muted/20 border-0 border-transparent text-muted-foreground",
40
- "ghost-neutral": "bg-transparent border-0 border-card-border",
41
- },
42
- };
43
- const buttonVariants = cva("relative inline-flex cursor-pointer items-center justify-center gap-button-gap overflow-hidden whitespace-nowrap align-middle font-medium transition-colors duration-300 ease-linear focus-visible:outline-none focus-visible:ring-4 focus-visible:ring-ring enabled:hover:bg-opacity-70 enabled:focus:bg-opacity-70 disabled:cursor-not-allowed disabled:bg-opacity-40 disabled:text-opacity-80 data-[loading=true]:animate-pulse data-[loading=true]:opacity-30", {
44
- variants,
45
- defaultVariants: { theme: "main", size: "default", rounded: "default" },
46
- });
47
- /**
48
- * A versatile button component with multiple variants, sizes, and states.
49
- *
50
- * @example
51
- * ```tsx
52
- * // Basic usage
53
- * <Button>Click me</Button>
54
- *
55
- * // With variants
56
- * <Button theme="primary" size="big">Primary Button</Button>
57
- *
58
- * // Loading state
59
- * <Button loading>Saving...</Button>
60
- *
61
- * // With icon
62
- * <Button icon={<Icon name="plus" />}>Add Item</Button>
63
- *
64
- * // As different element
65
- * <Button as="a" href="/link">Link Button</Button>
66
- * ```
67
- *
68
- * @template T - The HTML element type to render as
69
- * @param props - Button props including theme, size, loading state, etc.
70
- * @param ref - Forwarded ref to the button element
71
- * @returns A styled button component
72
- */
73
- export const Button = forwardRef(function Button({ className, icon, loading, theme, type = "button", size, rounded, ...props }, ref) {
74
- const disabled = loading || props.disabled;
75
- return (<Polymorph {...props} ref={ref} type={type} data-theme={theme} disabled={disabled} data-loading={loading} data-component="button" aria-disabled={disabled} as={props.as ?? "button"} aria-busy={loading} onClick={disabled ? undefined : props.onClick} className={css(buttonVariants({ size, rounded, theme }), className)}>
76
- {icon}
77
- {props.children}
78
- </Polymorph>);
79
- });
@@ -1,3 +0,0 @@
1
- import { PropsWithChildren } from "react";
2
- export declare const Heading: (props: PropsWithChildren) => import("react").JSX.Element;
3
- //# sourceMappingURL=heading.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"heading.d.ts","sourceRoot":"","sources":["../../../../src/components/core/heading.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAG1C,eAAO,MAAM,OAAO,GAAI,OAAO,iBAAiB,gCAE/C,CAAC"}
@@ -1,4 +0,0 @@
1
- import { Polymorph } from "./polymorph";
2
- export const Heading = (props) => {
3
- return <Polymorph as="h2">{props.children}</Polymorph>;
4
- };
@@ -1,10 +0,0 @@
1
- import type React from "react";
2
- type PropsOf<T extends React.ElementType> = React.ComponentPropsWithoutRef<T>;
3
- export type PolymorphicProps<Props, T extends React.ElementType> = Props & {
4
- as?: T;
5
- } & Omit<PropsOf<T>, keyof Props | "as" | "ref"> & {
6
- ref?: React.ComponentProps<T>["ref"];
7
- };
8
- export declare const Polymorph: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<React.ElementType<any, keyof React.JSX.IntrinsicElements>>>;
9
- export {};
10
- //# sourceMappingURL=polymorph.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"polymorph.d.ts","sourceRoot":"","sources":["../../../../src/components/core/polymorph.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,KAAK,OAAO,CAAC,CAAC,SAAS,KAAK,CAAC,WAAW,IAAI,KAAK,CAAC,wBAAwB,CAAC,CAAC,CAAC,CAAC;AAE9E,MAAM,MAAM,gBAAgB,CAAC,KAAK,EAAE,CAAC,SAAS,KAAK,CAAC,WAAW,IAAI,KAAK,GAAG;IACvE,EAAE,CAAC,EAAE,CAAC,CAAC;CACV,GAAG,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,MAAM,KAAK,GAAG,IAAI,GAAG,KAAK,CAAC,GAAG;IAC3C,GAAG,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;CACxC,CAAC;AAEN,eAAO,MAAM,SAAS,oIAGpB,CAAC"}
@@ -1,5 +0,0 @@
1
- import { forwardRef } from "react";
2
- export const Polymorph = forwardRef(function InnerPolymorph(props, ref) {
3
- const Element = props.as || "span";
4
- return <Element ref={ref} {...props} as={undefined}/>;
5
- });
@@ -1,7 +0,0 @@
1
- import React, { PropsWithChildren } from "react";
2
- import { PolymorphicProps } from "./polymorph";
3
- export type RenderOnViewProps<T extends React.ElementType = "div"> = PolymorphicProps<{
4
- onIntersection?: () => void;
5
- }, T>;
6
- export declare const RenderOnView: ({ children, ...props }: PropsWithChildren<RenderOnViewProps>) => React.JSX.Element;
7
- //# sourceMappingURL=render-on-view.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"render-on-view.d.ts","sourceRoot":"","sources":["../../../../src/components/core/render-on-view.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,iBAAiB,EAAqC,MAAM,OAAO,CAAC;AAEpF,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE/C,MAAM,MAAM,iBAAiB,CAAC,CAAC,SAAS,KAAK,CAAC,WAAW,GAAG,KAAK,IAAI,gBAAgB,CACjF;IACI,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;CAC/B,EACD,CAAC,CACJ,CAAC;AAYF,eAAO,MAAM,YAAY,GAAI,wBAAwB,iBAAiB,CAAC,iBAAiB,CAAC,sBAsBxF,CAAC"}
@@ -1,31 +0,0 @@
1
- "use client";
2
- import React, { useLayoutEffect, useRef, useState } from "react";
3
- import { useStableRef } from "../../hooks/use-stable-ref";
4
- function isInViewport(el) {
5
- const rect = el.getBoundingClientRect();
6
- return (rect.top >= 0 &&
7
- rect.left >= 0 &&
8
- rect.bottom <= (window.innerHeight || document.documentElement.clientHeight) &&
9
- rect.right <= (window.innerWidth || document.documentElement.clientWidth) /* or $(window).width() */);
10
- }
11
- export const RenderOnView = ({ children, ...props }) => {
12
- const onIntersect = useStableRef(props.onIntersection);
13
- const ref = useRef(null);
14
- const [shouldRender, setShouldRender] = useState(() => (ref.current === null ? false : isInViewport(ref.current)));
15
- useLayoutEffect(() => {
16
- const div = ref.current;
17
- if (div === null)
18
- return;
19
- const observer = new IntersectionObserver((args) => {
20
- const first = args[0];
21
- if (first.isIntersecting)
22
- onIntersect.current?.();
23
- return setShouldRender((prev) => (first.isIntersecting ? true : prev));
24
- });
25
- observer.observe(div);
26
- return () => observer.disconnect();
27
- }, [onIntersect]);
28
- return (<div {...props} ref={ref}>
29
- {shouldRender ? children : null}
30
- </div>);
31
- };
@@ -1,3 +0,0 @@
1
- import React from "react";
2
- export declare const Resizable: ({ children }: React.PropsWithChildren) => React.JSX.Element;
3
- //# sourceMappingURL=resizable.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"resizable.d.ts","sourceRoot":"","sources":["../../../../src/components/core/resizable.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAkD5D,eAAO,MAAM,SAAS,GAAI,cAAc,KAAK,CAAC,iBAAiB,sBAQ9D,CAAC"}
@@ -1,51 +0,0 @@
1
- "use client";
2
- import { motion, useMotionValue } from "motion/react";
3
- import React, { useEffect, useMemo, useState } from "react";
4
- import { isSsr } from "../../lib/fns";
5
- const defaultState = {
6
- x: 0,
7
- y: 0,
8
- width: 0,
9
- height: 0,
10
- top: 0,
11
- left: 0,
12
- bottom: 0,
13
- right: 0,
14
- };
15
- const useElementRect = () => {
16
- const [element, ref] = useState(null);
17
- const motion = useMotionValue(defaultState);
18
- const observer = useMemo(() => isSsr()
19
- ? null
20
- : new window.ResizeObserver((entries) => {
21
- if (entries[0]) {
22
- const rect = entries[0].contentRect;
23
- motion.set({
24
- x: rect.x,
25
- y: rect.y,
26
- width: rect.width,
27
- height: rect.height,
28
- top: rect.top,
29
- left: rect.left,
30
- bottom: rect.bottom,
31
- right: rect.right,
32
- });
33
- }
34
- }), [motion]);
35
- useEffect(() => {
36
- if (!element)
37
- return;
38
- if (observer === null)
39
- return;
40
- observer.observe(element);
41
- return () => observer.disconnect();
42
- }, [element, observer]);
43
- return [ref, motion];
44
- };
45
- export const Resizable = ({ children }) => {
46
- const [ref, bounds] = useElementRect();
47
- const h = bounds.get().height;
48
- return (<motion.div animate={{ height: h > 0 ? h : "auto" }}>
49
- <div ref={ref}>{children}</div>
50
- </motion.div>);
51
- };
@@ -1,16 +0,0 @@
1
- import * as React from "react";
2
- export type Usable<T> = PromiseLike<T> | React.Context<T>;
3
- interface SlotProps extends React.HTMLAttributes<HTMLElement> {
4
- children?: React.ReactNode;
5
- }
6
- export declare function createSlot(ownerName: string): React.ForwardRefExoticComponent<SlotProps & React.RefAttributes<HTMLElement>>;
7
- export declare const Slot: React.ForwardRefExoticComponent<SlotProps & React.RefAttributes<HTMLElement>>;
8
- interface SlottableProps {
9
- children: React.ReactNode;
10
- }
11
- interface SlottableComponent extends React.FC<SlottableProps> {
12
- __radixId: symbol;
13
- }
14
- export declare function createSlottable(ownerName: string): SlottableComponent;
15
- export {};
16
- //# sourceMappingURL=slot.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"slot.d.ts","sourceRoot":"","sources":["../../../../src/components/core/slot.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AA4C/B,MAAM,MAAM,MAAM,CAAC,CAAC,IAAI,WAAW,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;AAI1D,UAAU,SAAU,SAAQ,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC;IACzD,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC9B;AAiBD,wBAAgB,UAAU,CAAC,SAAS,EAAE,MAAM,iFAyC3C;AAED,eAAO,MAAM,IAAI,+EAAqB,CAAC;AAgCvC,UAAU,cAAc;IACpB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC7B;AAED,UAAU,kBAAmB,SAAQ,KAAK,CAAC,EAAE,CAAC,cAAc,CAAC;IACzD,SAAS,EAAE,MAAM,CAAC;CACrB;AAED,wBAAgB,eAAe,CAAC,SAAS,EAAE,MAAM,sBAOhD"}
@@ -1,156 +0,0 @@
1
- import * as React from "react";
2
- const REACT_LAZY_TYPE = Symbol.for("react.lazy");
3
- function setRef(ref, value) {
4
- if (typeof ref === "function") {
5
- return ref(value);
6
- }
7
- else if (ref !== null && ref !== undefined) {
8
- ref.current = value;
9
- }
10
- }
11
- function composeRefs(...refs) {
12
- return (node) => {
13
- let hasCleanup = false;
14
- const cleanups = refs.map((ref) => {
15
- const cleanup = setRef(ref, node);
16
- if (!hasCleanup && typeof cleanup == "function") {
17
- hasCleanup = true;
18
- }
19
- return cleanup;
20
- });
21
- if (hasCleanup) {
22
- return () => {
23
- for (let i = 0; i < cleanups.length; i++) {
24
- const cleanup = cleanups[i];
25
- if (typeof cleanup == "function") {
26
- cleanup();
27
- }
28
- else {
29
- setRef(refs[i], null);
30
- }
31
- }
32
- };
33
- }
34
- };
35
- }
36
- const use = React[" use ".trim().toString()];
37
- function isPromiseLike(value) {
38
- return typeof value === "object" && value !== null && "then" in value;
39
- }
40
- function isLazyComponent(element) {
41
- return (element != null &&
42
- typeof element === "object" &&
43
- "$$typeof" in element &&
44
- element.$$typeof === REACT_LAZY_TYPE &&
45
- "_payload" in element &&
46
- isPromiseLike(element._payload));
47
- }
48
- export function createSlot(ownerName) {
49
- const SlotClone = createSlotClone(ownerName);
50
- const Slot = React.forwardRef((props, forwardedRef) => {
51
- let { children, ...slotProps } = props;
52
- if (isLazyComponent(children) && typeof use === "function") {
53
- children = use(children._payload);
54
- }
55
- const childrenArray = React.Children.toArray(children);
56
- const slottable = childrenArray.find(isSlottable);
57
- if (slottable) {
58
- // the new element to render is the one passed as a child of `Slottable`
59
- const newElement = slottable.props.children;
60
- const newChildren = childrenArray.map((child) => {
61
- if (child === slottable) {
62
- // because the new element will be the one rendered, we are only interested
63
- // in grabbing its children (`newElement.props.children`)
64
- if (React.Children.count(newElement) > 1)
65
- return React.Children.only(null);
66
- return React.isValidElement(newElement) ? newElement.props.children : null;
67
- }
68
- else {
69
- return child;
70
- }
71
- });
72
- return (<SlotClone {...slotProps} ref={forwardedRef}>
73
- {React.isValidElement(newElement) ? React.cloneElement(newElement, undefined, newChildren) : null}
74
- </SlotClone>);
75
- }
76
- return (<SlotClone {...slotProps} ref={forwardedRef}>
77
- {children}
78
- </SlotClone>);
79
- });
80
- Slot.displayName = `${ownerName}.Slot`;
81
- return Slot;
82
- }
83
- export const Slot = createSlot("Slot");
84
- function createSlotClone(ownerName) {
85
- const SlotClone = React.forwardRef((props, forwardedRef) => {
86
- let { children, ...slotProps } = props;
87
- if (isLazyComponent(children) && typeof use === "function") {
88
- children = use(children._payload);
89
- }
90
- if (React.isValidElement(children)) {
91
- const childrenRef = getElementRef(children);
92
- const props = mergeProps(slotProps, children.props);
93
- // do not pass ref to React.Fragment for React 19 compatibility
94
- if (children.type !== React.Fragment) {
95
- props.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
96
- }
97
- return React.cloneElement(children, props);
98
- }
99
- return React.Children.count(children) > 1 ? React.Children.only(null) : null;
100
- });
101
- SlotClone.displayName = `${ownerName}.SlotClone`;
102
- return SlotClone;
103
- }
104
- const SLOTTABLE_IDENTIFIER = Symbol("radix.slottable");
105
- export function createSlottable(ownerName) {
106
- const Slottable = ({ children }) => {
107
- return <>{children}</>;
108
- };
109
- Slottable.displayName = `${ownerName}.Slottable`;
110
- Slottable.__radixId = SLOTTABLE_IDENTIFIER;
111
- return Slottable;
112
- }
113
- const Slottable = createSlottable("Slottable");
114
- function isSlottable(child) {
115
- return (React.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER);
116
- }
117
- function mergeProps(slotProps, childProps) {
118
- const overrideProps = { ...childProps };
119
- for (const propName in childProps) {
120
- const slotPropValue = slotProps[propName];
121
- const childPropValue = childProps[propName];
122
- const isHandler = /^on[A-Z]/.test(propName);
123
- if (isHandler) {
124
- if (slotPropValue && childPropValue) {
125
- overrideProps[propName] = (...args) => {
126
- const result = childPropValue(...args);
127
- slotPropValue(...args);
128
- return result;
129
- };
130
- }
131
- else if (slotPropValue) {
132
- overrideProps[propName] = slotPropValue;
133
- }
134
- }
135
- else if (propName === "style") {
136
- overrideProps[propName] = { ...slotPropValue, ...childPropValue };
137
- }
138
- else if (propName === "className") {
139
- overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
140
- }
141
- }
142
- return { ...slotProps, ...overrideProps };
143
- }
144
- function getElementRef(element) {
145
- let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
146
- let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
147
- if (mayWarn) {
148
- return element.ref;
149
- }
150
- getter = Object.getOwnPropertyDescriptor(element, "ref")?.get;
151
- mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
152
- if (mayWarn) {
153
- return element.props.ref;
154
- }
155
- return element.props.ref || element.ref;
156
- }
@@ -1,35 +0,0 @@
1
- import React from "react";
2
- import { CvaVariants, Label } from "../../types";
3
- import { PolymorphicProps } from "./polymorph";
4
- declare const variants: {
5
- size: {
6
- icon: string;
7
- big: string;
8
- default: string;
9
- tiny: string;
10
- small: string;
11
- };
12
- theme: {
13
- custom: string;
14
- info: string;
15
- warn: string;
16
- muted: string;
17
- danger: string;
18
- disabled: string;
19
- primary: string;
20
- success: string;
21
- neutral: string;
22
- secondary: string;
23
- loading: string;
24
- };
25
- };
26
- type Variants = CvaVariants<typeof variants>;
27
- type Themes = NonNullable<Variants["theme"]>;
28
- export type TagProps<T extends React.ElementType = "span"> = PolymorphicProps<CvaVariants<typeof variants> & Partial<{
29
- icon: Label;
30
- loading: boolean;
31
- indicator: Themes | true;
32
- }>, T>;
33
- export declare const Tag: <T extends React.ElementType = "span">(_: TagProps<T>) => React.ReactNode;
34
- export {};
35
- //# sourceMappingURL=tag.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tag.d.ts","sourceRoot":"","sources":["../../../../src/components/core/tag.tsx"],"names":[],"mappings":"AACA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAE1C,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,EAAa,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE1D,QAAA,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;CAqBb,CAAC;AAEF,KAAK,QAAQ,GAAG,WAAW,CAAC,OAAO,QAAQ,CAAC,CAAC;AAE7C,KAAK,MAAM,GAAG,WAAW,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC;AAyB7C,MAAM,MAAM,QAAQ,CAAC,CAAC,SAAS,KAAK,CAAC,WAAW,GAAG,MAAM,IAAI,gBAAgB,CACzE,WAAW,CAAC,OAAO,QAAQ,CAAC,GAAG,OAAO,CAAC;IAAE,IAAI,EAAE,KAAK,CAAC;IAAC,OAAO,EAAE,OAAO,CAAC;IAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,CAAC,EACnG,CAAC,CACJ,CAAC;AAEF,eAAO,MAAM,GAAG,EAAE,CAAC,CAAC,SAAS,KAAK,CAAC,WAAW,GAAG,MAAM,EAAE,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAC,KAAK,KAAK,CAAC,SAwBQ,CAAC"}
@@ -1,53 +0,0 @@
1
- import { cva } from "class-variance-authority";
2
- import React, { forwardRef } from "react";
3
- import { css } from "../../lib/dom";
4
- import { Polymorph } from "./polymorph";
5
- const variants = {
6
- size: {
7
- icon: "p-tag-padding-icon",
8
- big: "h-tag-height-big px-tag-padding-x-big py-tag-padding-y-big",
9
- default: "h-tag-height px-tag-padding-x py-tag-padding-y",
10
- tiny: "h-tag-height-tiny px-tag-padding-x-tiny py-tag-padding-y-tiny text-typography-xs",
11
- small: "h-tag-height-small px-tag-padding-x-small py-tag-padding-y-small text-typography-sm",
12
- },
13
- theme: {
14
- custom: "",
15
- info: "bg-tag-info-bg text-tag-info-text",
16
- warn: "bg-tag-warn-bg text-tag-warn-text",
17
- muted: "bg-tag-muted-bg text-tag-muted-text",
18
- danger: "bg-tag-danger-bg text-tag-danger-text",
19
- disabled: "bg-disabled duration-700 opacity-70",
20
- primary: "bg-tag-primary-bg text-tag-primary-text",
21
- success: "bg-tag-success-bg text-tag-success-text",
22
- neutral: "bg-transparent border border-card-border",
23
- secondary: "bg-tag-secondary-bg text-tag-secondary-text",
24
- loading: "animate-pulse bg-disabled duration-700 opacity-70",
25
- },
26
- };
27
- const indicatorVariant = cva("aspect-square size-tag-indicator-size rounded-full border-0", {
28
- variants: {
29
- theme: {
30
- info: "bg-info",
31
- warn: "bg-warn",
32
- muted: "bg-muted",
33
- danger: "bg-danger",
34
- neutral: "bg-muted",
35
- primary: "bg-primary",
36
- success: "bg-success",
37
- secondary: "bg-secondary",
38
- },
39
- },
40
- });
41
- const tagVariants = cva("inline-flex items-center justify-center gap-tag-gap whitespace-nowrap rounded-tag-radius border-0 align-middle transition-all duration-300 ease-linear", {
42
- variants,
43
- defaultVariants: { theme: "primary", size: "default" },
44
- });
45
- export const Tag = forwardRef(function Tag({ className, indicator = undefined, icon, loading, theme, size, ...props }, ref) {
46
- return (<Polymorph {...props} ref={ref} data-theme={theme} data-component="tag" as={props.as ?? "span"} className={css(tagVariants({ size, theme: loading ? "loading" : theme }), className)}>
47
- {indicator ? (<span aria-hidden="true" className={indicatorVariant({
48
- theme: indicator === true ? theme : indicator,
49
- })}/>) : null}
50
- {icon}
51
- {props.children}
52
- </Polymorph>);
53
- });
@@ -1,25 +0,0 @@
1
- import type { PropsWithChildren } from "react";
2
- import React, { type ComponentProps } from "react";
3
- import { Label } from "../../types";
4
- export declare const Paragraph: (props: ComponentProps<"p">) => React.JSX.Element;
5
- export declare const Description: (props: ComponentProps<"p">) => React.JSX.Element;
6
- export type InfoProps = {
7
- info?: Label;
8
- label: Label;
9
- row?: boolean;
10
- disabled?: Label;
11
- className?: string;
12
- infoDescription?: string;
13
- };
14
- export declare const Info: (props: React.PropsWithChildren<InfoProps>) => React.JSX.Element;
15
- export declare const PageTitle: (props: PropsWithChildren<{
16
- title: string;
17
- }>) => React.JSX.Element;
18
- type PageHeaderProps = {
19
- title: string;
20
- description: Label;
21
- containerProps?: React.ComponentProps<"header">;
22
- };
23
- export declare const PageHeader: (props: PropsWithChildren<PageHeaderProps>) => React.JSX.Element;
24
- export {};
25
- //# sourceMappingURL=typography.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"typography.d.ts","sourceRoot":"","sources":["../../../../src/components/core/typography.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAC/C,OAAO,KAAK,EAAE,EAAE,KAAK,cAAc,EAAE,MAAM,OAAO,CAAC;AAEnD,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAEpC,eAAO,MAAM,SAAS,GAAI,OAAO,cAAc,CAAC,GAAG,CAAC,sBAA2F,CAAC;AAEhJ,eAAO,MAAM,WAAW,GAAI,OAAO,cAAc,CAAC,GAAG,CAAC,sBAErD,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG;IACpB,IAAI,CAAC,EAAE,KAAK,CAAC;IACb,KAAK,EAAE,KAAK,CAAC;IACb,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,QAAQ,CAAC,EAAE,KAAK,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC5B,CAAC;AAEF,eAAO,MAAM,IAAI,GAAI,OAAO,KAAK,CAAC,iBAAiB,CAAC,SAAS,CAAC,sBAO7D,CAAC;AAEF,eAAO,MAAM,SAAS,GAAI,OAAO,iBAAiB,CAAC;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC,sBAKpE,CAAC;AAEF,KAAK,eAAe,GAAG;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,KAAK,CAAC;IACnB,cAAc,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC;CACnD,CAAC;AAEF,eAAO,MAAM,UAAU,GAAI,OAAO,iBAAiB,CAAC,eAAe,CAAC,sBAUnE,CAAC"}
@@ -1,20 +0,0 @@
1
- import React from "react";
2
- import { css } from "../../lib/dom";
3
- export const Paragraph = (props) => <p {...props} className={css("text-typography-base leading-snug", props.className)}/>;
4
- export const Description = (props) => (<p {...props} className={css("mb-kilo text-typography-sm text-secondary", props.className)}/>);
5
- export const Info = (props) => (<div className={css(`flex ${props.row ? "flex-row items-center" : "flex-col"} gap-info-gap`, props.className)}>
6
- <span className="text-info-label-text font-medium tracking-wide">{props.row ? `${props.label}:` : props.label}</span>
7
- <span className={css(props.disabled ? "text-disabled" : "", props.row ? "w-fit text-info-value-text" : "w-full text-info-secondary-text")}>
8
- {props.children}
9
- </span>
10
- </div>);
11
- export const PageTitle = (props) => (<div>
12
- <h2 className="typography text-typography-3xl font-bold tracking-wide">{props.title}</h2>
13
- <p className="typography text-secondary">{props.children}</p>
14
- </div>);
15
- export const PageHeader = (props) => {
16
- return (<header {...props.containerProps} className={css("gap-mega flex min-w-full flex-row flex-wrap items-center justify-between", props.containerProps?.className)}>
17
- <PageTitle title={props.title}>{props.description}</PageTitle>
18
- <div className="gap-kilo flex flex-wrap items-center">{props.children}</div>
19
- </header>);
20
- };