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,131 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ✅ AUDITED & REFACTORED
|
|
3
|
+
* - Design System Compliant (22 Commandments)
|
|
4
|
+
* - WCAG AAA/AA
|
|
5
|
+
* - Form Control Parity
|
|
6
|
+
* - CSS Delegated Logic
|
|
7
|
+
* - No Hardcoded Dimensions
|
|
8
|
+
*/
|
|
9
|
+
"use client";
|
|
10
|
+
|
|
11
|
+
import { Popover as PopoverPrimitive } from "@base-ui/react/popover";
|
|
12
|
+
import * as React from "react";
|
|
13
|
+
|
|
14
|
+
import { cn } from "../../lib/utils";
|
|
15
|
+
|
|
16
|
+
function Popover(props: React.ComponentProps<typeof PopoverPrimitive.Root>) {
|
|
17
|
+
return <PopoverPrimitive.Root {...props} />;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
const PopoverTrigger = React.forwardRef<
|
|
21
|
+
HTMLButtonElement,
|
|
22
|
+
React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Trigger>
|
|
23
|
+
>((props, ref) => {
|
|
24
|
+
return (
|
|
25
|
+
<PopoverPrimitive.Trigger
|
|
26
|
+
ref={ref}
|
|
27
|
+
data-slot="popover-trigger"
|
|
28
|
+
{...props}
|
|
29
|
+
/>
|
|
30
|
+
);
|
|
31
|
+
});
|
|
32
|
+
PopoverTrigger.displayName = "PopoverTrigger";
|
|
33
|
+
|
|
34
|
+
const PopoverPortal = PopoverPrimitive.Portal;
|
|
35
|
+
|
|
36
|
+
const PopoverContent = React.forwardRef<
|
|
37
|
+
HTMLDivElement,
|
|
38
|
+
React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Popup> &
|
|
39
|
+
Pick<
|
|
40
|
+
React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Positioner>,
|
|
41
|
+
"align" | "alignOffset" | "side" | "sideOffset"
|
|
42
|
+
>
|
|
43
|
+
>(
|
|
44
|
+
(
|
|
45
|
+
{
|
|
46
|
+
className,
|
|
47
|
+
align = "center",
|
|
48
|
+
alignOffset = 0,
|
|
49
|
+
side = "bottom",
|
|
50
|
+
sideOffset = 4,
|
|
51
|
+
...props
|
|
52
|
+
},
|
|
53
|
+
ref,
|
|
54
|
+
) => {
|
|
55
|
+
return (
|
|
56
|
+
<PopoverPrimitive.Positioner
|
|
57
|
+
align={align}
|
|
58
|
+
alignOffset={alignOffset}
|
|
59
|
+
side={side}
|
|
60
|
+
sideOffset={sideOffset}
|
|
61
|
+
className="isolate z-50"
|
|
62
|
+
>
|
|
63
|
+
<PopoverPrimitive.Popup
|
|
64
|
+
ref={ref}
|
|
65
|
+
data-slot="popover-content"
|
|
66
|
+
className={cn(
|
|
67
|
+
"flex origin-(--transform-origin) flex-col gap-2.5 rounded-lg bg-popover p-2.5 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
|
|
68
|
+
className,
|
|
69
|
+
)}
|
|
70
|
+
{...props}
|
|
71
|
+
/>
|
|
72
|
+
</PopoverPrimitive.Positioner>
|
|
73
|
+
);
|
|
74
|
+
},
|
|
75
|
+
);
|
|
76
|
+
PopoverContent.displayName = "PopoverContent";
|
|
77
|
+
|
|
78
|
+
const PopoverHeader = React.forwardRef<
|
|
79
|
+
HTMLDivElement,
|
|
80
|
+
React.ComponentPropsWithoutRef<"div">
|
|
81
|
+
>(({ className, ...props }, ref) => {
|
|
82
|
+
return (
|
|
83
|
+
<div
|
|
84
|
+
ref={ref}
|
|
85
|
+
data-slot="popover-header"
|
|
86
|
+
className={cn("flex flex-col gap-0.5 text-sm", className)}
|
|
87
|
+
{...props}
|
|
88
|
+
/>
|
|
89
|
+
);
|
|
90
|
+
});
|
|
91
|
+
PopoverHeader.displayName = "PopoverHeader";
|
|
92
|
+
|
|
93
|
+
const PopoverTitle = React.forwardRef<
|
|
94
|
+
HTMLHeadingElement,
|
|
95
|
+
React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Title>
|
|
96
|
+
>(({ className, ...props }, ref) => {
|
|
97
|
+
return (
|
|
98
|
+
<PopoverPrimitive.Title
|
|
99
|
+
ref={ref}
|
|
100
|
+
data-slot="popover-title"
|
|
101
|
+
className={cn("font-medium", className)}
|
|
102
|
+
{...props}
|
|
103
|
+
/>
|
|
104
|
+
);
|
|
105
|
+
});
|
|
106
|
+
PopoverTitle.displayName = "PopoverTitle";
|
|
107
|
+
|
|
108
|
+
const PopoverDescription = React.forwardRef<
|
|
109
|
+
HTMLParagraphElement,
|
|
110
|
+
React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Description>
|
|
111
|
+
>(({ className, ...props }, ref) => {
|
|
112
|
+
return (
|
|
113
|
+
<PopoverPrimitive.Description
|
|
114
|
+
ref={ref}
|
|
115
|
+
data-slot="popover-description"
|
|
116
|
+
className={cn("text-muted-foreground", className)}
|
|
117
|
+
{...props}
|
|
118
|
+
/>
|
|
119
|
+
);
|
|
120
|
+
});
|
|
121
|
+
PopoverDescription.displayName = "PopoverDescription";
|
|
122
|
+
|
|
123
|
+
export {
|
|
124
|
+
Popover,
|
|
125
|
+
PopoverContent,
|
|
126
|
+
PopoverDescription,
|
|
127
|
+
PopoverHeader,
|
|
128
|
+
PopoverPortal,
|
|
129
|
+
PopoverTitle,
|
|
130
|
+
PopoverTrigger,
|
|
131
|
+
};
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ✅ AUDITED & REFACTORED
|
|
3
|
+
* - Design System Compliant (22 Commandments)
|
|
4
|
+
* - WCAG AAA/AA
|
|
5
|
+
* - Form Control Parity
|
|
6
|
+
* - CSS Delegated Logic
|
|
7
|
+
*/
|
|
8
|
+
"use client";
|
|
9
|
+
|
|
10
|
+
import { Progress as ProgressPrimitive } from "@base-ui/react/progress";
|
|
11
|
+
import * as React from "react";
|
|
12
|
+
|
|
13
|
+
import { type Color, type Size } from "../../lib/types";
|
|
14
|
+
import { cn } from "../../lib/utils";
|
|
15
|
+
|
|
16
|
+
const ProgressContext = React.createContext<{ size: Size; color: Color }>({
|
|
17
|
+
size: "md",
|
|
18
|
+
color: "primary",
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
export interface ProgressProps extends ProgressPrimitive.Root.Props {
|
|
22
|
+
size?: Size;
|
|
23
|
+
color?: Color;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* @description Displays an indicator showing the completion progress of a task.
|
|
28
|
+
* @example
|
|
29
|
+
* <Progress value={33} />
|
|
30
|
+
*/
|
|
31
|
+
function Progress({
|
|
32
|
+
className,
|
|
33
|
+
children,
|
|
34
|
+
size = "md",
|
|
35
|
+
color = "primary",
|
|
36
|
+
...props
|
|
37
|
+
}: ProgressProps) {
|
|
38
|
+
return (
|
|
39
|
+
<ProgressContext.Provider value={{ size, color }}>
|
|
40
|
+
<ProgressPrimitive.Root
|
|
41
|
+
data-slot="progress"
|
|
42
|
+
className={cn("flex flex-wrap gap-x-3 gap-y-1.5", className)}
|
|
43
|
+
{...props}
|
|
44
|
+
>
|
|
45
|
+
{children}
|
|
46
|
+
</ProgressPrimitive.Root>
|
|
47
|
+
</ProgressContext.Provider>
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
function ProgressTrack({ className, ...props }: ProgressPrimitive.Track.Props) {
|
|
52
|
+
const { size } = React.useContext(ProgressContext);
|
|
53
|
+
|
|
54
|
+
const sizeClasses: Partial<Record<Size, string>> = {
|
|
55
|
+
sm: "h-1",
|
|
56
|
+
md: "h-1.5",
|
|
57
|
+
lg: "h-2",
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
return (
|
|
61
|
+
<ProgressPrimitive.Track
|
|
62
|
+
className={cn(
|
|
63
|
+
"relative flex w-full items-center overflow-x-hidden rounded-full bg-muted",
|
|
64
|
+
size ? sizeClasses[size] : "",
|
|
65
|
+
className,
|
|
66
|
+
)}
|
|
67
|
+
data-slot="progress-track"
|
|
68
|
+
{...props}
|
|
69
|
+
/>
|
|
70
|
+
);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
function ProgressIndicator({
|
|
74
|
+
className,
|
|
75
|
+
...props
|
|
76
|
+
}: ProgressPrimitive.Indicator.Props) {
|
|
77
|
+
const { color } = React.useContext(ProgressContext);
|
|
78
|
+
|
|
79
|
+
const bgColors: Record<Color, string> = {
|
|
80
|
+
primary: "bg-primary",
|
|
81
|
+
secondary: "bg-secondary",
|
|
82
|
+
destructive: "bg-destructive",
|
|
83
|
+
success: "bg-success",
|
|
84
|
+
warning: "bg-warning",
|
|
85
|
+
info: "bg-info",
|
|
86
|
+
tertiary: "bg-tertiary",
|
|
87
|
+
muted: "bg-muted",
|
|
88
|
+
accent: "bg-accent",
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
return (
|
|
92
|
+
<ProgressPrimitive.Indicator
|
|
93
|
+
data-slot="progress-indicator"
|
|
94
|
+
className={cn("h-full transition-all", bgColors[color], className)}
|
|
95
|
+
{...props}
|
|
96
|
+
/>
|
|
97
|
+
);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
function ProgressLabel({ className, ...props }: ProgressPrimitive.Label.Props) {
|
|
101
|
+
const { size } = React.useContext(ProgressContext);
|
|
102
|
+
const textSizes = {
|
|
103
|
+
sm: "text-xs",
|
|
104
|
+
md: "text-sm",
|
|
105
|
+
lg: "text-base",
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
return (
|
|
109
|
+
<ProgressPrimitive.Label
|
|
110
|
+
className={cn(textSizes[size], "font-medium", className)}
|
|
111
|
+
data-slot="progress-label"
|
|
112
|
+
{...props}
|
|
113
|
+
/>
|
|
114
|
+
);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
function ProgressValue({ className, ...props }: ProgressPrimitive.Value.Props) {
|
|
118
|
+
const { size } = React.useContext(ProgressContext);
|
|
119
|
+
const textSizes = {
|
|
120
|
+
sm: "text-xs",
|
|
121
|
+
md: "text-sm",
|
|
122
|
+
lg: "text-base",
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
return (
|
|
126
|
+
<ProgressPrimitive.Value
|
|
127
|
+
className={cn(
|
|
128
|
+
"ml-auto text-muted-foreground tabular-nums",
|
|
129
|
+
textSizes[size],
|
|
130
|
+
className,
|
|
131
|
+
)}
|
|
132
|
+
data-slot="progress-value"
|
|
133
|
+
{...props}
|
|
134
|
+
/>
|
|
135
|
+
);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
export {
|
|
139
|
+
Progress,
|
|
140
|
+
ProgressIndicator,
|
|
141
|
+
ProgressLabel,
|
|
142
|
+
ProgressTrack,
|
|
143
|
+
ProgressValue,
|
|
144
|
+
};
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ✅ AUDITED & REFACTORED
|
|
3
|
+
* - Design System Compliant (22 Commandments)
|
|
4
|
+
* - WCAG AAA/AA
|
|
5
|
+
* - Form Control Parity
|
|
6
|
+
* - CSS Delegated Logic
|
|
7
|
+
*/
|
|
8
|
+
"use client";
|
|
9
|
+
|
|
10
|
+
import { Radio as RadioPrimitive } from "@base-ui/react/radio";
|
|
11
|
+
import { RadioGroup as RadioGroupPrimitive } from "@base-ui/react/radio-group";
|
|
12
|
+
import * as React from "react";
|
|
13
|
+
|
|
14
|
+
import { cva, type VariantProps } from "class-variance-authority";
|
|
15
|
+
|
|
16
|
+
import { type Size } from "../../lib/types";
|
|
17
|
+
import { cn } from "../../lib/utils";
|
|
18
|
+
|
|
19
|
+
const RadioGroup = React.forwardRef<
|
|
20
|
+
React.ComponentRef<typeof RadioGroupPrimitive>,
|
|
21
|
+
React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive>
|
|
22
|
+
>(function RadioGroup({ className, ...props }, ref) {
|
|
23
|
+
return (
|
|
24
|
+
<RadioGroupPrimitive
|
|
25
|
+
ref={ref}
|
|
26
|
+
data-slot="radio-group"
|
|
27
|
+
className={cn("grid gap-2", className)}
|
|
28
|
+
{...props}
|
|
29
|
+
/>
|
|
30
|
+
);
|
|
31
|
+
});
|
|
32
|
+
RadioGroup.displayName = "RadioGroup";
|
|
33
|
+
|
|
34
|
+
const radioGroupItemVariants = cva(
|
|
35
|
+
"group/radio peer relative flex aspect-square shrink-0 rounded-full border border-input after:absolute after:content-[''] outline-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-offset-1 focus-visible:ring-offset-background disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:focus-visible:border-destructive aria-invalid:focus-visible:ring-3 aria-invalid:focus-visible:ring-destructive/50 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:focus-visible:ring-destructive/50 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground dark:data-checked:bg-primary",
|
|
36
|
+
{
|
|
37
|
+
variants: {
|
|
38
|
+
size: {
|
|
39
|
+
sm: "size-3.5 after:-inset-x-2.5 after:-inset-y-2.5",
|
|
40
|
+
md: "size-4 after:-inset-x-3 after:-inset-y-2",
|
|
41
|
+
lg: "size-5 after:-inset-x-4 after:-inset-y-3",
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
);
|
|
46
|
+
|
|
47
|
+
const RadioGroupItem = React.forwardRef<
|
|
48
|
+
React.ComponentRef<typeof RadioPrimitive.Root>,
|
|
49
|
+
React.ComponentPropsWithoutRef<typeof RadioPrimitive.Root> &
|
|
50
|
+
Omit<VariantProps<typeof radioGroupItemVariants>, "size"> & {
|
|
51
|
+
size?: Size;
|
|
52
|
+
}
|
|
53
|
+
>(function RadioGroupItem({ className, size = "md", ...props }, ref) {
|
|
54
|
+
return (
|
|
55
|
+
<RadioPrimitive.Root
|
|
56
|
+
ref={ref}
|
|
57
|
+
data-slot="radio-group-item"
|
|
58
|
+
data-size={size}
|
|
59
|
+
className={cn(radioGroupItemVariants({ size, className }))}
|
|
60
|
+
{...props}
|
|
61
|
+
>
|
|
62
|
+
<RadioPrimitive.Indicator
|
|
63
|
+
data-slot="radio-group-indicator"
|
|
64
|
+
className="flex items-center justify-center size-4 group-data-[size=sm]/radio:size-3.5 group-data-[size=lg]/radio:size-5"
|
|
65
|
+
>
|
|
66
|
+
<span className="absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 rounded-full bg-primary-foreground size-2 group-data-[size=sm]/radio:size-1.5 group-data-[size=lg]/radio:size-2.5" />
|
|
67
|
+
</RadioPrimitive.Indicator>
|
|
68
|
+
</RadioPrimitive.Root>
|
|
69
|
+
);
|
|
70
|
+
});
|
|
71
|
+
RadioGroupItem.displayName = "RadioGroupItem";
|
|
72
|
+
|
|
73
|
+
export { RadioGroup, RadioGroupItem };
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ✅ AUDITED & REFACTORED
|
|
3
|
+
* - Design System Compliant (22 Commandments)
|
|
4
|
+
* - WCAG AAA/AA
|
|
5
|
+
* - Form Control Parity
|
|
6
|
+
* - CSS Delegated Logic
|
|
7
|
+
*/
|
|
8
|
+
"use client";
|
|
9
|
+
|
|
10
|
+
import * as ResizablePrimitive from "react-resizable-panels";
|
|
11
|
+
|
|
12
|
+
import { cn } from "../../lib/utils";
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* @description Accessible resizable panel groups and layouts.
|
|
16
|
+
* @requires ResizablePanel, ResizableHandle
|
|
17
|
+
*/
|
|
18
|
+
function ResizablePanelGroup({
|
|
19
|
+
className,
|
|
20
|
+
...props
|
|
21
|
+
}: ResizablePrimitive.GroupProps) {
|
|
22
|
+
return (
|
|
23
|
+
<ResizablePrimitive.Group
|
|
24
|
+
data-slot="resizable-panel-group"
|
|
25
|
+
className={cn(
|
|
26
|
+
"flex h-full w-full aria-[orientation=vertical]:flex-col",
|
|
27
|
+
className,
|
|
28
|
+
)}
|
|
29
|
+
{...props}
|
|
30
|
+
/>
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
function ResizablePanel({ ...props }: ResizablePrimitive.PanelProps) {
|
|
35
|
+
return <ResizablePrimitive.Panel data-slot="resizable-panel" {...props} />;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
function ResizableHandle({
|
|
39
|
+
withHandle,
|
|
40
|
+
className,
|
|
41
|
+
...props
|
|
42
|
+
}: ResizablePrimitive.SeparatorProps & {
|
|
43
|
+
withHandle?: boolean;
|
|
44
|
+
}) {
|
|
45
|
+
return (
|
|
46
|
+
<ResizablePrimitive.Separator
|
|
47
|
+
data-slot="resizable-handle"
|
|
48
|
+
className={cn(
|
|
49
|
+
"relative flex w-px items-center justify-center bg-border ring-offset-background after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-ring focus-visible:outline-hidden aria-[orientation=horizontal]:h-px aria-[orientation=horizontal]:w-full aria-[orientation=horizontal]:after:left-0 aria-[orientation=horizontal]:after:h-1 aria-[orientation=horizontal]:after:w-full aria-[orientation=horizontal]:after:translate-x-0 aria-[orientation=horizontal]:after:-translate-y-1/2 [&[aria-orientation=horizontal]_[data-slot=resizable-handle-bar]]:rotate-90",
|
|
50
|
+
className,
|
|
51
|
+
)}
|
|
52
|
+
{...props}
|
|
53
|
+
>
|
|
54
|
+
{withHandle && (
|
|
55
|
+
<div
|
|
56
|
+
data-slot="resizable-handle-bar"
|
|
57
|
+
className="z-10 flex h-6 w-1 shrink-0 rounded-lg bg-border"
|
|
58
|
+
/>
|
|
59
|
+
)}
|
|
60
|
+
</ResizablePrimitive.Separator>
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export { ResizableHandle, ResizablePanel, ResizablePanelGroup };
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ✅ AUDITED & REFACTORED
|
|
3
|
+
* - Design System Compliant (22 Commandments)
|
|
4
|
+
* - WCAG AAA/AA
|
|
5
|
+
* - Form Control Parity
|
|
6
|
+
* - CSS Delegated Logic
|
|
7
|
+
*/
|
|
8
|
+
"use client";
|
|
9
|
+
|
|
10
|
+
import { ScrollArea as ScrollAreaPrimitive } from "@base-ui/react/scroll-area";
|
|
11
|
+
|
|
12
|
+
import { cn } from "../../lib/utils";
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* @description Augments native scroll functionality for custom, cross-browser styling.
|
|
16
|
+
* @example
|
|
17
|
+
* <ScrollArea className="h-[200px] w-[350px]">
|
|
18
|
+
* Jokester began sneaking into the castle in the middle of the night.
|
|
19
|
+
* </ScrollArea>
|
|
20
|
+
*/
|
|
21
|
+
function ScrollArea({
|
|
22
|
+
className,
|
|
23
|
+
children,
|
|
24
|
+
...props
|
|
25
|
+
}: ScrollAreaPrimitive.Root.Props) {
|
|
26
|
+
return (
|
|
27
|
+
<ScrollAreaPrimitive.Root
|
|
28
|
+
data-slot="scroll-area"
|
|
29
|
+
className={cn("relative", className)}
|
|
30
|
+
{...props}
|
|
31
|
+
>
|
|
32
|
+
<ScrollAreaPrimitive.Viewport
|
|
33
|
+
data-slot="scroll-area-viewport"
|
|
34
|
+
className="size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:ring-offset-1 focus-visible:ring-offset-background"
|
|
35
|
+
>
|
|
36
|
+
{children}
|
|
37
|
+
</ScrollAreaPrimitive.Viewport>
|
|
38
|
+
<ScrollBar />
|
|
39
|
+
<ScrollAreaPrimitive.Corner />
|
|
40
|
+
</ScrollAreaPrimitive.Root>
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
function ScrollBar({
|
|
45
|
+
className,
|
|
46
|
+
orientation = "vertical",
|
|
47
|
+
...props
|
|
48
|
+
}: ScrollAreaPrimitive.Scrollbar.Props) {
|
|
49
|
+
return (
|
|
50
|
+
<ScrollAreaPrimitive.Scrollbar
|
|
51
|
+
data-slot="scroll-area-scrollbar"
|
|
52
|
+
data-orientation={orientation}
|
|
53
|
+
orientation={orientation}
|
|
54
|
+
className={cn(
|
|
55
|
+
"flex touch-none p-px transition-colors select-none data-horizontal:h-2.5 data-horizontal:flex-col data-horizontal:border-t data-horizontal:border-t-border data-horizontal:border-t-transparent data-vertical:h-full data-vertical:w-2.5 data-vertical:border-l data-vertical:border-l-border data-vertical:border-l-transparent",
|
|
56
|
+
className,
|
|
57
|
+
)}
|
|
58
|
+
{...props}
|
|
59
|
+
>
|
|
60
|
+
<ScrollAreaPrimitive.Thumb
|
|
61
|
+
data-slot="scroll-area-thumb"
|
|
62
|
+
className="relative flex-1 rounded-full bg-border"
|
|
63
|
+
/>
|
|
64
|
+
</ScrollAreaPrimitive.Scrollbar>
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export { ScrollArea, ScrollBar };
|