gladvn 0.2.22 → 0.2.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +70 -58
- package/bin/cli.js +352 -150
- package/llms.txt +7 -5
- package/package.json +14 -26
- package/src/blocks/auth-card.tsx +104 -0
- package/src/blocks/auth-dialog.tsx +116 -0
- package/src/blocks/auth-recovery.tsx +61 -0
- package/src/blocks/auth-split.tsx +132 -0
- package/src/blocks/dashboard.tsx +182 -0
- package/src/blocks/settings.tsx +104 -0
- package/src/components/macro/accordion-preset.tsx +2 -1
- package/src/components/macro/alert-dialog-preset.tsx +3 -2
- package/src/components/macro/alert-preset.tsx +2 -1
- package/src/components/macro/avatar-preset.tsx +2 -1
- package/src/components/macro/breadcrumb-preset.tsx +2 -1
- package/src/components/macro/card-preset.tsx +2 -1
- package/src/components/macro/carousel-preset.tsx +2 -1
- package/src/components/macro/checkbox-preset.tsx +2 -1
- package/src/components/macro/combobox-preset.tsx +5 -3
- package/src/components/macro/command-preset.tsx +7 -4
- package/src/components/macro/date-picker.tsx +3 -2
- package/src/components/macro/dialog-preset.tsx +3 -2
- package/src/components/macro/empty-preset.tsx +2 -1
- package/src/components/macro/field-preset.tsx +2 -1
- package/src/components/macro/input-otp-preset.tsx +2 -1
- package/src/components/macro/input-preset.tsx +2 -1
- package/src/components/macro/pagination-preset.tsx +2 -1
- package/src/components/macro/progress-preset.tsx +2 -1
- package/src/components/macro/select-preset.tsx +3 -2
- package/src/components/macro/slider-preset.tsx +2 -1
- package/src/components/macro/switch-preset.tsx +2 -1
- package/src/components/macro/tabs-preset.tsx +2 -1
- package/src/components/micro/accordion.test.tsx +96 -0
- package/src/components/micro/alert-dialog.tsx +1 -1
- package/src/components/micro/alert.test.tsx +77 -0
- package/src/components/micro/avatar.tsx +1 -1
- package/src/components/micro/badge.test.tsx +57 -0
- package/src/components/micro/breadcrumb.tsx +1 -1
- package/src/components/micro/button.test.tsx +101 -4
- package/src/components/micro/card.test.tsx +54 -0
- package/src/components/micro/card.tsx +1 -1
- package/src/components/micro/carousel.tsx +1 -1
- package/src/components/micro/chart.tsx +1 -1
- package/src/components/micro/checkbox.test.tsx +92 -0
- package/src/components/micro/combobox.tsx +1 -1
- package/src/components/micro/command.tsx +1 -1
- package/src/components/micro/context-menu.tsx +1 -1
- package/src/components/micro/dialog.test.tsx +127 -0
- package/src/components/micro/dialog.tsx +1 -1
- package/src/components/micro/direction.tsx +1 -1
- package/src/components/micro/drawer.tsx +2 -2
- package/src/components/micro/dropdown-menu.test.tsx +132 -0
- package/src/components/micro/dropdown-menu.tsx +1 -1
- package/src/components/micro/empty.tsx +1 -1
- package/src/components/micro/field.tsx +1 -1
- package/src/components/micro/input-group.tsx +1 -1
- package/src/components/micro/input.test.tsx +95 -0
- package/src/components/micro/item.tsx +1 -1
- package/src/components/micro/menubar.tsx +1 -1
- package/src/components/micro/navigation-menu.tsx +1 -1
- package/src/components/micro/pagination.tsx +1 -1
- package/src/components/micro/popover.test.tsx +83 -0
- package/src/components/micro/popover.tsx +1 -1
- package/src/components/micro/progress.tsx +1 -1
- package/src/components/micro/select.test.tsx +122 -0
- package/src/components/micro/select.tsx +1 -1
- package/src/components/micro/sheet.test.tsx +122 -0
- package/src/components/micro/sheet.tsx +1 -1
- package/src/components/micro/sidebar.tsx +1 -1
- package/src/components/micro/switch.test.tsx +108 -0
- package/src/components/micro/table.tsx +1 -1
- package/src/components/micro/tabs.test.tsx +90 -0
- package/src/components/micro/tooltip.test.tsx +107 -0
- package/src/components/micro/tooltip.tsx +1 -1
- package/src/dev/data.ts +8 -0
- package/src/dev/main.tsx +4 -0
- package/src/dev/showcase/accordion.tsx +4 -2
- package/src/dev/showcase/alert-dialog.tsx +7 -4
- package/src/dev/showcase/alert.tsx +6 -3
- package/src/dev/showcase/aspect-ratio.tsx +2 -1
- package/src/dev/showcase/avatar.tsx +6 -3
- package/src/dev/showcase/badge.tsx +2 -1
- package/src/dev/showcase/breadcrumb.tsx +7 -4
- package/src/dev/showcase/button.tsx +2 -1
- package/src/dev/showcase/calendar.tsx +2 -1
- package/src/dev/showcase/card.tsx +4 -2
- package/src/dev/showcase/carousel.tsx +4 -2
- package/src/dev/showcase/chart.tsx +4 -2
- package/src/dev/showcase/checkbox.tsx +4 -2
- package/src/dev/showcase/collapsible.tsx +4 -2
- package/src/dev/showcase/combobox.tsx +9 -5
- package/src/dev/showcase/command.tsx +6 -3
- package/src/dev/showcase/context-menu.tsx +5 -3
- package/src/dev/showcase/dialog.tsx +5 -3
- package/src/dev/showcase/drawer.tsx +5 -3
- package/src/dev/showcase/dropdown-menu.tsx +7 -4
- package/src/dev/showcase/empty.tsx +6 -3
- package/src/dev/showcase/hover-card.tsx +7 -4
- package/src/dev/showcase/input-group.tsx +6 -3
- package/src/dev/showcase/input-otp.tsx +6 -3
- package/src/dev/showcase/input.tsx +6 -3
- package/src/dev/showcase/item.tsx +4 -2
- package/src/dev/showcase/kbd.tsx +10 -6
- package/src/dev/showcase/label.tsx +2 -1
- package/src/dev/showcase/menubar.tsx +5 -3
- package/src/dev/showcase/navigation-menu.tsx +5 -3
- package/src/dev/showcase/overview.tsx +9 -5
- package/src/dev/showcase/pagination.tsx +4 -2
- package/src/dev/showcase/popover.tsx +5 -3
- package/src/dev/showcase/progress.tsx +4 -2
- package/src/dev/showcase/radio-group.tsx +2 -1
- package/src/dev/showcase/resizable.tsx +4 -2
- package/src/dev/showcase/scroll-area.tsx +2 -1
- package/src/dev/showcase/select.tsx +7 -4
- package/src/dev/showcase/separator.tsx +2 -1
- package/src/dev/showcase/sheet.tsx +5 -3
- package/src/dev/showcase/sidebar.tsx +4 -2
- package/src/dev/showcase/skeleton.tsx +2 -1
- package/src/dev/showcase/slider.tsx +6 -3
- package/src/dev/showcase/sonner.tsx +2 -1
- package/src/dev/showcase/spinner.tsx +2 -1
- package/src/dev/showcase/switch.tsx +2 -1
- package/src/dev/showcase/table.tsx +4 -2
- package/src/dev/showcase/tabs.tsx +4 -2
- package/src/dev/showcase/textarea.tsx +6 -3
- package/src/dev/showcase/toast.tsx +2 -1
- package/src/dev/showcase/toggle-group.tsx +6 -3
- package/src/dev/showcase/toggle.tsx +2 -1
- package/src/dev/showcase/tooltip.tsx +5 -3
- package/src/dev/showcase/why.tsx +271 -0
- package/src/hooks/use-mobile.test.ts +72 -0
- package/src/lib/utils.test.ts +26 -10
- package/src/styles/gladvn.css +0 -1
- package/src/styles/tokens.css +4 -0
- package/dist/components/macro/accordion-preset.d.ts +0 -14
- package/dist/components/macro/accordion-preset.d.ts.map +0 -1
- package/dist/components/macro/alert-dialog-preset.d.ts +0 -26
- package/dist/components/macro/alert-dialog-preset.d.ts.map +0 -1
- package/dist/components/macro/alert-preset.d.ts +0 -14
- package/dist/components/macro/alert-preset.d.ts.map +0 -1
- package/dist/components/macro/avatar-preset.d.ts +0 -11
- package/dist/components/macro/avatar-preset.d.ts.map +0 -1
- package/dist/components/macro/breadcrumb-preset.d.ts +0 -12
- package/dist/components/macro/breadcrumb-preset.d.ts.map +0 -1
- package/dist/components/macro/card-preset.d.ts +0 -10
- package/dist/components/macro/card-preset.d.ts.map +0 -1
- package/dist/components/macro/carousel-preset.d.ts +0 -18
- package/dist/components/macro/carousel-preset.d.ts.map +0 -1
- package/dist/components/macro/checkbox-preset.d.ts +0 -14
- package/dist/components/macro/checkbox-preset.d.ts.map +0 -1
- package/dist/components/macro/combobox-preset.d.ts +0 -27
- package/dist/components/macro/combobox-preset.d.ts.map +0 -1
- package/dist/components/macro/command-preset.d.ts +0 -16
- package/dist/components/macro/command-preset.d.ts.map +0 -1
- package/dist/components/macro/date-picker.d.ts +0 -62
- package/dist/components/macro/date-picker.d.ts.map +0 -1
- package/dist/components/macro/dialog-preset.d.ts +0 -24
- package/dist/components/macro/dialog-preset.d.ts.map +0 -1
- package/dist/components/macro/empty-preset.d.ts +0 -15
- package/dist/components/macro/empty-preset.d.ts.map +0 -1
- package/dist/components/macro/field-preset.d.ts +0 -15
- package/dist/components/macro/field-preset.d.ts.map +0 -1
- package/dist/components/macro/index.d.ts +0 -22
- package/dist/components/macro/index.d.ts.map +0 -1
- package/dist/components/macro/input-otp-preset.d.ts +0 -19
- package/dist/components/macro/input-otp-preset.d.ts.map +0 -1
- package/dist/components/macro/input-preset.d.ts +0 -21
- package/dist/components/macro/input-preset.d.ts.map +0 -1
- package/dist/components/macro/pagination-preset.d.ts +0 -13
- package/dist/components/macro/pagination-preset.d.ts.map +0 -1
- package/dist/components/macro/progress-preset.d.ts +0 -10
- package/dist/components/macro/progress-preset.d.ts.map +0 -1
- package/dist/components/macro/radio-group-preset.d.ts +0 -22
- package/dist/components/macro/radio-group-preset.d.ts.map +0 -1
- package/dist/components/macro/select-preset.d.ts +0 -42
- package/dist/components/macro/select-preset.d.ts.map +0 -1
- package/dist/components/macro/slider-preset.d.ts +0 -12
- package/dist/components/macro/slider-preset.d.ts.map +0 -1
- package/dist/components/macro/switch-preset.d.ts +0 -12
- package/dist/components/macro/switch-preset.d.ts.map +0 -1
- package/dist/components/macro/tabs-preset.d.ts +0 -17
- package/dist/components/macro/tabs-preset.d.ts.map +0 -1
- package/dist/components/macro/textarea-preset.d.ts +0 -17
- package/dist/components/macro/textarea-preset.d.ts.map +0 -1
- package/dist/components/micro/accordion.d.ts +0 -15
- package/dist/components/micro/accordion.d.ts.map +0 -1
- package/dist/components/micro/alert-dialog.d.ts +0 -33
- package/dist/components/micro/alert-dialog.d.ts.map +0 -1
- package/dist/components/micro/alert.d.ts +0 -35
- package/dist/components/micro/alert.d.ts.map +0 -1
- package/dist/components/micro/aspect-ratio.d.ts +0 -20
- package/dist/components/micro/aspect-ratio.d.ts.map +0 -1
- package/dist/components/micro/avatar.d.ts +0 -23
- package/dist/components/micro/avatar.d.ts.map +0 -1
- package/dist/components/micro/badge.d.ts +0 -23
- package/dist/components/micro/badge.d.ts.map +0 -1
- package/dist/components/micro/breadcrumb.d.ts +0 -31
- package/dist/components/micro/breadcrumb.d.ts.map +0 -1
- package/dist/components/micro/button.d.ts +0 -46
- package/dist/components/micro/button.d.ts.map +0 -1
- package/dist/components/micro/calendar.d.ts +0 -28
- package/dist/components/micro/calendar.d.ts.map +0 -1
- package/dist/components/micro/card.d.ts +0 -28
- package/dist/components/micro/card.d.ts.map +0 -1
- package/dist/components/micro/carousel.d.ts +0 -29
- package/dist/components/micro/carousel.d.ts.map +0 -1
- package/dist/components/micro/chart.d.ts +0 -49
- package/dist/components/micro/chart.d.ts.map +0 -1
- package/dist/components/micro/checkbox.d.ts +0 -17
- package/dist/components/micro/checkbox.d.ts.map +0 -1
- package/dist/components/micro/collapsible.d.ts +0 -15
- package/dist/components/micro/collapsible.d.ts.map +0 -1
- package/dist/components/micro/combobox.d.ts +0 -34
- package/dist/components/micro/combobox.d.ts.map +0 -1
- package/dist/components/micro/command.d.ts +0 -79
- package/dist/components/micro/command.d.ts.map +0 -1
- package/dist/components/micro/context-menu.d.ts +0 -58
- package/dist/components/micro/context-menu.d.ts.map +0 -1
- package/dist/components/micro/dialog.d.ts +0 -15
- package/dist/components/micro/dialog.d.ts.map +0 -1
- package/dist/components/micro/direction.d.ts +0 -2
- package/dist/components/micro/direction.d.ts.map +0 -1
- package/dist/components/micro/drawer.d.ts +0 -18
- package/dist/components/micro/drawer.d.ts.map +0 -1
- package/dist/components/micro/dropdown-menu.d.ts +0 -40
- package/dist/components/micro/dropdown-menu.d.ts.map +0 -1
- package/dist/components/micro/empty.d.ts +0 -30
- package/dist/components/micro/empty.d.ts.map +0 -1
- package/dist/components/micro/field.d.ts +0 -29
- package/dist/components/micro/field.d.ts.map +0 -1
- package/dist/components/micro/hover-card.d.ts +0 -18
- package/dist/components/micro/hover-card.d.ts.map +0 -1
- package/dist/components/micro/input-group.d.ts +0 -17
- package/dist/components/micro/input-group.d.ts.map +0 -1
- package/dist/components/micro/input-otp.d.ts +0 -44
- package/dist/components/micro/input-otp.d.ts.map +0 -1
- package/dist/components/micro/input.d.ts +0 -29
- package/dist/components/micro/input.d.ts.map +0 -1
- package/dist/components/micro/item.d.ts +0 -31
- package/dist/components/micro/item.d.ts.map +0 -1
- package/dist/components/micro/kbd.d.ts +0 -9
- package/dist/components/micro/kbd.d.ts.map +0 -1
- package/dist/components/micro/label.d.ts +0 -15
- package/dist/components/micro/label.d.ts.map +0 -1
- package/dist/components/micro/menubar.d.ts +0 -40
- package/dist/components/micro/menubar.d.ts.map +0 -1
- package/dist/components/micro/navigation-menu.d.ts +0 -26
- package/dist/components/micro/navigation-menu.d.ts.map +0 -1
- package/dist/components/micro/pagination.d.ts +0 -33
- package/dist/components/micro/pagination.d.ts.map +0 -1
- package/dist/components/micro/popover.d.ts +0 -24
- package/dist/components/micro/popover.d.ts.map +0 -1
- package/dist/components/micro/progress.d.ts +0 -19
- package/dist/components/micro/progress.d.ts.map +0 -1
- package/dist/components/micro/radio-group.d.ts +0 -13
- package/dist/components/micro/radio-group.d.ts.map +0 -1
- package/dist/components/micro/resizable.d.ts +0 -12
- package/dist/components/micro/resizable.d.ts.map +0 -1
- package/dist/components/micro/scroll-area.d.ts +0 -12
- package/dist/components/micro/scroll-area.d.ts.map +0 -1
- package/dist/components/micro/select.d.ts +0 -22
- package/dist/components/micro/select.d.ts.map +0 -1
- package/dist/components/micro/separator.d.ts +0 -9
- package/dist/components/micro/separator.d.ts.map +0 -1
- package/dist/components/micro/sheet.d.ts +0 -17
- package/dist/components/micro/sheet.d.ts.map +0 -1
- package/dist/components/micro/sidebar.d.ts +0 -28
- package/dist/components/micro/sidebar.d.ts.map +0 -1
- package/dist/components/micro/skeleton.d.ts +0 -16
- package/dist/components/micro/skeleton.d.ts.map +0 -1
- package/dist/components/micro/slider.d.ts +0 -21
- package/dist/components/micro/slider.d.ts.map +0 -1
- package/dist/components/micro/sonner.d.ts +0 -5
- package/dist/components/micro/sonner.d.ts.map +0 -1
- package/dist/components/micro/spinner.d.ts +0 -21
- package/dist/components/micro/spinner.d.ts.map +0 -1
- package/dist/components/micro/switch.d.ts +0 -13
- package/dist/components/micro/switch.d.ts.map +0 -1
- package/dist/components/micro/table.d.ts +0 -17
- package/dist/components/micro/table.d.ts.map +0 -1
- package/dist/components/micro/tabs.d.ts +0 -13
- package/dist/components/micro/tabs.d.ts.map +0 -1
- package/dist/components/micro/textarea.d.ts +0 -24
- package/dist/components/micro/textarea.d.ts.map +0 -1
- package/dist/components/micro/theme-provider.d.ts +0 -76
- package/dist/components/micro/theme-provider.d.ts.map +0 -1
- package/dist/components/micro/toggle-group.d.ts +0 -22
- package/dist/components/micro/toggle-group.d.ts.map +0 -1
- package/dist/components/micro/toggle.d.ts +0 -16
- package/dist/components/micro/toggle.d.ts.map +0 -1
- package/dist/components/micro/tooltip.d.ts +0 -21
- package/dist/components/micro/tooltip.d.ts.map +0 -1
- package/dist/dev/App.d.ts +0 -3
- package/dist/dev/App.d.ts.map +0 -1
- package/dist/dev/components/GladvnLogo.d.ts +0 -10
- package/dist/dev/components/GladvnLogo.d.ts.map +0 -1
- package/dist/dev/components/code-highlighter.d.ts +0 -5
- package/dist/dev/components/code-highlighter.d.ts.map +0 -1
- package/dist/dev/components/dev-context.d.ts +0 -12
- package/dist/dev/components/dev-context.d.ts.map +0 -1
- package/dist/dev/components/showcase.d.ts +0 -72
- package/dist/dev/components/showcase.d.ts.map +0 -1
- package/dist/dev/data.d.ts +0 -68
- package/dist/dev/data.d.ts.map +0 -1
- package/dist/dev/main.d.ts +0 -1
- package/dist/dev/main.d.ts.map +0 -1
- package/dist/dev/sections/buttons.d.ts +0 -2
- package/dist/dev/sections/buttons.d.ts.map +0 -1
- package/dist/dev/sections/display.d.ts +0 -2
- package/dist/dev/sections/display.d.ts.map +0 -1
- package/dist/dev/sections/feedback.d.ts +0 -2
- package/dist/dev/sections/feedback.d.ts.map +0 -1
- package/dist/dev/sections/forms.d.ts +0 -2
- package/dist/dev/sections/forms.d.ts.map +0 -1
- package/dist/dev/sections/interactive.d.ts +0 -2
- package/dist/dev/sections/interactive.d.ts.map +0 -1
- package/dist/dev/sections/overview.d.ts +0 -2
- package/dist/dev/sections/overview.d.ts.map +0 -1
- package/dist/dev/showcase/accordion.d.ts +0 -2
- package/dist/dev/showcase/accordion.d.ts.map +0 -1
- package/dist/dev/showcase/alert-dialog.d.ts +0 -2
- package/dist/dev/showcase/alert-dialog.d.ts.map +0 -1
- package/dist/dev/showcase/alert.d.ts +0 -2
- package/dist/dev/showcase/alert.d.ts.map +0 -1
- package/dist/dev/showcase/aspect-ratio.d.ts +0 -2
- package/dist/dev/showcase/aspect-ratio.d.ts.map +0 -1
- package/dist/dev/showcase/avatar.d.ts +0 -2
- package/dist/dev/showcase/avatar.d.ts.map +0 -1
- package/dist/dev/showcase/badge.d.ts +0 -2
- package/dist/dev/showcase/badge.d.ts.map +0 -1
- package/dist/dev/showcase/breadcrumb.d.ts +0 -2
- package/dist/dev/showcase/breadcrumb.d.ts.map +0 -1
- package/dist/dev/showcase/button.d.ts +0 -2
- package/dist/dev/showcase/button.d.ts.map +0 -1
- package/dist/dev/showcase/calendar.d.ts +0 -2
- package/dist/dev/showcase/calendar.d.ts.map +0 -1
- package/dist/dev/showcase/card.d.ts +0 -2
- package/dist/dev/showcase/card.d.ts.map +0 -1
- package/dist/dev/showcase/carousel.d.ts +0 -2
- package/dist/dev/showcase/carousel.d.ts.map +0 -1
- package/dist/dev/showcase/chart.d.ts +0 -2
- package/dist/dev/showcase/chart.d.ts.map +0 -1
- package/dist/dev/showcase/checkbox.d.ts +0 -2
- package/dist/dev/showcase/checkbox.d.ts.map +0 -1
- package/dist/dev/showcase/collapsible.d.ts +0 -3
- package/dist/dev/showcase/collapsible.d.ts.map +0 -1
- package/dist/dev/showcase/combobox.d.ts +0 -2
- package/dist/dev/showcase/combobox.d.ts.map +0 -1
- package/dist/dev/showcase/command.d.ts +0 -2
- package/dist/dev/showcase/command.d.ts.map +0 -1
- package/dist/dev/showcase/context-menu.d.ts +0 -2
- package/dist/dev/showcase/context-menu.d.ts.map +0 -1
- package/dist/dev/showcase/dialog.d.ts +0 -2
- package/dist/dev/showcase/dialog.d.ts.map +0 -1
- package/dist/dev/showcase/drawer.d.ts +0 -2
- package/dist/dev/showcase/drawer.d.ts.map +0 -1
- package/dist/dev/showcase/dropdown-menu.d.ts +0 -2
- package/dist/dev/showcase/dropdown-menu.d.ts.map +0 -1
- package/dist/dev/showcase/empty.d.ts +0 -2
- package/dist/dev/showcase/empty.d.ts.map +0 -1
- package/dist/dev/showcase/hover-card.d.ts +0 -2
- package/dist/dev/showcase/hover-card.d.ts.map +0 -1
- package/dist/dev/showcase/input-group.d.ts +0 -2
- package/dist/dev/showcase/input-group.d.ts.map +0 -1
- package/dist/dev/showcase/input-otp.d.ts +0 -2
- package/dist/dev/showcase/input-otp.d.ts.map +0 -1
- package/dist/dev/showcase/input.d.ts +0 -2
- package/dist/dev/showcase/input.d.ts.map +0 -1
- package/dist/dev/showcase/item.d.ts +0 -2
- package/dist/dev/showcase/item.d.ts.map +0 -1
- package/dist/dev/showcase/kbd.d.ts +0 -2
- package/dist/dev/showcase/kbd.d.ts.map +0 -1
- package/dist/dev/showcase/label.d.ts +0 -2
- package/dist/dev/showcase/label.d.ts.map +0 -1
- package/dist/dev/showcase/menubar.d.ts +0 -2
- package/dist/dev/showcase/menubar.d.ts.map +0 -1
- package/dist/dev/showcase/navigation-menu.d.ts +0 -3
- package/dist/dev/showcase/navigation-menu.d.ts.map +0 -1
- package/dist/dev/showcase/overview.d.ts +0 -2
- package/dist/dev/showcase/overview.d.ts.map +0 -1
- package/dist/dev/showcase/pagination.d.ts +0 -2
- package/dist/dev/showcase/pagination.d.ts.map +0 -1
- package/dist/dev/showcase/popover.d.ts +0 -2
- package/dist/dev/showcase/popover.d.ts.map +0 -1
- package/dist/dev/showcase/progress.d.ts +0 -2
- package/dist/dev/showcase/progress.d.ts.map +0 -1
- package/dist/dev/showcase/radio-group.d.ts +0 -2
- package/dist/dev/showcase/radio-group.d.ts.map +0 -1
- package/dist/dev/showcase/resizable.d.ts +0 -2
- package/dist/dev/showcase/resizable.d.ts.map +0 -1
- package/dist/dev/showcase/scroll-area.d.ts +0 -2
- package/dist/dev/showcase/scroll-area.d.ts.map +0 -1
- package/dist/dev/showcase/select.d.ts +0 -2
- package/dist/dev/showcase/select.d.ts.map +0 -1
- package/dist/dev/showcase/separator.d.ts +0 -2
- package/dist/dev/showcase/separator.d.ts.map +0 -1
- package/dist/dev/showcase/sheet.d.ts +0 -2
- package/dist/dev/showcase/sheet.d.ts.map +0 -1
- package/dist/dev/showcase/sidebar.d.ts +0 -2
- package/dist/dev/showcase/sidebar.d.ts.map +0 -1
- package/dist/dev/showcase/skeleton.d.ts +0 -2
- package/dist/dev/showcase/skeleton.d.ts.map +0 -1
- package/dist/dev/showcase/slider.d.ts +0 -2
- package/dist/dev/showcase/slider.d.ts.map +0 -1
- package/dist/dev/showcase/sonner.d.ts +0 -2
- package/dist/dev/showcase/sonner.d.ts.map +0 -1
- package/dist/dev/showcase/spinner.d.ts +0 -2
- package/dist/dev/showcase/spinner.d.ts.map +0 -1
- package/dist/dev/showcase/switch.d.ts +0 -2
- package/dist/dev/showcase/switch.d.ts.map +0 -1
- package/dist/dev/showcase/table.d.ts +0 -2
- package/dist/dev/showcase/table.d.ts.map +0 -1
- package/dist/dev/showcase/tabs.d.ts +0 -2
- package/dist/dev/showcase/tabs.d.ts.map +0 -1
- package/dist/dev/showcase/textarea.d.ts +0 -2
- package/dist/dev/showcase/textarea.d.ts.map +0 -1
- package/dist/dev/showcase/toast.d.ts +0 -2
- package/dist/dev/showcase/toast.d.ts.map +0 -1
- package/dist/dev/showcase/toggle-group.d.ts +0 -2
- package/dist/dev/showcase/toggle-group.d.ts.map +0 -1
- package/dist/dev/showcase/toggle.d.ts +0 -2
- package/dist/dev/showcase/toggle.d.ts.map +0 -1
- package/dist/dev/showcase/tooltip.d.ts +0 -2
- package/dist/dev/showcase/tooltip.d.ts.map +0 -1
- package/dist/hooks/use-controllable-state.d.ts +0 -14
- package/dist/hooks/use-controllable-state.d.ts.map +0 -1
- package/dist/hooks/use-mobile.d.ts +0 -2
- package/dist/hooks/use-mobile.d.ts.map +0 -1
- package/dist/index.cjs +0 -5099
- package/dist/index.cjs.map +0 -1
- package/dist/index.d.ts +0 -58
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -4753
- package/dist/index.js.map +0 -1
- package/dist/lib/types.d.ts +0 -4
- package/dist/lib/types.d.ts.map +0 -1
- package/dist/lib/utils.d.ts +0 -3
- package/dist/lib/utils.d.ts.map +0 -1
- package/dist/preset.d.ts +0 -18
- package/dist/preset.d.ts.map +0 -1
- package/dist/test/setup.d.ts +0 -1
- package/dist/test/setup.d.ts.map +0 -1
- package/scripts/add-icononly-prop.ts +0 -84
- package/scripts/audit-best-practices.ts +0 -114
- package/scripts/audit-showcase.ts +0 -262
- package/scripts/audit-showcases.ts +0 -83
- package/scripts/clean-imports.ts +0 -21
- package/scripts/count_missing.ts +0 -24
- package/scripts/find-css-vars.ts +0 -62
- package/scripts/fix-portals.ts +0 -90
- package/scripts/format-codestrings.ts +0 -87
- package/scripts/full-audit.ts +0 -89
- package/scripts/merge-components.cjs +0 -65
- package/scripts/merge-components.js +0 -64
- package/scripts/optimize-barrel.ts +0 -116
- package/scripts/organize-imports.ts +0 -21
- package/scripts/refactor_divs.ts +0 -39
- package/scripts/regex-format.cjs +0 -67
- package/scripts/remove_div_wrappers.ts +0 -17
- package/scripts/tmp.tsx +0 -25
- package/scripts/update-gaps.ts +0 -83
- package/scripts/update_showcase_codestrings.ts +0 -87
package/package.json
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gladvn",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.27",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"
|
|
5
|
+
"packageManager": "pnpm@10.11.0",
|
|
6
|
+
"description": "A CLI to scaffold beautiful, accessible React components into your project. Powered by Tailwind CSS v4 and Base UI.",
|
|
6
7
|
"keywords": [
|
|
7
8
|
"react",
|
|
8
9
|
"components",
|
|
@@ -17,28 +18,13 @@
|
|
|
17
18
|
"type": "git",
|
|
18
19
|
"url": "https://github.com/duongacy/gladvn"
|
|
19
20
|
},
|
|
20
|
-
"
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
"engines": {
|
|
22
|
+
"node": ">=18"
|
|
23
|
+
},
|
|
23
24
|
"bin": {
|
|
24
25
|
"gladvn": "bin/cli.js"
|
|
25
26
|
},
|
|
26
|
-
"exports": {
|
|
27
|
-
".": {
|
|
28
|
-
"import": {
|
|
29
|
-
"types": "./dist/index.d.ts",
|
|
30
|
-
"default": "./dist/index.js"
|
|
31
|
-
},
|
|
32
|
-
"require": {
|
|
33
|
-
"types": "./dist/index.d.cts",
|
|
34
|
-
"default": "./dist/index.cjs"
|
|
35
|
-
}
|
|
36
|
-
},
|
|
37
|
-
"./gladvn.css": "./src/styles/gladvn.css",
|
|
38
|
-
"./tokens.css": "./src/styles/tokens.css"
|
|
39
|
-
},
|
|
40
27
|
"files": [
|
|
41
|
-
"dist",
|
|
42
28
|
"src",
|
|
43
29
|
"bin",
|
|
44
30
|
"scripts",
|
|
@@ -49,13 +35,13 @@
|
|
|
49
35
|
],
|
|
50
36
|
"scripts": {
|
|
51
37
|
"dev": "vite",
|
|
52
|
-
"build": "vite build",
|
|
38
|
+
"build:app": "vite build -c vite.config.app.ts",
|
|
53
39
|
"lint": "oxlint",
|
|
54
40
|
"preview": "vite preview",
|
|
55
41
|
"postinstall": "node scripts/postinstall.cjs || true",
|
|
56
|
-
"prepublishOnly": "npm run build",
|
|
57
|
-
"build:app": "vite build -c vite.config.app.ts",
|
|
58
42
|
"test": "vitest run",
|
|
43
|
+
"test:e2e": "playwright test",
|
|
44
|
+
"typecheck": "tsc --noEmit",
|
|
59
45
|
"prepare": "husky"
|
|
60
46
|
},
|
|
61
47
|
"peerDependencies": {
|
|
@@ -70,7 +56,6 @@
|
|
|
70
56
|
},
|
|
71
57
|
"dependencies": {
|
|
72
58
|
"@base-ui/react": "^1.6.0",
|
|
73
|
-
"@trivago/prettier-plugin-sort-imports": "^6.0.2",
|
|
74
59
|
"class-variance-authority": "^0.7.1",
|
|
75
60
|
"clsx": "^2.1.1",
|
|
76
61
|
"cmdk": "^1.1.1",
|
|
@@ -79,24 +64,25 @@
|
|
|
79
64
|
"input-otp": "^1.4.2",
|
|
80
65
|
"lucide-react": "^1.24.0",
|
|
81
66
|
"next-themes": "^0.4.6",
|
|
82
|
-
"prettier": "^3.9.6",
|
|
83
67
|
"react-day-picker": "^10.0.1",
|
|
84
68
|
"react-resizable-panels": "^4.12.1",
|
|
85
69
|
"recharts": "^3.9.2",
|
|
86
|
-
"shiki": "^4.3.1",
|
|
87
70
|
"sonner": "^2.0.7",
|
|
88
71
|
"tailwind-merge": "^3.6.0",
|
|
89
72
|
"tw-animate-css": "^1.4.0",
|
|
90
73
|
"vaul": "^1.1.2"
|
|
91
74
|
},
|
|
92
75
|
"devDependencies": {
|
|
76
|
+
"@fontsource/inter": "^5.3.0",
|
|
93
77
|
"@hookform/resolvers": "^5.4.0",
|
|
94
78
|
"@playwright/test": "^1.61.1",
|
|
95
79
|
"@radix-ui/react-dialog": "^1.1.18",
|
|
96
80
|
"@tailwindcss/vite": "^4.3.1",
|
|
81
|
+
"@testing-library/dom": "^10.4.1",
|
|
97
82
|
"@testing-library/jest-dom": "^6.9.1",
|
|
98
83
|
"@testing-library/react": "^16.3.2",
|
|
99
84
|
"@testing-library/user-event": "^14.6.1",
|
|
85
|
+
"@trivago/prettier-plugin-sort-imports": "^6.0.2",
|
|
100
86
|
"@types/node": "^24.13.2",
|
|
101
87
|
"@types/react": "^19.2.17",
|
|
102
88
|
"@types/react-dom": "^19.2.3",
|
|
@@ -105,9 +91,11 @@
|
|
|
105
91
|
"jsdom": "^29.1.1",
|
|
106
92
|
"lint-staged": "^16.4.0",
|
|
107
93
|
"oxlint": "^1.69.0",
|
|
94
|
+
"prettier": "^3.9.6",
|
|
108
95
|
"react": "^19.2.7",
|
|
109
96
|
"react-dom": "^19.2.7",
|
|
110
97
|
"react-hook-form": "^7.80.0",
|
|
98
|
+
"shiki": "^4.3.1",
|
|
111
99
|
"tailwindcss": "^4.3.1",
|
|
112
100
|
"ts-morph": "^28.0.0",
|
|
113
101
|
"typescript": "~6.0.2",
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { useState } from "react";
|
|
3
|
+
import { Button } from "../components/micro/button";
|
|
4
|
+
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "../components/micro/card";
|
|
5
|
+
import { Checkbox } from "../components/micro/checkbox";
|
|
6
|
+
import { Input } from "../components/micro/input";
|
|
7
|
+
import { Label } from "../components/micro/label";
|
|
8
|
+
import { Separator } from "../components/micro/separator";
|
|
9
|
+
|
|
10
|
+
export default function AuthCardBlock() {
|
|
11
|
+
const [isLoading, setIsLoading] = useState(false);
|
|
12
|
+
const [mode, setMode] = useState<"login" | "register">("login");
|
|
13
|
+
|
|
14
|
+
const handleSubmit = (e: React.FormEvent) => {
|
|
15
|
+
e.preventDefault();
|
|
16
|
+
setIsLoading(true);
|
|
17
|
+
setTimeout(() => setIsLoading(false), 1000);
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
return (
|
|
21
|
+
<div className="flex min-h-screen w-full items-center justify-center p-4 bg-muted/20">
|
|
22
|
+
<Card className="w-full max-w-sm">
|
|
23
|
+
<CardHeader className="text-center space-y-2">
|
|
24
|
+
<CardTitle className="text-2xl font-bold">
|
|
25
|
+
{mode === "login" ? "Welcome back" : "Create an account"}
|
|
26
|
+
</CardTitle>
|
|
27
|
+
<CardDescription>
|
|
28
|
+
{mode === "login"
|
|
29
|
+
? "Enter your email below to login to your account"
|
|
30
|
+
: "Enter your details below to create your account"}
|
|
31
|
+
</CardDescription>
|
|
32
|
+
</CardHeader>
|
|
33
|
+
<CardContent>
|
|
34
|
+
<form onSubmit={handleSubmit} className="space-y-4">
|
|
35
|
+
{mode === "register" && (
|
|
36
|
+
<div className="space-y-2">
|
|
37
|
+
<Label htmlFor="name">Full Name</Label>
|
|
38
|
+
<Input id="name" placeholder="John Doe" required />
|
|
39
|
+
</div>
|
|
40
|
+
)}
|
|
41
|
+
<div className="space-y-2">
|
|
42
|
+
<Label htmlFor="email">Email</Label>
|
|
43
|
+
<Input id="email" type="email" placeholder="m@example.com" required />
|
|
44
|
+
</div>
|
|
45
|
+
<div className="space-y-2">
|
|
46
|
+
<div className="flex items-center justify-between">
|
|
47
|
+
<Label htmlFor="password">Password</Label>
|
|
48
|
+
{mode === "login" && (
|
|
49
|
+
<Button variant="link" color="primary" className="h-auto p-0 text-xs">
|
|
50
|
+
Forgot password?
|
|
51
|
+
</Button>
|
|
52
|
+
)}
|
|
53
|
+
</div>
|
|
54
|
+
<Input id="password" type="password" required />
|
|
55
|
+
</div>
|
|
56
|
+
|
|
57
|
+
{mode === "register" && (
|
|
58
|
+
<div className="flex items-center gap-2">
|
|
59
|
+
<Checkbox id="terms" required />
|
|
60
|
+
<Label htmlFor="terms" className="text-sm font-normal text-muted-foreground">
|
|
61
|
+
I agree to the <a href="#" className="text-primary hover:underline">terms and conditions</a>
|
|
62
|
+
</Label>
|
|
63
|
+
</div>
|
|
64
|
+
)}
|
|
65
|
+
|
|
66
|
+
<Button type="submit" className="w-full" disabled={isLoading}>
|
|
67
|
+
{isLoading ? "Loading..." : mode === "login" ? "Sign In" : "Create Account"}
|
|
68
|
+
</Button>
|
|
69
|
+
</form>
|
|
70
|
+
|
|
71
|
+
<div className="my-6 flex items-center gap-4">
|
|
72
|
+
<Separator className="flex-1" />
|
|
73
|
+
<span className="text-xs text-muted-foreground">OR</span>
|
|
74
|
+
<Separator className="flex-1" />
|
|
75
|
+
</div>
|
|
76
|
+
|
|
77
|
+
<Button variant="outline" className="w-full">
|
|
78
|
+
<svg viewBox="0 0 24 24" className="mr-2 size-4" fill="currentColor">
|
|
79
|
+
<path d="M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z" fill="#4285F4" />
|
|
80
|
+
<path d="M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z" fill="#34A853" />
|
|
81
|
+
<path d="M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z" fill="#FBBC05" />
|
|
82
|
+
<path d="M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z" fill="#EA4335" />
|
|
83
|
+
</svg>
|
|
84
|
+
Continue with Google
|
|
85
|
+
</Button>
|
|
86
|
+
|
|
87
|
+
<div className="mt-4 text-center text-sm">
|
|
88
|
+
<span className="text-muted-foreground">
|
|
89
|
+
{mode === "login" ? "Don't have an account? " : "Already have an account? "}
|
|
90
|
+
</span>
|
|
91
|
+
<Button
|
|
92
|
+
variant="link"
|
|
93
|
+
color="primary"
|
|
94
|
+
className="h-auto p-0"
|
|
95
|
+
onClick={() => setMode(mode === "login" ? "register" : "login")}
|
|
96
|
+
>
|
|
97
|
+
{mode === "login" ? "Sign up" : "Sign in"}
|
|
98
|
+
</Button>
|
|
99
|
+
</div>
|
|
100
|
+
</CardContent>
|
|
101
|
+
</Card>
|
|
102
|
+
</div>
|
|
103
|
+
);
|
|
104
|
+
}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { useState } from "react";
|
|
3
|
+
import { Button } from "../components/micro/button";
|
|
4
|
+
import { Checkbox } from "../components/micro/checkbox";
|
|
5
|
+
import {
|
|
6
|
+
Dialog,
|
|
7
|
+
DialogContent,
|
|
8
|
+
DialogDescription,
|
|
9
|
+
DialogHeader,
|
|
10
|
+
DialogTitle,
|
|
11
|
+
DialogTrigger,
|
|
12
|
+
} from "../components/micro/dialog";
|
|
13
|
+
import { Input } from "../components/micro/input";
|
|
14
|
+
import { Label } from "../components/micro/label";
|
|
15
|
+
import { Separator } from "../components/micro/separator";
|
|
16
|
+
|
|
17
|
+
export default function AuthDialogBlock() {
|
|
18
|
+
const [isLoading, setIsLoading] = useState(false);
|
|
19
|
+
const [mode, setMode] = useState<"login" | "register">("login");
|
|
20
|
+
const [isOpen, setIsOpen] = useState(false);
|
|
21
|
+
|
|
22
|
+
const handleSubmit = (e: React.FormEvent) => {
|
|
23
|
+
e.preventDefault();
|
|
24
|
+
setIsLoading(true);
|
|
25
|
+
setTimeout(() => {
|
|
26
|
+
setIsLoading(false);
|
|
27
|
+
setIsOpen(false);
|
|
28
|
+
}, 1000);
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
return (
|
|
32
|
+
<div className="flex min-h-[50vh] w-full items-center justify-center p-4 bg-muted/10 border border-dashed rounded-lg">
|
|
33
|
+
<Dialog open={isOpen} onOpenChange={setIsOpen}>
|
|
34
|
+
<DialogTrigger render={<Button>Open Authentication</Button>} />
|
|
35
|
+
<DialogContent className="sm:max-w-md">
|
|
36
|
+
<DialogHeader className="text-center space-y-2">
|
|
37
|
+
<DialogTitle className="text-2xl font-bold">
|
|
38
|
+
{mode === "login" ? "Welcome back" : "Create an account"}
|
|
39
|
+
</DialogTitle>
|
|
40
|
+
<DialogDescription>
|
|
41
|
+
{mode === "login"
|
|
42
|
+
? "Enter your email below to login to your account"
|
|
43
|
+
: "Enter your details below to create your account"}
|
|
44
|
+
</DialogDescription>
|
|
45
|
+
</DialogHeader>
|
|
46
|
+
|
|
47
|
+
<form onSubmit={handleSubmit} className="space-y-4 py-4">
|
|
48
|
+
{mode === "register" && (
|
|
49
|
+
<div className="space-y-2">
|
|
50
|
+
<Label htmlFor="dialog-name">Full Name</Label>
|
|
51
|
+
<Input id="dialog-name" placeholder="John Doe" required />
|
|
52
|
+
</div>
|
|
53
|
+
)}
|
|
54
|
+
<div className="space-y-2">
|
|
55
|
+
<Label htmlFor="dialog-email">Email</Label>
|
|
56
|
+
<Input id="dialog-email" type="email" placeholder="m@example.com" required />
|
|
57
|
+
</div>
|
|
58
|
+
<div className="space-y-2">
|
|
59
|
+
<div className="flex items-center justify-between">
|
|
60
|
+
<Label htmlFor="dialog-password">Password</Label>
|
|
61
|
+
{mode === "login" && (
|
|
62
|
+
<Button type="button" variant="link" color="primary" className="h-auto p-0 text-xs">
|
|
63
|
+
Forgot password?
|
|
64
|
+
</Button>
|
|
65
|
+
)}
|
|
66
|
+
</div>
|
|
67
|
+
<Input id="dialog-password" type="password" required />
|
|
68
|
+
</div>
|
|
69
|
+
|
|
70
|
+
{mode === "register" && (
|
|
71
|
+
<div className="flex items-center gap-2">
|
|
72
|
+
<Checkbox id="dialog-terms" required />
|
|
73
|
+
<Label htmlFor="dialog-terms" className="text-sm font-normal text-muted-foreground">
|
|
74
|
+
I agree to the <a href="#" className="text-primary hover:underline">terms</a>
|
|
75
|
+
</Label>
|
|
76
|
+
</div>
|
|
77
|
+
)}
|
|
78
|
+
|
|
79
|
+
<Button type="submit" className="w-full" disabled={isLoading}>
|
|
80
|
+
{isLoading ? "Loading..." : mode === "login" ? "Sign In" : "Create Account"}
|
|
81
|
+
</Button>
|
|
82
|
+
</form>
|
|
83
|
+
|
|
84
|
+
<div className="flex items-center gap-4">
|
|
85
|
+
<Separator className="flex-1" />
|
|
86
|
+
<span className="text-xs text-muted-foreground uppercase">Or</span>
|
|
87
|
+
<Separator className="flex-1" />
|
|
88
|
+
</div>
|
|
89
|
+
|
|
90
|
+
<Button type="button" variant="outline" className="w-full mt-4">
|
|
91
|
+
<svg viewBox="0 0 24 24" className="mr-2 size-4" fill="currentColor">
|
|
92
|
+
<path d="M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z" fill="#4285F4" />
|
|
93
|
+
<path d="M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z" fill="#34A853" />
|
|
94
|
+
<path d="M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z" fill="#FBBC05" />
|
|
95
|
+
<path d="M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z" fill="#EA4335" />
|
|
96
|
+
</svg>
|
|
97
|
+
Google
|
|
98
|
+
</Button>
|
|
99
|
+
|
|
100
|
+
<p className="mt-4 text-center text-sm text-muted-foreground">
|
|
101
|
+
{mode === "login" ? "Don't have an account? " : "Already have an account? "}
|
|
102
|
+
<Button
|
|
103
|
+
type="button"
|
|
104
|
+
variant="link"
|
|
105
|
+
color="primary"
|
|
106
|
+
className="h-auto p-0 font-semibold"
|
|
107
|
+
onClick={() => setMode(mode === "login" ? "register" : "login")}
|
|
108
|
+
>
|
|
109
|
+
{mode === "login" ? "Sign up" : "Sign in"}
|
|
110
|
+
</Button>
|
|
111
|
+
</p>
|
|
112
|
+
</DialogContent>
|
|
113
|
+
</Dialog>
|
|
114
|
+
</div>
|
|
115
|
+
);
|
|
116
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { useState } from "react";
|
|
3
|
+
import { Button } from "../components/micro/button";
|
|
4
|
+
import { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from "../components/micro/card";
|
|
5
|
+
import { Input } from "../components/micro/input";
|
|
6
|
+
import { Label } from "../components/micro/label";
|
|
7
|
+
|
|
8
|
+
export default function AuthRecoveryBlock() {
|
|
9
|
+
const [isLoading, setIsLoading] = useState(false);
|
|
10
|
+
const [isSent, setIsSent] = useState(false);
|
|
11
|
+
|
|
12
|
+
const handleSubmit = (e: React.FormEvent) => {
|
|
13
|
+
e.preventDefault();
|
|
14
|
+
setIsLoading(true);
|
|
15
|
+
setTimeout(() => {
|
|
16
|
+
setIsLoading(false);
|
|
17
|
+
setIsSent(true);
|
|
18
|
+
}, 1500);
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
return (
|
|
22
|
+
<div className="flex min-h-[50vh] w-full items-center justify-center p-4 bg-muted/20">
|
|
23
|
+
<Card className="w-full max-w-sm">
|
|
24
|
+
<CardHeader className="text-center space-y-2">
|
|
25
|
+
<CardTitle className="text-2xl font-bold">
|
|
26
|
+
{isSent ? "Check your email" : "Forgot Password"}
|
|
27
|
+
</CardTitle>
|
|
28
|
+
<CardDescription>
|
|
29
|
+
{isSent
|
|
30
|
+
? "We have sent a password reset link to your email."
|
|
31
|
+
: "Enter your email address and we will send you a link to reset your password."}
|
|
32
|
+
</CardDescription>
|
|
33
|
+
</CardHeader>
|
|
34
|
+
<CardContent>
|
|
35
|
+
{!isSent ? (
|
|
36
|
+
<form onSubmit={handleSubmit} className="space-y-4">
|
|
37
|
+
<div className="space-y-2">
|
|
38
|
+
<Label htmlFor="recovery-email">Email</Label>
|
|
39
|
+
<Input id="recovery-email" type="email" placeholder="m@example.com" required />
|
|
40
|
+
</div>
|
|
41
|
+
<Button type="submit" className="w-full" disabled={isLoading}>
|
|
42
|
+
{isLoading ? "Sending link..." : "Send Reset Link"}
|
|
43
|
+
</Button>
|
|
44
|
+
</form>
|
|
45
|
+
) : (
|
|
46
|
+
<div className="flex flex-col space-y-4">
|
|
47
|
+
<Button type="button" variant="outline" className="w-full" onClick={() => setIsSent(false)}>
|
|
48
|
+
Try another email
|
|
49
|
+
</Button>
|
|
50
|
+
</div>
|
|
51
|
+
)}
|
|
52
|
+
</CardContent>
|
|
53
|
+
<CardFooter className="flex justify-center">
|
|
54
|
+
<Button variant="link" color="primary" className="text-sm">
|
|
55
|
+
Back to Login
|
|
56
|
+
</Button>
|
|
57
|
+
</CardFooter>
|
|
58
|
+
</Card>
|
|
59
|
+
</div>
|
|
60
|
+
);
|
|
61
|
+
}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { useState } from "react";
|
|
3
|
+
import { Button } from "../components/micro/button";
|
|
4
|
+
import { Checkbox } from "../components/micro/checkbox";
|
|
5
|
+
import { Input } from "../components/micro/input";
|
|
6
|
+
import { Label } from "../components/micro/label";
|
|
7
|
+
import { Separator } from "../components/micro/separator";
|
|
8
|
+
|
|
9
|
+
export default function AuthSplitBlock() {
|
|
10
|
+
const [isLoading, setIsLoading] = useState(false);
|
|
11
|
+
const [mode, setMode] = useState<"login" | "register">("login");
|
|
12
|
+
|
|
13
|
+
const handleSubmit = (e: React.FormEvent) => {
|
|
14
|
+
e.preventDefault();
|
|
15
|
+
setIsLoading(true);
|
|
16
|
+
setTimeout(() => setIsLoading(false), 1000);
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
return (
|
|
20
|
+
<div className="flex min-h-screen w-full">
|
|
21
|
+
{/* Left side - Image/Branding (hidden on mobile) */}
|
|
22
|
+
<div className="hidden lg:flex w-1/2 flex-col justify-between bg-primary p-12 text-primary-foreground relative overflow-hidden">
|
|
23
|
+
{/* Subtle background pattern */}
|
|
24
|
+
<div className="absolute inset-0 opacity-10 bg-[radial-gradient(circle_at_center,_var(--tw-gradient-stops))] from-white to-transparent pointer-events-none" />
|
|
25
|
+
|
|
26
|
+
<div className="relative z-10">
|
|
27
|
+
<h1 className="text-2xl font-bold tracking-tight">gladvn.</h1>
|
|
28
|
+
</div>
|
|
29
|
+
|
|
30
|
+
<div className="relative z-10 space-y-4 max-w-md">
|
|
31
|
+
<h2 className="text-4xl font-bold">
|
|
32
|
+
Accelerate your development workflow
|
|
33
|
+
</h2>
|
|
34
|
+
<p className="text-lg text-primary-foreground/80">
|
|
35
|
+
Join thousands of developers building modern, accessible, and beautiful web applications faster than ever before.
|
|
36
|
+
</p>
|
|
37
|
+
</div>
|
|
38
|
+
|
|
39
|
+
<div className="relative z-10 flex items-center gap-4 text-sm font-medium">
|
|
40
|
+
<div className="flex -space-x-2">
|
|
41
|
+
{[1, 2, 3, 4].map((i) => (
|
|
42
|
+
<div key={i} className="size-8 rounded-full border-2 border-primary bg-primary-foreground/20" />
|
|
43
|
+
))}
|
|
44
|
+
</div>
|
|
45
|
+
<p>Trusted by 10k+ developers</p>
|
|
46
|
+
</div>
|
|
47
|
+
</div>
|
|
48
|
+
|
|
49
|
+
{/* Right side - Form */}
|
|
50
|
+
<div className="flex w-full lg:w-1/2 items-center justify-center p-8 sm:p-12">
|
|
51
|
+
<div className="mx-auto flex w-full max-w-sm flex-col justify-center space-y-6">
|
|
52
|
+
<div className="flex flex-col space-y-2 text-center lg:text-left">
|
|
53
|
+
<h1 className="text-3xl font-bold tracking-tight">
|
|
54
|
+
{mode === "login" ? "Welcome back" : "Create an account"}
|
|
55
|
+
</h1>
|
|
56
|
+
<p className="text-sm text-muted-foreground">
|
|
57
|
+
{mode === "login"
|
|
58
|
+
? "Enter your email below to login to your account"
|
|
59
|
+
: "Enter your details below to create your account"}
|
|
60
|
+
</p>
|
|
61
|
+
</div>
|
|
62
|
+
|
|
63
|
+
<form onSubmit={handleSubmit} className="space-y-4">
|
|
64
|
+
{mode === "register" && (
|
|
65
|
+
<div className="space-y-2">
|
|
66
|
+
<Label htmlFor="name">Full Name</Label>
|
|
67
|
+
<Input id="name" placeholder="John Doe" required />
|
|
68
|
+
</div>
|
|
69
|
+
)}
|
|
70
|
+
<div className="space-y-2">
|
|
71
|
+
<Label htmlFor="email">Email</Label>
|
|
72
|
+
<Input id="email" type="email" placeholder="m@example.com" required />
|
|
73
|
+
</div>
|
|
74
|
+
<div className="space-y-2">
|
|
75
|
+
<div className="flex items-center justify-between">
|
|
76
|
+
<Label htmlFor="password">Password</Label>
|
|
77
|
+
{mode === "login" && (
|
|
78
|
+
<Button type="button" variant="link" color="primary" className="h-auto p-0 text-xs">
|
|
79
|
+
Forgot password?
|
|
80
|
+
</Button>
|
|
81
|
+
)}
|
|
82
|
+
</div>
|
|
83
|
+
<Input id="password" type="password" required />
|
|
84
|
+
</div>
|
|
85
|
+
|
|
86
|
+
{mode === "register" && (
|
|
87
|
+
<div className="flex items-center gap-2">
|
|
88
|
+
<Checkbox id="terms" required />
|
|
89
|
+
<Label htmlFor="terms" className="text-sm font-normal text-muted-foreground">
|
|
90
|
+
I agree to the <a href="#" className="text-primary hover:underline">terms and conditions</a>
|
|
91
|
+
</Label>
|
|
92
|
+
</div>
|
|
93
|
+
)}
|
|
94
|
+
|
|
95
|
+
<Button type="submit" className="w-full" disabled={isLoading}>
|
|
96
|
+
{isLoading ? "Loading..." : mode === "login" ? "Sign In" : "Create Account"}
|
|
97
|
+
</Button>
|
|
98
|
+
</form>
|
|
99
|
+
|
|
100
|
+
<div className="flex items-center gap-4">
|
|
101
|
+
<Separator className="flex-1" />
|
|
102
|
+
<span className="text-xs text-muted-foreground uppercase">Or continue with</span>
|
|
103
|
+
<Separator className="flex-1" />
|
|
104
|
+
</div>
|
|
105
|
+
|
|
106
|
+
<Button type="button" variant="outline" className="w-full">
|
|
107
|
+
<svg viewBox="0 0 24 24" className="mr-2 size-4" fill="currentColor">
|
|
108
|
+
<path d="M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z" fill="#4285F4" />
|
|
109
|
+
<path d="M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z" fill="#34A853" />
|
|
110
|
+
<path d="M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z" fill="#FBBC05" />
|
|
111
|
+
<path d="M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z" fill="#EA4335" />
|
|
112
|
+
</svg>
|
|
113
|
+
Google
|
|
114
|
+
</Button>
|
|
115
|
+
|
|
116
|
+
<p className="text-center text-sm text-muted-foreground">
|
|
117
|
+
{mode === "login" ? "Don't have an account? " : "Already have an account? "}
|
|
118
|
+
<Button
|
|
119
|
+
type="button"
|
|
120
|
+
variant="link"
|
|
121
|
+
color="primary"
|
|
122
|
+
className="h-auto p-0 font-semibold"
|
|
123
|
+
onClick={() => setMode(mode === "login" ? "register" : "login")}
|
|
124
|
+
>
|
|
125
|
+
{mode === "login" ? "Sign up" : "Sign in"}
|
|
126
|
+
</Button>
|
|
127
|
+
</p>
|
|
128
|
+
</div>
|
|
129
|
+
</div>
|
|
130
|
+
</div>
|
|
131
|
+
);
|
|
132
|
+
}
|