@g4rcez/components 4.0.2 → 4.1.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 (384) hide show
  1. package/ai/SKILL.md +120 -153
  2. package/ai/docs/Alert.md +47 -48
  3. package/ai/docs/AnimatedList.md +88 -87
  4. package/ai/docs/Autocomplete.md +102 -106
  5. package/ai/docs/Button.md +33 -33
  6. package/ai/docs/Calendar.md +67 -101
  7. package/ai/docs/Card.md +59 -55
  8. package/ai/docs/Checkbox.md +77 -82
  9. package/ai/docs/CommandPalette.md +154 -172
  10. package/ai/docs/DatePicker.md +45 -64
  11. package/ai/docs/Dropdown.md +98 -126
  12. package/ai/docs/Empty.md +41 -44
  13. package/ai/docs/Expand.md +40 -54
  14. package/ai/docs/FileUpload.md +102 -109
  15. package/ai/docs/Form.md +35 -29
  16. package/ai/docs/FormReset.md +37 -37
  17. package/ai/docs/Heading.md +4 -6
  18. package/ai/docs/Input.md +73 -98
  19. package/ai/docs/InputField.md +67 -67
  20. package/ai/docs/List.md +88 -85
  21. package/ai/docs/Menu.md +62 -60
  22. package/ai/docs/Modal.md +129 -136
  23. package/ai/docs/MultiSelect.md +65 -84
  24. package/ai/docs/Notifications.md +96 -96
  25. package/ai/docs/PageCalendar.md +88 -97
  26. package/ai/docs/Polymorph.md +25 -41
  27. package/ai/docs/Progress.md +55 -51
  28. package/ai/docs/Radiobox.md +49 -41
  29. package/ai/docs/RenderOnView.md +26 -32
  30. package/ai/docs/Resizable.md +60 -65
  31. package/ai/docs/Select.md +158 -158
  32. package/ai/docs/Shortcut.md +14 -14
  33. package/ai/docs/Skeleton.md +56 -60
  34. package/ai/docs/Slider.md +26 -49
  35. package/ai/docs/Slot.md +15 -17
  36. package/ai/docs/Spinner.md +17 -15
  37. package/ai/docs/Stats.md +44 -42
  38. package/ai/docs/Step.md +60 -60
  39. package/ai/docs/Switch.md +44 -54
  40. package/ai/docs/Table.md +124 -136
  41. package/ai/docs/Tabs.md +90 -90
  42. package/ai/docs/Tag.md +63 -65
  43. package/ai/docs/TaskList.md +40 -50
  44. package/ai/docs/Textarea.md +47 -70
  45. package/ai/docs/Timeline.md +98 -96
  46. package/ai/docs/Toolbar.md +46 -46
  47. package/ai/docs/Tooltip.md +103 -103
  48. package/ai/docs/Typography.md +55 -55
  49. package/ai/docs/Wizard.md +104 -109
  50. package/ai/docs/index.md +116 -116
  51. package/dist/autocomplete-DcTNOwyg.js +393 -0
  52. package/dist/autocomplete-DcTNOwyg.js.map +1 -0
  53. package/dist/{calendar-B5lSd0ID.js → calendar-BJMHRoy2.js} +104 -105
  54. package/dist/calendar-BJMHRoy2.js.map +1 -0
  55. package/dist/components/core/button.js +10 -10
  56. package/dist/components/core/button.js.map +1 -1
  57. package/dist/components/core/tag.js +4 -4
  58. package/dist/components/core/tag.js.map +1 -1
  59. package/dist/components/display/alert.js +48 -46
  60. package/dist/components/display/alert.js.map +1 -1
  61. package/dist/components/display/calendar.js +6 -6
  62. package/dist/components/display/card.js +2 -2
  63. package/dist/components/display/card.js.map +1 -1
  64. package/dist/components/display/list.js +1 -1
  65. package/dist/components/display/list.js.map +1 -1
  66. package/dist/components/display/notifications.js +3 -3
  67. package/dist/components/display/stats.js +1 -1
  68. package/dist/components/display/tabs.js +2 -2
  69. package/dist/components/display/timeline.js +1 -1
  70. package/dist/components/floating/dropdown.js +25 -17
  71. package/dist/components/floating/dropdown.js.map +1 -1
  72. package/dist/components/floating/expand.js +7 -7
  73. package/dist/components/floating/expand.js.map +1 -1
  74. package/dist/components/floating/menu.js +10 -10
  75. package/dist/components/floating/menu.js.map +1 -1
  76. package/dist/components/floating/modal.js +106 -102
  77. package/dist/components/floating/modal.js.map +1 -1
  78. package/dist/components/floating/tooltip.js +14 -14
  79. package/dist/components/floating/tooltip.js.map +1 -1
  80. package/dist/components/form/autocomplete.js +6 -6
  81. package/dist/components/form/checkbox.js +1 -1
  82. package/dist/components/form/date-picker.js +5 -5
  83. package/dist/components/form/file-upload.js +2 -2
  84. package/dist/components/form/form.js.map +1 -1
  85. package/dist/components/form/input.js +1 -1
  86. package/dist/components/form/radiobox.js +1 -1
  87. package/dist/components/form/select.js +3 -3
  88. package/dist/components/form/switch.js +2 -2
  89. package/dist/components/form/switch.js.map +1 -1
  90. package/dist/components/table/table.js +3 -3
  91. package/dist/{date-picker-DwNo22lx.js → date-picker-Bnl07nd8.js} +8 -6
  92. package/dist/date-picker-Bnl07nd8.js.map +1 -0
  93. package/dist/{dom-Dl8XH0CK.js → dom-CyQHY7ID.js} +66 -61
  94. package/dist/dom-CyQHY7ID.js.map +1 -0
  95. package/dist/{file-upload-Brf2NkLr.js → file-upload-93d5DR4q.js} +139 -129
  96. package/dist/file-upload-93d5DR4q.js.map +1 -0
  97. package/dist/{floating-ui.react-QNHG9W4N.js → floating-ui.react-M2PGXLDp.js} +8 -8
  98. package/dist/floating-ui.react-M2PGXLDp.js.map +1 -0
  99. package/dist/{fns-D2eyJKd5.js → fns-C7Dt27Qd.js} +2 -2
  100. package/dist/fns-C7Dt27Qd.js.map +1 -0
  101. package/dist/index-BJ1ayTam.js +126 -0
  102. package/dist/index-BJ1ayTam.js.map +1 -0
  103. package/dist/index-C-PuFUZi.js.map +1 -1
  104. package/dist/{index-BelDtX5M.js → index-DDeQW0JW.js} +399 -404
  105. package/dist/index-DDeQW0JW.js.map +1 -0
  106. package/dist/index-DE4shK8D.js +215 -0
  107. package/dist/index-DE4shK8D.js.map +1 -0
  108. package/dist/{index-DJSMaZR4.js → index-DlJ_2RBL.js} +2 -2
  109. package/dist/index-DlJ_2RBL.js.map +1 -0
  110. package/dist/index.css +1 -1
  111. package/dist/index.esm-BaIwleSE.js.map +1 -1
  112. package/dist/index.js +2810 -2756
  113. package/dist/index.js.map +1 -1
  114. package/dist/{input-CrGrSnUt.js → input-_MVxmIpu.js} +116 -114
  115. package/dist/input-_MVxmIpu.js.map +1 -0
  116. package/dist/{input-field-5vYcz5tT.js → input-field-CDCOODOl.js} +63 -47
  117. package/dist/input-field-CDCOODOl.js.map +1 -0
  118. package/dist/notifications-Dp0ydKJS.js +2576 -0
  119. package/dist/notifications-Dp0ydKJS.js.map +1 -0
  120. package/dist/polymorph-B5n9fs_K.js.map +1 -1
  121. package/dist/preset/plugin.tailwind.d.ts.map +1 -1
  122. package/dist/preset/plugin.tailwind.js +20 -18
  123. package/dist/preset/preset.tailwind.js +24 -25
  124. package/dist/preset/src/styles/common.js +6 -3
  125. package/dist/preset/src/styles/dark.d.ts.map +1 -1
  126. package/dist/preset/src/styles/dark.js +9 -5
  127. package/dist/preset/src/styles/design-tokens.js +68 -89
  128. package/dist/preset/src/styles/light.d.ts.map +1 -1
  129. package/dist/preset/src/styles/light.js +9 -5
  130. package/dist/preset/src/styles/theme.js +7 -4
  131. package/dist/preset/src/styles/theme.types.d.ts +2 -1
  132. package/dist/preset/src/styles/theme.types.d.ts.map +1 -1
  133. package/dist/preset/src/styles/theme.types.js +2 -1
  134. package/dist/skeleton-BjJobYYf.js +24 -0
  135. package/dist/skeleton-BjJobYYf.js.map +1 -0
  136. package/dist/slot-CRyweuj0.js.map +1 -1
  137. package/dist/styles/common.js +6 -3
  138. package/dist/styles/dark.d.ts.map +1 -1
  139. package/dist/styles/dark.js +9 -5
  140. package/dist/styles/design-tokens.js +68 -89
  141. package/dist/styles/light.d.ts.map +1 -1
  142. package/dist/styles/light.js +9 -5
  143. package/dist/styles/theme.js +7 -4
  144. package/dist/styles/theme.types.d.ts +2 -1
  145. package/dist/styles/theme.types.d.ts.map +1 -1
  146. package/dist/styles/theme.types.js +2 -1
  147. package/dist/tabs-B0g7YtQv.js +123 -0
  148. package/dist/tabs-B0g7YtQv.js.map +1 -0
  149. package/dist/tsconfig.lib.tsbuildinfo +1 -0
  150. package/dist/{context-BFXNJVn2.js → use-translations-DSltA7H_.js} +38 -30
  151. package/dist/use-translations-DSltA7H_.js.map +1 -0
  152. package/package.json +99 -86
  153. package/ai/docs/TransferList.md +0 -142
  154. package/dist/autocomplete-Cn9Z2hLq.js +0 -375
  155. package/dist/autocomplete-Cn9Z2hLq.js.map +0 -1
  156. package/dist/calendar-B5lSd0ID.js.map +0 -1
  157. package/dist/components/core/button.d.ts +0 -77
  158. package/dist/components/core/button.d.ts.map +0 -1
  159. package/dist/components/core/heading.d.ts +0 -3
  160. package/dist/components/core/heading.d.ts.map +0 -1
  161. package/dist/components/core/polymorph.d.ts +0 -10
  162. package/dist/components/core/polymorph.d.ts.map +0 -1
  163. package/dist/components/core/render-on-view.d.ts +0 -7
  164. package/dist/components/core/render-on-view.d.ts.map +0 -1
  165. package/dist/components/core/resizable.d.ts +0 -3
  166. package/dist/components/core/resizable.d.ts.map +0 -1
  167. package/dist/components/core/slot.d.ts +0 -16
  168. package/dist/components/core/slot.d.ts.map +0 -1
  169. package/dist/components/core/tag.d.ts +0 -35
  170. package/dist/components/core/tag.d.ts.map +0 -1
  171. package/dist/components/core/typography.d.ts +0 -25
  172. package/dist/components/core/typography.d.ts.map +0 -1
  173. package/dist/components/display/alert.d.ts +0 -28
  174. package/dist/components/display/alert.d.ts.map +0 -1
  175. package/dist/components/display/calendar.d.ts +0 -42
  176. package/dist/components/display/calendar.d.ts.map +0 -1
  177. package/dist/components/display/card.d.ts +0 -29
  178. package/dist/components/display/card.d.ts.map +0 -1
  179. package/dist/components/display/empty.d.ts +0 -8
  180. package/dist/components/display/empty.d.ts.map +0 -1
  181. package/dist/components/display/list.d.ts +0 -16
  182. package/dist/components/display/list.d.ts.map +0 -1
  183. package/dist/components/display/notifications.d.ts +0 -27
  184. package/dist/components/display/notifications.d.ts.map +0 -1
  185. package/dist/components/display/progress.d.ts +0 -13
  186. package/dist/components/display/progress.d.ts.map +0 -1
  187. package/dist/components/display/shortcut.d.ts +0 -4
  188. package/dist/components/display/shortcut.d.ts.map +0 -1
  189. package/dist/components/display/skeleton.d.ts +0 -12
  190. package/dist/components/display/skeleton.d.ts.map +0 -1
  191. package/dist/components/display/spinner.d.ts +0 -5
  192. package/dist/components/display/spinner.d.ts.map +0 -1
  193. package/dist/components/display/stats.d.ts +0 -12
  194. package/dist/components/display/stats.d.ts.map +0 -1
  195. package/dist/components/display/step.d.ts +0 -24
  196. package/dist/components/display/step.d.ts.map +0 -1
  197. package/dist/components/display/tabs.d.ts +0 -24
  198. package/dist/components/display/tabs.d.ts.map +0 -1
  199. package/dist/components/display/timeline.d.ts +0 -10
  200. package/dist/components/display/timeline.d.ts.map +0 -1
  201. package/dist/components/floating/command-palette.d.ts +0 -49
  202. package/dist/components/floating/command-palette.d.ts.map +0 -1
  203. package/dist/components/floating/dropdown.d.ts +0 -15
  204. package/dist/components/floating/dropdown.d.ts.map +0 -1
  205. package/dist/components/floating/expand.d.ts +0 -11
  206. package/dist/components/floating/expand.d.ts.map +0 -1
  207. package/dist/components/floating/menu.d.ts +0 -52
  208. package/dist/components/floating/menu.d.ts.map +0 -1
  209. package/dist/components/floating/modal.d.ts +0 -60
  210. package/dist/components/floating/modal.d.ts.map +0 -1
  211. package/dist/components/floating/toolbar.d.ts +0 -6
  212. package/dist/components/floating/toolbar.d.ts.map +0 -1
  213. package/dist/components/floating/tooltip.d.ts +0 -17
  214. package/dist/components/floating/tooltip.d.ts.map +0 -1
  215. package/dist/components/floating/wizard.d.ts +0 -26
  216. package/dist/components/floating/wizard.d.ts.map +0 -1
  217. package/dist/components/form/autocomplete.d.ts +0 -16
  218. package/dist/components/form/autocomplete.d.ts.map +0 -1
  219. package/dist/components/form/checkbox.d.ts +0 -12
  220. package/dist/components/form/checkbox.d.ts.map +0 -1
  221. package/dist/components/form/date-picker.d.ts +0 -10
  222. package/dist/components/form/date-picker.d.ts.map +0 -1
  223. package/dist/components/form/file-upload.d.ts +0 -15
  224. package/dist/components/form/file-upload.d.ts.map +0 -1
  225. package/dist/components/form/form.d.ts +0 -3
  226. package/dist/components/form/form.d.ts.map +0 -1
  227. package/dist/components/form/formReset.d.ts +0 -2
  228. package/dist/components/form/formReset.d.ts.map +0 -1
  229. package/dist/components/form/free-text.d.ts +0 -11
  230. package/dist/components/form/free-text.d.ts.map +0 -1
  231. package/dist/components/form/input-field.d.ts +0 -34
  232. package/dist/components/form/input-field.d.ts.map +0 -1
  233. package/dist/components/form/input.d.ts +0 -52
  234. package/dist/components/form/input.d.ts.map +0 -1
  235. package/dist/components/form/multi-select.d.ts +0 -19
  236. package/dist/components/form/multi-select.d.ts.map +0 -1
  237. package/dist/components/form/radiobox.d.ts +0 -7
  238. package/dist/components/form/radiobox.d.ts.map +0 -1
  239. package/dist/components/form/select.d.ts +0 -13
  240. package/dist/components/form/select.d.ts.map +0 -1
  241. package/dist/components/form/slider.d.ts +0 -7
  242. package/dist/components/form/slider.d.ts.map +0 -1
  243. package/dist/components/form/switch.d.ts +0 -9
  244. package/dist/components/form/switch.d.ts.map +0 -1
  245. package/dist/components/form/task-list.d.ts +0 -3
  246. package/dist/components/form/task-list.d.ts.map +0 -1
  247. package/dist/components/form/textarea.d.ts +0 -6
  248. package/dist/components/form/textarea.d.ts.map +0 -1
  249. package/dist/components/form/transfer-list.d.ts +0 -14
  250. package/dist/components/form/transfer-list.d.ts.map +0 -1
  251. package/dist/components/form/transfer-list.js +0 -55
  252. package/dist/components/form/transfer-list.js.map +0 -1
  253. package/dist/components/index.d.ts +0 -46
  254. package/dist/components/index.d.ts.map +0 -1
  255. package/dist/components/page-calendar/calendar-header.d.ts +0 -16
  256. package/dist/components/page-calendar/calendar-header.d.ts.map +0 -1
  257. package/dist/components/page-calendar/day-view.d.ts +0 -12
  258. package/dist/components/page-calendar/day-view.d.ts.map +0 -1
  259. package/dist/components/page-calendar/event-pill.d.ts +0 -9
  260. package/dist/components/page-calendar/event-pill.d.ts.map +0 -1
  261. package/dist/components/page-calendar/index.d.ts +0 -4
  262. package/dist/components/page-calendar/index.d.ts.map +0 -1
  263. package/dist/components/page-calendar/month-view.d.ts +0 -11
  264. package/dist/components/page-calendar/month-view.d.ts.map +0 -1
  265. package/dist/components/page-calendar/page-calendar.d.ts +0 -18
  266. package/dist/components/page-calendar/page-calendar.d.ts.map +0 -1
  267. package/dist/components/page-calendar/page-calendar.types.d.ts +0 -18
  268. package/dist/components/page-calendar/page-calendar.types.d.ts.map +0 -1
  269. package/dist/components/page-calendar/page-calendar.utils.d.ts +0 -24
  270. package/dist/components/page-calendar/page-calendar.utils.d.ts.map +0 -1
  271. package/dist/components/page-calendar/week-view.d.ts +0 -11
  272. package/dist/components/page-calendar/week-view.d.ts.map +0 -1
  273. package/dist/components/table/filter.d.ts +0 -42
  274. package/dist/components/table/filter.d.ts.map +0 -1
  275. package/dist/components/table/group.d.ts +0 -17
  276. package/dist/components/table/group.d.ts.map +0 -1
  277. package/dist/components/table/index.d.ts +0 -20
  278. package/dist/components/table/index.d.ts.map +0 -1
  279. package/dist/components/table/inner-table.d.ts +0 -29
  280. package/dist/components/table/inner-table.d.ts.map +0 -1
  281. package/dist/components/table/metadata.d.ts +0 -4
  282. package/dist/components/table/metadata.d.ts.map +0 -1
  283. package/dist/components/table/pagination.d.ts +0 -3
  284. package/dist/components/table/pagination.d.ts.map +0 -1
  285. package/dist/components/table/row.d.ts +0 -12
  286. package/dist/components/table/row.d.ts.map +0 -1
  287. package/dist/components/table/sort.d.ts +0 -28
  288. package/dist/components/table/sort.d.ts.map +0 -1
  289. package/dist/components/table/table-lib.d.ts +0 -135
  290. package/dist/components/table/table-lib.d.ts.map +0 -1
  291. package/dist/components/table/table.context.d.ts +0 -10
  292. package/dist/components/table/table.context.d.ts.map +0 -1
  293. package/dist/components/table/thead.d.ts +0 -9
  294. package/dist/components/table/thead.d.ts.map +0 -1
  295. package/dist/config/context.d.ts +0 -21
  296. package/dist/config/context.d.ts.map +0 -1
  297. package/dist/config/default-translations.d.ts +0 -90
  298. package/dist/config/default-translations.d.ts.map +0 -1
  299. package/dist/config/default-tweaks.d.ts +0 -13
  300. package/dist/config/default-tweaks.d.ts.map +0 -1
  301. package/dist/constants.d.ts +0 -3
  302. package/dist/constants.d.ts.map +0 -1
  303. package/dist/context-BFXNJVn2.js.map +0 -1
  304. package/dist/date-picker-DwNo22lx.js.map +0 -1
  305. package/dist/dom-Dl8XH0CK.js.map +0 -1
  306. package/dist/file-upload-Brf2NkLr.js.map +0 -1
  307. package/dist/floating-ui.react-QNHG9W4N.js.map +0 -1
  308. package/dist/fns-D2eyJKd5.js.map +0 -1
  309. package/dist/hooks/use-click-outside.d.ts +0 -3
  310. package/dist/hooks/use-click-outside.d.ts.map +0 -1
  311. package/dist/hooks/use-color-parser.d.ts +0 -2
  312. package/dist/hooks/use-color-parser.d.ts.map +0 -1
  313. package/dist/hooks/use-components-provider.d.ts +0 -15
  314. package/dist/hooks/use-components-provider.d.ts.map +0 -1
  315. package/dist/hooks/use-debounce.d.ts +0 -5
  316. package/dist/hooks/use-debounce.d.ts.map +0 -1
  317. package/dist/hooks/use-floating-ref.d.ts +0 -2
  318. package/dist/hooks/use-floating-ref.d.ts.map +0 -1
  319. package/dist/hooks/use-form.d.ts +0 -394
  320. package/dist/hooks/use-form.d.ts.map +0 -1
  321. package/dist/hooks/use-hover.d.ts +0 -3
  322. package/dist/hooks/use-hover.d.ts.map +0 -1
  323. package/dist/hooks/use-input-id.d.ts +0 -4
  324. package/dist/hooks/use-input-id.d.ts.map +0 -1
  325. package/dist/hooks/use-is-coarse-device.d.ts +0 -2
  326. package/dist/hooks/use-is-coarse-device.d.ts.map +0 -1
  327. package/dist/hooks/use-locale.d.ts +0 -3
  328. package/dist/hooks/use-locale.d.ts.map +0 -1
  329. package/dist/hooks/use-media-query.d.ts +0 -2
  330. package/dist/hooks/use-media-query.d.ts.map +0 -1
  331. package/dist/hooks/use-on-event.d.ts +0 -4
  332. package/dist/hooks/use-on-event.d.ts.map +0 -1
  333. package/dist/hooks/use-parent.d.ts +0 -3
  334. package/dist/hooks/use-parent.d.ts.map +0 -1
  335. package/dist/hooks/use-preferences.d.ts +0 -2
  336. package/dist/hooks/use-preferences.d.ts.map +0 -1
  337. package/dist/hooks/use-previous.d.ts +0 -2
  338. package/dist/hooks/use-previous.d.ts.map +0 -1
  339. package/dist/hooks/use-reactive.d.ts +0 -2
  340. package/dist/hooks/use-reactive.d.ts.map +0 -1
  341. package/dist/hooks/use-remove-scroll.d.ts +0 -4
  342. package/dist/hooks/use-remove-scroll.d.ts.map +0 -1
  343. package/dist/hooks/use-resize-observer.d.ts +0 -2
  344. package/dist/hooks/use-resize-observer.d.ts.map +0 -1
  345. package/dist/hooks/use-stable-ref.d.ts +0 -2
  346. package/dist/hooks/use-stable-ref.d.ts.map +0 -1
  347. package/dist/hooks/use-swipe.d.ts +0 -8
  348. package/dist/hooks/use-swipe.d.ts.map +0 -1
  349. package/dist/hooks/use-translations.d.ts +0 -88
  350. package/dist/hooks/use-translations.d.ts.map +0 -1
  351. package/dist/hooks/use-tweaks.d.ts +0 -3
  352. package/dist/hooks/use-tweaks.d.ts.map +0 -1
  353. package/dist/hooks/use-window-size.d.ts +0 -5
  354. package/dist/hooks/use-window-size.d.ts.map +0 -1
  355. package/dist/index-BelDtX5M.js.map +0 -1
  356. package/dist/index-DJSMaZR4.js.map +0 -1
  357. package/dist/index-Z-fZHxfJ.js +0 -335
  358. package/dist/index-Z-fZHxfJ.js.map +0 -1
  359. package/dist/index.d.ts +0 -22
  360. package/dist/index.d.ts.map +0 -1
  361. package/dist/input-CrGrSnUt.js.map +0 -1
  362. package/dist/input-field-5vYcz5tT.js.map +0 -1
  363. package/dist/lib/combi-keys.d.ts +0 -15
  364. package/dist/lib/combi-keys.d.ts.map +0 -1
  365. package/dist/lib/dict.d.ts +0 -12
  366. package/dist/lib/dict.d.ts.map +0 -1
  367. package/dist/lib/dom.d.ts +0 -19
  368. package/dist/lib/dom.d.ts.map +0 -1
  369. package/dist/lib/fns.d.ts +0 -11
  370. package/dist/lib/fns.d.ts.map +0 -1
  371. package/dist/lib/fzf.d.ts +0 -16
  372. package/dist/lib/fzf.d.ts.map +0 -1
  373. package/dist/lib/keyboard-area.d.ts +0 -16
  374. package/dist/lib/keyboard-area.d.ts.map +0 -1
  375. package/dist/notifications-cUdVPs-B.js +0 -2786
  376. package/dist/notifications-cUdVPs-B.js.map +0 -1
  377. package/dist/skeleton-D75GFBV6.js +0 -10
  378. package/dist/skeleton-D75GFBV6.js.map +0 -1
  379. package/dist/tabs-S00a8qq8.js +0 -106
  380. package/dist/tabs-S00a8qq8.js.map +0 -1
  381. package/dist/types.d.ts +0 -26
  382. package/dist/types.d.ts.map +0 -1
  383. package/dist/use-translations-BwLKTrZv.js +0 -10
  384. package/dist/use-translations-BwLKTrZv.js.map +0 -1
@@ -25,11 +25,11 @@ Wrap your app (or the subtree that needs toasts) with `Notifications`:
25
25
  import { Notifications } from "@g4rcez/components/notifications";
26
26
 
27
27
  function App() {
28
- return (
29
- <Notifications max={5} timeout={5000}>
30
- <YourApp />
31
- </Notifications>
32
- );
28
+ return (
29
+ <Notifications max={5} timeout={5000}>
30
+ <YourApp />
31
+ </Notifications>
32
+ );
33
33
  }
34
34
  ```
35
35
 
@@ -37,11 +37,11 @@ function App() {
37
37
 
38
38
  ### Notifications (Provider)
39
39
 
40
- | Prop | Type | Default | Description |
41
- |------|------|---------|-------------|
42
- | `max` | `number` | `5` | Maximum notifications displayed at once |
43
- | `timeout` | `number` | `5000` | Default auto-dismiss duration in milliseconds |
44
- | `children` | `React.ReactNode` | — | Subtree that can use `useNotification` |
40
+ | Prop | Type | Default | Description |
41
+ | ---------- | ----------------- | ------- | --------------------------------------------- |
42
+ | `max` | `number` | `5` | Maximum notifications displayed at once |
43
+ | `timeout` | `number` | `5000` | Default auto-dismiss duration in milliseconds |
44
+ | `children` | `React.ReactNode` | — | Subtree that can use `useNotification` |
45
45
 
46
46
  ### useNotification — notify function
47
47
 
@@ -52,53 +52,53 @@ const subscription = notify(message, options);
52
52
 
53
53
  **Parameters**
54
54
 
55
- | Parameter | Type | Description |
56
- |-----------|------|-------------|
57
- | `message` | `Label` | Notification body text (string or React node) |
58
- | `options` | `NotificationOptions` | Optional configuration (see below) |
55
+ | Parameter | Type | Description |
56
+ | --------- | --------------------- | --------------------------------------------- |
57
+ | `message` | `Label` | Notification body text (string or React node) |
58
+ | `options` | `NotificationOptions` | Optional configuration (see below) |
59
59
 
60
60
  **NotificationOptions**
61
61
 
62
- | Option | Type | Default | Description |
63
- |--------|------|---------|-------------|
64
- | `id` | `string` | — | Stable ID; if provided and a toast with this ID exists, it will be updated instead of duplicated |
65
- | `title` | `Label` | — | Optional notification title |
66
- | `theme` | `NotificationTheme` | `"default"` | Visual theme variant |
67
- | `timeout` | `number` | Provider default | Override auto-dismiss duration in ms |
68
- | `closable` | `boolean` | `true` | Show close button |
69
- | `loading` | `boolean` | `false` | Replaces icon with spinning `Loader2Icon` |
62
+ | Option | Type | Default | Description |
63
+ | ---------- | ------------------- | ---------------- | ------------------------------------------------------------------------------------------------ |
64
+ | `id` | `string` | — | Stable ID; if provided and a toast with this ID exists, it will be updated instead of duplicated |
65
+ | `title` | `Label` | — | Optional notification title |
66
+ | `theme` | `NotificationTheme` | `"default"` | Visual theme variant |
67
+ | `timeout` | `number` | Provider default | Override auto-dismiss duration in ms |
68
+ | `closable` | `boolean` | `true` | Show close button |
69
+ | `loading` | `boolean` | `false` | Replaces icon with spinning `Loader2Icon` |
70
70
 
71
71
  **Return value — NotificationSubscriber**
72
72
 
73
- | Method | Description |
74
- |--------|-------------|
73
+ | Method | Description |
74
+ | --------- | ---------------------------------- |
75
75
  | `close()` | Dismiss this specific notification |
76
- | `clear()` | Dismiss all visible notifications |
76
+ | `clear()` | Dismiss all visible notifications |
77
77
 
78
78
  ## Themes
79
79
 
80
- | Value | Appearance |
81
- |-------|-----------|
82
- | `"default"` | Card background with foreground text |
83
- | `"info"` | `bg-alert-info-bg` / `text-alert-info-text` / `border-alert-info-border` |
84
- | `"success"` | `bg-alert-success-bg` / `text-alert-success-text` / `border-alert-success-border` |
85
- | `"warn"` | `bg-alert-warn-bg` / `text-alert-warn-text` / `border-alert-warn-border` |
86
- | `"danger"` | `bg-alert-danger-bg` / `text-alert-danger-text` / `border-alert-danger-border` |
80
+ | Value | Appearance |
81
+ | ------------- | --------------------------------------------------------------------------------------- |
82
+ | `"default"` | Card background with foreground text |
83
+ | `"info"` | `bg-alert-info-bg` / `text-alert-info-text` / `border-alert-info-border` |
84
+ | `"success"` | `bg-alert-success-bg` / `text-alert-success-text` / `border-alert-success-border` |
85
+ | `"warn"` | `bg-alert-warn-bg` / `text-alert-warn-text` / `border-alert-warn-border` |
86
+ | `"danger"` | `bg-alert-danger-bg` / `text-alert-danger-text` / `border-alert-danger-border` |
87
87
  | `"secondary"` | `bg-alert-secondary-bg` / `text-alert-secondary-text` / `border-alert-secondary-border` |
88
- | `"muted"` | `bg-alert-muted-bg` / `text-alert-muted-text` / `border-alert-muted-border` |
88
+ | `"muted"` | `bg-alert-muted-bg` / `text-alert-muted-text` / `border-alert-muted-border` |
89
89
 
90
90
  ## Design Tokens
91
91
 
92
92
  Tokens this component reads. Customize by overriding these CSS variables in your theme.
93
93
 
94
- | Token | CSS Variable | Purpose |
95
- |-------|-------------|---------|
96
- | `bg-card-background` | `--card-background` | Default notification background |
97
- | `border-card-border` | `--card-border` | Default notification border |
98
- | `text-foreground` | `--foreground` | Default notification text |
99
- | `bg-alert-{theme}-bg` | `--alert-{theme}-bg` | Themed background |
100
- | `text-alert-{theme}-text` | `--alert-{theme}-text` | Themed text |
101
- | `border-alert-{theme}-border` | `--alert-{theme}-border` | Themed border |
94
+ | Token | CSS Variable | Purpose |
95
+ | ----------------------------- | ------------------------ | ------------------------------- |
96
+ | `bg-card-background` | `--card-background` | Default notification background |
97
+ | `border-card-border` | `--card-border` | Default notification border |
98
+ | `text-foreground` | `--foreground` | Default notification text |
99
+ | `bg-alert-{theme}-bg` | `--alert-{theme}-bg` | Themed background |
100
+ | `text-alert-{theme}-text` | `--alert-{theme}-text` | Themed text |
101
+ | `border-alert-{theme}-border` | `--alert-{theme}-border` | Themed border |
102
102
 
103
103
  ## Examples
104
104
 
@@ -106,17 +106,17 @@ Tokens this component reads. Customize by overriding these CSS variables in your
106
106
 
107
107
  ```tsx
108
108
  function NotificationExamples() {
109
- const notify = useNotification();
110
-
111
- return (
112
- <div className="space-y-2">
113
- <button onClick={() => notify("Default notification")}>Default</button>
114
- <button onClick={() => notify("Info message", { theme: "info" })}>Info</button>
115
- <button onClick={() => notify("Success!", { theme: "success" })}>Success</button>
116
- <button onClick={() => notify("Warning", { theme: "warn" })}>Warning</button>
117
- <button onClick={() => notify("Error occurred", { theme: "danger" })}>Error</button>
118
- </div>
119
- );
109
+ const notify = useNotification();
110
+
111
+ return (
112
+ <div className="space-y-2">
113
+ <button onClick={() => notify("Default notification")}>Default</button>
114
+ <button onClick={() => notify("Info message", { theme: "info" })}>Info</button>
115
+ <button onClick={() => notify("Success!", { theme: "success" })}>Success</button>
116
+ <button onClick={() => notify("Warning", { theme: "warn" })}>Warning</button>
117
+ <button onClick={() => notify("Error occurred", { theme: "danger" })}>Error</button>
118
+ </div>
119
+ );
120
120
  }
121
121
  ```
122
122
 
@@ -124,17 +124,17 @@ function NotificationExamples() {
124
124
 
125
125
  ```tsx
126
126
  function SaveButton() {
127
- const notify = useNotification();
127
+ const notify = useNotification();
128
128
 
129
- const handleSave = () => {
130
- notify("Your changes have been saved to the server.", {
131
- title: "Changes Saved",
132
- theme: "success",
133
- timeout: 3000,
134
- });
135
- };
129
+ const handleSave = () => {
130
+ notify("Your changes have been saved to the server.", {
131
+ title: "Changes Saved",
132
+ theme: "success",
133
+ timeout: 3000,
134
+ });
135
+ };
136
136
 
137
- return <button onClick={handleSave}>Save</button>;
137
+ return <button onClick={handleSave}>Save</button>;
138
138
  }
139
139
  ```
140
140
 
@@ -142,24 +142,24 @@ function SaveButton() {
142
142
 
143
143
  ```tsx
144
144
  function ProcessButton() {
145
- const notify = useNotification();
146
-
147
- const startProcess = () => {
148
- const subscription = notify("Processing your request…", {
149
- title: "In Progress",
150
- theme: "info",
151
- timeout: Infinity,
152
- closable: false,
153
- loading: true,
154
- });
155
-
156
- doWork().then(() => {
157
- subscription.close();
158
- notify("Process completed successfully!", { theme: "success" });
159
- });
160
- };
161
-
162
- return <button onClick={startProcess}>Start</button>;
145
+ const notify = useNotification();
146
+
147
+ const startProcess = () => {
148
+ const subscription = notify("Processing your request…", {
149
+ title: "In Progress",
150
+ theme: "info",
151
+ timeout: Infinity,
152
+ closable: false,
153
+ loading: true,
154
+ });
155
+
156
+ doWork().then(() => {
157
+ subscription.close();
158
+ notify("Process completed successfully!", { theme: "success" });
159
+ });
160
+ };
161
+
162
+ return <button onClick={startProcess}>Start</button>;
163
163
  }
164
164
  ```
165
165
 
@@ -167,23 +167,23 @@ function ProcessButton() {
167
167
 
168
168
  ```tsx
169
169
  function ContactForm() {
170
- const notify = useNotification();
171
-
172
- const handleSubmit = async (e: React.FormEvent) => {
173
- e.preventDefault();
174
- try {
175
- await submitForm();
176
- notify("Message sent successfully.", { title: "Done", theme: "success" });
177
- } catch {
178
- notify("Failed to send. Please try again.", {
179
- title: "Error",
180
- theme: "danger",
181
- timeout: 7000,
182
- });
183
- }
184
- };
185
-
186
- return <form onSubmit={handleSubmit}>{/* fields */}</form>;
170
+ const notify = useNotification();
171
+
172
+ const handleSubmit = async (e: React.FormEvent) => {
173
+ e.preventDefault();
174
+ try {
175
+ await submitForm();
176
+ notify("Message sent successfully.", { title: "Done", theme: "success" });
177
+ } catch {
178
+ notify("Failed to send. Please try again.", {
179
+ title: "Error",
180
+ theme: "danger",
181
+ timeout: 7000,
182
+ });
183
+ }
184
+ };
185
+
186
+ return <form onSubmit={handleSubmit}>{/* fields */}</form>;
187
187
  }
188
188
  ```
189
189
 
@@ -19,19 +19,19 @@ import { PageCalendar } from "@g4rcez/components";
19
19
 
20
20
  ## Props
21
21
 
22
- | Prop | Type | Default | Description |
23
- |------|------|---------|-------------|
24
- | `events` | `CalendarEvent<T>[]` | — | Array of event objects to display across all views. |
25
- | `filters` | `CalendarFilter[]` | `[]` | Filter tag definitions. Each filter can be toggled to hide/show matching events. |
26
- | `defaultView` | `"month" \| "week" \| "day"` | `"month"` | Initial view rendered when the component mounts. |
27
- | `defaultDate` | `Date` | `new Date()` | Initial date the calendar focuses on. |
28
- | `onEventClick` | `(event: CalendarEvent) => void` | — | Called when the user clicks an event pill. |
29
- | `onSlotClick` | `(date: Date) => void` | — | Called when the user clicks an empty time slot (week and day views). |
30
- | `onAddEvent` | `() => void` | — | Called when the "Add event" button in the header is clicked. Omit to hide the button. |
31
- | `onChangeFilters` | `(filters: CalendarFilter[]) => void` | — | Called whenever a filter is toggled, receiving the updated filter array. |
32
- | `renderEvent` | `(event: CalendarEvent<T>) => ReactNode` | — | Custom renderer for the selected event detail panel in day view. |
33
- | `filterArea` | `ReactNode` | — | Replaces the default filter tag row in the header with custom content. |
34
- | `getFilterId` | `() => void` | — | Custom accessor to extract a `filterId` from an event. Defaults to `event.filterId`. |
22
+ | Prop | Type | Default | Description |
23
+ | ----------------- | ---------------------------------------- | ------------ | ------------------------------------------------------------------------------------- |
24
+ | `events` | `CalendarEvent<T>[]` | — | Array of event objects to display across all views. |
25
+ | `filters` | `CalendarFilter[]` | `[]` | Filter tag definitions. Each filter can be toggled to hide/show matching events. |
26
+ | `defaultView` | `"month" \| "week" \| "day"` | `"month"` | Initial view rendered when the component mounts. |
27
+ | `defaultDate` | `Date` | `new Date()` | Initial date the calendar focuses on. |
28
+ | `onEventClick` | `(event: CalendarEvent) => void` | — | Called when the user clicks an event pill. |
29
+ | `onSlotClick` | `(date: Date) => void` | — | Called when the user clicks an empty time slot (week and day views). |
30
+ | `onAddEvent` | `() => void` | — | Called when the "Add event" button in the header is clicked. Omit to hide the button. |
31
+ | `onChangeFilters` | `(filters: CalendarFilter[]) => void` | — | Called whenever a filter is toggled, receiving the updated filter array. |
32
+ | `renderEvent` | `(event: CalendarEvent<T>) => ReactNode` | — | Custom renderer for the selected event detail panel in day view. |
33
+ | `filterArea` | `ReactNode` | — | Replaces the default filter tag row in the header with custom content. |
34
+ | `getFilterId` | `() => void` | — | Custom accessor to extract a `filterId` from an event. Defaults to `event.filterId`. |
35
35
 
36
36
  ## Type Definitions
37
37
 
@@ -39,8 +39,8 @@ import { PageCalendar } from "@g4rcez/components";
39
39
 
40
40
  ```ts
41
41
  type CalendarEventBase = {
42
- id: string;
43
- date: Date;
42
+ id: string;
43
+ date: Date;
44
44
  };
45
45
  ```
46
46
 
@@ -48,9 +48,9 @@ type CalendarEventBase = {
48
48
 
49
49
  ```ts
50
50
  type CalendarEvent<T extends CalendarEventBase = CalendarEventBase> = T & {
51
- title: string;
52
- filterId?: string;
53
- className?: string;
51
+ title: string;
52
+ filterId?: string;
53
+ className?: string;
54
54
  };
55
55
  ```
56
56
 
@@ -60,10 +60,10 @@ type CalendarEvent<T extends CalendarEventBase = CalendarEventBase> = T & {
60
60
 
61
61
  ```ts
62
62
  type CalendarFilter = {
63
- id: string;
64
- label: string;
65
- enabled: boolean;
66
- theme: TagProps["theme"]; // "primary" | "success" | "warn" | "danger" | "info" | "neutral" | "secondary" | "muted"
63
+ id: string;
64
+ label: string;
65
+ enabled: boolean;
66
+ theme: TagProps["theme"]; // "primary" | "success" | "warn" | "danger" | "info" | "neutral" | "secondary" | "muted"
67
67
  };
68
68
  ```
69
69
 
@@ -77,18 +77,18 @@ type ViewMode = "month" | "week" | "day";
77
77
 
78
78
  Tokens this component reads. Customize by overriding these CSS variables in your theme.
79
79
 
80
- | Token | CSS Variable | Purpose |
81
- |-------|-------------|---------|
82
- | `bg-primary` | `--primary` | Today indicator background, selected day highlight |
83
- | `text-primary-foreground` | `--primary-foreground` | Text on today / selected day indicator |
84
- | `bg-card` | `--card` | Non-today day indicator background in header |
85
- | `text-foreground` | `--foreground` | Default text in day cells and header |
86
- | `text-muted-foreground` | `--muted-foreground` | Week label, hour labels, secondary text |
87
- | `border-border` | `--border` | Grid cell borders, day view hour-slot dividers |
88
- | `border-card-border` | `--card-border` | Day and week view column borders |
89
- | `bg-muted` | `--muted` | Hover background on time slots |
90
- | `z-calendar` | `--z-calendar` | `z-index` for the column resizer handle (value: 2) |
91
- | `z-floating` | `--z-floating` | `z-index` for floating overlays (value: 22) |
80
+ | Token | CSS Variable | Purpose |
81
+ | ------------------------- | ---------------------- | -------------------------------------------------- |
82
+ | `bg-primary` | `--primary` | Today indicator background, selected day highlight |
83
+ | `text-primary-foreground` | `--primary-foreground` | Text on today / selected day indicator |
84
+ | `bg-card` | `--card` | Non-today day indicator background in header |
85
+ | `text-foreground` | `--foreground` | Default text in day cells and header |
86
+ | `text-muted-foreground` | `--muted-foreground` | Week label, hour labels, secondary text |
87
+ | `border-border` | `--border` | Grid cell borders, day view hour-slot dividers |
88
+ | `border-card-border` | `--card-border` | Day and week view column borders |
89
+ | `bg-muted` | `--muted` | Hover background on time slots |
90
+ | `z-calendar` | `--z-calendar` | `z-index` for the column resizer handle (value: 2) |
91
+ | `z-floating` | `--z-floating` | `z-index` for floating overlays (value: 22) |
92
92
 
93
93
  ## Views
94
94
 
@@ -113,17 +113,10 @@ import { PageCalendar } from "@g4rcez/components";
113
113
 
114
114
  type MyEvent = { id: string; date: Date; title: string };
115
115
 
116
- const events: MyEvent[] = [
117
- { id: "1", date: new Date(), title: "Team standup" },
118
- ];
116
+ const events: MyEvent[] = [{ id: "1", date: new Date(), title: "Team standup" }];
119
117
 
120
118
  export function MyCalendar() {
121
- return (
122
- <PageCalendar
123
- events={events}
124
- onEventClick={(event) => console.log(event)}
125
- />
126
- );
119
+ return <PageCalendar events={events} onEventClick={(event) => console.log(event)} />;
127
120
  }
128
121
  ```
129
122
 
@@ -134,23 +127,17 @@ import { PageCalendar } from "@g4rcez/components";
134
127
  import type { CalendarFilter } from "@g4rcez/components";
135
128
 
136
129
  const filters: CalendarFilter[] = [
137
- { id: "work", label: "Work", enabled: true, theme: "primary" },
138
- { id: "personal", label: "Personal", enabled: true, theme: "success" },
130
+ { id: "work", label: "Work", enabled: true, theme: "primary" },
131
+ { id: "personal", label: "Personal", enabled: true, theme: "success" },
139
132
  ];
140
133
 
141
134
  const events = [
142
- { id: "1", date: new Date(), title: "Sprint planning", filterId: "work" },
143
- { id: "2", date: new Date(), title: "Gym", filterId: "personal" },
135
+ { id: "1", date: new Date(), title: "Sprint planning", filterId: "work" },
136
+ { id: "2", date: new Date(), title: "Gym", filterId: "personal" },
144
137
  ];
145
138
 
146
139
  export function FilteredCalendar() {
147
- return (
148
- <PageCalendar
149
- events={events}
150
- filters={filters}
151
- onChangeFilters={(updated) => console.log(updated)}
152
- />
153
- );
140
+ return <PageCalendar events={events} filters={filters} onChangeFilters={(updated) => console.log(updated)} />;
154
141
  }
155
142
  ```
156
143
 
@@ -161,21 +148,21 @@ import { PageCalendar } from "@g4rcez/components";
161
148
  import { MapPinIcon } from "@phosphor-icons/react";
162
149
 
163
150
  export function DetailCalendar() {
164
- return (
165
- <PageCalendar
166
- events={events}
167
- defaultView="day"
168
- renderEvent={(event) => (
169
- <div className="flex flex-col gap-1 p-2 bg-muted rounded-card">
170
- <span className="font-semibold text-foreground">{event.title}</span>
171
- <span className="flex items-center gap-1 text-sm text-muted-foreground">
172
- <MapPinIcon size={12} />
173
- {event.location}
174
- </span>
175
- </div>
176
- )}
177
- />
178
- );
151
+ return (
152
+ <PageCalendar
153
+ events={events}
154
+ defaultView="day"
155
+ renderEvent={(event) => (
156
+ <div className="flex flex-col gap-1 p-2 bg-muted rounded-card">
157
+ <span className="font-semibold text-foreground">{event.title}</span>
158
+ <span className="flex items-center gap-1 text-sm text-muted-foreground">
159
+ <MapPinIcon size={12} />
160
+ {event.location}
161
+ </span>
162
+ </div>
163
+ )}
164
+ />
165
+ );
179
166
  }
180
167
  ```
181
168
 
@@ -186,22 +173,22 @@ import { useState } from "react";
186
173
  import { PageCalendar } from "@g4rcez/components";
187
174
 
188
175
  export function EditableCalendar() {
189
- const [showForm, setShowForm] = useState(false);
190
- const [slotDate, setSlotDate] = useState<Date | null>(null);
191
-
192
- return (
193
- <>
194
- <PageCalendar
195
- events={events}
196
- onAddEvent={() => setShowForm(true)}
197
- onSlotClick={(date) => {
198
- setSlotDate(date);
199
- setShowForm(true);
200
- }}
201
- />
202
- {showForm && <EventForm defaultDate={slotDate} onClose={() => setShowForm(false)} />}
203
- </>
204
- );
176
+ const [showForm, setShowForm] = useState(false);
177
+ const [slotDate, setSlotDate] = useState<Date | null>(null);
178
+
179
+ return (
180
+ <>
181
+ <PageCalendar
182
+ events={events}
183
+ onAddEvent={() => setShowForm(true)}
184
+ onSlotClick={(date) => {
185
+ setSlotDate(date);
186
+ setShowForm(true);
187
+ }}
188
+ />
189
+ {showForm && <EventForm defaultDate={slotDate} onClose={() => setShowForm(false)} />}
190
+ </>
191
+ );
205
192
  }
206
193
  ```
207
194
 
@@ -212,17 +199,21 @@ import { PageCalendar } from "@g4rcez/components";
212
199
  import { Button } from "@g4rcez/components/button";
213
200
 
214
201
  export function CustomFilterCalendar() {
215
- return (
216
- <PageCalendar
217
- events={events}
218
- filterArea={
219
- <div className="flex items-center gap-2 rounded-card bg-muted px-3 py-1.5">
220
- <Button theme="ghost-muted" size="small">All</Button>
221
- <Button theme="primary" size="small">Mine</Button>
222
- </div>
223
- }
224
- />
225
- );
202
+ return (
203
+ <PageCalendar
204
+ events={events}
205
+ filterArea={
206
+ <div className="flex items-center gap-2 rounded-card bg-muted px-3 py-1.5">
207
+ <Button theme="ghost-muted" size="small">
208
+ All
209
+ </Button>
210
+ <Button theme="primary" size="small">
211
+ Mine
212
+ </Button>
213
+ </div>
214
+ }
215
+ />
216
+ );
226
217
  }
227
218
  ```
228
219
 
@@ -258,7 +249,7 @@ export function CustomFilterCalendar() {
258
249
 
259
250
  ```css
260
251
  [data-component="day-view-scroller"] {
261
- height: calc(100dvh - 200px);
252
+ height: calc(100dvh - 200px);
262
253
  }
263
254
  ```
264
255
 
@@ -19,20 +19,20 @@ import { Polymorph } from "@g4rcez/components";
19
19
 
20
20
  ## Props
21
21
 
22
- | Prop | Type | Default | Description |
23
- |------|------|---------|-------------|
24
- | `as` | `React.ElementType` | `"span"` | The HTML element or React component to render as |
25
- | `ref` | `React.Ref` | - | Forwarded ref to the rendered element |
26
- | `...props` | `React.ComponentPropsWithoutRef<T>` | - | All props valid for the chosen element type |
22
+ | Prop | Type | Default | Description |
23
+ | ---------- | ----------------------------------- | -------- | ------------------------------------------------ |
24
+ | `as` | `React.ElementType` | `"span"` | The HTML element or React component to render as |
25
+ | `ref` | `React.Ref` | - | Forwarded ref to the rendered element |
26
+ | `...props` | `React.ComponentPropsWithoutRef<T>` | - | All props valid for the chosen element type |
27
27
 
28
28
  ## Type Definitions
29
29
 
30
30
  ```tsx
31
31
  export type PolymorphicProps<Props, T extends React.ElementType> = Props & {
32
- as?: T;
32
+ as?: T;
33
33
  } & Omit<React.ComponentPropsWithoutRef<T>, keyof Props | "as" | "ref"> & {
34
- ref?: React.ComponentProps<T>["ref"];
35
- };
34
+ ref?: React.ComponentProps<T>["ref"];
35
+ };
36
36
  ```
37
37
 
38
38
  ## Design Tokens
@@ -61,17 +61,13 @@ None — Polymorph itself applies no styles. It is a structural primitive only.
61
61
  import { useRef } from "react";
62
62
 
63
63
  const MyComponent = () => {
64
- const buttonRef = useRef<HTMLButtonElement>(null);
64
+ const buttonRef = useRef<HTMLButtonElement>(null);
65
65
 
66
- return (
67
- <Polymorph
68
- as="button"
69
- ref={buttonRef}
70
- onClick={() => buttonRef.current?.focus()}
71
- >
72
- Focus Me
73
- </Polymorph>
74
- );
66
+ return (
67
+ <Polymorph as="button" ref={buttonRef} onClick={() => buttonRef.current?.focus()}>
68
+ Focus Me
69
+ </Polymorph>
70
+ );
75
71
  };
76
72
  ```
77
73
 
@@ -79,13 +75,9 @@ const MyComponent = () => {
79
75
 
80
76
  ```tsx
81
77
  const DynamicItem = ({ isLink, href }: { isLink: boolean; href?: string }) => (
82
- <Polymorph
83
- as={isLink ? "a" : "button"}
84
- href={isLink ? href : undefined}
85
- className="text-foreground"
86
- >
87
- {isLink ? "Visit Link" : "Click Button"}
88
- </Polymorph>
78
+ <Polymorph as={isLink ? "a" : "button"} href={isLink ? href : undefined} className="text-foreground">
79
+ {isLink ? "Visit Link" : "Click Button"}
80
+ </Polymorph>
89
81
  );
90
82
  ```
91
83
 
@@ -94,22 +86,14 @@ const DynamicItem = ({ isLink, href }: { isLink: boolean; href?: string }) => (
94
86
  ```tsx
95
87
  import { Polymorph, PolymorphicProps } from "@g4rcez/components";
96
88
 
97
- type CardProps<T extends React.ElementType = "div"> = PolymorphicProps<
98
- { variant?: "default" | "muted" },
99
- T
100
- >;
101
-
102
- const Card = <T extends React.ElementType = "div">({
103
- as,
104
- variant = "default",
105
- className,
106
- ...props
107
- }: CardProps<T>) => (
108
- <Polymorph
109
- as={as ?? "div"}
110
- className={`rounded-card border border-border ${variant === "muted" ? "bg-muted" : "bg-card-background"} ${className ?? ""}`}
111
- {...props}
112
- />
89
+ type CardProps<T extends React.ElementType = "div"> = PolymorphicProps<{ variant?: "default" | "muted" }, T>;
90
+
91
+ const Card = <T extends React.ElementType = "div">({ as, variant = "default", className, ...props }: CardProps<T>) => (
92
+ <Polymorph
93
+ as={as ?? "div"}
94
+ className={`rounded-card border border-border ${variant === "muted" ? "bg-muted" : "bg-card-background"} ${className ?? ""}`}
95
+ {...props}
96
+ />
113
97
  );
114
98
  ```
115
99