@g4rcez/components 4.0.2 → 4.1.2

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 (337) 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.d.ts.map +1 -1
  56. package/dist/components/core/button.js +10 -10
  57. package/dist/components/core/button.js.map +1 -1
  58. package/dist/components/core/button.jsx +79 -0
  59. package/dist/components/core/heading.jsx +4 -0
  60. package/dist/components/core/polymorph.d.ts +1 -1
  61. package/dist/components/core/polymorph.d.ts.map +1 -1
  62. package/dist/components/core/polymorph.jsx +5 -0
  63. package/dist/components/core/render-on-view.jsx +31 -0
  64. package/dist/components/core/resizable.jsx +51 -0
  65. package/dist/components/core/slot.d.ts.map +1 -1
  66. package/dist/components/core/slot.jsx +156 -0
  67. package/dist/components/core/tag.d.ts +1 -1
  68. package/dist/components/core/tag.d.ts.map +1 -1
  69. package/dist/components/core/tag.js +4 -4
  70. package/dist/components/core/tag.js.map +1 -1
  71. package/dist/components/core/tag.jsx +51 -0
  72. package/dist/components/core/typography.jsx +18 -0
  73. package/dist/components/display/alert.d.ts +1 -1
  74. package/dist/components/display/alert.d.ts.map +1 -1
  75. package/dist/components/display/alert.js +48 -46
  76. package/dist/components/display/alert.js.map +1 -1
  77. package/dist/components/display/alert.jsx +61 -0
  78. package/dist/components/display/calendar.js +6 -6
  79. package/dist/components/display/calendar.jsx +299 -0
  80. package/dist/components/display/card.js +2 -2
  81. package/dist/components/display/card.js.map +1 -1
  82. package/dist/components/display/card.jsx +43 -0
  83. package/dist/components/display/empty.jsx +11 -0
  84. package/dist/components/display/list.js +1 -1
  85. package/dist/components/display/list.js.map +1 -1
  86. package/dist/components/display/list.jsx +81 -0
  87. package/dist/components/display/notifications.d.ts +1 -1
  88. package/dist/components/display/notifications.d.ts.map +1 -1
  89. package/dist/components/display/notifications.js +3 -3
  90. package/dist/components/display/notifications.jsx +126 -0
  91. package/dist/components/display/progress.jsx +11 -0
  92. package/dist/components/display/shortcut.jsx +23 -0
  93. package/dist/components/display/skeleton.d.ts.map +1 -1
  94. package/dist/components/display/skeleton.jsx +19 -0
  95. package/dist/components/display/spinner.d.ts.map +1 -1
  96. package/dist/components/display/spinner.jsx +11 -0
  97. package/dist/components/display/stats.js +1 -1
  98. package/dist/components/display/stats.jsx +20 -0
  99. package/dist/components/display/step.jsx +131 -0
  100. package/dist/components/display/tabs.d.ts +1 -1
  101. package/dist/components/display/tabs.d.ts.map +1 -1
  102. package/dist/components/display/tabs.js +2 -2
  103. package/dist/components/display/tabs.jsx +125 -0
  104. package/dist/components/display/timeline.js +1 -1
  105. package/dist/components/display/timeline.jsx +25 -0
  106. package/dist/components/floating/command-palette.d.ts.map +1 -1
  107. package/dist/components/floating/command-palette.jsx +197 -0
  108. package/dist/components/floating/dropdown.d.ts.map +1 -1
  109. package/dist/components/floating/dropdown.js +25 -17
  110. package/dist/components/floating/dropdown.js.map +1 -1
  111. package/dist/components/floating/dropdown.jsx +56 -0
  112. package/dist/components/floating/expand.js +7 -7
  113. package/dist/components/floating/expand.js.map +1 -1
  114. package/dist/components/floating/expand.jsx +44 -0
  115. package/dist/components/floating/menu.js +10 -10
  116. package/dist/components/floating/menu.js.map +1 -1
  117. package/dist/components/floating/menu.jsx +147 -0
  118. package/dist/components/floating/modal.d.ts +4 -4
  119. package/dist/components/floating/modal.d.ts.map +1 -1
  120. package/dist/components/floating/modal.js +106 -102
  121. package/dist/components/floating/modal.js.map +1 -1
  122. package/dist/components/floating/modal.jsx +301 -0
  123. package/dist/components/floating/toolbar.jsx +5 -0
  124. package/dist/components/floating/tooltip.d.ts.map +1 -1
  125. package/dist/components/floating/tooltip.js +14 -14
  126. package/dist/components/floating/tooltip.js.map +1 -1
  127. package/dist/components/floating/tooltip.jsx +58 -0
  128. package/dist/components/floating/wizard.jsx +161 -0
  129. package/dist/components/form/autocomplete.d.ts.map +1 -1
  130. package/dist/components/form/autocomplete.js +6 -6
  131. package/dist/components/form/autocomplete.jsx +278 -0
  132. package/dist/components/form/checkbox.js +1 -1
  133. package/dist/components/form/checkbox.jsx +12 -0
  134. package/dist/components/form/date-picker.d.ts.map +1 -1
  135. package/dist/components/form/date-picker.js +5 -5
  136. package/dist/components/form/date-picker.jsx +115 -0
  137. package/dist/components/form/file-upload.d.ts.map +1 -1
  138. package/dist/components/form/file-upload.js +2 -2
  139. package/dist/components/form/file-upload.jsx +134 -0
  140. package/dist/components/form/form.js.map +1 -1
  141. package/dist/components/form/form.jsx +10 -0
  142. package/dist/components/form/formReset.jsx +17 -0
  143. package/dist/components/form/free-text.d.ts.map +1 -1
  144. package/dist/components/form/free-text.jsx +41 -0
  145. package/dist/components/form/input-field.d.ts +11 -11
  146. package/dist/components/form/input-field.d.ts.map +1 -1
  147. package/dist/components/form/input-field.jsx +58 -0
  148. package/dist/components/form/input.js +1 -1
  149. package/dist/components/form/input.jsx +36 -0
  150. package/dist/components/form/multi-select.d.ts.map +1 -1
  151. package/dist/components/form/multi-select.jsx +336 -0
  152. package/dist/components/form/radiobox.js +1 -1
  153. package/dist/components/form/radiobox.jsx +6 -0
  154. package/dist/components/form/select.js +3 -3
  155. package/dist/components/form/select.jsx +42 -0
  156. package/dist/components/form/slider.jsx +45 -0
  157. package/dist/components/form/switch.js +2 -2
  158. package/dist/components/form/switch.js.map +1 -1
  159. package/dist/components/form/switch.jsx +46 -0
  160. package/dist/components/form/task-list.jsx +26 -0
  161. package/dist/components/form/textarea.jsx +12 -0
  162. package/dist/components/index.d.ts +0 -1
  163. package/dist/components/index.d.ts.map +1 -1
  164. package/dist/components/index.js +44 -0
  165. package/dist/components/page-calendar/calendar-header.jsx +83 -0
  166. package/dist/components/page-calendar/day-view.jsx +94 -0
  167. package/dist/components/page-calendar/event-pill.d.ts.map +1 -1
  168. package/dist/components/page-calendar/event-pill.jsx +25 -0
  169. package/dist/components/page-calendar/index.js +2 -0
  170. package/dist/components/page-calendar/month-view.jsx +46 -0
  171. package/dist/components/page-calendar/page-calendar.jsx +41 -0
  172. package/dist/components/page-calendar/page-calendar.types.js +1 -0
  173. package/dist/components/page-calendar/page-calendar.utils.js +93 -0
  174. package/dist/components/page-calendar/week-view.jsx +71 -0
  175. package/dist/components/table/filter.jsx +141 -0
  176. package/dist/components/table/group.jsx +68 -0
  177. package/dist/components/table/index.d.ts +2 -3
  178. package/dist/components/table/index.d.ts.map +1 -1
  179. package/dist/components/table/index.jsx +60 -0
  180. package/dist/components/table/inner-table.d.ts +2 -3
  181. package/dist/components/table/inner-table.d.ts.map +1 -1
  182. package/dist/components/table/inner-table.jsx +102 -0
  183. package/dist/components/table/metadata.jsx +36 -0
  184. package/dist/components/table/pagination.d.ts +3 -1
  185. package/dist/components/table/pagination.d.ts.map +1 -1
  186. package/dist/components/table/pagination.jsx +74 -0
  187. package/dist/components/table/row.d.ts +4 -5
  188. package/dist/components/table/row.d.ts.map +1 -1
  189. package/dist/components/table/row.jsx +49 -0
  190. package/dist/components/table/sort.d.ts.map +1 -1
  191. package/dist/components/table/sort.jsx +109 -0
  192. package/dist/components/table/table-lib.d.ts +1 -1
  193. package/dist/components/table/table-lib.d.ts.map +1 -1
  194. package/dist/components/table/table-lib.js +83 -0
  195. package/dist/components/table/table.context.jsx +4 -0
  196. package/dist/components/table/table.js +3 -3
  197. package/dist/components/table/thead.jsx +103 -0
  198. package/dist/config/context.js +12 -0
  199. package/dist/config/default-translations.d.ts +4 -0
  200. package/dist/config/default-translations.d.ts.map +1 -1
  201. package/dist/config/default-translations.jsx +87 -0
  202. package/dist/config/default-tweaks.js +4 -0
  203. package/dist/constants.js +2 -0
  204. package/dist/{date-picker-DwNo22lx.js → date-picker-Bnl07nd8.js} +8 -6
  205. package/dist/date-picker-Bnl07nd8.js.map +1 -0
  206. package/dist/{dom-Dl8XH0CK.js → dom-CyQHY7ID.js} +66 -61
  207. package/dist/dom-CyQHY7ID.js.map +1 -0
  208. package/dist/{file-upload-Brf2NkLr.js → file-upload-93d5DR4q.js} +139 -129
  209. package/dist/file-upload-93d5DR4q.js.map +1 -0
  210. package/dist/{floating-ui.react-QNHG9W4N.js → floating-ui.react-M2PGXLDp.js} +8 -8
  211. package/dist/floating-ui.react-M2PGXLDp.js.map +1 -0
  212. package/dist/{fns-D2eyJKd5.js → fns-C7Dt27Qd.js} +2 -2
  213. package/dist/fns-C7Dt27Qd.js.map +1 -0
  214. package/dist/hooks/use-click-outside.js +17 -0
  215. package/dist/hooks/use-color-parser.js +9 -0
  216. package/dist/hooks/use-components-provider.jsx +22 -0
  217. package/dist/hooks/use-debounce.d.ts +3 -3
  218. package/dist/hooks/use-debounce.d.ts.map +1 -1
  219. package/dist/hooks/use-debounce.js +12 -0
  220. package/dist/hooks/use-floating-ref.js +6 -0
  221. package/dist/hooks/use-form.d.ts +14 -13
  222. package/dist/hooks/use-form.d.ts.map +1 -1
  223. package/dist/hooks/use-form.js +563 -0
  224. package/dist/hooks/use-hover.js +18 -0
  225. package/dist/hooks/use-input-id.js +5 -0
  226. package/dist/hooks/use-is-coarse-device.js +12 -0
  227. package/dist/hooks/use-locale.js +10 -0
  228. package/dist/hooks/use-media-query.js +25 -0
  229. package/dist/hooks/use-on-event.js +7 -0
  230. package/dist/hooks/use-parent.js +21 -0
  231. package/dist/hooks/use-preferences.js +23 -0
  232. package/dist/hooks/use-previous.js +9 -0
  233. package/dist/hooks/use-reactive.js +9 -0
  234. package/dist/hooks/use-remove-scroll.d.ts.map +1 -1
  235. package/dist/hooks/use-remove-scroll.js +48 -0
  236. package/dist/hooks/use-resize-observer.js +17 -0
  237. package/dist/hooks/use-stable-ref.js +9 -0
  238. package/dist/hooks/use-swipe.js +17 -0
  239. package/dist/hooks/use-translations.d.ts +4 -0
  240. package/dist/hooks/use-translations.d.ts.map +1 -1
  241. package/dist/hooks/use-translations.js +9 -0
  242. package/dist/hooks/use-tweaks.js +9 -0
  243. package/dist/hooks/use-window-size.js +14 -0
  244. package/dist/index-BJ1ayTam.js +126 -0
  245. package/dist/index-BJ1ayTam.js.map +1 -0
  246. package/dist/index-C-PuFUZi.js.map +1 -1
  247. package/dist/{index-BelDtX5M.js → index-DDeQW0JW.js} +399 -404
  248. package/dist/index-DDeQW0JW.js.map +1 -0
  249. package/dist/index-DE4shK8D.js +215 -0
  250. package/dist/index-DE4shK8D.js.map +1 -0
  251. package/dist/{index-DJSMaZR4.js → index-DlJ_2RBL.js} +2 -2
  252. package/dist/index-DlJ_2RBL.js.map +1 -0
  253. package/dist/index.css +1 -1
  254. package/dist/index.esm-BaIwleSE.js.map +1 -1
  255. package/dist/index.js +20 -8177
  256. package/dist/index.js.map +1 -1
  257. package/dist/{input-CrGrSnUt.js → input-_MVxmIpu.js} +116 -114
  258. package/dist/input-_MVxmIpu.js.map +1 -0
  259. package/dist/{input-field-5vYcz5tT.js → input-field-CDCOODOl.js} +63 -47
  260. package/dist/input-field-CDCOODOl.js.map +1 -0
  261. package/dist/lib/combi-keys.js +60 -0
  262. package/dist/lib/dict.d.ts +1 -4
  263. package/dist/lib/dict.d.ts.map +1 -1
  264. package/dist/lib/dict.js +28 -0
  265. package/dist/lib/dom.d.ts +3 -2
  266. package/dist/lib/dom.d.ts.map +1 -1
  267. package/dist/lib/dom.js +66 -0
  268. package/dist/lib/fns.js +46 -0
  269. package/dist/lib/fzf.d.ts.map +1 -1
  270. package/dist/lib/fzf.js +115 -0
  271. package/dist/lib/keyboard-area.js +14 -0
  272. package/dist/notifications-Dp0ydKJS.js +2576 -0
  273. package/dist/notifications-Dp0ydKJS.js.map +1 -0
  274. package/dist/polymorph-B5n9fs_K.js.map +1 -1
  275. package/dist/preset/plugin.tailwind.d.ts.map +1 -1
  276. package/dist/preset/plugin.tailwind.js +20 -18
  277. package/dist/preset/preset.tailwind.js +24 -25
  278. package/dist/preset/src/styles/common.js +6 -3
  279. package/dist/preset/src/styles/dark.d.ts.map +1 -1
  280. package/dist/preset/src/styles/dark.js +9 -5
  281. package/dist/preset/src/styles/design-tokens.js +68 -89
  282. package/dist/preset/src/styles/light.d.ts.map +1 -1
  283. package/dist/preset/src/styles/light.js +9 -5
  284. package/dist/preset/src/styles/theme.js +7 -4
  285. package/dist/preset/src/styles/theme.types.d.ts +2 -1
  286. package/dist/preset/src/styles/theme.types.d.ts.map +1 -1
  287. package/dist/preset/src/styles/theme.types.js +2 -1
  288. package/dist/skeleton-BjJobYYf.js +24 -0
  289. package/dist/skeleton-BjJobYYf.js.map +1 -0
  290. package/dist/slot-CRyweuj0.js.map +1 -1
  291. package/dist/styles/common.js +6 -3
  292. package/dist/styles/dark.d.ts.map +1 -1
  293. package/dist/styles/dark.js +9 -5
  294. package/dist/styles/design-tokens.js +68 -89
  295. package/dist/styles/light.d.ts.map +1 -1
  296. package/dist/styles/light.js +9 -5
  297. package/dist/styles/theme.js +7 -4
  298. package/dist/styles/theme.types.d.ts +2 -1
  299. package/dist/styles/theme.types.d.ts.map +1 -1
  300. package/dist/styles/theme.types.js +2 -1
  301. package/dist/tabs-B0g7YtQv.js +123 -0
  302. package/dist/tabs-B0g7YtQv.js.map +1 -0
  303. package/dist/tsconfig.lib.tsbuildinfo +1 -0
  304. package/dist/types.d.ts +2 -2
  305. package/dist/types.d.ts.map +1 -1
  306. package/dist/types.js +1 -0
  307. package/dist/{context-BFXNJVn2.js → use-translations-DSltA7H_.js} +38 -30
  308. package/dist/use-translations-DSltA7H_.js.map +1 -0
  309. package/package.json +99 -86
  310. package/ai/docs/TransferList.md +0 -142
  311. package/dist/autocomplete-Cn9Z2hLq.js +0 -375
  312. package/dist/autocomplete-Cn9Z2hLq.js.map +0 -1
  313. package/dist/calendar-B5lSd0ID.js.map +0 -1
  314. package/dist/components/form/transfer-list.d.ts +0 -14
  315. package/dist/components/form/transfer-list.d.ts.map +0 -1
  316. package/dist/components/form/transfer-list.js +0 -55
  317. package/dist/components/form/transfer-list.js.map +0 -1
  318. package/dist/context-BFXNJVn2.js.map +0 -1
  319. package/dist/date-picker-DwNo22lx.js.map +0 -1
  320. package/dist/dom-Dl8XH0CK.js.map +0 -1
  321. package/dist/file-upload-Brf2NkLr.js.map +0 -1
  322. package/dist/floating-ui.react-QNHG9W4N.js.map +0 -1
  323. package/dist/fns-D2eyJKd5.js.map +0 -1
  324. package/dist/index-BelDtX5M.js.map +0 -1
  325. package/dist/index-DJSMaZR4.js.map +0 -1
  326. package/dist/index-Z-fZHxfJ.js +0 -335
  327. package/dist/index-Z-fZHxfJ.js.map +0 -1
  328. package/dist/input-CrGrSnUt.js.map +0 -1
  329. package/dist/input-field-5vYcz5tT.js.map +0 -1
  330. package/dist/notifications-cUdVPs-B.js +0 -2786
  331. package/dist/notifications-cUdVPs-B.js.map +0 -1
  332. package/dist/skeleton-D75GFBV6.js +0 -10
  333. package/dist/skeleton-D75GFBV6.js.map +0 -1
  334. package/dist/tabs-S00a8qq8.js +0 -106
  335. package/dist/tabs-S00a8qq8.js.map +0 -1
  336. package/dist/use-translations-BwLKTrZv.js +0 -10
  337. package/dist/use-translations-BwLKTrZv.js.map +0 -1
@@ -19,18 +19,18 @@ import { CommandPalette } from "@g4rcez/components";
19
19
 
20
20
  ## Props
21
21
 
22
- | Prop | Type | Default | Description |
23
- |------|------|---------|-------------|
24
- | `open` | `boolean` | — | Controlled open state |
25
- | `commands` | `CommandItemTypes[]` | — | Array of commands to display |
26
- | `onChangeVisibility` | `(next: boolean) => void` | — | Open/close handler |
27
- | `bind` | `string` | `"Mod + k"` | Global keyboard shortcut to open the palette |
28
- | `loading` | `boolean` | `false` | Show loading skeleton while commands load |
29
- | `emptyMessage` | `Label` | — | Message shown when no results match |
30
- | `footer` | `React.ReactElement` | — | Custom footer content |
31
- | `onChangeText` | `(text: string) => void` | — | Search text change handler |
32
- | `Preview` | `React.FC<{ command: CommandItemTypes; text: string }>` | — | Preview panel component for the active command |
33
- | `Icon` | `React.FC<IconProps & { text: string; Default: React.FC<IconProps> }>` | — | Custom search icon |
22
+ | Prop | Type | Default | Description |
23
+ | -------------------- | ---------------------------------------------------------------------- | ----------- | ---------------------------------------------- |
24
+ | `open` | `boolean` | — | Controlled open state |
25
+ | `commands` | `CommandItemTypes[]` | — | Array of commands to display |
26
+ | `onChangeVisibility` | `(next: boolean) => void` | — | Open/close handler |
27
+ | `bind` | `string` | `"Mod + k"` | Global keyboard shortcut to open the palette |
28
+ | `loading` | `boolean` | `false` | Show loading skeleton while commands load |
29
+ | `emptyMessage` | `Label` | — | Message shown when no results match |
30
+ | `footer` | `React.ReactElement` | — | Custom footer content |
31
+ | `onChangeText` | `(text: string) => void` | — | Search text change handler |
32
+ | `Preview` | `React.FC<{ command: CommandItemTypes; text: string }>` | — | Preview panel component for the active command |
33
+ | `Icon` | `React.FC<IconProps & { text: string; Default: React.FC<IconProps> }>` | — | Custom search icon |
34
34
 
35
35
  ## Command Types
36
36
 
@@ -38,18 +38,18 @@ import { CommandPalette } from "@g4rcez/components";
38
38
 
39
39
  ```tsx
40
40
  type CommandShortcutItem = {
41
- type: "shortcut";
42
- title: string | ((props: { text: string }) => string);
43
- hint?: string | string[];
44
- shortcut?: string;
45
- Icon?: React.ReactElement;
46
- enabled?: boolean | ((props: { text: string }) => boolean);
47
- action: (args: {
48
- text: string;
49
- setText: (state: string) => void;
50
- setOpen: (state: boolean) => void;
51
- event: KeyboardEvent | React.MouseEvent | React.KeyboardEvent;
52
- }) => void | Promise<void>;
41
+ type: "shortcut";
42
+ title: string | ((props: { text: string }) => string);
43
+ hint?: string | string[];
44
+ shortcut?: string;
45
+ Icon?: React.ReactElement;
46
+ enabled?: boolean | ((props: { text: string }) => boolean);
47
+ action: (args: {
48
+ text: string;
49
+ setText: (state: string) => void;
50
+ setOpen: (state: boolean) => void;
51
+ event: KeyboardEvent | React.MouseEvent | React.KeyboardEvent;
52
+ }) => void | Promise<void>;
53
53
  };
54
54
  ```
55
55
 
@@ -57,9 +57,9 @@ type CommandShortcutItem = {
57
57
 
58
58
  ```tsx
59
59
  type CommandGroupItem = {
60
- type: "group";
61
- title: string | ((props: { text: string }) => string);
62
- items: CommandItemTypes[];
60
+ type: "group";
61
+ title: string | ((props: { text: string }) => string);
62
+ items: CommandItemTypes[];
63
63
  };
64
64
  ```
65
65
 
@@ -67,13 +67,13 @@ type CommandGroupItem = {
67
67
 
68
68
  Tokens this component reads. Customize by overriding these CSS variables in your theme.
69
69
 
70
- | Token | CSS Variable | Purpose |
71
- |-------|-------------|---------|
72
- | `bg-floating-background` | `--floating-background` | Palette surface background |
73
- | `border-floating-border` | `--floating-border` | Palette surface border |
74
- | `bg-floating-hover` | `--floating-hover` | Hovered/active command item background |
75
- | `z-floating` | `--z-floating` | Z-index for the search header |
76
- | `text-secondary` | `--secondary` | Group label and empty state text color |
70
+ | Token | CSS Variable | Purpose |
71
+ | ------------------------ | ----------------------- | -------------------------------------- |
72
+ | `bg-floating-background` | `--floating-background` | Palette surface background |
73
+ | `border-floating-border` | `--floating-border` | Palette surface border |
74
+ | `bg-floating-hover` | `--floating-hover` | Hovered/active command item background |
75
+ | `z-floating` | `--z-floating` | Z-index for the search header |
76
+ | `text-secondary` | `--secondary` | Group label and empty state text color |
77
77
 
78
78
  ## Examples
79
79
 
@@ -85,48 +85,42 @@ import { FileTextIcon, FloppyDiskIcon, FolderOpenIcon } from "@phosphor-icons/re
85
85
  import { CommandPalette } from "@g4rcez/components";
86
86
 
87
87
  function BasicCommandPalette() {
88
- const [open, setOpen] = useState(false);
88
+ const [open, setOpen] = useState(false);
89
89
 
90
- const commands = [
91
- {
92
- type: "shortcut" as const,
93
- title: "New Document",
94
- shortcut: "Ctrl+N",
95
- Icon: <FileTextIcon size={16} />,
96
- action: ({ setOpen }) => {
97
- console.log("Creating new document");
98
- setOpen(false);
99
- },
100
- },
101
- {
102
- type: "shortcut" as const,
103
- title: "Save Document",
104
- shortcut: "Ctrl+S",
105
- Icon: <FloppyDiskIcon size={16} />,
106
- action: ({ setOpen }) => {
107
- console.log("Saving document");
108
- setOpen(false);
109
- },
110
- },
111
- {
112
- type: "shortcut" as const,
113
- title: "Open File",
114
- shortcut: "Ctrl+O",
115
- Icon: <FolderOpenIcon size={16} />,
116
- action: ({ setOpen }) => {
117
- console.log("Opening file");
118
- setOpen(false);
119
- },
120
- },
121
- ];
122
-
123
- return (
124
- <CommandPalette
125
- open={open}
126
- commands={commands}
127
- onChangeVisibility={setOpen}
128
- />
129
- );
90
+ const commands = [
91
+ {
92
+ type: "shortcut" as const,
93
+ title: "New Document",
94
+ shortcut: "Ctrl+N",
95
+ Icon: <FileTextIcon size={16} />,
96
+ action: ({ setOpen }) => {
97
+ console.log("Creating new document");
98
+ setOpen(false);
99
+ },
100
+ },
101
+ {
102
+ type: "shortcut" as const,
103
+ title: "Save Document",
104
+ shortcut: "Ctrl+S",
105
+ Icon: <FloppyDiskIcon size={16} />,
106
+ action: ({ setOpen }) => {
107
+ console.log("Saving document");
108
+ setOpen(false);
109
+ },
110
+ },
111
+ {
112
+ type: "shortcut" as const,
113
+ title: "Open File",
114
+ shortcut: "Ctrl+O",
115
+ Icon: <FolderOpenIcon size={16} />,
116
+ action: ({ setOpen }) => {
117
+ console.log("Opening file");
118
+ setOpen(false);
119
+ },
120
+ },
121
+ ];
122
+
123
+ return <CommandPalette open={open} commands={commands} onChangeVisibility={setOpen} />;
130
124
  }
131
125
  ```
132
126
 
@@ -137,95 +131,83 @@ import { FileIcon, FolderOpenIcon, HouseIcon, GearIcon, MoonIcon } from "@phosph
137
131
  import { CommandPalette } from "@g4rcez/components";
138
132
 
139
133
  function GroupedCommandPalette() {
140
- const [open, setOpen] = useState(false);
134
+ const [open, setOpen] = useState(false);
141
135
 
142
- const commands = [
143
- {
144
- type: "group" as const,
145
- title: "File Operations",
146
- items: [
147
- {
148
- type: "shortcut" as const,
149
- title: "New File",
150
- hint: ["create", "new", "file"],
151
- shortcut: "Ctrl+N",
152
- Icon: <FileIcon size={16} />,
153
- action: ({ setOpen }) => setOpen(false),
154
- },
136
+ const commands = [
155
137
  {
156
- type: "shortcut" as const,
157
- title: "Open File",
158
- hint: ["open", "load"],
159
- shortcut: "Ctrl+O",
160
- Icon: <FolderOpenIcon size={16} />,
161
- action: ({ setOpen }) => setOpen(false),
162
- },
163
- ],
164
- },
165
- {
166
- type: "group" as const,
167
- title: "Navigation",
168
- items: [
169
- {
170
- type: "shortcut" as const,
171
- title: "Go to Dashboard",
172
- hint: ["dashboard", "home", "main"],
173
- Icon: <HouseIcon size={16} />,
174
- action: ({ setOpen }) => {
175
- window.location.href = "/dashboard";
176
- setOpen(false);
177
- },
138
+ type: "group" as const,
139
+ title: "File Operations",
140
+ items: [
141
+ {
142
+ type: "shortcut" as const,
143
+ title: "New File",
144
+ hint: ["create", "new", "file"],
145
+ shortcut: "Ctrl+N",
146
+ Icon: <FileIcon size={16} />,
147
+ action: ({ setOpen }) => setOpen(false),
148
+ },
149
+ {
150
+ type: "shortcut" as const,
151
+ title: "Open File",
152
+ hint: ["open", "load"],
153
+ shortcut: "Ctrl+O",
154
+ Icon: <FolderOpenIcon size={16} />,
155
+ action: ({ setOpen }) => setOpen(false),
156
+ },
157
+ ],
178
158
  },
179
159
  {
180
- type: "shortcut" as const,
181
- title: "Go to Settings",
182
- hint: ["settings", "preferences", "config"],
183
- Icon: <GearIcon size={16} />,
184
- action: ({ setOpen }) => {
185
- window.location.href = "/settings";
186
- setOpen(false);
187
- },
160
+ type: "group" as const,
161
+ title: "Navigation",
162
+ items: [
163
+ {
164
+ type: "shortcut" as const,
165
+ title: "Go to Dashboard",
166
+ hint: ["dashboard", "home", "main"],
167
+ Icon: <HouseIcon size={16} />,
168
+ action: ({ setOpen }) => {
169
+ window.location.href = "/dashboard";
170
+ setOpen(false);
171
+ },
172
+ },
173
+ {
174
+ type: "shortcut" as const,
175
+ title: "Go to Settings",
176
+ hint: ["settings", "preferences", "config"],
177
+ Icon: <GearIcon size={16} />,
178
+ action: ({ setOpen }) => {
179
+ window.location.href = "/settings";
180
+ setOpen(false);
181
+ },
182
+ },
183
+ ],
188
184
  },
189
- ],
190
- },
191
- {
192
- type: "group" as const,
193
- title: "Theme",
194
- items: [
195
185
  {
196
- type: "shortcut" as const,
197
- title: "Toggle Dark Mode",
198
- hint: ["dark", "theme", "mode"],
199
- Icon: <MoonIcon size={16} />,
200
- action: ({ setOpen }) => {
201
- document.documentElement.classList.toggle("dark");
202
- setOpen(false);
203
- },
186
+ type: "group" as const,
187
+ title: "Theme",
188
+ items: [
189
+ {
190
+ type: "shortcut" as const,
191
+ title: "Toggle Dark Mode",
192
+ hint: ["dark", "theme", "mode"],
193
+ Icon: <MoonIcon size={16} />,
194
+ action: ({ setOpen }) => {
195
+ document.documentElement.classList.toggle("dark");
196
+ setOpen(false);
197
+ },
198
+ },
199
+ ],
204
200
  },
205
- ],
206
- },
207
- ];
208
-
209
- return (
210
- <CommandPalette
211
- open={open}
212
- commands={commands}
213
- onChangeVisibility={setOpen}
214
- emptyMessage="No commands found"
215
- />
216
- );
201
+ ];
202
+
203
+ return <CommandPalette open={open} commands={commands} onChangeVisibility={setOpen} emptyMessage="No commands found" />;
217
204
  }
218
205
  ```
219
206
 
220
207
  ### Custom Keyboard Shortcut
221
208
 
222
209
  ```tsx
223
- <CommandPalette
224
- open={open}
225
- commands={commands}
226
- onChangeVisibility={setOpen}
227
- bind="Mod + /"
228
- />
210
+ <CommandPalette open={open} commands={commands} onChangeVisibility={setOpen} bind="Mod + /" />
229
211
  ```
230
212
 
231
213
  ### Conditional Commands
@@ -234,22 +216,22 @@ function GroupedCommandPalette() {
234
216
  import { UserIcon, ShieldIcon } from "@phosphor-icons/react";
235
217
 
236
218
  const commands = [
237
- {
238
- type: "shortcut" as const,
239
- title: "User Dashboard",
240
- Icon: <UserIcon size={16} />,
241
- action: ({ setOpen }) => setOpen(false),
242
- },
243
- {
244
- type: "shortcut" as const,
245
- title: "Admin Panel",
246
- enabled: user.isAdmin,
247
- Icon: <ShieldIcon size={16} />,
248
- action: ({ setOpen }) => {
249
- console.log("Opening admin panel");
250
- setOpen(false);
219
+ {
220
+ type: "shortcut" as const,
221
+ title: "User Dashboard",
222
+ Icon: <UserIcon size={16} />,
223
+ action: ({ setOpen }) => setOpen(false),
224
+ },
225
+ {
226
+ type: "shortcut" as const,
227
+ title: "Admin Panel",
228
+ enabled: user.isAdmin,
229
+ Icon: <ShieldIcon size={16} />,
230
+ action: ({ setOpen }) => {
231
+ console.log("Opening admin panel");
232
+ setOpen(false);
233
+ },
251
234
  },
252
- },
253
235
  ];
254
236
  ```
255
237
 
@@ -277,12 +259,12 @@ const commands = [
277
259
 
278
260
  ## Data Attributes
279
261
 
280
- | Attribute | Applied to | Description |
281
- |-----------|-----------|-------------|
282
- | `data-component="command-palette"` | Root modal container | Identifies the palette root |
283
- | `data-component="command-palette-list"` | `<ul>` | Identifies the command list |
284
- | `data-component="command-palette-item"` | Each `<button>` item | Identifies individual command buttons |
285
- | `data-component="command-palette-container"` | List/preview wrapper | Identifies the content area |
262
+ | Attribute | Applied to | Description |
263
+ | -------------------------------------------- | -------------------- | ------------------------------------- |
264
+ | `data-component="command-palette"` | Root modal container | Identifies the palette root |
265
+ | `data-component="command-palette-list"` | `<ul>` | Identifies the command list |
266
+ | `data-component="command-palette-item"` | Each `<button>` item | Identifies individual command buttons |
267
+ | `data-component="command-palette-container"` | List/preview wrapper | Identifies the content area |
286
268
 
287
269
  ## Notes
288
270
 
@@ -21,37 +21,37 @@ import { DatePicker } from "@g4rcez/components/date-picker";
21
21
 
22
22
  `DatePicker` inherits all `Input` and `Calendar` props. Notable additions:
23
23
 
24
- | Prop | Type | Default | Description |
25
- |------|------|---------|-------------|
26
- | `date` | `Date` | - | Controlled selected date |
27
- | `type` | `"date" \| "datetime"` | `"date"` | Whether to include time (hour + minute) selection |
28
- | `floating` | `boolean` | `true` | Show the calendar in a floating `Dropdown`; set to `false` to embed it inline |
29
- | `clickToClose` | `boolean` | `false` | Close the calendar immediately after a date is picked |
30
- | `locale` | `Locales` | system locale | Locale for mask generation and calendar display |
31
- | `markToday` | `boolean` | `true` | Highlight today in the calendar |
32
- | `disabledDate` | `(date: Date) => boolean` | - | Callback that returns `true` for dates that should be unselectable |
33
- | `onChange` | `(date: Date \| undefined) => void` | - | Called with the new `Date` when input is valid, or `undefined` when cleared |
34
- | `title` | `string` | - | Field label |
35
- | `error` | `string` | - | Error message shown below the field |
36
- | `required` | `boolean` | `true` | Marks field as required (default is `true` for DatePicker) |
37
- | `name` | `string` | - | Form field name — also the `id` of the hidden `<input type="date">` |
24
+ | Prop | Type | Default | Description |
25
+ | -------------- | ----------------------------------- | ------------- | ----------------------------------------------------------------------------- |
26
+ | `date` | `Date` | - | Controlled selected date |
27
+ | `type` | `"date" \| "datetime"` | `"date"` | Whether to include time (hour + minute) selection |
28
+ | `floating` | `boolean` | `true` | Show the calendar in a floating `Dropdown`; set to `false` to embed it inline |
29
+ | `clickToClose` | `boolean` | `false` | Close the calendar immediately after a date is picked |
30
+ | `locale` | `Locales` | system locale | Locale for mask generation and calendar display |
31
+ | `markToday` | `boolean` | `true` | Highlight today in the calendar |
32
+ | `disabledDate` | `(date: Date) => boolean` | - | Callback that returns `true` for dates that should be unselectable |
33
+ | `onChange` | `(date: Date \| undefined) => void` | - | Called with the new `Date` when input is valid, or `undefined` when cleared |
34
+ | `title` | `string` | - | Field label |
35
+ | `error` | `string` | - | Error message shown below the field |
36
+ | `required` | `boolean` | `true` | Marks field as required (default is `true` for DatePicker) |
37
+ | `name` | `string` | - | Form field name — also the `id` of the hidden `<input type="date">` |
38
38
 
39
39
  ## Design Tokens
40
40
 
41
41
  Tokens this component reads. Customize by overriding these CSS variables in your theme.
42
42
 
43
- | Token | CSS Variable | Purpose |
44
- |-------|-------------|---------|
45
- | `h-input-height` | `--input-height` | Input height |
46
- | `px-input-x` | `--input-x` | Horizontal input padding |
47
- | `py-input-y` | `--input-y` | Vertical input padding |
48
- | `border-input-border` | `--input-border` | Default border color |
49
- | `text-foreground` | `--foreground` | Input text color |
50
- | `text-primary` | `--primary` | Focus ring and border on focus/hover |
51
- | `text-danger` | `--danger` | Error state text and border |
52
- | `placeholder-input-mask` | `--input-mask` | Placeholder text color |
53
- | `bg-floating-background` | `--floating-background` | Calendar dropdown background |
54
- | `border-floating-border` | `--floating-border` | Calendar dropdown border |
43
+ | Token | CSS Variable | Purpose |
44
+ | ------------------------ | ----------------------- | ------------------------------------ |
45
+ | `h-input-height` | `--input-height` | Input height |
46
+ | `px-input-x` | `--input-x` | Horizontal input padding |
47
+ | `py-input-y` | `--input-y` | Vertical input padding |
48
+ | `border-input-border` | `--input-border` | Default border color |
49
+ | `text-foreground` | `--foreground` | Input text color |
50
+ | `text-primary` | `--primary` | Focus ring and border on focus/hover |
51
+ | `text-danger` | `--danger` | Error state text and border |
52
+ | `placeholder-input-mask` | `--input-mask` | Placeholder text color |
53
+ | `bg-floating-background` | `--floating-background` | Calendar dropdown background |
54
+ | `border-floating-border` | `--floating-border` | Calendar dropdown border |
55
55
 
56
56
  ## Examples
57
57
 
@@ -60,21 +60,13 @@ Tokens this component reads. Customize by overriding these CSS variables in your
60
60
  ```tsx
61
61
  import { DatePicker } from "@g4rcez/components/date-picker";
62
62
 
63
- <DatePicker
64
- name="birthdate"
65
- title="Date of birth"
66
- />
63
+ <DatePicker name="birthdate" title="Date of birth" />;
67
64
  ```
68
65
 
69
66
  ### Date and time
70
67
 
71
68
  ```tsx
72
- <DatePicker
73
- name="appointment"
74
- title="Appointment time"
75
- type="datetime"
76
- clickToClose
77
- />
69
+ <DatePicker name="appointment" title="Appointment time" type="datetime" clickToClose />
78
70
  ```
79
71
 
80
72
  ### Disabling past dates
@@ -82,11 +74,7 @@ import { DatePicker } from "@g4rcez/components/date-picker";
82
74
  ```tsx
83
75
  import { isBefore, startOfDay } from "date-fns";
84
76
 
85
- <DatePicker
86
- name="event_date"
87
- title="Event date"
88
- disabledDate={(date) => isBefore(date, startOfDay(new Date()))}
89
- />
77
+ <DatePicker name="event_date" title="Event date" disabledDate={(date) => isBefore(date, startOfDay(new Date()))} />;
90
78
  ```
91
79
 
92
80
  ### Controlled value
@@ -94,22 +82,13 @@ import { isBefore, startOfDay } from "date-fns";
94
82
  ```tsx
95
83
  const [date, setDate] = useState<Date | undefined>();
96
84
 
97
- <DatePicker
98
- name="due_date"
99
- title="Due date"
100
- date={date}
101
- onChange={setDate}
102
- />
85
+ <DatePicker name="due_date" title="Due date" date={date} onChange={setDate} />;
103
86
  ```
104
87
 
105
88
  ### Inline calendar (no dropdown)
106
89
 
107
90
  ```tsx
108
- <DatePicker
109
- name="check_in"
110
- title="Check-in"
111
- floating={false}
112
- />
91
+ <DatePicker name="check_in" title="Check-in" floating={false} />
113
92
  ```
114
93
 
115
94
  ### Inside a form
@@ -119,18 +98,20 @@ import { Form } from "@g4rcez/components/form";
119
98
  import { Button } from "@g4rcez/components/button";
120
99
 
121
100
  function BookingForm() {
122
- const handleSubmit = (e: React.FormEvent<HTMLFormElement>) => {
123
- const data = new FormData(e.currentTarget);
124
- console.log(data.get("check_in"), data.get("check_out"));
125
- };
126
-
127
- return (
128
- <Form onSubmit={handleSubmit} className="flex flex-col gap-base">
129
- <DatePicker name="check_in" title="Check-in" />
130
- <DatePicker name="check_out" title="Check-out" />
131
- <Button theme="primary" type="submit">Book</Button>
132
- </Form>
133
- );
101
+ const handleSubmit = (e: React.FormEvent<HTMLFormElement>) => {
102
+ const data = new FormData(e.currentTarget);
103
+ console.log(data.get("check_in"), data.get("check_out"));
104
+ };
105
+
106
+ return (
107
+ <Form onSubmit={handleSubmit} className="flex flex-col gap-base">
108
+ <DatePicker name="check_in" title="Check-in" />
109
+ <DatePicker name="check_out" title="Check-out" />
110
+ <Button theme="primary" type="submit">
111
+ Book
112
+ </Button>
113
+ </Form>
114
+ );
134
115
  }
135
116
  ```
136
117