@g4rcez/components 4.0.2 → 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 +120 -153
- package/ai/docs/Alert.md +47 -48
- package/ai/docs/AnimatedList.md +88 -87
- package/ai/docs/Autocomplete.md +102 -106
- package/ai/docs/Button.md +33 -33
- package/ai/docs/Calendar.md +67 -101
- package/ai/docs/Card.md +59 -55
- package/ai/docs/Checkbox.md +77 -82
- package/ai/docs/CommandPalette.md +154 -172
- package/ai/docs/DatePicker.md +45 -64
- package/ai/docs/Dropdown.md +98 -126
- package/ai/docs/Empty.md +41 -44
- package/ai/docs/Expand.md +40 -54
- package/ai/docs/FileUpload.md +102 -109
- package/ai/docs/Form.md +35 -29
- package/ai/docs/FormReset.md +37 -37
- package/ai/docs/Heading.md +4 -6
- package/ai/docs/Input.md +73 -98
- package/ai/docs/InputField.md +67 -67
- package/ai/docs/List.md +88 -85
- package/ai/docs/Menu.md +62 -60
- package/ai/docs/Modal.md +129 -136
- package/ai/docs/MultiSelect.md +65 -84
- package/ai/docs/Notifications.md +96 -96
- package/ai/docs/PageCalendar.md +88 -97
- package/ai/docs/Polymorph.md +25 -41
- package/ai/docs/Progress.md +55 -51
- package/ai/docs/Radiobox.md +49 -41
- package/ai/docs/RenderOnView.md +26 -32
- package/ai/docs/Resizable.md +60 -65
- package/ai/docs/Select.md +158 -158
- package/ai/docs/Shortcut.md +14 -14
- package/ai/docs/Skeleton.md +56 -60
- package/ai/docs/Slider.md +26 -49
- package/ai/docs/Slot.md +15 -17
- package/ai/docs/Spinner.md +17 -15
- package/ai/docs/Stats.md +44 -42
- package/ai/docs/Step.md +60 -60
- package/ai/docs/Switch.md +44 -54
- package/ai/docs/Table.md +124 -136
- package/ai/docs/Tabs.md +90 -90
- package/ai/docs/Tag.md +63 -65
- package/ai/docs/TaskList.md +40 -50
- package/ai/docs/Textarea.md +47 -70
- package/ai/docs/Timeline.md +98 -96
- package/ai/docs/Toolbar.md +46 -46
- package/ai/docs/Tooltip.md +103 -103
- package/ai/docs/Typography.md +55 -55
- package/ai/docs/Wizard.md +104 -109
- package/ai/docs/index.md +116 -116
- package/dist/autocomplete-DcTNOwyg.js +393 -0
- package/dist/autocomplete-DcTNOwyg.js.map +1 -0
- package/dist/{calendar-B5lSd0ID.js → calendar-BJMHRoy2.js} +104 -105
- package/dist/calendar-BJMHRoy2.js.map +1 -0
- package/dist/components/core/button.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 +2810 -2756
- 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 +99 -86
- package/ai/docs/TransferList.md +0 -142
- package/dist/autocomplete-Cn9Z2hLq.js +0 -375
- package/dist/autocomplete-Cn9Z2hLq.js.map +0 -1
- package/dist/calendar-B5lSd0ID.js.map +0 -1
- package/dist/components/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 -25
- package/dist/components/core/typography.d.ts.map +0 -1
- package/dist/components/display/alert.d.ts +0 -28
- package/dist/components/display/alert.d.ts.map +0 -1
- package/dist/components/display/calendar.d.ts +0 -42
- package/dist/components/display/calendar.d.ts.map +0 -1
- package/dist/components/display/card.d.ts +0 -29
- package/dist/components/display/card.d.ts.map +0 -1
- package/dist/components/display/empty.d.ts +0 -8
- package/dist/components/display/empty.d.ts.map +0 -1
- package/dist/components/display/list.d.ts +0 -16
- package/dist/components/display/list.d.ts.map +0 -1
- package/dist/components/display/notifications.d.ts +0 -27
- package/dist/components/display/notifications.d.ts.map +0 -1
- package/dist/components/display/progress.d.ts +0 -13
- package/dist/components/display/progress.d.ts.map +0 -1
- package/dist/components/display/shortcut.d.ts +0 -4
- package/dist/components/display/shortcut.d.ts.map +0 -1
- package/dist/components/display/skeleton.d.ts +0 -12
- package/dist/components/display/skeleton.d.ts.map +0 -1
- package/dist/components/display/spinner.d.ts +0 -5
- package/dist/components/display/spinner.d.ts.map +0 -1
- package/dist/components/display/stats.d.ts +0 -12
- package/dist/components/display/stats.d.ts.map +0 -1
- package/dist/components/display/step.d.ts +0 -24
- package/dist/components/display/step.d.ts.map +0 -1
- package/dist/components/display/tabs.d.ts +0 -24
- package/dist/components/display/tabs.d.ts.map +0 -1
- package/dist/components/display/timeline.d.ts +0 -10
- package/dist/components/display/timeline.d.ts.map +0 -1
- package/dist/components/floating/command-palette.d.ts +0 -49
- package/dist/components/floating/command-palette.d.ts.map +0 -1
- package/dist/components/floating/dropdown.d.ts +0 -15
- package/dist/components/floating/dropdown.d.ts.map +0 -1
- package/dist/components/floating/expand.d.ts +0 -11
- package/dist/components/floating/expand.d.ts.map +0 -1
- package/dist/components/floating/menu.d.ts +0 -52
- package/dist/components/floating/menu.d.ts.map +0 -1
- package/dist/components/floating/modal.d.ts +0 -60
- package/dist/components/floating/modal.d.ts.map +0 -1
- package/dist/components/floating/toolbar.d.ts +0 -6
- package/dist/components/floating/toolbar.d.ts.map +0 -1
- package/dist/components/floating/tooltip.d.ts +0 -17
- package/dist/components/floating/tooltip.d.ts.map +0 -1
- package/dist/components/floating/wizard.d.ts +0 -26
- package/dist/components/floating/wizard.d.ts.map +0 -1
- package/dist/components/form/autocomplete.d.ts +0 -16
- package/dist/components/form/autocomplete.d.ts.map +0 -1
- package/dist/components/form/checkbox.d.ts +0 -12
- package/dist/components/form/checkbox.d.ts.map +0 -1
- package/dist/components/form/date-picker.d.ts +0 -10
- package/dist/components/form/date-picker.d.ts.map +0 -1
- package/dist/components/form/file-upload.d.ts +0 -15
- package/dist/components/form/file-upload.d.ts.map +0 -1
- package/dist/components/form/form.d.ts +0 -3
- package/dist/components/form/form.d.ts.map +0 -1
- package/dist/components/form/formReset.d.ts +0 -2
- package/dist/components/form/formReset.d.ts.map +0 -1
- package/dist/components/form/free-text.d.ts +0 -11
- package/dist/components/form/free-text.d.ts.map +0 -1
- package/dist/components/form/input-field.d.ts +0 -34
- package/dist/components/form/input-field.d.ts.map +0 -1
- package/dist/components/form/input.d.ts +0 -52
- package/dist/components/form/input.d.ts.map +0 -1
- package/dist/components/form/multi-select.d.ts +0 -19
- package/dist/components/form/multi-select.d.ts.map +0 -1
- package/dist/components/form/radiobox.d.ts +0 -7
- package/dist/components/form/radiobox.d.ts.map +0 -1
- package/dist/components/form/select.d.ts +0 -13
- package/dist/components/form/select.d.ts.map +0 -1
- package/dist/components/form/slider.d.ts +0 -7
- package/dist/components/form/slider.d.ts.map +0 -1
- package/dist/components/form/switch.d.ts +0 -9
- package/dist/components/form/switch.d.ts.map +0 -1
- package/dist/components/form/task-list.d.ts +0 -3
- package/dist/components/form/task-list.d.ts.map +0 -1
- package/dist/components/form/textarea.d.ts +0 -6
- package/dist/components/form/textarea.d.ts.map +0 -1
- package/dist/components/form/transfer-list.d.ts +0 -14
- package/dist/components/form/transfer-list.d.ts.map +0 -1
- package/dist/components/form/transfer-list.js +0 -55
- package/dist/components/form/transfer-list.js.map +0 -1
- package/dist/components/index.d.ts +0 -46
- package/dist/components/index.d.ts.map +0 -1
- package/dist/components/page-calendar/calendar-header.d.ts +0 -16
- package/dist/components/page-calendar/calendar-header.d.ts.map +0 -1
- package/dist/components/page-calendar/day-view.d.ts +0 -12
- package/dist/components/page-calendar/day-view.d.ts.map +0 -1
- package/dist/components/page-calendar/event-pill.d.ts +0 -9
- package/dist/components/page-calendar/event-pill.d.ts.map +0 -1
- package/dist/components/page-calendar/index.d.ts +0 -4
- package/dist/components/page-calendar/index.d.ts.map +0 -1
- package/dist/components/page-calendar/month-view.d.ts +0 -11
- package/dist/components/page-calendar/month-view.d.ts.map +0 -1
- package/dist/components/page-calendar/page-calendar.d.ts +0 -18
- package/dist/components/page-calendar/page-calendar.d.ts.map +0 -1
- package/dist/components/page-calendar/page-calendar.types.d.ts +0 -18
- package/dist/components/page-calendar/page-calendar.types.d.ts.map +0 -1
- package/dist/components/page-calendar/page-calendar.utils.d.ts +0 -24
- package/dist/components/page-calendar/page-calendar.utils.d.ts.map +0 -1
- package/dist/components/page-calendar/week-view.d.ts +0 -11
- package/dist/components/page-calendar/week-view.d.ts.map +0 -1
- package/dist/components/table/filter.d.ts +0 -42
- package/dist/components/table/filter.d.ts.map +0 -1
- package/dist/components/table/group.d.ts +0 -17
- package/dist/components/table/group.d.ts.map +0 -1
- package/dist/components/table/index.d.ts +0 -20
- package/dist/components/table/index.d.ts.map +0 -1
- package/dist/components/table/inner-table.d.ts +0 -29
- package/dist/components/table/inner-table.d.ts.map +0 -1
- package/dist/components/table/metadata.d.ts +0 -4
- package/dist/components/table/metadata.d.ts.map +0 -1
- package/dist/components/table/pagination.d.ts +0 -3
- package/dist/components/table/pagination.d.ts.map +0 -1
- package/dist/components/table/row.d.ts +0 -12
- package/dist/components/table/row.d.ts.map +0 -1
- package/dist/components/table/sort.d.ts +0 -28
- package/dist/components/table/sort.d.ts.map +0 -1
- package/dist/components/table/table-lib.d.ts +0 -135
- package/dist/components/table/table-lib.d.ts.map +0 -1
- package/dist/components/table/table.context.d.ts +0 -10
- package/dist/components/table/table.context.d.ts.map +0 -1
- package/dist/components/table/thead.d.ts +0 -9
- package/dist/components/table/thead.d.ts.map +0 -1
- package/dist/config/context.d.ts +0 -21
- package/dist/config/context.d.ts.map +0 -1
- package/dist/config/default-translations.d.ts +0 -90
- package/dist/config/default-translations.d.ts.map +0 -1
- package/dist/config/default-tweaks.d.ts +0 -13
- package/dist/config/default-tweaks.d.ts.map +0 -1
- package/dist/constants.d.ts +0 -3
- package/dist/constants.d.ts.map +0 -1
- package/dist/context-BFXNJVn2.js.map +0 -1
- package/dist/date-picker-DwNo22lx.js.map +0 -1
- package/dist/dom-Dl8XH0CK.js.map +0 -1
- package/dist/file-upload-Brf2NkLr.js.map +0 -1
- package/dist/floating-ui.react-QNHG9W4N.js.map +0 -1
- package/dist/fns-D2eyJKd5.js.map +0 -1
- package/dist/hooks/use-click-outside.d.ts +0 -3
- package/dist/hooks/use-click-outside.d.ts.map +0 -1
- package/dist/hooks/use-color-parser.d.ts +0 -2
- package/dist/hooks/use-color-parser.d.ts.map +0 -1
- package/dist/hooks/use-components-provider.d.ts +0 -15
- package/dist/hooks/use-components-provider.d.ts.map +0 -1
- package/dist/hooks/use-debounce.d.ts +0 -5
- package/dist/hooks/use-debounce.d.ts.map +0 -1
- package/dist/hooks/use-floating-ref.d.ts +0 -2
- package/dist/hooks/use-floating-ref.d.ts.map +0 -1
- package/dist/hooks/use-form.d.ts +0 -394
- package/dist/hooks/use-form.d.ts.map +0 -1
- package/dist/hooks/use-hover.d.ts +0 -3
- package/dist/hooks/use-hover.d.ts.map +0 -1
- package/dist/hooks/use-input-id.d.ts +0 -4
- package/dist/hooks/use-input-id.d.ts.map +0 -1
- package/dist/hooks/use-is-coarse-device.d.ts +0 -2
- package/dist/hooks/use-is-coarse-device.d.ts.map +0 -1
- package/dist/hooks/use-locale.d.ts +0 -3
- package/dist/hooks/use-locale.d.ts.map +0 -1
- package/dist/hooks/use-media-query.d.ts +0 -2
- package/dist/hooks/use-media-query.d.ts.map +0 -1
- package/dist/hooks/use-on-event.d.ts +0 -4
- package/dist/hooks/use-on-event.d.ts.map +0 -1
- package/dist/hooks/use-parent.d.ts +0 -3
- package/dist/hooks/use-parent.d.ts.map +0 -1
- package/dist/hooks/use-preferences.d.ts +0 -2
- package/dist/hooks/use-preferences.d.ts.map +0 -1
- package/dist/hooks/use-previous.d.ts +0 -2
- package/dist/hooks/use-previous.d.ts.map +0 -1
- package/dist/hooks/use-reactive.d.ts +0 -2
- package/dist/hooks/use-reactive.d.ts.map +0 -1
- package/dist/hooks/use-remove-scroll.d.ts +0 -4
- package/dist/hooks/use-remove-scroll.d.ts.map +0 -1
- package/dist/hooks/use-resize-observer.d.ts +0 -2
- package/dist/hooks/use-resize-observer.d.ts.map +0 -1
- package/dist/hooks/use-stable-ref.d.ts +0 -2
- package/dist/hooks/use-stable-ref.d.ts.map +0 -1
- package/dist/hooks/use-swipe.d.ts +0 -8
- package/dist/hooks/use-swipe.d.ts.map +0 -1
- package/dist/hooks/use-translations.d.ts +0 -88
- package/dist/hooks/use-translations.d.ts.map +0 -1
- package/dist/hooks/use-tweaks.d.ts +0 -3
- package/dist/hooks/use-tweaks.d.ts.map +0 -1
- package/dist/hooks/use-window-size.d.ts +0 -5
- package/dist/hooks/use-window-size.d.ts.map +0 -1
- package/dist/index-BelDtX5M.js.map +0 -1
- package/dist/index-DJSMaZR4.js.map +0 -1
- package/dist/index-Z-fZHxfJ.js +0 -335
- package/dist/index-Z-fZHxfJ.js.map +0 -1
- package/dist/index.d.ts +0 -22
- package/dist/index.d.ts.map +0 -1
- package/dist/input-CrGrSnUt.js.map +0 -1
- package/dist/input-field-5vYcz5tT.js.map +0 -1
- package/dist/lib/combi-keys.d.ts +0 -15
- package/dist/lib/combi-keys.d.ts.map +0 -1
- package/dist/lib/dict.d.ts +0 -12
- package/dist/lib/dict.d.ts.map +0 -1
- package/dist/lib/dom.d.ts +0 -19
- package/dist/lib/dom.d.ts.map +0 -1
- package/dist/lib/fns.d.ts +0 -11
- package/dist/lib/fns.d.ts.map +0 -1
- package/dist/lib/fzf.d.ts +0 -16
- package/dist/lib/fzf.d.ts.map +0 -1
- package/dist/lib/keyboard-area.d.ts +0 -16
- package/dist/lib/keyboard-area.d.ts.map +0 -1
- package/dist/notifications-cUdVPs-B.js +0 -2786
- package/dist/notifications-cUdVPs-B.js.map +0 -1
- package/dist/skeleton-D75GFBV6.js +0 -10
- package/dist/skeleton-D75GFBV6.js.map +0 -1
- package/dist/tabs-S00a8qq8.js +0 -106
- package/dist/tabs-S00a8qq8.js.map +0 -1
- package/dist/types.d.ts +0 -26
- package/dist/types.d.ts.map +0 -1
- package/dist/use-translations-BwLKTrZv.js +0 -10
- package/dist/use-translations-BwLKTrZv.js.map +0 -1
package/ai/docs/Input.md
CHANGED
|
@@ -21,60 +21,60 @@ import { Input } from "@g4rcez/components/input";
|
|
|
21
21
|
|
|
22
22
|
`Input` extends all standard HTML `<input>` attributes plus `InputField` layout props:
|
|
23
23
|
|
|
24
|
-
| Prop
|
|
25
|
-
|
|
26
|
-
| `mask`
|
|
27
|
-
| `locale`
|
|
28
|
-
| `currency`
|
|
29
|
-
| `error`
|
|
30
|
-
| `title`
|
|
31
|
-
| `feedback`
|
|
32
|
-
| `left`
|
|
33
|
-
| `right`
|
|
34
|
-
| `required`
|
|
35
|
-
| `disabled`
|
|
36
|
-
| `loading`
|
|
37
|
-
| `container`
|
|
38
|
-
| `labelClassName` | `string`
|
|
39
|
-
| `next`
|
|
40
|
-
| `hiddenLabel`
|
|
41
|
-
| `...props`
|
|
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
42
|
|
|
43
43
|
### Mask patterns
|
|
44
44
|
|
|
45
|
-
| Pattern char | Matches
|
|
46
|
-
|
|
47
|
-
| `9`
|
|
48
|
-
| `A`
|
|
49
|
-
| `S`
|
|
50
|
-
| `*`
|
|
45
|
+
| Pattern char | Matches |
|
|
46
|
+
| ------------ | ----------------- |
|
|
47
|
+
| `9` | Digit (0–9) |
|
|
48
|
+
| `A` | Letter (a–z, A–Z) |
|
|
49
|
+
| `S` | Alphanumeric |
|
|
50
|
+
| `*` | Any character |
|
|
51
51
|
|
|
52
52
|
### Special mask strings
|
|
53
53
|
|
|
54
|
-
| Value
|
|
55
|
-
|
|
56
|
-
| `"currency"`
|
|
57
|
-
| `"percentage"` | Percentage input with `%` symbol
|
|
58
|
-
| `"decimal"`
|
|
54
|
+
| Value | Description |
|
|
55
|
+
| -------------- | ------------------------------------------------------ |
|
|
56
|
+
| `"currency"` | Currency formatting (requires `locale` and `currency`) |
|
|
57
|
+
| `"percentage"` | Percentage input with `%` symbol |
|
|
58
|
+
| `"decimal"` | Decimal number formatting |
|
|
59
59
|
|
|
60
60
|
## Design Tokens
|
|
61
61
|
|
|
62
62
|
Tokens this component reads. Customize by overriding these CSS variables in your theme.
|
|
63
63
|
|
|
64
|
-
| Token
|
|
65
|
-
|
|
66
|
-
| `h-input-height`
|
|
67
|
-
| `px-input-x`
|
|
68
|
-
| `py-input-y`
|
|
69
|
-
| `mt-input-gap`
|
|
70
|
-
| `border-input-border`
|
|
71
|
-
| `text-field-label`
|
|
72
|
-
| `text-foreground`
|
|
73
|
-
| `text-primary`
|
|
74
|
-
| `text-danger`
|
|
75
|
-
| `text-disabled`
|
|
76
|
-
| `placeholder-input-mask`
|
|
77
|
-
| `placeholder-input-mask-error` | `--input-mask-error` | Placeholder color in error state
|
|
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
78
|
|
|
79
79
|
## Examples
|
|
80
80
|
|
|
@@ -83,47 +83,27 @@ Tokens this component reads. Customize by overriding these CSS variables in your
|
|
|
83
83
|
```tsx
|
|
84
84
|
import { Input } from "@g4rcez/components/input";
|
|
85
85
|
|
|
86
|
-
<Input name="name" title="Full name" placeholder="Jane Smith" required
|
|
86
|
+
<Input name="name" title="Full name" placeholder="Jane Smith" required />;
|
|
87
87
|
```
|
|
88
88
|
|
|
89
89
|
### Phone number mask
|
|
90
90
|
|
|
91
91
|
```tsx
|
|
92
|
-
<Input
|
|
93
|
-
name="phone"
|
|
94
|
-
title="Phone"
|
|
95
|
-
mask="(99) 99999-9999"
|
|
96
|
-
placeholder="(00) 00000-0000"
|
|
97
|
-
/>
|
|
92
|
+
<Input name="phone" title="Phone" mask="(99) 99999-9999" placeholder="(00) 00000-0000" />
|
|
98
93
|
```
|
|
99
94
|
|
|
100
95
|
### Currency input
|
|
101
96
|
|
|
102
97
|
```tsx
|
|
103
|
-
<Input
|
|
104
|
-
name="price"
|
|
105
|
-
title="Price"
|
|
106
|
-
mask="currency"
|
|
107
|
-
currency="USD"
|
|
108
|
-
locale="en-US"
|
|
109
|
-
placeholder="0.00"
|
|
110
|
-
/>
|
|
98
|
+
<Input name="price" title="Price" mask="currency" currency="USD" locale="en-US" placeholder="0.00" />
|
|
111
99
|
```
|
|
112
100
|
|
|
113
101
|
### Dynamic mask (CPF / CNPJ)
|
|
114
102
|
|
|
115
103
|
```tsx
|
|
116
|
-
const docMask = (value: string) =>
|
|
117
|
-
value.replace(/\D/g, "").length <= 11
|
|
118
|
-
? "999.999.999-99"
|
|
119
|
-
: "99.999.999/9999-99";
|
|
104
|
+
const docMask = (value: string) => (value.replace(/\D/g, "").length <= 11 ? "999.999.999-99" : "99.999.999/9999-99");
|
|
120
105
|
|
|
121
|
-
<Input
|
|
122
|
-
name="document"
|
|
123
|
-
title="CPF or CNPJ"
|
|
124
|
-
mask={docMask}
|
|
125
|
-
placeholder="000.000.000-00"
|
|
126
|
-
/>
|
|
106
|
+
<Input name="document" title="CPF or CNPJ" mask={docMask} placeholder="000.000.000-00" />;
|
|
127
107
|
```
|
|
128
108
|
|
|
129
109
|
### Input with inline left/right slots
|
|
@@ -131,31 +111,24 @@ const docMask = (value: string) =>
|
|
|
131
111
|
```tsx
|
|
132
112
|
import { MagnifyingGlassIcon } from "@phosphor-icons/react";
|
|
133
113
|
|
|
134
|
-
<Input
|
|
135
|
-
name="search"
|
|
136
|
-
title="Search"
|
|
137
|
-
left={<MagnifyingGlassIcon size={16} className="text-muted-foreground" />}
|
|
138
|
-
placeholder="Type to search..."
|
|
139
|
-
/>
|
|
114
|
+
<Input name="search" title="Search" left={<MagnifyingGlassIcon size={16} className="text-muted-foreground" />} placeholder="Type to search..." />;
|
|
140
115
|
```
|
|
141
116
|
|
|
142
117
|
### Input with error and feedback
|
|
143
118
|
|
|
144
119
|
```tsx
|
|
145
120
|
const [email, setEmail] = useState("");
|
|
146
|
-
const error = email && !/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(email)
|
|
147
|
-
? "Enter a valid email address"
|
|
148
|
-
: undefined;
|
|
121
|
+
const error = email && !/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(email) ? "Enter a valid email address" : undefined;
|
|
149
122
|
|
|
150
123
|
<Input
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
124
|
+
name="email"
|
|
125
|
+
type="email"
|
|
126
|
+
title="Email"
|
|
127
|
+
value={email}
|
|
128
|
+
onChange={(e) => setEmail(e.target.value)}
|
|
129
|
+
error={error}
|
|
130
|
+
feedback={!error && email ? "Looks good!" : undefined}
|
|
131
|
+
/>;
|
|
159
132
|
```
|
|
160
133
|
|
|
161
134
|
### Enter-to-advance between fields
|
|
@@ -182,19 +155,21 @@ import { Form } from "@g4rcez/components/form";
|
|
|
182
155
|
import { Button } from "@g4rcez/components/button";
|
|
183
156
|
|
|
184
157
|
function SignUpForm() {
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
158
|
+
const handleSubmit = (e: React.FormEvent<HTMLFormElement>) => {
|
|
159
|
+
const data = new FormData(e.currentTarget);
|
|
160
|
+
console.log(Object.fromEntries(data));
|
|
161
|
+
};
|
|
162
|
+
|
|
163
|
+
return (
|
|
164
|
+
<Form onSubmit={handleSubmit} className="flex flex-col gap-base max-w-md">
|
|
165
|
+
<Input name="name" title="Full name" required />
|
|
166
|
+
<Input name="email" type="email" title="Email" required />
|
|
167
|
+
<Input name="phone" title="Phone" mask="(99) 99999-9999" />
|
|
168
|
+
<Button theme="primary" type="submit">
|
|
169
|
+
Sign up
|
|
170
|
+
</Button>
|
|
171
|
+
</Form>
|
|
172
|
+
);
|
|
198
173
|
}
|
|
199
174
|
```
|
|
200
175
|
|
package/ai/docs/InputField.md
CHANGED
|
@@ -19,40 +19,40 @@ import { InputField } from "@g4rcez/components";
|
|
|
19
19
|
|
|
20
20
|
## Props
|
|
21
21
|
|
|
22
|
-
| Prop
|
|
23
|
-
|
|
24
|
-
| `title`
|
|
25
|
-
| `info`
|
|
26
|
-
| `error`
|
|
27
|
-
| `feedback`
|
|
28
|
-
| `left`
|
|
29
|
-
| `right`
|
|
30
|
-
| `rightLabel`
|
|
31
|
-
| `required`
|
|
32
|
-
| `optionalText`
|
|
33
|
-
| `disabled`
|
|
34
|
-
| `interactive`
|
|
35
|
-
| `container`
|
|
36
|
-
| `labelClassName` | `string`
|
|
37
|
-
| `hiddenLabel`
|
|
38
|
-
| `reportStatus`
|
|
39
|
-
| `componentName`
|
|
40
|
-
| `id`
|
|
41
|
-
| `name`
|
|
42
|
-
| `children`
|
|
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
43
|
|
|
44
44
|
## Design Tokens
|
|
45
45
|
|
|
46
46
|
Tokens this component reads. Customize by overriding these CSS variables in your theme.
|
|
47
47
|
|
|
48
|
-
| Token
|
|
49
|
-
|
|
50
|
-
| `border-input-border` | `--input-border` | Default field border color
|
|
51
|
-
| `text-field-label`
|
|
52
|
-
| `text-primary`
|
|
53
|
-
| `text-danger`
|
|
54
|
-
| `text-disabled`
|
|
55
|
-
| `mt-input-gap`
|
|
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
56
|
|
|
57
57
|
## Examples
|
|
58
58
|
|
|
@@ -62,12 +62,8 @@ Tokens this component reads. Customize by overriding these CSS variables in your
|
|
|
62
62
|
import { InputField } from "@g4rcez/components";
|
|
63
63
|
|
|
64
64
|
<InputField title="Username" name="username" required>
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
name="username"
|
|
68
|
-
className="h-input-height w-full flex-1 bg-transparent px-input-x text-foreground outline-none"
|
|
69
|
-
/>
|
|
70
|
-
</InputField>
|
|
65
|
+
<input id="username" name="username" className="h-input-height w-full flex-1 bg-transparent px-input-x text-foreground outline-none" />
|
|
66
|
+
</InputField>;
|
|
71
67
|
```
|
|
72
68
|
|
|
73
69
|
### With info tooltip and error
|
|
@@ -76,47 +72,51 @@ import { InputField } from "@g4rcez/components";
|
|
|
76
72
|
import { MagnifyingGlassIcon, CheckIcon } from "@phosphor-icons/react";
|
|
77
73
|
|
|
78
74
|
<InputField
|
|
79
|
-
|
|
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"
|
|
75
|
+
title="API Key"
|
|
89
76
|
name="api_key"
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
77
|
+
info="Your secret API key from the developer portal."
|
|
78
|
+
error={apiKeyError}
|
|
79
|
+
left={<MagnifyingGlassIcon size={16} className="text-muted-foreground" />}
|
|
80
|
+
right={isValid ? <CheckIcon size={16} className="text-success" /> : null}
|
|
81
|
+
required
|
|
82
|
+
>
|
|
83
|
+
<input
|
|
84
|
+
id="api_key"
|
|
85
|
+
name="api_key"
|
|
86
|
+
type="password"
|
|
87
|
+
className="h-input-height w-full flex-1 bg-transparent px-input-x text-foreground outline-none"
|
|
88
|
+
/>
|
|
89
|
+
</InputField>;
|
|
94
90
|
```
|
|
95
91
|
|
|
96
92
|
### Optional vs required
|
|
97
93
|
|
|
98
94
|
```tsx
|
|
99
|
-
{
|
|
95
|
+
{
|
|
96
|
+
/* Required — "Optional" badge is hidden */
|
|
97
|
+
}
|
|
100
98
|
<InputField title="Email" name="email" required>
|
|
101
|
-
|
|
102
|
-
</InputField
|
|
99
|
+
<input id="email" name="email" type="email" className="h-input-height w-full flex-1 bg-transparent px-input-x text-foreground outline-none" />
|
|
100
|
+
</InputField>;
|
|
103
101
|
|
|
104
|
-
{
|
|
102
|
+
{
|
|
103
|
+
/* Optional — shows "Optional" badge */
|
|
104
|
+
}
|
|
105
105
|
<InputField title="Website" name="website">
|
|
106
|
-
|
|
107
|
-
</InputField
|
|
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
108
|
```
|
|
109
109
|
|
|
110
110
|
### Hidden label (accessible)
|
|
111
111
|
|
|
112
112
|
```tsx
|
|
113
113
|
<InputField title="Search" name="search" hiddenLabel>
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
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
120
|
</InputField>
|
|
121
121
|
```
|
|
122
122
|
|
|
@@ -124,13 +124,13 @@ import { MagnifyingGlassIcon, CheckIcon } from "@phosphor-icons/react";
|
|
|
124
124
|
|
|
125
125
|
```tsx
|
|
126
126
|
<InputField
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
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
132
|
>
|
|
133
|
-
|
|
133
|
+
<input id="slug" name="slug" className="h-input-height w-full flex-1 bg-transparent px-input-x text-foreground outline-none" />
|
|
134
134
|
</InputField>
|
|
135
135
|
```
|
|
136
136
|
|