@g4rcez/components 4.0.1 → 4.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ai/SKILL.md +233 -0
- package/ai/docs/Alert.md +166 -0
- package/ai/docs/AnimatedList.md +206 -0
- package/ai/docs/Autocomplete.md +221 -0
- package/ai/docs/Button.md +182 -0
- package/ai/docs/Calendar.md +185 -0
- package/ai/docs/Card.md +178 -0
- package/ai/docs/Checkbox.md +194 -0
- package/ai/docs/CommandPalette.md +275 -0
- package/ai/docs/DatePicker.md +152 -0
- package/ai/docs/Dropdown.md +195 -0
- package/{dist/ai → ai}/docs/Empty.md +41 -44
- package/{dist/ai → ai}/docs/Expand.md +40 -54
- package/ai/docs/FileUpload.md +218 -0
- package/{dist/ai → ai}/docs/Form.md +35 -29
- package/{dist/ai → ai}/docs/FormReset.md +37 -37
- package/{dist/ai → ai}/docs/Heading.md +4 -6
- package/ai/docs/Input.md +212 -0
- package/ai/docs/InputField.md +170 -0
- package/ai/docs/List.md +208 -0
- package/ai/docs/Menu.md +168 -0
- package/ai/docs/Modal.md +273 -0
- package/ai/docs/MultiSelect.md +177 -0
- package/ai/docs/Notifications.md +231 -0
- package/ai/docs/PageCalendar.md +262 -0
- package/{dist/ai → ai}/docs/Polymorph.md +25 -41
- package/{dist/ai → ai}/docs/Progress.md +55 -51
- package/{dist/ai → ai}/docs/Radiobox.md +49 -41
- package/{dist/ai → ai}/docs/RenderOnView.md +26 -32
- package/{dist/ai → ai}/docs/Resizable.md +60 -65
- package/ai/docs/Select.md +284 -0
- package/{dist/ai → ai}/docs/Shortcut.md +14 -14
- package/{dist/ai → ai}/docs/Skeleton.md +56 -60
- package/{dist/ai → ai}/docs/Slider.md +26 -49
- package/{dist/ai → ai}/docs/Slot.md +15 -17
- package/{dist/ai → ai}/docs/Spinner.md +17 -15
- package/{dist/ai → ai}/docs/Stats.md +44 -42
- package/ai/docs/Step.md +159 -0
- package/{dist/ai → ai}/docs/Switch.md +44 -54
- package/ai/docs/Table.md +286 -0
- package/ai/docs/Tabs.md +191 -0
- package/ai/docs/Tag.md +222 -0
- package/{dist/ai → ai}/docs/TaskList.md +40 -50
- package/ai/docs/Textarea.md +144 -0
- package/ai/docs/Timeline.md +212 -0
- package/{dist/ai → ai}/docs/Toolbar.md +46 -46
- package/ai/docs/Tooltip.md +231 -0
- package/ai/docs/Typography.md +187 -0
- package/ai/docs/Wizard.md +208 -0
- package/ai/docs/index.md +183 -0
- package/dist/autocomplete-DcTNOwyg.js +393 -0
- package/dist/autocomplete-DcTNOwyg.js.map +1 -0
- package/dist/{calendar-B5lSd0ID.js → calendar-BJMHRoy2.js} +104 -105
- package/dist/calendar-BJMHRoy2.js.map +1 -0
- package/dist/components/core/button.js +10 -10
- package/dist/components/core/button.js.map +1 -1
- package/dist/components/core/tag.js +4 -4
- package/dist/components/core/tag.js.map +1 -1
- package/dist/components/display/alert.js +48 -46
- package/dist/components/display/alert.js.map +1 -1
- package/dist/components/display/calendar.js +6 -6
- package/dist/components/display/card.js +2 -2
- package/dist/components/display/card.js.map +1 -1
- package/dist/components/display/list.js +1 -1
- package/dist/components/display/list.js.map +1 -1
- package/dist/components/display/notifications.js +3 -3
- package/dist/components/display/stats.js +1 -1
- package/dist/components/display/tabs.js +2 -2
- package/dist/components/display/timeline.js +1 -1
- package/dist/components/floating/dropdown.js +25 -17
- package/dist/components/floating/dropdown.js.map +1 -1
- package/dist/components/floating/expand.js +7 -7
- package/dist/components/floating/expand.js.map +1 -1
- package/dist/components/floating/menu.js +10 -10
- package/dist/components/floating/menu.js.map +1 -1
- package/dist/components/floating/modal.js +106 -102
- package/dist/components/floating/modal.js.map +1 -1
- package/dist/components/floating/tooltip.js +14 -14
- package/dist/components/floating/tooltip.js.map +1 -1
- package/dist/components/form/autocomplete.js +6 -6
- package/dist/components/form/checkbox.js +1 -1
- package/dist/components/form/date-picker.js +5 -5
- package/dist/components/form/file-upload.js +2 -2
- package/dist/components/form/form.js.map +1 -1
- package/dist/components/form/input.js +1 -1
- package/dist/components/form/radiobox.js +1 -1
- package/dist/components/form/select.js +3 -3
- package/dist/components/form/switch.js +2 -2
- package/dist/components/form/switch.js.map +1 -1
- package/dist/components/table/table.js +3 -3
- package/dist/{date-picker-DwNo22lx.js → date-picker-Bnl07nd8.js} +8 -6
- package/dist/date-picker-Bnl07nd8.js.map +1 -0
- package/dist/{dom-Dl8XH0CK.js → dom-CyQHY7ID.js} +66 -61
- package/dist/dom-CyQHY7ID.js.map +1 -0
- package/dist/{file-upload-Brf2NkLr.js → file-upload-93d5DR4q.js} +139 -129
- package/dist/file-upload-93d5DR4q.js.map +1 -0
- package/dist/{floating-ui.react-QNHG9W4N.js → floating-ui.react-M2PGXLDp.js} +8 -8
- package/dist/floating-ui.react-M2PGXLDp.js.map +1 -0
- package/dist/{fns-D2eyJKd5.js → fns-C7Dt27Qd.js} +2 -2
- package/dist/fns-C7Dt27Qd.js.map +1 -0
- package/dist/index-BJ1ayTam.js +126 -0
- package/dist/index-BJ1ayTam.js.map +1 -0
- package/dist/index-C-PuFUZi.js.map +1 -1
- package/dist/{index-BelDtX5M.js → index-DDeQW0JW.js} +399 -404
- package/dist/index-DDeQW0JW.js.map +1 -0
- package/dist/index-DE4shK8D.js +215 -0
- package/dist/index-DE4shK8D.js.map +1 -0
- package/dist/{index-DJSMaZR4.js → index-DlJ_2RBL.js} +2 -2
- package/dist/index-DlJ_2RBL.js.map +1 -0
- package/dist/index.css +1 -1
- package/dist/index.esm-BaIwleSE.js.map +1 -1
- package/dist/index.js +2826 -2765
- package/dist/index.js.map +1 -1
- package/dist/{input-CrGrSnUt.js → input-_MVxmIpu.js} +116 -114
- package/dist/input-_MVxmIpu.js.map +1 -0
- package/dist/{input-field-5vYcz5tT.js → input-field-CDCOODOl.js} +63 -47
- package/dist/input-field-CDCOODOl.js.map +1 -0
- package/dist/notifications-Dp0ydKJS.js +2576 -0
- package/dist/notifications-Dp0ydKJS.js.map +1 -0
- package/dist/polymorph-B5n9fs_K.js.map +1 -1
- package/dist/preset/plugin.tailwind.d.ts.map +1 -1
- package/dist/preset/plugin.tailwind.js +20 -18
- package/dist/preset/preset.tailwind.js +24 -25
- package/dist/preset/src/styles/common.js +6 -3
- package/dist/preset/src/styles/dark.d.ts.map +1 -1
- package/dist/preset/src/styles/dark.js +9 -5
- package/dist/preset/src/styles/design-tokens.js +68 -89
- package/dist/preset/src/styles/light.d.ts.map +1 -1
- package/dist/preset/src/styles/light.js +9 -5
- package/dist/preset/src/styles/theme.js +7 -4
- package/dist/preset/src/styles/theme.types.d.ts +2 -1
- package/dist/preset/src/styles/theme.types.d.ts.map +1 -1
- package/dist/preset/src/styles/theme.types.js +2 -1
- package/dist/skeleton-BjJobYYf.js +24 -0
- package/dist/skeleton-BjJobYYf.js.map +1 -0
- package/dist/slot-CRyweuj0.js.map +1 -1
- package/dist/styles/common.js +6 -3
- package/dist/styles/dark.d.ts.map +1 -1
- package/dist/styles/dark.js +9 -5
- package/dist/styles/design-tokens.js +68 -89
- package/dist/styles/light.d.ts.map +1 -1
- package/dist/styles/light.js +9 -5
- package/dist/styles/theme.js +7 -4
- package/dist/styles/theme.types.d.ts +2 -1
- package/dist/styles/theme.types.d.ts.map +1 -1
- package/dist/styles/theme.types.js +2 -1
- package/dist/tabs-B0g7YtQv.js +123 -0
- package/dist/tabs-B0g7YtQv.js.map +1 -0
- package/dist/tsconfig.lib.tsbuildinfo +1 -0
- package/dist/{context-BFXNJVn2.js → use-translations-DSltA7H_.js} +38 -30
- package/dist/use-translations-DSltA7H_.js.map +1 -0
- package/package.json +101 -88
- package/dist/ai/SKILL.md +0 -266
- package/dist/ai/docs/Alert.md +0 -167
- package/dist/ai/docs/AnimatedList.md +0 -205
- package/dist/ai/docs/Autocomplete.md +0 -225
- package/dist/ai/docs/Button.md +0 -182
- package/dist/ai/docs/Calendar.md +0 -219
- package/dist/ai/docs/Card.md +0 -174
- package/dist/ai/docs/Checkbox.md +0 -199
- package/dist/ai/docs/CommandPalette.md +0 -293
- package/dist/ai/docs/DatePicker.md +0 -171
- package/dist/ai/docs/Dropdown.md +0 -223
- package/dist/ai/docs/FileUpload.md +0 -225
- package/dist/ai/docs/Input.md +0 -237
- package/dist/ai/docs/InputField.md +0 -170
- package/dist/ai/docs/List.md +0 -205
- package/dist/ai/docs/Menu.md +0 -166
- package/dist/ai/docs/Modal.md +0 -280
- package/dist/ai/docs/MultiSelect.md +0 -196
- package/dist/ai/docs/Notifications.md +0 -231
- package/dist/ai/docs/PageCalendar.md +0 -271
- package/dist/ai/docs/Select.md +0 -284
- package/dist/ai/docs/Step.md +0 -159
- package/dist/ai/docs/Table.md +0 -298
- package/dist/ai/docs/Tabs.md +0 -191
- package/dist/ai/docs/Tag.md +0 -224
- package/dist/ai/docs/Textarea.md +0 -167
- package/dist/ai/docs/Timeline.md +0 -210
- package/dist/ai/docs/Tooltip.md +0 -231
- package/dist/ai/docs/TransferList.md +0 -142
- package/dist/ai/docs/Typography.md +0 -187
- package/dist/ai/docs/Wizard.md +0 -213
- package/dist/ai/docs/index.md +0 -183
- package/dist/autocomplete-Cn9Z2hLq.js +0 -375
- package/dist/autocomplete-Cn9Z2hLq.js.map +0 -1
- package/dist/calendar-B5lSd0ID.js.map +0 -1
- package/dist/components/core/button.d.ts +0 -77
- package/dist/components/core/button.d.ts.map +0 -1
- package/dist/components/core/heading.d.ts +0 -3
- package/dist/components/core/heading.d.ts.map +0 -1
- package/dist/components/core/polymorph.d.ts +0 -10
- package/dist/components/core/polymorph.d.ts.map +0 -1
- package/dist/components/core/render-on-view.d.ts +0 -7
- package/dist/components/core/render-on-view.d.ts.map +0 -1
- package/dist/components/core/resizable.d.ts +0 -3
- package/dist/components/core/resizable.d.ts.map +0 -1
- package/dist/components/core/slot.d.ts +0 -16
- package/dist/components/core/slot.d.ts.map +0 -1
- package/dist/components/core/tag.d.ts +0 -35
- package/dist/components/core/tag.d.ts.map +0 -1
- package/dist/components/core/typography.d.ts +0 -24
- package/dist/components/core/typography.d.ts.map +0 -1
- package/dist/components/display/alert.d.ts +0 -28
- package/dist/components/display/alert.d.ts.map +0 -1
- package/dist/components/display/calendar.d.ts +0 -42
- package/dist/components/display/calendar.d.ts.map +0 -1
- package/dist/components/display/card.d.ts +0 -29
- package/dist/components/display/card.d.ts.map +0 -1
- package/dist/components/display/empty.d.ts +0 -8
- package/dist/components/display/empty.d.ts.map +0 -1
- package/dist/components/display/list.d.ts +0 -16
- package/dist/components/display/list.d.ts.map +0 -1
- package/dist/components/display/notifications.d.ts +0 -27
- package/dist/components/display/notifications.d.ts.map +0 -1
- package/dist/components/display/progress.d.ts +0 -13
- package/dist/components/display/progress.d.ts.map +0 -1
- package/dist/components/display/shortcut.d.ts +0 -4
- package/dist/components/display/shortcut.d.ts.map +0 -1
- package/dist/components/display/skeleton.d.ts +0 -12
- package/dist/components/display/skeleton.d.ts.map +0 -1
- package/dist/components/display/spinner.d.ts +0 -5
- package/dist/components/display/spinner.d.ts.map +0 -1
- package/dist/components/display/stats.d.ts +0 -12
- package/dist/components/display/stats.d.ts.map +0 -1
- package/dist/components/display/step.d.ts +0 -24
- package/dist/components/display/step.d.ts.map +0 -1
- package/dist/components/display/tabs.d.ts +0 -24
- package/dist/components/display/tabs.d.ts.map +0 -1
- package/dist/components/display/timeline.d.ts +0 -10
- package/dist/components/display/timeline.d.ts.map +0 -1
- package/dist/components/floating/command-palette.d.ts +0 -49
- package/dist/components/floating/command-palette.d.ts.map +0 -1
- package/dist/components/floating/dropdown.d.ts +0 -15
- package/dist/components/floating/dropdown.d.ts.map +0 -1
- package/dist/components/floating/expand.d.ts +0 -11
- package/dist/components/floating/expand.d.ts.map +0 -1
- package/dist/components/floating/menu.d.ts +0 -52
- package/dist/components/floating/menu.d.ts.map +0 -1
- package/dist/components/floating/modal.d.ts +0 -60
- package/dist/components/floating/modal.d.ts.map +0 -1
- package/dist/components/floating/toolbar.d.ts +0 -6
- package/dist/components/floating/toolbar.d.ts.map +0 -1
- package/dist/components/floating/tooltip.d.ts +0 -17
- package/dist/components/floating/tooltip.d.ts.map +0 -1
- package/dist/components/floating/wizard.d.ts +0 -26
- package/dist/components/floating/wizard.d.ts.map +0 -1
- package/dist/components/form/autocomplete.d.ts +0 -16
- package/dist/components/form/autocomplete.d.ts.map +0 -1
- package/dist/components/form/checkbox.d.ts +0 -12
- package/dist/components/form/checkbox.d.ts.map +0 -1
- package/dist/components/form/date-picker.d.ts +0 -10
- package/dist/components/form/date-picker.d.ts.map +0 -1
- package/dist/components/form/file-upload.d.ts +0 -15
- package/dist/components/form/file-upload.d.ts.map +0 -1
- package/dist/components/form/form.d.ts +0 -3
- package/dist/components/form/form.d.ts.map +0 -1
- package/dist/components/form/formReset.d.ts +0 -2
- package/dist/components/form/formReset.d.ts.map +0 -1
- package/dist/components/form/free-text.d.ts +0 -11
- package/dist/components/form/free-text.d.ts.map +0 -1
- package/dist/components/form/input-field.d.ts +0 -34
- package/dist/components/form/input-field.d.ts.map +0 -1
- package/dist/components/form/input.d.ts +0 -52
- package/dist/components/form/input.d.ts.map +0 -1
- package/dist/components/form/multi-select.d.ts +0 -19
- package/dist/components/form/multi-select.d.ts.map +0 -1
- package/dist/components/form/radiobox.d.ts +0 -7
- package/dist/components/form/radiobox.d.ts.map +0 -1
- package/dist/components/form/select.d.ts +0 -13
- package/dist/components/form/select.d.ts.map +0 -1
- package/dist/components/form/slider.d.ts +0 -7
- package/dist/components/form/slider.d.ts.map +0 -1
- package/dist/components/form/switch.d.ts +0 -9
- package/dist/components/form/switch.d.ts.map +0 -1
- package/dist/components/form/task-list.d.ts +0 -3
- package/dist/components/form/task-list.d.ts.map +0 -1
- package/dist/components/form/textarea.d.ts +0 -6
- package/dist/components/form/textarea.d.ts.map +0 -1
- package/dist/components/form/transfer-list.d.ts +0 -14
- package/dist/components/form/transfer-list.d.ts.map +0 -1
- package/dist/components/form/transfer-list.js +0 -55
- package/dist/components/form/transfer-list.js.map +0 -1
- package/dist/components/index.d.ts +0 -46
- package/dist/components/index.d.ts.map +0 -1
- package/dist/components/page-calendar/calendar-header.d.ts +0 -16
- package/dist/components/page-calendar/calendar-header.d.ts.map +0 -1
- package/dist/components/page-calendar/day-view.d.ts +0 -12
- package/dist/components/page-calendar/day-view.d.ts.map +0 -1
- package/dist/components/page-calendar/event-pill.d.ts +0 -9
- package/dist/components/page-calendar/event-pill.d.ts.map +0 -1
- package/dist/components/page-calendar/index.d.ts +0 -4
- package/dist/components/page-calendar/index.d.ts.map +0 -1
- package/dist/components/page-calendar/month-view.d.ts +0 -11
- package/dist/components/page-calendar/month-view.d.ts.map +0 -1
- package/dist/components/page-calendar/page-calendar.d.ts +0 -18
- package/dist/components/page-calendar/page-calendar.d.ts.map +0 -1
- package/dist/components/page-calendar/page-calendar.types.d.ts +0 -18
- package/dist/components/page-calendar/page-calendar.types.d.ts.map +0 -1
- package/dist/components/page-calendar/page-calendar.utils.d.ts +0 -24
- package/dist/components/page-calendar/page-calendar.utils.d.ts.map +0 -1
- package/dist/components/page-calendar/week-view.d.ts +0 -11
- package/dist/components/page-calendar/week-view.d.ts.map +0 -1
- package/dist/components/table/filter.d.ts +0 -42
- package/dist/components/table/filter.d.ts.map +0 -1
- package/dist/components/table/group.d.ts +0 -17
- package/dist/components/table/group.d.ts.map +0 -1
- package/dist/components/table/index.d.ts +0 -20
- package/dist/components/table/index.d.ts.map +0 -1
- package/dist/components/table/inner-table.d.ts +0 -29
- package/dist/components/table/inner-table.d.ts.map +0 -1
- package/dist/components/table/metadata.d.ts +0 -4
- package/dist/components/table/metadata.d.ts.map +0 -1
- package/dist/components/table/pagination.d.ts +0 -3
- package/dist/components/table/pagination.d.ts.map +0 -1
- package/dist/components/table/row.d.ts +0 -12
- package/dist/components/table/row.d.ts.map +0 -1
- package/dist/components/table/sort.d.ts +0 -28
- package/dist/components/table/sort.d.ts.map +0 -1
- package/dist/components/table/table-lib.d.ts +0 -135
- package/dist/components/table/table-lib.d.ts.map +0 -1
- package/dist/components/table/table.context.d.ts +0 -10
- package/dist/components/table/table.context.d.ts.map +0 -1
- package/dist/components/table/thead.d.ts +0 -9
- package/dist/components/table/thead.d.ts.map +0 -1
- package/dist/config/context.d.ts +0 -21
- package/dist/config/context.d.ts.map +0 -1
- package/dist/config/default-translations.d.ts +0 -90
- package/dist/config/default-translations.d.ts.map +0 -1
- package/dist/config/default-tweaks.d.ts +0 -13
- package/dist/config/default-tweaks.d.ts.map +0 -1
- package/dist/constants.d.ts +0 -3
- package/dist/constants.d.ts.map +0 -1
- package/dist/context-BFXNJVn2.js.map +0 -1
- package/dist/date-picker-DwNo22lx.js.map +0 -1
- package/dist/dom-Dl8XH0CK.js.map +0 -1
- package/dist/file-upload-Brf2NkLr.js.map +0 -1
- package/dist/floating-ui.react-QNHG9W4N.js.map +0 -1
- package/dist/fns-D2eyJKd5.js.map +0 -1
- package/dist/hooks/use-click-outside.d.ts +0 -3
- package/dist/hooks/use-click-outside.d.ts.map +0 -1
- package/dist/hooks/use-color-parser.d.ts +0 -2
- package/dist/hooks/use-color-parser.d.ts.map +0 -1
- package/dist/hooks/use-components-provider.d.ts +0 -15
- package/dist/hooks/use-components-provider.d.ts.map +0 -1
- package/dist/hooks/use-debounce.d.ts +0 -5
- package/dist/hooks/use-debounce.d.ts.map +0 -1
- package/dist/hooks/use-floating-ref.d.ts +0 -2
- package/dist/hooks/use-floating-ref.d.ts.map +0 -1
- package/dist/hooks/use-form.d.ts +0 -394
- package/dist/hooks/use-form.d.ts.map +0 -1
- package/dist/hooks/use-hover.d.ts +0 -3
- package/dist/hooks/use-hover.d.ts.map +0 -1
- package/dist/hooks/use-input-id.d.ts +0 -4
- package/dist/hooks/use-input-id.d.ts.map +0 -1
- package/dist/hooks/use-is-coarse-device.d.ts +0 -2
- package/dist/hooks/use-is-coarse-device.d.ts.map +0 -1
- package/dist/hooks/use-locale.d.ts +0 -3
- package/dist/hooks/use-locale.d.ts.map +0 -1
- package/dist/hooks/use-media-query.d.ts +0 -2
- package/dist/hooks/use-media-query.d.ts.map +0 -1
- package/dist/hooks/use-on-event.d.ts +0 -4
- package/dist/hooks/use-on-event.d.ts.map +0 -1
- package/dist/hooks/use-parent.d.ts +0 -3
- package/dist/hooks/use-parent.d.ts.map +0 -1
- package/dist/hooks/use-preferences.d.ts +0 -2
- package/dist/hooks/use-preferences.d.ts.map +0 -1
- package/dist/hooks/use-previous.d.ts +0 -2
- package/dist/hooks/use-previous.d.ts.map +0 -1
- package/dist/hooks/use-reactive.d.ts +0 -2
- package/dist/hooks/use-reactive.d.ts.map +0 -1
- package/dist/hooks/use-remove-scroll.d.ts +0 -4
- package/dist/hooks/use-remove-scroll.d.ts.map +0 -1
- package/dist/hooks/use-resize-observer.d.ts +0 -2
- package/dist/hooks/use-resize-observer.d.ts.map +0 -1
- package/dist/hooks/use-stable-ref.d.ts +0 -2
- package/dist/hooks/use-stable-ref.d.ts.map +0 -1
- package/dist/hooks/use-swipe.d.ts +0 -8
- package/dist/hooks/use-swipe.d.ts.map +0 -1
- package/dist/hooks/use-translations.d.ts +0 -88
- package/dist/hooks/use-translations.d.ts.map +0 -1
- package/dist/hooks/use-tweaks.d.ts +0 -3
- package/dist/hooks/use-tweaks.d.ts.map +0 -1
- package/dist/hooks/use-window-size.d.ts +0 -5
- package/dist/hooks/use-window-size.d.ts.map +0 -1
- package/dist/index-BelDtX5M.js.map +0 -1
- package/dist/index-DJSMaZR4.js.map +0 -1
- package/dist/index-Z-fZHxfJ.js +0 -335
- package/dist/index-Z-fZHxfJ.js.map +0 -1
- package/dist/index.d.ts +0 -22
- package/dist/index.d.ts.map +0 -1
- package/dist/input-CrGrSnUt.js.map +0 -1
- package/dist/input-field-5vYcz5tT.js.map +0 -1
- package/dist/lib/combi-keys.d.ts +0 -15
- package/dist/lib/combi-keys.d.ts.map +0 -1
- package/dist/lib/dict.d.ts +0 -12
- package/dist/lib/dict.d.ts.map +0 -1
- package/dist/lib/dom.d.ts +0 -19
- package/dist/lib/dom.d.ts.map +0 -1
- package/dist/lib/fns.d.ts +0 -11
- package/dist/lib/fns.d.ts.map +0 -1
- package/dist/lib/fzf.d.ts +0 -16
- package/dist/lib/fzf.d.ts.map +0 -1
- package/dist/lib/keyboard-area.d.ts +0 -16
- package/dist/lib/keyboard-area.d.ts.map +0 -1
- package/dist/notifications-cUdVPs-B.js +0 -2786
- package/dist/notifications-cUdVPs-B.js.map +0 -1
- package/dist/skeleton-D75GFBV6.js +0 -10
- package/dist/skeleton-D75GFBV6.js.map +0 -1
- package/dist/tabs-S00a8qq8.js +0 -106
- package/dist/tabs-S00a8qq8.js.map +0 -1
- package/dist/types.d.ts +0 -26
- package/dist/types.d.ts.map +0 -1
- package/dist/use-translations-BwLKTrZv.js +0 -10
- package/dist/use-translations-BwLKTrZv.js.map +0 -1
package/dist/ai/docs/Dropdown.md
DELETED
|
@@ -1,223 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Dropdown
|
|
3
|
-
description: Floating dropdown panel with an optional title, arrow pointer, and automatic collision-aware positioning.
|
|
4
|
-
package: "@g4rcez/components"
|
|
5
|
-
export: "{ Dropdown }"
|
|
6
|
-
import: "import { Dropdown } from '@g4rcez/components/dropdown'"
|
|
7
|
-
category: floating
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
# Dropdown
|
|
11
|
-
|
|
12
|
-
Floating dropdown panel with an optional title, arrow pointer, and automatic collision-aware positioning.
|
|
13
|
-
|
|
14
|
-
## Import
|
|
15
|
-
|
|
16
|
-
```tsx
|
|
17
|
-
import { Dropdown } from "@g4rcez/components/dropdown";
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
## Props
|
|
21
|
-
|
|
22
|
-
| Prop | Type | Default | Description |
|
|
23
|
-
|------|------|---------|-------------|
|
|
24
|
-
| `trigger` | `React.ReactElement \| React.ReactNode` | — | Element that toggles the dropdown on click |
|
|
25
|
-
| `open` | `boolean` | — | Controlled open state |
|
|
26
|
-
| `arrow` | `boolean` | `false` | Show an arrow pointer pointing at the trigger |
|
|
27
|
-
| `title` | `React.ReactNode \| string` | — | Header title rendered inside the panel |
|
|
28
|
-
| `restoreFocus` | `boolean` | `true` | Restore focus to the trigger when the panel closes |
|
|
29
|
-
| `returnFocus` | `boolean` | `true` | Return focus to the trigger element |
|
|
30
|
-
| `onChange` | `(nextValue: boolean) => void` | — | Callback fired when the open state changes |
|
|
31
|
-
| `buttonProps` | `React.HTMLProps<"button">` | — | Additional props forwarded to the trigger `<button>` |
|
|
32
|
-
| `children` | `React.ReactNode` | — | Panel content |
|
|
33
|
-
|
|
34
|
-
## Design Tokens
|
|
35
|
-
|
|
36
|
-
Tokens this component reads. Customize by overriding these CSS variables in your theme.
|
|
37
|
-
|
|
38
|
-
| Token | CSS Variable | Purpose |
|
|
39
|
-
|-------|-------------|---------|
|
|
40
|
-
| `bg-floating-background` | `--floating-background` | Panel surface background |
|
|
41
|
-
| `border-floating-border` | `--floating-border` | Panel border and arrow stroke |
|
|
42
|
-
| `fill-floating-background` | `--floating-background` | Arrow fill color |
|
|
43
|
-
| `z-floating` | `--z-floating` | Z-index for the floating panel |
|
|
44
|
-
| `shadow-shadow-floating` | `--shadow-floating` | Panel drop shadow |
|
|
45
|
-
| `rounded-lg` | — | Panel corner radius |
|
|
46
|
-
|
|
47
|
-
## Examples
|
|
48
|
-
|
|
49
|
-
### Simple Action Menu
|
|
50
|
-
|
|
51
|
-
```tsx
|
|
52
|
-
import { Dropdown } from "@g4rcez/components/dropdown";
|
|
53
|
-
import { Button } from "@g4rcez/components/button";
|
|
54
|
-
|
|
55
|
-
function SimpleDropdown() {
|
|
56
|
-
return (
|
|
57
|
-
<Dropdown
|
|
58
|
-
trigger={<Button theme="primary">Actions</Button>}
|
|
59
|
-
>
|
|
60
|
-
<div className="flex min-w-48 flex-col py-1">
|
|
61
|
-
<button className="w-full px-4 py-2 text-left text-foreground hover:bg-floating-hover">
|
|
62
|
-
Edit
|
|
63
|
-
</button>
|
|
64
|
-
<button className="w-full px-4 py-2 text-left text-foreground hover:bg-floating-hover">
|
|
65
|
-
Duplicate
|
|
66
|
-
</button>
|
|
67
|
-
<hr className="border-border my-1" />
|
|
68
|
-
<button className="w-full px-4 py-2 text-left text-danger hover:bg-floating-hover">
|
|
69
|
-
Delete
|
|
70
|
-
</button>
|
|
71
|
-
</div>
|
|
72
|
-
</Dropdown>
|
|
73
|
-
);
|
|
74
|
-
}
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
### Dropdown with Title and Arrow
|
|
78
|
-
|
|
79
|
-
```tsx
|
|
80
|
-
import { UserIcon, CaretDownIcon } from "@phosphor-icons/react";
|
|
81
|
-
import { Dropdown } from "@g4rcez/components/dropdown";
|
|
82
|
-
|
|
83
|
-
function AccountDropdown() {
|
|
84
|
-
return (
|
|
85
|
-
<Dropdown
|
|
86
|
-
trigger={
|
|
87
|
-
<button className="flex items-center gap-2 px-3 py-2 rounded-button border border-border text-foreground">
|
|
88
|
-
<UserIcon size={16} />
|
|
89
|
-
Account
|
|
90
|
-
<CaretDownIcon size={16} />
|
|
91
|
-
</button>
|
|
92
|
-
}
|
|
93
|
-
title="Account Options"
|
|
94
|
-
arrow
|
|
95
|
-
>
|
|
96
|
-
<div className="flex min-w-48 flex-col py-1">
|
|
97
|
-
<button className="w-full px-4 py-2 text-left text-foreground hover:bg-floating-hover">
|
|
98
|
-
Profile Settings
|
|
99
|
-
</button>
|
|
100
|
-
<button className="w-full px-4 py-2 text-left text-foreground hover:bg-floating-hover">
|
|
101
|
-
Billing
|
|
102
|
-
</button>
|
|
103
|
-
<button className="w-full px-4 py-2 text-left text-foreground hover:bg-floating-hover">
|
|
104
|
-
Sign Out
|
|
105
|
-
</button>
|
|
106
|
-
</div>
|
|
107
|
-
</Dropdown>
|
|
108
|
-
);
|
|
109
|
-
}
|
|
110
|
-
```
|
|
111
|
-
|
|
112
|
-
### Controlled Dropdown
|
|
113
|
-
|
|
114
|
-
```tsx
|
|
115
|
-
import { useState } from "react";
|
|
116
|
-
import { Dropdown } from "@g4rcez/components/dropdown";
|
|
117
|
-
|
|
118
|
-
function ControlledDropdown() {
|
|
119
|
-
const [isOpen, setIsOpen] = useState(false);
|
|
120
|
-
|
|
121
|
-
return (
|
|
122
|
-
<Dropdown
|
|
123
|
-
trigger={
|
|
124
|
-
<button className="px-4 py-2 rounded-button bg-muted text-foreground">
|
|
125
|
-
{isOpen ? "Close" : "Open"} Menu
|
|
126
|
-
</button>
|
|
127
|
-
}
|
|
128
|
-
open={isOpen}
|
|
129
|
-
onChange={setIsOpen}
|
|
130
|
-
>
|
|
131
|
-
<div className="min-w-48 p-4">
|
|
132
|
-
<p className="text-foreground">Controlled dropdown content</p>
|
|
133
|
-
<button
|
|
134
|
-
onClick={() => setIsOpen(false)}
|
|
135
|
-
className="mt-2 px-3 py-1 bg-primary text-primary-foreground rounded-button text-sm"
|
|
136
|
-
>
|
|
137
|
-
Close
|
|
138
|
-
</button>
|
|
139
|
-
</div>
|
|
140
|
-
</Dropdown>
|
|
141
|
-
);
|
|
142
|
-
}
|
|
143
|
-
```
|
|
144
|
-
|
|
145
|
-
### Filter Dropdown with Form Content
|
|
146
|
-
|
|
147
|
-
```tsx
|
|
148
|
-
import { FunnelIcon } from "@phosphor-icons/react";
|
|
149
|
-
import { Dropdown } from "@g4rcez/components/dropdown";
|
|
150
|
-
|
|
151
|
-
function FilterDropdown() {
|
|
152
|
-
const [status, setStatus] = useState("");
|
|
153
|
-
|
|
154
|
-
return (
|
|
155
|
-
<Dropdown
|
|
156
|
-
trigger={
|
|
157
|
-
<button className="flex items-center gap-2 px-3 py-2 rounded-button border border-border text-foreground">
|
|
158
|
-
<FunnelIcon size={16} />
|
|
159
|
-
Filters
|
|
160
|
-
{status && <span className="h-2 w-2 rounded-full bg-primary" />}
|
|
161
|
-
</button>
|
|
162
|
-
}
|
|
163
|
-
title="Filter Options"
|
|
164
|
-
>
|
|
165
|
-
<div className="min-w-64 space-y-4 p-4">
|
|
166
|
-
<div>
|
|
167
|
-
<label className="block text-sm font-medium text-foreground mb-1">
|
|
168
|
-
Status
|
|
169
|
-
</label>
|
|
170
|
-
<select
|
|
171
|
-
value={status}
|
|
172
|
-
onChange={(e) => setStatus(e.target.value)}
|
|
173
|
-
className="w-full px-3 py-2 rounded-button border border-border bg-background text-foreground"
|
|
174
|
-
>
|
|
175
|
-
<option value="">All</option>
|
|
176
|
-
<option value="active">Active</option>
|
|
177
|
-
<option value="inactive">Inactive</option>
|
|
178
|
-
</select>
|
|
179
|
-
</div>
|
|
180
|
-
<div className="flex gap-2 pt-2">
|
|
181
|
-
<button
|
|
182
|
-
onClick={() => setStatus("")}
|
|
183
|
-
className="px-3 py-1 text-sm rounded-button border border-border text-foreground"
|
|
184
|
-
>
|
|
185
|
-
Clear
|
|
186
|
-
</button>
|
|
187
|
-
<button className="px-3 py-1 text-sm rounded-button bg-primary text-primary-foreground">
|
|
188
|
-
Apply
|
|
189
|
-
</button>
|
|
190
|
-
</div>
|
|
191
|
-
</div>
|
|
192
|
-
</Dropdown>
|
|
193
|
-
);
|
|
194
|
-
}
|
|
195
|
-
```
|
|
196
|
-
|
|
197
|
-
## Do
|
|
198
|
-
|
|
199
|
-
- Use design-token classes for dropdown item hover states (`hover:bg-floating-hover`, `text-foreground`) instead of raw color utilities.
|
|
200
|
-
- Provide a `title` to help users understand the panel's context.
|
|
201
|
-
- Use the `arrow` prop when the trigger is small and spatial context helps the user.
|
|
202
|
-
- Group related items with separators for panels with more than 5 items.
|
|
203
|
-
|
|
204
|
-
## Don't
|
|
205
|
-
|
|
206
|
-
- Don't pass raw Tailwind color classes (`bg-blue-500`, `text-white`, `hover:bg-gray-100`) — use design-token classes.
|
|
207
|
-
- Don't use arbitrary values (`bg-[#abc]`, `z-[9999]`) — override CSS variables in your `@theme` block.
|
|
208
|
-
- Don't put more than 10–15 items in a single dropdown; consider `CommandPalette` or `Modal` instead.
|
|
209
|
-
- Don't place critical destructive actions in a dropdown without a confirmation step.
|
|
210
|
-
|
|
211
|
-
## Accessibility
|
|
212
|
-
|
|
213
|
-
- The trigger is wrapped in a `<button>` element; pass `aria-label` via `buttonProps` when the trigger has no visible text.
|
|
214
|
-
- The panel receives `aria-labelledby` pointing at the heading generated from `title`.
|
|
215
|
-
- `FloatingFocusManager` traps focus within the panel and restores it to the trigger on close.
|
|
216
|
-
- Clicking outside or pressing `Escape` closes the panel (handled by `useDismiss`).
|
|
217
|
-
- Tab navigation works naturally within the panel content.
|
|
218
|
-
|
|
219
|
-
## Notes
|
|
220
|
-
|
|
221
|
-
- Built on `@floating-ui/react` with `flip`, `shift`, and `offset(10)` middleware. The panel flips to the opposite side if there is insufficient space.
|
|
222
|
-
- When a child element has `data-floating="true"`, focus leaving to that element will not close the dropdown — useful for nested portals.
|
|
223
|
-
- The `open` prop is synced to local state via `useEffect`; controlled and uncontrolled usage are both supported.
|
|
@@ -1,225 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: FileUpload
|
|
3
|
-
description: Drag-and-drop file upload area with file preview, modal viewer, and per-file deletion.
|
|
4
|
-
package: "@g4rcez/components"
|
|
5
|
-
export: "{ FileUpload }"
|
|
6
|
-
import: "import { FileUpload } from '@g4rcez/components/file-upload'"
|
|
7
|
-
category: form
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
# FileUpload
|
|
11
|
-
|
|
12
|
-
Drag-and-drop file upload area with file preview, modal viewer, and per-file deletion.
|
|
13
|
-
|
|
14
|
-
## Import
|
|
15
|
-
|
|
16
|
-
```tsx
|
|
17
|
-
import { FileUpload } from "@g4rcez/components/file-upload";
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
## Props
|
|
21
|
-
|
|
22
|
-
| Prop | Type | Default | Description |
|
|
23
|
-
|------|------|---------|-------------|
|
|
24
|
-
| `files` | `File[]` | - | Controlled files array |
|
|
25
|
-
| `onDrop` | `(files: File[]) => void` | - | Called when files are dropped or selected |
|
|
26
|
-
| `onDeleteFile` | `(file: File) => void` | - | Called when the delete button on a file item is clicked |
|
|
27
|
-
| `idle` | `React.ReactElement` | Default idle UI | Content to show when no files are present and the area is not active |
|
|
28
|
-
| `File` | `React.FC<{ file: File }>` | - | Custom component rendered below each file's name/size row |
|
|
29
|
-
| `accept` | `string \| Record<string, string[]>` | - | Accepted file types (forwarded to `react-dropzone`) |
|
|
30
|
-
| `multiple` | `boolean` | `false` | Allow selecting more than one file |
|
|
31
|
-
| `maxFiles` | `number` | - | Maximum number of files |
|
|
32
|
-
| `maxSize` | `number` | - | Maximum file size in bytes |
|
|
33
|
-
| `disabled` | `boolean` | `false` | Disable the drop zone |
|
|
34
|
-
| `name` | `string` | - | Name for the underlying `<input>` |
|
|
35
|
-
| `...DropzoneProps` | | | All `react-dropzone` props are supported |
|
|
36
|
-
|
|
37
|
-
## Design Tokens
|
|
38
|
-
|
|
39
|
-
Tokens this component reads. Customize by overriding these CSS variables in your theme.
|
|
40
|
-
|
|
41
|
-
| Token | CSS Variable | Purpose |
|
|
42
|
-
|-------|-------------|---------|
|
|
43
|
-
| `border-card-border` | `--card-border` | Border between file list items and default drop zone border |
|
|
44
|
-
| `bg-card-background` | `--card-background` | Drop zone background when files are present |
|
|
45
|
-
| `text-foreground` | `--foreground` | General text color |
|
|
46
|
-
| `text-primary` | `--primary` | Folder icon color and "browse" link color in default idle state |
|
|
47
|
-
| `text-danger` | `--danger` | Delete button hover color |
|
|
48
|
-
|
|
49
|
-
## Drag and Drop States
|
|
50
|
-
|
|
51
|
-
| State | Description |
|
|
52
|
-
|-------|-------------|
|
|
53
|
-
| Idle (empty) | Displays the `idle` prop or the default folder icon with an upload prompt |
|
|
54
|
-
| Drag active | Replaces the idle UI with an open folder icon while dragging |
|
|
55
|
-
| Files present | Renders the file list; drop zone border becomes solid and background fills |
|
|
56
|
-
|
|
57
|
-
## File Type Rendering
|
|
58
|
-
|
|
59
|
-
The component automatically selects an icon based on file extension:
|
|
60
|
-
|
|
61
|
-
| Extension(s) | Icon |
|
|
62
|
-
|---|---|
|
|
63
|
-
| csv, xls, xlsx | `SheetIcon` |
|
|
64
|
-
| pdf, txt | `FileTextIcon` |
|
|
65
|
-
| json | `FileJsonIcon` |
|
|
66
|
-
| mp3 | `AudioLinesIcon` |
|
|
67
|
-
| mp4, mov | `FileVideo2` |
|
|
68
|
-
| Images | Inline `<img>` thumbnail |
|
|
69
|
-
| Other | Generic `FileIcon` |
|
|
70
|
-
|
|
71
|
-
Clicking a file thumbnail opens a `Modal` viewer with full-size preview for images, `<video>` player for videos, and `<audio>` player for audio files.
|
|
72
|
-
|
|
73
|
-
## Examples
|
|
74
|
-
|
|
75
|
-
### Controlled image upload
|
|
76
|
-
|
|
77
|
-
```tsx
|
|
78
|
-
import { FileUpload } from "@g4rcez/components/file-upload";
|
|
79
|
-
|
|
80
|
-
function ImageUpload() {
|
|
81
|
-
const [images, setImages] = useState<File[]>([]);
|
|
82
|
-
|
|
83
|
-
return (
|
|
84
|
-
<FileUpload
|
|
85
|
-
files={images}
|
|
86
|
-
onDrop={(added) => setImages((prev) => [...prev, ...added])}
|
|
87
|
-
onDeleteFile={(file) => setImages((prev) => prev.filter((f) => f !== file))}
|
|
88
|
-
accept="image/*"
|
|
89
|
-
multiple
|
|
90
|
-
maxFiles={10}
|
|
91
|
-
maxSize={5 * 1024 * 1024}
|
|
92
|
-
/>
|
|
93
|
-
);
|
|
94
|
-
}
|
|
95
|
-
```
|
|
96
|
-
|
|
97
|
-
### Single file upload
|
|
98
|
-
|
|
99
|
-
```tsx
|
|
100
|
-
function AvatarUpload() {
|
|
101
|
-
const [file, setFile] = useState<File | null>(null);
|
|
102
|
-
|
|
103
|
-
return (
|
|
104
|
-
<FileUpload
|
|
105
|
-
files={file ? [file] : []}
|
|
106
|
-
onDrop={(files) => setFile(files[0])}
|
|
107
|
-
onDeleteFile={() => setFile(null)}
|
|
108
|
-
accept="image/jpeg,image/png"
|
|
109
|
-
multiple={false}
|
|
110
|
-
maxSize={2 * 1024 * 1024}
|
|
111
|
-
/>
|
|
112
|
-
);
|
|
113
|
-
}
|
|
114
|
-
```
|
|
115
|
-
|
|
116
|
-
### Custom idle state
|
|
117
|
-
|
|
118
|
-
```tsx
|
|
119
|
-
import { UploadSimpleIcon } from "@phosphor-icons/react";
|
|
120
|
-
|
|
121
|
-
const CustomIdle = () => (
|
|
122
|
-
<div className="flex flex-col items-center gap-2 py-10">
|
|
123
|
-
<UploadSimpleIcon size={48} className="text-primary" />
|
|
124
|
-
<p className="text-foreground font-medium">Drop files here</p>
|
|
125
|
-
<p className="text-muted-foreground text-sm">PDF, DOCX, up to 10 MB each</p>
|
|
126
|
-
</div>
|
|
127
|
-
);
|
|
128
|
-
|
|
129
|
-
<FileUpload
|
|
130
|
-
files={[]}
|
|
131
|
-
onDrop={setFiles}
|
|
132
|
-
idle={<CustomIdle />}
|
|
133
|
-
accept="application/pdf,.docx"
|
|
134
|
-
multiple
|
|
135
|
-
/>
|
|
136
|
-
```
|
|
137
|
-
|
|
138
|
-
### Custom per-file renderer
|
|
139
|
-
|
|
140
|
-
```tsx
|
|
141
|
-
const ProgressRow = ({ file }: { file: File }) => {
|
|
142
|
-
const progress = useUploadProgress(file);
|
|
143
|
-
return (
|
|
144
|
-
<div className="flex flex-col gap-1 pb-2">
|
|
145
|
-
<div className="flex justify-between text-xs text-muted-foreground">
|
|
146
|
-
<span>{progress < 100 ? "Uploading..." : "Done"}</span>
|
|
147
|
-
<span>{progress}%</span>
|
|
148
|
-
</div>
|
|
149
|
-
<div className="h-1.5 rounded-full bg-muted overflow-hidden">
|
|
150
|
-
<div
|
|
151
|
-
className="h-full rounded-full bg-primary transition-all"
|
|
152
|
-
style={{ width: `${progress}%` }}
|
|
153
|
-
/>
|
|
154
|
-
</div>
|
|
155
|
-
</div>
|
|
156
|
-
);
|
|
157
|
-
};
|
|
158
|
-
|
|
159
|
-
<FileUpload files={files} onDrop={setFiles} File={ProgressRow} multiple />
|
|
160
|
-
```
|
|
161
|
-
|
|
162
|
-
### Inside a form
|
|
163
|
-
|
|
164
|
-
```tsx
|
|
165
|
-
import { Form } from "@g4rcez/components/form";
|
|
166
|
-
import { Button } from "@g4rcez/components/button";
|
|
167
|
-
|
|
168
|
-
function SubmissionForm() {
|
|
169
|
-
const [attachments, setAttachments] = useState<File[]>([]);
|
|
170
|
-
|
|
171
|
-
const handleSubmit = (e: React.FormEvent<HTMLFormElement>) => {
|
|
172
|
-
const data = new FormData(e.currentTarget);
|
|
173
|
-
attachments.forEach((f) => data.append("attachments", f));
|
|
174
|
-
submitToServer(data);
|
|
175
|
-
};
|
|
176
|
-
|
|
177
|
-
return (
|
|
178
|
-
<Form onSubmit={handleSubmit} className="flex flex-col gap-base">
|
|
179
|
-
<FileUpload
|
|
180
|
-
name="attachments"
|
|
181
|
-
files={attachments}
|
|
182
|
-
onDrop={(added) => setAttachments((prev) => [...prev, ...added])}
|
|
183
|
-
onDeleteFile={(f) => setAttachments((prev) => prev.filter((x) => x !== f))}
|
|
184
|
-
accept="image/*,.pdf"
|
|
185
|
-
multiple
|
|
186
|
-
maxSize={10 * 1024 * 1024}
|
|
187
|
-
/>
|
|
188
|
-
<Button theme="primary" type="submit">Submit</Button>
|
|
189
|
-
</Form>
|
|
190
|
-
);
|
|
191
|
-
}
|
|
192
|
-
```
|
|
193
|
-
|
|
194
|
-
## Do
|
|
195
|
-
|
|
196
|
-
- Always set `accept` to restrict uploads to the file types your server expects.
|
|
197
|
-
- Set `maxSize` to provide immediate client-side feedback for oversized files.
|
|
198
|
-
- Use `multiple` when batch uploads are expected.
|
|
199
|
-
- Use the `File` prop to add progress bars, metadata, or custom actions below each file row.
|
|
200
|
-
- Use design-token classes for wrapper elements (`bg-card-background`, `text-foreground`).
|
|
201
|
-
|
|
202
|
-
## Don't
|
|
203
|
-
|
|
204
|
-
- Don't pass raw Tailwind color classes (`bg-blue-500`, `text-white`, `border-gray-300`) — use theme props or design tokens instead.
|
|
205
|
-
- Don't use arbitrary Tailwind values (`bg-[#abc]`, `bg-[--my-var]`) — override CSS variables in your `@theme` block instead.
|
|
206
|
-
- Don't rely solely on client-side `maxSize`/`accept` — validate files server-side as well.
|
|
207
|
-
- Don't skip `onDeleteFile` when `files` is controlled — without it, users cannot remove files they added.
|
|
208
|
-
|
|
209
|
-
## Accessibility
|
|
210
|
-
|
|
211
|
-
- The drop zone uses `react-dropzone`'s `getRootProps` and `getInputProps`, which include keyboard support (Enter/Space to open the file browser).
|
|
212
|
-
- The hidden `<input type="file">` is accessible by assistive technologies.
|
|
213
|
-
- Delete buttons include a `type="button"` to prevent accidental form submission.
|
|
214
|
-
- The modal viewer opened for file preview is managed by the `Modal` component, which handles focus trapping and Escape to close.
|
|
215
|
-
|
|
216
|
-
## Data Attributes
|
|
217
|
-
|
|
218
|
-
- `data-active="true"` — on the drop zone wrapper when at least one file is present; used to switch between dashed (empty) and solid (filled) border styles.
|
|
219
|
-
|
|
220
|
-
## Notes
|
|
221
|
-
|
|
222
|
-
- When `files` is not provided, the component manages its own internal file state. Pass `files` for fully controlled behavior.
|
|
223
|
-
- Object URLs created for previews are revoked on cleanup via `useEffect` to prevent memory leaks.
|
|
224
|
-
- The `File` prop (custom renderer) is rendered inside the file list item, below the file name and size row, alongside the built-in delete button.
|
|
225
|
-
- The component depends on `react-dropzone` and `pretty-bytes` as peer dependencies.
|
package/dist/ai/docs/Input.md
DELETED
|
@@ -1,237 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Input
|
|
3
|
-
description: Text input with optional masking for currencies, percentages, phone numbers, dates, and custom regex patterns.
|
|
4
|
-
package: "@g4rcez/components"
|
|
5
|
-
export: "{ Input }"
|
|
6
|
-
import: "import { Input } from '@g4rcez/components/input'"
|
|
7
|
-
category: form
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
# Input
|
|
11
|
-
|
|
12
|
-
Text input with optional masking for currencies, percentages, phone numbers, dates, and custom regex patterns.
|
|
13
|
-
|
|
14
|
-
## Import
|
|
15
|
-
|
|
16
|
-
```tsx
|
|
17
|
-
import { Input } from "@g4rcez/components/input";
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
## Props
|
|
21
|
-
|
|
22
|
-
`Input` extends all standard HTML `<input>` attributes plus `InputField` layout props:
|
|
23
|
-
|
|
24
|
-
| Prop | Type | Default | Description |
|
|
25
|
-
|------|------|---------|-------------|
|
|
26
|
-
| `mask` | `AllMasks \| Array<string \| RegExp> \| ((value: string) => AllMasks)` | - | Input mask pattern |
|
|
27
|
-
| `locale` | `Locales` | - | Locale for currency/number formatting |
|
|
28
|
-
| `currency` | `CurrencyCode` | - | Currency code when using `mask="currency"` |
|
|
29
|
-
| `error` | `string` | - | Error message shown below the field |
|
|
30
|
-
| `title` | `string` | - | Field label |
|
|
31
|
-
| `feedback` | `Label` | - | Success or neutral feedback text below the field |
|
|
32
|
-
| `left` | `Label` | - | Content rendered on the left inside the field border |
|
|
33
|
-
| `right` | `Label` | - | Content rendered on the right inside the field border |
|
|
34
|
-
| `required` | `boolean` | `false` | Marks field as required; hides "Optional" label text |
|
|
35
|
-
| `disabled` | `boolean` | `false` | Disabled state |
|
|
36
|
-
| `loading` | `boolean` | `false` | Loading state |
|
|
37
|
-
| `container` | `string` | - | Extra CSS classes for the outer `fieldset` |
|
|
38
|
-
| `labelClassName` | `string` | - | Extra CSS classes for the label/border wrapper |
|
|
39
|
-
| `next` | `string` | - | `id` of the next field to focus when Enter is pressed with `enterKeyHint="next"` |
|
|
40
|
-
| `hiddenLabel` | `boolean` | `false` | Visually hides the label but keeps it for screen readers |
|
|
41
|
-
| `...props` | `React.InputHTMLAttributes<HTMLInputElement>` | - | All standard input attributes |
|
|
42
|
-
|
|
43
|
-
### Mask patterns
|
|
44
|
-
|
|
45
|
-
| Pattern char | Matches |
|
|
46
|
-
|---|---|
|
|
47
|
-
| `9` | Digit (0–9) |
|
|
48
|
-
| `A` | Letter (a–z, A–Z) |
|
|
49
|
-
| `S` | Alphanumeric |
|
|
50
|
-
| `*` | Any character |
|
|
51
|
-
|
|
52
|
-
### Special mask strings
|
|
53
|
-
|
|
54
|
-
| Value | Description |
|
|
55
|
-
|---|---|
|
|
56
|
-
| `"currency"` | Currency formatting (requires `locale` and `currency`) |
|
|
57
|
-
| `"percentage"` | Percentage input with `%` symbol |
|
|
58
|
-
| `"decimal"` | Decimal number formatting |
|
|
59
|
-
|
|
60
|
-
## Design Tokens
|
|
61
|
-
|
|
62
|
-
Tokens this component reads. Customize by overriding these CSS variables in your theme.
|
|
63
|
-
|
|
64
|
-
| Token | CSS Variable | Purpose |
|
|
65
|
-
|-------|-------------|---------|
|
|
66
|
-
| `h-input-height` | `--input-height` | Input height |
|
|
67
|
-
| `px-input-x` | `--input-x` | Horizontal padding |
|
|
68
|
-
| `py-input-y` | `--input-y` | Vertical padding |
|
|
69
|
-
| `mt-input-gap` | `--input-gap` | Gap between field border and error/feedback text |
|
|
70
|
-
| `border-input-border` | `--input-border` | Default border color |
|
|
71
|
-
| `text-field-label` | `--field-label` | Label text color |
|
|
72
|
-
| `text-foreground` | `--foreground` | Input text color |
|
|
73
|
-
| `text-primary` | `--primary` | Focus ring, focus/hover border color |
|
|
74
|
-
| `text-danger` | `--danger` | Error state border, text, and label color |
|
|
75
|
-
| `text-disabled` | `--disabled` | Disabled text and border color |
|
|
76
|
-
| `placeholder-input-mask` | `--input-mask` | Placeholder text color |
|
|
77
|
-
| `placeholder-input-mask-error` | `--input-mask-error` | Placeholder color in error state |
|
|
78
|
-
|
|
79
|
-
## Examples
|
|
80
|
-
|
|
81
|
-
### Basic text input
|
|
82
|
-
|
|
83
|
-
```tsx
|
|
84
|
-
import { Input } from "@g4rcez/components/input";
|
|
85
|
-
|
|
86
|
-
<Input name="name" title="Full name" placeholder="Jane Smith" required />
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
### Phone number mask
|
|
90
|
-
|
|
91
|
-
```tsx
|
|
92
|
-
<Input
|
|
93
|
-
name="phone"
|
|
94
|
-
title="Phone"
|
|
95
|
-
mask="(99) 99999-9999"
|
|
96
|
-
placeholder="(00) 00000-0000"
|
|
97
|
-
/>
|
|
98
|
-
```
|
|
99
|
-
|
|
100
|
-
### Currency input
|
|
101
|
-
|
|
102
|
-
```tsx
|
|
103
|
-
<Input
|
|
104
|
-
name="price"
|
|
105
|
-
title="Price"
|
|
106
|
-
mask="currency"
|
|
107
|
-
currency="USD"
|
|
108
|
-
locale="en-US"
|
|
109
|
-
placeholder="0.00"
|
|
110
|
-
/>
|
|
111
|
-
```
|
|
112
|
-
|
|
113
|
-
### Dynamic mask (CPF / CNPJ)
|
|
114
|
-
|
|
115
|
-
```tsx
|
|
116
|
-
const docMask = (value: string) =>
|
|
117
|
-
value.replace(/\D/g, "").length <= 11
|
|
118
|
-
? "999.999.999-99"
|
|
119
|
-
: "99.999.999/9999-99";
|
|
120
|
-
|
|
121
|
-
<Input
|
|
122
|
-
name="document"
|
|
123
|
-
title="CPF or CNPJ"
|
|
124
|
-
mask={docMask}
|
|
125
|
-
placeholder="000.000.000-00"
|
|
126
|
-
/>
|
|
127
|
-
```
|
|
128
|
-
|
|
129
|
-
### Input with inline left/right slots
|
|
130
|
-
|
|
131
|
-
```tsx
|
|
132
|
-
import { MagnifyingGlassIcon } from "@phosphor-icons/react";
|
|
133
|
-
|
|
134
|
-
<Input
|
|
135
|
-
name="search"
|
|
136
|
-
title="Search"
|
|
137
|
-
left={<MagnifyingGlassIcon size={16} className="text-muted-foreground" />}
|
|
138
|
-
placeholder="Type to search..."
|
|
139
|
-
/>
|
|
140
|
-
```
|
|
141
|
-
|
|
142
|
-
### Input with error and feedback
|
|
143
|
-
|
|
144
|
-
```tsx
|
|
145
|
-
const [email, setEmail] = useState("");
|
|
146
|
-
const error = email && !/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(email)
|
|
147
|
-
? "Enter a valid email address"
|
|
148
|
-
: undefined;
|
|
149
|
-
|
|
150
|
-
<Input
|
|
151
|
-
name="email"
|
|
152
|
-
type="email"
|
|
153
|
-
title="Email"
|
|
154
|
-
value={email}
|
|
155
|
-
onChange={(e) => setEmail(e.target.value)}
|
|
156
|
-
error={error}
|
|
157
|
-
feedback={!error && email ? "Looks good!" : undefined}
|
|
158
|
-
/>
|
|
159
|
-
```
|
|
160
|
-
|
|
161
|
-
### Enter-to-advance between fields
|
|
162
|
-
|
|
163
|
-
```tsx
|
|
164
|
-
<Input
|
|
165
|
-
name="first"
|
|
166
|
-
title="First name"
|
|
167
|
-
enterKeyHint="next"
|
|
168
|
-
next="last"
|
|
169
|
-
/>
|
|
170
|
-
<Input
|
|
171
|
-
name="last"
|
|
172
|
-
id="last"
|
|
173
|
-
title="Last name"
|
|
174
|
-
enterKeyHint="done"
|
|
175
|
-
/>
|
|
176
|
-
```
|
|
177
|
-
|
|
178
|
-
### Inside a form
|
|
179
|
-
|
|
180
|
-
```tsx
|
|
181
|
-
import { Form } from "@g4rcez/components/form";
|
|
182
|
-
import { Button } from "@g4rcez/components/button";
|
|
183
|
-
|
|
184
|
-
function SignUpForm() {
|
|
185
|
-
const handleSubmit = (e: React.FormEvent<HTMLFormElement>) => {
|
|
186
|
-
const data = new FormData(e.currentTarget);
|
|
187
|
-
console.log(Object.fromEntries(data));
|
|
188
|
-
};
|
|
189
|
-
|
|
190
|
-
return (
|
|
191
|
-
<Form onSubmit={handleSubmit} className="flex flex-col gap-base max-w-md">
|
|
192
|
-
<Input name="name" title="Full name" required />
|
|
193
|
-
<Input name="email" type="email" title="Email" required />
|
|
194
|
-
<Input name="phone" title="Phone" mask="(99) 99999-9999" />
|
|
195
|
-
<Button theme="primary" type="submit">Sign up</Button>
|
|
196
|
-
</Form>
|
|
197
|
-
);
|
|
198
|
-
}
|
|
199
|
-
```
|
|
200
|
-
|
|
201
|
-
## Do
|
|
202
|
-
|
|
203
|
-
- Use `mask` patterns that match user expectations for the data type.
|
|
204
|
-
- Provide a `placeholder` that shows the expected format (e.g., `"(00) 00000-0000"`).
|
|
205
|
-
- Use the `error` prop to surface validation messages from your form library or manual validation.
|
|
206
|
-
- Use the `next` prop with `enterKeyHint="next"` to create smooth keyboard flows on mobile.
|
|
207
|
-
- Use design-token classes for wrapper elements (`bg-background`, `text-foreground`, `border-border`).
|
|
208
|
-
|
|
209
|
-
## Don't
|
|
210
|
-
|
|
211
|
-
- Don't pass raw Tailwind color classes (`bg-blue-500`, `text-white`, `border-gray-300`) — use theme props or design tokens instead.
|
|
212
|
-
- Don't use arbitrary Tailwind values (`bg-[#abc]`, `bg-[--my-var]`) — override CSS variables in your `@theme` block instead.
|
|
213
|
-
- Don't use a mask that blocks valid input variations — prefer dynamic masks for formats with variable length.
|
|
214
|
-
- Don't forget that the mask formats the display value; if your backend expects raw data, strip formatting before sending.
|
|
215
|
-
- Don't use `Input` for long-form text — use `Textarea` instead.
|
|
216
|
-
|
|
217
|
-
## Accessibility
|
|
218
|
-
|
|
219
|
-
- Renders a semantic `<input>` wrapped in a `<fieldset>` with an associated `<label>` (via `InputField`).
|
|
220
|
-
- `aria-disabled`, `aria-readonly`, and `aria-busy` are set automatically from props.
|
|
221
|
-
- Error messages appear as a visible `<p>` below the field after the user has interacted with it (`data-initialized="true"`).
|
|
222
|
-
- Focus ring uses `focus:ring-primary` for consistent, visible keyboard indication.
|
|
223
|
-
- The `hiddenLabel` prop keeps the label in the accessibility tree while hiding it visually.
|
|
224
|
-
|
|
225
|
-
## Data Attributes
|
|
226
|
-
|
|
227
|
-
- `data-initialized` — managed by `initializeInputDataset`; switches from `"false"` to `"true"` after first user interaction, enabling validation display.
|
|
228
|
-
- `data-next` — set from the `next` prop; used to focus the next field on Enter.
|
|
229
|
-
- `data-component="input"` — set on the outer `fieldset` by `InputField`.
|
|
230
|
-
- `data-error` — on the `fieldset`: `"true"` when an `error` string is present.
|
|
231
|
-
|
|
232
|
-
## Notes
|
|
233
|
-
|
|
234
|
-
- Built on top of `the-mask-input`. All mask features from that library are available.
|
|
235
|
-
- The component automatically manages cursor positioning during masked input.
|
|
236
|
-
- Works with both controlled (`value` + `onChange`) and uncontrolled (`defaultValue`) patterns.
|
|
237
|
-
- `Input` is created via the `createFreeText` factory, which also powers `Textarea`. Both share the same styling tokens.
|