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,303 @@
|
|
|
1
|
+
import { SelectPreset } from "../../components/macro/select-preset";
|
|
2
|
+
import { Avatar, AvatarFallback } from "../../components/micro/avatar";
|
|
3
|
+
import { Button } from "../../components/micro/button";
|
|
4
|
+
import { Spinner } from "../../components/micro/spinner";
|
|
5
|
+
import {
|
|
6
|
+
Tooltip,
|
|
7
|
+
TooltipContent,
|
|
8
|
+
TooltipProvider,
|
|
9
|
+
TooltipTrigger,
|
|
10
|
+
} from "../../components/micro/tooltip";
|
|
11
|
+
import { SectionHeader } from "../../dev/components/showcase";
|
|
12
|
+
import { Size } from "../../lib/types";
|
|
13
|
+
import {
|
|
14
|
+
BoxIcon,
|
|
15
|
+
CheckCircle2Icon,
|
|
16
|
+
LayersIcon,
|
|
17
|
+
PlusIcon,
|
|
18
|
+
SendIcon,
|
|
19
|
+
SettingsIcon,
|
|
20
|
+
ShieldAlertIcon,
|
|
21
|
+
Trash2Icon,
|
|
22
|
+
UserIcon,
|
|
23
|
+
} from "lucide-react";
|
|
24
|
+
import { useState } from "react";
|
|
25
|
+
|
|
26
|
+
export default function ButtonsSection() {
|
|
27
|
+
const [globalSize, setGlobalSize] = useState<Size>("md");
|
|
28
|
+
const [isDeleting, setIsDeleting] = useState(false);
|
|
29
|
+
const [isSending, setIsSending] = useState(false);
|
|
30
|
+
|
|
31
|
+
const handleSend = () => {
|
|
32
|
+
setIsSending(true);
|
|
33
|
+
setTimeout(() => setIsSending(false), 1500);
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
const handleDelete = () => {
|
|
37
|
+
setIsDeleting(true);
|
|
38
|
+
setTimeout(() => setIsDeleting(false), 1500);
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
return (
|
|
42
|
+
<div className="space-y-6">
|
|
43
|
+
<SectionHeader
|
|
44
|
+
title="Buttons"
|
|
45
|
+
description="Comprehensive collection of interactive elements with full state management and accessibility."
|
|
46
|
+
>
|
|
47
|
+
<SelectPreset
|
|
48
|
+
value={globalSize}
|
|
49
|
+
onValueChange={(v) => setGlobalSize(v as Size)}
|
|
50
|
+
options={[
|
|
51
|
+
{ value: "sm", label: "Size: sm" },
|
|
52
|
+
{ value: "md", label: "Size: md" },
|
|
53
|
+
{ value: "lg", label: "Size: lg" },
|
|
54
|
+
]}
|
|
55
|
+
/>
|
|
56
|
+
</SectionHeader>
|
|
57
|
+
|
|
58
|
+
{/* Real-world Contexts Grid */}
|
|
59
|
+
<div className="grid grid-cols-1 md:grid-cols-3 gap-4 md:gap-6">
|
|
60
|
+
{/* Context 1: Danger Zone */}
|
|
61
|
+
<div className="rounded-2xl border border-border bg-card/40 p-6 shadow-sm transition-all hover:shadow-md">
|
|
62
|
+
<div className="flex items-center gap-3 mb-4">
|
|
63
|
+
<div className="flex size-10 items-center justify-center rounded-xl bg-destructive/10 text-destructive">
|
|
64
|
+
<ShieldAlertIcon className="size-5" />
|
|
65
|
+
</div>
|
|
66
|
+
<div>
|
|
67
|
+
<h3 className="font-semibold">Danger Zone</h3>
|
|
68
|
+
<p className="text-xs text-muted-foreground">
|
|
69
|
+
Destructive actions
|
|
70
|
+
</p>
|
|
71
|
+
</div>
|
|
72
|
+
</div>
|
|
73
|
+
<div className="rounded-xl border border-destructive/20 bg-destructive/5 p-4 flex flex-col gap-3">
|
|
74
|
+
<p className="text-sm font-medium">Delete Workspace</p>
|
|
75
|
+
<p className="text-xs text-muted-foreground">
|
|
76
|
+
This action cannot be undone. All data will be lost.
|
|
77
|
+
</p>
|
|
78
|
+
<div className="mt-2">
|
|
79
|
+
<TooltipProvider>
|
|
80
|
+
<Tooltip>
|
|
81
|
+
<TooltipTrigger
|
|
82
|
+
render={
|
|
83
|
+
<Button
|
|
84
|
+
size={globalSize}
|
|
85
|
+
color="destructive"
|
|
86
|
+
className="w-full"
|
|
87
|
+
disabled={isDeleting}
|
|
88
|
+
onClick={handleDelete}
|
|
89
|
+
>
|
|
90
|
+
{isDeleting && <Spinner />}
|
|
91
|
+
{!isDeleting && <Trash2Icon />}
|
|
92
|
+
{isDeleting && "Deleting..."}
|
|
93
|
+
{!isDeleting && "Delete Permanently"}
|
|
94
|
+
</Button>
|
|
95
|
+
}
|
|
96
|
+
/>
|
|
97
|
+
<TooltipContent>Irreversible action!</TooltipContent>
|
|
98
|
+
</Tooltip>
|
|
99
|
+
</TooltipProvider>
|
|
100
|
+
</div>
|
|
101
|
+
</div>
|
|
102
|
+
</div>
|
|
103
|
+
|
|
104
|
+
{/* Context 2: Form Actions */}
|
|
105
|
+
<div className="rounded-2xl border border-border bg-card/40 p-6 shadow-sm transition-all hover:shadow-md">
|
|
106
|
+
<div className="flex items-center gap-3 mb-4">
|
|
107
|
+
<div className="flex size-10 items-center justify-center rounded-xl bg-primary/10 text-primary">
|
|
108
|
+
<SendIcon className="size-5" />
|
|
109
|
+
</div>
|
|
110
|
+
<div>
|
|
111
|
+
<h3 className="font-semibold">Form Actions</h3>
|
|
112
|
+
<p className="text-xs text-muted-foreground">Primary workflows</p>
|
|
113
|
+
</div>
|
|
114
|
+
</div>
|
|
115
|
+
<div className="rounded-xl border border-border bg-card p-4 shadow-sm flex flex-col gap-4">
|
|
116
|
+
<div className="flex items-center gap-3">
|
|
117
|
+
<Avatar className="size-8">
|
|
118
|
+
<AvatarFallback className="bg-primary/10 text-primary">
|
|
119
|
+
<UserIcon className="size-4" />
|
|
120
|
+
</AvatarFallback>
|
|
121
|
+
</Avatar>
|
|
122
|
+
<div className="flex-1">
|
|
123
|
+
<div className="h-2 w-20 rounded-full bg-muted-foreground/20 mb-1" />
|
|
124
|
+
<div className="h-2 w-32 rounded-full bg-muted-foreground/10" />
|
|
125
|
+
</div>
|
|
126
|
+
</div>
|
|
127
|
+
<div className="flex items-center justify-between mt-2">
|
|
128
|
+
<Button
|
|
129
|
+
size={globalSize}
|
|
130
|
+
variant="ghost"
|
|
131
|
+
color="secondary"
|
|
132
|
+
className="px-2"
|
|
133
|
+
iconOnly
|
|
134
|
+
>
|
|
135
|
+
<SettingsIcon className="size-4" />
|
|
136
|
+
</Button>
|
|
137
|
+
<Button
|
|
138
|
+
size={globalSize}
|
|
139
|
+
color="primary"
|
|
140
|
+
disabled={isSending}
|
|
141
|
+
onClick={handleSend}
|
|
142
|
+
>
|
|
143
|
+
{isSending && <Spinner />}
|
|
144
|
+
{!isSending && <CheckCircle2Icon />}
|
|
145
|
+
{isSending && "Saving"}
|
|
146
|
+
{!isSending && "Save Changes"}
|
|
147
|
+
</Button>
|
|
148
|
+
</div>
|
|
149
|
+
</div>
|
|
150
|
+
</div>
|
|
151
|
+
|
|
152
|
+
{/* Context 3: Quick Actions */}
|
|
153
|
+
<div className="rounded-2xl border border-border bg-card/40 p-6 shadow-sm transition-all hover:shadow-md">
|
|
154
|
+
<div className="flex items-center gap-3 mb-4">
|
|
155
|
+
<div className="flex size-10 items-center justify-center rounded-xl bg-info/10 text-info">
|
|
156
|
+
<LayersIcon className="size-5" />
|
|
157
|
+
</div>
|
|
158
|
+
<div>
|
|
159
|
+
<h3 className="font-semibold">Quick Actions</h3>
|
|
160
|
+
<p className="text-xs text-muted-foreground">Icon-only buttons</p>
|
|
161
|
+
</div>
|
|
162
|
+
</div>
|
|
163
|
+
<div className="flex items-center gap-4 justify-center p-6 border border-border rounded-xl bg-card shadow-sm mt-4">
|
|
164
|
+
<Button size={globalSize} variant="soft" color="primary" iconOnly>
|
|
165
|
+
<PlusIcon />
|
|
166
|
+
</Button>
|
|
167
|
+
<Button size={globalSize} variant="soft" color="secondary" iconOnly>
|
|
168
|
+
<SettingsIcon />
|
|
169
|
+
</Button>
|
|
170
|
+
<Button
|
|
171
|
+
size={globalSize}
|
|
172
|
+
variant="soft"
|
|
173
|
+
color="destructive"
|
|
174
|
+
iconOnly
|
|
175
|
+
>
|
|
176
|
+
<Trash2Icon />
|
|
177
|
+
</Button>
|
|
178
|
+
</div>
|
|
179
|
+
</div>
|
|
180
|
+
</div>
|
|
181
|
+
|
|
182
|
+
{/* The Matrix (Variants x Colors) */}
|
|
183
|
+
<div className="rounded-2xl border border-border bg-card/40 overflow-hidden shadow-sm">
|
|
184
|
+
<div className="border-b border-b-border bg-muted/30 px-6 py-4">
|
|
185
|
+
<h3 className="font-semibold text-lg flex items-center gap-2">
|
|
186
|
+
<BoxIcon className="size-5 text-primary" />
|
|
187
|
+
The Button Matrix
|
|
188
|
+
</h3>
|
|
189
|
+
<p className="text-sm text-muted-foreground mt-1">
|
|
190
|
+
Comprehensive reference of all variants and semantic colors.
|
|
191
|
+
</p>
|
|
192
|
+
</div>
|
|
193
|
+
<div className="p-6 overflow-x-auto">
|
|
194
|
+
<table className="w-full min-w-[600px] text-left border-collapse">
|
|
195
|
+
<thead>
|
|
196
|
+
<tr>
|
|
197
|
+
<th className="pb-4 font-medium text-muted-foreground text-sm">
|
|
198
|
+
Variant
|
|
199
|
+
</th>
|
|
200
|
+
<th className="pb-4 font-medium text-muted-foreground text-sm">
|
|
201
|
+
Primary
|
|
202
|
+
</th>
|
|
203
|
+
<th className="pb-4 font-medium text-muted-foreground text-sm">
|
|
204
|
+
Secondary
|
|
205
|
+
</th>
|
|
206
|
+
<th className="pb-4 font-medium text-muted-foreground text-sm">
|
|
207
|
+
Destructive
|
|
208
|
+
</th>
|
|
209
|
+
<th className="pb-4 font-medium text-muted-foreground text-sm">
|
|
210
|
+
Success
|
|
211
|
+
</th>
|
|
212
|
+
<th className="pb-4 font-medium text-muted-foreground text-sm">
|
|
213
|
+
Warning
|
|
214
|
+
</th>
|
|
215
|
+
<th className="pb-4 font-medium text-muted-foreground text-sm">
|
|
216
|
+
Info
|
|
217
|
+
</th>
|
|
218
|
+
<th className="pb-4 font-medium text-muted-foreground text-sm">
|
|
219
|
+
Tertiary
|
|
220
|
+
</th>
|
|
221
|
+
</tr>
|
|
222
|
+
</thead>
|
|
223
|
+
<tbody className="divide-y">
|
|
224
|
+
{(["solid", "soft", "outline", "ghost", "link"] as const).map(
|
|
225
|
+
(variant) => (
|
|
226
|
+
<tr
|
|
227
|
+
key={variant}
|
|
228
|
+
className="group hover:bg-muted/30 transition-colors"
|
|
229
|
+
>
|
|
230
|
+
<td className="py-4 pr-4">
|
|
231
|
+
<span className="text-sm font-medium capitalize">
|
|
232
|
+
{variant}
|
|
233
|
+
</span>
|
|
234
|
+
</td>
|
|
235
|
+
<td className="py-4 pr-4">
|
|
236
|
+
<Button
|
|
237
|
+
size={globalSize}
|
|
238
|
+
variant={variant}
|
|
239
|
+
color="primary"
|
|
240
|
+
>
|
|
241
|
+
Button
|
|
242
|
+
</Button>
|
|
243
|
+
</td>
|
|
244
|
+
<td className="py-4 pr-4">
|
|
245
|
+
<Button
|
|
246
|
+
size={globalSize}
|
|
247
|
+
variant={variant}
|
|
248
|
+
color="secondary"
|
|
249
|
+
>
|
|
250
|
+
Button
|
|
251
|
+
</Button>
|
|
252
|
+
</td>
|
|
253
|
+
<td className="py-4 pr-4">
|
|
254
|
+
<Button
|
|
255
|
+
size={globalSize}
|
|
256
|
+
variant={variant}
|
|
257
|
+
color="destructive"
|
|
258
|
+
>
|
|
259
|
+
Button
|
|
260
|
+
</Button>
|
|
261
|
+
</td>
|
|
262
|
+
<td className="py-4 pr-4">
|
|
263
|
+
<Button
|
|
264
|
+
size={globalSize}
|
|
265
|
+
variant={variant}
|
|
266
|
+
color="success"
|
|
267
|
+
>
|
|
268
|
+
Button
|
|
269
|
+
</Button>
|
|
270
|
+
</td>
|
|
271
|
+
<td className="py-4 pr-4">
|
|
272
|
+
<Button
|
|
273
|
+
size={globalSize}
|
|
274
|
+
variant={variant}
|
|
275
|
+
color="warning"
|
|
276
|
+
>
|
|
277
|
+
Button
|
|
278
|
+
</Button>
|
|
279
|
+
</td>
|
|
280
|
+
<td className="py-4 pr-4">
|
|
281
|
+
<Button size={globalSize} variant={variant} color="info">
|
|
282
|
+
Button
|
|
283
|
+
</Button>
|
|
284
|
+
</td>
|
|
285
|
+
<td className="py-4 pr-4">
|
|
286
|
+
<Button
|
|
287
|
+
size={globalSize}
|
|
288
|
+
variant={variant}
|
|
289
|
+
color="tertiary"
|
|
290
|
+
>
|
|
291
|
+
Button
|
|
292
|
+
</Button>
|
|
293
|
+
</td>
|
|
294
|
+
</tr>
|
|
295
|
+
),
|
|
296
|
+
)}
|
|
297
|
+
</tbody>
|
|
298
|
+
</table>
|
|
299
|
+
</div>
|
|
300
|
+
</div>
|
|
301
|
+
</div>
|
|
302
|
+
);
|
|
303
|
+
}
|
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
import {
|
|
2
|
+
BellIcon,
|
|
3
|
+
CheckCircle2Icon,
|
|
4
|
+
ShieldAlertIcon,
|
|
5
|
+
ShieldCheckIcon,
|
|
6
|
+
UserIcon,
|
|
7
|
+
ZapIcon,
|
|
8
|
+
} from "lucide-react";
|
|
9
|
+
|
|
10
|
+
import {
|
|
11
|
+
Accordion,
|
|
12
|
+
AccordionContent,
|
|
13
|
+
AccordionItem,
|
|
14
|
+
AccordionTrigger,
|
|
15
|
+
} from "../../components/micro/accordion";
|
|
16
|
+
import {
|
|
17
|
+
Avatar,
|
|
18
|
+
AvatarBadge,
|
|
19
|
+
AvatarFallback,
|
|
20
|
+
AvatarGroup,
|
|
21
|
+
AvatarGroupCount,
|
|
22
|
+
AvatarImage,
|
|
23
|
+
} from "../../components/micro/avatar";
|
|
24
|
+
import { Badge } from "../../components/micro/badge";
|
|
25
|
+
import { Button } from "../../components/micro/button";
|
|
26
|
+
import {
|
|
27
|
+
Card,
|
|
28
|
+
CardContent,
|
|
29
|
+
CardFooter,
|
|
30
|
+
CardHeader,
|
|
31
|
+
CardTitle,
|
|
32
|
+
} from "../../components/micro/card";
|
|
33
|
+
import { SectionHeader, ShowcaseBlock } from "../../dev/components/showcase";
|
|
34
|
+
|
|
35
|
+
export default function DisplaySection() {
|
|
36
|
+
return (
|
|
37
|
+
<div className="space-y-5">
|
|
38
|
+
<SectionHeader
|
|
39
|
+
title="Data Display"
|
|
40
|
+
description="Avatars, Cards, Accordion, and more"
|
|
41
|
+
/>
|
|
42
|
+
|
|
43
|
+
{/* Avatar Showcase */}
|
|
44
|
+
<div className="rounded-2xl border border-border bg-card/40 p-6 shadow-sm">
|
|
45
|
+
<div className="flex items-center justify-between mb-6">
|
|
46
|
+
<div>
|
|
47
|
+
<h3 className="font-semibold text-lg flex items-center gap-2">
|
|
48
|
+
<UserIcon className="size-5 text-primary" />
|
|
49
|
+
Avatars & Groups
|
|
50
|
+
</h3>
|
|
51
|
+
<p className="text-sm text-muted-foreground mt-1">
|
|
52
|
+
Smart scaling, group overlaps, and status badges via CSS Delegated
|
|
53
|
+
Logic.
|
|
54
|
+
</p>
|
|
55
|
+
</div>
|
|
56
|
+
</div>
|
|
57
|
+
|
|
58
|
+
<div className="grid grid-cols-1 md:grid-cols-2 gap-6">
|
|
59
|
+
{/* Sizes & Fallbacks */}
|
|
60
|
+
<div className="rounded-xl border border-border bg-card p-5 shadow-sm flex flex-col gap-4">
|
|
61
|
+
<h4 className="text-sm font-medium text-muted-foreground">
|
|
62
|
+
Sizes & Fallbacks
|
|
63
|
+
</h4>
|
|
64
|
+
<div className="flex items-center gap-6 h-12">
|
|
65
|
+
<Avatar size="sm">
|
|
66
|
+
<AvatarFallback>SM</AvatarFallback>
|
|
67
|
+
</Avatar>
|
|
68
|
+
|
|
69
|
+
<Avatar>
|
|
70
|
+
<AvatarImage src="https://github.com/shadcn.png" />
|
|
71
|
+
<AvatarFallback>MD</AvatarFallback>
|
|
72
|
+
</Avatar>
|
|
73
|
+
|
|
74
|
+
<Avatar size="lg">
|
|
75
|
+
<AvatarFallback className="bg-primary/10 text-primary">
|
|
76
|
+
LG
|
|
77
|
+
</AvatarFallback>
|
|
78
|
+
</Avatar>
|
|
79
|
+
</div>
|
|
80
|
+
</div>
|
|
81
|
+
|
|
82
|
+
{/* Group & Badge */}
|
|
83
|
+
<div className="rounded-xl border border-border bg-card p-5 shadow-sm flex flex-col gap-4">
|
|
84
|
+
<h4 className="text-sm font-medium text-muted-foreground">
|
|
85
|
+
Groups & Status Badges
|
|
86
|
+
</h4>
|
|
87
|
+
<div className="flex items-center gap-8 h-12">
|
|
88
|
+
<AvatarGroup>
|
|
89
|
+
<Avatar size="lg">
|
|
90
|
+
<AvatarImage src="https://github.com/shadcn.png" />
|
|
91
|
+
<AvatarFallback>A1</AvatarFallback>
|
|
92
|
+
</Avatar>
|
|
93
|
+
<Avatar size="lg">
|
|
94
|
+
<AvatarFallback className="bg-secondary text-secondary-foreground">
|
|
95
|
+
B2
|
|
96
|
+
</AvatarFallback>
|
|
97
|
+
</Avatar>
|
|
98
|
+
<Avatar size="lg">
|
|
99
|
+
<AvatarFallback className="bg-destructive/10 text-destructive">
|
|
100
|
+
C3
|
|
101
|
+
</AvatarFallback>
|
|
102
|
+
</Avatar>
|
|
103
|
+
<AvatarGroupCount>+3</AvatarGroupCount>
|
|
104
|
+
</AvatarGroup>
|
|
105
|
+
|
|
106
|
+
<div className="w-px h-8 bg-border" />
|
|
107
|
+
|
|
108
|
+
<div className="flex items-center gap-4">
|
|
109
|
+
<Avatar>
|
|
110
|
+
<AvatarImage src="https://github.com/shadcn.png" />
|
|
111
|
+
<AvatarFallback>SC</AvatarFallback>
|
|
112
|
+
<AvatarBadge className="bg-success" />
|
|
113
|
+
</Avatar>
|
|
114
|
+
|
|
115
|
+
<Avatar size="sm">
|
|
116
|
+
<AvatarFallback>SM</AvatarFallback>
|
|
117
|
+
<AvatarBadge className="bg-destructive" />
|
|
118
|
+
</Avatar>
|
|
119
|
+
</div>
|
|
120
|
+
</div>
|
|
121
|
+
</div>
|
|
122
|
+
</div>
|
|
123
|
+
</div>
|
|
124
|
+
|
|
125
|
+
{/* The Badge Matrix */}
|
|
126
|
+
<div className="rounded-2xl border border-border bg-card/40 overflow-hidden shadow-sm">
|
|
127
|
+
<div className="border-b border-b-border bg-muted/30 px-6 py-4">
|
|
128
|
+
<h3 className="font-semibold text-lg flex items-center gap-2">
|
|
129
|
+
<ShieldAlertIcon className="size-5 text-primary" />
|
|
130
|
+
The Badge Matrix
|
|
131
|
+
</h3>
|
|
132
|
+
<p className="text-sm text-muted-foreground mt-1">
|
|
133
|
+
All variants mapped against different usage contexts (Icons &
|
|
134
|
+
Links).
|
|
135
|
+
</p>
|
|
136
|
+
</div>
|
|
137
|
+
<div className="p-6 overflow-x-auto">
|
|
138
|
+
<table className="w-full min-w-[600px] text-left border-collapse">
|
|
139
|
+
<thead>
|
|
140
|
+
<tr>
|
|
141
|
+
<th className="pb-4 font-medium text-muted-foreground text-sm">
|
|
142
|
+
Variant
|
|
143
|
+
</th>
|
|
144
|
+
<th className="pb-4 font-medium text-muted-foreground text-sm">
|
|
145
|
+
Default
|
|
146
|
+
</th>
|
|
147
|
+
<th className="pb-4 font-medium text-muted-foreground text-sm">
|
|
148
|
+
Start Icon
|
|
149
|
+
</th>
|
|
150
|
+
<th className="pb-4 font-medium text-muted-foreground text-sm">
|
|
151
|
+
End Icon
|
|
152
|
+
</th>
|
|
153
|
+
<th className="pb-4 font-medium text-muted-foreground text-sm">
|
|
154
|
+
Interactive (Link)
|
|
155
|
+
</th>
|
|
156
|
+
</tr>
|
|
157
|
+
</thead>
|
|
158
|
+
<tbody className="divide-y">
|
|
159
|
+
{(
|
|
160
|
+
[
|
|
161
|
+
{ label: "Secondary", props: { color: "secondary" } },
|
|
162
|
+
{ label: "Destructive", props: { color: "destructive" } },
|
|
163
|
+
{ label: "Outline", props: { variant: "outline" } },
|
|
164
|
+
] as const
|
|
165
|
+
).map(({ label, props }) => (
|
|
166
|
+
<tr
|
|
167
|
+
key={label}
|
|
168
|
+
className="group hover:bg-muted/30 transition-colors"
|
|
169
|
+
>
|
|
170
|
+
<td className="py-4 pr-4">
|
|
171
|
+
<span className="text-sm font-medium capitalize">
|
|
172
|
+
{label}
|
|
173
|
+
</span>
|
|
174
|
+
</td>
|
|
175
|
+
<td className="py-4 pr-4">
|
|
176
|
+
<Badge {...(props as any)}>Badge</Badge>
|
|
177
|
+
</td>
|
|
178
|
+
<td className="py-4 pr-4">
|
|
179
|
+
<Badge {...(props as any)}>
|
|
180
|
+
<CheckCircle2Icon data-icon="inline-start" /> Status
|
|
181
|
+
</Badge>
|
|
182
|
+
</td>
|
|
183
|
+
<td className="py-4 pr-4">
|
|
184
|
+
<Badge {...(props as any)}>
|
|
185
|
+
Updates <BellIcon data-icon="inline-end" />
|
|
186
|
+
</Badge>
|
|
187
|
+
</td>
|
|
188
|
+
<td className="py-4 pr-4">
|
|
189
|
+
<Badge {...(props as any)} render={<a href="#link" />}>
|
|
190
|
+
Clickable
|
|
191
|
+
</Badge>
|
|
192
|
+
</td>
|
|
193
|
+
</tr>
|
|
194
|
+
))}
|
|
195
|
+
</tbody>
|
|
196
|
+
</table>
|
|
197
|
+
</div>
|
|
198
|
+
</div>
|
|
199
|
+
|
|
200
|
+
<ShowcaseBlock title="Cards">
|
|
201
|
+
<div className="grid gap-3 sm:grid-cols-2">
|
|
202
|
+
<Card>
|
|
203
|
+
<CardHeader>
|
|
204
|
+
<div className="flex items-center gap-2">
|
|
205
|
+
<div className="size-8 rounded-lg bg-primary/10 flex items-center justify-center">
|
|
206
|
+
<ZapIcon className="size-4 text-primary" />
|
|
207
|
+
</div>
|
|
208
|
+
<CardTitle className="text-base">Performance</CardTitle>
|
|
209
|
+
</div>
|
|
210
|
+
</CardHeader>
|
|
211
|
+
<CardContent>
|
|
212
|
+
<p className="text-sm text-muted-foreground">
|
|
213
|
+
Optimized bundle with tree-shaking support.
|
|
214
|
+
</p>
|
|
215
|
+
</CardContent>
|
|
216
|
+
<CardFooter>
|
|
217
|
+
<Button variant="ghost" size="sm" color="primary">
|
|
218
|
+
Learn more →
|
|
219
|
+
</Button>
|
|
220
|
+
</CardFooter>
|
|
221
|
+
</Card>
|
|
222
|
+
<Card>
|
|
223
|
+
<CardHeader>
|
|
224
|
+
<div className="flex items-center gap-2">
|
|
225
|
+
<div className="size-8 rounded-lg bg-success/10 flex items-center justify-center">
|
|
226
|
+
<ShieldCheckIcon className="size-4 text-success" />
|
|
227
|
+
</div>
|
|
228
|
+
<CardTitle className="text-base">Type Safe</CardTitle>
|
|
229
|
+
</div>
|
|
230
|
+
</CardHeader>
|
|
231
|
+
<CardContent>
|
|
232
|
+
<p className="text-sm text-muted-foreground">
|
|
233
|
+
Full TypeScript support with auto-complete.
|
|
234
|
+
</p>
|
|
235
|
+
</CardContent>
|
|
236
|
+
<CardFooter>
|
|
237
|
+
<Button variant="ghost" size="sm" color="success">
|
|
238
|
+
Learn more →
|
|
239
|
+
</Button>
|
|
240
|
+
</CardFooter>
|
|
241
|
+
</Card>
|
|
242
|
+
</div>
|
|
243
|
+
</ShowcaseBlock>
|
|
244
|
+
|
|
245
|
+
<ShowcaseBlock title="Accordion">
|
|
246
|
+
<Accordion>
|
|
247
|
+
{[
|
|
248
|
+
{
|
|
249
|
+
q: "How do I install?",
|
|
250
|
+
a: "Run npm install gladvn in your project.",
|
|
251
|
+
},
|
|
252
|
+
{
|
|
253
|
+
q: "Can I customize colors?",
|
|
254
|
+
a: "Yes — copy tokens.css and override any CSS variable.",
|
|
255
|
+
},
|
|
256
|
+
{
|
|
257
|
+
q: "Does it support dark mode?",
|
|
258
|
+
a: "Yes — add the .dark class to your <html> element.",
|
|
259
|
+
},
|
|
260
|
+
].map(({ q, a }) => (
|
|
261
|
+
<AccordionItem key={q} value={q}>
|
|
262
|
+
<AccordionTrigger>{q}</AccordionTrigger>
|
|
263
|
+
<AccordionContent>{a}</AccordionContent>
|
|
264
|
+
</AccordionItem>
|
|
265
|
+
))}
|
|
266
|
+
</Accordion>
|
|
267
|
+
</ShowcaseBlock>
|
|
268
|
+
</div>
|
|
269
|
+
);
|
|
270
|
+
}
|