@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.
- package/ai/SKILL.md +120 -153
- package/ai/docs/Alert.md +47 -48
- package/ai/docs/AnimatedList.md +88 -87
- package/ai/docs/Autocomplete.md +102 -106
- package/ai/docs/Button.md +33 -33
- package/ai/docs/Calendar.md +67 -101
- package/ai/docs/Card.md +59 -55
- package/ai/docs/Checkbox.md +77 -82
- package/ai/docs/CommandPalette.md +154 -172
- package/ai/docs/DatePicker.md +45 -64
- package/ai/docs/Dropdown.md +98 -126
- package/ai/docs/Empty.md +41 -44
- package/ai/docs/Expand.md +40 -54
- package/ai/docs/FileUpload.md +102 -109
- package/ai/docs/Form.md +35 -29
- package/ai/docs/FormReset.md +37 -37
- package/ai/docs/Heading.md +4 -6
- package/ai/docs/Input.md +73 -98
- package/ai/docs/InputField.md +67 -67
- package/ai/docs/List.md +88 -85
- package/ai/docs/Menu.md +62 -60
- package/ai/docs/Modal.md +129 -136
- package/ai/docs/MultiSelect.md +65 -84
- package/ai/docs/Notifications.md +96 -96
- package/ai/docs/PageCalendar.md +88 -97
- package/ai/docs/Polymorph.md +25 -41
- package/ai/docs/Progress.md +55 -51
- package/ai/docs/Radiobox.md +49 -41
- package/ai/docs/RenderOnView.md +26 -32
- package/ai/docs/Resizable.md +60 -65
- package/ai/docs/Select.md +158 -158
- package/ai/docs/Shortcut.md +14 -14
- package/ai/docs/Skeleton.md +56 -60
- package/ai/docs/Slider.md +26 -49
- package/ai/docs/Slot.md +15 -17
- package/ai/docs/Spinner.md +17 -15
- package/ai/docs/Stats.md +44 -42
- package/ai/docs/Step.md +60 -60
- package/ai/docs/Switch.md +44 -54
- package/ai/docs/Table.md +124 -136
- package/ai/docs/Tabs.md +90 -90
- package/ai/docs/Tag.md +63 -65
- package/ai/docs/TaskList.md +40 -50
- package/ai/docs/Textarea.md +47 -70
- package/ai/docs/Timeline.md +98 -96
- package/ai/docs/Toolbar.md +46 -46
- package/ai/docs/Tooltip.md +103 -103
- package/ai/docs/Typography.md +55 -55
- package/ai/docs/Wizard.md +104 -109
- package/ai/docs/index.md +116 -116
- package/dist/autocomplete-DcTNOwyg.js +393 -0
- package/dist/autocomplete-DcTNOwyg.js.map +1 -0
- package/dist/{calendar-B5lSd0ID.js → calendar-BJMHRoy2.js} +104 -105
- package/dist/calendar-BJMHRoy2.js.map +1 -0
- package/dist/components/core/button.d.ts.map +1 -1
- package/dist/components/core/button.js +10 -10
- package/dist/components/core/button.js.map +1 -1
- package/dist/components/core/button.jsx +79 -0
- package/dist/components/core/heading.jsx +4 -0
- package/dist/components/core/polymorph.d.ts +1 -1
- package/dist/components/core/polymorph.d.ts.map +1 -1
- package/dist/components/core/polymorph.jsx +5 -0
- package/dist/components/core/render-on-view.jsx +31 -0
- package/dist/components/core/resizable.jsx +51 -0
- package/dist/components/core/slot.d.ts.map +1 -1
- package/dist/components/core/slot.jsx +156 -0
- package/dist/components/core/tag.d.ts +1 -1
- package/dist/components/core/tag.d.ts.map +1 -1
- package/dist/components/core/tag.js +4 -4
- package/dist/components/core/tag.js.map +1 -1
- package/dist/components/core/tag.jsx +51 -0
- package/dist/components/core/typography.jsx +18 -0
- package/dist/components/display/alert.d.ts +1 -1
- package/dist/components/display/alert.d.ts.map +1 -1
- package/dist/components/display/alert.js +48 -46
- package/dist/components/display/alert.js.map +1 -1
- package/dist/components/display/alert.jsx +61 -0
- package/dist/components/display/calendar.js +6 -6
- package/dist/components/display/calendar.jsx +299 -0
- package/dist/components/display/card.js +2 -2
- package/dist/components/display/card.js.map +1 -1
- package/dist/components/display/card.jsx +43 -0
- package/dist/components/display/empty.jsx +11 -0
- package/dist/components/display/list.js +1 -1
- package/dist/components/display/list.js.map +1 -1
- package/dist/components/display/list.jsx +81 -0
- package/dist/components/display/notifications.d.ts +1 -1
- package/dist/components/display/notifications.d.ts.map +1 -1
- package/dist/components/display/notifications.js +3 -3
- package/dist/components/display/notifications.jsx +126 -0
- package/dist/components/display/progress.jsx +11 -0
- package/dist/components/display/shortcut.jsx +23 -0
- package/dist/components/display/skeleton.d.ts.map +1 -1
- package/dist/components/display/skeleton.jsx +19 -0
- package/dist/components/display/spinner.d.ts.map +1 -1
- package/dist/components/display/spinner.jsx +11 -0
- package/dist/components/display/stats.js +1 -1
- package/dist/components/display/stats.jsx +20 -0
- package/dist/components/display/step.jsx +131 -0
- package/dist/components/display/tabs.d.ts +1 -1
- package/dist/components/display/tabs.d.ts.map +1 -1
- package/dist/components/display/tabs.js +2 -2
- package/dist/components/display/tabs.jsx +125 -0
- package/dist/components/display/timeline.js +1 -1
- package/dist/components/display/timeline.jsx +25 -0
- package/dist/components/floating/command-palette.d.ts.map +1 -1
- package/dist/components/floating/command-palette.jsx +197 -0
- package/dist/components/floating/dropdown.d.ts.map +1 -1
- package/dist/components/floating/dropdown.js +25 -17
- package/dist/components/floating/dropdown.js.map +1 -1
- package/dist/components/floating/dropdown.jsx +56 -0
- package/dist/components/floating/expand.js +7 -7
- package/dist/components/floating/expand.js.map +1 -1
- package/dist/components/floating/expand.jsx +44 -0
- package/dist/components/floating/menu.js +10 -10
- package/dist/components/floating/menu.js.map +1 -1
- package/dist/components/floating/menu.jsx +147 -0
- package/dist/components/floating/modal.d.ts +4 -4
- package/dist/components/floating/modal.d.ts.map +1 -1
- package/dist/components/floating/modal.js +106 -102
- package/dist/components/floating/modal.js.map +1 -1
- package/dist/components/floating/modal.jsx +301 -0
- package/dist/components/floating/toolbar.jsx +5 -0
- package/dist/components/floating/tooltip.d.ts.map +1 -1
- package/dist/components/floating/tooltip.js +14 -14
- package/dist/components/floating/tooltip.js.map +1 -1
- package/dist/components/floating/tooltip.jsx +58 -0
- package/dist/components/floating/wizard.jsx +161 -0
- package/dist/components/form/autocomplete.d.ts.map +1 -1
- package/dist/components/form/autocomplete.js +6 -6
- package/dist/components/form/autocomplete.jsx +278 -0
- package/dist/components/form/checkbox.js +1 -1
- package/dist/components/form/checkbox.jsx +12 -0
- package/dist/components/form/date-picker.d.ts.map +1 -1
- package/dist/components/form/date-picker.js +5 -5
- package/dist/components/form/date-picker.jsx +115 -0
- package/dist/components/form/file-upload.d.ts.map +1 -1
- package/dist/components/form/file-upload.js +2 -2
- package/dist/components/form/file-upload.jsx +134 -0
- package/dist/components/form/form.js.map +1 -1
- package/dist/components/form/form.jsx +10 -0
- package/dist/components/form/formReset.jsx +17 -0
- package/dist/components/form/free-text.d.ts.map +1 -1
- package/dist/components/form/free-text.jsx +41 -0
- package/dist/components/form/input-field.d.ts +11 -11
- package/dist/components/form/input-field.d.ts.map +1 -1
- package/dist/components/form/input-field.jsx +58 -0
- package/dist/components/form/input.js +1 -1
- package/dist/components/form/input.jsx +36 -0
- package/dist/components/form/multi-select.d.ts.map +1 -1
- package/dist/components/form/multi-select.jsx +336 -0
- package/dist/components/form/radiobox.js +1 -1
- package/dist/components/form/radiobox.jsx +6 -0
- package/dist/components/form/select.js +3 -3
- package/dist/components/form/select.jsx +42 -0
- package/dist/components/form/slider.jsx +45 -0
- package/dist/components/form/switch.js +2 -2
- package/dist/components/form/switch.js.map +1 -1
- package/dist/components/form/switch.jsx +46 -0
- package/dist/components/form/task-list.jsx +26 -0
- package/dist/components/form/textarea.jsx +12 -0
- package/dist/components/index.d.ts +0 -1
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +44 -0
- package/dist/components/page-calendar/calendar-header.jsx +83 -0
- package/dist/components/page-calendar/day-view.jsx +94 -0
- package/dist/components/page-calendar/event-pill.d.ts.map +1 -1
- package/dist/components/page-calendar/event-pill.jsx +25 -0
- package/dist/components/page-calendar/index.js +2 -0
- package/dist/components/page-calendar/month-view.jsx +46 -0
- package/dist/components/page-calendar/page-calendar.jsx +41 -0
- package/dist/components/page-calendar/page-calendar.types.js +1 -0
- package/dist/components/page-calendar/page-calendar.utils.js +93 -0
- package/dist/components/page-calendar/week-view.jsx +71 -0
- package/dist/components/table/filter.jsx +141 -0
- package/dist/components/table/group.jsx +68 -0
- package/dist/components/table/index.d.ts +2 -3
- package/dist/components/table/index.d.ts.map +1 -1
- package/dist/components/table/index.jsx +60 -0
- package/dist/components/table/inner-table.d.ts +2 -3
- package/dist/components/table/inner-table.d.ts.map +1 -1
- package/dist/components/table/inner-table.jsx +102 -0
- package/dist/components/table/metadata.jsx +36 -0
- package/dist/components/table/pagination.d.ts +3 -1
- package/dist/components/table/pagination.d.ts.map +1 -1
- package/dist/components/table/pagination.jsx +74 -0
- package/dist/components/table/row.d.ts +4 -5
- package/dist/components/table/row.d.ts.map +1 -1
- package/dist/components/table/row.jsx +49 -0
- package/dist/components/table/sort.d.ts.map +1 -1
- package/dist/components/table/sort.jsx +109 -0
- package/dist/components/table/table-lib.d.ts +1 -1
- package/dist/components/table/table-lib.d.ts.map +1 -1
- package/dist/components/table/table-lib.js +83 -0
- package/dist/components/table/table.context.jsx +4 -0
- package/dist/components/table/table.js +3 -3
- package/dist/components/table/thead.jsx +103 -0
- package/dist/config/context.js +12 -0
- package/dist/config/default-translations.d.ts +4 -0
- package/dist/config/default-translations.d.ts.map +1 -1
- package/dist/config/default-translations.jsx +87 -0
- package/dist/config/default-tweaks.js +4 -0
- package/dist/constants.js +2 -0
- package/dist/{date-picker-DwNo22lx.js → date-picker-Bnl07nd8.js} +8 -6
- package/dist/date-picker-Bnl07nd8.js.map +1 -0
- package/dist/{dom-Dl8XH0CK.js → dom-CyQHY7ID.js} +66 -61
- package/dist/dom-CyQHY7ID.js.map +1 -0
- package/dist/{file-upload-Brf2NkLr.js → file-upload-93d5DR4q.js} +139 -129
- package/dist/file-upload-93d5DR4q.js.map +1 -0
- package/dist/{floating-ui.react-QNHG9W4N.js → floating-ui.react-M2PGXLDp.js} +8 -8
- package/dist/floating-ui.react-M2PGXLDp.js.map +1 -0
- package/dist/{fns-D2eyJKd5.js → fns-C7Dt27Qd.js} +2 -2
- package/dist/fns-C7Dt27Qd.js.map +1 -0
- package/dist/hooks/use-click-outside.js +17 -0
- package/dist/hooks/use-color-parser.js +9 -0
- package/dist/hooks/use-components-provider.jsx +22 -0
- package/dist/hooks/use-debounce.d.ts +3 -3
- package/dist/hooks/use-debounce.d.ts.map +1 -1
- package/dist/hooks/use-debounce.js +12 -0
- package/dist/hooks/use-floating-ref.js +6 -0
- package/dist/hooks/use-form.d.ts +14 -13
- package/dist/hooks/use-form.d.ts.map +1 -1
- package/dist/hooks/use-form.js +563 -0
- package/dist/hooks/use-hover.js +18 -0
- package/dist/hooks/use-input-id.js +5 -0
- package/dist/hooks/use-is-coarse-device.js +12 -0
- package/dist/hooks/use-locale.js +10 -0
- package/dist/hooks/use-media-query.js +25 -0
- package/dist/hooks/use-on-event.js +7 -0
- package/dist/hooks/use-parent.js +21 -0
- package/dist/hooks/use-preferences.js +23 -0
- package/dist/hooks/use-previous.js +9 -0
- package/dist/hooks/use-reactive.js +9 -0
- package/dist/hooks/use-remove-scroll.d.ts.map +1 -1
- package/dist/hooks/use-remove-scroll.js +48 -0
- package/dist/hooks/use-resize-observer.js +17 -0
- package/dist/hooks/use-stable-ref.js +9 -0
- package/dist/hooks/use-swipe.js +17 -0
- package/dist/hooks/use-translations.d.ts +4 -0
- package/dist/hooks/use-translations.d.ts.map +1 -1
- package/dist/hooks/use-translations.js +9 -0
- package/dist/hooks/use-tweaks.js +9 -0
- package/dist/hooks/use-window-size.js +14 -0
- package/dist/index-BJ1ayTam.js +126 -0
- package/dist/index-BJ1ayTam.js.map +1 -0
- package/dist/index-C-PuFUZi.js.map +1 -1
- package/dist/{index-BelDtX5M.js → index-DDeQW0JW.js} +399 -404
- package/dist/index-DDeQW0JW.js.map +1 -0
- package/dist/index-DE4shK8D.js +215 -0
- package/dist/index-DE4shK8D.js.map +1 -0
- package/dist/{index-DJSMaZR4.js → index-DlJ_2RBL.js} +2 -2
- package/dist/index-DlJ_2RBL.js.map +1 -0
- package/dist/index.css +1 -1
- package/dist/index.esm-BaIwleSE.js.map +1 -1
- package/dist/index.js +20 -8177
- package/dist/index.js.map +1 -1
- package/dist/{input-CrGrSnUt.js → input-_MVxmIpu.js} +116 -114
- package/dist/input-_MVxmIpu.js.map +1 -0
- package/dist/{input-field-5vYcz5tT.js → input-field-CDCOODOl.js} +63 -47
- package/dist/input-field-CDCOODOl.js.map +1 -0
- package/dist/lib/combi-keys.js +60 -0
- package/dist/lib/dict.d.ts +1 -4
- package/dist/lib/dict.d.ts.map +1 -1
- package/dist/lib/dict.js +28 -0
- package/dist/lib/dom.d.ts +3 -2
- package/dist/lib/dom.d.ts.map +1 -1
- package/dist/lib/dom.js +66 -0
- package/dist/lib/fns.js +46 -0
- package/dist/lib/fzf.d.ts.map +1 -1
- package/dist/lib/fzf.js +115 -0
- package/dist/lib/keyboard-area.js +14 -0
- package/dist/notifications-Dp0ydKJS.js +2576 -0
- package/dist/notifications-Dp0ydKJS.js.map +1 -0
- package/dist/polymorph-B5n9fs_K.js.map +1 -1
- package/dist/preset/plugin.tailwind.d.ts.map +1 -1
- package/dist/preset/plugin.tailwind.js +20 -18
- package/dist/preset/preset.tailwind.js +24 -25
- package/dist/preset/src/styles/common.js +6 -3
- package/dist/preset/src/styles/dark.d.ts.map +1 -1
- package/dist/preset/src/styles/dark.js +9 -5
- package/dist/preset/src/styles/design-tokens.js +68 -89
- package/dist/preset/src/styles/light.d.ts.map +1 -1
- package/dist/preset/src/styles/light.js +9 -5
- package/dist/preset/src/styles/theme.js +7 -4
- package/dist/preset/src/styles/theme.types.d.ts +2 -1
- package/dist/preset/src/styles/theme.types.d.ts.map +1 -1
- package/dist/preset/src/styles/theme.types.js +2 -1
- package/dist/skeleton-BjJobYYf.js +24 -0
- package/dist/skeleton-BjJobYYf.js.map +1 -0
- package/dist/slot-CRyweuj0.js.map +1 -1
- package/dist/styles/common.js +6 -3
- package/dist/styles/dark.d.ts.map +1 -1
- package/dist/styles/dark.js +9 -5
- package/dist/styles/design-tokens.js +68 -89
- package/dist/styles/light.d.ts.map +1 -1
- package/dist/styles/light.js +9 -5
- package/dist/styles/theme.js +7 -4
- package/dist/styles/theme.types.d.ts +2 -1
- package/dist/styles/theme.types.d.ts.map +1 -1
- package/dist/styles/theme.types.js +2 -1
- package/dist/tabs-B0g7YtQv.js +123 -0
- package/dist/tabs-B0g7YtQv.js.map +1 -0
- package/dist/tsconfig.lib.tsbuildinfo +1 -0
- package/dist/types.d.ts +2 -2
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +1 -0
- package/dist/{context-BFXNJVn2.js → use-translations-DSltA7H_.js} +38 -30
- package/dist/use-translations-DSltA7H_.js.map +1 -0
- package/package.json +99 -86
- package/ai/docs/TransferList.md +0 -142
- package/dist/autocomplete-Cn9Z2hLq.js +0 -375
- package/dist/autocomplete-Cn9Z2hLq.js.map +0 -1
- package/dist/calendar-B5lSd0ID.js.map +0 -1
- package/dist/components/form/transfer-list.d.ts +0 -14
- package/dist/components/form/transfer-list.d.ts.map +0 -1
- package/dist/components/form/transfer-list.js +0 -55
- package/dist/components/form/transfer-list.js.map +0 -1
- package/dist/context-BFXNJVn2.js.map +0 -1
- package/dist/date-picker-DwNo22lx.js.map +0 -1
- package/dist/dom-Dl8XH0CK.js.map +0 -1
- package/dist/file-upload-Brf2NkLr.js.map +0 -1
- package/dist/floating-ui.react-QNHG9W4N.js.map +0 -1
- package/dist/fns-D2eyJKd5.js.map +0 -1
- package/dist/index-BelDtX5M.js.map +0 -1
- package/dist/index-DJSMaZR4.js.map +0 -1
- package/dist/index-Z-fZHxfJ.js +0 -335
- package/dist/index-Z-fZHxfJ.js.map +0 -1
- package/dist/input-CrGrSnUt.js.map +0 -1
- package/dist/input-field-5vYcz5tT.js.map +0 -1
- package/dist/notifications-cUdVPs-B.js +0 -2786
- package/dist/notifications-cUdVPs-B.js.map +0 -1
- package/dist/skeleton-D75GFBV6.js +0 -10
- package/dist/skeleton-D75GFBV6.js.map +0 -1
- package/dist/tabs-S00a8qq8.js +0 -106
- package/dist/tabs-S00a8qq8.js.map +0 -1
- package/dist/use-translations-BwLKTrZv.js +0 -10
- package/dist/use-translations-BwLKTrZv.js.map +0 -1
package/ai/docs/AnimatedList.md
CHANGED
|
@@ -21,19 +21,19 @@ import { AnimatedList, AnimatedListItem } from "@g4rcez/components";
|
|
|
21
21
|
|
|
22
22
|
### AnimatedList
|
|
23
23
|
|
|
24
|
-
| Prop
|
|
25
|
-
|
|
26
|
-
| `children` | `React.ReactNode` | —
|
|
24
|
+
| Prop | Type | Default | Description |
|
|
25
|
+
| ---------- | ----------------- | ------- | ---------------------------------------- |
|
|
26
|
+
| `children` | `React.ReactNode` | — | One or more `AnimatedListItem` elements. |
|
|
27
27
|
|
|
28
28
|
### AnimatedListItem
|
|
29
29
|
|
|
30
|
-
| Prop
|
|
31
|
-
|
|
32
|
-
| `title`
|
|
33
|
-
| `description` | `Label`
|
|
34
|
-
| `children`
|
|
35
|
-
| `avatar`
|
|
36
|
-
| `leading`
|
|
30
|
+
| Prop | Type | Default | Description |
|
|
31
|
+
| ------------- | -------------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
32
|
+
| `title` | `Label` | — | Primary heading shown in the list row and the overlay header. |
|
|
33
|
+
| `description` | `Label` | — | Secondary text shown below the title in both the row and overlay header. |
|
|
34
|
+
| `children` | `Label` | — | Content rendered inside the expanded overlay below the header. |
|
|
35
|
+
| `avatar` | `Label` | — | Optional node (icon, image, or element) shown at the leading edge of the row. |
|
|
36
|
+
| `leading` | `React.FC<{ open: () => void }>` | — | Optional render-prop component placed at the trailing edge of the row. Receives an `open` function to trigger the overlay programmatically. |
|
|
37
37
|
|
|
38
38
|
`Label` is `string | number | ReactNode`.
|
|
39
39
|
|
|
@@ -41,19 +41,19 @@ import { AnimatedList, AnimatedListItem } from "@g4rcez/components";
|
|
|
41
41
|
|
|
42
42
|
Tokens this component reads. Customize by overriding these CSS variables in your theme.
|
|
43
43
|
|
|
44
|
-
| Token
|
|
45
|
-
|
|
46
|
-
| `border-card-border`
|
|
47
|
-
| `bg-card-background`
|
|
48
|
-
| `rounded-card`
|
|
49
|
-
| `shadow-shadow-card`
|
|
50
|
-
| `text-foreground`
|
|
51
|
-
| `text-secondary`
|
|
52
|
-
| `text-primary`
|
|
53
|
-
| `text-danger`
|
|
44
|
+
| Token | CSS Variable | Purpose |
|
|
45
|
+
| --------------------- | -------------------- | ------------------------------------------- |
|
|
46
|
+
| `border-card-border` | `--card-border` | Row separator border and overlay border |
|
|
47
|
+
| `bg-card-background` | `--card-background` | Overlay card background |
|
|
48
|
+
| `rounded-card` | `--radius-card` | Overlay card border radius |
|
|
49
|
+
| `shadow-shadow-card` | `--shadow-card` | Overlay card drop shadow |
|
|
50
|
+
| `text-foreground` | `--foreground` | Default row and overlay text color |
|
|
51
|
+
| `text-secondary` | `--secondary` | Description text color in rows and overlay |
|
|
52
|
+
| `text-primary` | `--primary` | Row title hover color |
|
|
53
|
+
| `text-danger` | `--danger` | Close button hover color |
|
|
54
54
|
| `bg-floating-overlay` | `--floating-overlay` | Overlay backdrop tint (used at 70% opacity) |
|
|
55
|
-
| `z-floating`
|
|
56
|
-
| `z-overlay`
|
|
55
|
+
| `z-floating` | `--z-floating` | `z-index` for the overlay (value: 22) |
|
|
56
|
+
| `z-overlay` | `--z-overlay` | `z-index` for the backdrop scrim |
|
|
57
57
|
|
|
58
58
|
## Examples
|
|
59
59
|
|
|
@@ -63,26 +63,20 @@ Tokens this component reads. Customize by overriding these CSS variables in your
|
|
|
63
63
|
import { AnimatedList, AnimatedListItem } from "@g4rcez/components";
|
|
64
64
|
|
|
65
65
|
const items = [
|
|
66
|
-
|
|
67
|
-
|
|
66
|
+
{ id: "1", name: "Alice Johnson", role: "Engineering" },
|
|
67
|
+
{ id: "2", name: "Bob Smith", role: "Design" },
|
|
68
68
|
];
|
|
69
69
|
|
|
70
70
|
export function TeamList() {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
>
|
|
79
|
-
|
|
80
|
-
Full profile details for {member.name}.
|
|
81
|
-
</p>
|
|
82
|
-
</AnimatedListItem>
|
|
83
|
-
))}
|
|
84
|
-
</AnimatedList>
|
|
85
|
-
);
|
|
71
|
+
return (
|
|
72
|
+
<AnimatedList>
|
|
73
|
+
{items.map((member) => (
|
|
74
|
+
<AnimatedListItem key={member.id} title={member.name} description={member.role}>
|
|
75
|
+
<p className="text-foreground">Full profile details for {member.name}.</p>
|
|
76
|
+
</AnimatedListItem>
|
|
77
|
+
))}
|
|
78
|
+
</AnimatedList>
|
|
79
|
+
);
|
|
86
80
|
}
|
|
87
81
|
```
|
|
88
82
|
|
|
@@ -93,20 +87,20 @@ import { AnimatedList, AnimatedListItem } from "@g4rcez/components";
|
|
|
93
87
|
import { UserCircleIcon } from "@phosphor-icons/react";
|
|
94
88
|
|
|
95
89
|
export function UserDirectory() {
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
90
|
+
return (
|
|
91
|
+
<AnimatedList>
|
|
92
|
+
<AnimatedListItem
|
|
93
|
+
title="Carol White"
|
|
94
|
+
description="Product Manager"
|
|
95
|
+
avatar={<UserCircleIcon size={40} className="text-muted-foreground" />}
|
|
96
|
+
>
|
|
97
|
+
<div className="flex flex-col gap-2 text-foreground">
|
|
98
|
+
<p>Department: Product</p>
|
|
99
|
+
<p>Location: San Francisco</p>
|
|
100
|
+
</div>
|
|
101
|
+
</AnimatedListItem>
|
|
102
|
+
</AnimatedList>
|
|
103
|
+
);
|
|
110
104
|
}
|
|
111
105
|
```
|
|
112
106
|
|
|
@@ -117,24 +111,24 @@ import { AnimatedList, AnimatedListItem } from "@g4rcez/components";
|
|
|
117
111
|
import { Button } from "@g4rcez/components/button";
|
|
118
112
|
|
|
119
113
|
export function OrderList({ orders }: { orders: Order[] }) {
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
114
|
+
return (
|
|
115
|
+
<AnimatedList>
|
|
116
|
+
{orders.map((order) => (
|
|
117
|
+
<AnimatedListItem
|
|
118
|
+
key={order.id}
|
|
119
|
+
title={`Order #${order.id}`}
|
|
120
|
+
description={`Total: ${order.total}`}
|
|
121
|
+
leading={({ open }) => (
|
|
122
|
+
<Button size="small" theme="ghost-muted" onClick={open}>
|
|
123
|
+
View details
|
|
124
|
+
</Button>
|
|
125
|
+
)}
|
|
126
|
+
>
|
|
127
|
+
<OrderDetailContent order={order} />
|
|
128
|
+
</AnimatedListItem>
|
|
129
|
+
))}
|
|
130
|
+
</AnimatedList>
|
|
131
|
+
);
|
|
138
132
|
}
|
|
139
133
|
```
|
|
140
134
|
|
|
@@ -145,25 +139,32 @@ import { AnimatedList, AnimatedListItem } from "@g4rcez/components";
|
|
|
145
139
|
import { BellIcon, CheckCircleIcon, WarningIcon } from "@phosphor-icons/react";
|
|
146
140
|
|
|
147
141
|
const activities = [
|
|
148
|
-
|
|
149
|
-
|
|
142
|
+
{
|
|
143
|
+
id: "a1",
|
|
144
|
+
icon: <CheckCircleIcon size={20} className="text-success" />,
|
|
145
|
+
title: "Deployment succeeded",
|
|
146
|
+
description: "2 minutes ago",
|
|
147
|
+
detail: "All 3 services started.",
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
id: "a2",
|
|
151
|
+
icon: <WarningIcon size={20} className="text-warn" />,
|
|
152
|
+
title: "High memory usage",
|
|
153
|
+
description: "15 minutes ago",
|
|
154
|
+
detail: "Instance i-0ab2c was at 91%.",
|
|
155
|
+
},
|
|
150
156
|
];
|
|
151
157
|
|
|
152
158
|
export function ActivityFeed() {
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
<p className="text-sm text-muted-foreground">{a.detail}</p>
|
|
163
|
-
</AnimatedListItem>
|
|
164
|
-
))}
|
|
165
|
-
</AnimatedList>
|
|
166
|
-
);
|
|
159
|
+
return (
|
|
160
|
+
<AnimatedList>
|
|
161
|
+
{activities.map((a) => (
|
|
162
|
+
<AnimatedListItem key={a.id} title={a.title} description={a.description} avatar={a.icon}>
|
|
163
|
+
<p className="text-sm text-muted-foreground">{a.detail}</p>
|
|
164
|
+
</AnimatedListItem>
|
|
165
|
+
))}
|
|
166
|
+
</AnimatedList>
|
|
167
|
+
);
|
|
167
168
|
}
|
|
168
169
|
```
|
|
169
170
|
|
package/ai/docs/Autocomplete.md
CHANGED
|
@@ -19,34 +19,34 @@ import { Autocomplete } from "@g4rcez/components/autocomplete";
|
|
|
19
19
|
|
|
20
20
|
## Props
|
|
21
21
|
|
|
22
|
-
| Prop
|
|
23
|
-
|
|
24
|
-
| `title`
|
|
25
|
-
| `value`
|
|
26
|
-
| `options`
|
|
27
|
-
| `emptyMessage`
|
|
28
|
-
| `dynamicOption`
|
|
29
|
-
| `onChange`
|
|
30
|
-
| `error`
|
|
31
|
-
| `feedback`
|
|
32
|
-
| `left`
|
|
33
|
-
| `right`
|
|
34
|
-
| `required`
|
|
35
|
-
| `disabled`
|
|
36
|
-
| `loading`
|
|
37
|
-
| `container`
|
|
38
|
-
| `labelClassName` | `string`
|
|
22
|
+
| Prop | Type | Default | Description |
|
|
23
|
+
| ---------------- | -------------------------------------------------- | ------- | ----------------------------------------------------- |
|
|
24
|
+
| `title` | `string` | - | Field label |
|
|
25
|
+
| `value` | `string` | - | Controlled selected value |
|
|
26
|
+
| `options` | `AutocompleteItemProps[]` | - | List of selectable options |
|
|
27
|
+
| `emptyMessage` | `Label` | - | Message displayed when no options match |
|
|
28
|
+
| `dynamicOption` | `boolean` | `false` | Allow creating new options from typed text |
|
|
29
|
+
| `onChange` | `(e: React.ChangeEvent<HTMLInputElement>) => void` | - | Change handler |
|
|
30
|
+
| `error` | `string` | - | Error message displayed below the field |
|
|
31
|
+
| `feedback` | `Label` | - | Success/neutral feedback text below the field |
|
|
32
|
+
| `left` | `Label` | - | Content rendered on the left inside the field border |
|
|
33
|
+
| `right` | `Label` | - | Content rendered on the right inside the field border |
|
|
34
|
+
| `required` | `boolean` | `false` | Marks field as required; hides "Optional" text |
|
|
35
|
+
| `disabled` | `boolean` | `false` | Disables the field |
|
|
36
|
+
| `loading` | `boolean` | `false` | Shows loading state |
|
|
37
|
+
| `container` | `string` | - | Extra CSS classes for the outer `fieldset` |
|
|
38
|
+
| `labelClassName` | `string` | - | Extra CSS classes for the label/border wrapper |
|
|
39
39
|
|
|
40
40
|
### AutocompleteItemProps
|
|
41
41
|
|
|
42
42
|
```tsx
|
|
43
43
|
type AutocompleteItemProps = {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
44
|
+
value: string;
|
|
45
|
+
label?: string;
|
|
46
|
+
hidden?: boolean;
|
|
47
|
+
disabled?: boolean;
|
|
48
|
+
"data-dynamic"?: string;
|
|
49
|
+
Render?: React.FC<OptionProps>;
|
|
50
50
|
} & Record<`data-${string}`, string>;
|
|
51
51
|
```
|
|
52
52
|
|
|
@@ -54,24 +54,24 @@ type AutocompleteItemProps = {
|
|
|
54
54
|
|
|
55
55
|
Tokens this component reads. Customize by overriding these CSS variables in your theme.
|
|
56
56
|
|
|
57
|
-
| Token
|
|
58
|
-
|
|
59
|
-
| `h-input-height`
|
|
60
|
-
| `px-input-x`
|
|
61
|
-
| `py-input-y`
|
|
62
|
-
| `border-input-border`
|
|
63
|
-
| `placeholder-input-mask`
|
|
64
|
-
| `placeholder-input-mask-error` | `--input-mask-error`
|
|
65
|
-
| `text-foreground`
|
|
66
|
-
| `text-danger`
|
|
67
|
-
| `text-primary`
|
|
68
|
-
| `bg-floating-background`
|
|
69
|
-
| `border-floating-border`
|
|
70
|
-
| `bg-floating-hover`
|
|
71
|
-
| `text-disabled`
|
|
72
|
-
| `border-tooltip-border`
|
|
73
|
-
| `z-floating`
|
|
74
|
-
| `shadow-floating`
|
|
57
|
+
| Token | CSS Variable | Purpose |
|
|
58
|
+
| ------------------------------ | ----------------------- | ----------------------------------------- |
|
|
59
|
+
| `h-input-height` | `--input-height` | Input height |
|
|
60
|
+
| `px-input-x` | `--input-x` | Horizontal input padding |
|
|
61
|
+
| `py-input-y` | `--input-y` | Vertical input padding |
|
|
62
|
+
| `border-input-border` | `--input-border` | Default field border color |
|
|
63
|
+
| `placeholder-input-mask` | `--input-mask` | Placeholder text color |
|
|
64
|
+
| `placeholder-input-mask-error` | `--input-mask-error` | Placeholder color in error state |
|
|
65
|
+
| `text-foreground` | `--foreground` | Input text color |
|
|
66
|
+
| `text-danger` | `--danger` | Text color in error state |
|
|
67
|
+
| `text-primary` | `--primary` | Focus/hover border and ring color |
|
|
68
|
+
| `bg-floating-background` | `--floating-background` | Dropdown background |
|
|
69
|
+
| `border-floating-border` | `--floating-border` | Dropdown border color |
|
|
70
|
+
| `bg-floating-hover` | `--floating-hover` | Option background on hover/keyboard focus |
|
|
71
|
+
| `text-disabled` | `--disabled` | Empty message text color |
|
|
72
|
+
| `border-tooltip-border` | `--tooltip-border` | Separator inside dropdown |
|
|
73
|
+
| `z-floating` | `--z-floating` | Z-index for the floating panel |
|
|
74
|
+
| `shadow-floating` | `--shadow-floating` | Drop shadow for the floating panel |
|
|
75
75
|
|
|
76
76
|
## Examples
|
|
77
77
|
|
|
@@ -81,23 +81,23 @@ Tokens this component reads. Customize by overriding these CSS variables in your
|
|
|
81
81
|
import { Autocomplete } from "@g4rcez/components/autocomplete";
|
|
82
82
|
|
|
83
83
|
const options = [
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
84
|
+
{ value: "react", label: "React" },
|
|
85
|
+
{ value: "vue", label: "Vue" },
|
|
86
|
+
{ value: "svelte", label: "Svelte" },
|
|
87
87
|
];
|
|
88
88
|
|
|
89
89
|
function FrameworkPicker() {
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
90
|
+
const [value, setValue] = useState("");
|
|
91
|
+
|
|
92
|
+
return (
|
|
93
|
+
<Autocomplete
|
|
94
|
+
title="Framework"
|
|
95
|
+
placeholder="Search frameworks..."
|
|
96
|
+
options={options}
|
|
97
|
+
value={value}
|
|
98
|
+
onChange={(e) => setValue(e.target.value)}
|
|
99
|
+
/>
|
|
100
|
+
);
|
|
101
101
|
}
|
|
102
102
|
```
|
|
103
103
|
|
|
@@ -105,31 +105,31 @@ function FrameworkPicker() {
|
|
|
105
105
|
|
|
106
106
|
```tsx
|
|
107
107
|
function TagPicker() {
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
108
|
+
const [value, setValue] = useState("");
|
|
109
|
+
const [tags, setTags] = useState([
|
|
110
|
+
{ value: "typescript", label: "TypeScript" },
|
|
111
|
+
{ value: "javascript", label: "JavaScript" },
|
|
112
|
+
]);
|
|
113
|
+
|
|
114
|
+
const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {
|
|
115
|
+
const next = e.target.value;
|
|
116
|
+
setValue(next);
|
|
117
|
+
if (next && !tags.find((t) => t.value === next)) {
|
|
118
|
+
setTags((prev) => [...prev, { value: next, label: next }]);
|
|
119
|
+
}
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
return (
|
|
123
|
+
<Autocomplete
|
|
124
|
+
title="Tag"
|
|
125
|
+
placeholder="Search or create a tag..."
|
|
126
|
+
options={tags}
|
|
127
|
+
value={value}
|
|
128
|
+
onChange={handleChange}
|
|
129
|
+
dynamicOption
|
|
130
|
+
emptyMessage="Type to create a new tag"
|
|
131
|
+
/>
|
|
132
|
+
);
|
|
133
133
|
}
|
|
134
134
|
```
|
|
135
135
|
|
|
@@ -139,15 +139,15 @@ function TagPicker() {
|
|
|
139
139
|
type UserOption = AutocompleteItemProps & { email: string; role: string };
|
|
140
140
|
|
|
141
141
|
const UserRow = ({ value, label, ...props }: UserOption) => (
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
142
|
+
<div className="flex flex-col gap-0.5 py-1">
|
|
143
|
+
<span className="font-medium text-sm text-foreground">{label}</span>
|
|
144
|
+
<span className="text-xs text-muted-foreground">{props.email}</span>
|
|
145
|
+
</div>
|
|
146
146
|
);
|
|
147
147
|
|
|
148
148
|
const users: UserOption[] = [
|
|
149
|
-
|
|
150
|
-
|
|
149
|
+
{ value: "alice", label: "Alice", email: "alice@example.com", role: "admin", Render: UserRow },
|
|
150
|
+
{ value: "bob", label: "Bob", email: "bob@example.com", role: "member", Render: UserRow },
|
|
151
151
|
];
|
|
152
152
|
|
|
153
153
|
<Autocomplete title="Assign to" options={users} value="" onChange={() => {}} />;
|
|
@@ -160,29 +160,25 @@ import { Form } from "@g4rcez/components/form";
|
|
|
160
160
|
import { Button } from "@g4rcez/components/button";
|
|
161
161
|
|
|
162
162
|
const countries = [
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
163
|
+
{ value: "br", label: "Brazil" },
|
|
164
|
+
{ value: "us", label: "United States" },
|
|
165
|
+
{ value: "de", label: "Germany" },
|
|
166
166
|
];
|
|
167
167
|
|
|
168
168
|
function ContactForm() {
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
/>
|
|
183
|
-
<Button theme="primary" type="submit">Submit</Button>
|
|
184
|
-
</Form>
|
|
185
|
-
);
|
|
169
|
+
const handleSubmit = (e: React.FormEvent<HTMLFormElement>) => {
|
|
170
|
+
const data = new FormData(e.currentTarget);
|
|
171
|
+
console.log(Object.fromEntries(data));
|
|
172
|
+
};
|
|
173
|
+
|
|
174
|
+
return (
|
|
175
|
+
<Form onSubmit={handleSubmit} className="flex flex-col gap-base">
|
|
176
|
+
<Autocomplete name="country" title="Country" options={countries} required emptyMessage="No countries found" />
|
|
177
|
+
<Button theme="primary" type="submit">
|
|
178
|
+
Submit
|
|
179
|
+
</Button>
|
|
180
|
+
</Form>
|
|
181
|
+
);
|
|
186
182
|
}
|
|
187
183
|
```
|
|
188
184
|
|
package/ai/docs/Button.md
CHANGED
|
@@ -19,43 +19,43 @@ import { Button } from "@g4rcez/components/button";
|
|
|
19
19
|
|
|
20
20
|
## Props
|
|
21
21
|
|
|
22
|
-
| Prop
|
|
23
|
-
|
|
24
|
-
| `theme`
|
|
25
|
-
| `size`
|
|
26
|
-
| `rounded`
|
|
27
|
-
| `icon`
|
|
28
|
-
| `loading`
|
|
29
|
-
| `disabled`
|
|
30
|
-
| `as`
|
|
31
|
-
| `type`
|
|
32
|
-
| `className` | `string`
|
|
33
|
-
| `children`
|
|
22
|
+
| Prop | Type | Default | Description |
|
|
23
|
+
| ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------- | ----------------------------------------------------------------- |
|
|
24
|
+
| `theme` | `"main" \| "primary" \| "secondary" \| "info" \| "warn" \| "danger" \| "success" \| "muted" \| "neutral" \| "ghost-primary" \| "ghost-secondary" \| "ghost-info" \| "ghost-warn" \| "ghost-danger" \| "ghost-success" \| "ghost-muted" \| "ghost-neutral" \| "raw" \| "disabled" \| "loading"` | `"main"` | Visual theme/variant of the button |
|
|
25
|
+
| `size` | `"icon" \| "min" \| "small" \| "default" \| "big" \| "tiny"` | `"default"` | Size of the button |
|
|
26
|
+
| `rounded` | `"rough" \| "squared" \| "default" \| "circle"` | `"default"` | Border radius style |
|
|
27
|
+
| `icon` | `React.ReactNode` | - | Icon to display before button content |
|
|
28
|
+
| `loading` | `boolean` | `false` | Shows loading state with pulse animation and disables interaction |
|
|
29
|
+
| `disabled` | `boolean` | `false` | Disables the button |
|
|
30
|
+
| `as` | `React.ElementType` | `"button"` | HTML element to render as |
|
|
31
|
+
| `type` | `string` | `"button"` | Button type attribute |
|
|
32
|
+
| `className` | `string` | - | Additional CSS classes |
|
|
33
|
+
| `children` | `React.ReactNode` | - | Button content |
|
|
34
34
|
|
|
35
35
|
## Design Tokens
|
|
36
36
|
|
|
37
37
|
Tokens this component reads. Customize by overriding these CSS variables in your theme.
|
|
38
38
|
|
|
39
|
-
| Token
|
|
40
|
-
|
|
41
|
-
| `bg-button-primary-bg`
|
|
42
|
-
| `text-button-primary-text`
|
|
43
|
-
| `bg-button-secondary-bg`
|
|
44
|
-
| `text-button-secondary-text` | `--button-secondary-text` | Text color for secondary theme
|
|
45
|
-
| `bg-button-info-bg`
|
|
46
|
-
| `text-button-info-text`
|
|
47
|
-
| `bg-button-warn-bg`
|
|
48
|
-
| `text-button-warn-text`
|
|
49
|
-
| `bg-button-danger-bg`
|
|
50
|
-
| `text-button-danger-text`
|
|
51
|
-
| `bg-button-success-bg`
|
|
52
|
-
| `text-button-success-text`
|
|
53
|
-
| `bg-button-muted-bg`
|
|
54
|
-
| `text-button-muted-text`
|
|
55
|
-
| `bg-disabled`
|
|
56
|
-
| `border-card-border`
|
|
57
|
-
| `rounded-button`
|
|
58
|
-
| `focus-visible:ring-ring`
|
|
39
|
+
| Token | CSS Variable | Purpose |
|
|
40
|
+
| ---------------------------- | ------------------------- | -------------------------------------- |
|
|
41
|
+
| `bg-button-primary-bg` | `--button-primary-bg` | Background for primary/main theme |
|
|
42
|
+
| `text-button-primary-text` | `--button-primary-text` | Text color for primary/main theme |
|
|
43
|
+
| `bg-button-secondary-bg` | `--button-secondary-bg` | Background for secondary theme |
|
|
44
|
+
| `text-button-secondary-text` | `--button-secondary-text` | Text color for secondary theme |
|
|
45
|
+
| `bg-button-info-bg` | `--button-info-bg` | Background for info theme |
|
|
46
|
+
| `text-button-info-text` | `--button-info-text` | Text color for info theme |
|
|
47
|
+
| `bg-button-warn-bg` | `--button-warn-bg` | Background for warn theme |
|
|
48
|
+
| `text-button-warn-text` | `--button-warn-text` | Text color for warn theme |
|
|
49
|
+
| `bg-button-danger-bg` | `--button-danger-bg` | Background for danger theme |
|
|
50
|
+
| `text-button-danger-text` | `--button-danger-text` | Text color for danger theme |
|
|
51
|
+
| `bg-button-success-bg` | `--button-success-bg` | Background for success theme |
|
|
52
|
+
| `text-button-success-text` | `--button-success-text` | Text color for success theme |
|
|
53
|
+
| `bg-button-muted-bg` | `--button-muted-bg` | Background for muted theme |
|
|
54
|
+
| `text-button-muted-text` | `--button-muted-text` | Text color for muted theme |
|
|
55
|
+
| `bg-disabled` | `--disabled` | Background for disabled/loading states |
|
|
56
|
+
| `border-card-border` | `--card-border` | Border color for neutral theme |
|
|
57
|
+
| `rounded-button` | `--radius-button` | Default border radius |
|
|
58
|
+
| `focus-visible:ring-ring` | `--ring` | Focus ring color |
|
|
59
59
|
|
|
60
60
|
## Theme Variants
|
|
61
61
|
|
|
@@ -131,7 +131,7 @@ import { PlusIcon } from "@phosphor-icons/react";
|
|
|
131
131
|
|
|
132
132
|
```tsx
|
|
133
133
|
<Button as="a" href="/dashboard" theme="primary">
|
|
134
|
-
|
|
134
|
+
Go to Dashboard
|
|
135
135
|
</Button>
|
|
136
136
|
```
|
|
137
137
|
|