@rangka/client 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/skills/add-widget/SKILL.md +101 -0
- package/.turbo/turbo-build.log +29 -0
- package/CLAUDE.md +236 -0
- package/LICENSE +21 -0
- package/README.md +68 -0
- package/components.json +25 -0
- package/dist/App.d.ts +2 -0
- package/dist/App.d.ts.map +1 -0
- package/dist/App.js +24 -0
- package/dist/App.js.map +1 -0
- package/dist/api/auth.d.ts +12 -0
- package/dist/api/auth.d.ts.map +1 -0
- package/dist/api/auth.js +25 -0
- package/dist/api/auth.js.map +1 -0
- package/dist/api/boot.d.ts +3 -0
- package/dist/api/boot.d.ts.map +1 -0
- package/dist/api/boot.js +9 -0
- package/dist/api/boot.js.map +1 -0
- package/dist/api/client.d.ts +2 -0
- package/dist/api/client.d.ts.map +1 -0
- package/dist/api/client.js +22 -0
- package/dist/api/client.js.map +1 -0
- package/dist/api/paths.d.ts +2 -0
- package/dist/api/paths.d.ts.map +1 -0
- package/dist/api/paths.js +4 -0
- package/dist/api/paths.js.map +1 -0
- package/dist/api/token.d.ts +4 -0
- package/dist/api/token.d.ts.map +1 -0
- package/dist/api/token.js +11 -0
- package/dist/api/token.js.map +1 -0
- package/dist/auth/LoginForm.d.ts +11 -0
- package/dist/auth/LoginForm.d.ts.map +1 -0
- package/dist/auth/LoginForm.js +17 -0
- package/dist/auth/LoginForm.js.map +1 -0
- package/dist/auth/SessionExpired.d.ts +5 -0
- package/dist/auth/SessionExpired.d.ts.map +1 -0
- package/dist/auth/SessionExpired.js +7 -0
- package/dist/auth/SessionExpired.js.map +1 -0
- package/dist/auth/SetupForm.d.ts +11 -0
- package/dist/auth/SetupForm.d.ts.map +1 -0
- package/dist/auth/SetupForm.js +17 -0
- package/dist/auth/SetupForm.js.map +1 -0
- package/dist/boot/BootGate.d.ts +5 -0
- package/dist/boot/BootGate.d.ts.map +1 -0
- package/dist/boot/BootGate.js +25 -0
- package/dist/boot/BootGate.js.map +1 -0
- package/dist/boot/BootProvider.d.ts +17 -0
- package/dist/boot/BootProvider.d.ts.map +1 -0
- package/dist/boot/BootProvider.js +16 -0
- package/dist/boot/BootProvider.js.map +1 -0
- package/dist/boot/types.d.ts +18 -0
- package/dist/boot/types.d.ts.map +1 -0
- package/dist/boot/types.js +2 -0
- package/dist/boot/types.js.map +1 -0
- package/dist/boot/useBoot.d.ts +12 -0
- package/dist/boot/useBoot.d.ts.map +1 -0
- package/dist/boot/useBoot.js +79 -0
- package/dist/boot/useBoot.js.map +1 -0
- package/dist/components/Icon.d.ts +6 -0
- package/dist/components/Icon.d.ts.map +1 -0
- package/dist/components/Icon.js +13 -0
- package/dist/components/Icon.js.map +1 -0
- package/dist/components/ui/accordion.d.ts +8 -0
- package/dist/components/ui/accordion.d.ts.map +1 -0
- package/dist/components/ui/accordion.js +18 -0
- package/dist/components/ui/accordion.js.map +1 -0
- package/dist/components/ui/alert-dialog.d.ts +19 -0
- package/dist/components/ui/alert-dialog.d.ts.map +1 -0
- package/dist/components/ui/alert-dialog.js +42 -0
- package/dist/components/ui/alert-dialog.js.map +1 -0
- package/dist/components/ui/alert.d.ts +11 -0
- package/dist/components/ui/alert.d.ts.map +1 -0
- package/dist/components/ui/alert.js +28 -0
- package/dist/components/ui/alert.js.map +1 -0
- package/dist/components/ui/aspect-ratio.d.ts +4 -0
- package/dist/components/ui/aspect-ratio.d.ts.map +1 -0
- package/dist/components/ui/aspect-ratio.js +8 -0
- package/dist/components/ui/aspect-ratio.js.map +1 -0
- package/dist/components/ui/avatar.d.ts +12 -0
- package/dist/components/ui/avatar.d.ts.map +1 -0
- package/dist/components/ui/avatar.js +23 -0
- package/dist/components/ui/avatar.js.map +1 -0
- package/dist/components/ui/badge.d.ts +10 -0
- package/dist/components/ui/badge.d.ts.map +1 -0
- package/dist/components/ui/badge.js +25 -0
- package/dist/components/ui/badge.js.map +1 -0
- package/dist/components/ui/breadcrumb.d.ts +12 -0
- package/dist/components/ui/breadcrumb.d.ts.map +1 -0
- package/dist/components/ui/breadcrumb.js +28 -0
- package/dist/components/ui/breadcrumb.js.map +1 -0
- package/dist/components/ui/button-group.d.ts +12 -0
- package/dist/components/ui/button-group.d.ts.map +1 -0
- package/dist/components/ui/button-group.js +28 -0
- package/dist/components/ui/button-group.js.map +1 -0
- package/dist/components/ui/button.d.ts +11 -0
- package/dist/components/ui/button.d.ts.map +1 -0
- package/dist/components/ui/button.js +36 -0
- package/dist/components/ui/button.js.map +1 -0
- package/dist/components/ui/calendar.d.ts +11 -0
- package/dist/components/ui/calendar.d.ts.map +1 -0
- package/dist/components/ui/calendar.js +78 -0
- package/dist/components/ui/calendar.js.map +1 -0
- package/dist/components/ui/card.d.ts +12 -0
- package/dist/components/ui/card.d.ts.map +1 -0
- package/dist/components/ui/card.js +25 -0
- package/dist/components/ui/card.js.map +1 -0
- package/dist/components/ui/carousel.d.ts +29 -0
- package/dist/components/ui/carousel.d.ts.map +1 -0
- package/dist/components/ui/carousel.js +91 -0
- package/dist/components/ui/carousel.js.map +1 -0
- package/dist/components/ui/chart.d.ts +45 -0
- package/dist/components/ui/chart.d.ts.map +1 -0
- package/dist/components/ui/chart.js +119 -0
- package/dist/components/ui/chart.js.map +1 -0
- package/dist/components/ui/checkbox.d.ts +5 -0
- package/dist/components/ui/checkbox.d.ts.map +1 -0
- package/dist/components/ui/checkbox.js +9 -0
- package/dist/components/ui/checkbox.js.map +1 -0
- package/dist/components/ui/collapsible.d.ts +6 -0
- package/dist/components/ui/collapsible.d.ts.map +1 -0
- package/dist/components/ui/collapsible.js +14 -0
- package/dist/components/ui/collapsible.js.map +1 -0
- package/dist/components/ui/combobox.d.ts +25 -0
- package/dist/components/ui/combobox.d.ts.map +1 -0
- package/dist/components/ui/combobox.js +59 -0
- package/dist/components/ui/combobox.js.map +1 -0
- package/dist/components/ui/command.d.ts +19 -0
- package/dist/components/ui/command.d.ts.map +1 -0
- package/dist/components/ui/command.js +35 -0
- package/dist/components/ui/command.js.map +1 -0
- package/dist/components/ui/context-menu.d.ts +32 -0
- package/dist/components/ui/context-menu.d.ts.map +1 -0
- package/dist/components/ui/context-menu.js +51 -0
- package/dist/components/ui/context-menu.js.map +1 -0
- package/dist/components/ui/dialog.d.ts +18 -0
- package/dist/components/ui/dialog.d.ts.map +1 -0
- package/dist/components/ui/dialog.js +38 -0
- package/dist/components/ui/dialog.js.map +1 -0
- package/dist/components/ui/direction.d.ts +8 -0
- package/dist/components/ui/direction.d.ts.map +1 -0
- package/dist/components/ui/direction.js +9 -0
- package/dist/components/ui/direction.js.map +1 -0
- package/dist/components/ui/drawer.d.ts +14 -0
- package/dist/components/ui/drawer.d.ts.map +1 -0
- package/dist/components/ui/drawer.js +35 -0
- package/dist/components/ui/drawer.js.map +1 -0
- package/dist/components/ui/dropdown-menu.d.ts +30 -0
- package/dist/components/ui/dropdown-menu.d.ts.map +1 -0
- package/dist/components/ui/dropdown-menu.js +52 -0
- package/dist/components/ui/dropdown-menu.js.map +1 -0
- package/dist/components/ui/empty.d.ts +12 -0
- package/dist/components/ui/empty.d.ts.map +1 -0
- package/dist/components/ui/empty.js +34 -0
- package/dist/components/ui/empty.js.map +1 -0
- package/dist/components/ui/field.d.ts +25 -0
- package/dist/components/ui/field.d.ts.map +1 -0
- package/dist/components/ui/field.js +67 -0
- package/dist/components/ui/field.js.map +1 -0
- package/dist/components/ui/hover-card.d.ts +7 -0
- package/dist/components/ui/hover-card.d.ts.map +1 -0
- package/dist/components/ui/hover-card.js +14 -0
- package/dist/components/ui/hover-card.js.map +1 -0
- package/dist/components/ui/input-group.d.ts +17 -0
- package/dist/components/ui/input-group.d.ts.map +1 -0
- package/dist/components/ui/input-group.js +57 -0
- package/dist/components/ui/input-group.js.map +1 -0
- package/dist/components/ui/input-otp.d.ts +12 -0
- package/dist/components/ui/input-otp.d.ts.map +1 -0
- package/dist/components/ui/input-otp.js +22 -0
- package/dist/components/ui/input-otp.js.map +1 -0
- package/dist/components/ui/input.d.ts +4 -0
- package/dist/components/ui/input.d.ts.map +1 -0
- package/dist/components/ui/input.js +7 -0
- package/dist/components/ui/input.js.map +1 -0
- package/dist/components/ui/item.d.ts +24 -0
- package/dist/components/ui/item.d.ts.map +1 -0
- package/dist/components/ui/item.js +68 -0
- package/dist/components/ui/item.js.map +1 -0
- package/dist/components/ui/kbd.d.ts +4 -0
- package/dist/components/ui/kbd.d.ts.map +1 -0
- package/dist/components/ui/kbd.js +10 -0
- package/dist/components/ui/kbd.js.map +1 -0
- package/dist/components/ui/label.d.ts +5 -0
- package/dist/components/ui/label.d.ts.map +1 -0
- package/dist/components/ui/label.js +8 -0
- package/dist/components/ui/label.js.map +1 -0
- package/dist/components/ui/menubar.d.ts +31 -0
- package/dist/components/ui/menubar.d.ts.map +1 -0
- package/dist/components/ui/menubar.js +55 -0
- package/dist/components/ui/menubar.js.map +1 -0
- package/dist/components/ui/native-select.d.ts +9 -0
- package/dist/components/ui/native-select.d.ts.map +1 -0
- package/dist/components/ui/native-select.js +14 -0
- package/dist/components/ui/native-select.js.map +1 -0
- package/dist/components/ui/navigation-menu.d.ts +15 -0
- package/dist/components/ui/navigation-menu.d.ts.map +1 -0
- package/dist/components/ui/navigation-menu.js +32 -0
- package/dist/components/ui/navigation-menu.js.map +1 -0
- package/dist/components/ui/pagination.d.ts +18 -0
- package/dist/components/ui/pagination.d.ts.map +1 -0
- package/dist/components/ui/pagination.js +27 -0
- package/dist/components/ui/pagination.js.map +1 -0
- package/dist/components/ui/popover.d.ts +11 -0
- package/dist/components/ui/popover.d.ts.map +1 -0
- package/dist/components/ui/popover.js +26 -0
- package/dist/components/ui/popover.js.map +1 -0
- package/dist/components/ui/progress.d.ts +5 -0
- package/dist/components/ui/progress.d.ts.map +1 -0
- package/dist/components/ui/progress.js +9 -0
- package/dist/components/ui/progress.js.map +1 -0
- package/dist/components/ui/radio-group.d.ts +6 -0
- package/dist/components/ui/radio-group.d.ts.map +1 -0
- package/dist/components/ui/radio-group.js +11 -0
- package/dist/components/ui/radio-group.js.map +1 -0
- package/dist/components/ui/resizable.d.ts +8 -0
- package/dist/components/ui/resizable.d.ts.map +1 -0
- package/dist/components/ui/resizable.js +15 -0
- package/dist/components/ui/resizable.js.map +1 -0
- package/dist/components/ui/scroll-area.d.ts +6 -0
- package/dist/components/ui/scroll-area.d.ts.map +1 -0
- package/dist/components/ui/scroll-area.js +11 -0
- package/dist/components/ui/scroll-area.js.map +1 -0
- package/dist/components/ui/select.d.ts +16 -0
- package/dist/components/ui/select.d.ts.map +1 -0
- package/dist/components/ui/select.js +38 -0
- package/dist/components/ui/select.js.map +1 -0
- package/dist/components/ui/separator.d.ts +5 -0
- package/dist/components/ui/separator.d.ts.map +1 -0
- package/dist/components/ui/separator.js +8 -0
- package/dist/components/ui/separator.js.map +1 -0
- package/dist/components/ui/sheet.d.ts +15 -0
- package/dist/components/ui/sheet.d.ts.map +1 -0
- package/dist/components/ui/sheet.js +37 -0
- package/dist/components/ui/sheet.js.map +1 -0
- package/dist/components/ui/sidebar.d.ts +70 -0
- package/dist/components/ui/sidebar.d.ts.map +1 -0
- package/dist/components/ui/sidebar.js +205 -0
- package/dist/components/ui/sidebar.js.map +1 -0
- package/dist/components/ui/skeleton.d.ts +3 -0
- package/dist/components/ui/skeleton.d.ts.map +1 -0
- package/dist/components/ui/skeleton.js +7 -0
- package/dist/components/ui/skeleton.js.map +1 -0
- package/dist/components/ui/slider.d.ts +5 -0
- package/dist/components/ui/slider.d.ts.map +1 -0
- package/dist/components/ui/slider.js +11 -0
- package/dist/components/ui/slider.js.map +1 -0
- package/dist/components/ui/sonner.d.ts +4 -0
- package/dist/components/ui/sonner.d.ts.map +1 -0
- package/dist/components/ui/sonner.js +25 -0
- package/dist/components/ui/sonner.js.map +1 -0
- package/dist/components/ui/spinner.d.ts +3 -0
- package/dist/components/ui/spinner.d.ts.map +1 -0
- package/dist/components/ui/spinner.js +8 -0
- package/dist/components/ui/spinner.js.map +1 -0
- package/dist/components/ui/switch.d.ts +7 -0
- package/dist/components/ui/switch.d.ts.map +1 -0
- package/dist/components/ui/switch.js +9 -0
- package/dist/components/ui/switch.js.map +1 -0
- package/dist/components/ui/table.d.ts +11 -0
- package/dist/components/ui/table.d.ts.map +1 -0
- package/dist/components/ui/table.js +28 -0
- package/dist/components/ui/table.js.map +1 -0
- package/dist/components/ui/tabs.d.ts +12 -0
- package/dist/components/ui/tabs.d.ts.map +1 -0
- package/dist/components/ui/tabs.js +30 -0
- package/dist/components/ui/tabs.js.map +1 -0
- package/dist/components/ui/textarea.d.ts +4 -0
- package/dist/components/ui/textarea.d.ts.map +1 -0
- package/dist/components/ui/textarea.js +7 -0
- package/dist/components/ui/textarea.js.map +1 -0
- package/dist/components/ui/toggle-group.d.ts +11 -0
- package/dist/components/ui/toggle-group.d.ts.map +1 -0
- package/dist/components/ui/toggle-group.js +24 -0
- package/dist/components/ui/toggle-group.js.map +1 -0
- package/dist/components/ui/toggle.d.ts +10 -0
- package/dist/components/ui/toggle.d.ts.map +1 -0
- package/dist/components/ui/toggle.js +26 -0
- package/dist/components/ui/toggle.js.map +1 -0
- package/dist/components/ui/tooltip.d.ts +8 -0
- package/dist/components/ui/tooltip.d.ts.map +1 -0
- package/dist/components/ui/tooltip.js +18 -0
- package/dist/components/ui/tooltip.js.map +1 -0
- package/dist/context/MetaContext.d.ts +13 -0
- package/dist/context/MetaContext.d.ts.map +1 -0
- package/dist/context/MetaContext.js +14 -0
- package/dist/context/MetaContext.js.map +1 -0
- package/dist/context/ModuleContext.d.ts +14 -0
- package/dist/context/ModuleContext.d.ts.map +1 -0
- package/dist/context/ModuleContext.js +40 -0
- package/dist/context/ModuleContext.js.map +1 -0
- package/dist/context/PermissionsContext.d.ts +14 -0
- package/dist/context/PermissionsContext.d.ts.map +1 -0
- package/dist/context/PermissionsContext.js +20 -0
- package/dist/context/PermissionsContext.js.map +1 -0
- package/dist/context/ShellProviders.d.ts +7 -0
- package/dist/context/ShellProviders.d.ts.map +1 -0
- package/dist/context/ShellProviders.js +16 -0
- package/dist/context/ShellProviders.js.map +1 -0
- package/dist/context/UserContext.d.ts +8 -0
- package/dist/context/UserContext.d.ts.map +1 -0
- package/dist/context/UserContext.js +14 -0
- package/dist/context/UserContext.js.map +1 -0
- package/dist/data/QueryProvider.d.ts +7 -0
- package/dist/data/QueryProvider.d.ts.map +1 -0
- package/dist/data/QueryProvider.js +6 -0
- package/dist/data/QueryProvider.js.map +1 -0
- package/dist/data/queryClient.d.ts +3 -0
- package/dist/data/queryClient.d.ts.map +1 -0
- package/dist/data/queryClient.js +18 -0
- package/dist/data/queryClient.js.map +1 -0
- package/dist/data/useModelMeta.d.ts +6 -0
- package/dist/data/useModelMeta.d.ts.map +1 -0
- package/dist/data/useModelMeta.js +12 -0
- package/dist/data/useModelMeta.js.map +1 -0
- package/dist/data/useMutation.d.ts +8 -0
- package/dist/data/useMutation.d.ts.map +1 -0
- package/dist/data/useMutation.js +51 -0
- package/dist/data/useMutation.js.map +1 -0
- package/dist/data/useRecord.d.ts +6 -0
- package/dist/data/useRecord.d.ts.map +1 -0
- package/dist/data/useRecord.js +21 -0
- package/dist/data/useRecord.js.map +1 -0
- package/dist/data/useSource.d.ts +27 -0
- package/dist/data/useSource.d.ts.map +1 -0
- package/dist/data/useSource.js +82 -0
- package/dist/data/useSource.js.map +1 -0
- package/dist/hooks/use-mobile.d.ts +2 -0
- package/dist/hooks/use-mobile.d.ts.map +1 -0
- package/dist/hooks/use-mobile.js +16 -0
- package/dist/hooks/use-mobile.js.map +1 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +12 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/utils.d.ts +3 -0
- package/dist/lib/utils.d.ts.map +1 -0
- package/dist/lib/utils.js +6 -0
- package/dist/lib/utils.js.map +1 -0
- package/dist/main.d.ts +2 -0
- package/dist/main.d.ts.map +1 -0
- package/dist/main.js +12 -0
- package/dist/main.js.map +1 -0
- package/dist/router/NotFound.d.ts +2 -0
- package/dist/router/NotFound.d.ts.map +1 -0
- package/dist/router/NotFound.js +5 -0
- package/dist/router/NotFound.js.map +1 -0
- package/dist/router/RouterProvider.d.ts +5 -0
- package/dist/router/RouterProvider.d.ts.map +1 -0
- package/dist/router/RouterProvider.js +7 -0
- package/dist/router/RouterProvider.js.map +1 -0
- package/dist/router/buildRouteTree.d.ts +3 -0
- package/dist/router/buildRouteTree.d.ts.map +1 -0
- package/dist/router/buildRouteTree.js +43 -0
- package/dist/router/buildRouteTree.js.map +1 -0
- package/dist/router/createShellRouter.d.ts +4 -0
- package/dist/router/createShellRouter.d.ts.map +1 -0
- package/dist/router/createShellRouter.js +8 -0
- package/dist/router/createShellRouter.js.map +1 -0
- package/dist/router/hooks.d.ts +10 -0
- package/dist/router/hooks.d.ts.map +1 -0
- package/dist/router/hooks.js +31 -0
- package/dist/router/hooks.js.map +1 -0
- package/dist/shell/assets/index--35CAvcP.js +8715 -0
- package/dist/shell/assets/index-COLmoPYo.css +1 -0
- package/dist/shell/assets/index-Ck_eod9F.js +1 -0
- package/dist/shell/assets/inter-cyrillic-ext-wght-normal-BOeWTOD4.woff2 +0 -0
- package/dist/shell/assets/inter-cyrillic-wght-normal-DqGufNeO.woff2 +0 -0
- package/dist/shell/assets/inter-greek-ext-wght-normal-DlzME5K_.woff2 +0 -0
- package/dist/shell/assets/inter-greek-wght-normal-CkhJZR-_.woff2 +0 -0
- package/dist/shell/assets/inter-latin-ext-wght-normal-DO1Apj_S.woff2 +0 -0
- package/dist/shell/assets/inter-latin-wght-normal-Dx4kXJAl.woff2 +0 -0
- package/dist/shell/assets/inter-vietnamese-wght-normal-CBcvBZtf.woff2 +0 -0
- package/dist/shell/index.html +13 -0
- package/dist/studio/bridge.d.ts +2 -0
- package/dist/studio/bridge.d.ts.map +1 -0
- package/dist/studio/bridge.js +112 -0
- package/dist/studio/bridge.js.map +1 -0
- package/dist/studio/index.d.ts +2 -0
- package/dist/studio/index.d.ts.map +1 -0
- package/dist/studio/index.js +3 -0
- package/dist/studio/index.js.map +1 -0
- package/dist/studio/overlay.d.ts +11 -0
- package/dist/studio/overlay.d.ts.map +1 -0
- package/dist/studio/overlay.js +41 -0
- package/dist/studio/overlay.js.map +1 -0
- package/dist/studio/types.d.ts +42 -0
- package/dist/studio/types.d.ts.map +1 -0
- package/dist/studio/types.js +2 -0
- package/dist/studio/types.js.map +1 -0
- package/dist/studio/walker.d.ts +6 -0
- package/dist/studio/walker.d.ts.map +1 -0
- package/dist/studio/walker.js +43 -0
- package/dist/studio/walker.js.map +1 -0
- package/dist/widgets/action/dispatcher.d.ts +31 -0
- package/dist/widgets/action/dispatcher.d.ts.map +1 -0
- package/dist/widgets/action/dispatcher.js +224 -0
- package/dist/widgets/action/dispatcher.js.map +1 -0
- package/dist/widgets/action/index.d.ts +3 -0
- package/dist/widgets/action/index.d.ts.map +1 -0
- package/dist/widgets/action/index.js +2 -0
- package/dist/widgets/action/index.js.map +1 -0
- package/dist/widgets/binding/index.d.ts +3 -0
- package/dist/widgets/binding/index.d.ts.map +1 -0
- package/dist/widgets/binding/index.js +2 -0
- package/dist/widgets/binding/index.js.map +1 -0
- package/dist/widgets/binding/resolver.d.ts +23 -0
- package/dist/widgets/binding/resolver.d.ts.map +1 -0
- package/dist/widgets/binding/resolver.js +33 -0
- package/dist/widgets/binding/resolver.js.map +1 -0
- package/dist/widgets/components/AttachmentWidget.d.ts +29 -0
- package/dist/widgets/components/AttachmentWidget.d.ts.map +1 -0
- package/dist/widgets/components/AttachmentWidget.js +53 -0
- package/dist/widgets/components/AttachmentWidget.js.map +1 -0
- package/dist/widgets/components/AttachmentsWidget.d.ts +33 -0
- package/dist/widgets/components/AttachmentsWidget.d.ts.map +1 -0
- package/dist/widgets/components/AttachmentsWidget.js +52 -0
- package/dist/widgets/components/AttachmentsWidget.js.map +1 -0
- package/dist/widgets/components/BadgeWidget.d.ts +29 -0
- package/dist/widgets/components/BadgeWidget.d.ts.map +1 -0
- package/dist/widgets/components/BadgeWidget.js +31 -0
- package/dist/widgets/components/BadgeWidget.js.map +1 -0
- package/dist/widgets/components/ButtonWidget.d.ts +38 -0
- package/dist/widgets/components/ButtonWidget.d.ts.map +1 -0
- package/dist/widgets/components/ButtonWidget.js +29 -0
- package/dist/widgets/components/ButtonWidget.js.map +1 -0
- package/dist/widgets/components/CardWidget.d.ts +33 -0
- package/dist/widgets/components/CardWidget.d.ts.map +1 -0
- package/dist/widgets/components/CardWidget.js +28 -0
- package/dist/widgets/components/CardWidget.js.map +1 -0
- package/dist/widgets/components/CheckboxWidget.d.ts +23 -0
- package/dist/widgets/components/CheckboxWidget.d.ts.map +1 -0
- package/dist/widgets/components/CheckboxWidget.js +24 -0
- package/dist/widgets/components/CheckboxWidget.js.map +1 -0
- package/dist/widgets/components/CodeWidget.d.ts +30 -0
- package/dist/widgets/components/CodeWidget.d.ts.map +1 -0
- package/dist/widgets/components/CodeWidget.js +27 -0
- package/dist/widgets/components/CodeWidget.js.map +1 -0
- package/dist/widgets/components/ColumnWidget.d.ts +34 -0
- package/dist/widgets/components/ColumnWidget.d.ts.map +1 -0
- package/dist/widgets/components/ColumnWidget.js +20 -0
- package/dist/widgets/components/ColumnWidget.js.map +1 -0
- package/dist/widgets/components/ComputedWidget.d.ts +24 -0
- package/dist/widgets/components/ComputedWidget.d.ts.map +1 -0
- package/dist/widgets/components/ComputedWidget.js +39 -0
- package/dist/widgets/components/ComputedWidget.js.map +1 -0
- package/dist/widgets/components/DataWidget.d.ts +22 -0
- package/dist/widgets/components/DataWidget.d.ts.map +1 -0
- package/dist/widgets/components/DataWidget.js +99 -0
- package/dist/widgets/components/DataWidget.js.map +1 -0
- package/dist/widgets/components/DatePickerWidget.d.ts +23 -0
- package/dist/widgets/components/DatePickerWidget.d.ts.map +1 -0
- package/dist/widgets/components/DatePickerWidget.js +38 -0
- package/dist/widgets/components/DatePickerWidget.js.map +1 -0
- package/dist/widgets/components/DatetimeWidget.d.ts +23 -0
- package/dist/widgets/components/DatetimeWidget.d.ts.map +1 -0
- package/dist/widgets/components/DatetimeWidget.js +68 -0
- package/dist/widgets/components/DatetimeWidget.js.map +1 -0
- package/dist/widgets/components/DividerWidget.d.ts +24 -0
- package/dist/widgets/components/DividerWidget.d.ts.map +1 -0
- package/dist/widgets/components/DividerWidget.js +33 -0
- package/dist/widgets/components/DividerWidget.js.map +1 -0
- package/dist/widgets/components/DrawerWidget.d.ts +28 -0
- package/dist/widgets/components/DrawerWidget.d.ts.map +1 -0
- package/dist/widgets/components/DrawerWidget.js +36 -0
- package/dist/widgets/components/DrawerWidget.js.map +1 -0
- package/dist/widgets/components/DynamicLinkWidget.d.ts +29 -0
- package/dist/widgets/components/DynamicLinkWidget.d.ts.map +1 -0
- package/dist/widgets/components/DynamicLinkWidget.js +51 -0
- package/dist/widgets/components/DynamicLinkWidget.js.map +1 -0
- package/dist/widgets/components/GridWidget.d.ts +53 -0
- package/dist/widgets/components/GridWidget.d.ts.map +1 -0
- package/dist/widgets/components/GridWidget.js +111 -0
- package/dist/widgets/components/GridWidget.js.map +1 -0
- package/dist/widgets/components/GroupWidget.d.ts +50 -0
- package/dist/widgets/components/GroupWidget.d.ts.map +1 -0
- package/dist/widgets/components/GroupWidget.js +85 -0
- package/dist/widgets/components/GroupWidget.js.map +1 -0
- package/dist/widgets/components/IconWidget.d.ts +27 -0
- package/dist/widgets/components/IconWidget.d.ts.map +1 -0
- package/dist/widgets/components/IconWidget.js +22 -0
- package/dist/widgets/components/IconWidget.js.map +1 -0
- package/dist/widgets/components/ImageWidget.d.ts +28 -0
- package/dist/widgets/components/ImageWidget.d.ts.map +1 -0
- package/dist/widgets/components/ImageWidget.js +25 -0
- package/dist/widgets/components/ImageWidget.js.map +1 -0
- package/dist/widgets/components/InputWidget.d.ts +51 -0
- package/dist/widgets/components/InputWidget.d.ts.map +1 -0
- package/dist/widgets/components/InputWidget.js +46 -0
- package/dist/widgets/components/InputWidget.js.map +1 -0
- package/dist/widgets/components/JsonWidget.d.ts +27 -0
- package/dist/widgets/components/JsonWidget.d.ts.map +1 -0
- package/dist/widgets/components/JsonWidget.js +54 -0
- package/dist/widgets/components/JsonWidget.js.map +1 -0
- package/dist/widgets/components/LinkWidget.d.ts +26 -0
- package/dist/widgets/components/LinkWidget.d.ts.map +1 -0
- package/dist/widgets/components/LinkWidget.js +42 -0
- package/dist/widgets/components/LinkWidget.js.map +1 -0
- package/dist/widgets/components/ManyToManyWidget.d.ts +26 -0
- package/dist/widgets/components/ManyToManyWidget.d.ts.map +1 -0
- package/dist/widgets/components/ManyToManyWidget.js +54 -0
- package/dist/widgets/components/ManyToManyWidget.js.map +1 -0
- package/dist/widgets/components/ModalWidget.d.ts +28 -0
- package/dist/widgets/components/ModalWidget.d.ts.map +1 -0
- package/dist/widgets/components/ModalWidget.js +36 -0
- package/dist/widgets/components/ModalWidget.js.map +1 -0
- package/dist/widgets/components/MoneyWidget.d.ts +31 -0
- package/dist/widgets/components/MoneyWidget.d.ts.map +1 -0
- package/dist/widgets/components/MoneyWidget.js +52 -0
- package/dist/widgets/components/MoneyWidget.js.map +1 -0
- package/dist/widgets/components/RepeatWidget.d.ts +30 -0
- package/dist/widgets/components/RepeatWidget.d.ts.map +1 -0
- package/dist/widgets/components/RepeatWidget.js +50 -0
- package/dist/widgets/components/RepeatWidget.js.map +1 -0
- package/dist/widgets/components/ScrollAreaWidget.d.ts +27 -0
- package/dist/widgets/components/ScrollAreaWidget.d.ts.map +1 -0
- package/dist/widgets/components/ScrollAreaWidget.js +27 -0
- package/dist/widgets/components/ScrollAreaWidget.js.map +1 -0
- package/dist/widgets/components/SectionWidget.d.ts +36 -0
- package/dist/widgets/components/SectionWidget.d.ts.map +1 -0
- package/dist/widgets/components/SectionWidget.js +46 -0
- package/dist/widgets/components/SectionWidget.js.map +1 -0
- package/dist/widgets/components/SelectWidget.d.ts +30 -0
- package/dist/widgets/components/SelectWidget.d.ts.map +1 -0
- package/dist/widgets/components/SelectWidget.js +30 -0
- package/dist/widgets/components/SelectWidget.js.map +1 -0
- package/dist/widgets/components/SequenceWidget.d.ts +19 -0
- package/dist/widgets/components/SequenceWidget.d.ts.map +1 -0
- package/dist/widgets/components/SequenceWidget.js +20 -0
- package/dist/widgets/components/SequenceWidget.js.map +1 -0
- package/dist/widgets/components/SpacerWidget.d.ts +21 -0
- package/dist/widgets/components/SpacerWidget.d.ts.map +1 -0
- package/dist/widgets/components/SpacerWidget.js +25 -0
- package/dist/widgets/components/SpacerWidget.js.map +1 -0
- package/dist/widgets/components/SplitWidget.d.ts +32 -0
- package/dist/widgets/components/SplitWidget.d.ts.map +1 -0
- package/dist/widgets/components/SplitWidget.js +41 -0
- package/dist/widgets/components/SplitWidget.js.map +1 -0
- package/dist/widgets/components/StackWidget.d.ts +24 -0
- package/dist/widgets/components/StackWidget.d.ts.map +1 -0
- package/dist/widgets/components/StackWidget.js +29 -0
- package/dist/widgets/components/StackWidget.js.map +1 -0
- package/dist/widgets/components/TableWidget.d.ts +36 -0
- package/dist/widgets/components/TableWidget.d.ts.map +1 -0
- package/dist/widgets/components/TableWidget.js +154 -0
- package/dist/widgets/components/TableWidget.js.map +1 -0
- package/dist/widgets/components/TextWidget.d.ts +21 -0
- package/dist/widgets/components/TextWidget.d.ts.map +1 -0
- package/dist/widgets/components/TextWidget.js +38 -0
- package/dist/widgets/components/TextWidget.js.map +1 -0
- package/dist/widgets/components/TextareaWidget.d.ts +34 -0
- package/dist/widgets/components/TextareaWidget.d.ts.map +1 -0
- package/dist/widgets/components/TextareaWidget.js +31 -0
- package/dist/widgets/components/TextareaWidget.js.map +1 -0
- package/dist/widgets/components/TreeWidget.d.ts +26 -0
- package/dist/widgets/components/TreeWidget.d.ts.map +1 -0
- package/dist/widgets/components/TreeWidget.js +46 -0
- package/dist/widgets/components/TreeWidget.js.map +1 -0
- package/dist/widgets/components/index.d.ts +31 -0
- package/dist/widgets/components/index.d.ts.map +1 -0
- package/dist/widgets/components/index.js +31 -0
- package/dist/widgets/components/index.js.map +1 -0
- package/dist/widgets/components/register.d.ts +2 -0
- package/dist/widgets/components/register.d.ts.map +1 -0
- package/dist/widgets/components/register.js +85 -0
- package/dist/widgets/components/register.js.map +1 -0
- package/dist/widgets/components/table/CellRenderers.d.ts +11 -0
- package/dist/widgets/components/table/CellRenderers.d.ts.map +1 -0
- package/dist/widgets/components/table/CellRenderers.js +71 -0
- package/dist/widgets/components/table/CellRenderers.js.map +1 -0
- package/dist/widgets/components/table/TablePagination.d.ts +10 -0
- package/dist/widgets/components/table/TablePagination.d.ts.map +1 -0
- package/dist/widgets/components/table/TablePagination.js +11 -0
- package/dist/widgets/components/table/TablePagination.js.map +1 -0
- package/dist/widgets/components/table/TableToolbar.d.ts +17 -0
- package/dist/widgets/components/table/TableToolbar.d.ts.map +1 -0
- package/dist/widgets/components/table/TableToolbar.js +115 -0
- package/dist/widgets/components/table/TableToolbar.js.map +1 -0
- package/dist/widgets/components/table/filter-operators.d.ts +26 -0
- package/dist/widgets/components/table/filter-operators.d.ts.map +1 -0
- package/dist/widgets/components/table/filter-operators.js +111 -0
- package/dist/widgets/components/table/filter-operators.js.map +1 -0
- package/dist/widgets/components/table/index.d.ts +6 -0
- package/dist/widgets/components/table/index.d.ts.map +1 -0
- package/dist/widgets/components/table/index.js +5 -0
- package/dist/widgets/components/table/index.js.map +1 -0
- package/dist/widgets/condition/evaluator.d.ts +5 -0
- package/dist/widgets/condition/evaluator.d.ts.map +1 -0
- package/dist/widgets/condition/evaluator.js +49 -0
- package/dist/widgets/condition/evaluator.js.map +1 -0
- package/dist/widgets/condition/index.d.ts +2 -0
- package/dist/widgets/condition/index.d.ts.map +1 -0
- package/dist/widgets/condition/index.js +2 -0
- package/dist/widgets/condition/index.js.map +1 -0
- package/dist/widgets/context/builder.d.ts +7 -0
- package/dist/widgets/context/builder.d.ts.map +1 -0
- package/dist/widgets/context/builder.js +81 -0
- package/dist/widgets/context/builder.js.map +1 -0
- package/dist/widgets/context/index.d.ts +4 -0
- package/dist/widgets/context/index.d.ts.map +1 -0
- package/dist/widgets/context/index.js +3 -0
- package/dist/widgets/context/index.js.map +1 -0
- package/dist/widgets/context/types.d.ts +13 -0
- package/dist/widgets/context/types.d.ts.map +1 -0
- package/dist/widgets/context/types.js +21 -0
- package/dist/widgets/context/types.js.map +1 -0
- package/dist/widgets/data/index.d.ts +5 -0
- package/dist/widgets/data/index.d.ts.map +1 -0
- package/dist/widgets/data/index.js +3 -0
- package/dist/widgets/data/index.js.map +1 -0
- package/dist/widgets/data/useModelQuery.d.ts +21 -0
- package/dist/widgets/data/useModelQuery.d.ts.map +1 -0
- package/dist/widgets/data/useModelQuery.js +87 -0
- package/dist/widgets/data/useModelQuery.js.map +1 -0
- package/dist/widgets/data/useModelRecord.d.ts +12 -0
- package/dist/widgets/data/useModelRecord.d.ts.map +1 -0
- package/dist/widgets/data/useModelRecord.js +24 -0
- package/dist/widgets/data/useModelRecord.js.map +1 -0
- package/dist/widgets/expression/evaluator.d.ts +4 -0
- package/dist/widgets/expression/evaluator.d.ts.map +1 -0
- package/dist/widgets/expression/evaluator.js +84 -0
- package/dist/widgets/expression/evaluator.js.map +1 -0
- package/dist/widgets/expression/functions.d.ts +5 -0
- package/dist/widgets/expression/functions.d.ts.map +1 -0
- package/dist/widgets/expression/functions.js +128 -0
- package/dist/widgets/expression/functions.js.map +1 -0
- package/dist/widgets/expression/index.d.ts +6 -0
- package/dist/widgets/expression/index.d.ts.map +1 -0
- package/dist/widgets/expression/index.js +4 -0
- package/dist/widgets/expression/index.js.map +1 -0
- package/dist/widgets/expression/parser.d.ts +3 -0
- package/dist/widgets/expression/parser.d.ts.map +1 -0
- package/dist/widgets/expression/parser.js +202 -0
- package/dist/widgets/expression/parser.js.map +1 -0
- package/dist/widgets/expression/types.d.ts +27 -0
- package/dist/widgets/expression/types.d.ts.map +1 -0
- package/dist/widgets/expression/types.js +2 -0
- package/dist/widgets/expression/types.js.map +1 -0
- package/dist/widgets/form/FormContext.d.ts +20 -0
- package/dist/widgets/form/FormContext.d.ts.map +1 -0
- package/dist/widgets/form/FormContext.js +7 -0
- package/dist/widgets/form/FormContext.js.map +1 -0
- package/dist/widgets/form/FormProvider.d.ts +10 -0
- package/dist/widgets/form/FormProvider.d.ts.map +1 -0
- package/dist/widgets/form/FormProvider.js +64 -0
- package/dist/widgets/form/FormProvider.js.map +1 -0
- package/dist/widgets/form/FormWidget.d.ts +15 -0
- package/dist/widgets/form/FormWidget.d.ts.map +1 -0
- package/dist/widgets/form/FormWidget.js +28 -0
- package/dist/widgets/form/FormWidget.js.map +1 -0
- package/dist/widgets/form/index.d.ts +5 -0
- package/dist/widgets/form/index.d.ts.map +1 -0
- package/dist/widgets/form/index.js +4 -0
- package/dist/widgets/form/index.js.map +1 -0
- package/dist/widgets/form/useFormState.d.ts +22 -0
- package/dist/widgets/form/useFormState.d.ts.map +1 -0
- package/dist/widgets/form/useFormState.js +89 -0
- package/dist/widgets/form/useFormState.js.map +1 -0
- package/dist/widgets/form/useFormSubmit.d.ts +16 -0
- package/dist/widgets/form/useFormSubmit.d.ts.map +1 -0
- package/dist/widgets/form/useFormSubmit.js +66 -0
- package/dist/widgets/form/useFormSubmit.js.map +1 -0
- package/dist/widgets/form/useFormValidation.d.ts +6 -0
- package/dist/widgets/form/useFormValidation.d.ts.map +1 -0
- package/dist/widgets/form/useFormValidation.js +48 -0
- package/dist/widgets/form/useFormValidation.js.map +1 -0
- package/dist/widgets/hooks/index.d.ts +9 -0
- package/dist/widgets/hooks/index.d.ts.map +1 -0
- package/dist/widgets/hooks/index.js +8 -0
- package/dist/widgets/hooks/index.js.map +1 -0
- package/dist/widgets/hooks/useAction.d.ts +7 -0
- package/dist/widgets/hooks/useAction.d.ts.map +1 -0
- package/dist/widgets/hooks/useAction.js +73 -0
- package/dist/widgets/hooks/useAction.js.map +1 -0
- package/dist/widgets/hooks/useBind.d.ts +4 -0
- package/dist/widgets/hooks/useBind.d.ts.map +1 -0
- package/dist/widgets/hooks/useBind.js +27 -0
- package/dist/widgets/hooks/useBind.js.map +1 -0
- package/dist/widgets/hooks/useCondition.d.ts +3 -0
- package/dist/widgets/hooks/useCondition.d.ts.map +1 -0
- package/dist/widgets/hooks/useCondition.js +21 -0
- package/dist/widgets/hooks/useCondition.js.map +1 -0
- package/dist/widgets/hooks/useDataQuery.d.ts +19 -0
- package/dist/widgets/hooks/useDataQuery.d.ts.map +1 -0
- package/dist/widgets/hooks/useDataQuery.js +32 -0
- package/dist/widgets/hooks/useDataQuery.js.map +1 -0
- package/dist/widgets/hooks/useExpression.d.ts +2 -0
- package/dist/widgets/hooks/useExpression.d.ts.map +1 -0
- package/dist/widgets/hooks/useExpression.js +15 -0
- package/dist/widgets/hooks/useExpression.js.map +1 -0
- package/dist/widgets/hooks/usePageState.d.ts +5 -0
- package/dist/widgets/hooks/usePageState.d.ts.map +1 -0
- package/dist/widgets/hooks/usePageState.js +17 -0
- package/dist/widgets/hooks/usePageState.js.map +1 -0
- package/dist/widgets/hooks/useSurfaceContext.d.ts +5 -0
- package/dist/widgets/hooks/useSurfaceContext.d.ts.map +1 -0
- package/dist/widgets/hooks/useSurfaceContext.js +7 -0
- package/dist/widgets/hooks/useSurfaceContext.js.map +1 -0
- package/dist/widgets/hooks/useWidgetContext.d.ts +4 -0
- package/dist/widgets/hooks/useWidgetContext.d.ts.map +1 -0
- package/dist/widgets/hooks/useWidgetContext.js +11 -0
- package/dist/widgets/hooks/useWidgetContext.js.map +1 -0
- package/dist/widgets/index.d.ts +44 -0
- package/dist/widgets/index.d.ts.map +1 -0
- package/dist/widgets/index.js +31 -0
- package/dist/widgets/index.js.map +1 -0
- package/dist/widgets/lib/layout-props.d.ts +8 -0
- package/dist/widgets/lib/layout-props.d.ts.map +1 -0
- package/dist/widgets/lib/layout-props.js +134 -0
- package/dist/widgets/lib/layout-props.js.map +1 -0
- package/dist/widgets/reactivity/index.d.ts +5 -0
- package/dist/widgets/reactivity/index.d.ts.map +1 -0
- package/dist/widgets/reactivity/index.js +3 -0
- package/dist/widgets/reactivity/index.js.map +1 -0
- package/dist/widgets/reactivity/tracker.d.ts +8 -0
- package/dist/widgets/reactivity/tracker.d.ts.map +1 -0
- package/dist/widgets/reactivity/tracker.js +115 -0
- package/dist/widgets/reactivity/tracker.js.map +1 -0
- package/dist/widgets/reactivity/variables.d.ts +71 -0
- package/dist/widgets/reactivity/variables.d.ts.map +1 -0
- package/dist/widgets/reactivity/variables.js +175 -0
- package/dist/widgets/reactivity/variables.js.map +1 -0
- package/dist/widgets/registry.d.ts +14 -0
- package/dist/widgets/registry.d.ts.map +1 -0
- package/dist/widgets/registry.js +24 -0
- package/dist/widgets/registry.js.map +1 -0
- package/dist/widgets/renderer/SlotRenderer.d.ts +16 -0
- package/dist/widgets/renderer/SlotRenderer.d.ts.map +1 -0
- package/dist/widgets/renderer/SlotRenderer.js +13 -0
- package/dist/widgets/renderer/SlotRenderer.js.map +1 -0
- package/dist/widgets/renderer/WidgetRenderer.d.ts +12 -0
- package/dist/widgets/renderer/WidgetRenderer.d.ts.map +1 -0
- package/dist/widgets/renderer/WidgetRenderer.js +136 -0
- package/dist/widgets/renderer/WidgetRenderer.js.map +1 -0
- package/dist/widgets/renderer/index.d.ts +5 -0
- package/dist/widgets/renderer/index.d.ts.map +1 -0
- package/dist/widgets/renderer/index.js +3 -0
- package/dist/widgets/renderer/index.js.map +1 -0
- package/dist/widgets/shell/WidgetSlotRenderer.d.ts +14 -0
- package/dist/widgets/shell/WidgetSlotRenderer.d.ts.map +1 -0
- package/dist/widgets/shell/WidgetSlotRenderer.js +27 -0
- package/dist/widgets/shell/WidgetSlotRenderer.js.map +1 -0
- package/dist/widgets/shell/index.d.ts +5 -0
- package/dist/widgets/shell/index.d.ts.map +1 -0
- package/dist/widgets/shell/index.js +3 -0
- package/dist/widgets/shell/index.js.map +1 -0
- package/dist/widgets/shell/useActionHandlers.d.ts +7 -0
- package/dist/widgets/shell/useActionHandlers.d.ts.map +1 -0
- package/dist/widgets/shell/useActionHandlers.js +123 -0
- package/dist/widgets/shell/useActionHandlers.js.map +1 -0
- package/dist/widgets/state/index.d.ts +3 -0
- package/dist/widgets/state/index.d.ts.map +1 -0
- package/dist/widgets/state/index.js +2 -0
- package/dist/widgets/state/index.js.map +1 -0
- package/dist/widgets/state/store.d.ts +20 -0
- package/dist/widgets/state/store.d.ts.map +1 -0
- package/dist/widgets/state/store.js +84 -0
- package/dist/widgets/state/store.js.map +1 -0
- package/dist/widgets/types.d.ts +28 -0
- package/dist/widgets/types.d.ts.map +1 -0
- package/dist/widgets/types.js +2 -0
- package/dist/widgets/types.js.map +1 -0
- package/dist/widgets/validation/index.d.ts +3 -0
- package/dist/widgets/validation/index.d.ts.map +1 -0
- package/dist/widgets/validation/index.js +2 -0
- package/dist/widgets/validation/index.js.map +1 -0
- package/dist/widgets/validation/validator.d.ts +7 -0
- package/dist/widgets/validation/validator.d.ts.map +1 -0
- package/dist/widgets/validation/validator.js +125 -0
- package/dist/widgets/validation/validator.js.map +1 -0
- package/index.html +12 -0
- package/package.json +58 -0
- package/src/App.tsx +44 -0
- package/src/__tests__/setup.ts +1 -0
- package/src/api/auth.ts +41 -0
- package/src/api/boot.ts +10 -0
- package/src/api/client.ts +26 -0
- package/src/api/paths.ts +3 -0
- package/src/api/token.ts +13 -0
- package/src/auth/LoginForm.tsx +67 -0
- package/src/auth/SessionExpired.tsx +24 -0
- package/src/auth/SetupForm.tsx +76 -0
- package/src/boot/BootGate.tsx +35 -0
- package/src/boot/BootProvider.tsx +28 -0
- package/src/boot/types.ts +9 -0
- package/src/boot/useBoot.ts +111 -0
- package/src/components/Icon.tsx +17 -0
- package/src/components/ui/accordion.tsx +82 -0
- package/src/components/ui/alert-dialog.tsx +180 -0
- package/src/components/ui/alert.tsx +76 -0
- package/src/components/ui/aspect-ratio.tsx +9 -0
- package/src/components/ui/avatar.tsx +94 -0
- package/src/components/ui/badge.tsx +45 -0
- package/src/components/ui/breadcrumb.tsx +104 -0
- package/src/components/ui/button-group.tsx +78 -0
- package/src/components/ui/button.tsx +65 -0
- package/src/components/ui/calendar.tsx +187 -0
- package/src/components/ui/card.tsx +85 -0
- package/src/components/ui/carousel.tsx +229 -0
- package/src/components/ui/chart.tsx +339 -0
- package/src/components/ui/checkbox.tsx +27 -0
- package/src/components/ui/collapsible.tsx +21 -0
- package/src/components/ui/combobox.tsx +275 -0
- package/src/components/ui/command.tsx +178 -0
- package/src/components/ui/context-menu.tsx +242 -0
- package/src/components/ui/dialog.tsx +146 -0
- package/src/components/ui/direction.tsx +20 -0
- package/src/components/ui/drawer.tsx +118 -0
- package/src/components/ui/dropdown-menu.tsx +247 -0
- package/src/components/ui/empty.tsx +94 -0
- package/src/components/ui/field.tsx +224 -0
- package/src/components/ui/hover-card.tsx +36 -0
- package/src/components/ui/input-group.tsx +142 -0
- package/src/components/ui/input-otp.tsx +86 -0
- package/src/components/ui/input.tsx +19 -0
- package/src/components/ui/item.tsx +182 -0
- package/src/components/ui/kbd.tsx +26 -0
- package/src/components/ui/label.tsx +19 -0
- package/src/components/ui/menubar.tsx +260 -0
- package/src/components/ui/native-select.tsx +55 -0
- package/src/components/ui/navigation-menu.tsx +160 -0
- package/src/components/ui/pagination.tsx +112 -0
- package/src/components/ui/popover.tsx +74 -0
- package/src/components/ui/progress.tsx +31 -0
- package/src/components/ui/radio-group.tsx +42 -0
- package/src/components/ui/resizable.tsx +42 -0
- package/src/components/ui/scroll-area.tsx +53 -0
- package/src/components/ui/select.tsx +185 -0
- package/src/components/ui/separator.tsx +26 -0
- package/src/components/ui/sheet.tsx +128 -0
- package/src/components/ui/sidebar.tsx +669 -0
- package/src/components/ui/skeleton.tsx +13 -0
- package/src/components/ui/slider.tsx +54 -0
- package/src/components/ui/sonner.tsx +43 -0
- package/src/components/ui/spinner.tsx +16 -0
- package/src/components/ui/switch.tsx +33 -0
- package/src/components/ui/table.tsx +87 -0
- package/src/components/ui/tabs.tsx +80 -0
- package/src/components/ui/textarea.tsx +18 -0
- package/src/components/ui/toggle-group.tsx +86 -0
- package/src/components/ui/toggle.tsx +44 -0
- package/src/components/ui/tooltip.tsx +53 -0
- package/src/context/MetaContext.tsx +22 -0
- package/src/context/ModuleContext.tsx +62 -0
- package/src/context/PermissionsContext.tsx +39 -0
- package/src/context/ShellProviders.tsx +33 -0
- package/src/context/UserContext.tsx +16 -0
- package/src/data/QueryProvider.tsx +7 -0
- package/src/data/queryClient.ts +18 -0
- package/src/data/useModelMeta.ts +17 -0
- package/src/data/useMutation.ts +60 -0
- package/src/data/useRecord.ts +29 -0
- package/src/data/useSource.ts +112 -0
- package/src/hooks/use-mobile.ts +19 -0
- package/src/index.css +260 -0
- package/src/index.ts +16 -0
- package/src/lib/utils.ts +6 -0
- package/src/main.tsx +17 -0
- package/src/router/NotFound.tsx +8 -0
- package/src/router/RouterProvider.tsx +7 -0
- package/src/router/buildRouteTree.tsx +63 -0
- package/src/router/createShellRouter.ts +9 -0
- package/src/router/hooks.ts +43 -0
- package/src/shell/CommandPalette.tsx +76 -0
- package/src/shell/ConfirmDialog.tsx +34 -0
- package/src/shell/ConfirmProvider.tsx +56 -0
- package/src/shell/DrawerContext.tsx +44 -0
- package/src/shell/HeaderActions.tsx +31 -0
- package/src/shell/ModuleSelectorPage.tsx +149 -0
- package/src/shell/PageOutlet.tsx +21 -0
- package/src/shell/ShellContext.tsx +45 -0
- package/src/shell/ShellDevTools.tsx +153 -0
- package/src/shell/ShellLayout.tsx +231 -0
- package/src/shell/Toast.tsx +58 -0
- package/src/shell/ToastProvider.tsx +60 -0
- package/src/shell/app-sidebar/AppSidebar.tsx +44 -0
- package/src/shell/app-sidebar/ModuleSwitcher.tsx +87 -0
- package/src/shell/app-sidebar/NavMain.tsx +64 -0
- package/src/shell/app-sidebar/NavUser.tsx +97 -0
- package/src/shell/app-sidebar/SearchMenu.tsx +22 -0
- package/src/shell/app-sidebar/index.ts +8 -0
- package/src/shell/app-sidebar/types.ts +38 -0
- package/src/shell/types.ts +6 -0
- package/src/shell/useBreadcrumbs.ts +42 -0
- package/src/studio/bridge.ts +125 -0
- package/src/studio/index.ts +3 -0
- package/src/studio/overlay.ts +47 -0
- package/src/studio/types.ts +32 -0
- package/src/studio/walker.ts +48 -0
- package/src/vite-env.d.ts +1 -0
- package/src/widgets/__tests__/action-edge-cases.test.ts +281 -0
- package/src/widgets/__tests__/action.test.ts +236 -0
- package/src/widgets/__tests__/attachment-widget.test.tsx +85 -0
- package/src/widgets/__tests__/attachments-widget.test.tsx +109 -0
- package/src/widgets/__tests__/binding.test.ts +76 -0
- package/src/widgets/__tests__/button-widget.test.tsx +145 -0
- package/src/widgets/__tests__/checkbox-widget.test.tsx +158 -0
- package/src/widgets/__tests__/code-widget.test.tsx +64 -0
- package/src/widgets/__tests__/computed-widget.test.tsx +62 -0
- package/src/widgets/__tests__/condition-edge-cases.test.ts +120 -0
- package/src/widgets/__tests__/condition.test.ts +221 -0
- package/src/widgets/__tests__/context.test.ts +99 -0
- package/src/widgets/__tests__/data-widget.test.tsx +204 -0
- package/src/widgets/__tests__/datepicker-widget.test.tsx +66 -0
- package/src/widgets/__tests__/datetime-widget.test.tsx +67 -0
- package/src/widgets/__tests__/drawer-widget.test.tsx +149 -0
- package/src/widgets/__tests__/dynamic-link-widget.test.tsx +52 -0
- package/src/widgets/__tests__/edge-cases.test.ts +232 -0
- package/src/widgets/__tests__/evaluator.test.ts +107 -0
- package/src/widgets/__tests__/functions.test.ts +147 -0
- package/src/widgets/__tests__/grid-widget.test.tsx +137 -0
- package/src/widgets/__tests__/hooks.test.tsx +249 -0
- package/src/widgets/__tests__/icon-widget.test.tsx +129 -0
- package/src/widgets/__tests__/input-widget.test.tsx +264 -0
- package/src/widgets/__tests__/integration.test.ts +116 -0
- package/src/widgets/__tests__/json-widget.test.tsx +70 -0
- package/src/widgets/__tests__/link-widget.test.tsx +92 -0
- package/src/widgets/__tests__/many-to-many-widget.test.tsx +93 -0
- package/src/widgets/__tests__/modal-widget.test.tsx +148 -0
- package/src/widgets/__tests__/money-widget.test.tsx +97 -0
- package/src/widgets/__tests__/parser.test.ts +171 -0
- package/src/widgets/__tests__/reactive-variables.test.ts +383 -0
- package/src/widgets/__tests__/renderer.test.tsx +300 -0
- package/src/widgets/__tests__/repeat-widget.test.tsx +229 -0
- package/src/widgets/__tests__/select-widget.test.tsx +231 -0
- package/src/widgets/__tests__/sequence-widget.test.tsx +58 -0
- package/src/widgets/__tests__/shell-integration.test.tsx +1343 -0
- package/src/widgets/__tests__/split-widget.test.tsx +133 -0
- package/src/widgets/__tests__/state-edge-cases.test.ts +118 -0
- package/src/widgets/__tests__/state.test.ts +106 -0
- package/src/widgets/__tests__/table-data-binding.test.tsx +482 -0
- package/src/widgets/__tests__/table-filter-popover.test.tsx +486 -0
- package/src/widgets/__tests__/table-search.test.tsx +305 -0
- package/src/widgets/__tests__/table-widget.test.tsx +509 -0
- package/src/widgets/__tests__/textarea-widget.test.tsx +105 -0
- package/src/widgets/__tests__/tracker-validator-edge-cases.test.ts +242 -0
- package/src/widgets/__tests__/tracker.test.ts +133 -0
- package/src/widgets/__tests__/tree-widget.test.tsx +97 -0
- package/src/widgets/__tests__/use-model-source.test.ts +67 -0
- package/src/widgets/__tests__/validator.test.ts +208 -0
- package/src/widgets/action/dispatcher.ts +334 -0
- package/src/widgets/action/index.ts +2 -0
- package/src/widgets/binding/index.ts +2 -0
- package/src/widgets/binding/resolver.ts +61 -0
- package/src/widgets/components/AttachmentWidget.tsx +111 -0
- package/src/widgets/components/AttachmentsWidget.tsx +121 -0
- package/src/widgets/components/BadgeWidget.tsx +35 -0
- package/src/widgets/components/ButtonWidget.tsx +43 -0
- package/src/widgets/components/CardWidget.tsx +68 -0
- package/src/widgets/components/CheckboxWidget.tsx +39 -0
- package/src/widgets/components/CodeWidget.tsx +44 -0
- package/src/widgets/components/ColumnWidget.tsx +22 -0
- package/src/widgets/components/ComputedWidget.tsx +49 -0
- package/src/widgets/components/DataWidget.tsx +189 -0
- package/src/widgets/components/DatePickerWidget.tsx +73 -0
- package/src/widgets/components/DatetimeWidget.tsx +160 -0
- package/src/widgets/components/DividerWidget.tsx +37 -0
- package/src/widgets/components/DrawerWidget.tsx +52 -0
- package/src/widgets/components/DynamicLinkWidget.tsx +130 -0
- package/src/widgets/components/GridWidget.tsx +134 -0
- package/src/widgets/components/GroupWidget.tsx +111 -0
- package/src/widgets/components/IconWidget.tsx +29 -0
- package/src/widgets/components/ImageWidget.tsx +28 -0
- package/src/widgets/components/InputWidget.tsx +70 -0
- package/src/widgets/components/JsonWidget.tsx +78 -0
- package/src/widgets/components/LinkWidget.tsx +99 -0
- package/src/widgets/components/ManyToManyWidget.tsx +125 -0
- package/src/widgets/components/ModalWidget.tsx +52 -0
- package/src/widgets/components/MoneyWidget.tsx +80 -0
- package/src/widgets/components/RepeatWidget.tsx +66 -0
- package/src/widgets/components/ScrollAreaWidget.tsx +40 -0
- package/src/widgets/components/SectionWidget.tsx +78 -0
- package/src/widgets/components/SelectWidget.tsx +63 -0
- package/src/widgets/components/SequenceWidget.tsx +32 -0
- package/src/widgets/components/SpacerWidget.tsx +29 -0
- package/src/widgets/components/SplitWidget.tsx +60 -0
- package/src/widgets/components/StackWidget.tsx +44 -0
- package/src/widgets/components/TableWidget.tsx +366 -0
- package/src/widgets/components/TextWidget.tsx +44 -0
- package/src/widgets/components/TextareaWidget.tsx +49 -0
- package/src/widgets/components/TreeWidget.tsx +109 -0
- package/src/widgets/components/index.ts +30 -0
- package/src/widgets/components/register.ts +93 -0
- package/src/widgets/components/table/CellRenderers.tsx +83 -0
- package/src/widgets/components/table/TablePagination.tsx +45 -0
- package/src/widgets/components/table/TableToolbar.tsx +285 -0
- package/src/widgets/components/table/filter-operators.ts +134 -0
- package/src/widgets/components/table/index.ts +11 -0
- package/src/widgets/condition/evaluator.ts +57 -0
- package/src/widgets/condition/index.ts +1 -0
- package/src/widgets/context/builder.ts +99 -0
- package/src/widgets/context/index.ts +8 -0
- package/src/widgets/context/types.ts +37 -0
- package/src/widgets/data/index.ts +5 -0
- package/src/widgets/data/useModelQuery.ts +116 -0
- package/src/widgets/data/useModelRecord.ts +37 -0
- package/src/widgets/expression/evaluator.ts +100 -0
- package/src/widgets/expression/functions.ts +131 -0
- package/src/widgets/expression/index.ts +13 -0
- package/src/widgets/expression/parser.ts +229 -0
- package/src/widgets/expression/types.ts +45 -0
- package/src/widgets/form/FormContext.ts +29 -0
- package/src/widgets/form/FormProvider.tsx +84 -0
- package/src/widgets/form/FormWidget.tsx +42 -0
- package/src/widgets/form/index.ts +4 -0
- package/src/widgets/form/useFormState.ts +127 -0
- package/src/widgets/form/useFormSubmit.ts +90 -0
- package/src/widgets/form/useFormValidation.ts +62 -0
- package/src/widgets/hooks/index.ts +8 -0
- package/src/widgets/hooks/useAction.ts +83 -0
- package/src/widgets/hooks/useBind.ts +34 -0
- package/src/widgets/hooks/useCondition.ts +21 -0
- package/src/widgets/hooks/useDataQuery.ts +48 -0
- package/src/widgets/hooks/useExpression.ts +14 -0
- package/src/widgets/hooks/usePageState.ts +21 -0
- package/src/widgets/hooks/useSurfaceContext.ts +11 -0
- package/src/widgets/hooks/useWidgetContext.ts +14 -0
- package/src/widgets/index.ts +80 -0
- package/src/widgets/lib/layout-props.ts +135 -0
- package/src/widgets/reactivity/index.ts +11 -0
- package/src/widgets/reactivity/tracker.ts +139 -0
- package/src/widgets/reactivity/variables.ts +213 -0
- package/src/widgets/registry.ts +41 -0
- package/src/widgets/renderer/SlotRenderer.tsx +47 -0
- package/src/widgets/renderer/WidgetRenderer.tsx +191 -0
- package/src/widgets/renderer/index.ts +4 -0
- package/src/widgets/shell/WidgetSlotRenderer.tsx +73 -0
- package/src/widgets/shell/index.ts +4 -0
- package/src/widgets/shell/useActionHandlers.ts +170 -0
- package/src/widgets/state/index.ts +2 -0
- package/src/widgets/state/store.ts +96 -0
- package/src/widgets/types.ts +28 -0
- package/src/widgets/validation/index.ts +2 -0
- package/src/widgets/validation/validator.ts +140 -0
- package/tsconfig.json +27 -0
- package/tsconfig.tsbuildinfo +1 -0
- package/vite.config.ts +21 -0
- package/vitest.config.ts +16 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { getToken, clearToken } from './token.js';
|
|
2
|
+
|
|
3
|
+
const BASE_URL = '';
|
|
4
|
+
|
|
5
|
+
export async function apiClient(path: string, options: RequestInit = {}): Promise<Response> {
|
|
6
|
+
const token = getToken();
|
|
7
|
+
const headers: Record<string, string> = {
|
|
8
|
+
'Content-Type': 'application/json',
|
|
9
|
+
...(options.headers as Record<string, string>),
|
|
10
|
+
};
|
|
11
|
+
if (token) {
|
|
12
|
+
headers['Authorization'] = `Bearer ${token}`;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const response = await fetch(`${BASE_URL}${path}`, {
|
|
16
|
+
...options,
|
|
17
|
+
headers,
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
if (response.status === 401) {
|
|
21
|
+
clearToken();
|
|
22
|
+
window.dispatchEvent(new CustomEvent('rangka:session-expired'));
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
return response;
|
|
26
|
+
}
|
package/src/api/paths.ts
ADDED
package/src/api/token.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
const TOKEN_KEY = 'rangka:token';
|
|
2
|
+
|
|
3
|
+
export function getToken(): string | null {
|
|
4
|
+
return localStorage.getItem(TOKEN_KEY);
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export function setToken(token: string): void {
|
|
8
|
+
localStorage.setItem(TOKEN_KEY, token);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export function clearToken(): void {
|
|
12
|
+
localStorage.removeItem(TOKEN_KEY);
|
|
13
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { useState } from 'react';
|
|
2
|
+
import { cn } from '@/lib/utils';
|
|
3
|
+
import { Button } from '@/components/ui/button';
|
|
4
|
+
import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card';
|
|
5
|
+
import { Field, FieldError, FieldGroup, FieldLabel } from '@/components/ui/field';
|
|
6
|
+
import { Input } from '@/components/ui/input';
|
|
7
|
+
|
|
8
|
+
export interface LoginFormProps {
|
|
9
|
+
onLogin: (credentials: { email: string; password: string }) => void | Promise<void>;
|
|
10
|
+
error?: string;
|
|
11
|
+
loading?: boolean;
|
|
12
|
+
className?: string;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export function LoginForm({ onLogin, error, loading, className }: LoginFormProps) {
|
|
16
|
+
const [email, setEmail] = useState('');
|
|
17
|
+
const [password, setPassword] = useState('');
|
|
18
|
+
|
|
19
|
+
const handleSubmit = (e: React.FormEvent) => {
|
|
20
|
+
e.preventDefault();
|
|
21
|
+
onLogin({ email, password });
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
return (
|
|
25
|
+
<div className={cn('flex min-h-screen items-center justify-center bg-background', className)}>
|
|
26
|
+
<Card className="w-full max-w-sm">
|
|
27
|
+
<CardHeader>
|
|
28
|
+
<CardTitle>Sign in</CardTitle>
|
|
29
|
+
</CardHeader>
|
|
30
|
+
<CardContent>
|
|
31
|
+
<form onSubmit={handleSubmit}>
|
|
32
|
+
<FieldGroup>
|
|
33
|
+
<Field>
|
|
34
|
+
<FieldLabel htmlFor="email">Email</FieldLabel>
|
|
35
|
+
<Input
|
|
36
|
+
id="email"
|
|
37
|
+
type="email"
|
|
38
|
+
value={email}
|
|
39
|
+
onChange={(e) => setEmail(e.target.value)}
|
|
40
|
+
placeholder="you@example.com"
|
|
41
|
+
required
|
|
42
|
+
autoFocus
|
|
43
|
+
/>
|
|
44
|
+
</Field>
|
|
45
|
+
<Field>
|
|
46
|
+
<FieldLabel htmlFor="password">Password</FieldLabel>
|
|
47
|
+
<Input
|
|
48
|
+
id="password"
|
|
49
|
+
type="password"
|
|
50
|
+
value={password}
|
|
51
|
+
onChange={(e) => setPassword(e.target.value)}
|
|
52
|
+
required
|
|
53
|
+
/>
|
|
54
|
+
</Field>
|
|
55
|
+
{error && <FieldError>{error}</FieldError>}
|
|
56
|
+
<Field>
|
|
57
|
+
<Button type="submit" className="w-full" disabled={loading}>
|
|
58
|
+
{loading ? 'Signing in...' : 'Sign in'}
|
|
59
|
+
</Button>
|
|
60
|
+
</Field>
|
|
61
|
+
</FieldGroup>
|
|
62
|
+
</form>
|
|
63
|
+
</CardContent>
|
|
64
|
+
</Card>
|
|
65
|
+
</div>
|
|
66
|
+
);
|
|
67
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Button } from '@/components/ui/button';
|
|
2
|
+
import { Card, CardHeader, CardTitle, CardContent } from '@/components/ui/card';
|
|
3
|
+
|
|
4
|
+
export interface SessionExpiredProps {
|
|
5
|
+
onReLogin: () => void;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export function SessionExpired({ onReLogin }: SessionExpiredProps) {
|
|
9
|
+
return (
|
|
10
|
+
<div className="flex min-h-screen items-center justify-center bg-background">
|
|
11
|
+
<Card className="w-full max-w-sm text-center">
|
|
12
|
+
<CardHeader>
|
|
13
|
+
<CardTitle>Session Expired</CardTitle>
|
|
14
|
+
</CardHeader>
|
|
15
|
+
<CardContent className="flex flex-col items-center gap-4">
|
|
16
|
+
<p className="text-sm text-muted-foreground">
|
|
17
|
+
Your session has expired. Please sign in again to continue.
|
|
18
|
+
</p>
|
|
19
|
+
<Button onClick={onReLogin}>Sign in</Button>
|
|
20
|
+
</CardContent>
|
|
21
|
+
</Card>
|
|
22
|
+
</div>
|
|
23
|
+
);
|
|
24
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { useState } from 'react';
|
|
2
|
+
import { Button } from '@/components/ui/button';
|
|
3
|
+
import { Card, CardHeader, CardTitle, CardContent } from '@/components/ui/card';
|
|
4
|
+
import { Field, FieldError, FieldGroup, FieldLabel } from '@/components/ui/field';
|
|
5
|
+
import { Input } from '@/components/ui/input';
|
|
6
|
+
|
|
7
|
+
export interface SetupFormProps {
|
|
8
|
+
onSetup: (data: { name: string; email: string; password: string }) => void | Promise<void>;
|
|
9
|
+
error?: string;
|
|
10
|
+
loading?: boolean;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export function SetupForm({ onSetup, error, loading }: SetupFormProps) {
|
|
14
|
+
const [name, setName] = useState('');
|
|
15
|
+
const [email, setEmail] = useState('');
|
|
16
|
+
const [password, setPassword] = useState('');
|
|
17
|
+
|
|
18
|
+
const handleSubmit = (e: React.FormEvent) => {
|
|
19
|
+
e.preventDefault();
|
|
20
|
+
onSetup({ name, email, password });
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
return (
|
|
24
|
+
<div className="flex min-h-screen items-center justify-center bg-background">
|
|
25
|
+
<Card className="w-full max-w-sm">
|
|
26
|
+
<CardHeader>
|
|
27
|
+
<CardTitle>Setup</CardTitle>
|
|
28
|
+
</CardHeader>
|
|
29
|
+
<CardContent>
|
|
30
|
+
<form onSubmit={handleSubmit}>
|
|
31
|
+
<FieldGroup>
|
|
32
|
+
<Field>
|
|
33
|
+
<FieldLabel htmlFor="name">Name</FieldLabel>
|
|
34
|
+
<Input
|
|
35
|
+
id="name"
|
|
36
|
+
value={name}
|
|
37
|
+
onChange={(e) => setName(e.target.value)}
|
|
38
|
+
placeholder="Your name"
|
|
39
|
+
required
|
|
40
|
+
autoFocus
|
|
41
|
+
/>
|
|
42
|
+
</Field>
|
|
43
|
+
<Field>
|
|
44
|
+
<FieldLabel htmlFor="email">Email</FieldLabel>
|
|
45
|
+
<Input
|
|
46
|
+
id="email"
|
|
47
|
+
type="email"
|
|
48
|
+
value={email}
|
|
49
|
+
onChange={(e) => setEmail(e.target.value)}
|
|
50
|
+
placeholder="you@example.com"
|
|
51
|
+
required
|
|
52
|
+
/>
|
|
53
|
+
</Field>
|
|
54
|
+
<Field>
|
|
55
|
+
<FieldLabel htmlFor="password">Password</FieldLabel>
|
|
56
|
+
<Input
|
|
57
|
+
id="password"
|
|
58
|
+
type="password"
|
|
59
|
+
value={password}
|
|
60
|
+
onChange={(e) => setPassword(e.target.value)}
|
|
61
|
+
required
|
|
62
|
+
/>
|
|
63
|
+
</Field>
|
|
64
|
+
{error && <FieldError>{error}</FieldError>}
|
|
65
|
+
<Field>
|
|
66
|
+
<Button type="submit" className="w-full" disabled={loading}>
|
|
67
|
+
{loading ? 'Setting up...' : 'Complete setup'}
|
|
68
|
+
</Button>
|
|
69
|
+
</Field>
|
|
70
|
+
</FieldGroup>
|
|
71
|
+
</form>
|
|
72
|
+
</CardContent>
|
|
73
|
+
</Card>
|
|
74
|
+
</div>
|
|
75
|
+
);
|
|
76
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import { useBootContext } from './BootProvider.js';
|
|
3
|
+
import { LoginForm } from '../auth/LoginForm.js';
|
|
4
|
+
import { SessionExpired } from '../auth/SessionExpired.js';
|
|
5
|
+
import { SetupForm } from '../auth/SetupForm.js';
|
|
6
|
+
|
|
7
|
+
export function BootGate({ children }: { children: ReactNode }) {
|
|
8
|
+
const { state, handleLogin, handleSetup, handleSessionExpired, retry } = useBootContext();
|
|
9
|
+
|
|
10
|
+
switch (state.status) {
|
|
11
|
+
case 'checking':
|
|
12
|
+
case 'loading':
|
|
13
|
+
return (
|
|
14
|
+
<div role="status" aria-label="Loading">
|
|
15
|
+
Loading…
|
|
16
|
+
</div>
|
|
17
|
+
);
|
|
18
|
+
case 'setup':
|
|
19
|
+
return <SetupForm onSetup={handleSetup} />;
|
|
20
|
+
case 'login':
|
|
21
|
+
if (state.sessionExpired) {
|
|
22
|
+
return <SessionExpired onReLogin={handleSessionExpired} />;
|
|
23
|
+
}
|
|
24
|
+
return <LoginForm onLogin={handleLogin} />;
|
|
25
|
+
case 'error':
|
|
26
|
+
return (
|
|
27
|
+
<div role="alert">
|
|
28
|
+
<p>Something went wrong. Unable to load the application.</p>
|
|
29
|
+
<button onClick={retry}>Retry</button>
|
|
30
|
+
</div>
|
|
31
|
+
);
|
|
32
|
+
case 'ready':
|
|
33
|
+
return <>{children}</>;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { createContext, useContext, type ReactNode } from 'react';
|
|
2
|
+
import type { LoginCredentials, SetupCredentials } from '../api/auth.js';
|
|
3
|
+
import type { BootState } from './types.js';
|
|
4
|
+
import { useBoot } from './useBoot.js';
|
|
5
|
+
|
|
6
|
+
interface BootContextValue {
|
|
7
|
+
state: BootState;
|
|
8
|
+
handleLogin: (credentials: LoginCredentials) => Promise<void>;
|
|
9
|
+
handleSetup: (credentials: SetupCredentials) => Promise<void>;
|
|
10
|
+
handleSessionExpired: () => void;
|
|
11
|
+
handleLogout: () => void;
|
|
12
|
+
retry: () => void;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const BootContext = createContext<BootContextValue | null>(null);
|
|
16
|
+
|
|
17
|
+
export function BootProvider({ children }: { children: ReactNode }) {
|
|
18
|
+
const boot = useBoot();
|
|
19
|
+
return <BootContext.Provider value={boot}>{children}</BootContext.Provider>;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export function useBootContext(): BootContextValue {
|
|
23
|
+
const ctx = useContext(BootContext);
|
|
24
|
+
if (!ctx) {
|
|
25
|
+
throw new Error('useBootContext must be used within a BootProvider');
|
|
26
|
+
}
|
|
27
|
+
return ctx;
|
|
28
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { BootResponse } from '@rangka/shared';
|
|
2
|
+
|
|
3
|
+
export type BootState =
|
|
4
|
+
| { status: 'checking' }
|
|
5
|
+
| { status: 'setup' }
|
|
6
|
+
| { status: 'login'; sessionExpired?: boolean }
|
|
7
|
+
| { status: 'loading' }
|
|
8
|
+
| { status: 'ready'; data: BootResponse }
|
|
9
|
+
| { status: 'error'; error: unknown };
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { useCallback, useEffect, useReducer } from 'react';
|
|
2
|
+
import type { BootResponse } from '@rangka/shared';
|
|
3
|
+
import { fetchBoot } from '../api/boot.js';
|
|
4
|
+
import { login, setup, type LoginCredentials, type SetupCredentials } from '../api/auth.js';
|
|
5
|
+
import { getToken, clearToken } from '../api/token.js';
|
|
6
|
+
import type { BootState } from './types.js';
|
|
7
|
+
|
|
8
|
+
type BootAction =
|
|
9
|
+
| { type: 'SETUP_REQUIRED' }
|
|
10
|
+
| { type: 'AUTH_REQUIRED'; sessionExpired?: boolean }
|
|
11
|
+
| { type: 'LOADING' }
|
|
12
|
+
| { type: 'READY'; data: BootResponse }
|
|
13
|
+
| { type: 'ERROR'; error: unknown }
|
|
14
|
+
| { type: 'RESET' };
|
|
15
|
+
|
|
16
|
+
function bootReducer(_state: BootState, action: BootAction): BootState {
|
|
17
|
+
switch (action.type) {
|
|
18
|
+
case 'SETUP_REQUIRED':
|
|
19
|
+
return { status: 'setup' };
|
|
20
|
+
case 'AUTH_REQUIRED':
|
|
21
|
+
return { status: 'login', sessionExpired: action.sessionExpired };
|
|
22
|
+
case 'LOADING':
|
|
23
|
+
return { status: 'loading' };
|
|
24
|
+
case 'READY':
|
|
25
|
+
return { status: 'ready', data: action.data };
|
|
26
|
+
case 'ERROR':
|
|
27
|
+
return { status: 'error', error: action.error };
|
|
28
|
+
case 'RESET':
|
|
29
|
+
return { status: 'login' };
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export interface UseBootResult {
|
|
34
|
+
state: BootState;
|
|
35
|
+
handleLogin: (credentials: LoginCredentials) => Promise<void>;
|
|
36
|
+
handleSetup: (credentials: SetupCredentials) => Promise<void>;
|
|
37
|
+
handleSessionExpired: () => void;
|
|
38
|
+
handleLogout: () => void;
|
|
39
|
+
retry: () => void;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export function useBoot(): UseBootResult {
|
|
43
|
+
const [state, dispatch] = useReducer(bootReducer, { status: 'checking' });
|
|
44
|
+
|
|
45
|
+
const performBoot = useCallback(async () => {
|
|
46
|
+
dispatch({ type: 'LOADING' });
|
|
47
|
+
try {
|
|
48
|
+
const data = await fetchBoot();
|
|
49
|
+
dispatch({ type: 'READY', data });
|
|
50
|
+
} catch (err: unknown) {
|
|
51
|
+
const status = (err as { status?: number }).status;
|
|
52
|
+
if (status === 503) {
|
|
53
|
+
dispatch({ type: 'SETUP_REQUIRED' });
|
|
54
|
+
} else if (status === 401 || !getToken()) {
|
|
55
|
+
dispatch({ type: 'AUTH_REQUIRED' });
|
|
56
|
+
} else {
|
|
57
|
+
dispatch({ type: 'ERROR', error: err });
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}, []);
|
|
61
|
+
|
|
62
|
+
useEffect(() => {
|
|
63
|
+
performBoot();
|
|
64
|
+
}, [performBoot]);
|
|
65
|
+
|
|
66
|
+
useEffect(() => {
|
|
67
|
+
const onSessionExpired = () => {
|
|
68
|
+
dispatch({ type: 'AUTH_REQUIRED', sessionExpired: true });
|
|
69
|
+
};
|
|
70
|
+
window.addEventListener('rangka:session-expired', onSessionExpired);
|
|
71
|
+
return () => window.removeEventListener('rangka:session-expired', onSessionExpired);
|
|
72
|
+
}, []);
|
|
73
|
+
|
|
74
|
+
const handleLogin = useCallback(
|
|
75
|
+
async (credentials: LoginCredentials) => {
|
|
76
|
+
const response = await login(credentials);
|
|
77
|
+
if (!response.ok) {
|
|
78
|
+
throw response;
|
|
79
|
+
}
|
|
80
|
+
await performBoot();
|
|
81
|
+
},
|
|
82
|
+
[performBoot],
|
|
83
|
+
);
|
|
84
|
+
|
|
85
|
+
const handleSetup = useCallback(
|
|
86
|
+
async (credentials: SetupCredentials) => {
|
|
87
|
+
const response = await setup(credentials);
|
|
88
|
+
if (!response.ok) {
|
|
89
|
+
const body = await response.json().catch(() => ({}));
|
|
90
|
+
throw new Error(body.message ?? 'Setup failed');
|
|
91
|
+
}
|
|
92
|
+
await performBoot();
|
|
93
|
+
},
|
|
94
|
+
[performBoot],
|
|
95
|
+
);
|
|
96
|
+
|
|
97
|
+
const handleSessionExpired = useCallback(() => {
|
|
98
|
+
dispatch({ type: 'AUTH_REQUIRED', sessionExpired: true });
|
|
99
|
+
}, []);
|
|
100
|
+
|
|
101
|
+
const handleLogout = useCallback(() => {
|
|
102
|
+
clearToken();
|
|
103
|
+
dispatch({ type: 'RESET' });
|
|
104
|
+
}, []);
|
|
105
|
+
|
|
106
|
+
const retry = useCallback(() => {
|
|
107
|
+
performBoot();
|
|
108
|
+
}, [performBoot]);
|
|
109
|
+
|
|
110
|
+
return { state, handleLogin, handleSetup, handleSessionExpired, handleLogout, retry };
|
|
111
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { icons, type LucideProps } from 'lucide-react';
|
|
2
|
+
|
|
3
|
+
export interface IconProps extends Omit<LucideProps, 'ref'> {
|
|
4
|
+
name: string;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export function Icon({ name, size = 14, ...props }: IconProps) {
|
|
8
|
+
const pascalName = name
|
|
9
|
+
.split('-')
|
|
10
|
+
.map((s) => s.charAt(0).toUpperCase() + s.slice(1))
|
|
11
|
+
.join('');
|
|
12
|
+
|
|
13
|
+
const LucideIcon = icons[pascalName as keyof typeof icons];
|
|
14
|
+
if (!LucideIcon) return null;
|
|
15
|
+
|
|
16
|
+
return <LucideIcon size={size} {...props} />;
|
|
17
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Accordion as AccordionPrimitive } from 'radix-ui';
|
|
3
|
+
|
|
4
|
+
import { cn } from '@/lib/utils';
|
|
5
|
+
import { ChevronDownIcon, ChevronUpIcon } from 'lucide-react';
|
|
6
|
+
|
|
7
|
+
function Accordion({ className, ...props }: React.ComponentProps<typeof AccordionPrimitive.Root>) {
|
|
8
|
+
return (
|
|
9
|
+
<AccordionPrimitive.Root
|
|
10
|
+
data-slot="accordion"
|
|
11
|
+
className={cn('flex w-full flex-col', className)}
|
|
12
|
+
{...props}
|
|
13
|
+
/>
|
|
14
|
+
);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
function AccordionItem({
|
|
18
|
+
className,
|
|
19
|
+
...props
|
|
20
|
+
}: React.ComponentProps<typeof AccordionPrimitive.Item>) {
|
|
21
|
+
return (
|
|
22
|
+
<AccordionPrimitive.Item
|
|
23
|
+
data-slot="accordion-item"
|
|
24
|
+
className={cn('not-last:border-b', className)}
|
|
25
|
+
{...props}
|
|
26
|
+
/>
|
|
27
|
+
);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
function AccordionTrigger({
|
|
31
|
+
className,
|
|
32
|
+
children,
|
|
33
|
+
...props
|
|
34
|
+
}: React.ComponentProps<typeof AccordionPrimitive.Trigger>) {
|
|
35
|
+
return (
|
|
36
|
+
<AccordionPrimitive.Header className="flex">
|
|
37
|
+
<AccordionPrimitive.Trigger
|
|
38
|
+
data-slot="accordion-trigger"
|
|
39
|
+
className={cn(
|
|
40
|
+
'group/accordion-trigger relative flex flex-1 items-start justify-between rounded-none border border-transparent py-2.5 text-left text-xs font-medium transition-all outline-none hover:underline focus-visible:border-ring focus-visible:ring-1 focus-visible:ring-ring/50 focus-visible:after:border-ring disabled:pointer-events-none disabled:opacity-50 **:data-[slot=accordion-trigger-icon]:ml-auto **:data-[slot=accordion-trigger-icon]:size-4 **:data-[slot=accordion-trigger-icon]:text-muted-foreground',
|
|
41
|
+
className,
|
|
42
|
+
)}
|
|
43
|
+
{...props}
|
|
44
|
+
>
|
|
45
|
+
{children}
|
|
46
|
+
<ChevronDownIcon
|
|
47
|
+
data-slot="accordion-trigger-icon"
|
|
48
|
+
className="pointer-events-none shrink-0 group-aria-expanded/accordion-trigger:hidden"
|
|
49
|
+
/>
|
|
50
|
+
<ChevronUpIcon
|
|
51
|
+
data-slot="accordion-trigger-icon"
|
|
52
|
+
className="pointer-events-none hidden shrink-0 group-aria-expanded/accordion-trigger:inline"
|
|
53
|
+
/>
|
|
54
|
+
</AccordionPrimitive.Trigger>
|
|
55
|
+
</AccordionPrimitive.Header>
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
function AccordionContent({
|
|
60
|
+
className,
|
|
61
|
+
children,
|
|
62
|
+
...props
|
|
63
|
+
}: React.ComponentProps<typeof AccordionPrimitive.Content>) {
|
|
64
|
+
return (
|
|
65
|
+
<AccordionPrimitive.Content
|
|
66
|
+
data-slot="accordion-content"
|
|
67
|
+
className="overflow-hidden text-xs data-open:animate-accordion-down data-closed:animate-accordion-up"
|
|
68
|
+
{...props}
|
|
69
|
+
>
|
|
70
|
+
<div
|
|
71
|
+
className={cn(
|
|
72
|
+
'h-(--radix-accordion-content-height) pt-0 pb-2.5 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4',
|
|
73
|
+
className,
|
|
74
|
+
)}
|
|
75
|
+
>
|
|
76
|
+
{children}
|
|
77
|
+
</div>
|
|
78
|
+
</AccordionPrimitive.Content>
|
|
79
|
+
);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export { Accordion, AccordionItem, AccordionTrigger, AccordionContent };
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { AlertDialog as AlertDialogPrimitive } from 'radix-ui';
|
|
3
|
+
|
|
4
|
+
import { cn } from '@/lib/utils';
|
|
5
|
+
import { Button } from '@/components/ui/button';
|
|
6
|
+
|
|
7
|
+
function AlertDialog({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Root>) {
|
|
8
|
+
return <AlertDialogPrimitive.Root data-slot="alert-dialog" {...props} />;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
function AlertDialogTrigger({
|
|
12
|
+
...props
|
|
13
|
+
}: React.ComponentProps<typeof AlertDialogPrimitive.Trigger>) {
|
|
14
|
+
return <AlertDialogPrimitive.Trigger data-slot="alert-dialog-trigger" {...props} />;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
function AlertDialogPortal({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Portal>) {
|
|
18
|
+
return <AlertDialogPrimitive.Portal data-slot="alert-dialog-portal" {...props} />;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
function AlertDialogOverlay({
|
|
22
|
+
className,
|
|
23
|
+
...props
|
|
24
|
+
}: React.ComponentProps<typeof AlertDialogPrimitive.Overlay>) {
|
|
25
|
+
return (
|
|
26
|
+
<AlertDialogPrimitive.Overlay
|
|
27
|
+
data-slot="alert-dialog-overlay"
|
|
28
|
+
className={cn(
|
|
29
|
+
'fixed inset-0 z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0',
|
|
30
|
+
className,
|
|
31
|
+
)}
|
|
32
|
+
{...props}
|
|
33
|
+
/>
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
function AlertDialogContent({
|
|
38
|
+
className,
|
|
39
|
+
size = 'default',
|
|
40
|
+
...props
|
|
41
|
+
}: React.ComponentProps<typeof AlertDialogPrimitive.Content> & {
|
|
42
|
+
size?: 'default' | 'sm';
|
|
43
|
+
}) {
|
|
44
|
+
return (
|
|
45
|
+
<AlertDialogPortal>
|
|
46
|
+
<AlertDialogOverlay />
|
|
47
|
+
<AlertDialogPrimitive.Content
|
|
48
|
+
data-slot="alert-dialog-content"
|
|
49
|
+
data-size={size}
|
|
50
|
+
className={cn(
|
|
51
|
+
'group/alert-dialog-content fixed top-1/2 left-1/2 z-50 grid w-full -translate-x-1/2 -translate-y-1/2 gap-4 rounded-none bg-popover p-4 text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none data-[size=default]:max-w-xs data-[size=sm]:max-w-xs data-[size=default]:sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95',
|
|
52
|
+
className,
|
|
53
|
+
)}
|
|
54
|
+
{...props}
|
|
55
|
+
/>
|
|
56
|
+
</AlertDialogPortal>
|
|
57
|
+
);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
function AlertDialogHeader({ className, ...props }: React.ComponentProps<'div'>) {
|
|
61
|
+
return (
|
|
62
|
+
<div
|
|
63
|
+
data-slot="alert-dialog-header"
|
|
64
|
+
className={cn(
|
|
65
|
+
'grid grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-4 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]',
|
|
66
|
+
className,
|
|
67
|
+
)}
|
|
68
|
+
{...props}
|
|
69
|
+
/>
|
|
70
|
+
);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
function AlertDialogFooter({ className, ...props }: React.ComponentProps<'div'>) {
|
|
74
|
+
return (
|
|
75
|
+
<div
|
|
76
|
+
data-slot="alert-dialog-footer"
|
|
77
|
+
className={cn(
|
|
78
|
+
'flex flex-col-reverse gap-2 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end',
|
|
79
|
+
className,
|
|
80
|
+
)}
|
|
81
|
+
{...props}
|
|
82
|
+
/>
|
|
83
|
+
);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
function AlertDialogMedia({ className, ...props }: React.ComponentProps<'div'>) {
|
|
87
|
+
return (
|
|
88
|
+
<div
|
|
89
|
+
data-slot="alert-dialog-media"
|
|
90
|
+
className={cn(
|
|
91
|
+
"mb-2 inline-flex size-10 items-center justify-center rounded-none bg-muted sm:group-data-[size=default]/alert-dialog-content:row-span-2 *:[svg:not([class*='size-'])]:size-6",
|
|
92
|
+
className,
|
|
93
|
+
)}
|
|
94
|
+
{...props}
|
|
95
|
+
/>
|
|
96
|
+
);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
function AlertDialogTitle({
|
|
100
|
+
className,
|
|
101
|
+
...props
|
|
102
|
+
}: React.ComponentProps<typeof AlertDialogPrimitive.Title>) {
|
|
103
|
+
return (
|
|
104
|
+
<AlertDialogPrimitive.Title
|
|
105
|
+
data-slot="alert-dialog-title"
|
|
106
|
+
className={cn(
|
|
107
|
+
'font-heading text-sm font-medium sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2',
|
|
108
|
+
className,
|
|
109
|
+
)}
|
|
110
|
+
{...props}
|
|
111
|
+
/>
|
|
112
|
+
);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
function AlertDialogDescription({
|
|
116
|
+
className,
|
|
117
|
+
...props
|
|
118
|
+
}: React.ComponentProps<typeof AlertDialogPrimitive.Description>) {
|
|
119
|
+
return (
|
|
120
|
+
<AlertDialogPrimitive.Description
|
|
121
|
+
data-slot="alert-dialog-description"
|
|
122
|
+
className={cn(
|
|
123
|
+
'text-xs/relaxed text-balance text-muted-foreground md:text-pretty *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground',
|
|
124
|
+
className,
|
|
125
|
+
)}
|
|
126
|
+
{...props}
|
|
127
|
+
/>
|
|
128
|
+
);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
function AlertDialogAction({
|
|
132
|
+
className,
|
|
133
|
+
variant = 'default',
|
|
134
|
+
size = 'default',
|
|
135
|
+
...props
|
|
136
|
+
}: React.ComponentProps<typeof AlertDialogPrimitive.Action> &
|
|
137
|
+
Pick<React.ComponentProps<typeof Button>, 'variant' | 'size'>) {
|
|
138
|
+
return (
|
|
139
|
+
<Button variant={variant} size={size} asChild>
|
|
140
|
+
<AlertDialogPrimitive.Action
|
|
141
|
+
data-slot="alert-dialog-action"
|
|
142
|
+
className={cn(className)}
|
|
143
|
+
{...props}
|
|
144
|
+
/>
|
|
145
|
+
</Button>
|
|
146
|
+
);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
function AlertDialogCancel({
|
|
150
|
+
className,
|
|
151
|
+
variant = 'outline',
|
|
152
|
+
size = 'default',
|
|
153
|
+
...props
|
|
154
|
+
}: React.ComponentProps<typeof AlertDialogPrimitive.Cancel> &
|
|
155
|
+
Pick<React.ComponentProps<typeof Button>, 'variant' | 'size'>) {
|
|
156
|
+
return (
|
|
157
|
+
<Button variant={variant} size={size} asChild>
|
|
158
|
+
<AlertDialogPrimitive.Cancel
|
|
159
|
+
data-slot="alert-dialog-cancel"
|
|
160
|
+
className={cn(className)}
|
|
161
|
+
{...props}
|
|
162
|
+
/>
|
|
163
|
+
</Button>
|
|
164
|
+
);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
export {
|
|
168
|
+
AlertDialog,
|
|
169
|
+
AlertDialogAction,
|
|
170
|
+
AlertDialogCancel,
|
|
171
|
+
AlertDialogContent,
|
|
172
|
+
AlertDialogDescription,
|
|
173
|
+
AlertDialogFooter,
|
|
174
|
+
AlertDialogHeader,
|
|
175
|
+
AlertDialogMedia,
|
|
176
|
+
AlertDialogOverlay,
|
|
177
|
+
AlertDialogPortal,
|
|
178
|
+
AlertDialogTitle,
|
|
179
|
+
AlertDialogTrigger,
|
|
180
|
+
};
|