@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
|
@@ -0,0 +1,262 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: PageCalendar
|
|
3
|
+
description: Full-page calendar with month, week, and day views, event filtering, and custom event rendering.
|
|
4
|
+
package: "@g4rcez/components"
|
|
5
|
+
export: "{ PageCalendar }"
|
|
6
|
+
import: "import { PageCalendar } from '@g4rcez/components'"
|
|
7
|
+
category: calendar
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# PageCalendar
|
|
11
|
+
|
|
12
|
+
Full-page calendar with month, week, and day views, event filtering, and custom event rendering.
|
|
13
|
+
|
|
14
|
+
## Import
|
|
15
|
+
|
|
16
|
+
```tsx
|
|
17
|
+
import { PageCalendar } from "@g4rcez/components";
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Props
|
|
21
|
+
|
|
22
|
+
| Prop | Type | Default | Description |
|
|
23
|
+
| ----------------- | ---------------------------------------- | ------------ | ------------------------------------------------------------------------------------- |
|
|
24
|
+
| `events` | `CalendarEvent<T>[]` | — | Array of event objects to display across all views. |
|
|
25
|
+
| `filters` | `CalendarFilter[]` | `[]` | Filter tag definitions. Each filter can be toggled to hide/show matching events. |
|
|
26
|
+
| `defaultView` | `"month" \| "week" \| "day"` | `"month"` | Initial view rendered when the component mounts. |
|
|
27
|
+
| `defaultDate` | `Date` | `new Date()` | Initial date the calendar focuses on. |
|
|
28
|
+
| `onEventClick` | `(event: CalendarEvent) => void` | — | Called when the user clicks an event pill. |
|
|
29
|
+
| `onSlotClick` | `(date: Date) => void` | — | Called when the user clicks an empty time slot (week and day views). |
|
|
30
|
+
| `onAddEvent` | `() => void` | — | Called when the "Add event" button in the header is clicked. Omit to hide the button. |
|
|
31
|
+
| `onChangeFilters` | `(filters: CalendarFilter[]) => void` | — | Called whenever a filter is toggled, receiving the updated filter array. |
|
|
32
|
+
| `renderEvent` | `(event: CalendarEvent<T>) => ReactNode` | — | Custom renderer for the selected event detail panel in day view. |
|
|
33
|
+
| `filterArea` | `ReactNode` | — | Replaces the default filter tag row in the header with custom content. |
|
|
34
|
+
| `getFilterId` | `() => void` | — | Custom accessor to extract a `filterId` from an event. Defaults to `event.filterId`. |
|
|
35
|
+
|
|
36
|
+
## Type Definitions
|
|
37
|
+
|
|
38
|
+
### CalendarEventBase
|
|
39
|
+
|
|
40
|
+
```ts
|
|
41
|
+
type CalendarEventBase = {
|
|
42
|
+
id: string;
|
|
43
|
+
date: Date;
|
|
44
|
+
};
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### CalendarEvent
|
|
48
|
+
|
|
49
|
+
```ts
|
|
50
|
+
type CalendarEvent<T extends CalendarEventBase = CalendarEventBase> = T & {
|
|
51
|
+
title: string;
|
|
52
|
+
filterId?: string;
|
|
53
|
+
className?: string;
|
|
54
|
+
};
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
`className` is applied directly to the event pill element in all views.
|
|
58
|
+
|
|
59
|
+
### CalendarFilter
|
|
60
|
+
|
|
61
|
+
```ts
|
|
62
|
+
type CalendarFilter = {
|
|
63
|
+
id: string;
|
|
64
|
+
label: string;
|
|
65
|
+
enabled: boolean;
|
|
66
|
+
theme: TagProps["theme"]; // "primary" | "success" | "warn" | "danger" | "info" | "neutral" | "secondary" | "muted"
|
|
67
|
+
};
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### ViewMode
|
|
71
|
+
|
|
72
|
+
```ts
|
|
73
|
+
type ViewMode = "month" | "week" | "day";
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## Design Tokens
|
|
77
|
+
|
|
78
|
+
Tokens this component reads. Customize by overriding these CSS variables in your theme.
|
|
79
|
+
|
|
80
|
+
| Token | CSS Variable | Purpose |
|
|
81
|
+
| ------------------------- | ---------------------- | -------------------------------------------------- |
|
|
82
|
+
| `bg-primary` | `--primary` | Today indicator background, selected day highlight |
|
|
83
|
+
| `text-primary-foreground` | `--primary-foreground` | Text on today / selected day indicator |
|
|
84
|
+
| `bg-card` | `--card` | Non-today day indicator background in header |
|
|
85
|
+
| `text-foreground` | `--foreground` | Default text in day cells and header |
|
|
86
|
+
| `text-muted-foreground` | `--muted-foreground` | Week label, hour labels, secondary text |
|
|
87
|
+
| `border-border` | `--border` | Grid cell borders, day view hour-slot dividers |
|
|
88
|
+
| `border-card-border` | `--card-border` | Day and week view column borders |
|
|
89
|
+
| `bg-muted` | `--muted` | Hover background on time slots |
|
|
90
|
+
| `z-calendar` | `--z-calendar` | `z-index` for the column resizer handle (value: 2) |
|
|
91
|
+
| `z-floating` | `--z-floating` | `z-index` for floating overlays (value: 22) |
|
|
92
|
+
|
|
93
|
+
## Views
|
|
94
|
+
|
|
95
|
+
### Month view
|
|
96
|
+
|
|
97
|
+
Displays a 6-row grid of all days in the selected month. Each day cell shows event pills. Clicking a day navigates to that day in the day view.
|
|
98
|
+
|
|
99
|
+
### Week view
|
|
100
|
+
|
|
101
|
+
Displays the 7 days of the current week with an hourly time grid. Events are placed at their time position. Clicking an empty slot calls `onSlotClick`.
|
|
102
|
+
|
|
103
|
+
### Day view
|
|
104
|
+
|
|
105
|
+
Displays a single day with an hourly grid alongside a mini calendar and a detail panel. The detail panel shows a default summary or your `renderEvent` output when an event is clicked.
|
|
106
|
+
|
|
107
|
+
## Examples
|
|
108
|
+
|
|
109
|
+
### Minimal calendar
|
|
110
|
+
|
|
111
|
+
```tsx
|
|
112
|
+
import { PageCalendar } from "@g4rcez/components";
|
|
113
|
+
|
|
114
|
+
type MyEvent = { id: string; date: Date; title: string };
|
|
115
|
+
|
|
116
|
+
const events: MyEvent[] = [{ id: "1", date: new Date(), title: "Team standup" }];
|
|
117
|
+
|
|
118
|
+
export function MyCalendar() {
|
|
119
|
+
return <PageCalendar events={events} onEventClick={(event) => console.log(event)} />;
|
|
120
|
+
}
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
### With filters
|
|
124
|
+
|
|
125
|
+
```tsx
|
|
126
|
+
import { PageCalendar } from "@g4rcez/components";
|
|
127
|
+
import type { CalendarFilter } from "@g4rcez/components";
|
|
128
|
+
|
|
129
|
+
const filters: CalendarFilter[] = [
|
|
130
|
+
{ id: "work", label: "Work", enabled: true, theme: "primary" },
|
|
131
|
+
{ id: "personal", label: "Personal", enabled: true, theme: "success" },
|
|
132
|
+
];
|
|
133
|
+
|
|
134
|
+
const events = [
|
|
135
|
+
{ id: "1", date: new Date(), title: "Sprint planning", filterId: "work" },
|
|
136
|
+
{ id: "2", date: new Date(), title: "Gym", filterId: "personal" },
|
|
137
|
+
];
|
|
138
|
+
|
|
139
|
+
export function FilteredCalendar() {
|
|
140
|
+
return <PageCalendar events={events} filters={filters} onChangeFilters={(updated) => console.log(updated)} />;
|
|
141
|
+
}
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
### Custom event detail in day view
|
|
145
|
+
|
|
146
|
+
```tsx
|
|
147
|
+
import { PageCalendar } from "@g4rcez/components";
|
|
148
|
+
import { MapPinIcon } from "@phosphor-icons/react";
|
|
149
|
+
|
|
150
|
+
export function DetailCalendar() {
|
|
151
|
+
return (
|
|
152
|
+
<PageCalendar
|
|
153
|
+
events={events}
|
|
154
|
+
defaultView="day"
|
|
155
|
+
renderEvent={(event) => (
|
|
156
|
+
<div className="flex flex-col gap-1 p-2 bg-muted rounded-card">
|
|
157
|
+
<span className="font-semibold text-foreground">{event.title}</span>
|
|
158
|
+
<span className="flex items-center gap-1 text-sm text-muted-foreground">
|
|
159
|
+
<MapPinIcon size={12} />
|
|
160
|
+
{event.location}
|
|
161
|
+
</span>
|
|
162
|
+
</div>
|
|
163
|
+
)}
|
|
164
|
+
/>
|
|
165
|
+
);
|
|
166
|
+
}
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
### Controlled add-event flow
|
|
170
|
+
|
|
171
|
+
```tsx
|
|
172
|
+
import { useState } from "react";
|
|
173
|
+
import { PageCalendar } from "@g4rcez/components";
|
|
174
|
+
|
|
175
|
+
export function EditableCalendar() {
|
|
176
|
+
const [showForm, setShowForm] = useState(false);
|
|
177
|
+
const [slotDate, setSlotDate] = useState<Date | null>(null);
|
|
178
|
+
|
|
179
|
+
return (
|
|
180
|
+
<>
|
|
181
|
+
<PageCalendar
|
|
182
|
+
events={events}
|
|
183
|
+
onAddEvent={() => setShowForm(true)}
|
|
184
|
+
onSlotClick={(date) => {
|
|
185
|
+
setSlotDate(date);
|
|
186
|
+
setShowForm(true);
|
|
187
|
+
}}
|
|
188
|
+
/>
|
|
189
|
+
{showForm && <EventForm defaultDate={slotDate} onClose={() => setShowForm(false)} />}
|
|
190
|
+
</>
|
|
191
|
+
);
|
|
192
|
+
}
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
### Custom filter area
|
|
196
|
+
|
|
197
|
+
```tsx
|
|
198
|
+
import { PageCalendar } from "@g4rcez/components";
|
|
199
|
+
import { Button } from "@g4rcez/components/button";
|
|
200
|
+
|
|
201
|
+
export function CustomFilterCalendar() {
|
|
202
|
+
return (
|
|
203
|
+
<PageCalendar
|
|
204
|
+
events={events}
|
|
205
|
+
filterArea={
|
|
206
|
+
<div className="flex items-center gap-2 rounded-card bg-muted px-3 py-1.5">
|
|
207
|
+
<Button theme="ghost-muted" size="small">
|
|
208
|
+
All
|
|
209
|
+
</Button>
|
|
210
|
+
<Button theme="primary" size="small">
|
|
211
|
+
Mine
|
|
212
|
+
</Button>
|
|
213
|
+
</div>
|
|
214
|
+
}
|
|
215
|
+
/>
|
|
216
|
+
);
|
|
217
|
+
}
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
## Do
|
|
221
|
+
|
|
222
|
+
- Provide unique `id` values for every event and filter to ensure stable React keys and filter matching.
|
|
223
|
+
- Use `theme` on filters to give users a quick visual legend for event categories.
|
|
224
|
+
- Implement both `onAddEvent` and `onSlotClick` to give users two natural entry points for creating events.
|
|
225
|
+
- Use design-token classes in `renderEvent` output (`bg-muted`, `text-foreground`, `border-border`).
|
|
226
|
+
- Keep event `title` values short — they are truncated in month and week event pills.
|
|
227
|
+
|
|
228
|
+
## Don't
|
|
229
|
+
|
|
230
|
+
- Don't pass raw Tailwind color classes (`bg-blue-500`, `text-white`, `border-gray-300`) — use `theme` on filters/events or design tokens instead.
|
|
231
|
+
- Don't use arbitrary Tailwind values (`bg-[#abc]`, `bg-[--my-var]`) — override CSS variables in your `@theme` block instead.
|
|
232
|
+
- Don't pack more than a handful of events per day in month view — the grid will overflow; guide users toward week or day view for dense schedules.
|
|
233
|
+
- Don't use extremely long event titles; they are truncated inside the event pill.
|
|
234
|
+
- Don't supply both `filterArea` and `filters` expecting both to render — `filterArea` fully replaces the default filter tag row.
|
|
235
|
+
|
|
236
|
+
## Accessibility
|
|
237
|
+
|
|
238
|
+
- The root container has `role="application"` and `aria-label` from the i18n translation key `pageCalendarLabel`.
|
|
239
|
+
- The header month/year title uses `aria-live="polite"` and `aria-atomic="true"` so screen readers announce date changes after navigation.
|
|
240
|
+
- Navigation buttons (`Previous`, `Today`, `Next`) have `aria-label` attributes for screen reader descriptions.
|
|
241
|
+
- View toggle buttons use `aria-pressed` to communicate the active view.
|
|
242
|
+
- Filter tags are rendered as `<button>` elements with `aria-pressed` and an `aria-label` that includes the enabled/disabled state.
|
|
243
|
+
- Day view hour slots have `role="button"`, `tabIndex={0}`, and `aria-label` for keyboard-accessible slot selection.
|
|
244
|
+
- The day column header uses `aria-label` with the full formatted date string.
|
|
245
|
+
|
|
246
|
+
## Data Attributes
|
|
247
|
+
|
|
248
|
+
- `data-component="day-view-scroller"` — the scrolling container inside the day view. Useful for CSS height overrides:
|
|
249
|
+
|
|
250
|
+
```css
|
|
251
|
+
[data-component="day-view-scroller"] {
|
|
252
|
+
height: calc(100dvh - 200px);
|
|
253
|
+
}
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
## Notes
|
|
257
|
+
|
|
258
|
+
- Internally uses `date-fns` for all date arithmetic and locale-aware formatting. The locale is read from the `useLocale` hook; set it at the app root via the component provider.
|
|
259
|
+
- All labels (button text, ARIA strings, week number format) are driven by the i18n translation system. Override via the `translations` prop on the root provider.
|
|
260
|
+
- Event filtering is managed internally; `onChangeFilters` lets you mirror the filter state to an external store without controlling it.
|
|
261
|
+
- The day view mini-calendar renders dots beneath days that have events, matching the `bg-primary` token for visual consistency.
|
|
262
|
+
- The component grows to fill its container (`h-full flex-grow`). Place it inside a flex or grid container with an explicit height.
|
|
@@ -19,20 +19,20 @@ import { Polymorph } from "@g4rcez/components";
|
|
|
19
19
|
|
|
20
20
|
## Props
|
|
21
21
|
|
|
22
|
-
| Prop
|
|
23
|
-
|
|
24
|
-
| `as`
|
|
25
|
-
| `ref`
|
|
26
|
-
| `...props` | `React.ComponentPropsWithoutRef<T>` | -
|
|
22
|
+
| Prop | Type | Default | Description |
|
|
23
|
+
| ---------- | ----------------------------------- | -------- | ------------------------------------------------ |
|
|
24
|
+
| `as` | `React.ElementType` | `"span"` | The HTML element or React component to render as |
|
|
25
|
+
| `ref` | `React.Ref` | - | Forwarded ref to the rendered element |
|
|
26
|
+
| `...props` | `React.ComponentPropsWithoutRef<T>` | - | All props valid for the chosen element type |
|
|
27
27
|
|
|
28
28
|
## Type Definitions
|
|
29
29
|
|
|
30
30
|
```tsx
|
|
31
31
|
export type PolymorphicProps<Props, T extends React.ElementType> = Props & {
|
|
32
|
-
|
|
32
|
+
as?: T;
|
|
33
33
|
} & Omit<React.ComponentPropsWithoutRef<T>, keyof Props | "as" | "ref"> & {
|
|
34
|
-
|
|
35
|
-
};
|
|
34
|
+
ref?: React.ComponentProps<T>["ref"];
|
|
35
|
+
};
|
|
36
36
|
```
|
|
37
37
|
|
|
38
38
|
## Design Tokens
|
|
@@ -61,17 +61,13 @@ None — Polymorph itself applies no styles. It is a structural primitive only.
|
|
|
61
61
|
import { useRef } from "react";
|
|
62
62
|
|
|
63
63
|
const MyComponent = () => {
|
|
64
|
-
|
|
64
|
+
const buttonRef = useRef<HTMLButtonElement>(null);
|
|
65
65
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
>
|
|
72
|
-
Focus Me
|
|
73
|
-
</Polymorph>
|
|
74
|
-
);
|
|
66
|
+
return (
|
|
67
|
+
<Polymorph as="button" ref={buttonRef} onClick={() => buttonRef.current?.focus()}>
|
|
68
|
+
Focus Me
|
|
69
|
+
</Polymorph>
|
|
70
|
+
);
|
|
75
71
|
};
|
|
76
72
|
```
|
|
77
73
|
|
|
@@ -79,13 +75,9 @@ const MyComponent = () => {
|
|
|
79
75
|
|
|
80
76
|
```tsx
|
|
81
77
|
const DynamicItem = ({ isLink, href }: { isLink: boolean; href?: string }) => (
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
className="text-foreground"
|
|
86
|
-
>
|
|
87
|
-
{isLink ? "Visit Link" : "Click Button"}
|
|
88
|
-
</Polymorph>
|
|
78
|
+
<Polymorph as={isLink ? "a" : "button"} href={isLink ? href : undefined} className="text-foreground">
|
|
79
|
+
{isLink ? "Visit Link" : "Click Button"}
|
|
80
|
+
</Polymorph>
|
|
89
81
|
);
|
|
90
82
|
```
|
|
91
83
|
|
|
@@ -94,22 +86,14 @@ const DynamicItem = ({ isLink, href }: { isLink: boolean; href?: string }) => (
|
|
|
94
86
|
```tsx
|
|
95
87
|
import { Polymorph, PolymorphicProps } from "@g4rcez/components";
|
|
96
88
|
|
|
97
|
-
type CardProps<T extends React.ElementType = "div"> = PolymorphicProps<
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
className,
|
|
106
|
-
...props
|
|
107
|
-
}: CardProps<T>) => (
|
|
108
|
-
<Polymorph
|
|
109
|
-
as={as ?? "div"}
|
|
110
|
-
className={`rounded-card border border-border ${variant === "muted" ? "bg-muted" : "bg-card-background"} ${className ?? ""}`}
|
|
111
|
-
{...props}
|
|
112
|
-
/>
|
|
89
|
+
type CardProps<T extends React.ElementType = "div"> = PolymorphicProps<{ variant?: "default" | "muted" }, T>;
|
|
90
|
+
|
|
91
|
+
const Card = <T extends React.ElementType = "div">({ as, variant = "default", className, ...props }: CardProps<T>) => (
|
|
92
|
+
<Polymorph
|
|
93
|
+
as={as ?? "div"}
|
|
94
|
+
className={`rounded-card border border-border ${variant === "muted" ? "bg-muted" : "bg-card-background"} ${className ?? ""}`}
|
|
95
|
+
{...props}
|
|
96
|
+
/>
|
|
113
97
|
);
|
|
114
98
|
```
|
|
115
99
|
|
|
@@ -19,24 +19,24 @@ import { Progress } from "@g4rcez/components";
|
|
|
19
19
|
|
|
20
20
|
## Props
|
|
21
21
|
|
|
22
|
-
| Prop
|
|
23
|
-
|
|
24
|
-
| `percent`
|
|
25
|
-
| `max`
|
|
26
|
-
| `label`
|
|
27
|
-
| `container`
|
|
28
|
-
| `className`
|
|
29
|
-
| `textClassName` | `string` | —
|
|
22
|
+
| Prop | Type | Default | Description |
|
|
23
|
+
| --------------- | -------- | ------- | -------------------------------------------------------- |
|
|
24
|
+
| `percent` | `number` | — | Current progress value (0–100) |
|
|
25
|
+
| `max` | `number` | — | Maximum value (forwarded to Base UI `Progress.Root`) |
|
|
26
|
+
| `label` | `Label` | — | Custom text overlay; overrides the default `{percent} %` |
|
|
27
|
+
| `container` | `string` | — | Additional classes for the track element |
|
|
28
|
+
| `className` | `string` | — | Additional classes for the indicator (fill) element |
|
|
29
|
+
| `textClassName` | `string` | — | Additional classes for the label text overlay |
|
|
30
30
|
|
|
31
31
|
## Design Tokens
|
|
32
32
|
|
|
33
33
|
Tokens this component reads. Customize by overriding these CSS variables in your theme.
|
|
34
34
|
|
|
35
|
-
| Token
|
|
36
|
-
|
|
37
|
-
| `bg-background`
|
|
38
|
-
| `bg-primary`
|
|
39
|
-
| `text-primary-foreground` | `--primary-foreground` | Default label text color
|
|
35
|
+
| Token | CSS Variable | Purpose |
|
|
36
|
+
| ------------------------- | ---------------------- | --------------------------- |
|
|
37
|
+
| `bg-background` | `--background` | Track (unfilled) background |
|
|
38
|
+
| `bg-primary` | `--primary` | Indicator (fill) color |
|
|
39
|
+
| `text-primary-foreground` | `--primary-foreground` | Default label text color |
|
|
40
40
|
|
|
41
41
|
## Examples
|
|
42
42
|
|
|
@@ -50,16 +50,16 @@ Tokens this component reads. Customize by overriding these CSS variables in your
|
|
|
50
50
|
|
|
51
51
|
```tsx
|
|
52
52
|
function AnimatedProgress() {
|
|
53
|
-
|
|
53
|
+
const [progress, setProgress] = useState(0);
|
|
54
54
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
55
|
+
useEffect(() => {
|
|
56
|
+
const timer = setInterval(() => {
|
|
57
|
+
setProgress((prev) => (prev >= 100 ? 0 : prev + 10));
|
|
58
|
+
}, 500);
|
|
59
|
+
return () => clearInterval(timer);
|
|
60
|
+
}, []);
|
|
61
61
|
|
|
62
|
-
|
|
62
|
+
return <Progress percent={progress} />;
|
|
63
63
|
}
|
|
64
64
|
```
|
|
65
65
|
|
|
@@ -74,26 +74,30 @@ function AnimatedProgress() {
|
|
|
74
74
|
When `percent` is `undefined` the indicator is not rendered and the label is hidden, leaving only the track. Combine with a separate `Spinner` for unknown-duration operations.
|
|
75
75
|
|
|
76
76
|
```tsx
|
|
77
|
-
{
|
|
77
|
+
{
|
|
78
|
+
isLoading ? <Spinner /> : <Progress percent={uploadPercent} />;
|
|
79
|
+
}
|
|
78
80
|
```
|
|
79
81
|
|
|
80
82
|
### Multi-Step Form Progress
|
|
81
83
|
|
|
82
84
|
```tsx
|
|
83
85
|
function MultiStepForm() {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
86
|
+
const [currentStep, setCurrentStep] = useState(1);
|
|
87
|
+
const totalSteps = 4;
|
|
88
|
+
const progress = (currentStep / totalSteps) * 100;
|
|
89
|
+
|
|
90
|
+
return (
|
|
91
|
+
<div className="space-y-4">
|
|
92
|
+
<div className="flex justify-between items-center text-sm text-muted-foreground">
|
|
93
|
+
<span>
|
|
94
|
+
Step {currentStep} of {totalSteps}
|
|
95
|
+
</span>
|
|
96
|
+
<span>{Math.round(progress)}% complete</span>
|
|
97
|
+
</div>
|
|
98
|
+
<Progress percent={progress} />
|
|
99
|
+
</div>
|
|
100
|
+
);
|
|
97
101
|
}
|
|
98
102
|
```
|
|
99
103
|
|
|
@@ -101,22 +105,22 @@ function MultiStepForm() {
|
|
|
101
105
|
|
|
102
106
|
```tsx
|
|
103
107
|
function FileUploadProgress({ fileName, percent }: { fileName: string; percent: number }) {
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
108
|
+
const isDone = percent >= 100;
|
|
109
|
+
|
|
110
|
+
return (
|
|
111
|
+
<div className="space-y-1">
|
|
112
|
+
<div className="flex justify-between text-sm">
|
|
113
|
+
<span className="text-foreground">{fileName}</span>
|
|
114
|
+
<span className="text-muted-foreground">{percent}%</span>
|
|
115
|
+
</div>
|
|
116
|
+
<Progress
|
|
117
|
+
percent={percent}
|
|
118
|
+
label={isDone ? "Complete" : undefined}
|
|
119
|
+
container={isDone ? "bg-success/20" : undefined}
|
|
120
|
+
className={isDone ? "bg-success" : undefined}
|
|
121
|
+
/>
|
|
122
|
+
</div>
|
|
123
|
+
);
|
|
120
124
|
}
|
|
121
125
|
```
|
|
122
126
|
|
|
@@ -21,22 +21,22 @@ import { Radiobox } from "@g4rcez/components/radiobox";
|
|
|
21
21
|
|
|
22
22
|
Accepts all standard HTML `input[type="radio"]` attributes, plus:
|
|
23
23
|
|
|
24
|
-
| Prop
|
|
25
|
-
|
|
26
|
-
| `children`
|
|
27
|
-
| `size`
|
|
28
|
-
| `className` | `string`
|
|
24
|
+
| Prop | Type | Default | Description |
|
|
25
|
+
| ----------- | --------------------- | ---------- | --------------------------------------------------------- |
|
|
26
|
+
| `children` | `React.ReactNode` | — | Label text or element displayed next to the radio button. |
|
|
27
|
+
| `size` | `"medium" \| "large"` | `"medium"` | Visual size of the radio button. |
|
|
28
|
+
| `className` | `string` | — | Additional CSS classes for the `<input>` element. |
|
|
29
29
|
|
|
30
30
|
## Design Tokens
|
|
31
31
|
|
|
32
32
|
Tokens this component reads. Customize by overriding these CSS variables in your theme.
|
|
33
33
|
|
|
34
|
-
| Token
|
|
35
|
-
|
|
36
|
-
| `border-card-border`
|
|
37
|
-
| `text-primary`
|
|
38
|
-
| `focus:ring-primary`
|
|
39
|
-
| `disabled:opacity-70` | —
|
|
34
|
+
| Token | CSS Variable | Purpose |
|
|
35
|
+
| --------------------- | --------------- | ---------------------------------------- |
|
|
36
|
+
| `border-card-border` | `--card-border` | Default border color of the radio circle |
|
|
37
|
+
| `text-primary` | `--primary` | Checked fill color (via `accent-color`) |
|
|
38
|
+
| `focus:ring-primary` | `--primary` | Focus ring color |
|
|
39
|
+
| `disabled:opacity-70` | — | Reduced opacity for disabled state |
|
|
40
40
|
|
|
41
41
|
## Examples
|
|
42
42
|
|
|
@@ -46,19 +46,19 @@ Tokens this component reads. Customize by overriding these CSS variables in your
|
|
|
46
46
|
import { Radiobox } from "@g4rcez/components/radiobox";
|
|
47
47
|
|
|
48
48
|
export default function PlanSelector() {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
49
|
+
return (
|
|
50
|
+
<div className="flex flex-col gap-sm">
|
|
51
|
+
<Radiobox name="plan" value="basic" defaultChecked>
|
|
52
|
+
Basic Plan
|
|
53
|
+
</Radiobox>
|
|
54
|
+
<Radiobox name="plan" value="pro">
|
|
55
|
+
Pro Plan
|
|
56
|
+
</Radiobox>
|
|
57
|
+
<Radiobox name="plan" value="enterprise">
|
|
58
|
+
Enterprise Plan
|
|
59
|
+
</Radiobox>
|
|
60
|
+
</div>
|
|
61
|
+
);
|
|
62
62
|
}
|
|
63
63
|
```
|
|
64
64
|
|
|
@@ -68,11 +68,11 @@ export default function PlanSelector() {
|
|
|
68
68
|
import { Radiobox } from "@g4rcez/components/radiobox";
|
|
69
69
|
|
|
70
70
|
export default function DisabledOption() {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
71
|
+
return (
|
|
72
|
+
<Radiobox disabled name="option" value="legacy">
|
|
73
|
+
Legacy (unavailable)
|
|
74
|
+
</Radiobox>
|
|
75
|
+
);
|
|
76
76
|
}
|
|
77
77
|
```
|
|
78
78
|
|
|
@@ -82,14 +82,22 @@ export default function DisabledOption() {
|
|
|
82
82
|
import { Radiobox } from "@g4rcez/components/radiobox";
|
|
83
83
|
|
|
84
84
|
export default function GenderSelector() {
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
85
|
+
return (
|
|
86
|
+
<div className="grid grid-cols-2 gap-base">
|
|
87
|
+
<Radiobox name="gender" value="male">
|
|
88
|
+
Male
|
|
89
|
+
</Radiobox>
|
|
90
|
+
<Radiobox name="gender" value="female">
|
|
91
|
+
Female
|
|
92
|
+
</Radiobox>
|
|
93
|
+
<Radiobox name="gender" value="non-binary">
|
|
94
|
+
Non-binary
|
|
95
|
+
</Radiobox>
|
|
96
|
+
<Radiobox name="gender" value="prefer-not">
|
|
97
|
+
Prefer not to say
|
|
98
|
+
</Radiobox>
|
|
99
|
+
</div>
|
|
100
|
+
);
|
|
93
101
|
}
|
|
94
102
|
```
|
|
95
103
|
|
|
@@ -116,10 +124,10 @@ export default function GenderSelector() {
|
|
|
116
124
|
|
|
117
125
|
## Data Attributes
|
|
118
126
|
|
|
119
|
-
| Attribute
|
|
120
|
-
|
|
121
|
-
| `data-component` | `label` | `"radiobox"`
|
|
122
|
-
| `data-disabled`
|
|
127
|
+
| Attribute | Element | Value | Description |
|
|
128
|
+
| ---------------- | ------- | ------------------- | ------------------------------- |
|
|
129
|
+
| `data-component` | `label` | `"radiobox"` | Identifies the component. |
|
|
130
|
+
| `data-disabled` | `label` | `true \| undefined` | Set when the radio is disabled. |
|
|
123
131
|
|
|
124
132
|
## Notes
|
|
125
133
|
|