@tulip-systems/core 0.6.1 → 0.7.0
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/LICENSE +662 -0
- package/dist/components/client.d.mts +19 -3
- package/dist/components/client.mjs +18 -2
- package/dist/components/editor/components/menu-nodes.client.mjs +1 -1
- package/dist/components/editor/components/menu-nodes.client.mjs.map +1 -1
- package/dist/components/editor/components/menu.client.mjs +3 -3
- package/dist/components/editor/components/menu.client.mjs.map +1 -1
- package/dist/components/emails/forget-password-email.mjs +6 -6
- package/dist/components/emails/forget-password-email.mjs.map +1 -1
- package/dist/components/header/back-button.client.mjs +2 -2
- package/dist/components/header/back-button.client.mjs.map +1 -1
- package/dist/components/header/bottom-bar.client.mjs +2 -2
- package/dist/components/header/bottom-bar.client.mjs.map +1 -1
- package/dist/components/header/breadcrumbs.client.mjs +1 -1
- package/dist/components/header/breadcrumbs.client.mjs.map +1 -1
- package/dist/components/header/header.client.mjs +1 -1
- package/dist/components/header/header.client.mjs.map +1 -1
- package/dist/components/layouts/empty-page.mjs +2 -2
- package/dist/components/layouts/empty-page.mjs.map +1 -1
- package/dist/components/layouts/error-page.mjs +3 -3
- package/dist/components/layouts/error-page.mjs.map +1 -1
- package/dist/components/layouts/providers.client.d.mts.map +1 -1
- package/dist/components/layouts/providers.client.mjs +3 -2
- package/dist/components/layouts/providers.client.mjs.map +1 -1
- package/dist/components/layouts/root-loading.mjs +2 -2
- package/dist/components/layouts/root-loading.mjs.map +1 -1
- package/dist/components/layouts/tab-layout.mjs +1 -1
- package/dist/components/layouts/tab-layout.mjs.map +1 -1
- package/dist/components/lists/data-list.mjs +1 -1
- package/dist/components/lists/data-list.mjs.map +1 -1
- package/dist/components/lists/data-stack.mjs +1 -1
- package/dist/components/lists/data-stack.mjs.map +1 -1
- package/dist/components/navigation/admin-sidebar-header.client.mjs +3 -3
- package/dist/components/navigation/admin-sidebar-header.client.mjs.map +1 -1
- package/dist/components/navigation/admin-sidebar-skeleton.mjs +1 -1
- package/dist/components/navigation/admin-sidebar-skeleton.mjs.map +1 -1
- package/dist/components/ui/accordion.client.d.mts +26 -0
- package/dist/components/ui/accordion.client.d.mts.map +1 -0
- package/dist/components/ui/accordion.client.mjs +58 -0
- package/dist/components/ui/accordion.client.mjs.map +1 -0
- package/dist/components/ui/alert-dialog.client.d.mts +61 -0
- package/dist/components/ui/alert-dialog.client.d.mts.map +1 -0
- package/dist/components/ui/alert-dialog.client.mjs +104 -0
- package/dist/components/ui/alert-dialog.client.mjs.map +1 -0
- package/dist/components/ui/alert.d.mts +5 -1
- package/dist/components/ui/alert.d.mts.map +1 -1
- package/dist/components/ui/alert.mjs +13 -6
- package/dist/components/ui/alert.mjs.map +1 -1
- package/dist/components/ui/aspect-ratio.client.d.mts +10 -0
- package/dist/components/ui/aspect-ratio.client.d.mts.map +1 -0
- package/dist/components/ui/aspect-ratio.client.mjs +16 -0
- package/dist/components/ui/aspect-ratio.client.mjs.map +1 -0
- package/dist/components/ui/avatar.client.d.mts +21 -6
- package/dist/components/ui/avatar.client.d.mts.map +1 -1
- package/dist/components/ui/avatar.client.mjs +31 -9
- package/dist/components/ui/avatar.client.mjs.map +1 -1
- package/dist/components/ui/badge.d.mts +1 -1
- package/dist/components/ui/badge.d.mts.map +1 -1
- package/dist/components/ui/badge.mjs +11 -8
- package/dist/components/ui/badge.mjs.map +1 -1
- package/dist/components/ui/breadcrumb.d.mts +3 -1
- package/dist/components/ui/breadcrumb.d.mts.map +1 -1
- package/dist/components/ui/breadcrumb.mjs +7 -7
- package/dist/components/ui/breadcrumb.mjs.map +1 -1
- package/dist/components/ui/button-group.d.mts +29 -0
- package/dist/components/ui/button-group.d.mts.map +1 -0
- package/dist/components/ui/button-group.mjs +41 -0
- package/dist/components/ui/button-group.mjs.map +1 -0
- package/dist/components/ui/button.d.mts +1 -1
- package/dist/components/ui/button.d.mts.map +1 -1
- package/dist/components/ui/button.mjs +19 -13
- package/dist/components/ui/button.mjs.map +1 -1
- package/dist/components/ui/{calendar.d.mts → calendar.client.d.mts} +7 -4
- package/dist/components/ui/calendar.client.d.mts.map +1 -0
- package/dist/components/ui/{calendar.mjs → calendar.client.mjs} +22 -19
- package/dist/components/ui/calendar.client.mjs.map +1 -0
- package/dist/components/ui/card.d.mts +9 -2
- package/dist/components/ui/card.d.mts.map +1 -1
- package/dist/components/ui/card.mjs +15 -7
- package/dist/components/ui/card.mjs.map +1 -1
- package/dist/components/ui/{carousel.d.mts → carousel.client.d.mts} +12 -3
- package/dist/components/ui/carousel.client.d.mts.map +1 -0
- package/dist/components/ui/{carousel.mjs → carousel.client.mjs} +10 -10
- package/dist/components/ui/carousel.client.mjs.map +1 -0
- package/dist/components/ui/chart.client.d.mts.map +1 -1
- package/dist/components/ui/chart.client.mjs +11 -11
- package/dist/components/ui/chart.client.mjs.map +1 -1
- package/dist/components/ui/checkbox.client.d.mts +12 -0
- package/dist/components/ui/checkbox.client.d.mts.map +1 -0
- package/dist/components/ui/checkbox.client.mjs +24 -0
- package/dist/components/ui/checkbox.client.mjs.map +1 -0
- package/dist/components/ui/collapsible.client.d.mts +6 -6
- package/dist/components/ui/collapsible.client.d.mts.map +1 -1
- package/dist/components/ui/collapsible.client.mjs +6 -6
- package/dist/components/ui/collapsible.client.mjs.map +1 -1
- package/dist/components/ui/combobox-dropdown.client.d.mts +1 -1
- package/dist/components/ui/combobox-dropdown.client.mjs +2 -2
- package/dist/components/ui/combobox-dropdown.client.mjs.map +1 -1
- package/dist/components/ui/combobox.client.mjs +4 -4
- package/dist/components/ui/combobox.client.mjs.map +1 -1
- package/dist/components/ui/{command.d.mts → command.client.d.mts} +8 -2
- package/dist/components/ui/command.client.d.mts.map +1 -0
- package/dist/components/ui/command.client.mjs +91 -0
- package/dist/components/ui/command.client.mjs.map +1 -0
- package/dist/components/ui/context-menu.client.d.mts +86 -0
- package/dist/components/ui/context-menu.client.d.mts.map +1 -0
- package/dist/components/ui/context-menu.client.mjs +128 -0
- package/dist/components/ui/context-menu.client.mjs.map +1 -0
- package/dist/components/ui/date-picker.client.mjs +2 -2
- package/dist/components/ui/date-picker.client.mjs.map +1 -1
- package/dist/components/ui/dialog.client.d.mts +19 -12
- package/dist/components/ui/dialog.client.d.mts.map +1 -1
- package/dist/components/ui/dialog.client.mjs +40 -29
- package/dist/components/ui/dialog.client.mjs.map +1 -1
- package/dist/components/ui/drawer.client.d.mts.map +1 -1
- package/dist/components/ui/drawer.client.mjs +5 -5
- package/dist/components/ui/drawer.client.mjs.map +1 -1
- package/dist/components/ui/dropdown-menu.client.d.mts +85 -0
- package/dist/components/ui/dropdown-menu.client.d.mts.map +1 -0
- package/dist/components/ui/dropdown-menu.client.mjs +131 -0
- package/dist/components/ui/dropdown-menu.client.mjs.map +1 -0
- package/dist/components/ui/empty.d.mts +36 -0
- package/dist/components/ui/empty.d.mts.map +1 -0
- package/dist/components/ui/empty.mjs +62 -0
- package/dist/components/ui/empty.mjs.map +1 -0
- package/dist/components/ui/field.client.d.mts +65 -0
- package/dist/components/ui/field.client.d.mts.map +1 -0
- package/dist/components/ui/field.client.mjs +114 -0
- package/dist/components/ui/field.client.mjs.map +1 -0
- package/dist/components/ui/form.client.d.mts +3 -4
- package/dist/components/ui/form.client.d.mts.map +1 -1
- package/dist/components/ui/form.client.mjs +4 -4
- package/dist/components/ui/form.client.mjs.map +1 -1
- package/dist/components/ui/hover-card.client.d.mts +6 -6
- package/dist/components/ui/hover-card.client.d.mts.map +1 -1
- package/dist/components/ui/hover-card.client.mjs +14 -11
- package/dist/components/ui/hover-card.client.mjs.map +1 -1
- package/dist/components/ui/{input-date-time.d.mts → input-date-time.client.d.mts} +3 -3
- package/dist/components/ui/input-date-time.client.d.mts.map +1 -0
- package/dist/components/ui/{input-date-time.mjs → input-date-time.client.mjs} +4 -2
- package/dist/components/ui/input-date-time.client.mjs.map +1 -0
- package/dist/components/ui/input-date.d.mts +1 -1
- package/dist/components/ui/input-date.d.mts.map +1 -1
- package/dist/components/ui/input-date.mjs.map +1 -1
- package/dist/components/ui/input-group.client.d.mts +59 -0
- package/dist/components/ui/input-group.client.d.mts.map +1 -0
- package/dist/components/ui/input-group.client.mjs +106 -0
- package/dist/components/ui/input-group.client.mjs.map +1 -0
- package/dist/components/ui/input-recipient.mjs +11 -11
- package/dist/components/ui/input-recipient.mjs.map +1 -1
- package/dist/components/ui/input-time.d.mts +1 -1
- package/dist/components/ui/input-time.d.mts.map +1 -1
- package/dist/components/ui/input-time.mjs.map +1 -1
- package/dist/components/ui/input.d.mts.map +1 -1
- package/dist/components/ui/input.mjs +1 -1
- package/dist/components/ui/input.mjs.map +1 -1
- package/dist/components/ui/item.d.mts +63 -0
- package/dist/components/ui/item.d.mts.map +1 -0
- package/dist/components/ui/item.mjs +119 -0
- package/dist/components/ui/item.mjs.map +1 -0
- package/dist/components/ui/kbd.d.mts +14 -0
- package/dist/components/ui/kbd.d.mts.map +1 -0
- package/dist/components/ui/kbd.mjs +22 -0
- package/dist/components/ui/kbd.mjs.map +1 -0
- package/dist/components/ui/label.d.mts +4 -4
- package/dist/components/ui/label.d.mts.map +1 -1
- package/dist/components/ui/label.mjs +5 -5
- package/dist/components/ui/label.mjs.map +1 -1
- package/dist/components/ui/loader.d.mts +7 -0
- package/dist/components/ui/loader.d.mts.map +1 -0
- package/dist/components/ui/loader.mjs +63 -0
- package/dist/components/ui/loader.mjs.map +1 -0
- package/dist/components/ui/navigation-menu.d.mts +11 -11
- package/dist/components/ui/navigation-menu.d.mts.map +1 -1
- package/dist/components/ui/navigation-menu.mjs +18 -20
- package/dist/components/ui/navigation-menu.mjs.map +1 -1
- package/dist/components/ui/pagination.d.mts +8 -2
- package/dist/components/ui/pagination.d.mts.map +1 -1
- package/dist/components/ui/pagination.mjs +29 -21
- package/dist/components/ui/pagination.mjs.map +1 -1
- package/dist/components/ui/popover.client.d.mts +35 -0
- package/dist/components/ui/popover.client.d.mts.map +1 -0
- package/dist/components/ui/popover.client.mjs +59 -0
- package/dist/components/ui/popover.client.mjs.map +1 -0
- package/dist/components/ui/progress.client.d.mts +4 -4
- package/dist/components/ui/progress.client.d.mts.map +1 -1
- package/dist/components/ui/progress.client.mjs +7 -7
- package/dist/components/ui/progress.client.mjs.map +1 -1
- package/dist/components/ui/radio-group.d.mts +5 -5
- package/dist/components/ui/radio-group.d.mts.map +1 -1
- package/dist/components/ui/radio-group.mjs +10 -11
- package/dist/components/ui/radio-group.mjs.map +1 -1
- package/dist/components/ui/resizable.client.d.mts +3 -4
- package/dist/components/ui/resizable.client.d.mts.map +1 -1
- package/dist/components/ui/resizable.client.mjs +5 -9
- package/dist/components/ui/resizable.client.mjs.map +1 -1
- package/dist/components/ui/scroll-area.d.mts +5 -5
- package/dist/components/ui/scroll-area.d.mts.map +1 -1
- package/dist/components/ui/scroll-area.mjs +12 -11
- package/dist/components/ui/scroll-area.mjs.map +1 -1
- package/dist/components/ui/select.client.d.mts +18 -13
- package/dist/components/ui/select.client.d.mts.map +1 -1
- package/dist/components/ui/select.client.mjs +37 -32
- package/dist/components/ui/select.client.mjs.map +1 -1
- package/dist/components/ui/separator.d.mts +4 -4
- package/dist/components/ui/separator.d.mts.map +1 -1
- package/dist/components/ui/separator.mjs +6 -6
- package/dist/components/ui/separator.mjs.map +1 -1
- package/dist/components/ui/sheet.client.d.mts +9 -7
- package/dist/components/ui/sheet.client.d.mts.map +1 -1
- package/dist/components/ui/sheet.client.mjs +30 -20
- package/dist/components/ui/sheet.client.mjs.map +1 -1
- package/dist/components/ui/sidebar.client.mjs +28 -28
- package/dist/components/ui/sidebar.client.mjs.map +1 -1
- package/dist/components/ui/skeleton.mjs +1 -1
- package/dist/components/ui/skeleton.mjs.map +1 -1
- package/dist/components/ui/slider.d.mts +4 -4
- package/dist/components/ui/slider.d.mts.map +1 -1
- package/dist/components/ui/slider.mjs +11 -11
- package/dist/components/ui/slider.mjs.map +1 -1
- package/dist/components/ui/spinner.d.mts +10 -0
- package/dist/components/ui/spinner.d.mts.map +1 -0
- package/dist/components/ui/spinner.mjs +9 -55
- package/dist/components/ui/spinner.mjs.map +1 -1
- package/dist/components/ui/switch.client.d.mts +15 -0
- package/dist/components/ui/switch.client.d.mts.map +1 -0
- package/dist/components/ui/switch.client.mjs +23 -0
- package/dist/components/ui/switch.client.mjs.map +1 -0
- package/dist/components/ui/tabs.client.d.mts +31 -0
- package/dist/components/ui/tabs.client.d.mts.map +1 -0
- package/dist/components/ui/tabs.client.mjs +49 -0
- package/dist/components/ui/tabs.client.mjs.map +1 -0
- package/dist/components/ui/textarea.d.mts.map +1 -1
- package/dist/components/ui/textarea.mjs +1 -1
- package/dist/components/ui/textarea.mjs.map +1 -1
- package/dist/components/ui/toggle-group.client.d.mts +11 -6
- package/dist/components/ui/toggle-group.client.d.mts.map +1 -1
- package/dist/components/ui/toggle-group.client.mjs +20 -12
- package/dist/components/ui/toggle-group.client.mjs.map +1 -1
- package/dist/components/ui/{toggle.d.mts → toggle.client.d.mts} +6 -6
- package/dist/components/ui/toggle.client.d.mts.map +1 -0
- package/dist/components/ui/toggle.client.mjs +40 -0
- package/dist/components/ui/toggle.client.mjs.map +1 -0
- package/dist/components/ui/tooltip.client.d.mts +7 -7
- package/dist/components/ui/tooltip.client.d.mts.map +1 -1
- package/dist/components/ui/tooltip.client.mjs +10 -10
- package/dist/components/ui/tooltip.client.mjs.map +1 -1
- package/dist/components.d.mts +12 -20
- package/dist/components.mjs +12 -20
- package/dist/inline-edit/client.d.mts +2 -2
- package/dist/lib/hooks/use-indicator.d.mts.map +1 -1
- package/dist/lib/hooks/use-indicator.mjs.map +1 -1
- package/dist/modules/auth/components/auth-layout.server.mjs +2 -2
- package/dist/modules/auth/components/auth-layout.server.mjs.map +1 -1
- package/dist/modules/auth/components/create-first-user-page.client.mjs +3 -3
- package/dist/modules/auth/components/create-first-user-page.client.mjs.map +1 -1
- package/dist/modules/auth/components/forget-password-page.client.mjs +1 -1
- package/dist/modules/auth/components/forget-password-page.client.mjs.map +1 -1
- package/dist/modules/auth/components/login-page.client.mjs +5 -5
- package/dist/modules/auth/components/login-page.client.mjs.map +1 -1
- package/dist/modules/auth/components/reset-password-page.client.mjs +5 -5
- package/dist/modules/auth/components/reset-password-page.client.mjs.map +1 -1
- package/dist/modules/commands/components/alert-dialog-command.client.d.mts +9 -9
- package/dist/modules/commands/components/alert-dialog-command.client.d.mts.map +1 -1
- package/dist/modules/commands/components/alert-dialog-command.client.mjs +3 -3
- package/dist/modules/commands/components/alert-dialog-command.client.mjs.map +1 -1
- package/dist/modules/commands/components/click-command.client.mjs +2 -2
- package/dist/modules/commands/components/click-command.client.mjs.map +1 -1
- package/dist/modules/commands/components/dialog-command.client.d.mts +8 -8
- package/dist/modules/commands/components/dialog-command.client.d.mts.map +1 -1
- package/dist/modules/commands/components/dialog-command.client.mjs +2 -2
- package/dist/modules/commands/components/dialog-command.client.mjs.map +1 -1
- package/dist/modules/commands/components/dropdown-command.client.mjs +2 -2
- package/dist/modules/commands/components/dropdown-command.client.mjs.map +1 -1
- package/dist/modules/commands/components/empty-command.client.mjs +2 -2
- package/dist/modules/commands/components/empty-command.client.mjs.map +1 -1
- package/dist/modules/commands/components/form-dialog-command.client.d.mts +11 -9
- package/dist/modules/commands/components/form-dialog-command.client.d.mts.map +1 -1
- package/dist/modules/commands/components/form-dialog-command.client.mjs +8 -6
- package/dist/modules/commands/components/form-dialog-command.client.mjs.map +1 -1
- package/dist/modules/commands/menus/context-menu.client.d.mts +3 -3
- package/dist/modules/commands/menus/context-menu.client.d.mts.map +1 -1
- package/dist/modules/commands/menus/context-menu.client.mjs +1 -1
- package/dist/modules/commands/menus/context-menu.client.mjs.map +1 -1
- package/dist/modules/commands/menus/dropdown-menu.client.mjs +2 -2
- package/dist/modules/commands/menus/dropdown-menu.client.mjs.map +1 -1
- package/dist/modules/commands/menus/floating-menu.client.mjs +2 -2
- package/dist/modules/commands/menus/floating-menu.client.mjs.map +1 -1
- package/dist/modules/commands/utils/archive-command.client.mjs +1 -1
- package/dist/modules/commands/utils/archive-command.client.mjs.map +1 -1
- package/dist/modules/commands/utils/delete-command.client.mjs +1 -1
- package/dist/modules/commands/utils/delete-command.client.mjs.map +1 -1
- package/dist/modules/data-tables/components/cell/select.client.mjs +1 -1
- package/dist/modules/data-tables/components/cell/select.client.mjs.map +1 -1
- package/dist/modules/data-tables/components/column-header.mjs +5 -5
- package/dist/modules/data-tables/components/column-header.mjs.map +1 -1
- package/dist/modules/data-tables/components/filters/combobox.client.mjs +6 -6
- package/dist/modules/data-tables/components/filters/combobox.client.mjs.map +1 -1
- package/dist/modules/data-tables/components/filters/slider.client.mjs +2 -2
- package/dist/modules/data-tables/components/filters/slider.client.mjs.map +1 -1
- package/dist/modules/data-tables/components/header.mjs +1 -1
- package/dist/modules/data-tables/components/header.mjs.map +1 -1
- package/dist/modules/data-tables/components/skeleton.mjs +2 -2
- package/dist/modules/data-tables/components/skeleton.mjs.map +1 -1
- package/dist/modules/data-tables/components/table.mjs +3 -3
- package/dist/modules/data-tables/components/table.mjs.map +1 -1
- package/dist/modules/data-tables/components/toolbar.mjs +1 -1
- package/dist/modules/data-tables/components/toolbar.mjs.map +1 -1
- package/dist/modules/data-tables/strategies/pagination/components.mjs +3 -3
- package/dist/modules/data-tables/strategies/pagination/components.mjs.map +1 -1
- package/dist/modules/data-tables/tables/inline-table/components/cells/common.mjs +1 -1
- package/dist/modules/data-tables/tables/inline-table/components/cells/common.mjs.map +1 -1
- package/dist/modules/data-tables/tables/inline-table/components/cells/drag-handle.client.mjs +1 -1
- package/dist/modules/data-tables/tables/inline-table/components/cells/drag-handle.client.mjs.map +1 -1
- package/dist/modules/data-tables/tables/inline-table/components/cells/read-only.mjs +1 -1
- package/dist/modules/data-tables/tables/inline-table/components/cells/read-only.mjs.map +1 -1
- package/dist/modules/inline-edit/components/date-input.client.mjs +3 -3
- package/dist/modules/inline-edit/components/date-input.client.mjs.map +1 -1
- package/dist/modules/inline-edit/components/date-picker.client.mjs +2 -2
- package/dist/modules/inline-edit/components/date-picker.client.mjs.map +1 -1
- package/dist/modules/inline-edit/components/date-time.client.d.mts +1 -1
- package/dist/modules/inline-edit/components/date-time.client.mjs +1 -1
- package/dist/modules/inline-edit/components/date-time.client.mjs.map +1 -1
- package/dist/modules/inline-edit/components/input-toggle.client.mjs +2 -2
- package/dist/modules/inline-edit/components/input-toggle.client.mjs.map +1 -1
- package/dist/modules/inline-edit/components/input.client.mjs +3 -3
- package/dist/modules/inline-edit/components/input.client.mjs.map +1 -1
- package/dist/modules/inline-edit/components/select.client.d.mts +8 -11
- package/dist/modules/inline-edit/components/select.client.d.mts.map +1 -1
- package/dist/modules/inline-edit/components/select.client.mjs.map +1 -1
- package/dist/modules/inline-edit/components/switch.client.d.mts +3 -2
- package/dist/modules/inline-edit/components/switch.client.d.mts.map +1 -1
- package/dist/modules/inline-edit/components/switch.client.mjs +1 -1
- package/dist/modules/inline-edit/components/switch.client.mjs.map +1 -1
- package/dist/modules/inline-edit/components/toggle.client.mjs +1 -1
- package/dist/modules/inline-edit/components/toggle.client.mjs.map +1 -1
- package/dist/modules/inline-edit/lib/variants.d.mts +1 -1
- package/dist/modules/inline-edit/lib/variants.mjs +1 -1
- package/dist/modules/inline-edit/lib/variants.mjs.map +1 -1
- package/dist/modules/storage/components/dropzone.client.mjs +8 -8
- package/dist/modules/storage/components/dropzone.client.mjs.map +1 -1
- package/dist/modules/storage/components/image-grid.client.mjs +5 -5
- package/dist/modules/storage/components/image-grid.client.mjs.map +1 -1
- package/dist/modules/storage/components/upload-zone.client.mjs +1 -1
- package/dist/modules/storage/components/upload-zone.client.mjs.map +1 -1
- package/dist/modules/storage/lib/router.server.d.mts +11 -11
- package/dist/modules/storage/lib/service.server.d.mts +9 -9
- package/dist/modules/storage/lib/validators.d.mts +7 -7
- package/package.json +6 -31
- package/src/components/editor/components/menu-nodes.client.tsx +1 -1
- package/src/components/editor/components/menu.client.tsx +3 -3
- package/src/components/emails/forget-password-email.tsx +6 -6
- package/src/components/entry.client.ts +16 -0
- package/src/components/entry.ts +6 -14
- package/src/components/header/back-button.client.tsx +2 -2
- package/src/components/header/bottom-bar.client.tsx +2 -2
- package/src/components/header/breadcrumbs.client.tsx +1 -1
- package/src/components/header/header.client.tsx +1 -1
- package/src/components/layouts/empty-page.tsx +2 -2
- package/src/components/layouts/error-page.tsx +3 -3
- package/src/components/layouts/providers.client.tsx +8 -5
- package/src/components/layouts/root-loading.tsx +2 -2
- package/src/components/layouts/tab-layout.tsx +1 -1
- package/src/components/lists/data-list.tsx +1 -1
- package/src/components/lists/data-stack.tsx +1 -1
- package/src/components/navigation/admin-sidebar-header.client.tsx +3 -3
- package/src/components/navigation/admin-sidebar-skeleton.tsx +1 -1
- package/src/components/ui/accordion.client.tsx +83 -0
- package/src/components/ui/alert-dialog.client.tsx +181 -0
- package/src/components/ui/alert.tsx +15 -7
- package/src/components/ui/aspect-ratio.client.tsx +9 -0
- package/src/components/ui/avatar.client.tsx +61 -6
- package/src/components/ui/badge.tsx +17 -11
- package/src/components/ui/breadcrumb.tsx +9 -10
- package/src/components/ui/button-group.tsx +78 -0
- package/src/components/ui/button.tsx +26 -16
- package/src/components/ui/{calendar.tsx → calendar.client.tsx} +27 -20
- package/src/components/ui/card.tsx +41 -8
- package/src/components/ui/{carousel.tsx → carousel.client.tsx} +12 -12
- package/src/components/ui/chart.client.tsx +105 -103
- package/src/components/ui/checkbox.client.tsx +28 -0
- package/src/components/ui/collapsible.client.tsx +2 -2
- package/src/components/ui/combobox-dropdown.client.tsx +2 -2
- package/src/components/ui/combobox.client.tsx +6 -6
- package/src/components/ui/command.client.tsx +179 -0
- package/src/components/ui/{context-menu.tsx → context-menu.client.tsx} +86 -64
- package/src/components/ui/date-picker.client.tsx +2 -2
- package/src/components/ui/dialog.client.tsx +43 -20
- package/src/components/ui/drawer.client.tsx +13 -15
- package/src/components/ui/{dropdown-menu.tsx → dropdown-menu.client.tsx} +45 -24
- package/src/components/ui/empty.tsx +93 -0
- package/src/components/ui/field.client.tsx +224 -0
- package/src/components/ui/form.client.tsx +4 -4
- package/src/components/ui/hover-card.client.tsx +14 -13
- package/src/components/ui/{input-date-time.tsx → input-date-time.client.tsx} +6 -1
- package/src/components/ui/input-date.tsx +1 -1
- package/src/components/ui/input-group.client.tsx +191 -0
- package/src/components/ui/input-recipient.tsx +12 -12
- package/src/components/ui/input-time.tsx +1 -1
- package/src/components/ui/input.tsx +2 -4
- package/src/components/ui/item.tsx +182 -0
- package/src/components/ui/kbd.tsx +26 -0
- package/src/components/ui/label.tsx +2 -3
- package/src/components/ui/loader.tsx +51 -0
- package/src/components/ui/navigation-menu.tsx +14 -17
- package/src/components/ui/pagination.tsx +31 -26
- package/src/components/ui/popover.client.tsx +73 -0
- package/src/components/ui/progress.client.tsx +6 -4
- package/src/components/ui/radio-group.tsx +5 -7
- package/src/components/ui/resizable.client.tsx +9 -19
- package/src/components/ui/scroll-area.tsx +5 -7
- package/src/components/ui/select.client.tsx +40 -22
- package/src/components/ui/separator.tsx +3 -4
- package/src/components/ui/sheet.client.tsx +19 -18
- package/src/components/ui/sidebar.client.tsx +27 -27
- package/src/components/ui/skeleton.tsx +1 -1
- package/src/components/ui/slider.tsx +5 -10
- package/src/components/ui/spinner.tsx +12 -48
- package/src/components/ui/switch.client.tsx +32 -0
- package/src/components/ui/tabs.client.tsx +79 -0
- package/src/components/ui/textarea.tsx +1 -2
- package/src/components/ui/toggle-group.client.tsx +26 -10
- package/src/components/ui/toggle.client.tsx +44 -0
- package/src/components/ui/tooltip.client.tsx +4 -9
- package/src/lib/hooks/use-indicator.tsx +4 -7
- package/src/modules/auth/components/auth-layout.server.tsx +2 -2
- package/src/modules/auth/components/create-first-user-page.client.tsx +4 -4
- package/src/modules/auth/components/forget-password-page.client.tsx +1 -1
- package/src/modules/auth/components/login-page.client.tsx +6 -6
- package/src/modules/auth/components/reset-password-page.client.tsx +7 -7
- package/src/modules/commands/components/alert-dialog-command.client.tsx +20 -16
- package/src/modules/commands/components/click-command.client.tsx +2 -2
- package/src/modules/commands/components/dialog-command.client.tsx +11 -10
- package/src/modules/commands/components/dropdown-command.client.tsx +2 -2
- package/src/modules/commands/components/empty-command.client.tsx +2 -2
- package/src/modules/commands/components/form-dialog-command.client.tsx +29 -13
- package/src/modules/commands/menus/context-menu.client.tsx +3 -4
- package/src/modules/commands/menus/dropdown-menu.client.tsx +2 -2
- package/src/modules/commands/menus/floating-menu.client.tsx +2 -2
- package/src/modules/commands/utils/archive-command.client.tsx +1 -1
- package/src/modules/commands/utils/delete-command.client.tsx +1 -1
- package/src/modules/data-tables/components/cell/select.client.tsx +1 -1
- package/src/modules/data-tables/components/column-header.tsx +5 -5
- package/src/modules/data-tables/components/filters/combobox.client.tsx +6 -6
- package/src/modules/data-tables/components/filters/slider.client.tsx +2 -2
- package/src/modules/data-tables/components/header.tsx +1 -1
- package/src/modules/data-tables/components/skeleton.tsx +2 -2
- package/src/modules/data-tables/components/table.tsx +3 -3
- package/src/modules/data-tables/components/toolbar.tsx +1 -1
- package/src/modules/data-tables/strategies/pagination/components.tsx +3 -3
- package/src/modules/data-tables/tables/inline-table/components/cells/common.tsx +1 -1
- package/src/modules/data-tables/tables/inline-table/components/cells/drag-handle.client.tsx +1 -1
- package/src/modules/data-tables/tables/inline-table/components/cells/read-only.tsx +1 -1
- package/src/modules/inline-edit/components/date-input.client.tsx +3 -3
- package/src/modules/inline-edit/components/date-picker.client.tsx +2 -2
- package/src/modules/inline-edit/components/date-time.client.tsx +1 -1
- package/src/modules/inline-edit/components/input-toggle.client.tsx +2 -2
- package/src/modules/inline-edit/components/input.client.tsx +3 -3
- package/src/modules/inline-edit/components/select.client.tsx +6 -20
- package/src/modules/inline-edit/components/switch.client.tsx +3 -3
- package/src/modules/inline-edit/components/toggle.client.tsx +1 -1
- package/src/modules/inline-edit/lib/variants.ts +1 -1
- package/src/modules/storage/components/dropzone.client.tsx +8 -8
- package/src/modules/storage/components/image-grid.client.tsx +5 -5
- package/src/modules/storage/components/upload-zone.client.tsx +1 -1
- package/src/styles.css +1 -3
- package/dist/components/ui/accordion.d.mts +0 -25
- package/dist/components/ui/accordion.d.mts.map +0 -1
- package/dist/components/ui/accordion.mjs +0 -46
- package/dist/components/ui/accordion.mjs.map +0 -1
- package/dist/components/ui/alert-dialog.d.mts +0 -43
- package/dist/components/ui/alert-dialog.d.mts.map +0 -1
- package/dist/components/ui/alert-dialog.mjs +0 -84
- package/dist/components/ui/alert-dialog.mjs.map +0 -1
- package/dist/components/ui/aspect-ratio.d.mts +0 -8
- package/dist/components/ui/aspect-ratio.d.mts.map +0 -1
- package/dist/components/ui/aspect-ratio.mjs +0 -16
- package/dist/components/ui/aspect-ratio.mjs.map +0 -1
- package/dist/components/ui/calendar.d.mts.map +0 -1
- package/dist/components/ui/calendar.mjs.map +0 -1
- package/dist/components/ui/carousel.d.mts.map +0 -1
- package/dist/components/ui/carousel.mjs.map +0 -1
- package/dist/components/ui/checkbox.d.mts +0 -12
- package/dist/components/ui/checkbox.d.mts.map +0 -1
- package/dist/components/ui/checkbox.mjs +0 -24
- package/dist/components/ui/checkbox.mjs.map +0 -1
- package/dist/components/ui/command.d.mts.map +0 -1
- package/dist/components/ui/command.mjs +0 -88
- package/dist/components/ui/command.mjs.map +0 -1
- package/dist/components/ui/context-menu.d.mts +0 -77
- package/dist/components/ui/context-menu.d.mts.map +0 -1
- package/dist/components/ui/context-menu.mjs +0 -125
- package/dist/components/ui/context-menu.mjs.map +0 -1
- package/dist/components/ui/dropdown-menu.d.mts +0 -78
- package/dist/components/ui/dropdown-menu.d.mts.map +0 -1
- package/dist/components/ui/dropdown-menu.mjs +0 -126
- package/dist/components/ui/dropdown-menu.mjs.map +0 -1
- package/dist/components/ui/input-date-time.d.mts.map +0 -1
- package/dist/components/ui/input-date-time.mjs.map +0 -1
- package/dist/components/ui/popover.d.mts +0 -23
- package/dist/components/ui/popover.d.mts.map +0 -1
- package/dist/components/ui/popover.mjs +0 -38
- package/dist/components/ui/popover.mjs.map +0 -1
- package/dist/components/ui/switch.d.mts +0 -12
- package/dist/components/ui/switch.d.mts.map +0 -1
- package/dist/components/ui/switch.mjs +0 -22
- package/dist/components/ui/switch.mjs.map +0 -1
- package/dist/components/ui/tabs.d.mts +0 -24
- package/dist/components/ui/tabs.d.mts.map +0 -1
- package/dist/components/ui/tabs.mjs +0 -39
- package/dist/components/ui/tabs.mjs.map +0 -1
- package/dist/components/ui/toggle.d.mts.map +0 -1
- package/dist/components/ui/toggle.mjs +0 -40
- package/dist/components/ui/toggle.mjs.map +0 -1
- package/src/components/ui/accordion.tsx +0 -63
- package/src/components/ui/alert-dialog.tsx +0 -133
- package/src/components/ui/aspect-ratio.tsx +0 -9
- package/src/components/ui/checkbox.tsx +0 -29
- package/src/components/ui/command.tsx +0 -154
- package/src/components/ui/popover.tsx +0 -42
- package/src/components/ui/switch.tsx +0 -28
- package/src/components/ui/tabs.tsx +0 -54
- package/src/components/ui/toggle.tsx +0 -46
|
@@ -1,47 +1,55 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
3
|
import { cn } from "../../lib/utils/cn.mjs";
|
|
4
|
-
import { toggleVariants } from "./toggle.mjs";
|
|
4
|
+
import { toggleVariants } from "./toggle.client.mjs";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
import { ToggleGroup } from "radix-ui";
|
|
6
7
|
import * as React$1 from "react";
|
|
7
|
-
import * as ToggleGroupPrimitive from "@radix-ui/react-toggle-group";
|
|
8
8
|
|
|
9
9
|
//#region src/components/ui/toggle-group.client.tsx
|
|
10
10
|
const ToggleGroupContext = React$1.createContext({
|
|
11
11
|
size: "default",
|
|
12
|
-
variant: "default"
|
|
12
|
+
variant: "default",
|
|
13
|
+
spacing: 0,
|
|
14
|
+
orientation: "horizontal"
|
|
13
15
|
});
|
|
14
|
-
function ToggleGroup({ className, variant, size, children, ...props }) {
|
|
15
|
-
return /* @__PURE__ */ jsx(
|
|
16
|
+
function ToggleGroup$1({ className, variant, size, spacing = 0, orientation = "horizontal", children, ...props }) {
|
|
17
|
+
return /* @__PURE__ */ jsx(ToggleGroup.Root, {
|
|
16
18
|
"data-slot": "toggle-group",
|
|
17
19
|
"data-variant": variant,
|
|
18
20
|
"data-size": size,
|
|
19
|
-
|
|
21
|
+
"data-spacing": spacing,
|
|
22
|
+
"data-orientation": orientation,
|
|
23
|
+
style: { "--gap": spacing },
|
|
24
|
+
className: cn("group/toggle-group flex w-fit flex-row items-center gap-[--spacing(var(--gap))] rounded-lg data-[orientation=vertical]:flex-col data-[orientation=vertical]:items-stretch data-[size=sm]:rounded-[min(var(--radius-md),10px)]", className),
|
|
20
25
|
...props,
|
|
21
26
|
children: /* @__PURE__ */ jsx(ToggleGroupContext.Provider, {
|
|
22
27
|
value: {
|
|
23
28
|
variant,
|
|
24
|
-
size
|
|
29
|
+
size,
|
|
30
|
+
spacing,
|
|
31
|
+
orientation
|
|
25
32
|
},
|
|
26
33
|
children
|
|
27
34
|
})
|
|
28
35
|
});
|
|
29
36
|
}
|
|
30
|
-
function ToggleGroupItem({ className, children, variant, size, ...props }) {
|
|
37
|
+
function ToggleGroupItem({ className, children, variant = "default", size = "default", ...props }) {
|
|
31
38
|
const context = React$1.useContext(ToggleGroupContext);
|
|
32
|
-
return /* @__PURE__ */ jsx(
|
|
39
|
+
return /* @__PURE__ */ jsx(ToggleGroup.Item, {
|
|
33
40
|
"data-slot": "toggle-group-item",
|
|
34
41
|
"data-variant": context.variant || variant,
|
|
35
42
|
"data-size": context.size || size,
|
|
36
|
-
|
|
43
|
+
"data-spacing": context.spacing,
|
|
44
|
+
className: cn("shrink-0 focus:z-10 focus-visible:z-10 group-data-[spacing=0]/toggle-group:rounded-none group-data-[orientation=vertical]/toggle-group:data-[spacing=0]:data-[variant=outline]:border-t-0 group-data-[orientation=horizontal]/toggle-group:data-[spacing=0]:data-[variant=outline]:border-l-0 group-data-[spacing=0]/toggle-group:px-2 group-data-[orientation=horizontal]/toggle-group:data-[spacing=0]:last:rounded-r-lg group-data-[orientation=vertical]/toggle-group:data-[spacing=0]:last:rounded-b-lg group-data-[orientation=vertical]/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-t group-data-[orientation=horizontal]/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-l group-data-[orientation=vertical]/toggle-group:data-[spacing=0]:first:rounded-t-lg group-data-[orientation=horizontal]/toggle-group:data-[spacing=0]:first:rounded-l-lg", toggleVariants({
|
|
37
45
|
variant: context.variant || variant,
|
|
38
46
|
size: context.size || size
|
|
39
|
-
}),
|
|
47
|
+
}), className),
|
|
40
48
|
...props,
|
|
41
49
|
children
|
|
42
50
|
});
|
|
43
51
|
}
|
|
44
52
|
|
|
45
53
|
//#endregion
|
|
46
|
-
export { ToggleGroup, ToggleGroupItem };
|
|
54
|
+
export { ToggleGroup$1 as ToggleGroup, ToggleGroupItem };
|
|
47
55
|
//# sourceMappingURL=toggle-group.client.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toggle-group.client.mjs","names":["React"],"sources":["../../../src/components/ui/toggle-group.client.tsx"],"sourcesContent":["\"use client\";\n\nimport
|
|
1
|
+
{"version":3,"file":"toggle-group.client.mjs","names":["React","ToggleGroup","ToggleGroupPrimitive"],"sources":["../../../src/components/ui/toggle-group.client.tsx"],"sourcesContent":["\"use client\";\n\nimport type { VariantProps } from \"class-variance-authority\";\nimport { ToggleGroup as ToggleGroupPrimitive } from \"radix-ui\";\nimport * as React from \"react\";\nimport { cn } from \"@/lib/utils/cn\";\nimport { toggleVariants } from \"./toggle.client\";\n\nconst ToggleGroupContext = React.createContext<\n VariantProps<typeof toggleVariants> & {\n spacing?: number;\n orientation?: \"horizontal\" | \"vertical\";\n }\n>({\n size: \"default\",\n variant: \"default\",\n spacing: 0,\n orientation: \"horizontal\",\n});\n\nfunction ToggleGroup({\n className,\n variant,\n size,\n spacing = 0,\n orientation = \"horizontal\",\n children,\n ...props\n}: React.ComponentProps<typeof ToggleGroupPrimitive.Root> &\n VariantProps<typeof toggleVariants> & {\n spacing?: number;\n orientation?: \"horizontal\" | \"vertical\";\n }) {\n return (\n <ToggleGroupPrimitive.Root\n data-slot=\"toggle-group\"\n data-variant={variant}\n data-size={size}\n data-spacing={spacing}\n data-orientation={orientation}\n style={{ \"--gap\": spacing } as React.CSSProperties}\n className={cn(\n \"group/toggle-group flex w-fit flex-row items-center gap-[--spacing(var(--gap))] rounded-lg data-[orientation=vertical]:flex-col data-[orientation=vertical]:items-stretch data-[size=sm]:rounded-[min(var(--radius-md),10px)]\",\n className,\n )}\n {...props}\n >\n <ToggleGroupContext.Provider value={{ variant, size, spacing, orientation }}>\n {children}\n </ToggleGroupContext.Provider>\n </ToggleGroupPrimitive.Root>\n );\n}\n\nfunction ToggleGroupItem({\n className,\n children,\n variant = \"default\",\n size = \"default\",\n ...props\n}: React.ComponentProps<typeof ToggleGroupPrimitive.Item> & VariantProps<typeof toggleVariants>) {\n const context = React.useContext(ToggleGroupContext);\n\n return (\n <ToggleGroupPrimitive.Item\n data-slot=\"toggle-group-item\"\n data-variant={context.variant || variant}\n data-size={context.size || size}\n data-spacing={context.spacing}\n className={cn(\n \"shrink-0 focus:z-10 focus-visible:z-10 group-data-[spacing=0]/toggle-group:rounded-none group-data-[orientation=vertical]/toggle-group:data-[spacing=0]:data-[variant=outline]:border-t-0 group-data-[orientation=horizontal]/toggle-group:data-[spacing=0]:data-[variant=outline]:border-l-0 group-data-[spacing=0]/toggle-group:px-2 group-data-[orientation=horizontal]/toggle-group:data-[spacing=0]:last:rounded-r-lg group-data-[orientation=vertical]/toggle-group:data-[spacing=0]:last:rounded-b-lg group-data-[orientation=vertical]/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-t group-data-[orientation=horizontal]/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-l group-data-[orientation=vertical]/toggle-group:data-[spacing=0]:first:rounded-t-lg group-data-[orientation=horizontal]/toggle-group:data-[spacing=0]:first:rounded-l-lg\",\n toggleVariants({\n variant: context.variant || variant,\n size: context.size || size,\n }),\n className,\n )}\n {...props}\n >\n {children}\n </ToggleGroupPrimitive.Item>\n );\n}\n\nexport { ToggleGroup, ToggleGroupItem };\n"],"mappings":";;;;;;;;;AAQA,MAAM,qBAAqBA,QAAM,cAK/B;CACA,MAAM;CACN,SAAS;CACT,SAAS;CACT,aAAa;CACd,CAAC;AAEF,SAASC,cAAY,EACnB,WACA,SACA,MACA,UAAU,GACV,cAAc,cACd,UACA,GAAG,SAKA;AACH,QACE,oBAACC,YAAqB;EACpB,aAAU;EACV,gBAAc;EACd,aAAW;EACX,gBAAc;EACd,oBAAkB;EAClB,OAAO,EAAE,SAAS,SAAS;EAC3B,WAAW,GACT,iOACA,UACD;EACD,GAAI;YAEJ,oBAAC,mBAAmB;GAAS,OAAO;IAAE;IAAS;IAAM;IAAS;IAAa;GACxE;IAC2B;GACJ;;AAIhC,SAAS,gBAAgB,EACvB,WACA,UACA,UAAU,WACV,OAAO,WACP,GAAG,SAC4F;CAC/F,MAAM,UAAUF,QAAM,WAAW,mBAAmB;AAEpD,QACE,oBAACE,YAAqB;EACpB,aAAU;EACV,gBAAc,QAAQ,WAAW;EACjC,aAAW,QAAQ,QAAQ;EAC3B,gBAAc,QAAQ;EACtB,WAAW,GACT,s2BACA,eAAe;GACb,SAAS,QAAQ,WAAW;GAC5B,MAAM,QAAQ,QAAQ;GACvB,CAAC,EACF,UACD;EACD,GAAI;EAEH;GACyB"}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
2
|
import { VariantProps } from "class-variance-authority";
|
|
3
|
+
import { Toggle } from "radix-ui";
|
|
3
4
|
import * as React$1 from "react";
|
|
4
|
-
import * as TogglePrimitive from "@radix-ui/react-toggle";
|
|
5
5
|
import * as class_variance_authority_types0 from "class-variance-authority/types";
|
|
6
6
|
|
|
7
|
-
//#region src/components/ui/toggle.d.ts
|
|
7
|
+
//#region src/components/ui/toggle.client.d.ts
|
|
8
8
|
declare const toggleVariants: (props?: ({
|
|
9
9
|
variant?: "default" | "outline" | null | undefined;
|
|
10
10
|
size?: "default" | "sm" | "lg" | null | undefined;
|
|
11
11
|
} & class_variance_authority_types0.ClassProp) | undefined) => string;
|
|
12
|
-
declare function Toggle({
|
|
12
|
+
declare function Toggle$1({
|
|
13
13
|
className,
|
|
14
14
|
variant,
|
|
15
15
|
size,
|
|
16
16
|
...props
|
|
17
|
-
}: React$1.ComponentProps<typeof
|
|
17
|
+
}: React$1.ComponentProps<typeof Toggle.Root> & VariantProps<typeof toggleVariants>): react_jsx_runtime0.JSX.Element;
|
|
18
18
|
//#endregion
|
|
19
|
-
export { Toggle, toggleVariants };
|
|
20
|
-
//# sourceMappingURL=toggle.d.mts.map
|
|
19
|
+
export { Toggle$1 as Toggle, toggleVariants };
|
|
20
|
+
//# sourceMappingURL=toggle.client.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toggle.client.d.mts","names":[],"sources":["../../../src/components/ui/toggle.client.tsx"],"mappings":";;;;;;;cAOM,cAAA,GAAc,KAAA;;;IAmBnB,+BAAA,CAAA,SAAA;AAAA,iBAEQ,QAAA,CAAA;EACP,SAAA;EACA,OAAA;EACA,IAAA;EAAA,GACG;AAAA,GACF,OAAA,CAAM,cAAA,QAAsB,MAAA,CAAgB,IAAA,IAAQ,YAAA,QAAoB,cAAA,IAAe,kBAAA,CAAA,GAAA,CAAA,OAAA"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { cn } from "../../lib/utils/cn.mjs";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
import { cva } from "class-variance-authority";
|
|
6
|
+
import { Toggle } from "radix-ui";
|
|
7
|
+
|
|
8
|
+
//#region src/components/ui/toggle.client.tsx
|
|
9
|
+
const toggleVariants = cva("hover:text-foreground aria-pressed:bg-muted focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive data-[state=on]:bg-muted gap-1 rounded-lg text-sm font-medium transition-all [&_svg:not([class*='size-'])]:size-4 group/toggle inline-flex items-center justify-center whitespace-nowrap outline-none hover:bg-muted focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0", {
|
|
10
|
+
variants: {
|
|
11
|
+
variant: {
|
|
12
|
+
default: "bg-transparent",
|
|
13
|
+
outline: "border-input hover:bg-muted border bg-transparent"
|
|
14
|
+
},
|
|
15
|
+
size: {
|
|
16
|
+
default: "h-8 min-w-8 px-2",
|
|
17
|
+
sm: "h-7 min-w-7 rounded-[min(var(--radius-md),12px)] px-1.5 text-[0.8rem]",
|
|
18
|
+
lg: "h-9 min-w-9 px-2.5"
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
defaultVariants: {
|
|
22
|
+
variant: "default",
|
|
23
|
+
size: "default"
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
function Toggle$1({ className, variant = "default", size = "default", ...props }) {
|
|
27
|
+
return /* @__PURE__ */ jsx(Toggle.Root, {
|
|
28
|
+
"data-slot": "toggle",
|
|
29
|
+
className: cn(toggleVariants({
|
|
30
|
+
variant,
|
|
31
|
+
size,
|
|
32
|
+
className
|
|
33
|
+
})),
|
|
34
|
+
...props
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
//#endregion
|
|
39
|
+
export { Toggle$1 as Toggle, toggleVariants };
|
|
40
|
+
//# sourceMappingURL=toggle.client.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toggle.client.mjs","names":["Toggle","TogglePrimitive"],"sources":["../../../src/components/ui/toggle.client.tsx"],"sourcesContent":["\"use client\";\n\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport { Toggle as TogglePrimitive } from \"radix-ui\";\nimport type * as React from \"react\";\nimport { cn } from \"@/lib/utils/cn\";\n\nconst toggleVariants = cva(\n \"hover:text-foreground aria-pressed:bg-muted focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive data-[state=on]:bg-muted gap-1 rounded-lg text-sm font-medium transition-all [&_svg:not([class*='size-'])]:size-4 group/toggle inline-flex items-center justify-center whitespace-nowrap outline-none hover:bg-muted focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0\",\n {\n variants: {\n variant: {\n default: \"bg-transparent\",\n outline: \"border-input hover:bg-muted border bg-transparent\",\n },\n size: {\n default: \"h-8 min-w-8 px-2\",\n sm: \"h-7 min-w-7 rounded-[min(var(--radius-md),12px)] px-1.5 text-[0.8rem]\",\n lg: \"h-9 min-w-9 px-2.5\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n },\n);\n\nfunction Toggle({\n className,\n variant = \"default\",\n size = \"default\",\n ...props\n}: React.ComponentProps<typeof TogglePrimitive.Root> & VariantProps<typeof toggleVariants>) {\n return (\n <TogglePrimitive.Root\n data-slot=\"toggle\"\n className={cn(toggleVariants({ variant, size, className }))}\n {...props}\n />\n );\n}\n\nexport { Toggle, toggleVariants };\n"],"mappings":";;;;;;;;AAOA,MAAM,iBAAiB,IACrB,uhBACA;CACE,UAAU;EACR,SAAS;GACP,SAAS;GACT,SAAS;GACV;EACD,MAAM;GACJ,SAAS;GACT,IAAI;GACJ,IAAI;GACL;EACF;CACD,iBAAiB;EACf,SAAS;EACT,MAAM;EACP;CACF,CACF;AAED,SAASA,SAAO,EACd,WACA,UAAU,WACV,OAAO,WACP,GAAG,SACuF;AAC1F,QACE,oBAACC,OAAgB;EACf,aAAU;EACV,WAAW,GAAG,eAAe;GAAE;GAAS;GAAM;GAAW,CAAC,CAAC;EAC3D,GAAI;GACJ"}
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
|
+
import { Tooltip } from "radix-ui";
|
|
2
3
|
import * as React$1 from "react";
|
|
3
|
-
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
|
4
4
|
|
|
5
5
|
//#region src/components/ui/tooltip.client.d.ts
|
|
6
6
|
declare function TooltipProvider({
|
|
7
7
|
delayDuration,
|
|
8
8
|
...props
|
|
9
|
-
}: React$1.ComponentProps<typeof
|
|
10
|
-
declare function Tooltip({
|
|
9
|
+
}: React$1.ComponentProps<typeof Tooltip.Provider>): react_jsx_runtime0.JSX.Element;
|
|
10
|
+
declare function Tooltip$1({
|
|
11
11
|
...props
|
|
12
|
-
}: React$1.ComponentProps<typeof
|
|
12
|
+
}: React$1.ComponentProps<typeof Tooltip.Root>): react_jsx_runtime0.JSX.Element;
|
|
13
13
|
declare function TooltipTrigger({
|
|
14
14
|
...props
|
|
15
|
-
}: React$1.ComponentProps<typeof
|
|
15
|
+
}: React$1.ComponentProps<typeof Tooltip.Trigger>): react_jsx_runtime0.JSX.Element;
|
|
16
16
|
declare function TooltipContent({
|
|
17
17
|
className,
|
|
18
18
|
sideOffset,
|
|
19
19
|
children,
|
|
20
20
|
...props
|
|
21
|
-
}: React$1.ComponentProps<typeof
|
|
21
|
+
}: React$1.ComponentProps<typeof Tooltip.Content>): react_jsx_runtime0.JSX.Element;
|
|
22
22
|
//#endregion
|
|
23
|
-
export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger };
|
|
23
|
+
export { Tooltip$1 as Tooltip, TooltipContent, TooltipProvider, TooltipTrigger };
|
|
24
24
|
//# sourceMappingURL=tooltip.client.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tooltip.client.d.mts","names":[],"sources":["../../../src/components/ui/tooltip.client.tsx"],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"tooltip.client.d.mts","names":[],"sources":["../../../src/components/ui/tooltip.client.tsx"],"mappings":";;;;;iBAMS,eAAA,CAAA;EACP,aAAA;EAAA,GACG;AAAA,GACF,OAAA,CAAM,cAAA,QAAsB,OAAA,CAAiB,QAAA,IAAS,kBAAA,CAAA,GAAA,CAAA,OAAA;AAAA,iBAUhD,SAAA,CAAA;EAAA,GAAa;AAAA,GAAS,OAAA,CAAM,cAAA,QAAsB,OAAA,CAAiB,IAAA,IAAK,kBAAA,CAAA,GAAA,CAAA,OAAA;AAAA,iBAIxE,cAAA,CAAA;EAAA,GAAoB;AAAA,GAAS,OAAA,CAAM,cAAA,QAAsB,OAAA,CAAiB,OAAA,IAAQ,kBAAA,CAAA,GAAA,CAAA,OAAA;AAAA,iBAIlF,cAAA,CAAA;EACP,SAAA;EACA,UAAA;EACA,QAAA;EAAA,GACG;AAAA,GACF,OAAA,CAAM,cAAA,QAAsB,OAAA,CAAiB,OAAA,IAAQ,kBAAA,CAAA,GAAA,CAAA,OAAA"}
|
|
@@ -2,38 +2,38 @@
|
|
|
2
2
|
|
|
3
3
|
import { cn } from "../../lib/utils/cn.mjs";
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
-
import
|
|
5
|
+
import { Tooltip } from "radix-ui";
|
|
6
6
|
|
|
7
7
|
//#region src/components/ui/tooltip.client.tsx
|
|
8
8
|
function TooltipProvider({ delayDuration = 0, ...props }) {
|
|
9
|
-
return /* @__PURE__ */ jsx(
|
|
9
|
+
return /* @__PURE__ */ jsx(Tooltip.Provider, {
|
|
10
10
|
"data-slot": "tooltip-provider",
|
|
11
11
|
delayDuration,
|
|
12
12
|
...props
|
|
13
13
|
});
|
|
14
14
|
}
|
|
15
|
-
function Tooltip({ ...props }) {
|
|
16
|
-
return /* @__PURE__ */ jsx(
|
|
15
|
+
function Tooltip$1({ ...props }) {
|
|
16
|
+
return /* @__PURE__ */ jsx(Tooltip.Root, {
|
|
17
17
|
"data-slot": "tooltip",
|
|
18
18
|
...props
|
|
19
|
-
})
|
|
19
|
+
});
|
|
20
20
|
}
|
|
21
21
|
function TooltipTrigger({ ...props }) {
|
|
22
|
-
return /* @__PURE__ */ jsx(
|
|
22
|
+
return /* @__PURE__ */ jsx(Tooltip.Trigger, {
|
|
23
23
|
"data-slot": "tooltip-trigger",
|
|
24
24
|
...props
|
|
25
25
|
});
|
|
26
26
|
}
|
|
27
27
|
function TooltipContent({ className, sideOffset = 0, children, ...props }) {
|
|
28
|
-
return /* @__PURE__ */ jsx(
|
|
28
|
+
return /* @__PURE__ */ jsx(Tooltip.Portal, { children: /* @__PURE__ */ jsxs(Tooltip.Content, {
|
|
29
29
|
"data-slot": "tooltip-content",
|
|
30
30
|
sideOffset,
|
|
31
|
-
className: cn("
|
|
31
|
+
className: cn("data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 inline-flex w-fit max-w-xs origin-(--radix-tooltip-content-transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-background text-xs has-data-[slot=kbd]:pr-1.5 data-[state=closed]:animate-out data-[state=delayed-open]:animate-in data-[state=open]:animate-in **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm", className),
|
|
32
32
|
...props,
|
|
33
|
-
children: [children, /* @__PURE__ */ jsx(
|
|
33
|
+
children: [children, /* @__PURE__ */ jsx(Tooltip.Arrow, { className: "z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground" })]
|
|
34
34
|
}) });
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
//#endregion
|
|
38
|
-
export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger };
|
|
38
|
+
export { Tooltip$1 as Tooltip, TooltipContent, TooltipProvider, TooltipTrigger };
|
|
39
39
|
//# sourceMappingURL=tooltip.client.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tooltip.client.mjs","names":[],"sources":["../../../src/components/ui/tooltip.client.tsx"],"sourcesContent":["\"use client\";\n\nimport
|
|
1
|
+
{"version":3,"file":"tooltip.client.mjs","names":["TooltipPrimitive","Tooltip"],"sources":["../../../src/components/ui/tooltip.client.tsx"],"sourcesContent":["\"use client\";\n\nimport { Tooltip as TooltipPrimitive } from \"radix-ui\";\nimport type * as React from \"react\";\nimport { cn } from \"@/lib/utils/cn\";\n\nfunction TooltipProvider({\n delayDuration = 0,\n ...props\n}: React.ComponentProps<typeof TooltipPrimitive.Provider>) {\n return (\n <TooltipPrimitive.Provider\n data-slot=\"tooltip-provider\"\n delayDuration={delayDuration}\n {...props}\n />\n );\n}\n\nfunction Tooltip({ ...props }: React.ComponentProps<typeof TooltipPrimitive.Root>) {\n return <TooltipPrimitive.Root data-slot=\"tooltip\" {...props} />;\n}\n\nfunction TooltipTrigger({ ...props }: React.ComponentProps<typeof TooltipPrimitive.Trigger>) {\n return <TooltipPrimitive.Trigger data-slot=\"tooltip-trigger\" {...props} />;\n}\n\nfunction TooltipContent({\n className,\n sideOffset = 0,\n children,\n ...props\n}: React.ComponentProps<typeof TooltipPrimitive.Content>) {\n return (\n <TooltipPrimitive.Portal>\n <TooltipPrimitive.Content\n data-slot=\"tooltip-content\"\n sideOffset={sideOffset}\n className={cn(\n \"data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 inline-flex w-fit max-w-xs origin-(--radix-tooltip-content-transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-background text-xs has-data-[slot=kbd]:pr-1.5 data-[state=closed]:animate-out data-[state=delayed-open]:animate-in data-[state=open]:animate-in **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm\",\n className,\n )}\n {...props}\n >\n {children}\n <TooltipPrimitive.Arrow className=\"z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground\" />\n </TooltipPrimitive.Content>\n </TooltipPrimitive.Portal>\n );\n}\n\nexport { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger };\n"],"mappings":";;;;;;;AAMA,SAAS,gBAAgB,EACvB,gBAAgB,GAChB,GAAG,SACsD;AACzD,QACE,oBAACA,QAAiB;EAChB,aAAU;EACK;EACf,GAAI;GACJ;;AAIN,SAASC,UAAQ,EAAE,GAAG,SAA6D;AACjF,QAAO,oBAACD,QAAiB;EAAK,aAAU;EAAU,GAAI;GAAS;;AAGjE,SAAS,eAAe,EAAE,GAAG,SAAgE;AAC3F,QAAO,oBAACA,QAAiB;EAAQ,aAAU;EAAkB,GAAI;GAAS;;AAG5E,SAAS,eAAe,EACtB,WACA,aAAa,GACb,UACA,GAAG,SACqD;AACxD,QACE,oBAACA,QAAiB,oBAChB,qBAACA,QAAiB;EAChB,aAAU;EACE;EACZ,WAAW,GACT,8uBACA,UACD;EACD,GAAI;aAEH,UACD,oBAACA,QAAiB,SAAM,WAAU,uGAAuG;GAChH,GACH"}
|
package/dist/components.d.mts
CHANGED
|
@@ -4,8 +4,9 @@ import { ScrollArea, ScrollBar } from "./components/ui/scroll-area.mjs";
|
|
|
4
4
|
import { Button, buttonVariants } from "./components/ui/button.mjs";
|
|
5
5
|
import { Input } from "./components/ui/input.mjs";
|
|
6
6
|
import { Separator } from "./components/ui/separator.mjs";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
7
|
+
import { Label } from "./components/ui/label.mjs";
|
|
8
|
+
import { DateInput, DateInputProps } from "./components/ui/input-date.mjs";
|
|
9
|
+
import { TimeInput, TimeInputProps } from "./components/ui/input-time.mjs";
|
|
9
10
|
import { Icon, Icons } from "./components/common/icons.mjs";
|
|
10
11
|
import { CreateStatusComponentProps, StatusBadge, StatusField, createStatusConfig, createStatusVariants, findStatus } from "./components/common/status.mjs";
|
|
11
12
|
import { createFileHandlerUploadStrategy } from "./components/editor/extensions/file-handler/strategy.mjs";
|
|
@@ -21,28 +22,19 @@ import { RootLoading } from "./components/layouts/root-loading.mjs";
|
|
|
21
22
|
import { Tab, TabLayout, TabLayoutProps } from "./components/layouts/tab-layout.mjs";
|
|
22
23
|
import { DataList, DataListItem, DataListItemProps, DataListProps, DataListTitle, DataListTitleProps, DataListValue, DataListValueProps } from "./components/lists/data-list.mjs";
|
|
23
24
|
import { DataStack, DataStackColumn, DataStackColumnProps, DataStackGrid, DataStackGridProps, DataStackLayout, DataStackLayoutProps, DataStackProps, DataStackRow, DataStackRowProps, DataStackTitle, DataStackTitleProps, DataStackValue, DataStackValueProps } from "./components/lists/data-stack.mjs";
|
|
24
|
-
import {
|
|
25
|
-
import { Alert, AlertDescription, AlertTitle } from "./components/ui/alert.mjs";
|
|
26
|
-
import { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger } from "./components/ui/alert-dialog.mjs";
|
|
27
|
-
import { AspectRatio } from "./components/ui/aspect-ratio.mjs";
|
|
25
|
+
import { Alert, AlertAction, AlertDescription, AlertTitle } from "./components/ui/alert.mjs";
|
|
28
26
|
import { Badge, badgeVariants } from "./components/ui/badge.mjs";
|
|
29
|
-
import {
|
|
30
|
-
import { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from "./components/ui/card.mjs";
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger } from "./components/ui/dropdown-menu.mjs";
|
|
36
|
-
import { DateInput } from "./components/ui/input-date.mjs";
|
|
37
|
-
import { DateTimeInput } from "./components/ui/input-date-time.mjs";
|
|
38
|
-
import { TimeInput } from "./components/ui/input-time.mjs";
|
|
39
|
-
import { Label } from "./components/ui/label.mjs";
|
|
27
|
+
import { ButtonGroup, ButtonGroupSeparator, ButtonGroupText, buttonGroupVariants } from "./components/ui/button-group.mjs";
|
|
28
|
+
import { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from "./components/ui/card.mjs";
|
|
29
|
+
import { Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle } from "./components/ui/empty.mjs";
|
|
30
|
+
import { Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle } from "./components/ui/item.mjs";
|
|
31
|
+
import { Kbd, KbdGroup } from "./components/ui/kbd.mjs";
|
|
32
|
+
import { Loader } from "./components/ui/loader.mjs";
|
|
40
33
|
import { NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, navigationMenuTriggerStyle } from "./components/ui/navigation-menu.mjs";
|
|
41
34
|
import { Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious } from "./components/ui/pagination.mjs";
|
|
42
35
|
import { RadioGroup, RadioGroupItem } from "./components/ui/radio-group.mjs";
|
|
43
36
|
import { Skeleton } from "./components/ui/skeleton.mjs";
|
|
44
37
|
import { Slider } from "./components/ui/slider.mjs";
|
|
45
|
-
import {
|
|
46
|
-
import { Tabs, TabsContent, TabsList, TabsTrigger } from "./components/ui/tabs.mjs";
|
|
38
|
+
import { Spinner } from "./components/ui/spinner.mjs";
|
|
47
39
|
import { Textarea } from "./components/ui/textarea.mjs";
|
|
48
|
-
export {
|
|
40
|
+
export { AdminErrorPage, AdminLoadingLayout, AdminNotAllowedPage, AdminNotFoundPage, Alert, AlertAction, AlertDescription, AlertTitle, Badge, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, CreateStatusComponentProps, DataList, DataListItem, DataListItemProps, DataListProps, DataListTitle, DataListTitleProps, DataListValue, DataListValueProps, DataStack, DataStackColumn, DataStackColumnProps, DataStackGrid, DataStackGridProps, DataStackLayout, DataStackLayoutProps, DataStackProps, DataStackRow, DataStackRowProps, DataStackTitle, DataStackTitleProps, DataStackValue, DataStackValueProps, DateInput, DateInputProps, DefaultErrorSection, EditorJSONContent, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyPage, EmptyPageDescription, EmptyPageProps, EmptyPageTitle, EmptyTitle, ErrorPage, ErrorPageCode, ErrorPageDescription, ErrorPageIcon, Icon, Icons, Input, Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle, Kbd, KbdGroup, Label, ListLayout, Loader, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, NotAllowedSection, NotFoundSection, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, RadioGroup, RadioGroupItem, RootLoading, RootNotFoundPage, ScrollArea, ScrollBar, Separator, ServerErrorSection, Skeleton, Slider, Spinner, StatusBadge, StatusField, Tab, TabLayout, TabLayoutProps, Textarea, TimeInput, TimeInputProps, badgeVariants, buttonGroupVariants, buttonVariants, convertEditorContentToHTML, convertHTMLToEditorContent, createFileHandlerUploadStrategy, createStatusConfig, createStatusVariants, findStatus, navigationMenuTriggerStyle };
|
package/dist/components.mjs
CHANGED
|
@@ -4,18 +4,15 @@ import { StatusBadge, StatusField, createStatusConfig, createStatusVariants, fin
|
|
|
4
4
|
import { createFileHandlerUploadStrategy } from "./components/editor/extensions/file-handler/strategy.mjs";
|
|
5
5
|
import { convertEditorContentToHTML, convertHTMLToEditorContent } from "./components/editor/lib/helpers.mjs";
|
|
6
6
|
import { Button, buttonVariants } from "./components/ui/button.mjs";
|
|
7
|
-
import { ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger } from "./components/ui/context-menu.mjs";
|
|
8
7
|
import { Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator } from "./components/ui/breadcrumb.mjs";
|
|
9
|
-
import { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger } from "./components/ui/dropdown-menu.mjs";
|
|
10
8
|
import { ScrollArea, ScrollBar } from "./components/ui/scroll-area.mjs";
|
|
11
9
|
import { Skeleton } from "./components/ui/skeleton.mjs";
|
|
12
|
-
import { Popover, PopoverAnchor, PopoverContent, PopoverTrigger } from "./components/ui/popover.mjs";
|
|
13
10
|
import { Input } from "./components/ui/input.mjs";
|
|
14
11
|
import { Separator } from "./components/ui/separator.mjs";
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
12
|
+
import { Textarea } from "./components/ui/textarea.mjs";
|
|
13
|
+
import { DateInput } from "./components/ui/input-date.mjs";
|
|
14
|
+
import { TimeInput } from "./components/ui/input-time.mjs";
|
|
17
15
|
import { Label } from "./components/ui/label.mjs";
|
|
18
|
-
import { Toggle, toggleVariants } from "./components/ui/toggle.mjs";
|
|
19
16
|
import { ErrorPage, ErrorPageCode, ErrorPageDescription, ErrorPageIcon } from "./components/layouts/error-page.mjs";
|
|
20
17
|
import { DefaultErrorSection, NotAllowedSection, NotFoundSection, ServerErrorSection } from "./components/layouts/error-sections.mjs";
|
|
21
18
|
import { AdminErrorPage, AdminNotAllowedPage, AdminNotFoundPage } from "./components/layouts/admin-error-pages.mjs";
|
|
@@ -23,26 +20,21 @@ import { AdminLoadingLayout } from "./components/layouts/admin-loading.mjs";
|
|
|
23
20
|
import { EmptyPage, EmptyPageDescription, EmptyPageTitle } from "./components/layouts/empty-page.mjs";
|
|
24
21
|
import { ListLayout } from "./components/layouts/list-layout.mjs";
|
|
25
22
|
import { RootNotFoundPage } from "./components/layouts/root-error-pages.mjs";
|
|
23
|
+
import { Loader } from "./components/ui/loader.mjs";
|
|
26
24
|
import { RootLoading } from "./components/layouts/root-loading.mjs";
|
|
27
|
-
import { Tabs, TabsContent, TabsList, TabsTrigger } from "./components/ui/tabs.mjs";
|
|
28
25
|
import { TabLayout } from "./components/layouts/tab-layout.mjs";
|
|
29
26
|
import { DataList, DataListItem, DataListTitle, DataListValue } from "./components/lists/data-list.mjs";
|
|
30
27
|
import { DataStack, DataStackColumn, DataStackGrid, DataStackLayout, DataStackRow, DataStackTitle, DataStackValue } from "./components/lists/data-stack.mjs";
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import { Checkbox } from "./components/ui/checkbox.mjs";
|
|
38
|
-
import { DateInput } from "./components/ui/input-date.mjs";
|
|
39
|
-
import { DateTimeInput } from "./components/ui/input-date-time.mjs";
|
|
40
|
-
import { TimeInput } from "./components/ui/input-time.mjs";
|
|
28
|
+
import { Alert, AlertAction, AlertDescription, AlertTitle } from "./components/ui/alert.mjs";
|
|
29
|
+
import { ButtonGroup, ButtonGroupSeparator, ButtonGroupText, buttonGroupVariants } from "./components/ui/button-group.mjs";
|
|
30
|
+
import { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from "./components/ui/card.mjs";
|
|
31
|
+
import { Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle } from "./components/ui/empty.mjs";
|
|
32
|
+
import { Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle } from "./components/ui/item.mjs";
|
|
33
|
+
import { Kbd, KbdGroup } from "./components/ui/kbd.mjs";
|
|
41
34
|
import { NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, navigationMenuTriggerStyle } from "./components/ui/navigation-menu.mjs";
|
|
42
35
|
import { Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious } from "./components/ui/pagination.mjs";
|
|
43
36
|
import { RadioGroup, RadioGroupItem } from "./components/ui/radio-group.mjs";
|
|
44
37
|
import { Slider } from "./components/ui/slider.mjs";
|
|
45
|
-
import {
|
|
46
|
-
import { Textarea } from "./components/ui/textarea.mjs";
|
|
38
|
+
import { Spinner } from "./components/ui/spinner.mjs";
|
|
47
39
|
|
|
48
|
-
export {
|
|
40
|
+
export { AdminErrorPage, AdminLoadingLayout, AdminNotAllowedPage, AdminNotFoundPage, Alert, AlertAction, AlertDescription, AlertTitle, Badge, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, DataList, DataListItem, DataListTitle, DataListValue, DataStack, DataStackColumn, DataStackGrid, DataStackLayout, DataStackRow, DataStackTitle, DataStackValue, DateInput, DefaultErrorSection, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyPage, EmptyPageDescription, EmptyPageTitle, EmptyTitle, ErrorPage, ErrorPageCode, ErrorPageDescription, ErrorPageIcon, Icons, Input, Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle, Kbd, KbdGroup, Label, ListLayout, Loader, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, NotAllowedSection, NotFoundSection, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, RadioGroup, RadioGroupItem, RootLoading, RootNotFoundPage, ScrollArea, ScrollBar, Separator, ServerErrorSection, Skeleton, Slider, Spinner, StatusBadge, StatusField, TabLayout, Textarea, TimeInput, badgeVariants, buttonGroupVariants, buttonVariants, convertEditorContentToHTML, convertHTMLToEditorContent, createFileHandlerUploadStrategy, createStatusConfig, createStatusVariants, findStatus, navigationMenuTriggerStyle };
|
|
@@ -8,8 +8,8 @@ import { InlineEditor, InlineEditorProps } from "../modules/inline-edit/componen
|
|
|
8
8
|
import { InlineDecimalInput, InlineNumberInput, InlineStringInput } from "../modules/inline-edit/components/input.client.mjs";
|
|
9
9
|
import { InlineRecipientInput } from "../modules/inline-edit/components/input-recipient.client.mjs";
|
|
10
10
|
import { InlineStringInputToggle } from "../modules/inline-edit/components/input-toggle.client.mjs";
|
|
11
|
-
import { InlineSelect, InlineSelectContent,
|
|
11
|
+
import { InlineSelect, InlineSelectContent, InlineSelectItem, InlineSelectTrigger, InlineSelectValue } from "../modules/inline-edit/components/select.client.mjs";
|
|
12
12
|
import { InlineSwitch } from "../modules/inline-edit/components/switch.client.mjs";
|
|
13
13
|
import { InlineEditToggleProps, InlineToggle } from "../modules/inline-edit/components/toggle.client.mjs";
|
|
14
14
|
import { InlineEditContextParams, InlineEditProvider, useInlineEditContext } from "../modules/inline-edit/hooks/context.client.mjs";
|
|
15
|
-
export { InlineCombobox, InlineComboboxDropdown, InlineComboboxProps, InlineDateInput, InlineDatePicker, InlineDateTimeInput, InlineDecimalInput, InlineEditComboboxDropdownProps, InlineEditContextParams, InlineEditProvider, InlineEditToggleProps, InlineEditor, InlineEditorProps, InlineNumberInput, InlineRecipientInput, InlineSelect, InlineSelectContent,
|
|
15
|
+
export { InlineCombobox, InlineComboboxDropdown, InlineComboboxProps, InlineDateInput, InlineDatePicker, InlineDateTimeInput, InlineDecimalInput, InlineEditComboboxDropdownProps, InlineEditContextParams, InlineEditProvider, InlineEditToggleProps, InlineEditor, InlineEditorProps, InlineNumberInput, InlineRecipientInput, InlineSelect, InlineSelectContent, InlineSelectItem, InlineSelectTrigger, InlineSelectValue, InlineStringInput, InlineStringInputToggle, InlineSwitch, InlineToggle, UseInlineEditProps, useInlineEdit, useInlineEditContext, useInlineEditOptions };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-indicator.d.mts","names":[],"sources":["../../../src/lib/hooks/use-indicator.tsx"],"mappings":";;;;;;;KAQY,eAAA;;;;iBAKI,iBAAA,CAAA;;;;;;;;
|
|
1
|
+
{"version":3,"file":"use-indicator.d.mts","names":[],"sources":["../../../src/lib/hooks/use-indicator.tsx"],"mappings":";;;;;;;KAQY,eAAA;;;;iBAKI,iBAAA,CAAA;;;;;;;;KAuCX,oBAAA;EACH,MAAA,EAAQ,eAAA;EACR,SAAA,EAAW,KAAA,CAAM,QAAA,CAAS,KAAA,CAAM,cAAA,CAAe,eAAA;EAC/C,eAAA,EAAiB,KAAA,CAAM,uBAAA;AAAA;AAAA,cAGZ,gBAAA,EAAgB,KAAA,CAAA,OAAA,CAAA,oBAAA;;;;cAKhB,YAAA,QAAY,oBAAA;;;;iBAKT,wBAAA,CAAA;EAA2B;AAAA;EAAc,QAAA,EAAU,KAAA,CAAM,SAAA;AAAA,IAAW,kBAAA,CAAA,GAAA,CAAA,OAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-indicator.mjs","names":[],"sources":["../../../src/lib/hooks/use-indicator.tsx"],"sourcesContent":["\"use client\";\n\nimport type React from \"react\";\nimport { createContext, useCallback, useContext, useEffect, useState, useTransition } from \"react\";\n\n/**\n * Indicator status\n */\nexport type IndicatorStatus = \"idle\" | \"pending\" | \"success\" | \"error\";\n\n/**\n * Use local indicator\n */\nexport function useLocalIndicator() {\n /**\n * Start transition\n */\n const [, startTransitionBase] = useTransition();\n\n /**\n * Status of the inline edit indicator\n */\n const [status, setStatus] = useState<IndicatorStatus>(\"idle\");\n\n /**\n * Set status to pending when isPending is true\n */\n const startTransition = useCallback<React.TransitionStartFunction>(
|
|
1
|
+
{"version":3,"file":"use-indicator.mjs","names":[],"sources":["../../../src/lib/hooks/use-indicator.tsx"],"sourcesContent":["\"use client\";\n\nimport type React from \"react\";\nimport { createContext, useCallback, useContext, useEffect, useState, useTransition } from \"react\";\n\n/**\n * Indicator status\n */\nexport type IndicatorStatus = \"idle\" | \"pending\" | \"success\" | \"error\";\n\n/**\n * Use local indicator\n */\nexport function useLocalIndicator() {\n /**\n * Start transition\n */\n const [, startTransitionBase] = useTransition();\n\n /**\n * Status of the inline edit indicator\n */\n const [status, setStatus] = useState<IndicatorStatus>(\"idle\");\n\n /**\n * Set status to pending when isPending is true\n */\n const startTransition = useCallback<React.TransitionStartFunction>((callback) => {\n setStatus(\"pending\");\n startTransitionBase(callback);\n }, []);\n\n /**\n * Set status back to idle after 1.5 seconds when status is succes\n * Set status back to idle after 3 seconds when status is error\n */\n const resetAfterDelay = useCallback(() => {\n if (status !== \"success\" && status !== \"error\") return undefined;\n\n const timeout = setTimeout(() => setStatus(\"idle\"), status === \"success\" ? 1000 : 2000);\n\n return () => clearTimeout(timeout);\n }, [status]);\n\n useEffect(() => resetAfterDelay(), [resetAfterDelay]);\n\n return { status, setStatus, startTransition };\n}\n\n/**\n * Indicator context\n */\ntype IndicatorContextType = {\n status: IndicatorStatus;\n setStatus: React.Dispatch<React.SetStateAction<IndicatorStatus>>;\n startTransition: React.TransitionStartFunction;\n};\n\nexport const IndicatorContext = createContext<IndicatorContextType>({} as IndicatorContextType);\n\n/**\n * Inline edit indicator context\n */\nexport const useIndicator = () => useContext(IndicatorContext);\n\n/**\n * Indicator context provider\n */\nexport function IndicatorContextProvider({ children }: { children: React.ReactNode }) {\n const { status, setStatus, startTransition } = useLocalIndicator();\n\n return (\n <IndicatorContext.Provider value={{ status, setStatus, startTransition }}>\n {children}\n </IndicatorContext.Provider>\n );\n}\n"],"mappings":";;;;;;;;;AAaA,SAAgB,oBAAoB;;;;CAIlC,MAAM,GAAG,uBAAuB,eAAe;;;;CAK/C,MAAM,CAAC,QAAQ,aAAa,SAA0B,OAAO;;;;CAK7D,MAAM,kBAAkB,aAA4C,aAAa;AAC/E,YAAU,UAAU;AACpB,sBAAoB,SAAS;IAC5B,EAAE,CAAC;;;;;CAMN,MAAM,kBAAkB,kBAAkB;AACxC,MAAI,WAAW,aAAa,WAAW,QAAS,QAAO;EAEvD,MAAM,UAAU,iBAAiB,UAAU,OAAO,EAAE,WAAW,YAAY,MAAO,IAAK;AAEvF,eAAa,aAAa,QAAQ;IACjC,CAAC,OAAO,CAAC;AAEZ,iBAAgB,iBAAiB,EAAE,CAAC,gBAAgB,CAAC;AAErD,QAAO;EAAE;EAAQ;EAAW;EAAiB;;AAY/C,MAAa,mBAAmB,cAAoC,EAAE,CAAyB;;;;AAK/F,MAAa,qBAAqB,WAAW,iBAAiB;;;;AAK9D,SAAgB,yBAAyB,EAAE,YAA2C;CACpF,MAAM,EAAE,QAAQ,WAAW,oBAAoB,mBAAmB;AAElE,QACE,oBAAC,iBAAiB;EAAS,OAAO;GAAE;GAAQ;GAAW;GAAiB;EACrE;GACyB"}
|
|
@@ -7,7 +7,7 @@ async function AuthLayout(props) {
|
|
|
7
7
|
return /* @__PURE__ */ jsxs("div", {
|
|
8
8
|
className: "container relative mx-auto grid h-dvh flex-col items-center justify-center lg:max-w-none lg:grid-cols-2 lg:px-0",
|
|
9
9
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
10
|
-
className: "
|
|
10
|
+
className: "relative hidden h-full flex-col bg-muted p-10 text-white lg:flex dark:border-r",
|
|
11
11
|
children: [
|
|
12
12
|
/* @__PURE__ */ jsx(Image, {
|
|
13
13
|
src: "/images/auth-background.jpeg",
|
|
@@ -17,7 +17,7 @@ async function AuthLayout(props) {
|
|
|
17
17
|
}),
|
|
18
18
|
/* @__PURE__ */ jsx(Link, {
|
|
19
19
|
href: "/",
|
|
20
|
-
className: "relative z-20 flex items-center text-lg
|
|
20
|
+
className: "relative z-20 flex items-center font-bold text-lg",
|
|
21
21
|
children: props.name
|
|
22
22
|
}),
|
|
23
23
|
/* @__PURE__ */ jsx("div", {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth-layout.server.mjs","names":[],"sources":["../../../../src/modules/auth/components/auth-layout.server.tsx"],"sourcesContent":["import Image from \"next/image\";\nimport Link from \"next/link\";\nimport type { PropsWithChildren } from \"react\";\n\nexport async function AuthLayout(props: PropsWithChildren<{ name: string }>) {\n return (\n <div className=\"container relative mx-auto grid h-dvh flex-col items-center justify-center lg:max-w-none lg:grid-cols-2 lg:px-0\">\n <div className=\"
|
|
1
|
+
{"version":3,"file":"auth-layout.server.mjs","names":[],"sources":["../../../../src/modules/auth/components/auth-layout.server.tsx"],"sourcesContent":["import Image from \"next/image\";\nimport Link from \"next/link\";\nimport type { PropsWithChildren } from \"react\";\n\nexport async function AuthLayout(props: PropsWithChildren<{ name: string }>) {\n return (\n <div className=\"container relative mx-auto grid h-dvh flex-col items-center justify-center lg:max-w-none lg:grid-cols-2 lg:px-0\">\n <div className=\"relative hidden h-full flex-col bg-muted p-10 text-white lg:flex dark:border-r\">\n <Image src=\"/images/auth-background.jpeg\" alt=\"Background\" className=\"object-cover\" fill />\n\n <Link href=\"/\" className=\"relative z-20 flex items-center font-bold text-lg\">\n {props.name}\n </Link>\n\n <div className=\"relative z-20 mt-auto\">\n <blockquote className=\"space-y-2 text-sm\">Developed by NewCode</blockquote>\n </div>\n </div>\n\n {props.children}\n </div>\n );\n}\n"],"mappings":";;;;;AAIA,eAAsB,WAAW,OAA4C;AAC3E,QACE,qBAAC;EAAI,WAAU;aACb,qBAAC;GAAI,WAAU;;IACb,oBAAC;KAAM,KAAI;KAA+B,KAAI;KAAa,WAAU;KAAe;MAAO;IAE3F,oBAAC;KAAK,MAAK;KAAI,WAAU;eACtB,MAAM;MACF;IAEP,oBAAC;KAAI,WAAU;eACb,oBAAC;MAAW,WAAU;gBAAoB;OAAiC;MACvE;;IACF,EAEL,MAAM;GACH"}
|
|
@@ -61,7 +61,7 @@ function CreateFirstUserPage() {
|
|
|
61
61
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
62
62
|
className: "flex flex-col space-y-2 text-center",
|
|
63
63
|
children: [/* @__PURE__ */ jsx("h1", {
|
|
64
|
-
className: "text-3xl
|
|
64
|
+
className: "font-semibold text-3xl tracking-tight",
|
|
65
65
|
children: "Welkom eerste gebruiker"
|
|
66
66
|
}), /* @__PURE__ */ jsx("p", {
|
|
67
67
|
className: "text-muted-foreground text-sm",
|
|
@@ -126,10 +126,10 @@ function CreateFirstUserPage() {
|
|
|
126
126
|
type: "button",
|
|
127
127
|
variant: "ghost",
|
|
128
128
|
size: "sm",
|
|
129
|
-
className: "absolute
|
|
129
|
+
className: "absolute top-0 right-0 h-full px-3 py-2 hover:bg-transparent",
|
|
130
130
|
onClick: () => setShowPassword(!showPassword),
|
|
131
131
|
disabled,
|
|
132
|
-
children: showPassword ? /* @__PURE__ */ jsx(EyeOff, { className: "
|
|
132
|
+
children: showPassword ? /* @__PURE__ */ jsx(EyeOff, { className: "h-4 w-4 text-muted-foreground" }) : /* @__PURE__ */ jsx(Eye, { className: "h-4 w-4 text-muted-foreground" })
|
|
133
133
|
})]
|
|
134
134
|
}) }),
|
|
135
135
|
/* @__PURE__ */ jsx(FormMessage, {})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-first-user-page.client.mjs","names":["Form"],"sources":["../../../../src/modules/auth/components/create-first-user-page.client.tsx"],"sourcesContent":["\"use client\";\n\nimport { standardSchemaResolver } from \"@hookform/resolvers/standard-schema\";\nimport { useMutation } from \"@tanstack/react-query\";\nimport { Eye, EyeOff } from \"lucide-react\";\nimport { useRouter } from \"next/navigation\";\nimport { parseAsString, useQueryState } from \"nuqs\";\nimport { useState } from \"react\";\nimport { useForm } from \"react-hook-form\";\nimport { toast } from \"sonner\";\nimport type * as z from \"zod\";\nimport { Icons } from \"@/components/common/icons\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n Form,\n FormControl,\n FormField,\n FormItem,\n FormLabel,\n FormMessage,\n} from \"@/components/ui/form.client\";\nimport { Input } from \"@/components/ui/input\";\nimport { useAuthClient } from \"../hooks/use-auth-client\";\nimport { createUserSchema } from \"../lib/validators\";\n\nexport function CreateFirstUserPage() {\n const router = useRouter();\n const authClient = useAuthClient();\n const [callbackURL] = useQueryState(\"callbackURL\", parseAsString);\n const [showPassword, setShowPassword] = useState(false);\n\n const createFirstUserMutation = useMutation({\n mutationFn: async (data: z.infer<typeof createUserSchema>) => {\n const result = await authClient.signUp.email({\n email: data.email,\n password: data.password,\n name: `${data.firstName} ${data.lastName}`,\n firstName: data.firstName,\n lastName: data.lastName,\n callbackURL: callbackURL ?? \"/admin\",\n });\n\n if (result.error) throw result.error;\n\n return result.data;\n },\n onError: (err: Error) => {\n console.error(\"Create First User error: \", err);\n toast.error(\"Er is iets misgegaan\");\n },\n onSuccess: () => {\n router.replace(callbackURL ?? \"/admin\");\n toast.success(\"Account succesvol aangemaakt!\");\n },\n });\n\n const disabled = createFirstUserMutation.isPending;\n\n const form = useForm<z.infer<typeof createUserSchema>>({\n resolver: standardSchemaResolver(createUserSchema),\n defaultValues: { email: \"\", firstName: \"\", lastName: \"\", password: \"\" },\n disabled,\n });\n\n if (Object.keys(form.formState.errors).length > 0) {\n console.error(form.formState.errors);\n }\n\n return (\n <div className=\"mx-auto flex w-full flex-col justify-center space-y-6 sm:w-[350px]\">\n <div className=\"flex flex-col space-y-2 text-center\">\n <h1 className=\"text-3xl
|
|
1
|
+
{"version":3,"file":"create-first-user-page.client.mjs","names":["Form"],"sources":["../../../../src/modules/auth/components/create-first-user-page.client.tsx"],"sourcesContent":["\"use client\";\n\nimport { standardSchemaResolver } from \"@hookform/resolvers/standard-schema\";\nimport { useMutation } from \"@tanstack/react-query\";\nimport { Eye, EyeOff } from \"lucide-react\";\nimport { useRouter } from \"next/navigation\";\nimport { parseAsString, useQueryState } from \"nuqs\";\nimport { useState } from \"react\";\nimport { useForm } from \"react-hook-form\";\nimport { toast } from \"sonner\";\nimport type * as z from \"zod\";\nimport { Icons } from \"@/components/common/icons\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n Form,\n FormControl,\n FormField,\n FormItem,\n FormLabel,\n FormMessage,\n} from \"@/components/ui/form.client\";\nimport { Input } from \"@/components/ui/input\";\nimport { useAuthClient } from \"../hooks/use-auth-client\";\nimport { createUserSchema } from \"../lib/validators\";\n\nexport function CreateFirstUserPage() {\n const router = useRouter();\n const authClient = useAuthClient();\n const [callbackURL] = useQueryState(\"callbackURL\", parseAsString);\n const [showPassword, setShowPassword] = useState(false);\n\n const createFirstUserMutation = useMutation({\n mutationFn: async (data: z.infer<typeof createUserSchema>) => {\n const result = await authClient.signUp.email({\n email: data.email,\n password: data.password,\n name: `${data.firstName} ${data.lastName}`,\n firstName: data.firstName,\n lastName: data.lastName,\n callbackURL: callbackURL ?? \"/admin\",\n });\n\n if (result.error) throw result.error;\n\n return result.data;\n },\n onError: (err: Error) => {\n console.error(\"Create First User error: \", err);\n toast.error(\"Er is iets misgegaan\");\n },\n onSuccess: () => {\n router.replace(callbackURL ?? \"/admin\");\n toast.success(\"Account succesvol aangemaakt!\");\n },\n });\n\n const disabled = createFirstUserMutation.isPending;\n\n const form = useForm<z.infer<typeof createUserSchema>>({\n resolver: standardSchemaResolver(createUserSchema),\n defaultValues: { email: \"\", firstName: \"\", lastName: \"\", password: \"\" },\n disabled,\n });\n\n if (Object.keys(form.formState.errors).length > 0) {\n console.error(form.formState.errors);\n }\n\n return (\n <div className=\"mx-auto flex w-full flex-col justify-center space-y-6 sm:w-[350px]\">\n <div className=\"flex flex-col space-y-2 text-center\">\n <h1 className=\"font-semibold text-3xl tracking-tight\">Welkom eerste gebruiker</h1>\n <p className=\"text-muted-foreground text-sm\">Maak eerst een account aan om in te loggen</p>\n </div>\n\n <Form {...form}>\n <form\n className=\"space-y-6\"\n onSubmit={form.handleSubmit((data) => createFirstUserMutation.mutate(data))}\n >\n <div className=\"flex flex-col gap-3\">\n <FormField\n control={form.control}\n name=\"firstName\"\n render={({ field }) => (\n <FormItem>\n <FormLabel>Voornaam</FormLabel>\n <FormControl>\n <Input placeholder=\"Voornaam\" {...field} />\n </FormControl>\n <FormMessage />\n </FormItem>\n )}\n />\n\n <FormField\n control={form.control}\n name=\"lastName\"\n render={({ field }) => (\n <FormItem>\n <FormLabel>Achternaam</FormLabel>\n <FormControl>\n <Input placeholder=\"Achternaam\" {...field} />\n </FormControl>\n <FormMessage />\n </FormItem>\n )}\n />\n\n <FormField\n control={form.control}\n name=\"email\"\n render={({ field }) => (\n <FormItem>\n <FormLabel>Email</FormLabel>\n <FormControl>\n <Input placeholder=\"email@example.be\" {...field} />\n </FormControl>\n <FormMessage />\n </FormItem>\n )}\n />\n\n <FormField\n control={form.control}\n name=\"password\"\n render={({ field }) => (\n <FormItem>\n <FormLabel>Wachtwoord</FormLabel>\n <FormControl>\n <div className=\"relative\">\n <Input\n type={showPassword ? \"text\" : \"password\"}\n placeholder=\"********\"\n {...field}\n />\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"sm\"\n className=\"absolute top-0 right-0 h-full px-3 py-2 hover:bg-transparent\"\n onClick={() => setShowPassword(!showPassword)}\n disabled={disabled}\n >\n {showPassword ? (\n <EyeOff className=\"h-4 w-4 text-muted-foreground\" />\n ) : (\n <Eye className=\"h-4 w-4 text-muted-foreground\" />\n )}\n </Button>\n </div>\n </FormControl>\n <FormMessage />\n </FormItem>\n )}\n />\n </div>\n\n <div className=\"space-y-3\">\n <Button disabled={disabled} className=\"w-full\">\n {createFirstUserMutation.isPending && (\n <Icons.spinner className=\"mr-2 h-4 w-4 animate-spin\" />\n )}\n Account aanmaken\n </Button>\n </div>\n </form>\n </Form>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAyBA,SAAgB,sBAAsB;CACpC,MAAM,SAAS,WAAW;CAC1B,MAAM,aAAa,eAAe;CAClC,MAAM,CAAC,eAAe,cAAc,eAAe,cAAc;CACjE,MAAM,CAAC,cAAc,mBAAmB,SAAS,MAAM;CAEvD,MAAM,0BAA0B,YAAY;EAC1C,YAAY,OAAO,SAA2C;GAC5D,MAAM,SAAS,MAAM,WAAW,OAAO,MAAM;IAC3C,OAAO,KAAK;IACZ,UAAU,KAAK;IACf,MAAM,GAAG,KAAK,UAAU,GAAG,KAAK;IAChC,WAAW,KAAK;IAChB,UAAU,KAAK;IACf,aAAa,eAAe;IAC7B,CAAC;AAEF,OAAI,OAAO,MAAO,OAAM,OAAO;AAE/B,UAAO,OAAO;;EAEhB,UAAU,QAAe;AACvB,WAAQ,MAAM,6BAA6B,IAAI;AAC/C,SAAM,MAAM,uBAAuB;;EAErC,iBAAiB;AACf,UAAO,QAAQ,eAAe,SAAS;AACvC,SAAM,QAAQ,gCAAgC;;EAEjD,CAAC;CAEF,MAAM,WAAW,wBAAwB;CAEzC,MAAM,OAAO,QAA0C;EACrD,UAAU,uBAAuB,iBAAiB;EAClD,eAAe;GAAE,OAAO;GAAI,WAAW;GAAI,UAAU;GAAI,UAAU;GAAI;EACvE;EACD,CAAC;AAEF,KAAI,OAAO,KAAK,KAAK,UAAU,OAAO,CAAC,SAAS,EAC9C,SAAQ,MAAM,KAAK,UAAU,OAAO;AAGtC,QACE,qBAAC;EAAI,WAAU;aACb,qBAAC;GAAI,WAAU;cACb,oBAAC;IAAG,WAAU;cAAwC;KAA4B,EAClF,oBAAC;IAAE,WAAU;cAAgC;KAA8C;IACvF,EAEN,oBAACA;GAAK,GAAI;aACR,qBAAC;IACC,WAAU;IACV,UAAU,KAAK,cAAc,SAAS,wBAAwB,OAAO,KAAK,CAAC;eAE3E,qBAAC;KAAI,WAAU;;MACb,oBAAC;OACC,SAAS,KAAK;OACd,MAAK;OACL,SAAS,EAAE,YACT,qBAAC;QACC,oBAAC,uBAAU,aAAoB;QAC/B,oBAAC,yBACC,oBAAC;SAAM,aAAY;SAAW,GAAI;UAAS,GAC/B;QACd,oBAAC,gBAAc;WACN;QAEb;MAEF,oBAAC;OACC,SAAS,KAAK;OACd,MAAK;OACL,SAAS,EAAE,YACT,qBAAC;QACC,oBAAC,uBAAU,eAAsB;QACjC,oBAAC,yBACC,oBAAC;SAAM,aAAY;SAAa,GAAI;UAAS,GACjC;QACd,oBAAC,gBAAc;WACN;QAEb;MAEF,oBAAC;OACC,SAAS,KAAK;OACd,MAAK;OACL,SAAS,EAAE,YACT,qBAAC;QACC,oBAAC,uBAAU,UAAiB;QAC5B,oBAAC,yBACC,oBAAC;SAAM,aAAY;SAAmB,GAAI;UAAS,GACvC;QACd,oBAAC,gBAAc;WACN;QAEb;MAEF,oBAAC;OACC,SAAS,KAAK;OACd,MAAK;OACL,SAAS,EAAE,YACT,qBAAC;QACC,oBAAC,uBAAU,eAAsB;QACjC,oBAAC,yBACC,qBAAC;SAAI,WAAU;oBACb,oBAAC;UACC,MAAM,eAAe,SAAS;UAC9B,aAAY;UACZ,GAAI;WACJ,EACF,oBAAC;UACC,MAAK;UACL,SAAQ;UACR,MAAK;UACL,WAAU;UACV,eAAe,gBAAgB,CAAC,aAAa;UACnC;oBAET,eACC,oBAAC,UAAO,WAAU,kCAAkC,GAEpD,oBAAC,OAAI,WAAU,kCAAkC;WAE5C;UACL,GACM;QACd,oBAAC,gBAAc;WACN;QAEb;;MACE,EAEN,oBAAC;KAAI,WAAU;eACb,qBAAC;MAAiB;MAAU,WAAU;iBACnC,wBAAwB,aACvB,oBAAC,MAAM,WAAQ,WAAU,8BAA8B,EACvD;OAEK;MACL;KACD;IACF;GACH"}
|
|
@@ -26,7 +26,7 @@ function ForgetPasswordPage() {
|
|
|
26
26
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
27
27
|
className: "flex flex-col space-y-2 text-center",
|
|
28
28
|
children: [/* @__PURE__ */ jsx("h1", {
|
|
29
|
-
className: "text-3xl
|
|
29
|
+
className: "font-semibold text-3xl tracking-tight",
|
|
30
30
|
children: "Wachtwoord vergeten"
|
|
31
31
|
}), /* @__PURE__ */ jsx("p", {
|
|
32
32
|
className: "text-muted-foreground text-sm",
|