@g4rcez/components 4.0.1 → 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.
- package/ai/SKILL.md +233 -0
- package/ai/docs/Alert.md +166 -0
- package/ai/docs/AnimatedList.md +206 -0
- package/ai/docs/Autocomplete.md +221 -0
- package/ai/docs/Button.md +182 -0
- package/ai/docs/Calendar.md +185 -0
- package/ai/docs/Card.md +178 -0
- package/ai/docs/Checkbox.md +194 -0
- package/ai/docs/CommandPalette.md +275 -0
- package/ai/docs/DatePicker.md +152 -0
- package/ai/docs/Dropdown.md +195 -0
- package/{dist/ai → ai}/docs/Empty.md +41 -44
- package/{dist/ai → ai}/docs/Expand.md +40 -54
- package/ai/docs/FileUpload.md +218 -0
- package/{dist/ai → ai}/docs/Form.md +35 -29
- package/{dist/ai → ai}/docs/FormReset.md +37 -37
- package/{dist/ai → ai}/docs/Heading.md +4 -6
- package/ai/docs/Input.md +212 -0
- package/ai/docs/InputField.md +170 -0
- package/ai/docs/List.md +208 -0
- package/ai/docs/Menu.md +168 -0
- package/ai/docs/Modal.md +273 -0
- package/ai/docs/MultiSelect.md +177 -0
- package/ai/docs/Notifications.md +231 -0
- package/ai/docs/PageCalendar.md +262 -0
- package/{dist/ai → ai}/docs/Polymorph.md +25 -41
- package/{dist/ai → ai}/docs/Progress.md +55 -51
- package/{dist/ai → ai}/docs/Radiobox.md +49 -41
- package/{dist/ai → ai}/docs/RenderOnView.md +26 -32
- package/{dist/ai → ai}/docs/Resizable.md +60 -65
- package/ai/docs/Select.md +284 -0
- package/{dist/ai → ai}/docs/Shortcut.md +14 -14
- package/{dist/ai → ai}/docs/Skeleton.md +56 -60
- package/{dist/ai → ai}/docs/Slider.md +26 -49
- package/{dist/ai → ai}/docs/Slot.md +15 -17
- package/{dist/ai → ai}/docs/Spinner.md +17 -15
- package/{dist/ai → ai}/docs/Stats.md +44 -42
- package/ai/docs/Step.md +159 -0
- package/{dist/ai → ai}/docs/Switch.md +44 -54
- package/ai/docs/Table.md +286 -0
- package/ai/docs/Tabs.md +191 -0
- package/ai/docs/Tag.md +222 -0
- package/{dist/ai → ai}/docs/TaskList.md +40 -50
- package/ai/docs/Textarea.md +144 -0
- package/ai/docs/Timeline.md +212 -0
- package/{dist/ai → ai}/docs/Toolbar.md +46 -46
- package/ai/docs/Tooltip.md +231 -0
- package/ai/docs/Typography.md +187 -0
- package/ai/docs/Wizard.md +208 -0
- package/ai/docs/index.md +183 -0
- 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.js +10 -10
- package/dist/components/core/button.js.map +1 -1
- package/dist/components/core/tag.js +4 -4
- package/dist/components/core/tag.js.map +1 -1
- package/dist/components/display/alert.js +48 -46
- package/dist/components/display/alert.js.map +1 -1
- package/dist/components/display/calendar.js +6 -6
- package/dist/components/display/card.js +2 -2
- package/dist/components/display/card.js.map +1 -1
- package/dist/components/display/list.js +1 -1
- package/dist/components/display/list.js.map +1 -1
- package/dist/components/display/notifications.js +3 -3
- package/dist/components/display/stats.js +1 -1
- package/dist/components/display/tabs.js +2 -2
- package/dist/components/display/timeline.js +1 -1
- package/dist/components/floating/dropdown.js +25 -17
- package/dist/components/floating/dropdown.js.map +1 -1
- package/dist/components/floating/expand.js +7 -7
- package/dist/components/floating/expand.js.map +1 -1
- package/dist/components/floating/menu.js +10 -10
- package/dist/components/floating/menu.js.map +1 -1
- package/dist/components/floating/modal.js +106 -102
- package/dist/components/floating/modal.js.map +1 -1
- package/dist/components/floating/tooltip.js +14 -14
- package/dist/components/floating/tooltip.js.map +1 -1
- package/dist/components/form/autocomplete.js +6 -6
- package/dist/components/form/checkbox.js +1 -1
- package/dist/components/form/date-picker.js +5 -5
- package/dist/components/form/file-upload.js +2 -2
- package/dist/components/form/form.js.map +1 -1
- package/dist/components/form/input.js +1 -1
- package/dist/components/form/radiobox.js +1 -1
- package/dist/components/form/select.js +3 -3
- package/dist/components/form/switch.js +2 -2
- package/dist/components/form/switch.js.map +1 -1
- package/dist/components/table/table.js +3 -3
- 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/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 +2826 -2765
- 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/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/{context-BFXNJVn2.js → use-translations-DSltA7H_.js} +38 -30
- package/dist/use-translations-DSltA7H_.js.map +1 -0
- package/package.json +101 -88
- package/dist/ai/SKILL.md +0 -266
- package/dist/ai/docs/Alert.md +0 -167
- package/dist/ai/docs/AnimatedList.md +0 -205
- package/dist/ai/docs/Autocomplete.md +0 -225
- package/dist/ai/docs/Button.md +0 -182
- package/dist/ai/docs/Calendar.md +0 -219
- package/dist/ai/docs/Card.md +0 -174
- package/dist/ai/docs/Checkbox.md +0 -199
- package/dist/ai/docs/CommandPalette.md +0 -293
- package/dist/ai/docs/DatePicker.md +0 -171
- package/dist/ai/docs/Dropdown.md +0 -223
- package/dist/ai/docs/FileUpload.md +0 -225
- package/dist/ai/docs/Input.md +0 -237
- package/dist/ai/docs/InputField.md +0 -170
- package/dist/ai/docs/List.md +0 -205
- package/dist/ai/docs/Menu.md +0 -166
- package/dist/ai/docs/Modal.md +0 -280
- package/dist/ai/docs/MultiSelect.md +0 -196
- package/dist/ai/docs/Notifications.md +0 -231
- package/dist/ai/docs/PageCalendar.md +0 -271
- package/dist/ai/docs/Select.md +0 -284
- package/dist/ai/docs/Step.md +0 -159
- package/dist/ai/docs/Table.md +0 -298
- package/dist/ai/docs/Tabs.md +0 -191
- package/dist/ai/docs/Tag.md +0 -224
- package/dist/ai/docs/Textarea.md +0 -167
- package/dist/ai/docs/Timeline.md +0 -210
- package/dist/ai/docs/Tooltip.md +0 -231
- package/dist/ai/docs/TransferList.md +0 -142
- package/dist/ai/docs/Typography.md +0 -187
- package/dist/ai/docs/Wizard.md +0 -213
- package/dist/ai/docs/index.md +0 -183
- 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/core/button.d.ts +0 -77
- package/dist/components/core/button.d.ts.map +0 -1
- package/dist/components/core/heading.d.ts +0 -3
- package/dist/components/core/heading.d.ts.map +0 -1
- package/dist/components/core/polymorph.d.ts +0 -10
- package/dist/components/core/polymorph.d.ts.map +0 -1
- package/dist/components/core/render-on-view.d.ts +0 -7
- package/dist/components/core/render-on-view.d.ts.map +0 -1
- package/dist/components/core/resizable.d.ts +0 -3
- package/dist/components/core/resizable.d.ts.map +0 -1
- package/dist/components/core/slot.d.ts +0 -16
- package/dist/components/core/slot.d.ts.map +0 -1
- package/dist/components/core/tag.d.ts +0 -35
- package/dist/components/core/tag.d.ts.map +0 -1
- package/dist/components/core/typography.d.ts +0 -24
- package/dist/components/core/typography.d.ts.map +0 -1
- package/dist/components/display/alert.d.ts +0 -28
- package/dist/components/display/alert.d.ts.map +0 -1
- package/dist/components/display/calendar.d.ts +0 -42
- package/dist/components/display/calendar.d.ts.map +0 -1
- package/dist/components/display/card.d.ts +0 -29
- package/dist/components/display/card.d.ts.map +0 -1
- package/dist/components/display/empty.d.ts +0 -8
- package/dist/components/display/empty.d.ts.map +0 -1
- package/dist/components/display/list.d.ts +0 -16
- package/dist/components/display/list.d.ts.map +0 -1
- package/dist/components/display/notifications.d.ts +0 -27
- package/dist/components/display/notifications.d.ts.map +0 -1
- package/dist/components/display/progress.d.ts +0 -13
- package/dist/components/display/progress.d.ts.map +0 -1
- package/dist/components/display/shortcut.d.ts +0 -4
- package/dist/components/display/shortcut.d.ts.map +0 -1
- package/dist/components/display/skeleton.d.ts +0 -12
- package/dist/components/display/skeleton.d.ts.map +0 -1
- package/dist/components/display/spinner.d.ts +0 -5
- package/dist/components/display/spinner.d.ts.map +0 -1
- package/dist/components/display/stats.d.ts +0 -12
- package/dist/components/display/stats.d.ts.map +0 -1
- package/dist/components/display/step.d.ts +0 -24
- package/dist/components/display/step.d.ts.map +0 -1
- package/dist/components/display/tabs.d.ts +0 -24
- package/dist/components/display/tabs.d.ts.map +0 -1
- package/dist/components/display/timeline.d.ts +0 -10
- package/dist/components/display/timeline.d.ts.map +0 -1
- package/dist/components/floating/command-palette.d.ts +0 -49
- package/dist/components/floating/command-palette.d.ts.map +0 -1
- package/dist/components/floating/dropdown.d.ts +0 -15
- package/dist/components/floating/dropdown.d.ts.map +0 -1
- package/dist/components/floating/expand.d.ts +0 -11
- package/dist/components/floating/expand.d.ts.map +0 -1
- package/dist/components/floating/menu.d.ts +0 -52
- package/dist/components/floating/menu.d.ts.map +0 -1
- package/dist/components/floating/modal.d.ts +0 -60
- package/dist/components/floating/modal.d.ts.map +0 -1
- package/dist/components/floating/toolbar.d.ts +0 -6
- package/dist/components/floating/toolbar.d.ts.map +0 -1
- package/dist/components/floating/tooltip.d.ts +0 -17
- package/dist/components/floating/tooltip.d.ts.map +0 -1
- package/dist/components/floating/wizard.d.ts +0 -26
- package/dist/components/floating/wizard.d.ts.map +0 -1
- package/dist/components/form/autocomplete.d.ts +0 -16
- package/dist/components/form/autocomplete.d.ts.map +0 -1
- package/dist/components/form/checkbox.d.ts +0 -12
- package/dist/components/form/checkbox.d.ts.map +0 -1
- package/dist/components/form/date-picker.d.ts +0 -10
- package/dist/components/form/date-picker.d.ts.map +0 -1
- package/dist/components/form/file-upload.d.ts +0 -15
- package/dist/components/form/file-upload.d.ts.map +0 -1
- package/dist/components/form/form.d.ts +0 -3
- package/dist/components/form/form.d.ts.map +0 -1
- package/dist/components/form/formReset.d.ts +0 -2
- package/dist/components/form/formReset.d.ts.map +0 -1
- package/dist/components/form/free-text.d.ts +0 -11
- package/dist/components/form/free-text.d.ts.map +0 -1
- package/dist/components/form/input-field.d.ts +0 -34
- package/dist/components/form/input-field.d.ts.map +0 -1
- package/dist/components/form/input.d.ts +0 -52
- package/dist/components/form/input.d.ts.map +0 -1
- package/dist/components/form/multi-select.d.ts +0 -19
- package/dist/components/form/multi-select.d.ts.map +0 -1
- package/dist/components/form/radiobox.d.ts +0 -7
- package/dist/components/form/radiobox.d.ts.map +0 -1
- package/dist/components/form/select.d.ts +0 -13
- package/dist/components/form/select.d.ts.map +0 -1
- package/dist/components/form/slider.d.ts +0 -7
- package/dist/components/form/slider.d.ts.map +0 -1
- package/dist/components/form/switch.d.ts +0 -9
- package/dist/components/form/switch.d.ts.map +0 -1
- package/dist/components/form/task-list.d.ts +0 -3
- package/dist/components/form/task-list.d.ts.map +0 -1
- package/dist/components/form/textarea.d.ts +0 -6
- package/dist/components/form/textarea.d.ts.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/components/index.d.ts +0 -46
- package/dist/components/index.d.ts.map +0 -1
- package/dist/components/page-calendar/calendar-header.d.ts +0 -16
- package/dist/components/page-calendar/calendar-header.d.ts.map +0 -1
- package/dist/components/page-calendar/day-view.d.ts +0 -12
- package/dist/components/page-calendar/day-view.d.ts.map +0 -1
- package/dist/components/page-calendar/event-pill.d.ts +0 -9
- package/dist/components/page-calendar/event-pill.d.ts.map +0 -1
- package/dist/components/page-calendar/index.d.ts +0 -4
- package/dist/components/page-calendar/index.d.ts.map +0 -1
- package/dist/components/page-calendar/month-view.d.ts +0 -11
- package/dist/components/page-calendar/month-view.d.ts.map +0 -1
- package/dist/components/page-calendar/page-calendar.d.ts +0 -18
- package/dist/components/page-calendar/page-calendar.d.ts.map +0 -1
- package/dist/components/page-calendar/page-calendar.types.d.ts +0 -18
- package/dist/components/page-calendar/page-calendar.types.d.ts.map +0 -1
- package/dist/components/page-calendar/page-calendar.utils.d.ts +0 -24
- package/dist/components/page-calendar/page-calendar.utils.d.ts.map +0 -1
- package/dist/components/page-calendar/week-view.d.ts +0 -11
- package/dist/components/page-calendar/week-view.d.ts.map +0 -1
- package/dist/components/table/filter.d.ts +0 -42
- package/dist/components/table/filter.d.ts.map +0 -1
- package/dist/components/table/group.d.ts +0 -17
- package/dist/components/table/group.d.ts.map +0 -1
- package/dist/components/table/index.d.ts +0 -20
- package/dist/components/table/index.d.ts.map +0 -1
- package/dist/components/table/inner-table.d.ts +0 -29
- package/dist/components/table/inner-table.d.ts.map +0 -1
- package/dist/components/table/metadata.d.ts +0 -4
- package/dist/components/table/metadata.d.ts.map +0 -1
- package/dist/components/table/pagination.d.ts +0 -3
- package/dist/components/table/pagination.d.ts.map +0 -1
- package/dist/components/table/row.d.ts +0 -12
- package/dist/components/table/row.d.ts.map +0 -1
- package/dist/components/table/sort.d.ts +0 -28
- package/dist/components/table/sort.d.ts.map +0 -1
- package/dist/components/table/table-lib.d.ts +0 -135
- package/dist/components/table/table-lib.d.ts.map +0 -1
- package/dist/components/table/table.context.d.ts +0 -10
- package/dist/components/table/table.context.d.ts.map +0 -1
- package/dist/components/table/thead.d.ts +0 -9
- package/dist/components/table/thead.d.ts.map +0 -1
- package/dist/config/context.d.ts +0 -21
- package/dist/config/context.d.ts.map +0 -1
- package/dist/config/default-translations.d.ts +0 -90
- package/dist/config/default-translations.d.ts.map +0 -1
- package/dist/config/default-tweaks.d.ts +0 -13
- package/dist/config/default-tweaks.d.ts.map +0 -1
- package/dist/constants.d.ts +0 -3
- package/dist/constants.d.ts.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/hooks/use-click-outside.d.ts +0 -3
- package/dist/hooks/use-click-outside.d.ts.map +0 -1
- package/dist/hooks/use-color-parser.d.ts +0 -2
- package/dist/hooks/use-color-parser.d.ts.map +0 -1
- package/dist/hooks/use-components-provider.d.ts +0 -15
- package/dist/hooks/use-components-provider.d.ts.map +0 -1
- package/dist/hooks/use-debounce.d.ts +0 -5
- package/dist/hooks/use-debounce.d.ts.map +0 -1
- package/dist/hooks/use-floating-ref.d.ts +0 -2
- package/dist/hooks/use-floating-ref.d.ts.map +0 -1
- package/dist/hooks/use-form.d.ts +0 -394
- package/dist/hooks/use-form.d.ts.map +0 -1
- package/dist/hooks/use-hover.d.ts +0 -3
- package/dist/hooks/use-hover.d.ts.map +0 -1
- package/dist/hooks/use-input-id.d.ts +0 -4
- package/dist/hooks/use-input-id.d.ts.map +0 -1
- package/dist/hooks/use-is-coarse-device.d.ts +0 -2
- package/dist/hooks/use-is-coarse-device.d.ts.map +0 -1
- package/dist/hooks/use-locale.d.ts +0 -3
- package/dist/hooks/use-locale.d.ts.map +0 -1
- package/dist/hooks/use-media-query.d.ts +0 -2
- package/dist/hooks/use-media-query.d.ts.map +0 -1
- package/dist/hooks/use-on-event.d.ts +0 -4
- package/dist/hooks/use-on-event.d.ts.map +0 -1
- package/dist/hooks/use-parent.d.ts +0 -3
- package/dist/hooks/use-parent.d.ts.map +0 -1
- package/dist/hooks/use-preferences.d.ts +0 -2
- package/dist/hooks/use-preferences.d.ts.map +0 -1
- package/dist/hooks/use-previous.d.ts +0 -2
- package/dist/hooks/use-previous.d.ts.map +0 -1
- package/dist/hooks/use-reactive.d.ts +0 -2
- package/dist/hooks/use-reactive.d.ts.map +0 -1
- package/dist/hooks/use-remove-scroll.d.ts +0 -4
- package/dist/hooks/use-remove-scroll.d.ts.map +0 -1
- package/dist/hooks/use-resize-observer.d.ts +0 -2
- package/dist/hooks/use-resize-observer.d.ts.map +0 -1
- package/dist/hooks/use-stable-ref.d.ts +0 -2
- package/dist/hooks/use-stable-ref.d.ts.map +0 -1
- package/dist/hooks/use-swipe.d.ts +0 -8
- package/dist/hooks/use-swipe.d.ts.map +0 -1
- package/dist/hooks/use-translations.d.ts +0 -88
- package/dist/hooks/use-translations.d.ts.map +0 -1
- package/dist/hooks/use-tweaks.d.ts +0 -3
- package/dist/hooks/use-tweaks.d.ts.map +0 -1
- package/dist/hooks/use-window-size.d.ts +0 -5
- package/dist/hooks/use-window-size.d.ts.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/index.d.ts +0 -22
- package/dist/index.d.ts.map +0 -1
- package/dist/input-CrGrSnUt.js.map +0 -1
- package/dist/input-field-5vYcz5tT.js.map +0 -1
- package/dist/lib/combi-keys.d.ts +0 -15
- package/dist/lib/combi-keys.d.ts.map +0 -1
- package/dist/lib/dict.d.ts +0 -12
- package/dist/lib/dict.d.ts.map +0 -1
- package/dist/lib/dom.d.ts +0 -19
- package/dist/lib/dom.d.ts.map +0 -1
- package/dist/lib/fns.d.ts +0 -11
- package/dist/lib/fns.d.ts.map +0 -1
- package/dist/lib/fzf.d.ts +0 -16
- package/dist/lib/fzf.d.ts.map +0 -1
- package/dist/lib/keyboard-area.d.ts +0 -16
- package/dist/lib/keyboard-area.d.ts.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/types.d.ts +0 -26
- package/dist/types.d.ts.map +0 -1
- package/dist/use-translations-BwLKTrZv.js +0 -10
- package/dist/use-translations-BwLKTrZv.js.map +0 -1
package/ai/docs/Tabs.md
ADDED
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Tabs
|
|
3
|
+
description: Keyboard-accessible tab container for organizing content into switchable panels.
|
|
4
|
+
package: "@g4rcez/components"
|
|
5
|
+
export: "{ Tabs }"
|
|
6
|
+
import: "import { Tabs, Tab } from '@g4rcez/components/tabs'"
|
|
7
|
+
category: display
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Tabs
|
|
11
|
+
|
|
12
|
+
Keyboard-accessible tab container for organizing content into switchable panels.
|
|
13
|
+
|
|
14
|
+
## Import
|
|
15
|
+
|
|
16
|
+
```tsx
|
|
17
|
+
import { Tabs, Tab } from "@g4rcez/components/tabs";
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Props
|
|
21
|
+
|
|
22
|
+
### Tabs (Container)
|
|
23
|
+
|
|
24
|
+
| Prop | Type | Default | Description |
|
|
25
|
+
| ----------- | ---------------------- | ------- | --------------------------------------------------- |
|
|
26
|
+
| `active` | `string` | — | ID of the currently active tab |
|
|
27
|
+
| `onChange` | `(id: string) => void` | — | Called when the active tab changes |
|
|
28
|
+
| `container` | `string` | — | Additional classes for the outer card container |
|
|
29
|
+
| `className` | `string` | — | Additional classes for the card body (content area) |
|
|
30
|
+
| `children` | `Tab[]` | — | `Tab` panel components |
|
|
31
|
+
|
|
32
|
+
### Tab (Panel)
|
|
33
|
+
|
|
34
|
+
| Prop | Type | Default | Description |
|
|
35
|
+
| ---------- | ----------------- | ------- | --------------------------------------------------------------- |
|
|
36
|
+
| `id` | `string` | — | Unique identifier; matched against `Tabs.active` |
|
|
37
|
+
| `title` | `string` | — | Tab button label (use when label is a plain string) |
|
|
38
|
+
| `label` | `string` | — | Accessible label when `title` is a non-string React element |
|
|
39
|
+
| `disabled` | `boolean` | `false` | Disables the tab button and skips it during keyboard navigation |
|
|
40
|
+
| `children` | `React.ReactNode` | — | Panel content rendered when this tab is active |
|
|
41
|
+
|
|
42
|
+
## Design Tokens
|
|
43
|
+
|
|
44
|
+
Tokens this component reads. Customize by overriding these CSS variables in your theme.
|
|
45
|
+
|
|
46
|
+
| Token | CSS Variable | Purpose |
|
|
47
|
+
| -------------------- | ------------------- | ----------------------------------- |
|
|
48
|
+
| `bg-card-background` | `--card-background` | Tab panel surface |
|
|
49
|
+
| `border-card-border` | `--card-border` | Tab bar bottom line and card border |
|
|
50
|
+
| `border-primary` | `--primary` | Active tab bottom indicator |
|
|
51
|
+
| `text-primary` | `--primary` | Active tab text color |
|
|
52
|
+
| `text-disabled` | `--disabled` | Disabled tab text |
|
|
53
|
+
|
|
54
|
+
## Examples
|
|
55
|
+
|
|
56
|
+
### Basic Tabs
|
|
57
|
+
|
|
58
|
+
```tsx
|
|
59
|
+
const [active, setActive] = useState("overview");
|
|
60
|
+
|
|
61
|
+
<Tabs active={active} onChange={setActive}>
|
|
62
|
+
<Tab id="overview" title="Overview">
|
|
63
|
+
<h3>Project Overview</h3>
|
|
64
|
+
<p>This is the overview of your project.</p>
|
|
65
|
+
</Tab>
|
|
66
|
+
|
|
67
|
+
<Tab id="details" title="Details">
|
|
68
|
+
<h3>Project Details</h3>
|
|
69
|
+
<p>Detailed information about your project.</p>
|
|
70
|
+
</Tab>
|
|
71
|
+
|
|
72
|
+
<Tab id="settings" title="Settings">
|
|
73
|
+
<h3>Project Settings</h3>
|
|
74
|
+
<p>Configure your project settings here.</p>
|
|
75
|
+
</Tab>
|
|
76
|
+
</Tabs>;
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
### Tabs with Disabled State
|
|
80
|
+
|
|
81
|
+
```tsx
|
|
82
|
+
<Tabs active={activeTab} onChange={setActiveTab}>
|
|
83
|
+
<Tab id="available" title="Available">
|
|
84
|
+
<p>This tab is available.</p>
|
|
85
|
+
</Tab>
|
|
86
|
+
|
|
87
|
+
<Tab id="locked" title="Locked" disabled>
|
|
88
|
+
<p>This content is not accessible yet.</p>
|
|
89
|
+
</Tab>
|
|
90
|
+
|
|
91
|
+
<Tab id="also-available" title="Also Available">
|
|
92
|
+
<p>This tab is also available.</p>
|
|
93
|
+
</Tab>
|
|
94
|
+
</Tabs>
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
### Settings Panel
|
|
98
|
+
|
|
99
|
+
```tsx
|
|
100
|
+
<Tabs active={activeTab} onChange={setActiveTab}>
|
|
101
|
+
<Tab id="general" title="General">
|
|
102
|
+
<GeneralSettings />
|
|
103
|
+
</Tab>
|
|
104
|
+
<Tab id="privacy" title="Privacy">
|
|
105
|
+
<PrivacySettings />
|
|
106
|
+
</Tab>
|
|
107
|
+
<Tab id="notifications" title="Notifications">
|
|
108
|
+
<NotificationSettings />
|
|
109
|
+
</Tab>
|
|
110
|
+
</Tabs>
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
### Dynamic Tabs
|
|
114
|
+
|
|
115
|
+
```tsx
|
|
116
|
+
function DynamicTabs() {
|
|
117
|
+
const [tabs, setTabs] = useState([
|
|
118
|
+
{ id: "tab1", title: "Tab 1", content: "Content 1" },
|
|
119
|
+
{ id: "tab2", title: "Tab 2", content: "Content 2" },
|
|
120
|
+
]);
|
|
121
|
+
const [activeTab, setActiveTab] = useState("tab1");
|
|
122
|
+
|
|
123
|
+
const addTab = () => {
|
|
124
|
+
const newId = `tab${tabs.length + 1}`;
|
|
125
|
+
setTabs([...tabs, { id: newId, title: `Tab ${tabs.length + 1}`, content: `Content ${tabs.length + 1}` }]);
|
|
126
|
+
setActiveTab(newId);
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
return (
|
|
130
|
+
<div className="space-y-4">
|
|
131
|
+
<button onClick={addTab} className="px-3 py-1 bg-primary text-primary-foreground rounded-button">
|
|
132
|
+
Add Tab
|
|
133
|
+
</button>
|
|
134
|
+
|
|
135
|
+
<Tabs active={activeTab} onChange={setActiveTab}>
|
|
136
|
+
{tabs.map((tab) => (
|
|
137
|
+
<Tab key={tab.id} id={tab.id} title={tab.title}>
|
|
138
|
+
<p>{tab.content}</p>
|
|
139
|
+
</Tab>
|
|
140
|
+
))}
|
|
141
|
+
</Tabs>
|
|
142
|
+
</div>
|
|
143
|
+
);
|
|
144
|
+
}
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
### Form Wizard with Disabled Steps
|
|
148
|
+
|
|
149
|
+
```tsx
|
|
150
|
+
<Tabs active={currentStep} onChange={setCurrentStep}>
|
|
151
|
+
<Tab id="step1" title="Personal Info">
|
|
152
|
+
<PersonalInfoForm />
|
|
153
|
+
</Tab>
|
|
154
|
+
<Tab id="step2" title="Address" disabled={!step1Complete}>
|
|
155
|
+
<AddressForm />
|
|
156
|
+
</Tab>
|
|
157
|
+
<Tab id="step3" title="Payment" disabled={!step2Complete}>
|
|
158
|
+
<PaymentForm />
|
|
159
|
+
</Tab>
|
|
160
|
+
</Tabs>
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
## Do
|
|
164
|
+
|
|
165
|
+
- Always set a default `active` tab to prevent an empty initial state.
|
|
166
|
+
- Use clear, concise tab titles (one to three words).
|
|
167
|
+
- Arrange tabs in a logical order matching the user's workflow.
|
|
168
|
+
- Use `disabled` for tabs not yet accessible (e.g. incomplete wizard steps).
|
|
169
|
+
- Use design-token classes for any custom styling (`bg-background`, `border-border`).
|
|
170
|
+
|
|
171
|
+
## Don't
|
|
172
|
+
|
|
173
|
+
- Don't pass raw Tailwind color classes (`bg-blue-50`, `border-gray-300`) — use design tokens instead.
|
|
174
|
+
- Don't use arbitrary Tailwind values (`bg-[#abc]`, `bg-[--my-var]`) — override CSS variables in your `@theme` block.
|
|
175
|
+
- Don't use more than 6–8 tabs; prefer sidebar navigation for larger sets.
|
|
176
|
+
- Don't use tabs for content that needs to be compared side-by-side.
|
|
177
|
+
- Don't use tabs for primary page-level navigation; use a nav bar instead.
|
|
178
|
+
|
|
179
|
+
## Accessibility
|
|
180
|
+
|
|
181
|
+
- Tab buttons use `aria-current="page"` and `aria-disabled` for screen reader state.
|
|
182
|
+
- Keyboard navigation: `ArrowLeft` / `ArrowRight` moves between tabs; `Tab` key focuses the header row.
|
|
183
|
+
- Disabled tabs are skipped during arrow-key navigation.
|
|
184
|
+
- Tab panels are only rendered when active (unmounted otherwise) — use this for performance but be aware that form state inside inactive panels is lost.
|
|
185
|
+
|
|
186
|
+
## Notes
|
|
187
|
+
|
|
188
|
+
- Only the active panel's `children` are rendered — inactive panels are unmounted.
|
|
189
|
+
- The tab header list is horizontally scrollable on small screens (`overflow-x-auto`).
|
|
190
|
+
- `Tabs` is built on top of `Card`, so it inherits card design tokens and the `container` / `className` props map to the card's `container` and `className` respectively.
|
|
191
|
+
- If `active` does not match any `Tab` `id`, the component selects the first available non-disabled tab automatically.
|
package/ai/docs/Tag.md
ADDED
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Tag
|
|
3
|
+
description: A label/badge component for displaying metadata, status, or categorization information.
|
|
4
|
+
package: "@g4rcez/components"
|
|
5
|
+
export: "{ Tag }"
|
|
6
|
+
import: "import { Tag } from '@g4rcez/components/tag'"
|
|
7
|
+
category: core
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Tag
|
|
11
|
+
|
|
12
|
+
A versatile label/badge component for displaying metadata, status, or categorization information. Built with polymorphic capabilities and multiple visual variants.
|
|
13
|
+
|
|
14
|
+
## Import
|
|
15
|
+
|
|
16
|
+
```tsx
|
|
17
|
+
import { Tag } from "@g4rcez/components/tag";
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Props
|
|
21
|
+
|
|
22
|
+
| Prop | Type | Default | Description |
|
|
23
|
+
| ----------- | -------------------------------------------------------------------------------------------------------------------------------------- | ----------- | ------------------------------------------ |
|
|
24
|
+
| `theme` | `"primary" \| "secondary" \| "info" \| "warn" \| "danger" \| "success" \| "muted" \| "neutral" \| "custom" \| "disabled" \| "loading"` | `"primary"` | Visual theme/variant of the tag |
|
|
25
|
+
| `size` | `"icon" \| "small" \| "default" \| "big" \| "tiny"` | `"default"` | Size of the tag |
|
|
26
|
+
| `icon` | `React.ReactNode` | - | Icon to display inside the tag |
|
|
27
|
+
| `indicator` | `"primary" \| "secondary" \| "info" \| "warn" \| "danger" \| "success" \| "muted" \| "neutral"` | - | Shows a small colored dot before the label |
|
|
28
|
+
| `loading` | `boolean` | `false` | Overrides theme with pulse animation |
|
|
29
|
+
| `as` | `React.ElementType` | `"span"` | HTML element to render as |
|
|
30
|
+
| `className` | `string` | - | Additional CSS classes |
|
|
31
|
+
| `children` | `React.ReactNode` | - | Tag content |
|
|
32
|
+
|
|
33
|
+
## Design Tokens
|
|
34
|
+
|
|
35
|
+
Tokens this component reads. Customize by overriding these CSS variables in your theme.
|
|
36
|
+
|
|
37
|
+
| Token | CSS Variable | Purpose |
|
|
38
|
+
| ------------------------- | ---------------------- | -------------------------------------- |
|
|
39
|
+
| `bg-tag-primary-bg` | `--tag-primary-bg` | Background for primary theme |
|
|
40
|
+
| `text-tag-primary-text` | `--tag-primary-text` | Text color for primary theme |
|
|
41
|
+
| `bg-tag-secondary-bg` | `--tag-secondary-bg` | Background for secondary theme |
|
|
42
|
+
| `text-tag-secondary-text` | `--tag-secondary-text` | Text color for secondary theme |
|
|
43
|
+
| `bg-tag-info-bg` | `--tag-info-bg` | Background for info theme |
|
|
44
|
+
| `text-tag-info-text` | `--tag-info-text` | Text color for info theme |
|
|
45
|
+
| `bg-tag-warn-bg` | `--tag-warn-bg` | Background for warn theme |
|
|
46
|
+
| `text-tag-warn-text` | `--tag-warn-text` | Text color for warn theme |
|
|
47
|
+
| `bg-tag-danger-bg` | `--tag-danger-bg` | Background for danger theme |
|
|
48
|
+
| `text-tag-danger-text` | `--tag-danger-text` | Text color for danger theme |
|
|
49
|
+
| `bg-tag-success-bg` | `--tag-success-bg` | Background for success theme |
|
|
50
|
+
| `text-tag-success-text` | `--tag-success-text` | Text color for success theme |
|
|
51
|
+
| `bg-tag-muted-bg` | `--tag-muted-bg` | Background for muted theme |
|
|
52
|
+
| `text-tag-muted-text` | `--tag-muted-text` | Text color for muted theme |
|
|
53
|
+
| `bg-disabled` | `--disabled` | Background for disabled/loading states |
|
|
54
|
+
| `border-card-border` | `--card-border` | Border color for neutral theme |
|
|
55
|
+
| `rounded-pill` | `--radius-pill` | Pill border radius applied to all tags |
|
|
56
|
+
| `bg-primary` | `--primary` | Dot color for primary indicator |
|
|
57
|
+
| `bg-secondary` | `--secondary` | Dot color for secondary indicator |
|
|
58
|
+
| `bg-info` | `--info` | Dot color for info indicator |
|
|
59
|
+
| `bg-warn` | `--warn` | Dot color for warn indicator |
|
|
60
|
+
| `bg-danger` | `--danger` | Dot color for danger indicator |
|
|
61
|
+
| `bg-success` | `--success` | Dot color for success indicator |
|
|
62
|
+
| `bg-muted` | `--muted` | Dot color for muted indicator |
|
|
63
|
+
|
|
64
|
+
## Theme Variants
|
|
65
|
+
|
|
66
|
+
- `primary`: Primary brand color
|
|
67
|
+
- `secondary`: Secondary color scheme
|
|
68
|
+
- `info`: Informational styling
|
|
69
|
+
- `warn`: Warning/caution styling
|
|
70
|
+
- `danger`: Error/destructive styling
|
|
71
|
+
- `success`: Success/positive styling
|
|
72
|
+
- `muted`: Subtle/subdued styling
|
|
73
|
+
- `neutral`: Transparent with card border
|
|
74
|
+
- `custom`: No default styling — supply all classes via `className`
|
|
75
|
+
- `disabled`: Disabled appearance with reduced opacity
|
|
76
|
+
- `loading`: Pulse animation (also triggered by the `loading` boolean prop)
|
|
77
|
+
|
|
78
|
+
## Examples
|
|
79
|
+
|
|
80
|
+
### Basic Variants
|
|
81
|
+
|
|
82
|
+
```tsx
|
|
83
|
+
<Tag theme="primary">Primary</Tag>
|
|
84
|
+
<Tag theme="secondary">Secondary</Tag>
|
|
85
|
+
<Tag theme="info">Info</Tag>
|
|
86
|
+
<Tag theme="warn">Warning</Tag>
|
|
87
|
+
<Tag theme="danger">Error</Tag>
|
|
88
|
+
<Tag theme="success">Success</Tag>
|
|
89
|
+
<Tag theme="muted">Muted</Tag>
|
|
90
|
+
<Tag theme="neutral">Neutral</Tag>
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
### Sizes
|
|
94
|
+
|
|
95
|
+
```tsx
|
|
96
|
+
<Tag size="small">Small</Tag>
|
|
97
|
+
<Tag size="default">Default</Tag>
|
|
98
|
+
<Tag size="big">Big</Tag>
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
### With Icons
|
|
102
|
+
|
|
103
|
+
```tsx
|
|
104
|
+
import { StarIcon, CheckIcon } from "@phosphor-icons/react";
|
|
105
|
+
|
|
106
|
+
<Tag icon={<StarIcon size={14} />} theme="warn">Featured</Tag>
|
|
107
|
+
<Tag icon={<CheckIcon size={14} />} theme="success">Completed</Tag>
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
### With Indicators
|
|
111
|
+
|
|
112
|
+
```tsx
|
|
113
|
+
<Tag indicator="success">Online</Tag>
|
|
114
|
+
<Tag indicator="danger">Offline</Tag>
|
|
115
|
+
<Tag indicator="warn">Pending</Tag>
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
### Status Tags
|
|
119
|
+
|
|
120
|
+
```tsx
|
|
121
|
+
const statusMap: Record<string, { theme: "success" | "warn" | "muted" | "danger" }> = {
|
|
122
|
+
active: { theme: "success" },
|
|
123
|
+
pending: { theme: "warn" },
|
|
124
|
+
inactive: { theme: "muted" },
|
|
125
|
+
error: { theme: "danger" },
|
|
126
|
+
};
|
|
127
|
+
|
|
128
|
+
const StatusTag = ({ status }: { status: string }) => {
|
|
129
|
+
const config = statusMap[status] ?? statusMap.inactive;
|
|
130
|
+
return (
|
|
131
|
+
<Tag theme={config.theme} indicator={config.theme}>
|
|
132
|
+
{status.charAt(0).toUpperCase() + status.slice(1)}
|
|
133
|
+
</Tag>
|
|
134
|
+
);
|
|
135
|
+
};
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
### Loading State
|
|
139
|
+
|
|
140
|
+
```tsx
|
|
141
|
+
<Tag loading theme="primary">
|
|
142
|
+
Processing...
|
|
143
|
+
</Tag>
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
### Polymorphic Usage
|
|
147
|
+
|
|
148
|
+
```tsx
|
|
149
|
+
<Tag as="button" onClick={() => void 0} theme="primary">
|
|
150
|
+
Clickable Tag
|
|
151
|
+
</Tag>
|
|
152
|
+
|
|
153
|
+
<Tag as="a" href="/category/react" theme="info">
|
|
154
|
+
React
|
|
155
|
+
</Tag>
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
### Content Categorization
|
|
159
|
+
|
|
160
|
+
```tsx
|
|
161
|
+
const categories = [
|
|
162
|
+
{ name: "React", theme: "info" },
|
|
163
|
+
{ name: "TypeScript", theme: "primary" },
|
|
164
|
+
{ name: "CSS", theme: "success" },
|
|
165
|
+
];
|
|
166
|
+
|
|
167
|
+
<div className="flex gap-2 flex-wrap">
|
|
168
|
+
{categories.map((cat) => (
|
|
169
|
+
<Tag key={cat.name} theme={cat.theme as any}>
|
|
170
|
+
{cat.name}
|
|
171
|
+
</Tag>
|
|
172
|
+
))}
|
|
173
|
+
</div>;
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
### Notification Badge
|
|
177
|
+
|
|
178
|
+
```tsx
|
|
179
|
+
import { BellIcon } from "@phosphor-icons/react";
|
|
180
|
+
|
|
181
|
+
<div className="relative">
|
|
182
|
+
<BellIcon size={24} />
|
|
183
|
+
<Tag size="small" theme="danger" className="absolute -top-2 -right-2 min-w-[20px] h-5 text-xs">
|
|
184
|
+
3
|
|
185
|
+
</Tag>
|
|
186
|
+
</div>;
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
## Do
|
|
190
|
+
|
|
191
|
+
- Use `theme="success"` for positive states and `theme="danger"` for errors — keep it consistent
|
|
192
|
+
- Keep tag labels short and scannable
|
|
193
|
+
- Use `indicator` to add extra color meaning without extra text
|
|
194
|
+
- Use `as="button"` when the tag performs an action (e.g., removing a filter)
|
|
195
|
+
- Use design-token classes for wrapper elements (`bg-muted`, `border-border`)
|
|
196
|
+
|
|
197
|
+
## Don't
|
|
198
|
+
|
|
199
|
+
- Don't pass raw Tailwind color classes (`bg-blue-500`, `text-white`) — use `theme` prop instead
|
|
200
|
+
- Don't use arbitrary Tailwind values (`bg-[#abc]`, `bg-[--my-var]`) — override CSS variables in your `@theme` block
|
|
201
|
+
- Don't use too many different themes on one screen — excessive color variety is distracting
|
|
202
|
+
- Don't use `Tag` as a replacement for `Button` on primary actions
|
|
203
|
+
- Don't combine `icon` and `indicator` on a small tag — it becomes too visually busy
|
|
204
|
+
|
|
205
|
+
## Accessibility
|
|
206
|
+
|
|
207
|
+
- Uses semantic HTML via the `as` prop (defaults to `<span>`)
|
|
208
|
+
- The indicator dot is `aria-hidden="true"` — it is purely decorative
|
|
209
|
+
- When used as a `button` or `a`, standard keyboard navigation applies
|
|
210
|
+
- Ensure color meaning is supplemented by text — do not rely on color alone
|
|
211
|
+
|
|
212
|
+
## Data Attributes
|
|
213
|
+
|
|
214
|
+
- `data-component="tag"`: Identifies the component for styling/testing
|
|
215
|
+
- `data-theme`: Current theme variant value
|
|
216
|
+
|
|
217
|
+
## Notes
|
|
218
|
+
|
|
219
|
+
- The `loading` prop overrides the `theme` value and applies the loading animation
|
|
220
|
+
- Once `loading` becomes `false`, the original `theme` is restored
|
|
221
|
+
- The component forwards refs to the underlying element
|
|
222
|
+
- All standard HTML attributes for the target element are forwarded
|
|
@@ -22,20 +22,20 @@ import { Checkbox } from "@g4rcez/components/checkbox";
|
|
|
22
22
|
|
|
23
23
|
Accepts all standard HTML `<fieldset>` attributes.
|
|
24
24
|
|
|
25
|
-
| Prop
|
|
26
|
-
|
|
27
|
-
| `children`
|
|
28
|
-
| `className` | `string`
|
|
25
|
+
| Prop | Type | Default | Description |
|
|
26
|
+
| ----------- | ----------------- | ------- | --------------------------------------------- |
|
|
27
|
+
| `children` | `React.ReactNode` | — | `Checkbox` components with the `asTask` prop. |
|
|
28
|
+
| `className` | `string` | — | Additional CSS classes for the `<fieldset>`. |
|
|
29
29
|
|
|
30
30
|
## Design Tokens
|
|
31
31
|
|
|
32
32
|
`TaskList` itself is a plain `<fieldset>` and inherits ambient tokens from its children. No component-scoped tokens are consumed directly. Style the container using semantic tokens:
|
|
33
33
|
|
|
34
|
-
| Token
|
|
35
|
-
|
|
36
|
-
| `border-border`
|
|
37
|
-
| `bg-background`
|
|
38
|
-
| `text-foreground` | `--foreground` | Task label text
|
|
34
|
+
| Token | CSS Variable | Purpose |
|
|
35
|
+
| ----------------- | -------------- | ------------------------------------- |
|
|
36
|
+
| `border-border` | `--border` | Optional border around the task group |
|
|
37
|
+
| `bg-background` | `--background` | Container background |
|
|
38
|
+
| `text-foreground` | `--foreground` | Task label text |
|
|
39
39
|
|
|
40
40
|
## Examples
|
|
41
41
|
|
|
@@ -46,13 +46,13 @@ import { TaskList } from "@g4rcez/components/task-list";
|
|
|
46
46
|
import { Checkbox } from "@g4rcez/components/checkbox";
|
|
47
47
|
|
|
48
48
|
export default function OnboardingChecklist() {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
49
|
+
return (
|
|
50
|
+
<TaskList className="flex flex-col gap-sm border border-border rounded-card p-4">
|
|
51
|
+
<Checkbox asTask>Complete initial setup</Checkbox>
|
|
52
|
+
<Checkbox asTask>Upload profile picture</Checkbox>
|
|
53
|
+
<Checkbox asTask>Verify email address</Checkbox>
|
|
54
|
+
</TaskList>
|
|
55
|
+
);
|
|
56
56
|
}
|
|
57
57
|
```
|
|
58
58
|
|
|
@@ -66,27 +66,19 @@ import { Checkbox } from "@g4rcez/components/checkbox";
|
|
|
66
66
|
type Task = { id: string; text: string; done: boolean };
|
|
67
67
|
|
|
68
68
|
export default function DynamicTaskList({ tasks }: { tasks: Task[] }) {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
69
|
+
const [items, setItems] = useState(tasks);
|
|
70
|
+
|
|
71
|
+
const toggle = (id: string) => setItems((prev) => prev.map((t) => (t.id === id ? { ...t, done: !t.done } : t)));
|
|
72
|
+
|
|
73
|
+
return (
|
|
74
|
+
<TaskList className="flex flex-col gap-sm">
|
|
75
|
+
{items.map((task) => (
|
|
76
|
+
<Checkbox key={task.id} asTask checked={task.done} onChange={() => toggle(task.id)}>
|
|
77
|
+
{task.text}
|
|
78
|
+
</Checkbox>
|
|
79
|
+
))}
|
|
80
|
+
</TaskList>
|
|
74
81
|
);
|
|
75
|
-
|
|
76
|
-
return (
|
|
77
|
-
<TaskList className="flex flex-col gap-sm">
|
|
78
|
-
{items.map((task) => (
|
|
79
|
-
<Checkbox
|
|
80
|
-
key={task.id}
|
|
81
|
-
asTask
|
|
82
|
-
checked={task.done}
|
|
83
|
-
onChange={() => toggle(task.id)}
|
|
84
|
-
>
|
|
85
|
-
{task.text}
|
|
86
|
-
</Checkbox>
|
|
87
|
-
))}
|
|
88
|
-
</TaskList>
|
|
89
|
-
);
|
|
90
82
|
}
|
|
91
83
|
```
|
|
92
84
|
|
|
@@ -97,16 +89,14 @@ import { TaskList } from "@g4rcez/components/task-list";
|
|
|
97
89
|
import { Checkbox } from "@g4rcez/components/checkbox";
|
|
98
90
|
|
|
99
91
|
export default function ProjectSubtasks() {
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
</TaskList>
|
|
109
|
-
);
|
|
92
|
+
return (
|
|
93
|
+
<TaskList className="flex flex-col gap-sm rounded-card border border-border p-4">
|
|
94
|
+
<legend className="px-1 text-sm font-medium text-foreground">Phase 1 — Design</legend>
|
|
95
|
+
<Checkbox asTask>Create wireframes</Checkbox>
|
|
96
|
+
<Checkbox asTask>Review with stakeholders</Checkbox>
|
|
97
|
+
<Checkbox asTask>Export design tokens</Checkbox>
|
|
98
|
+
</TaskList>
|
|
99
|
+
);
|
|
110
100
|
}
|
|
111
101
|
```
|
|
112
102
|
|
|
@@ -132,10 +122,10 @@ export default function ProjectSubtasks() {
|
|
|
132
122
|
|
|
133
123
|
## Data Attributes
|
|
134
124
|
|
|
135
|
-
| Attribute
|
|
136
|
-
|
|
137
|
-
| `data-component` | `fieldset`
|
|
138
|
-
| `data-task`
|
|
125
|
+
| Attribute | Element | Value | Description |
|
|
126
|
+
| ---------------- | ------------- | ------------- | ------------------------------------------------------------------------------------------------------------------------ |
|
|
127
|
+
| `data-component` | `fieldset` | `"task-list"` | Identifies the component. |
|
|
128
|
+
| `data-task` | child `input` | `"true"` | Must be present on child checkbox inputs for them to be counted in the completion check. Set automatically via `asTask`. |
|
|
139
129
|
|
|
140
130
|
## Notes
|
|
141
131
|
|