@tulip-systems/core 0.6.0 → 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/commands/client.d.mts +2 -1
- package/dist/commands/client.mjs +2 -1
- package/dist/components/client.d.mts +19 -3
- package/dist/components/client.mjs +18 -2
- package/dist/components/editor/components/menu-nodes.client.mjs +3 -3
- 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} +7 -7
- 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} +8 -8
- 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 +3 -3
- package/dist/lib/hooks/use-indicator.d.mts.map +1 -1
- package/dist/lib/hooks/use-indicator.mjs +11 -8
- package/dist/lib/hooks/use-indicator.mjs.map +1 -1
- package/dist/modules/auth/components/auth-layout.server.mjs +3 -3
- 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/hooks/use-command-menu.client.d.mts +8 -1
- package/dist/modules/commands/hooks/use-command-menu.client.d.mts.map +1 -1
- package/dist/modules/commands/hooks/use-command-menu.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.d.mts +19 -0
- package/dist/modules/commands/menus/floating-menu.client.d.mts.map +1 -0
- package/dist/modules/commands/menus/{data-table-menu.client.mjs → floating-menu.client.mjs} +11 -11
- package/dist/modules/commands/menus/floating-menu.client.mjs.map +1 -0
- 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/data-table/components/table.mjs +8 -2
- package/dist/modules/data-tables/tables/data-table/components/table.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/data-tables/tables/inline-table/components/table.mjs +8 -2
- package/dist/modules/data-tables/tables/inline-table/components/table.mjs.map +1 -1
- package/dist/modules/inline-edit/components/combobox-dropdown.client.mjs +5 -1
- package/dist/modules/inline-edit/components/combobox-dropdown.client.mjs.map +1 -1
- package/dist/modules/inline-edit/components/combobox.client.mjs +5 -1
- package/dist/modules/inline-edit/components/combobox.client.mjs.map +1 -1
- package/dist/modules/inline-edit/components/date-input.client.mjs +8 -4
- package/dist/modules/inline-edit/components/date-input.client.mjs.map +1 -1
- package/dist/modules/inline-edit/components/date-picker.client.mjs +7 -3
- 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.d.mts.map +1 -1
- package/dist/modules/inline-edit/components/date-time.client.mjs +7 -2
- package/dist/modules/inline-edit/components/date-time.client.mjs.map +1 -1
- package/dist/modules/inline-edit/components/editor.client.mjs +5 -1
- package/dist/modules/inline-edit/components/editor.client.mjs.map +1 -1
- package/dist/modules/inline-edit/components/input-recipient.client.mjs +5 -1
- package/dist/modules/inline-edit/components/input-recipient.client.mjs.map +1 -1
- package/dist/modules/inline-edit/components/input-toggle.client.mjs +7 -3
- package/dist/modules/inline-edit/components/input-toggle.client.mjs.map +1 -1
- package/dist/modules/inline-edit/components/input.client.d.mts.map +1 -1
- package/dist/modules/inline-edit/components/input.client.mjs +18 -6
- 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 +5 -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 +6 -2
- package/dist/modules/inline-edit/components/switch.client.mjs.map +1 -1
- package/dist/modules/inline-edit/components/toggle.client.mjs +6 -2
- package/dist/modules/inline-edit/components/toggle.client.mjs.map +1 -1
- package/dist/modules/inline-edit/hooks/use-inline.client.d.mts +20 -5
- package/dist/modules/inline-edit/hooks/use-inline.client.d.mts.map +1 -1
- package/dist/modules/inline-edit/hooks/use-inline.client.mjs +11 -8
- package/dist/modules/inline-edit/hooks/use-inline.client.mjs.map +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.d.mts +2 -2
- package/dist/modules/storage/components/dropzone.client.d.mts.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-context.client.d.mts +1 -0
- package/dist/modules/storage/components/upload-zone-context.client.d.mts.map +1 -1
- package/dist/modules/storage/components/upload-zone-context.client.mjs.map +1 -1
- package/dist/modules/storage/components/upload-zone.client.d.mts +2 -1
- package/dist/modules/storage/components/upload-zone.client.d.mts.map +1 -1
- package/dist/modules/storage/components/upload-zone.client.mjs +6 -4
- package/dist/modules/storage/components/upload-zone.client.mjs.map +1 -1
- package/package.json +6 -31
- package/src/components/editor/components/menu-nodes.client.tsx +3 -3
- 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/navigation/admin-sidebar.client.tsx +1 -0
- 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} +18 -11
- 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 +14 -8
- package/src/modules/auth/components/auth-layout.server.tsx +3 -3
- 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/entry.client.ts +16 -0
- package/src/modules/commands/hooks/use-command-menu.client.tsx +2 -0
- 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 +54 -0
- 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/data-table/components/table.tsx +11 -2
- 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/data-tables/tables/inline-table/components/table.tsx +11 -2
- package/src/modules/inline-edit/components/combobox-dropdown.client.tsx +4 -0
- package/src/modules/inline-edit/components/combobox.client.tsx +4 -0
- package/src/modules/inline-edit/components/date-input.client.tsx +7 -3
- package/src/modules/inline-edit/components/date-picker.client.tsx +6 -2
- package/src/modules/inline-edit/components/date-time.client.tsx +16 -2
- package/src/modules/inline-edit/components/editor.client.tsx +4 -0
- package/src/modules/inline-edit/components/input-recipient.client.tsx +4 -0
- package/src/modules/inline-edit/components/input-toggle.client.tsx +6 -2
- package/src/modules/inline-edit/components/input.client.tsx +15 -3
- package/src/modules/inline-edit/components/select.client.tsx +10 -20
- package/src/modules/inline-edit/components/switch.client.tsx +7 -3
- package/src/modules/inline-edit/components/toggle.client.tsx +5 -1
- package/src/modules/inline-edit/hooks/use-inline.client.tsx +37 -13
- package/src/modules/inline-edit/lib/parsers.ts +9 -0
- 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-context.client.tsx +1 -0
- package/src/modules/storage/components/upload-zone.client.tsx +9 -3
- 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/dist/modules/commands/menus/data-table-menu.client.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
- package/src/modules/commands/menus/data-table-menu.client.tsx +0 -46
|
@@ -13,12 +13,14 @@ export type SingleCommandMenuProps<TData, TMeta> = {
|
|
|
13
13
|
data: TData;
|
|
14
14
|
commands: CommandDef<TData, TMeta>[];
|
|
15
15
|
meta?: TMeta;
|
|
16
|
+
onSuccess?: () => void;
|
|
16
17
|
};
|
|
17
18
|
|
|
18
19
|
export type BulkCommandMenuProps<TData, TMeta> = {
|
|
19
20
|
data: TData[];
|
|
20
21
|
commands: CommandDef<TData, TMeta>[];
|
|
21
22
|
meta?: TMeta;
|
|
23
|
+
onSuccess?: () => void;
|
|
22
24
|
};
|
|
23
25
|
|
|
24
26
|
/**
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
import type
|
|
4
|
-
import { useState } from "react";
|
|
3
|
+
import { type ComponentProps, useState } from "react";
|
|
5
4
|
import {
|
|
6
5
|
ContextMenu,
|
|
7
6
|
ContextMenuContent,
|
|
8
7
|
ContextMenuItem,
|
|
9
8
|
ContextMenuTrigger,
|
|
10
|
-
} from "@/components/ui/context-menu";
|
|
9
|
+
} from "@/components/ui/context-menu.client";
|
|
11
10
|
import { cn } from "@/lib/entry";
|
|
12
11
|
import { RenderCommand } from "../components/render-command";
|
|
13
12
|
import { CommandContextProvider } from "../hooks/context.client";
|
|
@@ -35,7 +34,7 @@ export function ContextCommandMenuContent<TData, TMeta>({
|
|
|
35
34
|
meta,
|
|
36
35
|
className,
|
|
37
36
|
...props
|
|
38
|
-
}: SingleCommandMenuProps<TData, TMeta> &
|
|
37
|
+
}: SingleCommandMenuProps<TData, TMeta> & ComponentProps<typeof ContextMenuContent>) {
|
|
39
38
|
const [hasCommands, setHasCommands] = useState(true);
|
|
40
39
|
|
|
41
40
|
const [validCommands, renderCommand] = useSingleCommandMenu({ data, commands, meta });
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
DropdownMenu,
|
|
9
9
|
DropdownMenuContent,
|
|
10
10
|
DropdownMenuTrigger,
|
|
11
|
-
} from "@/components/ui/dropdown-menu";
|
|
11
|
+
} from "@/components/ui/dropdown-menu.client";
|
|
12
12
|
import { cn } from "@/lib/utils/cn";
|
|
13
13
|
import { RenderCommand } from "../components/render-command";
|
|
14
14
|
import { CommandContextProvider } from "../hooks/context.client";
|
|
@@ -35,7 +35,7 @@ export function DropdownCommandMenu<TData, TMeta>({
|
|
|
35
35
|
<Button
|
|
36
36
|
{...props}
|
|
37
37
|
variant="ghost"
|
|
38
|
-
className={cn("data-[state=open]:bg-secondary
|
|
38
|
+
className={cn("size-8 p-0 data-[state=open]:bg-secondary", className)}
|
|
39
39
|
>
|
|
40
40
|
<MoreHorizontal className="h-4 w-4" />
|
|
41
41
|
<span className="sr-only">Open menu</span>
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { useRef } from "react";
|
|
4
|
+
import { cn } from "@/lib/utils/cn";
|
|
5
|
+
import { RenderCommand } from "../components/render-command";
|
|
6
|
+
import { CommandContextProvider } from "../hooks/context.client";
|
|
7
|
+
import { type BulkCommandMenuProps, useBulkCommandMenu } from "../hooks/use-command-menu.client";
|
|
8
|
+
|
|
9
|
+
type FloatingCommandMenuProps<TData, TMeta> = BulkCommandMenuProps<TData, TMeta> &
|
|
10
|
+
React.HTMLAttributes<HTMLElement> & {
|
|
11
|
+
state: "open" | "closed";
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export function FloatingCommandMenu<TData, TMeta>({
|
|
15
|
+
data,
|
|
16
|
+
commands,
|
|
17
|
+
meta,
|
|
18
|
+
state,
|
|
19
|
+
onSuccess,
|
|
20
|
+
className,
|
|
21
|
+
...props
|
|
22
|
+
}: FloatingCommandMenuProps<TData, TMeta>) {
|
|
23
|
+
const hasCommands = useRef(true);
|
|
24
|
+
|
|
25
|
+
const [validCommands, renderCommand] = useBulkCommandMenu({ data, commands, meta });
|
|
26
|
+
|
|
27
|
+
return (
|
|
28
|
+
<div
|
|
29
|
+
{...props}
|
|
30
|
+
data-state={state}
|
|
31
|
+
className={cn(
|
|
32
|
+
"fixed right-0 bottom-12 left-0 z-50 mx-auto flex w-fit items-center rounded-xl border bg-muted/80 px-3 py-2 shadow-xl backdrop-blur-2xl data-[state=open]:flex data-[state=closed]:hidden",
|
|
33
|
+
className,
|
|
34
|
+
)}
|
|
35
|
+
>
|
|
36
|
+
<CommandContextProvider value={{ menu: "table", onSuccess }}>
|
|
37
|
+
<div
|
|
38
|
+
className="flex gap-2"
|
|
39
|
+
ref={(ref) => {
|
|
40
|
+
if (ref?.childNodes.length === 0) hasCommands.current = false;
|
|
41
|
+
}}
|
|
42
|
+
>
|
|
43
|
+
{validCommands.map((command) => (
|
|
44
|
+
<RenderCommand key={command.name} command={command} render={renderCommand} />
|
|
45
|
+
))}
|
|
46
|
+
</div>
|
|
47
|
+
|
|
48
|
+
{!hasCommands.current && (
|
|
49
|
+
<span className="font-medium text-sm">Geen acties beschikbaar</span>
|
|
50
|
+
)}
|
|
51
|
+
</CommandContextProvider>
|
|
52
|
+
</div>
|
|
53
|
+
);
|
|
54
|
+
}
|
|
@@ -37,7 +37,7 @@ export function DeleteCommand<
|
|
|
37
37
|
return (
|
|
38
38
|
<CommandAlertDialog>
|
|
39
39
|
<CommandAlertDialogTrigger className="text-destructive" label="Verwijderen">
|
|
40
|
-
<Icons.trash className="text-destructive
|
|
40
|
+
<Icons.trash className="w-4 text-destructive" />
|
|
41
41
|
<CommandLabel />
|
|
42
42
|
</CommandAlertDialogTrigger>
|
|
43
43
|
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
DropdownMenuItem,
|
|
8
8
|
DropdownMenuSeparator,
|
|
9
9
|
DropdownMenuTrigger,
|
|
10
|
-
} from "@/components/ui/dropdown-menu";
|
|
10
|
+
} from "@/components/ui/dropdown-menu.client";
|
|
11
11
|
import { cn } from "@/lib/utils/cn";
|
|
12
12
|
|
|
13
13
|
interface TableColumnHeaderProps<TData, TValue> extends React.HTMLAttributes<HTMLDivElement> {
|
|
@@ -32,7 +32,7 @@ export function TableColumnHeader<TData, TValue>({
|
|
|
32
32
|
size="sm"
|
|
33
33
|
type="button"
|
|
34
34
|
variant="ghost"
|
|
35
|
-
className="data-[state=open]:bg-accent
|
|
35
|
+
className="-ml-3 h-8 data-[state=open]:bg-accent"
|
|
36
36
|
>
|
|
37
37
|
<span>{title}</span>
|
|
38
38
|
{column.getIsSorted() === "desc" ? (
|
|
@@ -46,16 +46,16 @@ export function TableColumnHeader<TData, TValue>({
|
|
|
46
46
|
</DropdownMenuTrigger>
|
|
47
47
|
<DropdownMenuContent align="start">
|
|
48
48
|
<DropdownMenuItem onClick={() => column.toggleSorting(false)}>
|
|
49
|
-
<SortAsc className="
|
|
49
|
+
<SortAsc className="mr-2 h-3.5 w-3.5 text-muted-foreground/70" />
|
|
50
50
|
Asc
|
|
51
51
|
</DropdownMenuItem>
|
|
52
52
|
<DropdownMenuItem onClick={() => column.toggleSorting(true)}>
|
|
53
|
-
<SortDesc className="
|
|
53
|
+
<SortDesc className="mr-2 h-3.5 w-3.5 text-muted-foreground/70" />
|
|
54
54
|
Desc
|
|
55
55
|
</DropdownMenuItem>
|
|
56
56
|
<DropdownMenuSeparator />
|
|
57
57
|
<DropdownMenuItem onClick={() => column.clearSorting()}>
|
|
58
|
-
<RotateCcwIcon className="
|
|
58
|
+
<RotateCcwIcon className="mr-2 h-3.5 w-3.5 text-muted-foreground/70" />
|
|
59
59
|
Clear
|
|
60
60
|
</DropdownMenuItem>
|
|
61
61
|
</DropdownMenuContent>
|
|
@@ -13,8 +13,8 @@ import {
|
|
|
13
13
|
CommandItem,
|
|
14
14
|
CommandList,
|
|
15
15
|
CommandSeparator,
|
|
16
|
-
} from "@/components/ui/command";
|
|
17
|
-
import { Popover, PopoverContent, PopoverTrigger } from "@/components/ui/popover";
|
|
16
|
+
} from "@/components/ui/command.client";
|
|
17
|
+
import { Popover, PopoverContent, PopoverTrigger } from "@/components/ui/popover.client";
|
|
18
18
|
import { Separator } from "@/components/ui/separator";
|
|
19
19
|
import { cn } from "@/lib/utils/cn";
|
|
20
20
|
|
|
@@ -47,7 +47,7 @@ export function TableFilterCombobox<TValue extends string>({
|
|
|
47
47
|
<Popover>
|
|
48
48
|
<PopoverTrigger asChild>
|
|
49
49
|
<Button type="button" variant="outline" size="sm" className="h-8 border-dashed">
|
|
50
|
-
<PlusCircle className="
|
|
50
|
+
<PlusCircle className="h-4 w-4" />
|
|
51
51
|
{title}
|
|
52
52
|
{selectedValues?.size > 0 && (
|
|
53
53
|
<>
|
|
@@ -108,10 +108,10 @@ export function TableFilterCombobox<TValue extends string>({
|
|
|
108
108
|
<div
|
|
109
109
|
data-active={selectedValues.has(option.value)}
|
|
110
110
|
className={cn(
|
|
111
|
-
"border-primary data-[active=true]:bg-primary data-[active=true]:text-primary-foreground data-[active=true]:[&>svg]:
|
|
111
|
+
"mr-2 flex h-4 w-4 items-center justify-center rounded-sm border border-primary opacity-50 data-[active=true]:bg-primary data-[active=true]:text-primary-foreground data-[active=true]:opacity-100 [&>svg]:invisible data-[active=true]:[&>svg]:visible data-[active=true]:[&>svg]:text-primary-foreground",
|
|
112
112
|
)}
|
|
113
113
|
>
|
|
114
|
-
<Check className="
|
|
114
|
+
<Check className="h-4 w-4 text-foreground" />
|
|
115
115
|
</div>
|
|
116
116
|
|
|
117
117
|
<div className="flex flex-1 items-center gap-2">
|
|
@@ -120,7 +120,7 @@ export function TableFilterCombobox<TValue extends string>({
|
|
|
120
120
|
</div>
|
|
121
121
|
|
|
122
122
|
{option.total !== undefined && (
|
|
123
|
-
<span className="
|
|
123
|
+
<span className="size-4 justify-self-end font-mono text-muted-foreground/50 text-xs">
|
|
124
124
|
{option.total}
|
|
125
125
|
</span>
|
|
126
126
|
)}
|
|
@@ -7,7 +7,7 @@ import { useDebouncedCallback } from "use-debounce";
|
|
|
7
7
|
import { Badge } from "@/components/ui/badge";
|
|
8
8
|
import { Button } from "@/components/ui/button";
|
|
9
9
|
import { Input } from "@/components/ui/input";
|
|
10
|
-
import { Popover, PopoverContent, PopoverTrigger } from "@/components/ui/popover";
|
|
10
|
+
import { Popover, PopoverContent, PopoverTrigger } from "@/components/ui/popover.client";
|
|
11
11
|
import { Separator } from "@/components/ui/separator";
|
|
12
12
|
import { Slider } from "@/components/ui/slider";
|
|
13
13
|
|
|
@@ -106,7 +106,7 @@ export function TableFilterSlider({
|
|
|
106
106
|
max={max}
|
|
107
107
|
/>
|
|
108
108
|
|
|
109
|
-
<div className="
|
|
109
|
+
<div className="flex justify-between text-muted-foreground text-xs">
|
|
110
110
|
<span>{min}</span>
|
|
111
111
|
<span>{max}</span>
|
|
112
112
|
</div>
|
|
@@ -31,7 +31,7 @@ export function TableHead({ className, ...props }: React.ComponentProps<"th">) {
|
|
|
31
31
|
<th
|
|
32
32
|
data-slot="table-head"
|
|
33
33
|
className={cn(
|
|
34
|
-
"
|
|
34
|
+
"h-10 whitespace-nowrap bg-muted/70 px-2 text-left align-middle font-medium text-muted-foreground", //[&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]
|
|
35
35
|
className,
|
|
36
36
|
)}
|
|
37
37
|
{...props}
|
|
@@ -7,10 +7,10 @@ export function TableSkeleton() {
|
|
|
7
7
|
<div className="rounded-md border">
|
|
8
8
|
<Table>
|
|
9
9
|
<TableHeader>
|
|
10
|
-
<TableRow className="bg-muted
|
|
10
|
+
<TableRow className="relative bg-muted">
|
|
11
11
|
{Array.from({ length: 15 }).map((_, index) => (
|
|
12
12
|
<TableHead key={index}>
|
|
13
|
-
<Skeleton className="
|
|
13
|
+
<Skeleton className="my-2 h-2 w-full rounded-full bg-background" />
|
|
14
14
|
</TableHead>
|
|
15
15
|
))}
|
|
16
16
|
</TableRow>
|
|
@@ -30,7 +30,7 @@ function TableFooter({ className, ...props }: React.ComponentProps<"tfoot">) {
|
|
|
30
30
|
return (
|
|
31
31
|
<tfoot
|
|
32
32
|
data-slot="table-footer"
|
|
33
|
-
className={cn("bg-muted/50
|
|
33
|
+
className={cn("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0", className)}
|
|
34
34
|
{...props}
|
|
35
35
|
/>
|
|
36
36
|
);
|
|
@@ -41,7 +41,7 @@ function TableRow({ className, ...props }: React.ComponentProps<"tr">) {
|
|
|
41
41
|
<tr
|
|
42
42
|
data-slot="table-row"
|
|
43
43
|
className={cn(
|
|
44
|
-
"hover:bg-muted/50 data-[state=selected]:bg-muted
|
|
44
|
+
"border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",
|
|
45
45
|
className,
|
|
46
46
|
)}
|
|
47
47
|
{...props}
|
|
@@ -71,7 +71,7 @@ function TableCaption({ className, ...props }: React.ComponentProps<"caption">)
|
|
|
71
71
|
return (
|
|
72
72
|
<caption
|
|
73
73
|
data-slot="table-caption"
|
|
74
|
-
className={cn("text-muted-foreground
|
|
74
|
+
className={cn("mt-4 text-muted-foreground text-sm", className)}
|
|
75
75
|
{...props}
|
|
76
76
|
/>
|
|
77
77
|
);
|
|
@@ -9,7 +9,7 @@ export function TableToolbar({ children, className, ...props }: TableToolbarProp
|
|
|
9
9
|
return (
|
|
10
10
|
<div
|
|
11
11
|
{...props}
|
|
12
|
-
className={cn("flex max-w-full justify-between gap-5 overflow-x-auto
|
|
12
|
+
className={cn("flex max-w-full justify-between gap-5 overflow-x-auto py-1", className)}
|
|
13
13
|
>
|
|
14
14
|
{children}
|
|
15
15
|
</div>
|
|
@@ -34,7 +34,7 @@ export function PaginationTableFooter<TData extends { id: string }>({
|
|
|
34
34
|
</Button>
|
|
35
35
|
)}
|
|
36
36
|
|
|
37
|
-
<div className="text-muted-foreground
|
|
37
|
+
<div className="flex-1 text-muted-foreground text-sm">
|
|
38
38
|
{selected ?? table.getFilteredSelectedRowModel().rows.length} of{" "}
|
|
39
39
|
{total ?? table.getFilteredRowModel().rows.length} row(s) selected.
|
|
40
40
|
</div>
|
|
@@ -42,7 +42,7 @@ export function PaginationTableFooter<TData extends { id: string }>({
|
|
|
42
42
|
|
|
43
43
|
<div className="flex items-center justify-between gap-x-6 md:justify-start lg:space-x-8">
|
|
44
44
|
<div className="hidden items-center space-x-2 md:flex">
|
|
45
|
-
<p className="text-sm
|
|
45
|
+
<p className="font-medium text-sm">Rows per page</p>
|
|
46
46
|
<Select
|
|
47
47
|
value={`${table.getState().pagination.pageSize}`}
|
|
48
48
|
onValueChange={(value) => {
|
|
@@ -62,7 +62,7 @@ export function PaginationTableFooter<TData extends { id: string }>({
|
|
|
62
62
|
</Select>
|
|
63
63
|
</div>
|
|
64
64
|
|
|
65
|
-
<div className="flex items-center justify-center text-sm
|
|
65
|
+
<div className="flex items-center justify-center font-medium text-sm">
|
|
66
66
|
Page {table.getState().pagination.pageIndex + 1} of {table.getPageCount()}
|
|
67
67
|
</div>
|
|
68
68
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
3
|
import type { ComponentProps } from "react";
|
|
4
|
-
import {
|
|
4
|
+
import { FloatingCommandMenu } from "@/modules/commands/menus/floating-menu.client";
|
|
5
5
|
import { TableBottombar, TableFooter } from "@/modules/data-tables/components/footer";
|
|
6
6
|
import { Table } from "@/modules/data-tables/components/table";
|
|
7
7
|
import type { TableMeta } from "@/modules/data-tables/entry";
|
|
@@ -24,7 +24,16 @@ export function DataTable<TData extends { id: string }>(props: ComponentProps<ty
|
|
|
24
24
|
</div>
|
|
25
25
|
|
|
26
26
|
<TableBottombar table={table} />
|
|
27
|
-
|
|
27
|
+
|
|
28
|
+
{meta.commands && (
|
|
29
|
+
<FloatingCommandMenu
|
|
30
|
+
data={meta.selectedData}
|
|
31
|
+
commands={meta.commands}
|
|
32
|
+
meta={meta}
|
|
33
|
+
state={meta.selectedData?.length ? "open" : "closed"}
|
|
34
|
+
onSuccess={() => table.resetRowSelection()}
|
|
35
|
+
/>
|
|
36
|
+
)}
|
|
28
37
|
</div>
|
|
29
38
|
);
|
|
30
39
|
}
|
|
@@ -6,7 +6,7 @@ export function TableInlineCell({ className, ...props }: React.ComponentProps<ty
|
|
|
6
6
|
return (
|
|
7
7
|
<TableCell
|
|
8
8
|
className={cn(
|
|
9
|
-
"
|
|
9
|
+
"h-8 border-l p-0 align-middle first:border-0 focus-within:bg-accent focus-within:text-accent-foreground [&:has([role=checkbox])]:pr-0",
|
|
10
10
|
className,
|
|
11
11
|
)}
|
|
12
12
|
{...props}
|
|
@@ -34,7 +34,7 @@ export function TableDragHandle<TData, TValue>({
|
|
|
34
34
|
className={cn("h-full w-8 rounded-none border-none", className)}
|
|
35
35
|
disabled={disabled}
|
|
36
36
|
>
|
|
37
|
-
<GripIcon className="fill-muted
|
|
37
|
+
<GripIcon className="size-4 fill-muted" />
|
|
38
38
|
</Button>
|
|
39
39
|
</TableInlineCell>
|
|
40
40
|
);
|
|
@@ -9,7 +9,7 @@ export function InlineDataTableReadOnly({
|
|
|
9
9
|
return (
|
|
10
10
|
<span
|
|
11
11
|
{...props}
|
|
12
|
-
className={cn("
|
|
12
|
+
className={cn("flex h-full w-full items-center truncate bg-muted/50 px-3", className)}
|
|
13
13
|
>
|
|
14
14
|
{children}
|
|
15
15
|
</span>
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import type { ComponentProps } from "react";
|
|
4
4
|
import { HotkeysProvider } from "react-hotkeys-hook";
|
|
5
|
-
import {
|
|
5
|
+
import { FloatingCommandMenu } from "@/modules/commands/menus/floating-menu.client";
|
|
6
6
|
import { TableBottombar, TableFooter } from "@/modules/data-tables/components/footer";
|
|
7
7
|
import { Table } from "@/modules/data-tables/components/table";
|
|
8
8
|
import type { TableMeta } from "@/modules/data-tables/entry";
|
|
@@ -35,7 +35,16 @@ export function InlineTable<TData extends { id: string }>({
|
|
|
35
35
|
</div>
|
|
36
36
|
|
|
37
37
|
<TableBottombar table={table} />
|
|
38
|
-
|
|
38
|
+
|
|
39
|
+
{meta.commands && (
|
|
40
|
+
<FloatingCommandMenu
|
|
41
|
+
data={meta.selectedData}
|
|
42
|
+
commands={meta.commands}
|
|
43
|
+
meta={meta}
|
|
44
|
+
state={meta.selectedData?.length ? "open" : "closed"}
|
|
45
|
+
onSuccess={() => table.resetRowSelection()}
|
|
46
|
+
/>
|
|
47
|
+
)}
|
|
39
48
|
</div>
|
|
40
49
|
</InlineTableProvider>
|
|
41
50
|
);
|
|
@@ -40,6 +40,10 @@ export function InlineComboboxDropdown<
|
|
|
40
40
|
permission,
|
|
41
41
|
updateStrategy,
|
|
42
42
|
isRequired,
|
|
43
|
+
parser: {
|
|
44
|
+
decode: (value) => value,
|
|
45
|
+
encode: (value) => value,
|
|
46
|
+
},
|
|
43
47
|
});
|
|
44
48
|
|
|
45
49
|
const initialSelectedItem = props.items.find((item) => item.id === initialValue);
|
|
@@ -4,9 +4,9 @@ import { format } from "date-fns";
|
|
|
4
4
|
import { CalendarIcon } from "lucide-react";
|
|
5
5
|
import React, { type ComponentProps } from "react";
|
|
6
6
|
import { Button } from "@/components/ui/button";
|
|
7
|
-
import { Calendar } from "@/components/ui/calendar";
|
|
7
|
+
import { Calendar } from "@/components/ui/calendar.client";
|
|
8
8
|
import { Input } from "@/components/ui/input";
|
|
9
|
-
import { Popover, PopoverContent, PopoverTrigger } from "@/components/ui/popover";
|
|
9
|
+
import { Popover, PopoverContent, PopoverTrigger } from "@/components/ui/popover.client";
|
|
10
10
|
import { cn } from "@/lib/utils/cn";
|
|
11
11
|
import { useInlineEdit, type useInlineEditOptions } from "../hooks/use-inline.client";
|
|
12
12
|
import { type InlineEditVariantsProps, inlineEditVariants } from "../lib/variants";
|
|
@@ -33,6 +33,10 @@ export function InlineDateInput<Required extends boolean = false>({
|
|
|
33
33
|
permission,
|
|
34
34
|
updateStrategy,
|
|
35
35
|
isRequired,
|
|
36
|
+
parser: {
|
|
37
|
+
decode: (value) => value,
|
|
38
|
+
encode: (value) => value,
|
|
39
|
+
},
|
|
36
40
|
});
|
|
37
41
|
|
|
38
42
|
const [stringDate, setStringDate] = React.useState<string>(
|
|
@@ -79,7 +83,7 @@ export function InlineDateInput<Required extends boolean = false>({
|
|
|
79
83
|
tabIndex={-1}
|
|
80
84
|
disabled={!isAllowed}
|
|
81
85
|
className={cn(
|
|
82
|
-
"absolute
|
|
86
|
+
"absolute top-0 right-0 bottom-0 opacity-50",
|
|
83
87
|
!value && "text-muted-foreground",
|
|
84
88
|
)}
|
|
85
89
|
>
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
import { CalendarIcon } from "lucide-react";
|
|
4
4
|
import React, { type ComponentProps } from "react";
|
|
5
5
|
import { Button } from "@/components/ui/button";
|
|
6
|
-
import { Calendar } from "@/components/ui/calendar";
|
|
7
|
-
import { Popover, PopoverContent, PopoverTrigger } from "@/components/ui/popover";
|
|
6
|
+
import { Calendar } from "@/components/ui/calendar.client";
|
|
7
|
+
import { Popover, PopoverContent, PopoverTrigger } from "@/components/ui/popover.client";
|
|
8
8
|
import { cn } from "@/lib/utils/cn";
|
|
9
9
|
import { formatDate } from "@/lib/utils/format";
|
|
10
10
|
import { useInlineEdit, type useInlineEditOptions } from "../hooks/use-inline.client";
|
|
@@ -33,6 +33,10 @@ export function InlineDatePicker<Required extends boolean = false>({
|
|
|
33
33
|
permission,
|
|
34
34
|
updateStrategy,
|
|
35
35
|
isRequired,
|
|
36
|
+
parser: {
|
|
37
|
+
decode: (value) => value,
|
|
38
|
+
encode: (value) => value,
|
|
39
|
+
},
|
|
36
40
|
});
|
|
37
41
|
|
|
38
42
|
return (
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
+
import { format } from "date-fns";
|
|
3
4
|
import type { ComponentProps } from "react";
|
|
4
|
-
import { DateTimeInput } from "@/components/ui/input-date-time";
|
|
5
|
+
import { DateTimeInput } from "@/components/ui/input-date-time.client";
|
|
5
6
|
import { cn } from "@/lib/utils/cn";
|
|
6
7
|
import { useInlineEdit, type useInlineEditOptions } from "../hooks/use-inline.client";
|
|
7
8
|
import { type InlineEditVariantsProps, inlineEditVariants } from "../lib/variants";
|
|
@@ -19,12 +20,25 @@ export function InlineDateTimeInput<Required extends boolean = false>({
|
|
|
19
20
|
}: ComponentProps<typeof DateTimeInput> &
|
|
20
21
|
useInlineEditOptions<Date, Required> &
|
|
21
22
|
InlineEditVariantsProps) {
|
|
22
|
-
const { value, handleChange, handleBlur, status, isAllowed } = useInlineEdit
|
|
23
|
+
const { value, handleChange, handleBlur, status, isAllowed } = useInlineEdit<
|
|
24
|
+
string,
|
|
25
|
+
Date,
|
|
26
|
+
Required
|
|
27
|
+
>({
|
|
23
28
|
initialValue,
|
|
24
29
|
action,
|
|
25
30
|
permission,
|
|
26
31
|
updateStrategy,
|
|
27
32
|
isRequired,
|
|
33
|
+
parser: {
|
|
34
|
+
decode: (value) =>
|
|
35
|
+
(value instanceof Date
|
|
36
|
+
? format(value, "yyyy-MM-dd'T'HH:mm")
|
|
37
|
+
: typeof value === "string"
|
|
38
|
+
? value
|
|
39
|
+
: undefined) as string,
|
|
40
|
+
encode: (value) => (value ? new Date(value) : null) as Date,
|
|
41
|
+
},
|
|
28
42
|
});
|
|
29
43
|
|
|
30
44
|
return (
|
|
@@ -31,6 +31,10 @@ export function InlineStringInputToggle<Required extends boolean>({
|
|
|
31
31
|
permission,
|
|
32
32
|
updateStrategy,
|
|
33
33
|
isRequired,
|
|
34
|
+
parser: {
|
|
35
|
+
decode: (value) => value,
|
|
36
|
+
encode: (value) => value,
|
|
37
|
+
},
|
|
34
38
|
});
|
|
35
39
|
|
|
36
40
|
function handleToggle() {
|
|
@@ -51,7 +55,7 @@ export function InlineStringInputToggle<Required extends boolean>({
|
|
|
51
55
|
disabled={isDisabled}
|
|
52
56
|
onChange={(e) => handleChange(e.target.value ? e.target.value : null)}
|
|
53
57
|
onBlur={(e) => handleBlur(e.target.value ? e.target.value : null)}
|
|
54
|
-
className={cn("border-border/70 hover:border-border
|
|
58
|
+
className={cn("w-full border-border/70 hover:border-border", className)}
|
|
55
59
|
/>
|
|
56
60
|
|
|
57
61
|
<Button
|
|
@@ -59,7 +63,7 @@ export function InlineStringInputToggle<Required extends boolean>({
|
|
|
59
63
|
onClick={handleToggle}
|
|
60
64
|
tabIndex={-1}
|
|
61
65
|
className={cn(
|
|
62
|
-
"absolute
|
|
66
|
+
"absolute top-0 right-0 bottom-0 opacity-50",
|
|
63
67
|
!value && "text-muted-foreground",
|
|
64
68
|
)}
|
|
65
69
|
>
|
|
@@ -33,6 +33,10 @@ export function InlineStringInput<Required extends boolean = false>({
|
|
|
33
33
|
permission,
|
|
34
34
|
updateStrategy,
|
|
35
35
|
isRequired,
|
|
36
|
+
parser: {
|
|
37
|
+
decode: (value) => value,
|
|
38
|
+
encode: (value) => value,
|
|
39
|
+
},
|
|
36
40
|
});
|
|
37
41
|
|
|
38
42
|
return (
|
|
@@ -44,7 +48,7 @@ export function InlineStringInput<Required extends boolean = false>({
|
|
|
44
48
|
onChange={(e) => handleChange(e.target.value ? e.target.value : null)}
|
|
45
49
|
onBlur={(e) => handleBlur(e.target.value ? e.target.value : null)}
|
|
46
50
|
className={cn(
|
|
47
|
-
"border-border/70 hover:border-border
|
|
51
|
+
"w-full border-border/70 hover:border-border",
|
|
48
52
|
inlineEditVariants({ variant, status }),
|
|
49
53
|
className,
|
|
50
54
|
)}
|
|
@@ -75,6 +79,10 @@ export function InlineNumberInput<Required extends boolean = false>({
|
|
|
75
79
|
permission,
|
|
76
80
|
updateStrategy,
|
|
77
81
|
isRequired,
|
|
82
|
+
parser: {
|
|
83
|
+
decode: (value) => value,
|
|
84
|
+
encode: (value) => value,
|
|
85
|
+
},
|
|
78
86
|
});
|
|
79
87
|
|
|
80
88
|
return (
|
|
@@ -86,7 +94,7 @@ export function InlineNumberInput<Required extends boolean = false>({
|
|
|
86
94
|
onChange={(e) => handleChange(parseValueAsNumber(e.target.valueAsNumber))}
|
|
87
95
|
onBlur={(e) => handleBlur(parseValueAsNumber(e.target.valueAsNumber))}
|
|
88
96
|
className={cn(
|
|
89
|
-
"border-border/70 hover:border-border
|
|
97
|
+
"w-full border-border/70 hover:border-border",
|
|
90
98
|
inlineEditVariants({ variant, status }),
|
|
91
99
|
className,
|
|
92
100
|
)}
|
|
@@ -114,6 +122,10 @@ export function InlineDecimalInput({
|
|
|
114
122
|
permission,
|
|
115
123
|
updateStrategy,
|
|
116
124
|
isRequired,
|
|
125
|
+
parser: {
|
|
126
|
+
decode: (value) => value,
|
|
127
|
+
encode: (value) => value,
|
|
128
|
+
},
|
|
117
129
|
});
|
|
118
130
|
|
|
119
131
|
return (
|
|
@@ -125,7 +137,7 @@ export function InlineDecimalInput({
|
|
|
125
137
|
onChange={(e) => handleChange(e.target.value ? e.target.value : null)}
|
|
126
138
|
onBlur={(e) => handleBlur(e.target.value ? e.target.value : null)}
|
|
127
139
|
className={cn(
|
|
128
|
-
"border-border/70 hover:border-border
|
|
140
|
+
"w-full border-border/70 hover:border-border",
|
|
129
141
|
inlineEditVariants({ variant, status }),
|
|
130
142
|
className,
|
|
131
143
|
)}
|