@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
|
@@ -1,170 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: InputField
|
|
3
|
-
description: Low-level field wrapper that provides a label, tooltip, error message, feedback text, and left/right slots for any form control.
|
|
4
|
-
package: "@g4rcez/components"
|
|
5
|
-
export: "{ InputField }"
|
|
6
|
-
import: "import { InputField } from '@g4rcez/components'"
|
|
7
|
-
category: form
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
# InputField
|
|
11
|
-
|
|
12
|
-
Low-level field wrapper that provides a label, tooltip, error message, feedback text, and left/right slots for any form control. Most higher-level components (`Input`, `Select`, `Autocomplete`, `DatePicker`, `Textarea`) use `InputField` internally and forward its props automatically.
|
|
13
|
-
|
|
14
|
-
## Import
|
|
15
|
-
|
|
16
|
-
```tsx
|
|
17
|
-
import { InputField } from "@g4rcez/components";
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
## Props
|
|
21
|
-
|
|
22
|
-
| Prop | Type | Default | Description |
|
|
23
|
-
|------|------|---------|-------------|
|
|
24
|
-
| `title` | `Label` | - | Main label text for the field |
|
|
25
|
-
| `info` | `Label` | - | Informational text shown in a `Tooltip` icon next to the label |
|
|
26
|
-
| `error` | `string` | - | Error message rendered below the field border |
|
|
27
|
-
| `feedback` | `Label` | - | Success or neutral feedback message (hidden when `error` is present) |
|
|
28
|
-
| `left` | `Label` | - | Content rendered to the left inside the field border |
|
|
29
|
-
| `right` | `Label` | - | Content rendered to the right inside the field border |
|
|
30
|
-
| `rightLabel` | `Label` | - | Content rendered to the right of the label text |
|
|
31
|
-
| `required` | `boolean` | `false` | If `true`, hides the "Optional" badge |
|
|
32
|
-
| `optionalText` | `string` | `"Optional"` | Text shown for optional fields (translatable) |
|
|
33
|
-
| `disabled` | `boolean` | `false` | Applies disabled styling to the wrapper and label |
|
|
34
|
-
| `interactive` | `boolean` | `false` | Sets `data-interactive` on the fieldset |
|
|
35
|
-
| `container` | `string` | - | Extra CSS classes for the outer `<fieldset>` |
|
|
36
|
-
| `labelClassName` | `string` | - | Extra CSS classes for the inner label/border wrapper `<div>` |
|
|
37
|
-
| `hiddenLabel` | `boolean` | `false` | Visually hides the label row while keeping it accessible |
|
|
38
|
-
| `reportStatus` | `boolean` | - | Show `CheckCircle`/`XCircle` icons alongside the label based on validity |
|
|
39
|
-
| `componentName` | `string` | - | Sets `data-component` on the fieldset (e.g., `"input"`, `"select"`) |
|
|
40
|
-
| `id` | `string` | - | `id` linked to the inner control via `htmlFor` on the label |
|
|
41
|
-
| `name` | `string` | - | Fallback for `id` when `id` is not provided |
|
|
42
|
-
| `children` | `React.ReactNode` | - | The actual form control (input, select, etc.) |
|
|
43
|
-
|
|
44
|
-
## Design Tokens
|
|
45
|
-
|
|
46
|
-
Tokens this component reads. Customize by overriding these CSS variables in your theme.
|
|
47
|
-
|
|
48
|
-
| Token | CSS Variable | Purpose |
|
|
49
|
-
|-------|-------------|---------|
|
|
50
|
-
| `border-input-border` | `--input-border` | Default field border color |
|
|
51
|
-
| `text-field-label` | `--field-label` | Label text color |
|
|
52
|
-
| `text-primary` | `--primary` | Label and border color on focus/hover |
|
|
53
|
-
| `text-danger` | `--danger` | Label, border, and error text color in error state |
|
|
54
|
-
| `text-disabled` | `--disabled` | Label and border color when disabled |
|
|
55
|
-
| `mt-input-gap` | `--input-gap` | Gap between border and error/feedback text |
|
|
56
|
-
|
|
57
|
-
## Examples
|
|
58
|
-
|
|
59
|
-
### Wrapping a native input
|
|
60
|
-
|
|
61
|
-
```tsx
|
|
62
|
-
import { InputField } from "@g4rcez/components";
|
|
63
|
-
|
|
64
|
-
<InputField title="Username" name="username" required>
|
|
65
|
-
<input
|
|
66
|
-
id="username"
|
|
67
|
-
name="username"
|
|
68
|
-
className="h-input-height w-full flex-1 bg-transparent px-input-x text-foreground outline-none"
|
|
69
|
-
/>
|
|
70
|
-
</InputField>
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
### With info tooltip and error
|
|
74
|
-
|
|
75
|
-
```tsx
|
|
76
|
-
import { MagnifyingGlassIcon, CheckIcon } from "@phosphor-icons/react";
|
|
77
|
-
|
|
78
|
-
<InputField
|
|
79
|
-
title="API Key"
|
|
80
|
-
name="api_key"
|
|
81
|
-
info="Your secret API key from the developer portal."
|
|
82
|
-
error={apiKeyError}
|
|
83
|
-
left={<MagnifyingGlassIcon size={16} className="text-muted-foreground" />}
|
|
84
|
-
right={isValid ? <CheckIcon size={16} className="text-success" /> : null}
|
|
85
|
-
required
|
|
86
|
-
>
|
|
87
|
-
<input
|
|
88
|
-
id="api_key"
|
|
89
|
-
name="api_key"
|
|
90
|
-
type="password"
|
|
91
|
-
className="h-input-height w-full flex-1 bg-transparent px-input-x text-foreground outline-none"
|
|
92
|
-
/>
|
|
93
|
-
</InputField>
|
|
94
|
-
```
|
|
95
|
-
|
|
96
|
-
### Optional vs required
|
|
97
|
-
|
|
98
|
-
```tsx
|
|
99
|
-
{/* Required — "Optional" badge is hidden */}
|
|
100
|
-
<InputField title="Email" name="email" required>
|
|
101
|
-
<input id="email" name="email" type="email" className="h-input-height w-full flex-1 bg-transparent px-input-x text-foreground outline-none" />
|
|
102
|
-
</InputField>
|
|
103
|
-
|
|
104
|
-
{/* Optional — shows "Optional" badge */}
|
|
105
|
-
<InputField title="Website" name="website">
|
|
106
|
-
<input id="website" name="website" type="url" className="h-input-height w-full flex-1 bg-transparent px-input-x text-foreground outline-none" />
|
|
107
|
-
</InputField>
|
|
108
|
-
```
|
|
109
|
-
|
|
110
|
-
### Hidden label (accessible)
|
|
111
|
-
|
|
112
|
-
```tsx
|
|
113
|
-
<InputField title="Search" name="search" hiddenLabel>
|
|
114
|
-
<input
|
|
115
|
-
id="search"
|
|
116
|
-
name="search"
|
|
117
|
-
placeholder="Search..."
|
|
118
|
-
className="h-input-height w-full flex-1 bg-transparent px-input-x text-foreground outline-none"
|
|
119
|
-
/>
|
|
120
|
-
</InputField>
|
|
121
|
-
```
|
|
122
|
-
|
|
123
|
-
### Feedback after validation
|
|
124
|
-
|
|
125
|
-
```tsx
|
|
126
|
-
<InputField
|
|
127
|
-
title="Slug"
|
|
128
|
-
name="slug"
|
|
129
|
-
feedback={isAvailable ? "This slug is available." : undefined}
|
|
130
|
-
error={!isAvailable ? "Slug is already taken." : undefined}
|
|
131
|
-
required
|
|
132
|
-
>
|
|
133
|
-
<input id="slug" name="slug" className="h-input-height w-full flex-1 bg-transparent px-input-x text-foreground outline-none" />
|
|
134
|
-
</InputField>
|
|
135
|
-
```
|
|
136
|
-
|
|
137
|
-
## Do
|
|
138
|
-
|
|
139
|
-
- Use `InputField` when building new form controls to ensure consistent label, error, and feedback layout across the application.
|
|
140
|
-
- Always provide a `title` for every field so screen readers can identify the control.
|
|
141
|
-
- Use the `info` prop for fields that need supplemental explanation without cluttering the label.
|
|
142
|
-
- Match the `id` on the inner control to the `name` (or `id`) on `InputField` so the `<label htmlFor>` association works correctly.
|
|
143
|
-
|
|
144
|
-
## Don't
|
|
145
|
-
|
|
146
|
-
- Don't pass raw Tailwind color classes (`bg-blue-500`, `text-white`, `border-gray-300`) to `InputField` wrappers — use theme props or design tokens instead.
|
|
147
|
-
- Don't use arbitrary Tailwind values (`bg-[#abc]`, `bg-[--my-var]`) — override CSS variables in your `@theme` block instead.
|
|
148
|
-
- Don't use `InputField` for non-form content; it is specifically designed for labeled input controls.
|
|
149
|
-
- Don't skip the `title` prop — omitting it hides the label but may break screen reader associations.
|
|
150
|
-
|
|
151
|
-
## Accessibility
|
|
152
|
-
|
|
153
|
-
- Renders a `<fieldset>` element as the outer wrapper, with `aria-disabled` when disabled.
|
|
154
|
-
- The inner `<label>` uses `htmlFor` linked to `id` (or `name`) to associate with the control.
|
|
155
|
-
- Error messages render as a `<p>` below the field; they are shown after the user interacts with the input (`data-initialized="true"`) or when `error` is set explicitly.
|
|
156
|
-
- Feedback messages render as a separate `<p>` and are hidden when an error is present.
|
|
157
|
-
- The `info` tooltip uses `Tooltip` with `aria-label` / `aria-describedby` for screen reader support.
|
|
158
|
-
- `reportStatus` icons use `aria-hidden="true"` since they are supplemental visual indicators.
|
|
159
|
-
|
|
160
|
-
## Data Attributes
|
|
161
|
-
|
|
162
|
-
- `data-component` — reflects the `componentName` prop (e.g., `"input"`, `"select"`, `"autocomplete"`).
|
|
163
|
-
- `data-error` — `"true"` when an `error` string is present; drives CSS group variants.
|
|
164
|
-
- `data-interactive` — `"true"` when `interactive` is set; used for custom interactive state styling.
|
|
165
|
-
|
|
166
|
-
## Notes
|
|
167
|
-
|
|
168
|
-
- `InputField` uses Tailwind `group` classes to synchronize hover and focus states between the outer wrapper and inner elements. The `group-focus-within:border-primary` and `group-hover:border-primary` patterns rely on this.
|
|
169
|
-
- The optional text label ("Optional") is sourced from the translation system via `useTranslations`, making it localizable.
|
|
170
|
-
- `reportStatus` defaults to the value configured in `useTweaks().input.iconFeedback`, allowing a global default.
|
package/dist/ai/docs/List.md
DELETED
|
@@ -1,205 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: List
|
|
3
|
-
description: Animated list that expands each item into a focused floating detail overlay when clicked.
|
|
4
|
-
package: "@g4rcez/components"
|
|
5
|
-
export: "{ AnimatedList, AnimatedListItem }"
|
|
6
|
-
import: "import { AnimatedList, AnimatedListItem } from '@g4rcez/components/list'"
|
|
7
|
-
category: display
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
# List
|
|
11
|
-
|
|
12
|
-
Animated list that expands each item into a focused floating detail overlay when clicked.
|
|
13
|
-
|
|
14
|
-
`AnimatedList` and `AnimatedListItem` are exported from the `@g4rcez/components/list` subpath. Each row in the list is clickable; selecting a row opens a `motion/react`-animated card overlay with the item's full content.
|
|
15
|
-
|
|
16
|
-
## Import
|
|
17
|
-
|
|
18
|
-
```tsx
|
|
19
|
-
import { AnimatedList, AnimatedListItem } from "@g4rcez/components/list";
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
## Props
|
|
23
|
-
|
|
24
|
-
### AnimatedList
|
|
25
|
-
|
|
26
|
-
| Prop | Type | Default | Description |
|
|
27
|
-
|------|------|---------|-------------|
|
|
28
|
-
| `children` | `React.ReactNode` | — | One or more `AnimatedListItem` elements. |
|
|
29
|
-
|
|
30
|
-
### AnimatedListItem
|
|
31
|
-
|
|
32
|
-
| Prop | Type | Default | Description |
|
|
33
|
-
|------|------|---------|-------------|
|
|
34
|
-
| `title` | `Label` | — | Primary heading shown in the list row and in the overlay header. |
|
|
35
|
-
| `description` | `Label` | — | Secondary text rendered below the title in both the row and the overlay. |
|
|
36
|
-
| `children` | `Label` | — | Content rendered inside the expanded overlay below the header section. |
|
|
37
|
-
| `avatar` | `Label` | — | Optional leading node (image, icon, or element) displayed before the title in the row. |
|
|
38
|
-
| `leading` | `React.FC<{ open: () => void }>` | — | Optional render-prop component at the trailing end of the row. Receives an `open` callback to open the overlay programmatically. |
|
|
39
|
-
|
|
40
|
-
`Label` is `string | number | ReactNode`.
|
|
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
|
-
| `border-card-border` | `--card-border` | Row separator and overlay card border |
|
|
49
|
-
| `bg-card-background` | `--card-background` | Overlay card background color |
|
|
50
|
-
| `rounded-card` | `--radius-card` | Overlay card corner radius |
|
|
51
|
-
| `shadow-shadow-card` | `--shadow-card` | Overlay card drop shadow |
|
|
52
|
-
| `text-foreground` | `--foreground` | Default text color for row and overlay content |
|
|
53
|
-
| `text-secondary` | `--secondary` | Description text color |
|
|
54
|
-
| `text-primary` | `--primary` | Row title hover color and avatar focus ring |
|
|
55
|
-
| `text-danger` | `--danger` | Close button hover color in the overlay |
|
|
56
|
-
| `bg-floating-overlay` | `--floating-overlay` | Semi-transparent backdrop behind the overlay (used at 70 % opacity) |
|
|
57
|
-
| `z-floating` | `--z-floating` | `z-index` for the overlay card (value: 22) |
|
|
58
|
-
| `z-overlay` | `--z-overlay` | `z-index` for the backdrop scrim |
|
|
59
|
-
|
|
60
|
-
## Examples
|
|
61
|
-
|
|
62
|
-
### Basic usage
|
|
63
|
-
|
|
64
|
-
```tsx
|
|
65
|
-
import { AnimatedList, AnimatedListItem } from "@g4rcez/components/list";
|
|
66
|
-
|
|
67
|
-
const members = [
|
|
68
|
-
{ id: "1", name: "Alice Johnson", role: "Engineering" },
|
|
69
|
-
{ id: "2", name: "Bob Smith", role: "Design" },
|
|
70
|
-
];
|
|
71
|
-
|
|
72
|
-
export function TeamList() {
|
|
73
|
-
return (
|
|
74
|
-
<AnimatedList>
|
|
75
|
-
{members.map((m) => (
|
|
76
|
-
<AnimatedListItem
|
|
77
|
-
key={m.id}
|
|
78
|
-
title={m.name}
|
|
79
|
-
description={m.role}
|
|
80
|
-
>
|
|
81
|
-
<p className="text-foreground">Full profile for {m.name}.</p>
|
|
82
|
-
</AnimatedListItem>
|
|
83
|
-
))}
|
|
84
|
-
</AnimatedList>
|
|
85
|
-
);
|
|
86
|
-
}
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
### With avatar
|
|
90
|
-
|
|
91
|
-
```tsx
|
|
92
|
-
import { AnimatedList, AnimatedListItem } from "@g4rcez/components/list";
|
|
93
|
-
import { UserCircleIcon } from "@phosphor-icons/react";
|
|
94
|
-
|
|
95
|
-
export function UserDirectory() {
|
|
96
|
-
return (
|
|
97
|
-
<AnimatedList>
|
|
98
|
-
<AnimatedListItem
|
|
99
|
-
title="Carol White"
|
|
100
|
-
description="Product Manager"
|
|
101
|
-
avatar={<UserCircleIcon size={40} className="text-muted-foreground" />}
|
|
102
|
-
>
|
|
103
|
-
<div className="flex flex-col gap-2 text-foreground">
|
|
104
|
-
<span>Department: Product</span>
|
|
105
|
-
<span>Location: San Francisco</span>
|
|
106
|
-
</div>
|
|
107
|
-
</AnimatedListItem>
|
|
108
|
-
</AnimatedList>
|
|
109
|
-
);
|
|
110
|
-
}
|
|
111
|
-
```
|
|
112
|
-
|
|
113
|
-
### With trailing action using `leading`
|
|
114
|
-
|
|
115
|
-
```tsx
|
|
116
|
-
import { AnimatedList, AnimatedListItem } from "@g4rcez/components/list";
|
|
117
|
-
import { Button } from "@g4rcez/components/button";
|
|
118
|
-
|
|
119
|
-
export function OrderList({ orders }: { orders: Order[] }) {
|
|
120
|
-
return (
|
|
121
|
-
<AnimatedList>
|
|
122
|
-
{orders.map((order) => (
|
|
123
|
-
<AnimatedListItem
|
|
124
|
-
key={order.id}
|
|
125
|
-
title={`Order #${order.id}`}
|
|
126
|
-
description={`Total: ${order.total}`}
|
|
127
|
-
leading={({ open }) => (
|
|
128
|
-
<Button size="small" theme="ghost-muted" onClick={open}>
|
|
129
|
-
View details
|
|
130
|
-
</Button>
|
|
131
|
-
)}
|
|
132
|
-
>
|
|
133
|
-
<OrderDetailContent order={order} />
|
|
134
|
-
</AnimatedListItem>
|
|
135
|
-
))}
|
|
136
|
-
</AnimatedList>
|
|
137
|
-
);
|
|
138
|
-
}
|
|
139
|
-
```
|
|
140
|
-
|
|
141
|
-
### Notification / activity feed
|
|
142
|
-
|
|
143
|
-
```tsx
|
|
144
|
-
import { AnimatedList, AnimatedListItem } from "@g4rcez/components/list";
|
|
145
|
-
import { CheckCircleIcon, WarningIcon } from "@phosphor-icons/react";
|
|
146
|
-
|
|
147
|
-
const feed = [
|
|
148
|
-
{ id: "n1", icon: <CheckCircleIcon size={20} className="text-success" />, title: "Deployment succeeded", time: "2 min ago", detail: "All 3 services are healthy." },
|
|
149
|
-
{ id: "n2", icon: <WarningIcon size={20} className="text-warn" />, title: "High CPU usage", time: "10 min ago", detail: "Instance i-0ab2 is at 94 %." },
|
|
150
|
-
];
|
|
151
|
-
|
|
152
|
-
export function NotificationFeed() {
|
|
153
|
-
return (
|
|
154
|
-
<AnimatedList>
|
|
155
|
-
{feed.map((n) => (
|
|
156
|
-
<AnimatedListItem
|
|
157
|
-
key={n.id}
|
|
158
|
-
title={n.title}
|
|
159
|
-
description={n.time}
|
|
160
|
-
avatar={n.icon}
|
|
161
|
-
>
|
|
162
|
-
<p className="text-sm text-muted-foreground">{n.detail}</p>
|
|
163
|
-
</AnimatedListItem>
|
|
164
|
-
))}
|
|
165
|
-
</AnimatedList>
|
|
166
|
-
);
|
|
167
|
-
}
|
|
168
|
-
```
|
|
169
|
-
|
|
170
|
-
## Do
|
|
171
|
-
|
|
172
|
-
- Keep `title` and `description` short — they share a single row and are not truncated automatically.
|
|
173
|
-
- Provide meaningful `children` content in the overlay to justify clicking the row.
|
|
174
|
-
- Use `leading` to expose a primary call-to-action alongside the title without forcing the user to open the overlay.
|
|
175
|
-
- Use design-token classes inside the overlay content (`bg-card-background`, `text-foreground`, `border-card-border`).
|
|
176
|
-
|
|
177
|
-
## Don't
|
|
178
|
-
|
|
179
|
-
- Don't pass raw Tailwind color classes (`bg-blue-500`, `text-white`, `border-gray-300`) — use design tokens instead.
|
|
180
|
-
- Don't use arbitrary Tailwind values (`bg-[#abc]`, `bg-[--my-var]`) — override CSS variables in your `@theme` block instead.
|
|
181
|
-
- Don't use this component for purely informational lists where no detail overlay is needed — use a plain `<ul>` instead.
|
|
182
|
-
- Don't embed full applications or heavy forms inside the overlay `children`; use a `Modal` for complex workflows.
|
|
183
|
-
- Don't render `AnimatedListItem` outside of `AnimatedList` — the item component returns a `Fragment` and relies entirely on the parent list for rendering.
|
|
184
|
-
|
|
185
|
-
## Accessibility
|
|
186
|
-
|
|
187
|
-
- The list renders as `<ul role="list">`.
|
|
188
|
-
- Each row title/description area is a `<button>`, making it keyboard focusable and activatable with `Enter` or `Space`.
|
|
189
|
-
- The overlay uses `FloatingFocusManager` to trap focus and `FloatingOverlay` with `lockScroll` to block background interaction.
|
|
190
|
-
- Pressing `Escape`, clicking outside, or clicking the close button dismisses the overlay.
|
|
191
|
-
- The close button inside the overlay is a focusable `<button>` with an `XIcon`.
|
|
192
|
-
- `MotionConfig reducedMotion="user"` honours the system-level reduced-motion preference, disabling animations when requested.
|
|
193
|
-
|
|
194
|
-
## Data Attributes
|
|
195
|
-
|
|
196
|
-
- `layoutId="item-{id}"` — shared between the list row `<li>` and the overlay card `<motion.div>` to drive the shared-element expand/collapse animation.
|
|
197
|
-
- `layoutId="toast-{id}"` — inner content wrapper for coordinated layout transitions.
|
|
198
|
-
|
|
199
|
-
## Notes
|
|
200
|
-
|
|
201
|
-
- Only one item can be open at a time; selecting a new item dismisses the previous overlay automatically.
|
|
202
|
-
- `AnimatedListItem` is a shell — it returns a `Fragment` directly and holds no state. All rendering logic lives inside `AnimatedList`, which reads child props via `React.Children.toArray`.
|
|
203
|
-
- The overlay is rendered in a `FloatingPortal` (outside the DOM tree) to avoid stacking-context or overflow clipping issues.
|
|
204
|
-
- Animations use `motion/react` shared-layout (`layoutId`) so the item card expands smoothly from its row position to the center of the viewport.
|
|
205
|
-
- The animation transition is `tween` with a 0.3 s duration; `stiffness` is set low (25) for a relaxed feel.
|
package/dist/ai/docs/Menu.md
DELETED
|
@@ -1,166 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Menu
|
|
3
|
-
description: Accessible floating menu system with nested submenus, keyboard navigation, hover support, and typeahead.
|
|
4
|
-
package: "@g4rcez/components"
|
|
5
|
-
export: "{ Menu, MenuItem }"
|
|
6
|
-
import: "import { Menu, MenuItem } from '@g4rcez/components/menu'"
|
|
7
|
-
category: floating
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
# Menu
|
|
11
|
-
|
|
12
|
-
Accessible floating menu system with nested submenus, keyboard navigation, hover support, and typeahead.
|
|
13
|
-
|
|
14
|
-
## Import
|
|
15
|
-
|
|
16
|
-
```tsx
|
|
17
|
-
import { Menu, MenuItem } from "@g4rcez/components/menu";
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
## Props
|
|
21
|
-
|
|
22
|
-
### Menu
|
|
23
|
-
|
|
24
|
-
| Prop | Type | Default | Description |
|
|
25
|
-
|------|------|---------|-------------|
|
|
26
|
-
| `label` | `string \| React.ReactElement` | — | Trigger content |
|
|
27
|
-
| `title` | `string` | — | Required for accessibility when `label` is an element; also used for typeahead |
|
|
28
|
-
| `hover` | `boolean` | `true` | Open on hover in addition to click |
|
|
29
|
-
| `open` | `boolean` | `false` | Initial open state |
|
|
30
|
-
| `asChild` | `boolean` | `false` | Use the `Slot` pattern — merge props onto the child element instead of wrapping in a `<button>` |
|
|
31
|
-
| `restoreFocus` | `boolean` | `false` | Restore focus to the trigger after the menu closes |
|
|
32
|
-
| `floatingClassName` | `string` | — | Additional CSS classes for the floating list container |
|
|
33
|
-
| `FloatingComponent` | `React.ElementType` | `"div"` | Element type for the floating container |
|
|
34
|
-
|
|
35
|
-
### MenuItem
|
|
36
|
-
|
|
37
|
-
| Prop | Type | Default | Description |
|
|
38
|
-
|------|------|---------|-------------|
|
|
39
|
-
| `title` | `string` | — | Item text; used for typeahead matching and the `title` attribute |
|
|
40
|
-
| `children` | `React.ReactNode` | — | Visual content of the item |
|
|
41
|
-
| `disabled` | `boolean` | `false` | Removes item from keyboard navigation and typeahead |
|
|
42
|
-
| `Right` | `React.FC<IconProps>` | — | Icon rendered on the right side |
|
|
43
|
-
| `onClick` | `function` | — | Click handler |
|
|
44
|
-
|
|
45
|
-
## Design Tokens
|
|
46
|
-
|
|
47
|
-
Tokens this component reads. Customize by overriding these CSS variables in your theme.
|
|
48
|
-
|
|
49
|
-
| Token | CSS Variable | Purpose |
|
|
50
|
-
|-------|-------------|---------|
|
|
51
|
-
| `bg-floating-background` | `--floating-background` | Menu list surface background |
|
|
52
|
-
| `border-floating-border` | `--floating-border` | Menu list border |
|
|
53
|
-
| `shadow-shadow-floating` | `--shadow-floating` | Menu list drop shadow |
|
|
54
|
-
| `z-tooltip` | `--z-tooltip` | Z-index of the floating list |
|
|
55
|
-
| `bg-primary` | `--primary` | Active/focused item background |
|
|
56
|
-
| `text-primary-foreground` | `--primary-foreground` | Active/focused item text |
|
|
57
|
-
|
|
58
|
-
## Examples
|
|
59
|
-
|
|
60
|
-
### Basic Menu
|
|
61
|
-
|
|
62
|
-
```tsx
|
|
63
|
-
import { Menu, MenuItem } from "@g4rcez/components/menu";
|
|
64
|
-
|
|
65
|
-
<Menu label="Actions">
|
|
66
|
-
<MenuItem title="Edit">Edit Profile</MenuItem>
|
|
67
|
-
<MenuItem title="Share">Share Profile</MenuItem>
|
|
68
|
-
</Menu>
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
### With Icons and Shortcuts
|
|
72
|
-
|
|
73
|
-
```tsx
|
|
74
|
-
import { PencilSimpleIcon, TrashIcon } from "@phosphor-icons/react";
|
|
75
|
-
import { Menu, MenuItem } from "@g4rcez/components/menu";
|
|
76
|
-
|
|
77
|
-
<Menu label="Settings">
|
|
78
|
-
<MenuItem title="Edit" Right={PencilSimpleIcon}>Edit</MenuItem>
|
|
79
|
-
<MenuItem title="Delete" Right={TrashIcon} className="text-danger">
|
|
80
|
-
Delete
|
|
81
|
-
</MenuItem>
|
|
82
|
-
</Menu>
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
### Nested Submenus
|
|
86
|
-
|
|
87
|
-
```tsx
|
|
88
|
-
import { Menu, MenuItem } from "@g4rcez/components/menu";
|
|
89
|
-
|
|
90
|
-
<Menu label="Actions">
|
|
91
|
-
<MenuItem title="Edit">Edit Profile</MenuItem>
|
|
92
|
-
<MenuItem title="Share">Share Profile</MenuItem>
|
|
93
|
-
<Menu label="More Options" title="More Options">
|
|
94
|
-
<MenuItem title="Archive">Archive Account</MenuItem>
|
|
95
|
-
<MenuItem title="Delete" className="text-danger">
|
|
96
|
-
Delete Account
|
|
97
|
-
</MenuItem>
|
|
98
|
-
</Menu>
|
|
99
|
-
</Menu>
|
|
100
|
-
```
|
|
101
|
-
|
|
102
|
-
### Using asChild for Custom Triggers
|
|
103
|
-
|
|
104
|
-
```tsx
|
|
105
|
-
import { Menu, MenuItem } from "@g4rcez/components/menu";
|
|
106
|
-
import { Button } from "@g4rcez/components/button";
|
|
107
|
-
|
|
108
|
-
<Menu
|
|
109
|
-
label={<Button theme="primary">Main Action</Button>}
|
|
110
|
-
asChild
|
|
111
|
-
title="Main Action"
|
|
112
|
-
>
|
|
113
|
-
<MenuItem title="Save">Save Version</MenuItem>
|
|
114
|
-
<MenuItem title="Publish">Publish Now</MenuItem>
|
|
115
|
-
</Menu>
|
|
116
|
-
```
|
|
117
|
-
|
|
118
|
-
### Disabled Items
|
|
119
|
-
|
|
120
|
-
```tsx
|
|
121
|
-
import { Menu, MenuItem } from "@g4rcez/components/menu";
|
|
122
|
-
|
|
123
|
-
<Menu label="Options">
|
|
124
|
-
<MenuItem title="Export">Export Data</MenuItem>
|
|
125
|
-
<MenuItem title="Import" disabled>Import (unavailable)</MenuItem>
|
|
126
|
-
<MenuItem title="Delete" className="text-danger">Delete</MenuItem>
|
|
127
|
-
</Menu>
|
|
128
|
-
```
|
|
129
|
-
|
|
130
|
-
## Do
|
|
131
|
-
|
|
132
|
-
- Provide a `title` string whenever `label` is a React element — it enables typeahead and improves accessibility.
|
|
133
|
-
- Use nested `Menu` components (not just `MenuItem`) for logical groupings of secondary actions.
|
|
134
|
-
- Use `disabled` for actions temporarily unavailable, so users know the option exists.
|
|
135
|
-
- Use design-token classes (`text-danger`, `text-foreground`) for item text colors.
|
|
136
|
-
|
|
137
|
-
## Don't
|
|
138
|
-
|
|
139
|
-
- Don't make menus deeper than 2–3 levels — deeply nested submenus are hard to navigate.
|
|
140
|
-
- Don't use raw Tailwind color classes (`text-red-600`, `hover:bg-gray-100`) on items — use design-token classes.
|
|
141
|
-
- Don't use arbitrary Tailwind values (`bg-[#abc]`) — override CSS variables in your `@theme` block.
|
|
142
|
-
- Don't use `Menu` for primary navigation that should be crawlable — use standard `<a>` links instead.
|
|
143
|
-
|
|
144
|
-
## Accessibility
|
|
145
|
-
|
|
146
|
-
- Full keyboard navigation: arrow keys navigate items, `Enter`/`Space` select, `Escape` closes.
|
|
147
|
-
- Typeahead: typing the first characters of an item's `title` focuses it instantly (resets after inactivity).
|
|
148
|
-
- Correct ARIA roles: `menu` on the container, `menuitem` on each item, `aria-expanded` on nested triggers.
|
|
149
|
-
- `data-active` marks the currently focused item for CSS styling.
|
|
150
|
-
- `FloatingFocusManager` handles focus trapping and restoration.
|
|
151
|
-
|
|
152
|
-
## Data Attributes
|
|
153
|
-
|
|
154
|
-
| Attribute | Applied to | Description |
|
|
155
|
-
|-----------|-----------|-------------|
|
|
156
|
-
| `data-open` | Menu trigger, MenuItem | Present when the menu/item is open |
|
|
157
|
-
| `data-nested` | Nested menu trigger | Present on triggers that open a submenu |
|
|
158
|
-
| `data-focus-inside` | Menu trigger | Present when focus is inside an open submenu |
|
|
159
|
-
| `data-active` | MenuItem | Present on the currently focused item |
|
|
160
|
-
|
|
161
|
-
## Notes
|
|
162
|
-
|
|
163
|
-
- The root `Menu` wraps itself in a `FloatingTree`; nested `Menu` components detect this via `useFloatingParentNodeId` and behave as submenus.
|
|
164
|
-
- Hover delay is controlled by the `FLOATING_DELAY` constant. The safe-polygon handler keeps the menu open while the pointer moves toward the submenu.
|
|
165
|
-
- When `hover` is `false`, the menu opens only on click.
|
|
166
|
-
- The floating container default `max-h-80` prevents the list from growing taller than the viewport.
|