@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,6 +1,6 @@
|
|
|
1
|
-
import { Fragment as
|
|
2
|
-
import { jsxs as
|
|
3
|
-
const
|
|
1
|
+
import { Fragment as h, createContext as C, useContext as y } from "react";
|
|
2
|
+
import { jsxs as T } from "react/jsx-runtime";
|
|
3
|
+
const $ = {
|
|
4
4
|
hex: (e) => e,
|
|
5
5
|
raw: (e) => e,
|
|
6
6
|
hsl: (e) => `hsl(${e})`,
|
|
@@ -17,7 +17,7 @@ const y = {
|
|
|
17
17
|
return l.concat(t(n, u, s));
|
|
18
18
|
}
|
|
19
19
|
return l.concat(i(n, t, a, s));
|
|
20
|
-
}, []),
|
|
20
|
+
}, []), F = (e, t, a = "", r = "") => Object.entries(e).reduce((l, [o, n]) => {
|
|
21
21
|
const s = r === "" ? `${a}${o}` : `${r}-${o}`;
|
|
22
22
|
if (typeof n == "string") {
|
|
23
23
|
const u = r === "" ? `${a}${o}` : o;
|
|
@@ -25,7 +25,7 @@ const y = {
|
|
|
25
25
|
}
|
|
26
26
|
return {
|
|
27
27
|
...l,
|
|
28
|
-
[o]:
|
|
28
|
+
[o]: F(n, t, a, s)
|
|
29
29
|
};
|
|
30
30
|
}, {}), p = {
|
|
31
31
|
default: (e) => `:root { ${e} }`,
|
|
@@ -33,22 +33,22 @@ const y = {
|
|
|
33
33
|
}, c = (e, t) => {
|
|
34
34
|
const a = t.value || ((l, o) => o), r = e.map((l) => `${l.key}: ${a(l.key, l.value)}`).join(";");
|
|
35
35
|
return t.result(r);
|
|
36
|
-
},
|
|
36
|
+
}, w = {
|
|
37
37
|
default: (e) => c(e, { result: p.default }),
|
|
38
38
|
dark: (e) => c(e, { result: p.dark })
|
|
39
39
|
}, d = (e) => (t, a, r) => {
|
|
40
40
|
const l = { key: `--${r}`, value: `${t}` };
|
|
41
41
|
return e ? e(l) : l;
|
|
42
|
-
},
|
|
43
|
-
const a = i(e.colors, d(t?.colors)), r = i(e.spacing, d(t?.spacing)), l = i(e.rounded, d(t?.rounded)), o = i(e.shadow, d(t?.rounded)), n = i(e.zIndex, d(t?.zIndex ??
|
|
42
|
+
}, m = (e) => ({ key: e.key.replace(/^--/, "--z-"), value: e.value }), b = (e, t) => {
|
|
43
|
+
const a = i(e.colors, d(t?.colors)), r = i(e.spacing, d(t?.spacing)), l = i(e.rounded, d(t?.rounded)), o = i(e.shadow, d(t?.rounded)), n = i(e.zIndex, d(t?.zIndex ?? m)), s = e.custom ? i(e.custom, d(t?.customTokens)) : [];
|
|
44
44
|
return a.concat(r, l, s, n, o);
|
|
45
|
-
},
|
|
45
|
+
}, P = (e, t) => c(b(e), {
|
|
46
46
|
result: (a) => `html${t ? `.${t}` : ""} {${a}}`,
|
|
47
47
|
value: (a, r) => r.replace("hsla(", "").replace(")", "")
|
|
48
|
-
}),
|
|
48
|
+
}), L = (e, t) => b(e, t).reduce((r, l) => ({ ...r, [l.key]: l.value }), {}), D = (e, t) => c(b(e, t), {
|
|
49
49
|
result: (a) => `html${t?.name ? `.${t.name}` : ""} {${a}}`,
|
|
50
50
|
value: (a, r) => r
|
|
51
|
-
}),
|
|
51
|
+
}), g = {
|
|
52
52
|
autocompleteEmpty: "Nothing here...",
|
|
53
53
|
calendarBackMonth: "Back month",
|
|
54
54
|
calendarFromDate: "From",
|
|
@@ -108,7 +108,7 @@ const y = {
|
|
|
108
108
|
tableFilterValueTitle: "Value",
|
|
109
109
|
tableGroupLabel: "Group",
|
|
110
110
|
tableGroupLabelWithCount: "Group",
|
|
111
|
-
tablePaginationFooter: (e) => /* @__PURE__ */
|
|
111
|
+
tablePaginationFooter: (e) => /* @__PURE__ */ T(h, { children: [
|
|
112
112
|
e.current,
|
|
113
113
|
" to ",
|
|
114
114
|
e.pages,
|
|
@@ -135,27 +135,35 @@ const y = {
|
|
|
135
135
|
uploadIdleButton: "Choose your files",
|
|
136
136
|
uploadDragging: (e) => `Dragging ${e.n} ${e.n > 0 ? "files" : "file"}`,
|
|
137
137
|
uploadDialogTitle: "Details of your file",
|
|
138
|
-
datepickerPlaceholder: (e) => "day/month/year"
|
|
139
|
-
|
|
138
|
+
datepickerPlaceholder: (e) => "day/month/year",
|
|
139
|
+
spinnerLoading: "Loading",
|
|
140
|
+
skeletonLoading: "Loading content",
|
|
141
|
+
closeButton: "Close",
|
|
142
|
+
fileUploadZoneLabel: "File upload area. Drag files here or press Enter to browse."
|
|
143
|
+
}, v = {
|
|
140
144
|
input: { iconFeedback: !0 },
|
|
141
145
|
table: { operations: !0, sorters: !0, filters: !0, sticky: void 0 }
|
|
142
|
-
},
|
|
143
|
-
parser:
|
|
144
|
-
tweaks:
|
|
146
|
+
}, k = C({
|
|
147
|
+
parser: $.hsla,
|
|
148
|
+
tweaks: v,
|
|
145
149
|
floatingRef: void 0,
|
|
146
|
-
map:
|
|
150
|
+
map: g,
|
|
147
151
|
locale: void 0
|
|
148
|
-
})
|
|
152
|
+
}), N = () => {
|
|
153
|
+
const e = y(k);
|
|
154
|
+
return e ? e.map : g;
|
|
155
|
+
};
|
|
149
156
|
export {
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
f,
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
i as r
|
|
157
|
+
k as C,
|
|
158
|
+
v as a,
|
|
159
|
+
w as b,
|
|
160
|
+
F as c,
|
|
161
|
+
g as d,
|
|
162
|
+
P as e,
|
|
163
|
+
L as f,
|
|
164
|
+
D as g,
|
|
165
|
+
$ as p,
|
|
166
|
+
i as r,
|
|
167
|
+
N as u
|
|
160
168
|
};
|
|
161
|
-
//# sourceMappingURL=
|
|
169
|
+
//# sourceMappingURL=use-translations-DSltA7H_.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-translations-DSltA7H_.js","sources":["../src/styles/design-tokens.ts","../src/config/default-translations.tsx","../src/config/default-tweaks.ts","../src/config/context.ts","../src/hooks/use-translations.ts"],"sourcesContent":["import { CSSProperties } from \"react\";\nimport { DesignTokens, DesignTokensBuilder, DesignTokensParser, GeneralTokens, Token } from \"./theme.types\";\n\nexport const parsers = {\n hex: (v: string) => v,\n raw: (v: string) => v,\n hsl: (v: string) => `hsl(${v})` as const,\n rgb: (v: string) => `rgb(${v})` as const,\n z: (_, __, k) => `var(--z-${k})` as const,\n hsla: (v: string) => `hsla(${v})` as const,\n rgba: (v: string) => `rgba(${v})` as const,\n cssVariable: (_, __, k) => `var(--${k})` as const,\n formatWithVar: (format: string) => (_: string, __: string, v: string) => `${format}(var(--${v}), <alpha-value>)` as const,\n} satisfies Record<string, DesignTokensParser>;\n\nexport const reduceTokens = <T extends GeneralTokens>(colors: T, parse: DesignTokensBuilder, prefix: string = \"\", append: string = \"\"): Token[] =>\n Object.entries(colors).reduce<Token[]>((acc, [key, value]) => {\n const combine = append === \"\" ? `${prefix}${key}` : `${append}-${key}`;\n if (typeof value === \"string\") {\n const k = append === \"\" ? `${prefix}${key}` : key;\n return acc.concat(parse(value, k, combine));\n }\n return acc.concat(reduceTokens(value, parse, prefix, combine));\n }, []);\n\nexport const createDesignTokens = <T extends GeneralTokens, Fn extends DesignTokensParser>(\n colors: T,\n parse: Fn,\n prefix: string = \"\",\n append: string = \"\"\n): T =>\n Object.entries(colors).reduce<T>((acc, [key, value]) => {\n const combine = append === \"\" ? `${prefix}${key}` : `${append}-${key}`;\n if (typeof value === \"string\") {\n const k = append === \"\" ? `${prefix}${key}` : key;\n return { ...acc, [k]: parse(value, key, combine) };\n }\n return {\n ...acc,\n [key]: createDesignTokens(value, parse, prefix, combine),\n };\n }, {} as T);\n\nconst modifiers = {\n default: (variables: string) => `:root { ${variables} }`,\n dark: (variables: string) => `html.dark {${variables}}`,\n};\n\nconst createStyleContent = (\n tokens: Token[],\n modifiers: {\n result: (str: string) => string;\n value?: (k: string, v: string) => string;\n }\n) => {\n const v = modifiers.value || ((_: string, s: string) => s);\n const content = tokens.map((token) => `${token.key}: ${v(token.key, token.value)}`).join(\";\");\n return modifiers.result(content);\n};\n\nexport const createStyles = {\n default: (tokens: Token[]) => createStyleContent(tokens, { result: modifiers.default }),\n dark: (tokens: Token[]) => createStyleContent(tokens, { result: modifiers.dark }),\n};\n\ntype TokenParsersType = \"colors\" | \"spacing\" | \"rounded\" | \"customTokens\" | \"zIndex\";\n\ntype TokenCustomParser = (t: Token) => Token;\n\nexport type TokenRemap = Partial<Record<TokenParsersType, TokenCustomParser> & { name: string }>;\n\nconst fn =\n (p?: TokenCustomParser): DesignTokensBuilder =>\n (value, _, key) => {\n const r = { key: `--${key}`, value: `${value}` };\n return p ? p(r) : r;\n };\n\nconst zIndexParser = (t: Token): Token => ({ key: t.key.replace(/^--/, \"--z-\"), value: t.value });\n\nconst createTokens = (theme: DesignTokens, map?: TokenRemap) => {\n const colors = reduceTokens(theme.colors, fn(map?.colors));\n const spacing = reduceTokens(theme.spacing, fn(map?.spacing));\n const rounded = reduceTokens(theme.rounded, fn(map?.rounded));\n const shadow = reduceTokens(theme.shadow, fn(map?.rounded));\n const zIndex = reduceTokens(theme.zIndex, fn(map?.zIndex ?? zIndexParser));\n const customTokens = theme.custom ? reduceTokens(theme.custom, fn(map?.customTokens)) : [];\n return colors.concat(spacing, rounded, customTokens, zIndex, shadow);\n};\n\nexport const createTheme = (theme: DesignTokens, name?: string) =>\n createStyleContent(createTokens(theme), {\n result: (variables: string) => `html${name ? `.${name}` : \"\"} {${variables}}`,\n value: (_, v) => v.replace(\"hsla(\", \"\").replace(\")\", \"\"),\n });\n\nexport const createCssProperties = (theme: DesignTokens, map?: TokenRemap): CSSProperties => {\n const tokens = createTokens(theme, map);\n return tokens.reduce<CSSProperties>((acc, el) => ({ ...acc, [el.key]: el.value }), {});\n};\n\nexport const createTokenStyles = (theme: DesignTokens, map?: TokenRemap) =>\n createStyleContent(createTokens(theme, map), {\n result: (variables: string) => `html${map?.name ? `.${map.name}` : \"\"} {${variables}}`,\n value: (_, v) => v,\n });\n","import React, { Fragment } from \"react\";\n\nexport const defaultTranslations = {\n autocompleteEmpty: \"Nothing here...\",\n calendarBackMonth: \"Back month\",\n calendarFromDate: \"From\",\n calendarMonthLabel: \"Month\",\n calendarNextMonth: \"Next month\",\n calendarDatetimeTitle: \"Time\",\n calendarToDate: \"To\",\n calendarToday: \"Today\",\n pageCalendarMonthView: \"Month view\",\n pageCalendarWeekView: \"Week view\",\n pageCalendarDayView: \"Day view\",\n pageCalendarPrevious: \"Previous\",\n pageCalendarNext: \"Next\",\n pageCalendarToday: \"Today\",\n pageCalendarAddEvent: \"Add event\",\n pageCalendarWeekLabel: (n: number) => `Week ${n}`,\n pageCalendarFilter: \"Filter:\",\n pageCalendarMoreEvents: (n: number) => `+${n} more...`,\n pageCalendarLabel: \"Calendar\",\n pageCalendarNavigation: \"Calendar navigation\",\n pageCalendarMonthGrid: \"Calendar month\",\n pageCalendarFilterEnabled: \"enabled\",\n pageCalendarFilterDisabled: \"disabled\",\n pageCalendarEventCount: (n: number) => (n === 1 ? \"1 event\" : `${n} events`),\n pageCalendarEventAt: (title: string, time: string) => `${title} at ${time}`,\n commandPaletteEmpty: \"Nothing here...\",\n commandPaletteLoading: \"Loading...\",\n datePickerCalendarButtonLabel: \"Click to open a date picker\",\n emptyDataMessage: \"No data\",\n inputCaretDown: \"Click to see all options\",\n inputCloseValue: \"Click to clear the value\",\n inputOptionalLabel: \"Optional\",\n wizardNext: \"Next\",\n wizardPrev: \"Previous\",\n wizardFinish: \"Finish\",\n wizardSkip: \"Skip\",\n multiSelectInnerPlaceholder: \"Search...\",\n multiSelectSelectedLabel: \"Selected\",\n tableColumnResizer: \"Resize column\",\n tableFilterColumnPlaceholder: \"Filter by\",\n tableFilterColumnTitle: \"Filter by\",\n tableFilterDropdownTitle: \"Filters\",\n tableFilterDropdownTitleUnique: \"Filter by\",\n tableFilterLabel: \"Filters\",\n tableFilterNewFilter: \"New filter\",\n tableFilterOperatorPlaceholder: \"Equals to...\",\n tableFilterOperatorTitle: \"Operation\",\n tableFilterTypeContains: \"Contains\",\n tableFilterTypeEndsWith: \"Ends with\",\n tableFilterTypeGreaterThan: \"Greater than\",\n tableFilterTypeIs: \"Is\",\n tableFilterTypeIsNot: \"Is not\",\n tableFilterTypeLessThan: \"Less than\",\n tableFilterTypeNotContains: \"Not contains\",\n tableFilterTypeStartsWith: \"Starts with\",\n tableFilterValuePlaceholder: \"Something...\",\n tableFilterValueTitle: \"Value\",\n tableGroupLabel: \"Group\",\n tableGroupLabelWithCount: \"Group\",\n tablePaginationFooter: (pagination: { pages: number; totalItems: number; sizes?: number[]; current: number; select: React.ReactNode }) => (\n <Fragment>\n {pagination.current} to {pagination.pages} of {pagination.totalItems} items.{Array.isArray(pagination.sizes) ? pagination.select : null}{\" \"}\n per page.\n </Fragment>\n ),\n tablePaginationNext: \"Next\",\n tablePaginationPrevious: \"Previous\",\n tablePaginationSelectLabel: \"Select the size of page\",\n tableSortAddButton: \"Add sort\",\n tableSortAsc: \"Ascending\",\n tableSortDesc: \"Descending\",\n tableSortDropdownTitle: \"Order by\",\n tableSortOrderByLabel: \"Order by\",\n tableSortOrderInputPlaceholder: \"Order by\",\n tableSortOrderInputTitle: \"Order by\",\n tableSortTypeInputPlaceholder: \"Ascending\",\n tableSortTypeInputTitle: \"Sort type\",\n\n uploadIdle: \"You can drag your files here\",\n uploadIdleButton: \"Choose your files\",\n uploadDragging: (props: { n: number }) => `Dragging ${props.n} ${props.n > 0 ? \"files\" : \"file\"}`,\n uploadDialogTitle: \"Details of your file\",\n\n datepickerPlaceholder: (_: string) => \"day/month/year\",\n spinnerLoading: \"Loading\",\n skeletonLoading: \"Loading content\",\n closeButton: \"Close\",\n fileUploadZoneLabel: \"File upload area. Drag files here or press Enter to browse.\",\n};\n\nexport type Translations = typeof defaultTranslations;\n","export type Tweaks = {\n table: {\n sorters: boolean;\n filters: boolean;\n operations: boolean;\n sticky: number | undefined;\n };\n input: {\n iconFeedback: boolean;\n };\n};\n\nexport const defaultTweaks: Tweaks = {\n input: { iconFeedback: true },\n table: { operations: true, sorters: true, filters: true, sticky: undefined },\n};\n","\"use client\";\nimport { createContext } from \"react\";\nimport type { IconProps } from \"@phosphor-icons/react\";\nimport type { Locales } from \"the-mask-input\";\nimport type { ContextType } from \"../hooks/use-components-provider\";\nimport { parsers } from \"../styles/design-tokens\";\nimport { defaultTranslations, type Translations } from \"./default-translations\";\nimport { defaultTweaks, type Tweaks } from \"./default-tweaks\";\n\nexport type ContextProps = Partial<{\n tweaks: Partial<Tweaks>;\n map: Partial<Translations>;\n locale: Locales | undefined;\n parser: typeof parsers.hsla;\n rootFloating?: HTMLElement | null;\n iconWeight: IconProps[\"weight\"];\n}>;\n\nexport const Context = createContext<ContextType>({\n parser: parsers.hsla,\n tweaks: defaultTweaks,\n floatingRef: undefined,\n map: defaultTranslations,\n locale: undefined as Locales | undefined,\n});\n","import { useContext } from \"react\";\nimport { Context } from \"../config/context\";\nimport { defaultTranslations } from \"../config/default-translations\";\n\nexport const useTranslations = () => {\n const ctx = useContext(Context);\n if (!ctx) return defaultTranslations;\n return ctx.map!;\n};\n"],"names":["parsers","v","_","__","k","format","reduceTokens","colors","parse","prefix","append","acc","key","value","combine","createDesignTokens","modifiers","variables","createStyleContent","tokens","s","content","token","createStyles","fn","p","r","zIndexParser","t","createTokens","theme","map","spacing","rounded","shadow","zIndex","customTokens","createTheme","name","createCssProperties","el","createTokenStyles","defaultTranslations","n","title","time","pagination","jsxs","Fragment","props","defaultTweaks","Context","createContext","useTranslations","ctx","useContext"],"mappings":";;AAGO,MAAMA,IAAU;AAAA,EACnB,KAAK,CAACC,MAAcA;AAAA,EACpB,KAAK,CAACA,MAAcA;AAAA,EACpB,KAAK,CAACA,MAAc,OAAOA,CAAC;AAAA,EAC5B,KAAK,CAACA,MAAc,OAAOA,CAAC;AAAA,EAC5B,GAAG,CAACC,GAAGC,GAAIC,MAAM,WAAWA,CAAC;AAAA,EAC7B,MAAM,CAACH,MAAc,QAAQA,CAAC;AAAA,EAC9B,MAAM,CAACA,MAAc,QAAQA,CAAC;AAAA,EAC9B,aAAa,CAACC,GAAGC,GAAIC,MAAM,SAASA,CAAC;AAAA,EACrC,eAAe,CAACC,MAAmB,CAACH,GAAWC,GAAYF,MAAc,GAAGI,CAAM,UAAUJ,CAAC;AACjG,GAEaK,IAAe,CAA0BC,GAAWC,GAA4BC,IAAiB,IAAIC,IAAiB,OAC/H,OAAO,QAAQH,CAAM,EAAE,OAAgB,CAACI,GAAK,CAACC,GAAKC,CAAK,MAAM;AAC1D,QAAMC,IAAUJ,MAAW,KAAK,GAAGD,CAAM,GAAGG,CAAG,KAAK,GAAGF,CAAM,IAAIE,CAAG;AACpE,MAAI,OAAOC,KAAU,UAAU;AAC3B,UAAMT,IAAIM,MAAW,KAAK,GAAGD,CAAM,GAAGG,CAAG,KAAKA;AAC9C,WAAOD,EAAI,OAAOH,EAAMK,GAAOT,GAAGU,CAAO,CAAC;AAAA,EAAA;AAE9C,SAAOH,EAAI,OAAOL,EAAaO,GAAOL,GAAOC,GAAQK,CAAO,CAAC;AACjE,GAAG,CAAA,CAAE,GAEIC,IAAqB,CAC9BR,GACAC,GACAC,IAAiB,IACjBC,IAAiB,OAEjB,OAAO,QAAQH,CAAM,EAAE,OAAU,CAACI,GAAK,CAACC,GAAKC,CAAK,MAAM;AACpD,QAAMC,IAAUJ,M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|
|
2
2
|
"name": "@g4rcez/components",
|
|
3
|
-
"
|
|
4
|
-
"version": "4.0.1",
|
|
5
|
-
"sideEffects": false,
|
|
3
|
+
"version": "4.1.1",
|
|
6
4
|
"private": false,
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
|
|
10
|
-
"
|
|
5
|
+
"description": "Customizable react components.",
|
|
6
|
+
"keywords": [
|
|
7
|
+
"agent-skill",
|
|
8
|
+
"ai-agents",
|
|
9
|
+
"claude-skill",
|
|
10
|
+
"components",
|
|
11
|
+
"design-system",
|
|
12
|
+
"react",
|
|
13
|
+
"skill",
|
|
14
|
+
"tailwindcss"
|
|
15
|
+
],
|
|
16
|
+
"homepage": "https://github.com/g4rcez/components#readme",
|
|
17
|
+
"bugs": {
|
|
18
|
+
"url": "https://github.com/g4rcez/components/issues"
|
|
11
19
|
},
|
|
20
|
+
"license": "MIT",
|
|
12
21
|
"author": {
|
|
13
|
-
"email": "allan.f.garcez@gmail.com",
|
|
14
22
|
"name": "Allan Garcez",
|
|
23
|
+
"email": "allan.f.garcez@gmail.com",
|
|
15
24
|
"url": "https://garcez.dev"
|
|
16
25
|
},
|
|
17
|
-
"bugs": {
|
|
18
|
-
"url": "https://github.com/g4rcez/components/issues"
|
|
19
|
-
},
|
|
20
26
|
"repository": {
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
},
|
|
24
|
-
"scripts": {
|
|
25
|
-
"watch": "vite build --watch --minify false",
|
|
26
|
-
"prepublishOnly": "npm run build",
|
|
27
|
-
"build": "rm -rf ./dist; vite build; npm run lib:types; npm run preset; npm run lib:css; cp -r ai dist",
|
|
28
|
-
"format": "npx prettier --write .",
|
|
29
|
-
"lib:css": "BUILD_LIB=true tailwind -i ./src/index.css -o ./dist/index.css --minify",
|
|
30
|
-
"lib:tailwind": "tsc -p tsconfig.tailwind.json",
|
|
31
|
-
"lib:types": "tsc -p tsconfig.lib.json",
|
|
32
|
-
"preset": "tsc -p tsconfig.styles.json && tsc -p tsconfig.tailwind.json",
|
|
33
|
-
"test": "vitest run",
|
|
34
|
-
"test:watch": "vitest watch"
|
|
35
|
-
},
|
|
36
|
-
"peerDependencies": {
|
|
37
|
-
"react": ">=18",
|
|
38
|
-
"react-dom": ">=18"
|
|
39
|
-
},
|
|
40
|
-
"dependencies": {
|
|
41
|
-
"@base-ui/react": "1.2.0",
|
|
42
|
-
"@floating-ui/react": "0.27.18",
|
|
43
|
-
"@phosphor-icons/react": "2.1.10",
|
|
44
|
-
"class-variance-authority": "0.7.1",
|
|
45
|
-
"clsx": "2.1.1",
|
|
46
|
-
"date-fns": "4.1.0",
|
|
47
|
-
"linq-arrays": "3.2.5",
|
|
48
|
-
"motion": "12.34.3",
|
|
49
|
-
"pretty-bytes": "7.1.0",
|
|
50
|
-
"qs": "6.15.0",
|
|
51
|
-
"react-dropzone": "15.0.0",
|
|
52
|
-
"react-use-measure": "2.1.7",
|
|
53
|
-
"react-virtuoso": "4.18.1",
|
|
54
|
-
"sidekicker": "0.1.10",
|
|
55
|
-
"storage-manager-js": "4.2.6-5",
|
|
56
|
-
"tailwind-merge": "3.4.0",
|
|
57
|
-
"the-mask-input": "3.3.13",
|
|
58
|
-
"use-typed-reducer": "4.3.0",
|
|
59
|
-
"zod": "3.25.67"
|
|
60
|
-
},
|
|
61
|
-
"devDependencies": {
|
|
62
|
-
"@eslint/js": "9.39.2",
|
|
63
|
-
"@tailwindcss/forms": "0.5.11",
|
|
64
|
-
"@testing-library/jest-dom": "^6.9.1",
|
|
65
|
-
"@testing-library/react": "^16.3.2",
|
|
66
|
-
"@types/node": "25.3.1",
|
|
67
|
-
"@types/qs": "6.14.0",
|
|
68
|
-
"@types/react": "19.2.14",
|
|
69
|
-
"@types/react-dom": "19.2.3",
|
|
70
|
-
"@vitejs/plugin-react": "5.1.4",
|
|
71
|
-
"eslint": "10.0.2",
|
|
72
|
-
"eslint-config-react-app": "7.0.1",
|
|
73
|
-
"eslint-plugin-jsx-a11y": "6.10.2",
|
|
74
|
-
"eslint-plugin-react-hooks": "7.0.1",
|
|
75
|
-
"eslint-plugin-react-refresh": "0.4.20",
|
|
76
|
-
"globals": "17.3.0",
|
|
77
|
-
"jsdom": "^28.1.0",
|
|
78
|
-
"postcss": "8.5.6",
|
|
79
|
-
"prettier": "3.8.1",
|
|
80
|
-
"tailwindcss": "3.4.14",
|
|
81
|
-
"tslib": "2.8.1",
|
|
82
|
-
"typescript": "5.9.3",
|
|
83
|
-
"typescript-eslint": "8.35.0",
|
|
84
|
-
"vite": "7.3.1",
|
|
85
|
-
"vite-tsconfig-paths": "6.1.1",
|
|
86
|
-
"vitest": "4.0.18"
|
|
27
|
+
"type": "git",
|
|
28
|
+
"url": "https://github.com/g4rcez/components"
|
|
87
29
|
},
|
|
88
30
|
"source": "./src/index.ts",
|
|
89
|
-
"types": "./dist/index.d.ts",
|
|
90
|
-
"main": "./dist/index.js",
|
|
91
|
-
"module": "./dist/index.js",
|
|
92
31
|
"files": [
|
|
93
32
|
"dist",
|
|
94
33
|
"dist/index.css",
|
|
95
|
-
"
|
|
34
|
+
"ai"
|
|
96
35
|
],
|
|
36
|
+
"sideEffects": false,
|
|
37
|
+
"main": "./dist/index.js",
|
|
38
|
+
"module": "./dist/index.js",
|
|
39
|
+
"types": "./dist/index.d.ts",
|
|
97
40
|
"exports": {
|
|
98
41
|
".": {
|
|
99
42
|
"types": {
|
|
@@ -152,12 +95,6 @@
|
|
|
152
95
|
"require": "./dist/components/form/form.js",
|
|
153
96
|
"default": "./dist/components/form/form.js"
|
|
154
97
|
},
|
|
155
|
-
"./transfer-list": {
|
|
156
|
-
"type": "./dist/components/form/transfer-list.d.ts",
|
|
157
|
-
"import": "./dist/components/form/transfer-list.js",
|
|
158
|
-
"require": "./dist/components/form/transfer-list.js",
|
|
159
|
-
"default": "./dist/components/form/transfer-list.js"
|
|
160
|
-
},
|
|
161
98
|
"./radiobox": {
|
|
162
99
|
"type": "./dist/components/form/radiobox.d.ts",
|
|
163
100
|
"import": "./dist/components/form/radiobox.js",
|
|
@@ -296,6 +233,82 @@
|
|
|
296
233
|
"require": "./dist/components/display/alert.js",
|
|
297
234
|
"default": "./dist/components/display/alert.js"
|
|
298
235
|
},
|
|
299
|
-
"./ai/*": "
|
|
236
|
+
"./ai/*": "./ai/*"
|
|
237
|
+
},
|
|
238
|
+
"scripts": {
|
|
239
|
+
"watch": "vite build --watch --minify false",
|
|
240
|
+
"prepublishOnly": "npm run build",
|
|
241
|
+
"build": "rm -rf ./dist; vite build; npm run lib:types; npm run preset; npm run lib:css",
|
|
242
|
+
"format": "oxfmt --write .",
|
|
243
|
+
"lint": "oxlint .",
|
|
244
|
+
"lib:css": "BUILD_LIB=true tailwind -i ./src/index.css -o ./dist/index.css --minify",
|
|
245
|
+
"lib:tailwind": "tsc -p tsconfig.tailwind.json",
|
|
246
|
+
"lib:types": "tsc -p tsconfig.lib.json",
|
|
247
|
+
"preset": "tsc -p tsconfig.styles.json && tsc -p tsconfig.tailwind.json",
|
|
248
|
+
"test": "vitest run",
|
|
249
|
+
"test:watch": "vitest watch"
|
|
250
|
+
},
|
|
251
|
+
"dependencies": {
|
|
252
|
+
"@base-ui/react": "1.2.0",
|
|
253
|
+
"@floating-ui/react": "0.27.18",
|
|
254
|
+
"@phosphor-icons/react": "2.1.10",
|
|
255
|
+
"class-variance-authority": "0.7.1",
|
|
256
|
+
"clsx": "2.1.1",
|
|
257
|
+
"date-fns": "4.1.0",
|
|
258
|
+
"linq-arrays": "3.2.5",
|
|
259
|
+
"motion": "12.34.3",
|
|
260
|
+
"pretty-bytes": "7.1.0",
|
|
261
|
+
"qs": "6.15.0",
|
|
262
|
+
"react-dropzone": "15.0.0",
|
|
263
|
+
"react-use-measure": "2.1.7",
|
|
264
|
+
"react-virtuoso": "4.18.1",
|
|
265
|
+
"sidekicker": "0.1.10",
|
|
266
|
+
"storage-manager-js": "4.2.6-5",
|
|
267
|
+
"tailwind-merge": "3.4.0",
|
|
268
|
+
"the-mask-input": "3.3.13",
|
|
269
|
+
"use-typed-reducer": "4.3.0",
|
|
270
|
+
"zod": "3.25.67"
|
|
271
|
+
},
|
|
272
|
+
"devDependencies": {
|
|
273
|
+
"@tailwindcss/forms": "0.5.11",
|
|
274
|
+
"@testing-library/jest-dom": "^6.9.1",
|
|
275
|
+
"@testing-library/react": "^16.3.2",
|
|
276
|
+
"@types/node": "25.3.1",
|
|
277
|
+
"@types/qs": "6.14.0",
|
|
278
|
+
"@types/react": "19.2.14",
|
|
279
|
+
"@types/react-dom": "19.2.3",
|
|
280
|
+
"@vitejs/plugin-react": "5.1.4",
|
|
281
|
+
"jsdom": "^28.1.0",
|
|
282
|
+
"postcss": "8.5.6",
|
|
283
|
+
"tailwindcss": "3.4.14",
|
|
284
|
+
"tslib": "2.8.1",
|
|
285
|
+
"typescript": "5.9.3",
|
|
286
|
+
"vite": "7.3.1",
|
|
287
|
+
"vite-tsconfig-paths": "6.1.1",
|
|
288
|
+
"vitest": "4.0.18"
|
|
289
|
+
},
|
|
290
|
+
"peerDependencies": {
|
|
291
|
+
"react": ">=18",
|
|
292
|
+
"react-dom": ">=18"
|
|
293
|
+
},
|
|
294
|
+
"engines": {
|
|
295
|
+
"node": ">=20.14.0"
|
|
296
|
+
},
|
|
297
|
+
"packageManager": "pnpm@10.12.3",
|
|
298
|
+
"agents": {
|
|
299
|
+
"skills": [
|
|
300
|
+
{
|
|
301
|
+
"name": "g4rcez-components",
|
|
302
|
+
"path": "./ai/SKILL.md",
|
|
303
|
+
"docs": "./ai/docs/index.md",
|
|
304
|
+
"version": "1"
|
|
305
|
+
}
|
|
306
|
+
]
|
|
307
|
+
},
|
|
308
|
+
"skill": {
|
|
309
|
+
"name": "g4rcez-components",
|
|
310
|
+
"path": "./ai/SKILL.md",
|
|
311
|
+
"docs": "./ai/docs/index.md",
|
|
312
|
+
"version": "1"
|
|
300
313
|
}
|
|
301
314
|
}
|
package/dist/ai/SKILL.md
DELETED
|
@@ -1,266 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: g4rcez-components
|
|
3
|
-
description: >
|
|
4
|
-
Use when: setting up @g4rcez/components in a new project, migrating native
|
|
5
|
-
HTML elements or hand-rolled UI to this design system, building any React UI
|
|
6
|
-
that should use @g4rcez/components, or when the user's project already has
|
|
7
|
-
@g4rcez/components as a dependency. Covers installation, Tailwind preset,
|
|
8
|
-
theming with createTokenStyles/TokenRemap, ComponentsProvider/tweaks,
|
|
9
|
-
parsers, the full component catalog (components, hooks, React, UI,
|
|
10
|
-
design-system, tokens, Tailwind, forms, modals, notifications, tables,
|
|
11
|
-
calendar, theming), and native-element migration.
|
|
12
|
-
---
|
|
13
|
-
|
|
14
|
-
# @g4rcez/components — Agent Skill
|
|
15
|
-
|
|
16
|
-
A React design system built on Tailwind CSS and design tokens. This skill covers
|
|
17
|
-
installation, Tailwind preset setup, theming APIs, conventions, the full
|
|
18
|
-
component catalog, and migration from native HTML patterns.
|
|
19
|
-
|
|
20
|
-
---
|
|
21
|
-
|
|
22
|
-
## 1 — Package Structure & Installation
|
|
23
|
-
|
|
24
|
-
```bash
|
|
25
|
-
pnpm add @g4rcez/components
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
When installed in `node_modules`, the package follows this structure:
|
|
29
|
-
- `node_modules/@g4rcez/components/dist/` — Compiled JS/TS and CSS.
|
|
30
|
-
- `node_modules/@g4rcez/components/index.css` — Main stylesheet.
|
|
31
|
-
- `node_modules/@g4rcez/components/ai/` — This skill and detailed markdown documentation.
|
|
32
|
-
- `node_modules/@g4rcez/components/ai/docs/` — Component-specific documentation files.
|
|
33
|
-
|
|
34
|
-
### Tailwind Preset (recommended)
|
|
35
|
-
|
|
36
|
-
Add the library preset in your `tailwind.config.ts` (or `.js`). The preset
|
|
37
|
-
wires all design tokens as Tailwind utilities.
|
|
38
|
-
|
|
39
|
-
```ts
|
|
40
|
-
// tailwind.config.ts
|
|
41
|
-
import preset from "@g4rcez/components/preset.tailwind";
|
|
42
|
-
|
|
43
|
-
export default {
|
|
44
|
-
presets: [preset],
|
|
45
|
-
content: [
|
|
46
|
-
"./src/**/*.{ts,tsx}",
|
|
47
|
-
// include node_modules so Tailwind scans the library's classes:
|
|
48
|
-
"./node_modules/@g4rcez/components/dist/**/*.js",
|
|
49
|
-
],
|
|
50
|
-
};
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
### Theme class (required)
|
|
54
|
-
|
|
55
|
-
Apply `light` or `dark` on your root element:
|
|
56
|
-
|
|
57
|
-
```tsx
|
|
58
|
-
<html className="light">…</html>
|
|
59
|
-
// or
|
|
60
|
-
<html className="dark">…</html>
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
### ComponentsProvider (optional, mandatory for dark-mode)
|
|
64
|
-
|
|
65
|
-
Wrap your app root to enable i18n strings, locale-aware masks, and the
|
|
66
|
-
programmatic `Modal.confirm` utility:
|
|
67
|
-
|
|
68
|
-
```tsx
|
|
69
|
-
import { ComponentsProvider } from "@g4rcez/components";
|
|
70
|
-
|
|
71
|
-
export default function App({ children }) {
|
|
72
|
-
return (
|
|
73
|
-
<ComponentsProvider locale="en-US">
|
|
74
|
-
{children}
|
|
75
|
-
</ComponentsProvider>
|
|
76
|
-
);
|
|
77
|
-
}
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
---
|
|
81
|
-
|
|
82
|
-
## 2 — Theme Setup with createTokenStyles
|
|
83
|
-
|
|
84
|
-
Use `createTokenStyles` to generate scoped CSS strings for light and dark
|
|
85
|
-
themes, then inject them into `<head>`.
|
|
86
|
-
|
|
87
|
-
### API
|
|
88
|
-
|
|
89
|
-
```ts
|
|
90
|
-
import {
|
|
91
|
-
createTokenStyles,
|
|
92
|
-
createCssProperties,
|
|
93
|
-
type TokenRemap,
|
|
94
|
-
} from "@g4rcez/components";
|
|
95
|
-
```
|
|
96
|
-
|
|
97
|
-
| Function | Signature | Returns |
|
|
98
|
-
|----------|-----------|---------|
|
|
99
|
-
| `createTokenStyles` | `(theme: DesignTokens, map?: TokenRemap) => string` | Scoped CSS string, e.g. `html { --primary: … }` |
|
|
100
|
-
| `createCssProperties` | `(theme: DesignTokens, map?: TokenRemap) => CSSProperties` | Inline style object with CSS custom properties |
|
|
101
|
-
|
|
102
|
-
- When `map.name` is set (e.g. `"dark"`), the output is scoped to
|
|
103
|
-
`html.dark { … }` instead of `html { … }`.
|
|
104
|
-
- Use `createTokenStyles` for `<style>` injection; use `createCssProperties`
|
|
105
|
-
for inline `style` props.
|
|
106
|
-
|
|
107
|
-
### Two-theme pattern (light + dark)
|
|
108
|
-
|
|
109
|
-
```tsx
|
|
110
|
-
import {
|
|
111
|
-
createTokenStyles,
|
|
112
|
-
type TokenRemap,
|
|
113
|
-
defaultLightTheme,
|
|
114
|
-
defaultDarkTheme,
|
|
115
|
-
} from "@g4rcez/components";
|
|
116
|
-
|
|
117
|
-
const tokenRemap: TokenRemap = {
|
|
118
|
-
colors: (t) => {
|
|
119
|
-
// Strip hsla( prefix and ) suffix for Tailwind opacity utility support
|
|
120
|
-
t.value = t.value.replace("hsla(", "").replace(/\)$/, "");
|
|
121
|
-
return t;
|
|
122
|
-
},
|
|
123
|
-
};
|
|
124
|
-
|
|
125
|
-
const stylesLight = createTokenStyles(defaultLightTheme, tokenRemap);
|
|
126
|
-
const stylesDark = createTokenStyles(defaultDarkTheme, {
|
|
127
|
-
...tokenRemap,
|
|
128
|
-
name: "dark", // scopes output to html.dark { … }
|
|
129
|
-
});
|
|
130
|
-
|
|
131
|
-
// In your layout:
|
|
132
|
-
export default function RootLayout({ children }) {
|
|
133
|
-
return (
|
|
134
|
-
<html lang="en">
|
|
135
|
-
<head>
|
|
136
|
-
<style dangerouslySetInnerHTML={{ __html: stylesLight }} />
|
|
137
|
-
<style dangerouslySetInnerHTML={{ __html: stylesDark }} />
|
|
138
|
-
</head>
|
|
139
|
-
<body>{children}</body>
|
|
140
|
-
</html>
|
|
141
|
-
);
|
|
142
|
-
}
|
|
143
|
-
```
|
|
144
|
-
|
|
145
|
-
---
|
|
146
|
-
|
|
147
|
-
## 3 — TokenRemap
|
|
148
|
-
|
|
149
|
-
`TokenRemap` lets you transform each design token value before it is emitted
|
|
150
|
-
as a CSS custom property.
|
|
151
|
-
|
|
152
|
-
```ts
|
|
153
|
-
export type TokenRemap = Partial<
|
|
154
|
-
Record<
|
|
155
|
-
"colors" | "spacing" | "rounded" | "customTokens" | "zIndex",
|
|
156
|
-
(t: Token) => Token
|
|
157
|
-
> & { name: string }
|
|
158
|
-
>;
|
|
159
|
-
```
|
|
160
|
-
|
|
161
|
-
### Why strip `hsla(…)` in the colors transformer
|
|
162
|
-
|
|
163
|
-
Tailwind v4 opacity utilities (e.g. `bg-primary/50`) expect raw channel values
|
|
164
|
-
like `210 40% 60%` — not a wrapped `hsla(210 40% 60%)`.
|
|
165
|
-
|
|
166
|
-
---
|
|
167
|
-
|
|
168
|
-
## 4 — ComponentsProvider & Tweaks
|
|
169
|
-
|
|
170
|
-
```tsx
|
|
171
|
-
import { ComponentsProvider, type Tweaks, parsers } from "@g4rcez/components";
|
|
172
|
-
|
|
173
|
-
const tweaks: Tweaks = {
|
|
174
|
-
table: {
|
|
175
|
-
sorters: true, // show/hide column sort controls
|
|
176
|
-
filters: true, // show/hide column filter controls
|
|
177
|
-
operations: true, // show/hide table operation buttons
|
|
178
|
-
sticky: 55, // px offset for sticky header
|
|
179
|
-
},
|
|
180
|
-
};
|
|
181
|
-
|
|
182
|
-
<ComponentsProvider
|
|
183
|
-
locale="en-US"
|
|
184
|
-
tweaks={tweaks}
|
|
185
|
-
parser={parsers.hsla}
|
|
186
|
-
>
|
|
187
|
-
{children}
|
|
188
|
-
</ComponentsProvider>
|
|
189
|
-
```
|
|
190
|
-
|
|
191
|
-
---
|
|
192
|
-
|
|
193
|
-
## 5 — Key Conventions
|
|
194
|
-
|
|
195
|
-
### Never use raw Tailwind color classes
|
|
196
|
-
|
|
197
|
-
```tsx
|
|
198
|
-
// ❌ Wrong
|
|
199
|
-
<div className="bg-blue-500 text-white">…</div>
|
|
200
|
-
|
|
201
|
-
// ✅ Right — use design-token classes
|
|
202
|
-
<div className="bg-primary text-primary-foreground">…</div>
|
|
203
|
-
```
|
|
204
|
-
|
|
205
|
-
### Always use component `theme` / `variant` props
|
|
206
|
-
|
|
207
|
-
```tsx
|
|
208
|
-
// ❌ Wrong
|
|
209
|
-
<button className="bg-red-600 text-white">Delete</button>
|
|
210
|
-
|
|
211
|
-
// ✅ Right
|
|
212
|
-
<Button theme="danger">Delete</Button>
|
|
213
|
-
```
|
|
214
|
-
|
|
215
|
-
---
|
|
216
|
-
|
|
217
|
-
## 6 — Component Catalog
|
|
218
|
-
|
|
219
|
-
### Import paths
|
|
220
|
-
|
|
221
|
-
The library supports both barrel imports and sub-path imports for better tree-shaking.
|
|
222
|
-
|
|
223
|
-
| Component | Main Export | Sub-path Export |
|
|
224
|
-
|-----------|-------------|-----------------|
|
|
225
|
-
| `Button` | `@g4rcez/components` | `@g4rcez/components/button` |
|
|
226
|
-
| `Input` | `@g4rcez/components` | `@g4rcez/components/input` |
|
|
227
|
-
| `Modal` | `@g4rcez/components` | `@g4rcez/components/modal` |
|
|
228
|
-
| `Table` | `@g4rcez/components` | `@g4rcez/components/table` |
|
|
229
|
-
| `Select` | `@g4rcez/components` | `@g4rcez/components/select` |
|
|
230
|
-
|
|
231
|
-
See `node_modules/@g4rcez/components/ai/docs/index.md` for the full list of exports.
|
|
232
|
-
|
|
233
|
-
---
|
|
234
|
-
|
|
235
|
-
## 7 — Migration Guide
|
|
236
|
-
|
|
237
|
-
Use this table when migrating native HTML elements to library equivalents.
|
|
238
|
-
|
|
239
|
-
| Native / custom pattern | Library replacement |
|
|
240
|
-
|-------------------------|---------------------|
|
|
241
|
-
| `<button>` | `Button` |
|
|
242
|
-
| `<input type="text">` | `Input` |
|
|
243
|
-
| `<input type="date">` | `DatePicker` |
|
|
244
|
-
| `<input type="checkbox">` | `Checkbox` |
|
|
245
|
-
| `<select>` | `Select` |
|
|
246
|
-
| Custom modal / dialog | `Modal` (type `"dialog"`) |
|
|
247
|
-
| Side panel / drawer | `Modal` (type `"drawer"`) |
|
|
248
|
-
| Toast / notifications | `Notifications` |
|
|
249
|
-
| Data table | `Table` |
|
|
250
|
-
|
|
251
|
-
---
|
|
252
|
-
|
|
253
|
-
## 8 — Where to Find Detailed Docs
|
|
254
|
-
|
|
255
|
-
For any specific component, read its doc file for full props, design tokens,
|
|
256
|
-
and usage examples. These files are located within the package in `node_modules`:
|
|
257
|
-
|
|
258
|
-
`node_modules/@g4rcez/components/ai/docs/<ComponentName>.md`
|
|
259
|
-
|
|
260
|
-
**Examples:**
|
|
261
|
-
- `node_modules/@g4rcez/components/ai/docs/Button.md`
|
|
262
|
-
- `node_modules/@g4rcez/components/ai/docs/Input.md`
|
|
263
|
-
- `node_modules/@g4rcez/components/ai/docs/Modal.md`
|
|
264
|
-
- `node_modules/@g4rcez/components/ai/docs/Table.md`
|
|
265
|
-
- `node_modules/@g4rcez/components/ai/docs/Form.md`
|
|
266
|
-
|