@tulip-systems/core 0.5.14 → 0.5.16
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/dist/auth/client.d.mts +5 -4
- package/dist/auth/client.mjs +6 -5
- package/dist/auth.mjs +2 -2
- package/dist/components/client.d.mts +1 -3
- package/dist/components/client.mjs +3 -5
- package/dist/components/common/icons.d.mts +52 -52
- package/dist/components/common/icons.d.mts.map +1 -1
- package/dist/components/common/status.d.mts +3 -3
- package/dist/components/editor/components/content.client.d.mts +2 -2
- package/dist/components/editor/components/content.client.d.mts.map +1 -1
- package/dist/components/editor/components/editor.client.d.mts +6 -6
- package/dist/components/editor/components/editor.client.d.mts.map +1 -1
- package/dist/components/editor/components/menu.client.d.mts +3 -3
- package/dist/components/editor/components/menu.client.d.mts.map +1 -1
- package/dist/components/editor/lib/constants.d.mts +27 -27
- package/dist/components/header/back-button.client.d.mts +2 -2
- package/dist/components/header/back-button.client.d.mts.map +1 -1
- package/dist/components/header/bottom-bar.client.d.mts +3 -3
- package/dist/components/header/bottom-bar.client.d.mts.map +1 -1
- package/dist/components/header/breadcrumbs.client.d.mts +7 -7
- package/dist/components/header/breadcrumbs.client.d.mts.map +1 -1
- package/dist/components/header/header.client.d.mts +2 -2
- package/dist/components/header/header.client.d.mts.map +1 -1
- package/dist/components/header/mobile-nav-switcher.client.d.mts +2 -2
- package/dist/components/header/mobile-nav-switcher.client.d.mts.map +1 -1
- package/dist/components/header/top-bar.client.d.mts +4 -4
- package/dist/components/header/top-bar.client.d.mts.map +1 -1
- package/dist/components/layouts/admin-content.client.d.mts +2 -2
- package/dist/components/layouts/admin-content.client.d.mts.map +1 -1
- package/dist/components/layouts/admin-error-pages.d.mts +4 -4
- package/dist/components/layouts/admin-layout.d.mts +2 -2
- package/dist/components/layouts/admin-layout.d.mts.map +1 -1
- package/dist/components/layouts/admin-layout.mjs +1 -1
- package/dist/components/layouts/admin-layout.mjs.map +1 -1
- package/dist/components/layouts/admin-loading.d.mts +2 -2
- package/dist/components/layouts/empty-page.d.mts +4 -4
- package/dist/components/layouts/error-page.d.mts +9 -9
- package/dist/components/layouts/error-page.d.mts.map +1 -1
- package/dist/components/layouts/error-sections.d.mts +5 -5
- package/dist/components/layouts/list-layout.d.mts +2 -2
- package/dist/components/layouts/providers.client.d.mts +2 -2
- package/dist/components/layouts/providers.client.d.mts.map +1 -1
- package/dist/components/layouts/root-error-pages.d.mts +2 -2
- package/dist/components/layouts/root-layout.server.d.mts +4 -4
- package/dist/components/layouts/root-layout.server.d.mts.map +1 -1
- package/dist/components/layouts/root-loading.d.mts +2 -2
- package/dist/components/layouts/tab-layout.d.mts +2 -2
- package/dist/components/lists/data-list.d.mts +5 -5
- package/dist/components/lists/data-stack.d.mts +8 -8
- package/dist/components/navigation/admin-sidebar-header.client.mjs +3 -2
- package/dist/components/navigation/admin-sidebar-header.client.mjs.map +1 -1
- package/dist/components/navigation/admin-sidebar-paths.client.d.mts +10 -10
- package/dist/components/navigation/admin-sidebar-paths.client.d.mts.map +1 -1
- package/dist/components/ui/accordion.d.mts +5 -5
- package/dist/components/ui/alert-dialog.d.mts +12 -12
- package/dist/components/ui/alert.d.mts +6 -6
- package/dist/components/ui/aspect-ratio.d.mts +2 -2
- package/dist/components/ui/avatar.client.d.mts +4 -4
- package/dist/components/ui/avatar.client.d.mts.map +1 -1
- package/dist/components/ui/badge.d.mts +5 -5
- package/dist/components/ui/breadcrumb.d.mts +8 -8
- package/dist/components/ui/button.d.mts +5 -5
- package/dist/components/ui/calendar.d.mts +3 -3
- package/dist/components/ui/card.d.mts +7 -7
- package/dist/components/ui/carousel.d.mts +6 -6
- package/dist/components/ui/chart.client.d.mts +5 -5
- package/dist/components/ui/chart.client.d.mts.map +1 -1
- package/dist/components/ui/checkbox.d.mts +2 -2
- package/dist/components/ui/collapsible.client.d.mts +4 -4
- package/dist/components/ui/collapsible.client.d.mts.map +1 -1
- package/dist/components/ui/color-picker.client.d.mts +2 -2
- package/dist/components/ui/color-picker.client.d.mts.map +1 -1
- package/dist/components/ui/combobox-dropdown.client.d.mts +2 -2
- package/dist/components/ui/combobox-dropdown.client.d.mts.map +1 -1
- package/dist/components/ui/combobox.client.d.mts +2 -2
- package/dist/components/ui/combobox.client.d.mts.map +1 -1
- package/dist/components/ui/command.d.mts +10 -10
- package/dist/components/ui/context-menu.d.mts +16 -16
- package/dist/components/ui/date-picker.client.d.mts +2 -2
- package/dist/components/ui/date-picker.client.d.mts.map +1 -1
- package/dist/components/ui/dialog.client.d.mts +11 -11
- package/dist/components/ui/dialog.client.d.mts.map +1 -1
- package/dist/components/ui/drawer.client.d.mts +11 -11
- package/dist/components/ui/drawer.client.d.mts.map +1 -1
- package/dist/components/ui/dropdown-menu.d.mts +16 -16
- package/dist/components/ui/form.client.d.mts +7 -7
- package/dist/components/ui/form.client.d.mts.map +1 -1
- package/dist/components/ui/hover-card.client.d.mts +4 -4
- package/dist/components/ui/hover-card.client.d.mts.map +1 -1
- package/dist/components/ui/input-date-time.d.mts +23 -0
- package/dist/components/ui/input-date-time.d.mts.map +1 -0
- package/dist/components/ui/input-date-time.mjs +34 -0
- package/dist/components/ui/input-date-time.mjs.map +1 -0
- package/dist/components/ui/input-date.d.mts +14 -0
- package/dist/components/ui/input-date.d.mts.map +1 -0
- package/dist/components/ui/input-date.mjs +16 -0
- package/dist/components/ui/input-date.mjs.map +1 -0
- package/dist/components/ui/input-recipient.d.mts +2 -2
- package/dist/components/ui/input-time.d.mts +14 -0
- package/dist/components/ui/input-time.d.mts.map +1 -0
- package/dist/components/ui/input-time.mjs +16 -0
- package/dist/components/ui/input-time.mjs.map +1 -0
- package/dist/components/ui/input.d.mts +2 -2
- package/dist/components/ui/label.d.mts +2 -2
- package/dist/components/ui/navigation-menu.d.mts +11 -11
- package/dist/components/ui/pagination.d.mts +8 -8
- package/dist/components/ui/popover.d.mts +5 -5
- package/dist/components/ui/progress.client.d.mts +2 -2
- package/dist/components/ui/progress.client.d.mts.map +1 -1
- package/dist/components/ui/radio-group.d.mts +3 -3
- package/dist/components/ui/resizable.client.d.mts +4 -4
- package/dist/components/ui/resizable.client.d.mts.map +1 -1
- package/dist/components/ui/scroll-area.d.mts +3 -3
- package/dist/components/ui/select.client.d.mts +11 -11
- package/dist/components/ui/select.client.d.mts.map +1 -1
- package/dist/components/ui/separator.d.mts +2 -2
- package/dist/components/ui/sheet.client.d.mts +9 -9
- package/dist/components/ui/sheet.client.d.mts.map +1 -1
- package/dist/components/ui/sidebar.client.d.mts +26 -26
- package/dist/components/ui/sidebar.client.d.mts.map +1 -1
- package/dist/components/ui/skeleton.d.mts +2 -2
- package/dist/components/ui/slider.d.mts +2 -2
- package/dist/components/ui/sonner.client.d.mts +2 -2
- package/dist/components/ui/sonner.client.mjs +1 -1
- package/dist/components/ui/switch.d.mts +2 -2
- package/dist/components/ui/tabs.d.mts +5 -5
- package/dist/components/ui/textarea.d.mts +2 -2
- package/dist/components/ui/toggle-group.client.d.mts +3 -3
- package/dist/components/ui/toggle.d.mts +4 -4
- package/dist/components/ui/tooltip.client.d.mts +5 -5
- package/dist/components.d.mts +4 -1
- package/dist/components.mjs +6 -3
- package/dist/inline-edit/client.d.mts +3 -1
- package/dist/inline-edit/client.mjs +3 -1
- package/dist/lib/client.mjs +1 -1
- package/dist/lib/hooks/use-indicator.d.mts +2 -2
- package/dist/lib/hooks/use-indicator.d.mts.map +1 -1
- package/dist/modules/auth/components/allowed.client.d.mts +2 -2
- package/dist/modules/auth/components/allowed.client.d.mts.map +1 -1
- package/dist/modules/auth/components/allowed.client.mjs +2 -3
- package/dist/modules/auth/components/allowed.client.mjs.map +1 -1
- package/dist/modules/auth/components/auth-layout.server.d.mts +2 -2
- package/dist/modules/auth/components/auth-layout.server.d.mts.map +1 -1
- package/dist/modules/auth/components/auth-loading.d.mts +2 -2
- package/dist/modules/auth/components/auth-loading.d.mts.map +1 -1
- package/dist/modules/auth/components/create-first-user-page.client.d.mts +2 -2
- package/dist/modules/auth/components/create-first-user-page.client.d.mts.map +1 -1
- package/dist/modules/auth/components/create-first-user-page.client.mjs +4 -3
- package/dist/modules/auth/components/create-first-user-page.client.mjs.map +1 -1
- package/dist/modules/auth/components/forget-password-page.client.d.mts +2 -2
- package/dist/modules/auth/components/forget-password-page.client.d.mts.map +1 -1
- package/dist/modules/auth/components/forget-password-page.client.mjs +4 -3
- package/dist/modules/auth/components/forget-password-page.client.mjs.map +1 -1
- package/dist/modules/auth/components/guard-first-user.server.d.mts +2 -2
- package/dist/modules/auth/components/guard-first-user.server.d.mts.map +1 -1
- package/dist/modules/auth/components/guard.server.d.mts +3 -2
- package/dist/modules/auth/components/guard.server.d.mts.map +1 -1
- package/dist/modules/auth/components/guard.server.mjs +1 -0
- package/dist/modules/auth/components/guard.server.mjs.map +1 -1
- package/dist/modules/auth/components/login-page.client.d.mts +2 -2
- package/dist/modules/auth/components/login-page.client.d.mts.map +1 -1
- package/dist/modules/auth/components/login-page.client.mjs +4 -3
- package/dist/modules/auth/components/login-page.client.mjs.map +1 -1
- package/dist/modules/auth/components/reset-password-page.client.d.mts +2 -2
- package/dist/modules/auth/components/reset-password-page.client.d.mts.map +1 -1
- package/dist/modules/auth/components/reset-password-page.client.mjs +4 -3
- package/dist/modules/auth/components/reset-password-page.client.mjs.map +1 -1
- package/dist/modules/auth/components/update-password-command.d.mts +2 -2
- package/dist/modules/auth/components/update-password-command.d.mts.map +1 -1
- package/dist/modules/auth/components/update-password-command.mjs +1 -1
- package/dist/modules/auth/db/schema.d.mts +73 -73
- package/dist/modules/auth/db/schema.d.mts.map +1 -1
- package/dist/modules/auth/handler/{client.client.d.mts → create-client.client.d.mts} +328 -188
- package/dist/modules/auth/handler/create-client.client.d.mts.map +1 -0
- package/dist/modules/auth/handler/create-client.client.mjs +26 -0
- package/dist/modules/auth/handler/create-client.client.mjs.map +1 -0
- package/dist/modules/auth/handler/init.d.mts +116 -130
- package/dist/modules/auth/handler/init.d.mts.map +1 -1
- package/dist/modules/auth/hooks/use-auth-client.d.mts +24 -0
- package/dist/modules/auth/hooks/use-auth-client.d.mts.map +1 -0
- package/dist/modules/auth/hooks/use-auth-client.mjs +31 -0
- package/dist/modules/auth/hooks/use-auth-client.mjs.map +1 -0
- package/dist/modules/auth/hooks/use-permission.d.mts +8 -35
- package/dist/modules/auth/hooks/use-permission.d.mts.map +1 -1
- package/dist/modules/auth/hooks/use-permission.mjs +47 -93
- package/dist/modules/auth/hooks/use-permission.mjs.map +1 -1
- package/dist/modules/auth/hooks/use-session.d.mts +5 -119
- package/dist/modules/auth/hooks/use-session.d.mts.map +1 -1
- package/dist/modules/auth/hooks/use-session.mjs +15 -17
- package/dist/modules/auth/hooks/use-session.mjs.map +1 -1
- package/dist/modules/auth/lib/helpers.server.d.mts +2 -2
- package/dist/modules/auth/lib/helpers.server.d.mts.map +1 -1
- package/dist/modules/auth/lib/helpers.server.mjs +1 -1
- package/dist/modules/auth/lib/validators.d.mts +2 -2
- package/dist/modules/auth/lib/validators.d.mts.map +1 -1
- package/dist/modules/commands/components/alert-dialog-command.client.d.mts +11 -11
- package/dist/modules/commands/components/alert-dialog-command.client.d.mts.map +1 -1
- package/dist/modules/commands/components/click-command.client.d.mts +2 -2
- package/dist/modules/commands/components/click-command.client.d.mts.map +1 -1
- package/dist/modules/commands/components/command-trigger.client.d.mts +6 -6
- package/dist/modules/commands/components/command-trigger.client.d.mts.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/dropdown-command.client.d.mts +5 -5
- package/dist/modules/commands/components/dropdown-command.client.d.mts.map +1 -1
- package/dist/modules/commands/components/empty-command.client.d.mts +2 -2
- package/dist/modules/commands/components/empty-command.client.d.mts.map +1 -1
- package/dist/modules/commands/components/form-dialog-command.client.d.mts +12 -12
- package/dist/modules/commands/components/form-dialog-command.client.d.mts.map +1 -1
- package/dist/modules/commands/hooks/use-command-menu.client.mjs.map +1 -1
- package/dist/modules/commands/hooks/use-command-mutation.client.d.mts +2 -2
- package/dist/modules/commands/hooks/use-command-mutation.client.mjs +1 -1
- package/dist/modules/commands/menus/context-menu.client.d.mts +2 -2
- package/dist/modules/commands/menus/context-menu.client.d.mts.map +1 -1
- package/dist/modules/commands/menus/dropdown-menu.client.d.mts +3 -3
- package/dist/modules/commands/menus/dropdown-menu.client.d.mts.map +1 -1
- package/dist/modules/commands/menus/inline-menu.client.d.mts +3 -3
- package/dist/modules/commands/menus/inline-menu.client.d.mts.map +1 -1
- package/dist/modules/commands/menus/responsive-menu.client.d.mts +3 -3
- package/dist/modules/commands/menus/responsive-menu.client.d.mts.map +1 -1
- package/dist/modules/commands/utils/archive-command.client.d.mts +3 -3
- package/dist/modules/commands/utils/archive-command.client.d.mts.map +1 -1
- package/dist/modules/commands/utils/delete-command.client.d.mts +3 -3
- package/dist/modules/commands/utils/delete-command.client.d.mts.map +1 -1
- package/dist/modules/config/db/helpers.d.mts +5 -5
- package/dist/modules/config/db/helpers.d.mts.map +1 -1
- package/dist/modules/config/lib/config.d.mts +1 -1
- package/dist/modules/config/lib/config.mjs.map +1 -1
- package/dist/modules/data-tables/components/cell/common.client.d.mts +5 -5
- package/dist/modules/data-tables/components/cell/common.client.d.mts.map +1 -1
- package/dist/modules/data-tables/components/column-header.d.mts +2 -2
- package/dist/modules/data-tables/components/column-header.d.mts.map +1 -1
- package/dist/modules/data-tables/components/filters/combobox.client.d.mts +2 -2
- package/dist/modules/data-tables/components/filters/slider.client.d.mts +2 -2
- package/dist/modules/data-tables/components/header.d.mts +4 -4
- package/dist/modules/data-tables/components/header.d.mts.map +1 -1
- package/dist/modules/data-tables/components/layout.d.mts +2 -2
- package/dist/modules/data-tables/components/layout.d.mts.map +1 -1
- package/dist/modules/data-tables/components/search-input.client.d.mts +2 -2
- package/dist/modules/data-tables/components/skeleton.d.mts +2 -2
- package/dist/modules/data-tables/components/skeleton.d.mts.map +1 -1
- package/dist/modules/data-tables/components/table.d.mts +7 -7
- package/dist/modules/data-tables/components/table.d.mts.map +1 -1
- package/dist/modules/data-tables/components/toolbar.d.mts +3 -3
- package/dist/modules/data-tables/components/toolbar.d.mts.map +1 -1
- package/dist/modules/data-tables/hooks/use-context.client.d.mts +2 -2
- package/dist/modules/data-tables/strategies/helpers/sorting.mjs +1 -1
- package/dist/modules/data-tables/tables/data-table/components/table.d.mts +2 -2
- package/dist/modules/data-tables/tables/inline-table/components/cells/common.d.mts +2 -2
- package/dist/modules/data-tables/tables/inline-table/components/cells/drag-handle.client.d.mts +2 -2
- package/dist/modules/data-tables/tables/inline-table/components/cells/read-only.d.mts +2 -2
- package/dist/modules/data-tables/tables/inline-table/components/table.d.mts +2 -2
- package/dist/modules/data-tables/tables/inline-table/hooks/context.client.d.mts +2 -2
- package/dist/modules/inline-edit/components/combobox-dropdown.client.d.mts +2 -2
- package/dist/modules/inline-edit/components/combobox-dropdown.client.d.mts.map +1 -1
- package/dist/modules/inline-edit/components/combobox.client.d.mts +2 -2
- package/dist/modules/inline-edit/components/combobox.client.d.mts.map +1 -1
- package/dist/modules/inline-edit/components/date-input.client.d.mts +2 -2
- package/dist/modules/inline-edit/components/date-input.client.d.mts.map +1 -1
- package/dist/modules/inline-edit/components/date-picker.client.d.mts +2 -2
- package/dist/modules/inline-edit/components/date-picker.client.d.mts.map +1 -1
- package/dist/modules/inline-edit/components/date-time.client.d.mts +21 -0
- package/dist/modules/inline-edit/components/date-time.client.d.mts.map +1 -0
- package/dist/modules/inline-edit/components/date-time.client.mjs +33 -0
- package/dist/modules/inline-edit/components/date-time.client.mjs.map +1 -0
- package/dist/modules/inline-edit/components/editor.client.d.mts +2 -2
- package/dist/modules/inline-edit/components/editor.client.d.mts.map +1 -1
- package/dist/modules/inline-edit/components/input-recipient.client.d.mts +2 -2
- package/dist/modules/inline-edit/components/input-recipient.client.d.mts.map +1 -1
- package/dist/modules/inline-edit/components/input-toggle.client.d.mts +2 -2
- package/dist/modules/inline-edit/components/input-toggle.client.d.mts.map +1 -1
- package/dist/modules/inline-edit/components/input.client.d.mts +4 -4
- package/dist/modules/inline-edit/components/input.client.d.mts.map +1 -1
- package/dist/modules/inline-edit/components/select.client.d.mts +6 -6
- package/dist/modules/inline-edit/components/select.client.d.mts.map +1 -1
- package/dist/modules/inline-edit/components/switch.client.d.mts +2 -2
- package/dist/modules/inline-edit/components/switch.client.d.mts.map +1 -1
- package/dist/modules/inline-edit/components/toggle.client.d.mts +2 -2
- package/dist/modules/inline-edit/components/toggle.client.d.mts.map +1 -1
- package/dist/modules/inline-edit/hooks/context.client.d.mts +2 -2
- package/dist/modules/inline-edit/hooks/context.client.d.mts.map +1 -1
- package/dist/modules/inline-edit/hooks/use-inline.client.d.mts +15 -2
- package/dist/modules/inline-edit/hooks/use-inline.client.d.mts.map +1 -1
- package/dist/modules/inline-edit/hooks/use-inline.client.mjs +2 -6
- package/dist/modules/inline-edit/hooks/use-inline.client.mjs.map +1 -1
- package/dist/modules/router/handler/init.server.d.mts +6 -6
- package/dist/modules/router/handler/init.server.d.mts.map +1 -1
- package/dist/modules/router/lib/query-client.server.d.mts +2 -2
- package/dist/modules/router/lib/query-client.server.d.mts.map +1 -1
- package/dist/modules/storage/components/dropzone-context.client.d.mts +2 -2
- package/dist/modules/storage/components/dropzone-context.client.d.mts.map +1 -1
- package/dist/modules/storage/components/dropzone.client.d.mts +5 -5
- package/dist/modules/storage/components/dropzone.client.d.mts.map +1 -1
- package/dist/modules/storage/components/image-grid.client.d.mts +3 -3
- package/dist/modules/storage/components/image-grid.client.d.mts.map +1 -1
- package/dist/modules/storage/components/image-grid.client.mjs +1 -1
- package/dist/modules/storage/components/upload-zone.client.d.mts +2 -2
- package/dist/modules/storage/components/upload-zone.client.d.mts.map +1 -1
- package/dist/modules/storage/components/upload-zone.client.mjs +1 -1
- package/dist/modules/storage/lib/create-upload.client.d.mts.map +1 -1
- package/dist/modules/storage/lib/proxy.server.mjs +1 -1
- package/dist/modules/storage/lib/router.server.d.mts +2359 -2359
- package/dist/modules/storage/lib/router.server.d.mts.map +1 -1
- package/dist/modules/storage/lib/router.server.mjs +1 -1
- package/dist/modules/storage/lib/schema.d.mts +92 -92
- package/dist/modules/storage/lib/service.server.d.mts +24 -24
- package/dist/modules/storage/lib/service.server.mjs +1 -1
- package/dist/modules/storage/lib/validators.d.mts +90 -90
- package/dist/modules/storage/lib/validators.d.mts.map +1 -1
- package/package.json +3 -10
- package/src/components/entry.client.ts +0 -2
- package/src/components/entry.ts +3 -0
- package/src/components/layouts/admin-layout.tsx +1 -3
- package/src/components/navigation/admin-sidebar-header.client.tsx +3 -20
- package/src/components/ui/input-date-time.tsx +58 -0
- package/src/components/ui/input-date.tsx +20 -0
- package/src/components/ui/input-time.tsx +20 -0
- package/src/modules/auth/components/allowed.client.tsx +2 -2
- package/src/modules/auth/components/create-first-user-page.client.tsx +3 -2
- package/src/modules/auth/components/forget-password-page.client.tsx +2 -1
- package/src/modules/auth/components/guard.server.tsx +2 -0
- package/src/modules/auth/components/login-page.client.tsx +2 -1
- package/src/modules/auth/components/reset-password-page.client.tsx +3 -1
- package/src/modules/auth/entry.client.ts +13 -1
- package/src/modules/auth/entry.ts +11 -0
- package/src/modules/auth/handler/create-client.client.ts +53 -0
- package/src/modules/auth/hooks/use-auth-client.tsx +38 -0
- package/src/modules/auth/hooks/use-permission.ts +49 -94
- package/src/modules/auth/hooks/use-session.ts +16 -16
- package/src/modules/commands/hooks/use-command-menu.client.tsx +0 -6
- package/src/modules/config/lib/config.ts +3 -2
- package/src/modules/inline-edit/components/date-time.client.tsx +38 -0
- package/src/modules/inline-edit/entry.client.ts +9 -0
- package/src/modules/inline-edit/entry.server.ts +3 -0
- package/src/modules/inline-edit/entry.ts +3 -0
- package/src/modules/inline-edit/hooks/use-inline.client.tsx +1 -1
- package/dist/components/ui/time-input.client.d.mts +0 -16
- package/dist/components/ui/time-input.client.d.mts.map +0 -1
- package/dist/components/ui/time-input.client.mjs +0 -53
- package/dist/components/ui/time-input.client.mjs.map +0 -1
- package/dist/components/ui/time-picker-input.client.d.mts +0 -15
- package/dist/components/ui/time-picker-input.client.d.mts.map +0 -1
- package/dist/components/ui/time-picker-input.client.mjs +0 -64
- package/dist/components/ui/time-picker-input.client.mjs.map +0 -1
- package/dist/lib/utils/time-picker.d.mts +0 -6
- package/dist/lib/utils/time-picker.d.mts.map +0 -1
- package/dist/lib/utils/time-picker.mjs +0 -104
- package/dist/lib/utils/time-picker.mjs.map +0 -1
- package/dist/modules/auth/handler/client.client.d.mts.map +0 -1
- package/dist/modules/auth/handler/client.client.mjs +0 -21
- package/dist/modules/auth/handler/client.client.mjs.map +0 -1
- package/src/components/ui/time-input.client.tsx +0 -56
- package/src/components/ui/time-picker-input.client.tsx +0 -107
- package/src/modules/auth/components/guard.client.tsx +0 -12
- package/src/modules/auth/handler/client.client.ts +0 -16
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { useSuspenseQuery } from "@tanstack/react-query";
|
|
4
|
+
import { ClientAuth } from "../entry.client";
|
|
5
5
|
|
|
6
|
-
export
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
export function useSession(authClient: ClientAuth<never, never>) {
|
|
7
|
+
const session = useSuspenseQuery({
|
|
8
|
+
queryKey: ["session"],
|
|
9
|
+
queryFn: async () => {
|
|
10
|
+
const session = await authClient.getSession();
|
|
11
|
+
|
|
10
12
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
if (session.error) {
|
|
14
|
+
console.error(session.error);
|
|
15
|
+
return null;
|
|
16
|
+
}
|
|
15
17
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
});
|
|
18
|
+
return session.data;
|
|
19
|
+
},
|
|
20
|
+
staleTime: 1000 * 60 * 60,
|
|
21
|
+
});
|
|
20
22
|
|
|
21
|
-
export function useSession() {
|
|
22
|
-
const session = useSuspenseQuery(sessionQueryOptions);
|
|
23
23
|
return session;
|
|
24
24
|
}
|
|
@@ -112,9 +112,6 @@ export function useSingleCommandMenu<TData, TMeta>({
|
|
|
112
112
|
commands,
|
|
113
113
|
meta,
|
|
114
114
|
}: SingleCommandMenuProps<TData, TMeta> & { data: TData }) {
|
|
115
|
-
// const permissions = commands.map((command) => command.permission).filter(Boolean) as Permission[];
|
|
116
|
-
// usePermission(mergePermissions(permissions));
|
|
117
|
-
|
|
118
115
|
// filter out commands that don't have valid conditions
|
|
119
116
|
const validCommands = commands.filter((command) =>
|
|
120
117
|
command.mode === "single"
|
|
@@ -139,9 +136,6 @@ export function useBulkCommandMenu<TData, TMeta>({
|
|
|
139
136
|
commands,
|
|
140
137
|
meta,
|
|
141
138
|
}: BulkCommandMenuProps<TData, TMeta>) {
|
|
142
|
-
// const permissions = commands.map((command) => command.permission).filter(Boolean) as Permission[];
|
|
143
|
-
// usePermission(mergePermissions(permissions));
|
|
144
|
-
|
|
145
139
|
/**
|
|
146
140
|
* Filter out commands that don't have valid conditions
|
|
147
141
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type TulipConfig<TValues> = {
|
|
1
|
+
export type TulipConfig<TValues = object> = {
|
|
2
2
|
general: {
|
|
3
3
|
name: string;
|
|
4
4
|
shortName: string;
|
|
@@ -12,4 +12,5 @@ export type TulipConfig<TValues> = {
|
|
|
12
12
|
* Build the Tulip config
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
export const defineTulipConfig = <TValues>(config: TulipConfig<TValues>): TulipConfig<TValues> =>
|
|
15
|
+
export const defineTulipConfig = <TValues>(config: TulipConfig<TValues>): TulipConfig<TValues> =>
|
|
16
|
+
config;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { DateTimeInput } from "@/components/ui/input-date-time";
|
|
4
|
+
import { cn } from "@/lib/utils/cn";
|
|
5
|
+
import { ComponentProps } from "react";
|
|
6
|
+
import { useInlineEdit, type useInlineEditOptions } from "../hooks/use-inline.client";
|
|
7
|
+
import { inlineEditVariants, InlineEditVariantsProps } from "../lib/variants";
|
|
8
|
+
|
|
9
|
+
export function InlineDateTimeInput<Required extends boolean = false>({
|
|
10
|
+
initialValue,
|
|
11
|
+
action,
|
|
12
|
+
permission,
|
|
13
|
+
variant,
|
|
14
|
+
className,
|
|
15
|
+
updateStrategy,
|
|
16
|
+
isRequired,
|
|
17
|
+
disabled,
|
|
18
|
+
...props
|
|
19
|
+
}: ComponentProps<typeof DateTimeInput> & useInlineEditOptions<Date, Required> & InlineEditVariantsProps) {
|
|
20
|
+
const { value, handleChange, handleBlur, status, isAllowed } = useInlineEdit({
|
|
21
|
+
initialValue,
|
|
22
|
+
action,
|
|
23
|
+
permission,
|
|
24
|
+
updateStrategy,
|
|
25
|
+
isRequired,
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
return (
|
|
29
|
+
<DateTimeInput
|
|
30
|
+
value={value ?? undefined}
|
|
31
|
+
className={cn(inlineEditVariants({ variant, status }), className)}
|
|
32
|
+
disabled={disabled || !isAllowed}
|
|
33
|
+
onValueChange={(date) => handleChange(date ?? null)}
|
|
34
|
+
onValueBlur={(date) => handleBlur(date ?? null)}
|
|
35
|
+
{...props}
|
|
36
|
+
/>
|
|
37
|
+
);
|
|
38
|
+
}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Components
|
|
3
|
+
*/
|
|
1
4
|
export * from "./components/combobox-dropdown.client";
|
|
2
5
|
export * from "./components/combobox.client";
|
|
3
6
|
export * from "./components/date-input.client";
|
|
4
7
|
export * from "./components/date-picker.client";
|
|
8
|
+
export * from "./components/date-time.client";
|
|
5
9
|
export * from "./components/editor.client";
|
|
6
10
|
export * from "./components/input-recipient.client";
|
|
7
11
|
export * from "./components/input-toggle.client";
|
|
@@ -9,4 +13,9 @@ export * from "./components/input.client";
|
|
|
9
13
|
export * from "./components/select.client";
|
|
10
14
|
export * from "./components/switch.client";
|
|
11
15
|
export * from "./components/toggle.client";
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Hooks
|
|
19
|
+
*/
|
|
12
20
|
export * from "./hooks/context.client";
|
|
21
|
+
export * from "./hooks/use-inline.client";
|
|
@@ -86,7 +86,7 @@ export function useInlineEdit<
|
|
|
86
86
|
/**
|
|
87
87
|
* Permission guard
|
|
88
88
|
*/
|
|
89
|
-
const
|
|
89
|
+
const data = usePermission(props.permission ?? context.permission ?? {});
|
|
90
90
|
const isAllowed = data?.success;
|
|
91
91
|
|
|
92
92
|
/**
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime119 from "react/jsx-runtime";
|
|
2
|
-
|
|
3
|
-
//#region src/components/ui/time-input.client.d.ts
|
|
4
|
-
type TimeInputProps = {
|
|
5
|
-
value: Date | undefined;
|
|
6
|
-
onChange: (value: Date | undefined) => void;
|
|
7
|
-
format?: "HH:mm" | "HH:mm:ss";
|
|
8
|
-
};
|
|
9
|
-
declare function TimeInput({
|
|
10
|
-
value,
|
|
11
|
-
onChange,
|
|
12
|
-
format
|
|
13
|
-
}: TimeInputProps): react_jsx_runtime119.JSX.Element;
|
|
14
|
-
//#endregion
|
|
15
|
-
export { TimeInput };
|
|
16
|
-
//# sourceMappingURL=time-input.client.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"time-input.client.d.mts","names":[],"sources":["../../../src/components/ui/time-input.client.tsx"],"sourcesContent":[],"mappings":";;;KAGK,cAAA;SACI;oBACW;EAFf,MAAA,CAAA,EAAA,OAAA,GAAc,UAAA;AAMnB,CAAA;AAA4B,iBAAZ,SAAA,CAAY;EAAA,KAAA;EAAA,QAAA;EAAA;AAAA,CAAA,EAAqC,cAArC,CAAA,EAAmD,oBAAA,CAAA,GAAA,CAAA,OAAnD"}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { TimePickerInput } from "./time-picker-input.client.mjs";
|
|
2
|
-
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
-
import React from "react";
|
|
4
|
-
|
|
5
|
-
//#region src/components/ui/time-input.client.tsx
|
|
6
|
-
function TimeInput({ value, onChange, format = "HH:mm" }) {
|
|
7
|
-
const minuteRef = React.useRef(null);
|
|
8
|
-
const hourRef = React.useRef(null);
|
|
9
|
-
const secondRef = React.useRef(null);
|
|
10
|
-
return /* @__PURE__ */ jsxs("div", {
|
|
11
|
-
className: "flex gap-1.5",
|
|
12
|
-
children: [
|
|
13
|
-
/* @__PURE__ */ jsx(TimePickerInput, {
|
|
14
|
-
"data-input": true,
|
|
15
|
-
picker: "hours",
|
|
16
|
-
date: value,
|
|
17
|
-
setDate: onChange,
|
|
18
|
-
ref: hourRef,
|
|
19
|
-
onRightFocus: () => minuteRef.current?.focus(),
|
|
20
|
-
className: "w-full"
|
|
21
|
-
}),
|
|
22
|
-
/* @__PURE__ */ jsx("span", {
|
|
23
|
-
className: "mb-1 self-center",
|
|
24
|
-
children: ":"
|
|
25
|
-
}),
|
|
26
|
-
/* @__PURE__ */ jsx(TimePickerInput, {
|
|
27
|
-
"data-input": true,
|
|
28
|
-
picker: "minutes",
|
|
29
|
-
date: value,
|
|
30
|
-
setDate: onChange,
|
|
31
|
-
ref: minuteRef,
|
|
32
|
-
onLeftFocus: () => hourRef.current?.focus(),
|
|
33
|
-
onRightFocus: () => secondRef.current?.focus(),
|
|
34
|
-
className: "w-full"
|
|
35
|
-
}),
|
|
36
|
-
format === "HH:mm:ss" && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("span", {
|
|
37
|
-
className: "mb-1 self-center",
|
|
38
|
-
children: ":"
|
|
39
|
-
}), /* @__PURE__ */ jsx(TimePickerInput, {
|
|
40
|
-
picker: "seconds",
|
|
41
|
-
date: value,
|
|
42
|
-
setDate: onChange,
|
|
43
|
-
ref: secondRef,
|
|
44
|
-
onLeftFocus: () => minuteRef.current?.focus(),
|
|
45
|
-
className: "w-full"
|
|
46
|
-
})] })
|
|
47
|
-
]
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
//#endregion
|
|
52
|
-
export { TimeInput };
|
|
53
|
-
//# sourceMappingURL=time-input.client.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"time-input.client.mjs","names":[],"sources":["../../../src/components/ui/time-input.client.tsx"],"sourcesContent":["import React from \"react\";\nimport { TimePickerInput } from \"./time-picker-input.client\";\n\ntype TimeInputProps = {\n value: Date | undefined;\n onChange: (value: Date | undefined) => void;\n format?: \"HH:mm\" | \"HH:mm:ss\";\n};\n\nexport function TimeInput({ value, onChange, format = \"HH:mm\" }: TimeInputProps) {\n const minuteRef = React.useRef<HTMLInputElement>(null);\n const hourRef = React.useRef<HTMLInputElement>(null);\n const secondRef = React.useRef<HTMLInputElement>(null);\n\n return (\n <div className=\"flex gap-1.5\">\n <TimePickerInput\n data-input\n picker=\"hours\"\n date={value}\n setDate={onChange}\n ref={hourRef}\n onRightFocus={() => minuteRef.current?.focus()}\n className=\"w-full\"\n />\n\n <span className=\"mb-1 self-center\">:</span>\n\n <TimePickerInput\n data-input\n picker=\"minutes\"\n date={value}\n setDate={onChange}\n ref={minuteRef}\n onLeftFocus={() => hourRef.current?.focus()}\n onRightFocus={() => secondRef.current?.focus()}\n className=\"w-full\"\n />\n\n {format === \"HH:mm:ss\" && (\n <>\n <span className=\"mb-1 self-center\">:</span>\n\n <TimePickerInput\n picker=\"seconds\"\n date={value}\n setDate={onChange}\n ref={secondRef}\n onLeftFocus={() => minuteRef.current?.focus()}\n className=\"w-full\"\n />\n </>\n )}\n </div>\n );\n}\n"],"mappings":";;;;;AASA,SAAgB,UAAU,EAAE,OAAO,UAAU,SAAS,WAA2B;CAC/E,MAAM,YAAY,MAAM,OAAyB,KAAK;CACtD,MAAM,UAAU,MAAM,OAAyB,KAAK;CACpD,MAAM,YAAY,MAAM,OAAyB,KAAK;AAEtD,QACE,qBAAC;EAAI,WAAU;;GACb,oBAAC;IACC;IACA,QAAO;IACP,MAAM;IACN,SAAS;IACT,KAAK;IACL,oBAAoB,UAAU,SAAS,OAAO;IAC9C,WAAU;KACV;GAEF,oBAAC;IAAK,WAAU;cAAmB;KAAQ;GAE3C,oBAAC;IACC;IACA,QAAO;IACP,MAAM;IACN,SAAS;IACT,KAAK;IACL,mBAAmB,QAAQ,SAAS,OAAO;IAC3C,oBAAoB,UAAU,SAAS,OAAO;IAC9C,WAAU;KACV;GAED,WAAW,cACV,4CACE,oBAAC;IAAK,WAAU;cAAmB;KAAQ,EAE3C,oBAAC;IACC,QAAO;IACP,MAAM;IACN,SAAS;IACT,KAAK;IACL,mBAAmB,UAAU,SAAS,OAAO;IAC7C,WAAU;KACV,IACD;;GAED"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { TimePickerType } from "../../lib/utils/time-picker.mjs";
|
|
2
|
-
import React from "react";
|
|
3
|
-
|
|
4
|
-
//#region src/components/ui/time-picker-input.client.d.ts
|
|
5
|
-
interface TimePickerInputProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
|
6
|
-
picker: TimePickerType;
|
|
7
|
-
date: Date | undefined;
|
|
8
|
-
setDate: (date: Date | undefined) => void;
|
|
9
|
-
onRightFocus?: () => void;
|
|
10
|
-
onLeftFocus?: () => void;
|
|
11
|
-
}
|
|
12
|
-
declare const TimePickerInput: React.ForwardRefExoticComponent<TimePickerInputProps & React.RefAttributes<HTMLInputElement>>;
|
|
13
|
-
//#endregion
|
|
14
|
-
export { TimePickerInput, TimePickerInputProps };
|
|
15
|
-
//# sourceMappingURL=time-picker-input.client.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"time-picker-input.client.d.mts","names":[],"sources":["../../../src/components/ui/time-picker-input.client.tsx"],"sourcesContent":[],"mappings":";;;;UAaiB,oBAAA,SAA6B,KAAA,CAAM,oBAAoB;UAC9D;EADO,IAAA,EAET,IAFS,GAAA,SAAA;EAAuD,OAAA,EAAA,CAAA,IAAA,EAGtD,IAHsD,GAAA,SAAA,EAAA,GAAA,IAAA;EAC9D,YAAA,CAAA,EAAA,GAAA,GAAA,IAAA;EACF,WAAA,CAAA,EAAA,GAAA,GAAA,IAAA;;cAMF,eAR8C,EAQ/B,KAAA,CAAA,yBAR+B,CAQ/B,oBAR+B,GAQ/B,KAAA,CAAA,aAR+B,CAQ/B,gBAR+B,CAAA,CAAA"}
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import { cn } from "../../lib/utils/cn.mjs";
|
|
4
|
-
import { Input } from "./input.mjs";
|
|
5
|
-
import { getArrowByType, getDateByType, setDateByType } from "../../lib/utils/time-picker.mjs";
|
|
6
|
-
import { jsx } from "react/jsx-runtime";
|
|
7
|
-
import React from "react";
|
|
8
|
-
|
|
9
|
-
//#region src/components/ui/time-picker-input.client.tsx
|
|
10
|
-
const TimePickerInput = React.forwardRef(({ className, type = "tel", value, id, name, date = new Date((/* @__PURE__ */ new Date()).setHours(0, 0, 0, 0)), setDate, onChange, onKeyDown, picker, onLeftFocus, onRightFocus, ...props }, ref) => {
|
|
11
|
-
const [flag, setFlag] = React.useState(false);
|
|
12
|
-
/**
|
|
13
|
-
* allow the user to enter the second digit within 2 seconds
|
|
14
|
-
* otherwise start again with entering first digit
|
|
15
|
-
*/
|
|
16
|
-
React.useEffect(() => {
|
|
17
|
-
if (flag) {
|
|
18
|
-
const timer = setTimeout(() => {
|
|
19
|
-
setFlag(false);
|
|
20
|
-
}, 2e3);
|
|
21
|
-
return () => clearTimeout(timer);
|
|
22
|
-
}
|
|
23
|
-
}, [flag]);
|
|
24
|
-
const calculatedValue = React.useMemo(() => getDateByType(date, picker), [date, picker]);
|
|
25
|
-
const handleKeyDown = (e) => {
|
|
26
|
-
if (e.key === "Tab") return;
|
|
27
|
-
e.preventDefault();
|
|
28
|
-
if (e.key === "ArrowRight") onRightFocus?.();
|
|
29
|
-
if (e.key === "ArrowLeft") onLeftFocus?.();
|
|
30
|
-
if (["ArrowUp", "ArrowDown"].includes(e.key)) {
|
|
31
|
-
const newValue = getArrowByType(calculatedValue, e.key === "ArrowUp" ? 1 : -1, picker);
|
|
32
|
-
if (flag) setFlag(false);
|
|
33
|
-
setDate(setDateByType(new Date(date), newValue, picker));
|
|
34
|
-
}
|
|
35
|
-
if (e.key >= "0" && e.key <= "9") {
|
|
36
|
-
const newValue = !flag ? "0" + e.key : calculatedValue.slice(1, 2) + e.key;
|
|
37
|
-
setFlag((prev) => !prev);
|
|
38
|
-
setDate(setDateByType(new Date(date), newValue, picker));
|
|
39
|
-
}
|
|
40
|
-
};
|
|
41
|
-
return /* @__PURE__ */ jsx(Input, {
|
|
42
|
-
ref,
|
|
43
|
-
id: id || picker,
|
|
44
|
-
name: name || picker,
|
|
45
|
-
className: cn("focus:bg-accent focus:text-accent-foreground w-[48px] text-center text-base tabular-nums caret-transparent [&::-webkit-inner-spin-button]:appearance-none", className),
|
|
46
|
-
value: value || calculatedValue,
|
|
47
|
-
onChange: (e) => {
|
|
48
|
-
e.preventDefault();
|
|
49
|
-
onChange?.(e);
|
|
50
|
-
},
|
|
51
|
-
type,
|
|
52
|
-
inputMode: "decimal",
|
|
53
|
-
onKeyDown: (e) => {
|
|
54
|
-
onKeyDown?.(e);
|
|
55
|
-
handleKeyDown(e);
|
|
56
|
-
},
|
|
57
|
-
...props
|
|
58
|
-
});
|
|
59
|
-
});
|
|
60
|
-
TimePickerInput.displayName = "TimePickerInput";
|
|
61
|
-
|
|
62
|
-
//#endregion
|
|
63
|
-
export { TimePickerInput };
|
|
64
|
-
//# sourceMappingURL=time-picker-input.client.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"time-picker-input.client.mjs","names":[],"sources":["../../../src/components/ui/time-picker-input.client.tsx"],"sourcesContent":["\"use client\";\n\nimport { cn } from \"@/lib/utils/cn\";\nimport {\n TimePickerType,\n getArrowByType,\n getDateByType,\n setDateByType,\n} from \"@/lib/utils/time-picker\";\nimport { Input } from \"./input\";\n\nimport React from \"react\";\n\nexport interface TimePickerInputProps extends React.InputHTMLAttributes<HTMLInputElement> {\n picker: TimePickerType;\n date: Date | undefined;\n setDate: (date: Date | undefined) => void;\n onRightFocus?: () => void;\n onLeftFocus?: () => void;\n}\n\nconst TimePickerInput = React.forwardRef<HTMLInputElement, TimePickerInputProps>(\n (\n {\n className,\n type = \"tel\",\n value,\n id,\n name,\n date = new Date(new Date().setHours(0, 0, 0, 0)),\n setDate,\n onChange,\n onKeyDown,\n picker,\n onLeftFocus,\n onRightFocus,\n ...props\n },\n ref,\n ) => {\n const [flag, setFlag] = React.useState<boolean>(false);\n\n /**\n * allow the user to enter the second digit within 2 seconds\n * otherwise start again with entering first digit\n */\n React.useEffect(() => {\n if (flag) {\n const timer = setTimeout(() => {\n setFlag(false);\n }, 2000);\n\n return () => clearTimeout(timer);\n }\n }, [flag]);\n\n const calculatedValue = React.useMemo(() => getDateByType(date, picker), [date, picker]);\n\n const handleKeyDown = (e: React.KeyboardEvent<HTMLInputElement>) => {\n if (e.key === \"Tab\") return;\n e.preventDefault();\n if (e.key === \"ArrowRight\") onRightFocus?.();\n if (e.key === \"ArrowLeft\") onLeftFocus?.();\n if ([\"ArrowUp\", \"ArrowDown\"].includes(e.key)) {\n const step = e.key === \"ArrowUp\" ? 1 : -1;\n const newValue = getArrowByType(calculatedValue, step, picker);\n if (flag) setFlag(false);\n const tempDate = new Date(date);\n setDate(setDateByType(tempDate, newValue, picker));\n }\n if (e.key >= \"0\" && e.key <= \"9\") {\n const newValue = !flag ? \"0\" + e.key : calculatedValue.slice(1, 2) + e.key;\n setFlag((prev) => !prev);\n const tempDate = new Date(date);\n setDate(setDateByType(tempDate, newValue, picker));\n }\n };\n\n return (\n <Input\n ref={ref}\n id={id || picker}\n name={name || picker}\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground w-[48px] text-center text-base tabular-nums caret-transparent [&::-webkit-inner-spin-button]:appearance-none\",\n className,\n )}\n value={value || calculatedValue}\n onChange={(e) => {\n e.preventDefault();\n onChange?.(e);\n }}\n type={type}\n inputMode=\"decimal\"\n onKeyDown={(e) => {\n onKeyDown?.(e);\n handleKeyDown(e);\n }}\n {...props}\n />\n );\n },\n);\n\nTimePickerInput.displayName = \"TimePickerInput\";\n\nexport { TimePickerInput };\n"],"mappings":";;;;;;;;;AAqBA,MAAM,kBAAkB,MAAM,YAE1B,EACE,WACA,OAAO,OACP,OACA,IACA,MACA,OAAO,IAAI,sBAAK,IAAI,MAAM,EAAC,SAAS,GAAG,GAAG,GAAG,EAAE,CAAC,EAChD,SACA,UACA,WACA,QACA,aACA,cACA,GAAG,SAEL,QACG;CACH,MAAM,CAAC,MAAM,WAAW,MAAM,SAAkB,MAAM;;;;;AAMtD,OAAM,gBAAgB;AACpB,MAAI,MAAM;GACR,MAAM,QAAQ,iBAAiB;AAC7B,YAAQ,MAAM;MACb,IAAK;AAER,gBAAa,aAAa,MAAM;;IAEjC,CAAC,KAAK,CAAC;CAEV,MAAM,kBAAkB,MAAM,cAAc,cAAc,MAAM,OAAO,EAAE,CAAC,MAAM,OAAO,CAAC;CAExF,MAAM,iBAAiB,MAA6C;AAClE,MAAI,EAAE,QAAQ,MAAO;AACrB,IAAE,gBAAgB;AAClB,MAAI,EAAE,QAAQ,aAAc,iBAAgB;AAC5C,MAAI,EAAE,QAAQ,YAAa,gBAAe;AAC1C,MAAI,CAAC,WAAW,YAAY,CAAC,SAAS,EAAE,IAAI,EAAE;GAE5C,MAAM,WAAW,eAAe,iBADnB,EAAE,QAAQ,YAAY,IAAI,IACgB,OAAO;AAC9D,OAAI,KAAM,SAAQ,MAAM;AAExB,WAAQ,cADS,IAAI,KAAK,KAAK,EACC,UAAU,OAAO,CAAC;;AAEpD,MAAI,EAAE,OAAO,OAAO,EAAE,OAAO,KAAK;GAChC,MAAM,WAAW,CAAC,OAAO,MAAM,EAAE,MAAM,gBAAgB,MAAM,GAAG,EAAE,GAAG,EAAE;AACvE,YAAS,SAAS,CAAC,KAAK;AAExB,WAAQ,cADS,IAAI,KAAK,KAAK,EACC,UAAU,OAAO,CAAC;;;AAItD,QACE,oBAAC;EACM;EACL,IAAI,MAAM;EACV,MAAM,QAAQ;EACd,WAAW,GACT,6JACA,UACD;EACD,OAAO,SAAS;EAChB,WAAW,MAAM;AACf,KAAE,gBAAgB;AAClB,cAAW,EAAE;;EAET;EACN,WAAU;EACV,YAAY,MAAM;AAChB,eAAY,EAAE;AACd,iBAAc,EAAE;;EAElB,GAAI;GACJ;EAGP;AAED,gBAAgB,cAAc"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"time-picker.d.mts","names":[],"sources":["../../../src/lib/utils/time-picker.ts"],"sourcesContent":[],"mappings":";;KAmGY,cAAA"}
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
//#region src/lib/utils/time-picker.ts
|
|
2
|
-
/**
|
|
3
|
-
* regular expression to check for valid hour format (01-23)
|
|
4
|
-
*/
|
|
5
|
-
function isValidHour(value) {
|
|
6
|
-
return /^(0[0-9]|1[0-9]|2[0-3])$/.test(value);
|
|
7
|
-
}
|
|
8
|
-
/**
|
|
9
|
-
* regular expression to check for valid minute format (00-59)
|
|
10
|
-
*/
|
|
11
|
-
function isValidMinuteOrSecond(value) {
|
|
12
|
-
return /^[0-5][0-9]$/.test(value);
|
|
13
|
-
}
|
|
14
|
-
function getValidNumber(value, { max, min = 0, loop = false }) {
|
|
15
|
-
let numericValue = parseInt(value, 10);
|
|
16
|
-
if (!isNaN(numericValue)) {
|
|
17
|
-
if (!loop) {
|
|
18
|
-
if (numericValue > max) numericValue = max;
|
|
19
|
-
if (numericValue < min) numericValue = min;
|
|
20
|
-
} else {
|
|
21
|
-
if (numericValue > max) numericValue = min;
|
|
22
|
-
if (numericValue < min) numericValue = max;
|
|
23
|
-
}
|
|
24
|
-
return numericValue.toString().padStart(2, "0");
|
|
25
|
-
}
|
|
26
|
-
return "00";
|
|
27
|
-
}
|
|
28
|
-
function getValidHour(value) {
|
|
29
|
-
if (isValidHour(value)) return value;
|
|
30
|
-
return getValidNumber(value, { max: 23 });
|
|
31
|
-
}
|
|
32
|
-
function getValidMinuteOrSecond(value) {
|
|
33
|
-
if (isValidMinuteOrSecond(value)) return value;
|
|
34
|
-
return getValidNumber(value, { max: 59 });
|
|
35
|
-
}
|
|
36
|
-
function getValidArrowNumber(value, { min, max, step }) {
|
|
37
|
-
let numericValue = parseInt(value, 10);
|
|
38
|
-
if (!isNaN(numericValue)) {
|
|
39
|
-
numericValue += step;
|
|
40
|
-
return getValidNumber(String(numericValue), {
|
|
41
|
-
min,
|
|
42
|
-
max,
|
|
43
|
-
loop: true
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
return "00";
|
|
47
|
-
}
|
|
48
|
-
function getValidArrowHour(value, step) {
|
|
49
|
-
return getValidArrowNumber(value, {
|
|
50
|
-
min: 0,
|
|
51
|
-
max: 23,
|
|
52
|
-
step
|
|
53
|
-
});
|
|
54
|
-
}
|
|
55
|
-
function getValidArrowMinuteOrSecond(value, step) {
|
|
56
|
-
return getValidArrowNumber(value, {
|
|
57
|
-
min: 0,
|
|
58
|
-
max: 59,
|
|
59
|
-
step
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
function setMinutes(date, value) {
|
|
63
|
-
const minutes = getValidMinuteOrSecond(value);
|
|
64
|
-
date.setMinutes(parseInt(minutes, 10));
|
|
65
|
-
return date;
|
|
66
|
-
}
|
|
67
|
-
function setSeconds(date, value) {
|
|
68
|
-
const seconds = getValidMinuteOrSecond(value);
|
|
69
|
-
date.setSeconds(parseInt(seconds, 10));
|
|
70
|
-
return date;
|
|
71
|
-
}
|
|
72
|
-
function setHours(date, value) {
|
|
73
|
-
const hours = getValidHour(value);
|
|
74
|
-
date.setHours(parseInt(hours, 10));
|
|
75
|
-
return date;
|
|
76
|
-
}
|
|
77
|
-
function setDateByType(date, value, type) {
|
|
78
|
-
switch (type) {
|
|
79
|
-
case "minutes": return setMinutes(date, value);
|
|
80
|
-
case "seconds": return setSeconds(date, value);
|
|
81
|
-
case "hours": return setHours(date, value);
|
|
82
|
-
default: return date;
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
function getDateByType(date, type) {
|
|
86
|
-
switch (type) {
|
|
87
|
-
case "minutes": return getValidMinuteOrSecond(String(date.getMinutes()));
|
|
88
|
-
case "seconds": return getValidMinuteOrSecond(String(date.getSeconds()));
|
|
89
|
-
case "hours": return getValidHour(String(date.getHours()));
|
|
90
|
-
default: return "00";
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
function getArrowByType(value, step, type) {
|
|
94
|
-
switch (type) {
|
|
95
|
-
case "minutes": return getValidArrowMinuteOrSecond(value, step);
|
|
96
|
-
case "seconds": return getValidArrowMinuteOrSecond(value, step);
|
|
97
|
-
case "hours": return getValidArrowHour(value, step);
|
|
98
|
-
default: return "00";
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
//#endregion
|
|
103
|
-
export { getArrowByType, getDateByType, setDateByType };
|
|
104
|
-
//# sourceMappingURL=time-picker.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"time-picker.mjs","names":[],"sources":["../../../src/lib/utils/time-picker.ts"],"sourcesContent":["/**\n * regular expression to check for valid hour format (01-23)\n */\nexport function isValidHour(value: string) {\n return /^(0[0-9]|1[0-9]|2[0-3])$/.test(value);\n}\n\n/**\n * regular expression to check for valid 12 hour format (01-12)\n */\nexport function isValid12Hour(value: string) {\n return /^(0[1-9]|1[0-2])$/.test(value);\n}\n\n/**\n * regular expression to check for valid minute format (00-59)\n */\nexport function isValidMinuteOrSecond(value: string) {\n return /^[0-5][0-9]$/.test(value);\n}\n\ntype GetValidNumberConfig = { max: number; min?: number; loop?: boolean };\n\nexport function getValidNumber(\n value: string,\n { max, min = 0, loop = false }: GetValidNumberConfig,\n) {\n let numericValue = parseInt(value, 10);\n\n if (!isNaN(numericValue)) {\n if (!loop) {\n if (numericValue > max) numericValue = max;\n if (numericValue < min) numericValue = min;\n } else {\n if (numericValue > max) numericValue = min;\n if (numericValue < min) numericValue = max;\n }\n return numericValue.toString().padStart(2, \"0\");\n }\n\n return \"00\";\n}\n\nexport function getValidHour(value: string) {\n if (isValidHour(value)) return value;\n return getValidNumber(value, { max: 23 });\n}\n\nexport function getValid12Hour(value: string) {\n if (isValid12Hour(value)) return value;\n return getValidNumber(value, { max: 12 });\n}\n\nexport function getValidMinuteOrSecond(value: string) {\n if (isValidMinuteOrSecond(value)) return value;\n return getValidNumber(value, { max: 59 });\n}\n\ntype GetValidArrowNumberConfig = {\n min: number;\n max: number;\n step: number;\n};\n\nexport function getValidArrowNumber(value: string, { min, max, step }: GetValidArrowNumberConfig) {\n let numericValue = parseInt(value, 10);\n if (!isNaN(numericValue)) {\n numericValue += step;\n return getValidNumber(String(numericValue), { min, max, loop: true });\n }\n return \"00\";\n}\n\nexport function getValidArrowHour(value: string, step: number) {\n return getValidArrowNumber(value, { min: 0, max: 23, step });\n}\n\nexport function getValidArrowMinuteOrSecond(value: string, step: number) {\n return getValidArrowNumber(value, { min: 0, max: 59, step });\n}\n\nexport function setMinutes(date: Date, value: string) {\n const minutes = getValidMinuteOrSecond(value);\n date.setMinutes(parseInt(minutes, 10));\n return date;\n}\n\nexport function setSeconds(date: Date, value: string) {\n const seconds = getValidMinuteOrSecond(value);\n date.setSeconds(parseInt(seconds, 10));\n return date;\n}\n\nexport function setHours(date: Date, value: string) {\n const hours = getValidHour(value);\n date.setHours(parseInt(hours, 10));\n return date;\n}\n\nexport type TimePickerType = \"minutes\" | \"seconds\" | \"hours\"; // | \"12hours\";\n\nexport function setDateByType(date: Date, value: string, type: TimePickerType) {\n switch (type) {\n case \"minutes\":\n return setMinutes(date, value);\n case \"seconds\":\n return setSeconds(date, value);\n case \"hours\":\n return setHours(date, value);\n default:\n return date;\n }\n}\n\nexport function getDateByType(date: Date, type: TimePickerType) {\n switch (type) {\n case \"minutes\":\n return getValidMinuteOrSecond(String(date.getMinutes()));\n case \"seconds\":\n return getValidMinuteOrSecond(String(date.getSeconds()));\n case \"hours\":\n return getValidHour(String(date.getHours()));\n default:\n return \"00\";\n }\n}\n\nexport function getArrowByType(value: string, step: number, type: TimePickerType) {\n switch (type) {\n case \"minutes\":\n return getValidArrowMinuteOrSecond(value, step);\n case \"seconds\":\n return getValidArrowMinuteOrSecond(value, step);\n case \"hours\":\n return getValidArrowHour(value, step);\n default:\n return \"00\";\n }\n}\n"],"mappings":";;;;AAGA,SAAgB,YAAY,OAAe;AACzC,QAAO,2BAA2B,KAAK,MAAM;;;;;AAa/C,SAAgB,sBAAsB,OAAe;AACnD,QAAO,eAAe,KAAK,MAAM;;AAKnC,SAAgB,eACd,OACA,EAAE,KAAK,MAAM,GAAG,OAAO,SACvB;CACA,IAAI,eAAe,SAAS,OAAO,GAAG;AAEtC,KAAI,CAAC,MAAM,aAAa,EAAE;AACxB,MAAI,CAAC,MAAM;AACT,OAAI,eAAe,IAAK,gBAAe;AACvC,OAAI,eAAe,IAAK,gBAAe;SAClC;AACL,OAAI,eAAe,IAAK,gBAAe;AACvC,OAAI,eAAe,IAAK,gBAAe;;AAEzC,SAAO,aAAa,UAAU,CAAC,SAAS,GAAG,IAAI;;AAGjD,QAAO;;AAGT,SAAgB,aAAa,OAAe;AAC1C,KAAI,YAAY,MAAM,CAAE,QAAO;AAC/B,QAAO,eAAe,OAAO,EAAE,KAAK,IAAI,CAAC;;AAQ3C,SAAgB,uBAAuB,OAAe;AACpD,KAAI,sBAAsB,MAAM,CAAE,QAAO;AACzC,QAAO,eAAe,OAAO,EAAE,KAAK,IAAI,CAAC;;AAS3C,SAAgB,oBAAoB,OAAe,EAAE,KAAK,KAAK,QAAmC;CAChG,IAAI,eAAe,SAAS,OAAO,GAAG;AACtC,KAAI,CAAC,MAAM,aAAa,EAAE;AACxB,kBAAgB;AAChB,SAAO,eAAe,OAAO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
-
import { adminClient, emailOTPClient, inferAdditionalFields } from "better-auth/client/plugins";
|
|
6
|
-
import { createAuthClient } from "better-auth/react";
|
|
7
|
-
|
|
8
|
-
//#region src/modules/auth/handler/client.client.ts
|
|
9
|
-
const authClient = createAuthClient({
|
|
10
|
-
baseURL: url(),
|
|
11
|
-
plugins: [
|
|
12
|
-
emailOTPClient(),
|
|
13
|
-
passkeyClient(),
|
|
14
|
-
adminClient(),
|
|
15
|
-
inferAdditionalFields()
|
|
16
|
-
]
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
//#endregion
|
|
20
|
-
export { authClient };
|
|
21
|
-
//# sourceMappingURL=client.client.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"client.client.mjs","names":[],"sources":["../../../../src/modules/auth/handler/client.client.ts"],"sourcesContent":["\"use client\";\n\nimport { passkeyClient } from \"@better-auth/passkey/client\";\nimport { adminClient, emailOTPClient, inferAdditionalFields } from \"better-auth/client/plugins\";\nimport { createAuthClient } from \"better-auth/react\";\nimport { AuthClient } from \"./init\";\nimport { url } from \"@/lib/utils/url\";\n\nexport const authClient = createAuthClient({\n baseURL: url(),\n plugins: [emailOTPClient(), passkeyClient(), adminClient(), inferAdditionalFields<AuthClient>()],\n});\n\nexport type ClientAuth = typeof authClient;\n\nexport type ClientSession = typeof authClient.$Infer.Session;\n"],"mappings":";;;;;;;;AAQA,MAAa,aAAa,iBAAiB;CACzC,SAAS,KAAK;CACd,SAAS;EAAC,gBAAgB;EAAE,eAAe;EAAE,aAAa;EAAE,uBAAmC;EAAC;CACjG,CAAC"}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { TimePickerInput } from "./time-picker-input.client";
|
|
3
|
-
|
|
4
|
-
type TimeInputProps = {
|
|
5
|
-
value: Date | undefined;
|
|
6
|
-
onChange: (value: Date | undefined) => void;
|
|
7
|
-
format?: "HH:mm" | "HH:mm:ss";
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
export function TimeInput({ value, onChange, format = "HH:mm" }: TimeInputProps) {
|
|
11
|
-
const minuteRef = React.useRef<HTMLInputElement>(null);
|
|
12
|
-
const hourRef = React.useRef<HTMLInputElement>(null);
|
|
13
|
-
const secondRef = React.useRef<HTMLInputElement>(null);
|
|
14
|
-
|
|
15
|
-
return (
|
|
16
|
-
<div className="flex gap-1.5">
|
|
17
|
-
<TimePickerInput
|
|
18
|
-
data-input
|
|
19
|
-
picker="hours"
|
|
20
|
-
date={value}
|
|
21
|
-
setDate={onChange}
|
|
22
|
-
ref={hourRef}
|
|
23
|
-
onRightFocus={() => minuteRef.current?.focus()}
|
|
24
|
-
className="w-full"
|
|
25
|
-
/>
|
|
26
|
-
|
|
27
|
-
<span className="mb-1 self-center">:</span>
|
|
28
|
-
|
|
29
|
-
<TimePickerInput
|
|
30
|
-
data-input
|
|
31
|
-
picker="minutes"
|
|
32
|
-
date={value}
|
|
33
|
-
setDate={onChange}
|
|
34
|
-
ref={minuteRef}
|
|
35
|
-
onLeftFocus={() => hourRef.current?.focus()}
|
|
36
|
-
onRightFocus={() => secondRef.current?.focus()}
|
|
37
|
-
className="w-full"
|
|
38
|
-
/>
|
|
39
|
-
|
|
40
|
-
{format === "HH:mm:ss" && (
|
|
41
|
-
<>
|
|
42
|
-
<span className="mb-1 self-center">:</span>
|
|
43
|
-
|
|
44
|
-
<TimePickerInput
|
|
45
|
-
picker="seconds"
|
|
46
|
-
date={value}
|
|
47
|
-
setDate={onChange}
|
|
48
|
-
ref={secondRef}
|
|
49
|
-
onLeftFocus={() => minuteRef.current?.focus()}
|
|
50
|
-
className="w-full"
|
|
51
|
-
/>
|
|
52
|
-
</>
|
|
53
|
-
)}
|
|
54
|
-
</div>
|
|
55
|
-
);
|
|
56
|
-
}
|