gladvn 0.2.14
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/README.md +112 -0
- package/bin/cli.js +326 -0
- package/dist/components/macro/accordion-preset.d.ts +14 -0
- package/dist/components/macro/accordion-preset.d.ts.map +1 -0
- package/dist/components/macro/alert-dialog-preset.d.ts +26 -0
- package/dist/components/macro/alert-dialog-preset.d.ts.map +1 -0
- package/dist/components/macro/alert-preset.d.ts +14 -0
- package/dist/components/macro/alert-preset.d.ts.map +1 -0
- package/dist/components/macro/avatar-preset.d.ts +11 -0
- package/dist/components/macro/avatar-preset.d.ts.map +1 -0
- package/dist/components/macro/breadcrumb-preset.d.ts +12 -0
- package/dist/components/macro/breadcrumb-preset.d.ts.map +1 -0
- package/dist/components/macro/card-preset.d.ts +10 -0
- package/dist/components/macro/card-preset.d.ts.map +1 -0
- package/dist/components/macro/carousel-preset.d.ts +18 -0
- package/dist/components/macro/carousel-preset.d.ts.map +1 -0
- package/dist/components/macro/checkbox-preset.d.ts +14 -0
- package/dist/components/macro/checkbox-preset.d.ts.map +1 -0
- package/dist/components/macro/combobox-preset.d.ts +27 -0
- package/dist/components/macro/combobox-preset.d.ts.map +1 -0
- package/dist/components/macro/command-preset.d.ts +16 -0
- package/dist/components/macro/command-preset.d.ts.map +1 -0
- package/dist/components/macro/date-picker.d.ts +62 -0
- package/dist/components/macro/date-picker.d.ts.map +1 -0
- package/dist/components/macro/dialog-preset.d.ts +24 -0
- package/dist/components/macro/dialog-preset.d.ts.map +1 -0
- package/dist/components/macro/empty-preset.d.ts +15 -0
- package/dist/components/macro/empty-preset.d.ts.map +1 -0
- package/dist/components/macro/field-preset.d.ts +15 -0
- package/dist/components/macro/field-preset.d.ts.map +1 -0
- package/dist/components/macro/index.d.ts +22 -0
- package/dist/components/macro/index.d.ts.map +1 -0
- package/dist/components/macro/input-otp-preset.d.ts +13 -0
- package/dist/components/macro/input-otp-preset.d.ts.map +1 -0
- package/dist/components/macro/input-preset.d.ts +21 -0
- package/dist/components/macro/input-preset.d.ts.map +1 -0
- package/dist/components/macro/pagination-preset.d.ts +13 -0
- package/dist/components/macro/pagination-preset.d.ts.map +1 -0
- package/dist/components/macro/progress-preset.d.ts +10 -0
- package/dist/components/macro/progress-preset.d.ts.map +1 -0
- package/dist/components/macro/radio-group-preset.d.ts +22 -0
- package/dist/components/macro/radio-group-preset.d.ts.map +1 -0
- package/dist/components/macro/select-preset.d.ts +42 -0
- package/dist/components/macro/select-preset.d.ts.map +1 -0
- package/dist/components/macro/slider-preset.d.ts +12 -0
- package/dist/components/macro/slider-preset.d.ts.map +1 -0
- package/dist/components/macro/switch-preset.d.ts +12 -0
- package/dist/components/macro/switch-preset.d.ts.map +1 -0
- package/dist/components/macro/tabs-preset.d.ts +17 -0
- package/dist/components/macro/tabs-preset.d.ts.map +1 -0
- package/dist/components/macro/textarea-preset.d.ts +17 -0
- package/dist/components/macro/textarea-preset.d.ts.map +1 -0
- package/dist/components/micro/accordion.d.ts +8 -0
- package/dist/components/micro/accordion.d.ts.map +1 -0
- package/dist/components/micro/alert-dialog.d.ts +33 -0
- package/dist/components/micro/alert-dialog.d.ts.map +1 -0
- package/dist/components/micro/alert.d.ts +28 -0
- package/dist/components/micro/alert.d.ts.map +1 -0
- package/dist/components/micro/aspect-ratio.d.ts +13 -0
- package/dist/components/micro/aspect-ratio.d.ts.map +1 -0
- package/dist/components/micro/avatar.d.ts +23 -0
- package/dist/components/micro/avatar.d.ts.map +1 -0
- package/dist/components/micro/badge.d.ts +16 -0
- package/dist/components/micro/badge.d.ts.map +1 -0
- package/dist/components/micro/breadcrumb.d.ts +24 -0
- package/dist/components/micro/breadcrumb.d.ts.map +1 -0
- package/dist/components/micro/button.d.ts +39 -0
- package/dist/components/micro/button.d.ts.map +1 -0
- package/dist/components/micro/calendar.d.ts +28 -0
- package/dist/components/micro/calendar.d.ts.map +1 -0
- package/dist/components/micro/card.d.ts +28 -0
- package/dist/components/micro/card.d.ts.map +1 -0
- package/dist/components/micro/carousel.d.ts +29 -0
- package/dist/components/micro/carousel.d.ts.map +1 -0
- package/dist/components/micro/chart.d.ts +49 -0
- package/dist/components/micro/chart.d.ts.map +1 -0
- package/dist/components/micro/checkbox.d.ts +17 -0
- package/dist/components/micro/checkbox.d.ts.map +1 -0
- package/dist/components/micro/collapsible.d.ts +15 -0
- package/dist/components/micro/collapsible.d.ts.map +1 -0
- package/dist/components/micro/combobox.d.ts +33 -0
- package/dist/components/micro/combobox.d.ts.map +1 -0
- package/dist/components/micro/command.d.ts +79 -0
- package/dist/components/micro/command.d.ts.map +1 -0
- package/dist/components/micro/context-menu.d.ts +60 -0
- package/dist/components/micro/context-menu.d.ts.map +1 -0
- package/dist/components/micro/dialog.d.ts +14 -0
- package/dist/components/micro/dialog.d.ts.map +1 -0
- package/dist/components/micro/direction.d.ts +2 -0
- package/dist/components/micro/direction.d.ts.map +1 -0
- package/dist/components/micro/drawer.d.ts +17 -0
- package/dist/components/micro/drawer.d.ts.map +1 -0
- package/dist/components/micro/dropdown-menu.d.ts +37 -0
- package/dist/components/micro/dropdown-menu.d.ts.map +1 -0
- package/dist/components/micro/empty.d.ts +23 -0
- package/dist/components/micro/empty.d.ts.map +1 -0
- package/dist/components/micro/field.d.ts +29 -0
- package/dist/components/micro/field.d.ts.map +1 -0
- package/dist/components/micro/hover-card.d.ts +17 -0
- package/dist/components/micro/hover-card.d.ts.map +1 -0
- package/dist/components/micro/input-group.d.ts +17 -0
- package/dist/components/micro/input-group.d.ts.map +1 -0
- package/dist/components/micro/input-otp.d.ts +44 -0
- package/dist/components/micro/input-otp.d.ts.map +1 -0
- package/dist/components/micro/input.d.ts +22 -0
- package/dist/components/micro/input.d.ts.map +1 -0
- package/dist/components/micro/item.d.ts +31 -0
- package/dist/components/micro/item.d.ts.map +1 -0
- package/dist/components/micro/kbd.d.ts +9 -0
- package/dist/components/micro/kbd.d.ts.map +1 -0
- package/dist/components/micro/label.d.ts +15 -0
- package/dist/components/micro/label.d.ts.map +1 -0
- package/dist/components/micro/menubar.d.ts +41 -0
- package/dist/components/micro/menubar.d.ts.map +1 -0
- package/dist/components/micro/navigation-menu.d.ts +18 -0
- package/dist/components/micro/navigation-menu.d.ts.map +1 -0
- package/dist/components/micro/pagination.d.ts +33 -0
- package/dist/components/micro/pagination.d.ts.map +1 -0
- package/dist/components/micro/popover.d.ts +23 -0
- package/dist/components/micro/popover.d.ts.map +1 -0
- package/dist/components/micro/progress.d.ts +19 -0
- package/dist/components/micro/progress.d.ts.map +1 -0
- package/dist/components/micro/radio-group.d.ts +13 -0
- package/dist/components/micro/radio-group.d.ts.map +1 -0
- package/dist/components/micro/resizable.d.ts +12 -0
- package/dist/components/micro/resizable.d.ts.map +1 -0
- package/dist/components/micro/scroll-area.d.ts +12 -0
- package/dist/components/micro/scroll-area.d.ts.map +1 -0
- package/dist/components/micro/select.d.ts +21 -0
- package/dist/components/micro/select.d.ts.map +1 -0
- package/dist/components/micro/separator.d.ts +9 -0
- package/dist/components/micro/separator.d.ts.map +1 -0
- package/dist/components/micro/sheet.d.ts +17 -0
- package/dist/components/micro/sheet.d.ts.map +1 -0
- package/dist/components/micro/sidebar.d.ts +28 -0
- package/dist/components/micro/sidebar.d.ts.map +1 -0
- package/dist/components/micro/skeleton.d.ts +9 -0
- package/dist/components/micro/skeleton.d.ts.map +1 -0
- package/dist/components/micro/slider.d.ts +14 -0
- package/dist/components/micro/slider.d.ts.map +1 -0
- package/dist/components/micro/sonner.d.ts +5 -0
- package/dist/components/micro/sonner.d.ts.map +1 -0
- package/dist/components/micro/spinner.d.ts +21 -0
- package/dist/components/micro/spinner.d.ts.map +1 -0
- package/dist/components/micro/switch.d.ts +13 -0
- package/dist/components/micro/switch.d.ts.map +1 -0
- package/dist/components/micro/table.d.ts +17 -0
- package/dist/components/micro/table.d.ts.map +1 -0
- package/dist/components/micro/tabs.d.ts +13 -0
- package/dist/components/micro/tabs.d.ts.map +1 -0
- package/dist/components/micro/textarea.d.ts +17 -0
- package/dist/components/micro/textarea.d.ts.map +1 -0
- package/dist/components/micro/theme-provider.d.ts +76 -0
- package/dist/components/micro/theme-provider.d.ts.map +1 -0
- package/dist/components/micro/toggle-group.d.ts +22 -0
- package/dist/components/micro/toggle-group.d.ts.map +1 -0
- package/dist/components/micro/toggle.d.ts +16 -0
- package/dist/components/micro/toggle.d.ts.map +1 -0
- package/dist/components/micro/tooltip.d.ts +20 -0
- package/dist/components/micro/tooltip.d.ts.map +1 -0
- package/dist/dev/App.d.ts +3 -0
- package/dist/dev/App.d.ts.map +1 -0
- package/dist/dev/components/GladcnLogo.d.ts +10 -0
- package/dist/dev/components/GladcnLogo.d.ts.map +1 -0
- package/dist/dev/components/code-highlighter.d.ts +5 -0
- package/dist/dev/components/code-highlighter.d.ts.map +1 -0
- package/dist/dev/components/dev-context.d.ts +12 -0
- package/dist/dev/components/dev-context.d.ts.map +1 -0
- package/dist/dev/components/showcase.d.ts +72 -0
- package/dist/dev/components/showcase.d.ts.map +1 -0
- package/dist/dev/data.d.ts +68 -0
- package/dist/dev/data.d.ts.map +1 -0
- package/dist/dev/main.d.ts +1 -0
- package/dist/dev/main.d.ts.map +1 -0
- package/dist/dev/sections/buttons.d.ts +2 -0
- package/dist/dev/sections/buttons.d.ts.map +1 -0
- package/dist/dev/sections/display.d.ts +2 -0
- package/dist/dev/sections/display.d.ts.map +1 -0
- package/dist/dev/sections/feedback.d.ts +2 -0
- package/dist/dev/sections/feedback.d.ts.map +1 -0
- package/dist/dev/sections/forms.d.ts +2 -0
- package/dist/dev/sections/forms.d.ts.map +1 -0
- package/dist/dev/sections/interactive.d.ts +2 -0
- package/dist/dev/sections/interactive.d.ts.map +1 -0
- package/dist/dev/sections/overview.d.ts +2 -0
- package/dist/dev/sections/overview.d.ts.map +1 -0
- package/dist/dev/showcase/accordion.d.ts +2 -0
- package/dist/dev/showcase/accordion.d.ts.map +1 -0
- package/dist/dev/showcase/alert-dialog.d.ts +2 -0
- package/dist/dev/showcase/alert-dialog.d.ts.map +1 -0
- package/dist/dev/showcase/alert.d.ts +2 -0
- package/dist/dev/showcase/alert.d.ts.map +1 -0
- package/dist/dev/showcase/aspect-ratio.d.ts +2 -0
- package/dist/dev/showcase/aspect-ratio.d.ts.map +1 -0
- package/dist/dev/showcase/avatar.d.ts +2 -0
- package/dist/dev/showcase/avatar.d.ts.map +1 -0
- package/dist/dev/showcase/badge.d.ts +2 -0
- package/dist/dev/showcase/badge.d.ts.map +1 -0
- package/dist/dev/showcase/breadcrumb.d.ts +2 -0
- package/dist/dev/showcase/breadcrumb.d.ts.map +1 -0
- package/dist/dev/showcase/button.d.ts +2 -0
- package/dist/dev/showcase/button.d.ts.map +1 -0
- package/dist/dev/showcase/calendar.d.ts +2 -0
- package/dist/dev/showcase/calendar.d.ts.map +1 -0
- package/dist/dev/showcase/card.d.ts +2 -0
- package/dist/dev/showcase/card.d.ts.map +1 -0
- package/dist/dev/showcase/carousel.d.ts +2 -0
- package/dist/dev/showcase/carousel.d.ts.map +1 -0
- package/dist/dev/showcase/chart.d.ts +2 -0
- package/dist/dev/showcase/chart.d.ts.map +1 -0
- package/dist/dev/showcase/checkbox.d.ts +2 -0
- package/dist/dev/showcase/checkbox.d.ts.map +1 -0
- package/dist/dev/showcase/collapsible.d.ts +3 -0
- package/dist/dev/showcase/collapsible.d.ts.map +1 -0
- package/dist/dev/showcase/combobox.d.ts +2 -0
- package/dist/dev/showcase/combobox.d.ts.map +1 -0
- package/dist/dev/showcase/command.d.ts +2 -0
- package/dist/dev/showcase/command.d.ts.map +1 -0
- package/dist/dev/showcase/context-menu.d.ts +2 -0
- package/dist/dev/showcase/context-menu.d.ts.map +1 -0
- package/dist/dev/showcase/dialog.d.ts +2 -0
- package/dist/dev/showcase/dialog.d.ts.map +1 -0
- package/dist/dev/showcase/drawer.d.ts +2 -0
- package/dist/dev/showcase/drawer.d.ts.map +1 -0
- package/dist/dev/showcase/dropdown-menu.d.ts +2 -0
- package/dist/dev/showcase/dropdown-menu.d.ts.map +1 -0
- package/dist/dev/showcase/empty.d.ts +2 -0
- package/dist/dev/showcase/empty.d.ts.map +1 -0
- package/dist/dev/showcase/hover-card.d.ts +2 -0
- package/dist/dev/showcase/hover-card.d.ts.map +1 -0
- package/dist/dev/showcase/input-group.d.ts +2 -0
- package/dist/dev/showcase/input-group.d.ts.map +1 -0
- package/dist/dev/showcase/input-otp.d.ts +2 -0
- package/dist/dev/showcase/input-otp.d.ts.map +1 -0
- package/dist/dev/showcase/input.d.ts +2 -0
- package/dist/dev/showcase/input.d.ts.map +1 -0
- package/dist/dev/showcase/item.d.ts +2 -0
- package/dist/dev/showcase/item.d.ts.map +1 -0
- package/dist/dev/showcase/kbd.d.ts +2 -0
- package/dist/dev/showcase/kbd.d.ts.map +1 -0
- package/dist/dev/showcase/label.d.ts +2 -0
- package/dist/dev/showcase/label.d.ts.map +1 -0
- package/dist/dev/showcase/menubar.d.ts +2 -0
- package/dist/dev/showcase/menubar.d.ts.map +1 -0
- package/dist/dev/showcase/navigation-menu.d.ts +3 -0
- package/dist/dev/showcase/navigation-menu.d.ts.map +1 -0
- package/dist/dev/showcase/overview.d.ts +2 -0
- package/dist/dev/showcase/overview.d.ts.map +1 -0
- package/dist/dev/showcase/pagination.d.ts +2 -0
- package/dist/dev/showcase/pagination.d.ts.map +1 -0
- package/dist/dev/showcase/popover.d.ts +2 -0
- package/dist/dev/showcase/popover.d.ts.map +1 -0
- package/dist/dev/showcase/progress.d.ts +2 -0
- package/dist/dev/showcase/progress.d.ts.map +1 -0
- package/dist/dev/showcase/radio-group.d.ts +2 -0
- package/dist/dev/showcase/radio-group.d.ts.map +1 -0
- package/dist/dev/showcase/resizable.d.ts +2 -0
- package/dist/dev/showcase/resizable.d.ts.map +1 -0
- package/dist/dev/showcase/scroll-area.d.ts +2 -0
- package/dist/dev/showcase/scroll-area.d.ts.map +1 -0
- package/dist/dev/showcase/select.d.ts +2 -0
- package/dist/dev/showcase/select.d.ts.map +1 -0
- package/dist/dev/showcase/separator.d.ts +2 -0
- package/dist/dev/showcase/separator.d.ts.map +1 -0
- package/dist/dev/showcase/sheet.d.ts +2 -0
- package/dist/dev/showcase/sheet.d.ts.map +1 -0
- package/dist/dev/showcase/sidebar.d.ts +2 -0
- package/dist/dev/showcase/sidebar.d.ts.map +1 -0
- package/dist/dev/showcase/skeleton.d.ts +2 -0
- package/dist/dev/showcase/skeleton.d.ts.map +1 -0
- package/dist/dev/showcase/slider.d.ts +2 -0
- package/dist/dev/showcase/slider.d.ts.map +1 -0
- package/dist/dev/showcase/sonner.d.ts +2 -0
- package/dist/dev/showcase/sonner.d.ts.map +1 -0
- package/dist/dev/showcase/spinner.d.ts +2 -0
- package/dist/dev/showcase/spinner.d.ts.map +1 -0
- package/dist/dev/showcase/switch.d.ts +2 -0
- package/dist/dev/showcase/switch.d.ts.map +1 -0
- package/dist/dev/showcase/table.d.ts +2 -0
- package/dist/dev/showcase/table.d.ts.map +1 -0
- package/dist/dev/showcase/tabs.d.ts +2 -0
- package/dist/dev/showcase/tabs.d.ts.map +1 -0
- package/dist/dev/showcase/textarea.d.ts +2 -0
- package/dist/dev/showcase/textarea.d.ts.map +1 -0
- package/dist/dev/showcase/theme-provider.d.ts +2 -0
- package/dist/dev/showcase/theme-provider.d.ts.map +1 -0
- package/dist/dev/showcase/toast.d.ts +2 -0
- package/dist/dev/showcase/toast.d.ts.map +1 -0
- package/dist/dev/showcase/toggle-group.d.ts +2 -0
- package/dist/dev/showcase/toggle-group.d.ts.map +1 -0
- package/dist/dev/showcase/toggle.d.ts +2 -0
- package/dist/dev/showcase/toggle.d.ts.map +1 -0
- package/dist/dev/showcase/tooltip.d.ts +2 -0
- package/dist/dev/showcase/tooltip.d.ts.map +1 -0
- package/dist/hooks/use-controllable-state.d.ts +14 -0
- package/dist/hooks/use-controllable-state.d.ts.map +1 -0
- package/dist/hooks/use-mobile.d.ts +2 -0
- package/dist/hooks/use-mobile.d.ts.map +1 -0
- package/dist/index.cjs +5099 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +58 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +4740 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/types.d.ts +4 -0
- package/dist/lib/types.d.ts.map +1 -0
- package/dist/lib/utils.d.ts +3 -0
- package/dist/lib/utils.d.ts.map +1 -0
- package/dist/preset.d.ts +18 -0
- package/dist/preset.d.ts.map +1 -0
- package/dist/test/setup.d.ts +1 -0
- package/dist/test/setup.d.ts.map +1 -0
- package/llms.txt +74 -0
- package/package.json +117 -0
- package/scripts/add-icononly-prop.ts +84 -0
- package/scripts/audit-best-practices.ts +114 -0
- package/scripts/audit-showcase.ts +262 -0
- package/scripts/audit-showcases.ts +83 -0
- package/scripts/clean-imports.ts +21 -0
- package/scripts/count_missing.ts +24 -0
- package/scripts/find-css-vars.ts +62 -0
- package/scripts/fix-portals.ts +90 -0
- package/scripts/full-audit.ts +89 -0
- package/scripts/merge-components.cjs +65 -0
- package/scripts/merge-components.js +64 -0
- package/scripts/optimize-barrel.ts +116 -0
- package/scripts/postinstall.cjs +228 -0
- package/scripts/refactor_divs.ts +39 -0
- package/scripts/remove_div_wrappers.ts +17 -0
- package/scripts/update-gaps.ts +83 -0
- package/scripts/update_showcase_codestrings.ts +87 -0
- package/src/components/macro/accordion-preset.test.tsx +37 -0
- package/src/components/macro/accordion-preset.tsx +41 -0
- package/src/components/macro/alert-dialog-preset.tsx +116 -0
- package/src/components/macro/alert-preset.tsx +94 -0
- package/src/components/macro/avatar-preset.tsx +54 -0
- package/src/components/macro/breadcrumb-preset.tsx +50 -0
- package/src/components/macro/card-preset.tsx +44 -0
- package/src/components/macro/carousel-preset.tsx +150 -0
- package/src/components/macro/checkbox-preset.test.tsx +49 -0
- package/src/components/macro/checkbox-preset.tsx +84 -0
- package/src/components/macro/combobox-preset.tsx +171 -0
- package/src/components/macro/command-preset.tsx +74 -0
- package/src/components/macro/date-picker.tsx +289 -0
- package/src/components/macro/dialog-preset.tsx +105 -0
- package/src/components/macro/empty-preset.tsx +46 -0
- package/src/components/macro/field-preset.test.tsx +69 -0
- package/src/components/macro/field-preset.tsx +65 -0
- package/src/components/macro/index.ts +21 -0
- package/src/components/macro/input-otp-preset.tsx +98 -0
- package/src/components/macro/input-preset.test.tsx +52 -0
- package/src/components/macro/input-preset.tsx +139 -0
- package/src/components/macro/pagination-preset.tsx +153 -0
- package/src/components/macro/progress-preset.test.tsx +65 -0
- package/src/components/macro/progress-preset.tsx +45 -0
- package/src/components/macro/radio-group-preset.tsx +115 -0
- package/src/components/macro/select-preset.tsx +168 -0
- package/src/components/macro/slider-preset.test.tsx +43 -0
- package/src/components/macro/slider-preset.tsx +86 -0
- package/src/components/macro/switch-preset.test.tsx +53 -0
- package/src/components/macro/switch-preset.tsx +70 -0
- package/src/components/macro/tabs-preset.test.tsx +31 -0
- package/src/components/macro/tabs-preset.tsx +51 -0
- package/src/components/macro/textarea-preset.test.tsx +39 -0
- package/src/components/macro/textarea-preset.tsx +55 -0
- package/src/components/micro/accordion.tsx +76 -0
- package/src/components/micro/alert-dialog.tsx +213 -0
- package/src/components/micro/alert.tsx +146 -0
- package/src/components/micro/aspect-ratio.tsx +38 -0
- package/src/components/micro/avatar.tsx +143 -0
- package/src/components/micro/badge.tsx +207 -0
- package/src/components/micro/breadcrumb.tsx +162 -0
- package/src/components/micro/button.test.tsx +25 -0
- package/src/components/micro/button.tsx +361 -0
- package/src/components/micro/calendar.tsx +383 -0
- package/src/components/micro/card.tsx +112 -0
- package/src/components/micro/carousel.tsx +341 -0
- package/src/components/micro/chart.tsx +392 -0
- package/src/components/micro/checkbox.tsx +74 -0
- package/src/components/micro/collapsible.tsx +65 -0
- package/src/components/micro/combobox.tsx +349 -0
- package/src/components/micro/command.tsx +238 -0
- package/src/components/micro/context-menu.tsx +285 -0
- package/src/components/micro/dialog.tsx +143 -0
- package/src/components/micro/direction.tsx +13 -0
- package/src/components/micro/drawer.tsx +149 -0
- package/src/components/micro/dropdown-menu.tsx +305 -0
- package/src/components/micro/empty.tsx +144 -0
- package/src/components/micro/field.tsx +311 -0
- package/src/components/micro/hover-card.tsx +86 -0
- package/src/components/micro/input-group.tsx +269 -0
- package/src/components/micro/input-otp.tsx +130 -0
- package/src/components/micro/input.tsx +56 -0
- package/src/components/micro/item.tsx +206 -0
- package/src/components/micro/kbd.tsx +38 -0
- package/src/components/micro/label.tsx +48 -0
- package/src/components/micro/menubar.tsx +302 -0
- package/src/components/micro/navigation-menu.tsx +197 -0
- package/src/components/micro/pagination.tsx +162 -0
- package/src/components/micro/popover.tsx +131 -0
- package/src/components/micro/progress.tsx +144 -0
- package/src/components/micro/radio-group.tsx +73 -0
- package/src/components/micro/resizable.tsx +64 -0
- package/src/components/micro/scroll-area.tsx +68 -0
- package/src/components/micro/select.tsx +234 -0
- package/src/components/micro/separator.tsx +37 -0
- package/src/components/micro/sheet.tsx +144 -0
- package/src/components/micro/sidebar.tsx +238 -0
- package/src/components/micro/skeleton.tsx +29 -0
- package/src/components/micro/slider.tsx +135 -0
- package/src/components/micro/sonner.tsx +85 -0
- package/src/components/micro/spinner.tsx +44 -0
- package/src/components/micro/switch.tsx +70 -0
- package/src/components/micro/table.tsx +210 -0
- package/src/components/micro/tabs.tsx +100 -0
- package/src/components/micro/textarea.tsx +53 -0
- package/src/components/micro/theme-provider.tsx +163 -0
- package/src/components/micro/toggle-group.tsx +121 -0
- package/src/components/micro/toggle.tsx +55 -0
- package/src/components/micro/tooltip.tsx +105 -0
- package/src/dev/App.tsx +322 -0
- package/src/dev/_debug_select.html +29 -0
- package/src/dev/components/GladcnLogo.tsx +80 -0
- package/src/dev/components/code-highlighter.tsx +67 -0
- package/src/dev/components/dev-context.tsx +31 -0
- package/src/dev/components/showcase.tsx +413 -0
- package/src/dev/data.ts +341 -0
- package/src/dev/index.css +55 -0
- package/src/dev/main.tsx +30 -0
- package/src/dev/sections/buttons.tsx +303 -0
- package/src/dev/sections/display.tsx +270 -0
- package/src/dev/sections/feedback.tsx +371 -0
- package/src/dev/sections/forms.tsx +652 -0
- package/src/dev/sections/interactive.tsx +51 -0
- package/src/dev/sections/overview.tsx +396 -0
- package/src/dev/showcase/accordion.tsx +947 -0
- package/src/dev/showcase/alert-dialog.tsx +1056 -0
- package/src/dev/showcase/alert.tsx +756 -0
- package/src/dev/showcase/aspect-ratio.tsx +339 -0
- package/src/dev/showcase/avatar.tsx +470 -0
- package/src/dev/showcase/badge.tsx +227 -0
- package/src/dev/showcase/breadcrumb.tsx +269 -0
- package/src/dev/showcase/button.tsx +309 -0
- package/src/dev/showcase/calendar.tsx +380 -0
- package/src/dev/showcase/card.tsx +448 -0
- package/src/dev/showcase/carousel.tsx +562 -0
- package/src/dev/showcase/chart.tsx +130 -0
- package/src/dev/showcase/checkbox.tsx +611 -0
- package/src/dev/showcase/collapsible.tsx +298 -0
- package/src/dev/showcase/combobox.tsx +777 -0
- package/src/dev/showcase/command.tsx +245 -0
- package/src/dev/showcase/context-menu.tsx +239 -0
- package/src/dev/showcase/dialog.tsx +1141 -0
- package/src/dev/showcase/drawer.tsx +392 -0
- package/src/dev/showcase/dropdown-menu.tsx +420 -0
- package/src/dev/showcase/empty.tsx +493 -0
- package/src/dev/showcase/hover-card.tsx +336 -0
- package/src/dev/showcase/input-group.tsx +511 -0
- package/src/dev/showcase/input-otp.tsx +404 -0
- package/src/dev/showcase/input.tsx +530 -0
- package/src/dev/showcase/item.tsx +295 -0
- package/src/dev/showcase/kbd.tsx +276 -0
- package/src/dev/showcase/label.tsx +121 -0
- package/src/dev/showcase/menubar.tsx +392 -0
- package/src/dev/showcase/navigation-menu.tsx +304 -0
- package/src/dev/showcase/overview.tsx +1106 -0
- package/src/dev/showcase/pagination.tsx +312 -0
- package/src/dev/showcase/popover.tsx +374 -0
- package/src/dev/showcase/progress.tsx +299 -0
- package/src/dev/showcase/radio-group.tsx +612 -0
- package/src/dev/showcase/resizable.tsx +237 -0
- package/src/dev/showcase/scroll-area.tsx +157 -0
- package/src/dev/showcase/select.tsx +628 -0
- package/src/dev/showcase/separator.tsx +126 -0
- package/src/dev/showcase/sheet.tsx +566 -0
- package/src/dev/showcase/sidebar.tsx +120 -0
- package/src/dev/showcase/skeleton.tsx +213 -0
- package/src/dev/showcase/slider.tsx +506 -0
- package/src/dev/showcase/sonner.tsx +376 -0
- package/src/dev/showcase/spinner.tsx +124 -0
- package/src/dev/showcase/switch.tsx +602 -0
- package/src/dev/showcase/table.tsx +196 -0
- package/src/dev/showcase/tabs.tsx +662 -0
- package/src/dev/showcase/textarea.tsx +498 -0
- package/src/dev/showcase/theme-provider.tsx +894 -0
- package/src/dev/showcase/toast.tsx +119 -0
- package/src/dev/showcase/toggle-group.tsx +223 -0
- package/src/dev/showcase/toggle.tsx +171 -0
- package/src/dev/showcase/tooltip.tsx +372 -0
- package/src/hooks/use-controllable-state.ts +87 -0
- package/src/hooks/use-mobile.ts +21 -0
- package/src/index.ts +62 -0
- package/src/lib/types.ts +14 -0
- package/src/lib/utils.test.ts +14 -0
- package/src/lib/utils.ts +6 -0
- package/src/preset.ts +17 -0
- package/src/styles/gladcn.css +116 -0
- package/src/styles/tokens.css +213 -0
- package/src/test/setup.ts +8 -0
- package/src/vite-env.d.ts +1 -0
|
@@ -0,0 +1,652 @@
|
|
|
1
|
+
import { useState } from "react";
|
|
2
|
+
|
|
3
|
+
import { Alert, AlertDescription } from "../../components/micro/alert";
|
|
4
|
+
import { Calendar } from "../../components/micro/calendar";
|
|
5
|
+
import { Checkbox } from "../../components/micro/checkbox";
|
|
6
|
+
import {
|
|
7
|
+
Combobox,
|
|
8
|
+
ComboboxContent,
|
|
9
|
+
ComboboxInput,
|
|
10
|
+
ComboboxItem,
|
|
11
|
+
ComboboxList,
|
|
12
|
+
} from "../../components/micro/combobox";
|
|
13
|
+
import {
|
|
14
|
+
Field,
|
|
15
|
+
FieldContent,
|
|
16
|
+
FieldDescription,
|
|
17
|
+
FieldError,
|
|
18
|
+
FieldLabel,
|
|
19
|
+
} from "../../components/micro/field";
|
|
20
|
+
import { Input } from "../../components/micro/input";
|
|
21
|
+
import {
|
|
22
|
+
InputGroup,
|
|
23
|
+
InputGroupAddon,
|
|
24
|
+
InputGroupInput,
|
|
25
|
+
InputGroupText,
|
|
26
|
+
} from "../../components/micro/input-group";
|
|
27
|
+
import {
|
|
28
|
+
InputOTP,
|
|
29
|
+
InputOTPGroup,
|
|
30
|
+
InputOTPSlot,
|
|
31
|
+
} from "../../components/micro/input-otp";
|
|
32
|
+
import { Label } from "../../components/micro/label";
|
|
33
|
+
import { SectionHeader } from "../../dev/components/showcase";
|
|
34
|
+
import {
|
|
35
|
+
CalendarIcon,
|
|
36
|
+
LayoutTemplateIcon,
|
|
37
|
+
MousePointerClickIcon,
|
|
38
|
+
ToggleLeftIcon,
|
|
39
|
+
TriangleAlertIcon,
|
|
40
|
+
TypeIcon,
|
|
41
|
+
} from "lucide-react";
|
|
42
|
+
|
|
43
|
+
import { SelectPreset } from "../../components/macro/select-preset";
|
|
44
|
+
import { RadioGroup, RadioGroupItem } from "../../components/micro/radio-group";
|
|
45
|
+
import {
|
|
46
|
+
Select,
|
|
47
|
+
SelectContent,
|
|
48
|
+
SelectGroup,
|
|
49
|
+
SelectItem,
|
|
50
|
+
SelectLabel,
|
|
51
|
+
SelectSeparator,
|
|
52
|
+
SelectTrigger,
|
|
53
|
+
SelectValue,
|
|
54
|
+
} from "../../components/micro/select";
|
|
55
|
+
import { Separator } from "../../components/micro/separator";
|
|
56
|
+
import { Slider } from "../../components/micro/slider";
|
|
57
|
+
import { Switch } from "../../components/micro/switch";
|
|
58
|
+
import { Textarea } from "../../components/micro/textarea";
|
|
59
|
+
import { Size } from "../../lib/types";
|
|
60
|
+
|
|
61
|
+
export default function FormsSection() {
|
|
62
|
+
const [globalSize, setGlobalSize] = useState<Size>("md");
|
|
63
|
+
|
|
64
|
+
return (
|
|
65
|
+
<div className="space-y-6">
|
|
66
|
+
<SectionHeader
|
|
67
|
+
title="Forms"
|
|
68
|
+
description="Input, Select, Checkbox, Slider, Textarea and more"
|
|
69
|
+
>
|
|
70
|
+
<SelectPreset
|
|
71
|
+
value={globalSize}
|
|
72
|
+
onValueChange={(v) => setGlobalSize(v as Size)}
|
|
73
|
+
options={[
|
|
74
|
+
{ value: "sm", label: "Size: sm" },
|
|
75
|
+
{ value: "md", label: "Size: md" },
|
|
76
|
+
{ value: "lg", label: "Size: lg" },
|
|
77
|
+
]}
|
|
78
|
+
/>
|
|
79
|
+
</SectionHeader>
|
|
80
|
+
|
|
81
|
+
{/* Masonry layout */}
|
|
82
|
+
<div className="columns-1 md:columns-2 gap-6 space-y-6 [&>div]:break-inside-avoid">
|
|
83
|
+
{/* 1. TEXT FIELDS */}
|
|
84
|
+
<div className="rounded-2xl border border-border bg-card/40 p-6 shadow-sm transition-all hover:shadow-md flex flex-col gap-5">
|
|
85
|
+
<div className="flex items-center gap-3 mb-2">
|
|
86
|
+
<div className="flex size-10 items-center justify-center rounded-xl bg-primary/10 text-primary">
|
|
87
|
+
<TypeIcon className="size-5" />
|
|
88
|
+
</div>
|
|
89
|
+
<div>
|
|
90
|
+
<h3 className="font-semibold text-base">Text Fields</h3>
|
|
91
|
+
<p className="text-xs text-muted-foreground">
|
|
92
|
+
Standard text input and entry
|
|
93
|
+
</p>
|
|
94
|
+
</div>
|
|
95
|
+
</div>
|
|
96
|
+
|
|
97
|
+
<div className="space-y-4">
|
|
98
|
+
<Field size={globalSize}>
|
|
99
|
+
<FieldLabel htmlFor="tf-input">Default Input</FieldLabel>
|
|
100
|
+
<FieldDescription>
|
|
101
|
+
A standard text input for short strings like names or titles.
|
|
102
|
+
</FieldDescription>
|
|
103
|
+
<FieldContent>
|
|
104
|
+
<Input
|
|
105
|
+
id="tf-input"
|
|
106
|
+
size={globalSize}
|
|
107
|
+
placeholder="Enter value..."
|
|
108
|
+
/>
|
|
109
|
+
</FieldContent>
|
|
110
|
+
</Field>
|
|
111
|
+
|
|
112
|
+
<Separator />
|
|
113
|
+
|
|
114
|
+
<Field size={globalSize}>
|
|
115
|
+
<FieldLabel htmlFor="tf-textarea">Textarea</FieldLabel>
|
|
116
|
+
<FieldDescription>
|
|
117
|
+
Best suited for long-form content, feedback, or biographies.
|
|
118
|
+
</FieldDescription>
|
|
119
|
+
<FieldContent>
|
|
120
|
+
<Textarea
|
|
121
|
+
id="tf-textarea"
|
|
122
|
+
size={globalSize}
|
|
123
|
+
rows={3}
|
|
124
|
+
placeholder="Write something..."
|
|
125
|
+
/>
|
|
126
|
+
</FieldContent>
|
|
127
|
+
</Field>
|
|
128
|
+
|
|
129
|
+
<Separator />
|
|
130
|
+
|
|
131
|
+
<Field size={globalSize}>
|
|
132
|
+
<FieldLabel htmlFor="tf-group">Input Group</FieldLabel>
|
|
133
|
+
<FieldDescription>
|
|
134
|
+
Combine text inputs with addons for things like URLs or prices.
|
|
135
|
+
</FieldDescription>
|
|
136
|
+
<FieldContent>
|
|
137
|
+
<InputGroup size={globalSize}>
|
|
138
|
+
<InputGroupAddon>
|
|
139
|
+
<InputGroupText>https://</InputGroupText>
|
|
140
|
+
</InputGroupAddon>
|
|
141
|
+
<InputGroupInput id="tf-group" placeholder="gladcn.ui" />
|
|
142
|
+
<InputGroupAddon>
|
|
143
|
+
<InputGroupText>.com</InputGroupText>
|
|
144
|
+
</InputGroupAddon>
|
|
145
|
+
</InputGroup>
|
|
146
|
+
</FieldContent>
|
|
147
|
+
</Field>
|
|
148
|
+
|
|
149
|
+
<Separator />
|
|
150
|
+
|
|
151
|
+
<Field size={globalSize}>
|
|
152
|
+
<FieldLabel htmlFor="tf-otp-0">Input OTP</FieldLabel>
|
|
153
|
+
<FieldDescription>
|
|
154
|
+
Enter the 6-digit code sent to your phone number.
|
|
155
|
+
</FieldDescription>
|
|
156
|
+
<FieldContent>
|
|
157
|
+
<InputOTP id="tf-otp-0" size={globalSize} maxLength={6}>
|
|
158
|
+
<InputOTPGroup>
|
|
159
|
+
<InputOTPSlot index={0} />
|
|
160
|
+
<InputOTPSlot index={1} />
|
|
161
|
+
<InputOTPSlot index={2} />
|
|
162
|
+
<InputOTPSlot index={3} />
|
|
163
|
+
<InputOTPSlot index={4} />
|
|
164
|
+
<InputOTPSlot index={5} />
|
|
165
|
+
</InputOTPGroup>
|
|
166
|
+
</InputOTP>
|
|
167
|
+
</FieldContent>
|
|
168
|
+
</Field>
|
|
169
|
+
</div>
|
|
170
|
+
</div>
|
|
171
|
+
|
|
172
|
+
{/* 2. PICKERS & DROPDOWNS */}
|
|
173
|
+
<div className="rounded-2xl border border-border bg-card/40 p-6 shadow-sm transition-all hover:shadow-md flex flex-col gap-5">
|
|
174
|
+
<div className="flex items-center gap-3 mb-2">
|
|
175
|
+
<div className="flex size-10 items-center justify-center rounded-xl bg-success/10 text-success">
|
|
176
|
+
<MousePointerClickIcon className="size-5" />
|
|
177
|
+
</div>
|
|
178
|
+
<div>
|
|
179
|
+
<h3 className="font-semibold text-base">Pickers & Dropdowns</h3>
|
|
180
|
+
<p className="text-xs text-muted-foreground">
|
|
181
|
+
Selection controls and lists
|
|
182
|
+
</p>
|
|
183
|
+
</div>
|
|
184
|
+
</div>
|
|
185
|
+
|
|
186
|
+
<div className="space-y-4">
|
|
187
|
+
<Field size={globalSize}>
|
|
188
|
+
<FieldLabel>Select (Custom)</FieldLabel>
|
|
189
|
+
<FieldContent>
|
|
190
|
+
<Select>
|
|
191
|
+
<SelectTrigger size={globalSize}>
|
|
192
|
+
<SelectValue placeholder="Pick a framework..." />
|
|
193
|
+
</SelectTrigger>
|
|
194
|
+
<SelectContent>
|
|
195
|
+
<SelectItem value="next">Next.js</SelectItem>
|
|
196
|
+
<SelectItem value="vite">Vite</SelectItem>
|
|
197
|
+
<SelectItem value="remix">Remix</SelectItem>
|
|
198
|
+
<SelectItem value="astro">Astro</SelectItem>
|
|
199
|
+
</SelectContent>
|
|
200
|
+
</Select>
|
|
201
|
+
</FieldContent>
|
|
202
|
+
</Field>
|
|
203
|
+
|
|
204
|
+
<Field size={globalSize}>
|
|
205
|
+
<FieldLabel>Select (Grouped)</FieldLabel>
|
|
206
|
+
<FieldDescription>
|
|
207
|
+
Options can be visually grouped with labels.
|
|
208
|
+
</FieldDescription>
|
|
209
|
+
<FieldContent>
|
|
210
|
+
<Select>
|
|
211
|
+
<SelectTrigger size={globalSize}>
|
|
212
|
+
<SelectValue placeholder="Pick a fruit..." />
|
|
213
|
+
</SelectTrigger>
|
|
214
|
+
<SelectContent>
|
|
215
|
+
<SelectGroup>
|
|
216
|
+
<SelectLabel>Citrus</SelectLabel>
|
|
217
|
+
<SelectItem value="orange">Orange</SelectItem>
|
|
218
|
+
<SelectItem value="lemon">Lemon</SelectItem>
|
|
219
|
+
</SelectGroup>
|
|
220
|
+
<SelectSeparator />
|
|
221
|
+
<SelectGroup>
|
|
222
|
+
<SelectLabel>Berry</SelectLabel>
|
|
223
|
+
<SelectItem value="strawberry">Strawberry</SelectItem>
|
|
224
|
+
<SelectItem value="blueberry">Blueberry</SelectItem>
|
|
225
|
+
</SelectGroup>
|
|
226
|
+
</SelectContent>
|
|
227
|
+
</Select>
|
|
228
|
+
</FieldContent>
|
|
229
|
+
</Field>
|
|
230
|
+
|
|
231
|
+
<Field size={globalSize}>
|
|
232
|
+
<FieldLabel>SelectPreset</FieldLabel>
|
|
233
|
+
<FieldContent>
|
|
234
|
+
<SelectPreset
|
|
235
|
+
size={globalSize}
|
|
236
|
+
placeholder="Flat list..."
|
|
237
|
+
options={[
|
|
238
|
+
{ value: "1", label: "Option 1" },
|
|
239
|
+
{ value: "2", label: "Option 2" },
|
|
240
|
+
]}
|
|
241
|
+
/>
|
|
242
|
+
</FieldContent>
|
|
243
|
+
</Field>
|
|
244
|
+
|
|
245
|
+
<Field size={globalSize}>
|
|
246
|
+
<FieldLabel htmlFor="id1">Native Select</FieldLabel>
|
|
247
|
+
<FieldDescription>
|
|
248
|
+
Uses the browser's built-in dropdown menu. Great for mobile.
|
|
249
|
+
</FieldDescription>
|
|
250
|
+
<FieldContent>
|
|
251
|
+
<Select
|
|
252
|
+
defaultValue="mac"
|
|
253
|
+
items={{ mac: "macOS", win: "Windows", linux: "Linux" }}
|
|
254
|
+
>
|
|
255
|
+
<SelectTrigger id="id1" size={globalSize}>
|
|
256
|
+
<SelectValue />
|
|
257
|
+
</SelectTrigger>
|
|
258
|
+
<SelectContent>
|
|
259
|
+
<SelectGroup>
|
|
260
|
+
<SelectItem value="mac">macOS</SelectItem>
|
|
261
|
+
<SelectItem value="win">Windows</SelectItem>
|
|
262
|
+
<SelectItem value="linux">Linux</SelectItem>
|
|
263
|
+
</SelectGroup>
|
|
264
|
+
</SelectContent>
|
|
265
|
+
</Select>
|
|
266
|
+
</FieldContent>
|
|
267
|
+
</Field>
|
|
268
|
+
|
|
269
|
+
<Separator />
|
|
270
|
+
|
|
271
|
+
<Field size={globalSize}>
|
|
272
|
+
<FieldLabel>Combobox</FieldLabel>
|
|
273
|
+
<FieldDescription>
|
|
274
|
+
A select input that allows searching through large datasets.
|
|
275
|
+
</FieldDescription>
|
|
276
|
+
<FieldContent>
|
|
277
|
+
<Combobox>
|
|
278
|
+
<ComboboxInput placeholder="Search framework..." />
|
|
279
|
+
<ComboboxContent>
|
|
280
|
+
<ComboboxList>
|
|
281
|
+
<ComboboxItem value="react">React</ComboboxItem>
|
|
282
|
+
<ComboboxItem value="vue">Vue</ComboboxItem>
|
|
283
|
+
<ComboboxItem value="svelte">Svelte</ComboboxItem>
|
|
284
|
+
</ComboboxList>
|
|
285
|
+
</ComboboxContent>
|
|
286
|
+
</Combobox>
|
|
287
|
+
</FieldContent>
|
|
288
|
+
</Field>
|
|
289
|
+
</div>
|
|
290
|
+
</div>
|
|
291
|
+
|
|
292
|
+
{/* 3. TOGGLES & SELECTORS */}
|
|
293
|
+
<div className="rounded-2xl border border-border bg-card/40 p-6 shadow-sm transition-all hover:shadow-md flex flex-col gap-5">
|
|
294
|
+
<div className="flex items-center gap-3 mb-2">
|
|
295
|
+
<div className="flex size-10 items-center justify-center rounded-xl bg-info/10 text-info">
|
|
296
|
+
<ToggleLeftIcon className="size-5" />
|
|
297
|
+
</div>
|
|
298
|
+
<div>
|
|
299
|
+
<h3 className="font-semibold text-base">Toggles & Selectors</h3>
|
|
300
|
+
<p className="text-xs text-muted-foreground">
|
|
301
|
+
Switches, radios, and sliders
|
|
302
|
+
</p>
|
|
303
|
+
</div>
|
|
304
|
+
</div>
|
|
305
|
+
|
|
306
|
+
<div className="space-y-5">
|
|
307
|
+
<div className="space-y-2">
|
|
308
|
+
<Label
|
|
309
|
+
size={globalSize}
|
|
310
|
+
className="mb-2 block text-muted-foreground"
|
|
311
|
+
>
|
|
312
|
+
Checkboxes
|
|
313
|
+
</Label>
|
|
314
|
+
<div className="space-y-3">
|
|
315
|
+
{["TypeScript", "ESLint", "Tailwind CSS"].map((item) => (
|
|
316
|
+
<Field orientation="horizontal" size={globalSize} key={item}>
|
|
317
|
+
<Checkbox
|
|
318
|
+
size={globalSize}
|
|
319
|
+
id={`check-${item}`}
|
|
320
|
+
defaultChecked={item === "TypeScript"}
|
|
321
|
+
/>
|
|
322
|
+
<FieldLabel htmlFor={`check-${item}`}>{item}</FieldLabel>
|
|
323
|
+
</Field>
|
|
324
|
+
))}
|
|
325
|
+
</div>
|
|
326
|
+
</div>
|
|
327
|
+
|
|
328
|
+
<Separator />
|
|
329
|
+
|
|
330
|
+
<div className="space-y-2">
|
|
331
|
+
<Label
|
|
332
|
+
size={globalSize}
|
|
333
|
+
className="mb-2 block text-muted-foreground"
|
|
334
|
+
>
|
|
335
|
+
Radio Group
|
|
336
|
+
</Label>
|
|
337
|
+
<RadioGroup defaultValue="comfortable" className="space-y-1">
|
|
338
|
+
<Field orientation="horizontal" size={globalSize}>
|
|
339
|
+
<RadioGroupItem size={globalSize} value="default" id="r1" />
|
|
340
|
+
<FieldLabel htmlFor="r1">Default</FieldLabel>
|
|
341
|
+
</Field>
|
|
342
|
+
<Field orientation="horizontal" size={globalSize}>
|
|
343
|
+
<RadioGroupItem
|
|
344
|
+
size={globalSize}
|
|
345
|
+
value="comfortable"
|
|
346
|
+
id="r2"
|
|
347
|
+
/>
|
|
348
|
+
<FieldLabel htmlFor="r2">Comfortable</FieldLabel>
|
|
349
|
+
</Field>
|
|
350
|
+
<Field orientation="horizontal" size={globalSize}>
|
|
351
|
+
<RadioGroupItem size={globalSize} value="compact" id="r3" />
|
|
352
|
+
<FieldLabel htmlFor="r3">Compact</FieldLabel>
|
|
353
|
+
</Field>
|
|
354
|
+
</RadioGroup>
|
|
355
|
+
</div>
|
|
356
|
+
|
|
357
|
+
<Separator />
|
|
358
|
+
|
|
359
|
+
<div className="space-y-3">
|
|
360
|
+
<Label
|
|
361
|
+
size={globalSize}
|
|
362
|
+
className="mb-2 block text-muted-foreground"
|
|
363
|
+
>
|
|
364
|
+
Switches
|
|
365
|
+
</Label>
|
|
366
|
+
<div className="space-y-4">
|
|
367
|
+
{["Notifications", "Dark Mode", "Auto-save"].map((item, i) => (
|
|
368
|
+
<Field
|
|
369
|
+
orientation="horizontal"
|
|
370
|
+
size={globalSize}
|
|
371
|
+
key={item}
|
|
372
|
+
className="justify-between"
|
|
373
|
+
>
|
|
374
|
+
<FieldLabel htmlFor={`switch-${item}`}>{item}</FieldLabel>
|
|
375
|
+
<Switch
|
|
376
|
+
id={`switch-${item}`}
|
|
377
|
+
size={globalSize}
|
|
378
|
+
defaultChecked={i === 0}
|
|
379
|
+
/>
|
|
380
|
+
</Field>
|
|
381
|
+
))}
|
|
382
|
+
</div>
|
|
383
|
+
</div>
|
|
384
|
+
|
|
385
|
+
<Separator />
|
|
386
|
+
|
|
387
|
+
<div className="space-y-4">
|
|
388
|
+
<Field size={globalSize}>
|
|
389
|
+
<FieldLabel>Slider (Volume)</FieldLabel>
|
|
390
|
+
<FieldContent>
|
|
391
|
+
<Slider
|
|
392
|
+
size={globalSize}
|
|
393
|
+
defaultValue={[60]}
|
|
394
|
+
max={100}
|
|
395
|
+
step={1}
|
|
396
|
+
/>
|
|
397
|
+
</FieldContent>
|
|
398
|
+
<FieldDescription>
|
|
399
|
+
Adjust the media volume globally.
|
|
400
|
+
</FieldDescription>
|
|
401
|
+
</Field>
|
|
402
|
+
<Field size={globalSize}>
|
|
403
|
+
<FieldLabel>Slider (Range)</FieldLabel>
|
|
404
|
+
<FieldContent>
|
|
405
|
+
<Slider
|
|
406
|
+
size={globalSize}
|
|
407
|
+
defaultValue={[20, 80]}
|
|
408
|
+
max={100}
|
|
409
|
+
step={1}
|
|
410
|
+
/>
|
|
411
|
+
</FieldContent>
|
|
412
|
+
</Field>
|
|
413
|
+
</div>
|
|
414
|
+
</div>
|
|
415
|
+
</div>
|
|
416
|
+
|
|
417
|
+
{/* 4. FORM LAYOUT */}
|
|
418
|
+
<div className="rounded-2xl border border-border bg-card/40 p-6 shadow-sm transition-all hover:shadow-md flex flex-col gap-5">
|
|
419
|
+
<div className="flex items-center gap-3 mb-2">
|
|
420
|
+
<div className="flex size-10 items-center justify-center rounded-xl bg-secondary/30 text-secondary-foreground">
|
|
421
|
+
<LayoutTemplateIcon className="size-5" />
|
|
422
|
+
</div>
|
|
423
|
+
<div>
|
|
424
|
+
<h3 className="font-semibold text-base">Form Field Layout</h3>
|
|
425
|
+
<p className="text-xs text-muted-foreground">
|
|
426
|
+
Composition & structure
|
|
427
|
+
</p>
|
|
428
|
+
</div>
|
|
429
|
+
</div>
|
|
430
|
+
<Field size={globalSize}>
|
|
431
|
+
<FieldLabel htmlFor="layout-email">Email address</FieldLabel>
|
|
432
|
+
<FieldDescription>
|
|
433
|
+
We will not share your email with anyone.
|
|
434
|
+
</FieldDescription>
|
|
435
|
+
<FieldContent>
|
|
436
|
+
<Input
|
|
437
|
+
id="layout-email"
|
|
438
|
+
size={globalSize}
|
|
439
|
+
type="email"
|
|
440
|
+
placeholder="you@example.com"
|
|
441
|
+
/>
|
|
442
|
+
</FieldContent>
|
|
443
|
+
<FieldError
|
|
444
|
+
errors={[{ message: "Please enter a valid email address." }]}
|
|
445
|
+
/>
|
|
446
|
+
</Field>
|
|
447
|
+
</div>
|
|
448
|
+
|
|
449
|
+
{/* 4.5 CALENDAR */}
|
|
450
|
+
<div className="rounded-2xl border border-border bg-card/40 p-6 shadow-sm transition-all hover:shadow-md flex flex-col gap-5">
|
|
451
|
+
<div className="flex items-center gap-3 mb-2">
|
|
452
|
+
<div className="flex size-10 items-center justify-center rounded-xl bg-tertiary/10 text-tertiary">
|
|
453
|
+
<CalendarIcon className="size-5" />
|
|
454
|
+
</div>
|
|
455
|
+
<div>
|
|
456
|
+
<h3 className="font-semibold text-base">Calendar</h3>
|
|
457
|
+
<p className="text-xs text-muted-foreground">
|
|
458
|
+
Date picker component
|
|
459
|
+
</p>
|
|
460
|
+
</div>
|
|
461
|
+
</div>
|
|
462
|
+
<div className="flex justify-center rounded-xl border border-border p-2 bg-card">
|
|
463
|
+
<Calendar
|
|
464
|
+
size={globalSize}
|
|
465
|
+
mode="single"
|
|
466
|
+
captionLayout="dropdown"
|
|
467
|
+
startMonth={new Date(1990, 0)}
|
|
468
|
+
endMonth={new Date(2050, 11)}
|
|
469
|
+
/>
|
|
470
|
+
</div>
|
|
471
|
+
</div>
|
|
472
|
+
|
|
473
|
+
{/* 5. VALIDATION UX */}
|
|
474
|
+
<div className="rounded-2xl border border-border bg-card/40 p-6 shadow-sm transition-all hover:shadow-md flex flex-col gap-5">
|
|
475
|
+
<div className="flex items-center gap-3 mb-2">
|
|
476
|
+
<div className="flex size-10 items-center justify-center rounded-xl bg-destructive/10 text-destructive">
|
|
477
|
+
<TriangleAlertIcon className="size-5" />
|
|
478
|
+
</div>
|
|
479
|
+
<div>
|
|
480
|
+
<h3 className="font-semibold text-base">Validation UX</h3>
|
|
481
|
+
<p className="text-xs text-muted-foreground">
|
|
482
|
+
Error states and feedback
|
|
483
|
+
</p>
|
|
484
|
+
</div>
|
|
485
|
+
</div>
|
|
486
|
+
|
|
487
|
+
<div className="space-y-5">
|
|
488
|
+
<Alert color="destructive" className="py-2.5">
|
|
489
|
+
<AlertDescription className="text-xs">
|
|
490
|
+
<strong>New Parity UX:</strong> Error states only show a red
|
|
491
|
+
ring when the user focuses/tabs into the field. Otherwise, they
|
|
492
|
+
just show a red border. Try clicking them below!
|
|
493
|
+
</AlertDescription>
|
|
494
|
+
</Alert>
|
|
495
|
+
|
|
496
|
+
<div className="space-y-6">
|
|
497
|
+
<Field size={globalSize}>
|
|
498
|
+
<FieldLabel htmlFor="err-input-username">Username</FieldLabel>
|
|
499
|
+
<FieldDescription>
|
|
500
|
+
Choose a unique identifier for your profile.
|
|
501
|
+
</FieldDescription>
|
|
502
|
+
<FieldContent>
|
|
503
|
+
<Input
|
|
504
|
+
id="err-input-username"
|
|
505
|
+
size={globalSize}
|
|
506
|
+
aria-invalid
|
|
507
|
+
placeholder="e.g. john_doe"
|
|
508
|
+
/>
|
|
509
|
+
</FieldContent>
|
|
510
|
+
<FieldError
|
|
511
|
+
errors={[
|
|
512
|
+
{ message: "Username is already taken by another user." },
|
|
513
|
+
]}
|
|
514
|
+
/>
|
|
515
|
+
</Field>
|
|
516
|
+
|
|
517
|
+
<Field size={globalSize}>
|
|
518
|
+
<FieldLabel htmlFor="err-group">Social Handle</FieldLabel>
|
|
519
|
+
<FieldContent>
|
|
520
|
+
<InputGroup size={globalSize}>
|
|
521
|
+
<InputGroupAddon>
|
|
522
|
+
<InputGroupText>@</InputGroupText>
|
|
523
|
+
</InputGroupAddon>
|
|
524
|
+
<InputGroupInput
|
|
525
|
+
id="err-group"
|
|
526
|
+
aria-invalid
|
|
527
|
+
placeholder="username"
|
|
528
|
+
/>
|
|
529
|
+
</InputGroup>
|
|
530
|
+
</FieldContent>
|
|
531
|
+
<FieldError
|
|
532
|
+
errors={[{ message: "Invalid characters in handle." }]}
|
|
533
|
+
/>
|
|
534
|
+
</Field>
|
|
535
|
+
|
|
536
|
+
<Field size={globalSize}>
|
|
537
|
+
<FieldLabel>Subscription Plan</FieldLabel>
|
|
538
|
+
<FieldContent>
|
|
539
|
+
<Select>
|
|
540
|
+
<SelectTrigger size={globalSize} aria-invalid>
|
|
541
|
+
<SelectValue placeholder="Invalid selection..." />
|
|
542
|
+
</SelectTrigger>
|
|
543
|
+
<SelectContent>
|
|
544
|
+
<SelectItem value="1">Pro Plan</SelectItem>
|
|
545
|
+
</SelectContent>
|
|
546
|
+
</Select>
|
|
547
|
+
</FieldContent>
|
|
548
|
+
<FieldError
|
|
549
|
+
errors={[
|
|
550
|
+
{
|
|
551
|
+
message:
|
|
552
|
+
"This plan requires a valid credit card on file.",
|
|
553
|
+
},
|
|
554
|
+
]}
|
|
555
|
+
/>
|
|
556
|
+
</Field>
|
|
557
|
+
|
|
558
|
+
<Field size={globalSize}>
|
|
559
|
+
<FieldLabel htmlFor="err-native">Country</FieldLabel>
|
|
560
|
+
<FieldContent>
|
|
561
|
+
<Select disabled items={{}}>
|
|
562
|
+
<SelectTrigger
|
|
563
|
+
id="err-native"
|
|
564
|
+
size={globalSize}
|
|
565
|
+
aria-invalid
|
|
566
|
+
>
|
|
567
|
+
<SelectValue placeholder="Select option..." />
|
|
568
|
+
</SelectTrigger>
|
|
569
|
+
<SelectContent></SelectContent>
|
|
570
|
+
</Select>
|
|
571
|
+
</FieldContent>
|
|
572
|
+
<FieldError
|
|
573
|
+
errors={[
|
|
574
|
+
{
|
|
575
|
+
message:
|
|
576
|
+
"Service is not available in the selected region.",
|
|
577
|
+
},
|
|
578
|
+
]}
|
|
579
|
+
/>
|
|
580
|
+
</Field>
|
|
581
|
+
|
|
582
|
+
<Field size={globalSize}>
|
|
583
|
+
<FieldLabel htmlFor="err-otp">Authentication Code</FieldLabel>
|
|
584
|
+
<FieldContent>
|
|
585
|
+
<InputOTP id="err-otp" size={globalSize} maxLength={3}>
|
|
586
|
+
<InputOTPGroup>
|
|
587
|
+
<InputOTPSlot aria-invalid index={0} />
|
|
588
|
+
<InputOTPSlot aria-invalid index={1} />
|
|
589
|
+
<InputOTPSlot aria-invalid index={2} />
|
|
590
|
+
</InputOTPGroup>
|
|
591
|
+
</InputOTP>
|
|
592
|
+
</FieldContent>
|
|
593
|
+
<FieldError
|
|
594
|
+
errors={[{ message: "The code you entered has expired." }]}
|
|
595
|
+
/>
|
|
596
|
+
</Field>
|
|
597
|
+
|
|
598
|
+
<div className="flex flex-col gap-4 pt-3">
|
|
599
|
+
<Field orientation="horizontal" size={globalSize}>
|
|
600
|
+
<Checkbox size={globalSize} aria-invalid id="err-check2" />
|
|
601
|
+
<FieldContent>
|
|
602
|
+
<FieldLabel htmlFor="err-check2">
|
|
603
|
+
Accept Terms & Conditions
|
|
604
|
+
</FieldLabel>
|
|
605
|
+
<FieldError
|
|
606
|
+
errors={[
|
|
607
|
+
{ message: "You must accept the terms to proceed." },
|
|
608
|
+
]}
|
|
609
|
+
/>
|
|
610
|
+
</FieldContent>
|
|
611
|
+
</Field>
|
|
612
|
+
|
|
613
|
+
<RadioGroup defaultValue="">
|
|
614
|
+
<Field orientation="horizontal" size={globalSize}>
|
|
615
|
+
<RadioGroupItem
|
|
616
|
+
size={globalSize}
|
|
617
|
+
aria-invalid
|
|
618
|
+
value="1"
|
|
619
|
+
id="err-radio2"
|
|
620
|
+
/>
|
|
621
|
+
<FieldContent>
|
|
622
|
+
<FieldLabel htmlFor="err-radio2">
|
|
623
|
+
Agree to Marketing Emails
|
|
624
|
+
</FieldLabel>
|
|
625
|
+
<FieldError
|
|
626
|
+
errors={[{ message: "Please make a valid selection." }]}
|
|
627
|
+
/>
|
|
628
|
+
</FieldContent>
|
|
629
|
+
</Field>
|
|
630
|
+
</RadioGroup>
|
|
631
|
+
|
|
632
|
+
<Field orientation="horizontal" size={globalSize}>
|
|
633
|
+
<Switch size={globalSize} aria-invalid id="err-switch2" />
|
|
634
|
+
<FieldContent>
|
|
635
|
+
<FieldLabel htmlFor="err-switch2">Enable 2FA</FieldLabel>
|
|
636
|
+
<FieldError
|
|
637
|
+
errors={[
|
|
638
|
+
{
|
|
639
|
+
message: "You cannot disable 2FA for admin accounts.",
|
|
640
|
+
},
|
|
641
|
+
]}
|
|
642
|
+
/>
|
|
643
|
+
</FieldContent>
|
|
644
|
+
</Field>
|
|
645
|
+
</div>
|
|
646
|
+
</div>
|
|
647
|
+
</div>
|
|
648
|
+
</div>
|
|
649
|
+
</div>
|
|
650
|
+
</div>
|
|
651
|
+
);
|
|
652
|
+
}
|