@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
|
@@ -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,CA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Z,CAAC,GCpBYW,IAAkB,MAAM;AACjC,QAAMC,IAAMC,EAAWJ,CAAO;AAC9B,SAAKG,IACEA,EAAI,MADMZ;AAErB;"}
|
package/package.json
CHANGED
|
@@ -1,99 +1,42 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@g4rcez/components",
|
|
3
|
-
"
|
|
4
|
-
"version": "4.0.2",
|
|
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": "cp ../../skills/g4rcez-components/SKILL.md ./ai/SKILL.md; rm -rf ./dist; vite build; npm run lib:types; npm run preset; npm run lib:css",
|
|
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",
|
|
@@ -297,5 +234,81 @@
|
|
|
297
234
|
"default": "./dist/components/display/alert.js"
|
|
298
235
|
},
|
|
299
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/ai/docs/TransferList.md
DELETED
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: TransferList
|
|
3
|
-
description: Two-panel component for moving items between a source list and a target list.
|
|
4
|
-
package: "@g4rcez/components"
|
|
5
|
-
export: "{ TransferList }"
|
|
6
|
-
import: "import { TransferList } from '@g4rcez/components/transfer-list'"
|
|
7
|
-
category: form
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
# TransferList
|
|
11
|
-
|
|
12
|
-
Two-panel component for moving items between a source list and a target list.
|
|
13
|
-
|
|
14
|
-
## Import
|
|
15
|
-
|
|
16
|
-
```tsx
|
|
17
|
-
import { TransferList } from "@g4rcez/components/transfer-list";
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
## Props
|
|
21
|
-
|
|
22
|
-
| Prop | Type | Default | Description |
|
|
23
|
-
|------|------|---------|-------------|
|
|
24
|
-
| `source` | `T[]` | — | Items in the left (available) list. |
|
|
25
|
-
| `target` | `T[]` | — | Items in the right (selected) list. |
|
|
26
|
-
| `Item` | `React.FC<{ data: T }>` | — | Component used to render each list row. |
|
|
27
|
-
| `reference` | `keyof T` | — | Unique key used to identify and compare items (e.g., `"id"`). |
|
|
28
|
-
| `setSource` | `Dispatch<SetStateAction<T[]>>` | — | State setter for the source list. |
|
|
29
|
-
| `setTarget` | `Dispatch<SetStateAction<T[]>>` | — | State setter for the target list. |
|
|
30
|
-
|
|
31
|
-
## Design Tokens
|
|
32
|
-
|
|
33
|
-
Tokens this component reads. Customize by overriding these CSS variables in your theme.
|
|
34
|
-
|
|
35
|
-
| Token | CSS Variable | Purpose |
|
|
36
|
-
|-------|-------------|---------|
|
|
37
|
-
| `border-card-border` | `--card-border` | Border around each list panel |
|
|
38
|
-
| `bg-background` | `--background` | Panel background (inherited) |
|
|
39
|
-
| `text-foreground` | `--foreground` | Item text color (inherited) |
|
|
40
|
-
| `border-border` | `--border` | Section divider inside the panel header |
|
|
41
|
-
|
|
42
|
-
## Examples
|
|
43
|
-
|
|
44
|
-
### Basic transfer list
|
|
45
|
-
|
|
46
|
-
```tsx
|
|
47
|
-
import { useState } from "react";
|
|
48
|
-
import { TransferList } from "@g4rcez/components/transfer-list";
|
|
49
|
-
|
|
50
|
-
type Role = { id: string; name: string };
|
|
51
|
-
|
|
52
|
-
const allRoles: Role[] = [
|
|
53
|
-
{ id: "admin", name: "Administrator" },
|
|
54
|
-
{ id: "editor", name: "Editor" },
|
|
55
|
-
{ id: "viewer", name: "Viewer" },
|
|
56
|
-
{ id: "auditor", name: "Auditor" },
|
|
57
|
-
];
|
|
58
|
-
|
|
59
|
-
const RoleItem: React.FC<{ data: Role }> = ({ data }) => (
|
|
60
|
-
<span className="text-sm text-foreground">{data.name}</span>
|
|
61
|
-
);
|
|
62
|
-
|
|
63
|
-
export default function RoleAssignment() {
|
|
64
|
-
const [available, setAvailable] = useState(allRoles);
|
|
65
|
-
const [assigned, setAssigned] = useState<Role[]>([]);
|
|
66
|
-
|
|
67
|
-
return (
|
|
68
|
-
<TransferList
|
|
69
|
-
source={available}
|
|
70
|
-
target={assigned}
|
|
71
|
-
setSource={setAvailable}
|
|
72
|
-
setTarget={setAssigned}
|
|
73
|
-
reference="id"
|
|
74
|
-
Item={RoleItem}
|
|
75
|
-
/>
|
|
76
|
-
);
|
|
77
|
-
}
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
### With custom item rendering
|
|
81
|
-
|
|
82
|
-
```tsx
|
|
83
|
-
import { ShieldIcon } from "@phosphor-icons/react";
|
|
84
|
-
import { TransferList } from "@g4rcez/components/transfer-list";
|
|
85
|
-
|
|
86
|
-
type Permission = { id: string; label: string; scope: string };
|
|
87
|
-
|
|
88
|
-
const PermissionItem: React.FC<{ data: Permission }> = ({ data }) => (
|
|
89
|
-
<span className="flex items-center gap-base">
|
|
90
|
-
<ShieldIcon size={14} className="text-primary" />
|
|
91
|
-
<span className="text-sm text-foreground">{data.label}</span>
|
|
92
|
-
<span className="ml-auto text-xs text-muted-foreground">{data.scope}</span>
|
|
93
|
-
</span>
|
|
94
|
-
);
|
|
95
|
-
|
|
96
|
-
export default function PermissionManager() {
|
|
97
|
-
const [source, setSource] = useState(allPermissions);
|
|
98
|
-
const [target, setTarget] = useState<Permission[]>([]);
|
|
99
|
-
|
|
100
|
-
return (
|
|
101
|
-
<TransferList
|
|
102
|
-
source={source}
|
|
103
|
-
target={target}
|
|
104
|
-
setSource={setSource}
|
|
105
|
-
setTarget={setTarget}
|
|
106
|
-
reference="id"
|
|
107
|
-
Item={PermissionItem}
|
|
108
|
-
/>
|
|
109
|
-
);
|
|
110
|
-
}
|
|
111
|
-
```
|
|
112
|
-
|
|
113
|
-
## Do
|
|
114
|
-
|
|
115
|
-
- Provide a unique, stable `reference` key for each item (typically the primary key from your data model).
|
|
116
|
-
- Use `TransferList` when users need to pick a significant number of items from a large pool.
|
|
117
|
-
- Keep the `Item` component focused on displaying — handle mutations via `setSource` / `setTarget`.
|
|
118
|
-
- Use design-token classes inside `Item` for text and icon colors (`text-foreground`, `text-primary`, `text-muted-foreground`).
|
|
119
|
-
|
|
120
|
-
## Don't
|
|
121
|
-
|
|
122
|
-
- Don't use `TransferList` for very small lists (3–5 items) where `MultiSelect` or a `Checkbox` group would be faster.
|
|
123
|
-
- Don't perform expensive side effects inside the `Item` component — keep it purely presentational.
|
|
124
|
-
- Don't pass raw Tailwind color classes (`bg-blue-500`, `text-white`, `border-gray-300`) — use design tokens instead.
|
|
125
|
-
- Don't use arbitrary Tailwind values (`bg-[#abc]`) — override CSS variables in your `@theme` block instead.
|
|
126
|
-
|
|
127
|
-
## Accessibility
|
|
128
|
-
|
|
129
|
-
- Each item is rendered with a `Checkbox` for selection, giving it full keyboard and screen-reader support.
|
|
130
|
-
- Lists are virtualized using `react-virtuoso` for performance with large datasets.
|
|
131
|
-
- Transfer buttons use `CaretRightIcon` from `@phosphor-icons/react` and should have descriptive `aria-label` attributes when used.
|
|
132
|
-
|
|
133
|
-
## Data Attributes
|
|
134
|
-
|
|
135
|
-
The `TransferList` component does not set component-specific `data-*` attributes directly. Individual list items inherit `data-component` and accessibility attributes from the embedded `Checkbox` components.
|
|
136
|
-
|
|
137
|
-
## Notes
|
|
138
|
-
|
|
139
|
-
- Uses `react-virtuoso` with a `useWindowScroll` strategy — the list height adapts to the parent container via `useParentHeight`.
|
|
140
|
-
- The source panel includes a built-in `Input` search field for quick filtering.
|
|
141
|
-
- The component is a generic `<T extends POJO>` — TypeScript will infer `T` from `source` and `target` props.
|
|
142
|
-
- Only the source-to-target transfer button (`ChevronRightIcon`) is currently wired in the implementation; bidirectional transfer requires wiring additional buttons if needed.
|