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,237 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ResizableHandle,
|
|
3
|
+
ResizablePanel,
|
|
4
|
+
ResizablePanelGroup,
|
|
5
|
+
} from "../../components/micro/resizable";
|
|
6
|
+
import {
|
|
7
|
+
DocsCode,
|
|
8
|
+
DocsP,
|
|
9
|
+
ExampleGrid,
|
|
10
|
+
ExampleSection,
|
|
11
|
+
Showcase,
|
|
12
|
+
ShowcaseDocs,
|
|
13
|
+
} from "../../dev/components/showcase";
|
|
14
|
+
|
|
15
|
+
// ──────────────────────────────────────────────────────────
|
|
16
|
+
// SECTION 1: Micro Content
|
|
17
|
+
// ──────────────────────────────────────────────────────────
|
|
18
|
+
function ResizableMicroShowcase() {
|
|
19
|
+
return (
|
|
20
|
+
<div className="space-y-10 mt-6">
|
|
21
|
+
{/* Horizontal split */}
|
|
22
|
+
<ExampleSection
|
|
23
|
+
label="Horizontal Split"
|
|
24
|
+
description="Kéo tay cầm để thay đổi kích thước bảng theo chiều ngang."
|
|
25
|
+
codeString={`<ResizablePanelGroup
|
|
26
|
+
orientation="horizontal"
|
|
27
|
+
className="max-w-md rounded-xl border border-border bg-card"
|
|
28
|
+
>
|
|
29
|
+
<ResizablePanel defaultSize={50}>
|
|
30
|
+
<div className="flex h-[200px] items-center justify-center p-6">
|
|
31
|
+
<span className="font-semibold text-sm">Sidebar</span>
|
|
32
|
+
</div>
|
|
33
|
+
</ResizablePanel>
|
|
34
|
+
<ResizableHandle withHandle />
|
|
35
|
+
<ResizablePanel defaultSize={50}>
|
|
36
|
+
<div className="flex h-full items-center justify-center p-6">
|
|
37
|
+
<span className="font-semibold text-sm">Content</span>
|
|
38
|
+
</div>
|
|
39
|
+
</ResizablePanel>
|
|
40
|
+
</ResizablePanelGroup>`}
|
|
41
|
+
>
|
|
42
|
+
<ResizablePanelGroup
|
|
43
|
+
orientation="horizontal"
|
|
44
|
+
className="max-w-md rounded-xl border border-border bg-card"
|
|
45
|
+
>
|
|
46
|
+
<ResizablePanel defaultSize={50}>
|
|
47
|
+
<div className="flex h-[200px] items-center justify-center p-6">
|
|
48
|
+
<span className="font-semibold text-sm">Sidebar</span>
|
|
49
|
+
</div>
|
|
50
|
+
</ResizablePanel>
|
|
51
|
+
<ResizableHandle withHandle />
|
|
52
|
+
<ResizablePanel defaultSize={50}>
|
|
53
|
+
<div className="flex h-full items-center justify-center p-6">
|
|
54
|
+
<span className="font-semibold text-sm">Content</span>
|
|
55
|
+
</div>
|
|
56
|
+
</ResizablePanel>
|
|
57
|
+
</ResizablePanelGroup>
|
|
58
|
+
</ExampleSection>
|
|
59
|
+
|
|
60
|
+
{/* Vertical split */}
|
|
61
|
+
<ExampleSection
|
|
62
|
+
label="Vertical Split"
|
|
63
|
+
description='orientation="vertical" chia bảng theo chiều dọc.'
|
|
64
|
+
codeString={`<ResizablePanelGroup
|
|
65
|
+
orientation="vertical"
|
|
66
|
+
className="max-w-md rounded-xl border border-border bg-card"
|
|
67
|
+
>
|
|
68
|
+
<ResizablePanel defaultSize={50}>
|
|
69
|
+
<div className="flex h-[120px] items-center justify-center p-6">
|
|
70
|
+
<span className="font-semibold text-sm">Top</span>
|
|
71
|
+
</div>
|
|
72
|
+
</ResizablePanel>
|
|
73
|
+
<ResizableHandle withHandle />
|
|
74
|
+
<ResizablePanel defaultSize={50}>
|
|
75
|
+
<div className="flex h-[120px] items-center justify-center p-6">
|
|
76
|
+
<span className="font-semibold text-sm">Bottom</span>
|
|
77
|
+
</div>
|
|
78
|
+
</ResizablePanel>
|
|
79
|
+
</ResizablePanelGroup>`}
|
|
80
|
+
>
|
|
81
|
+
<ResizablePanelGroup
|
|
82
|
+
orientation="vertical"
|
|
83
|
+
className="max-w-md rounded-xl border border-border bg-card"
|
|
84
|
+
>
|
|
85
|
+
<ResizablePanel defaultSize={50}>
|
|
86
|
+
<div className="flex h-[120px] items-center justify-center p-6">
|
|
87
|
+
<span className="font-semibold text-sm">Top</span>
|
|
88
|
+
</div>
|
|
89
|
+
</ResizablePanel>
|
|
90
|
+
<ResizableHandle withHandle />
|
|
91
|
+
<ResizablePanel defaultSize={50}>
|
|
92
|
+
<div className="flex h-[120px] items-center justify-center p-6">
|
|
93
|
+
<span className="font-semibold text-sm">Bottom</span>
|
|
94
|
+
</div>
|
|
95
|
+
</ResizablePanel>
|
|
96
|
+
</ResizablePanelGroup>
|
|
97
|
+
</ExampleSection>
|
|
98
|
+
|
|
99
|
+
{/* Handle variants */}
|
|
100
|
+
<ExampleGrid>
|
|
101
|
+
<ExampleSection
|
|
102
|
+
label="With Handle Grip"
|
|
103
|
+
description="withHandle hiển thị thanh tay cầm trực quan ở giữa divider."
|
|
104
|
+
codeString={`<ResizableHandle withHandle />`}
|
|
105
|
+
>
|
|
106
|
+
<ResizablePanelGroup
|
|
107
|
+
orientation="horizontal"
|
|
108
|
+
className="rounded-xl border border-border bg-card"
|
|
109
|
+
>
|
|
110
|
+
<ResizablePanel defaultSize={50}>
|
|
111
|
+
<div className="flex h-[120px] items-center justify-center p-4">
|
|
112
|
+
<span className="text-sm font-medium">Panel A</span>
|
|
113
|
+
</div>
|
|
114
|
+
</ResizablePanel>
|
|
115
|
+
<ResizableHandle withHandle />
|
|
116
|
+
<ResizablePanel defaultSize={50}>
|
|
117
|
+
<div className="flex h-full items-center justify-center p-4">
|
|
118
|
+
<span className="text-sm font-medium">Panel B</span>
|
|
119
|
+
</div>
|
|
120
|
+
</ResizablePanel>
|
|
121
|
+
</ResizablePanelGroup>
|
|
122
|
+
</ExampleSection>
|
|
123
|
+
|
|
124
|
+
<ExampleSection
|
|
125
|
+
label="Plain Divider"
|
|
126
|
+
description="Bỏ withHandle để chỉ hiển thị đường phân cách mỏng, không có visual grip."
|
|
127
|
+
codeString={`<ResizableHandle />`}
|
|
128
|
+
>
|
|
129
|
+
<ResizablePanelGroup
|
|
130
|
+
orientation="horizontal"
|
|
131
|
+
className="rounded-xl border border-border bg-card"
|
|
132
|
+
>
|
|
133
|
+
<ResizablePanel defaultSize={50}>
|
|
134
|
+
<div className="flex h-[120px] items-center justify-center p-4">
|
|
135
|
+
<span className="text-sm font-medium">Panel A</span>
|
|
136
|
+
</div>
|
|
137
|
+
</ResizablePanel>
|
|
138
|
+
<ResizableHandle />
|
|
139
|
+
<ResizablePanel defaultSize={50}>
|
|
140
|
+
<div className="flex h-full items-center justify-center p-4">
|
|
141
|
+
<span className="text-sm font-medium">Panel B</span>
|
|
142
|
+
</div>
|
|
143
|
+
</ResizablePanel>
|
|
144
|
+
</ResizablePanelGroup>
|
|
145
|
+
</ExampleSection>
|
|
146
|
+
</ExampleGrid>
|
|
147
|
+
|
|
148
|
+
{/* Nested layout */}
|
|
149
|
+
<ExampleSection
|
|
150
|
+
label="Nested Layout"
|
|
151
|
+
description="Bố cục phức tạp với các nhóm có thể thay đổi kích thước lồng nhau."
|
|
152
|
+
codeString={`<ResizablePanelGroup
|
|
153
|
+
orientation="horizontal"
|
|
154
|
+
className="max-w-md rounded-xl border border-border bg-card"
|
|
155
|
+
>
|
|
156
|
+
<ResizablePanel defaultSize={25} minSize={15}>
|
|
157
|
+
<div className="flex h-[250px] items-center justify-center p-6">
|
|
158
|
+
<span className="font-semibold text-sm">Nav</span>
|
|
159
|
+
</div>
|
|
160
|
+
</ResizablePanel>
|
|
161
|
+
<ResizableHandle />
|
|
162
|
+
<ResizablePanel defaultSize={75}>
|
|
163
|
+
<ResizablePanelGroup orientation="vertical">
|
|
164
|
+
<ResizablePanel defaultSize={25} minSize={20}>
|
|
165
|
+
<div className="flex h-full items-center justify-center p-6">
|
|
166
|
+
<span className="font-semibold text-sm">Top Bar</span>
|
|
167
|
+
</div>
|
|
168
|
+
</ResizablePanel>
|
|
169
|
+
<ResizableHandle />
|
|
170
|
+
<ResizablePanel defaultSize={75}>
|
|
171
|
+
<div className="flex h-full items-center justify-center p-6">
|
|
172
|
+
<span className="font-semibold text-sm">Main Content</span>
|
|
173
|
+
</div>
|
|
174
|
+
</ResizablePanel>
|
|
175
|
+
</ResizablePanelGroup>
|
|
176
|
+
</ResizablePanel>
|
|
177
|
+
</ResizablePanelGroup>`}
|
|
178
|
+
>
|
|
179
|
+
<ResizablePanelGroup
|
|
180
|
+
orientation="horizontal"
|
|
181
|
+
className="max-w-md rounded-xl border border-border bg-card"
|
|
182
|
+
>
|
|
183
|
+
<ResizablePanel defaultSize={25} minSize={15}>
|
|
184
|
+
<div className="flex h-[250px] items-center justify-center p-6">
|
|
185
|
+
<span className="font-semibold text-sm">Nav</span>
|
|
186
|
+
</div>
|
|
187
|
+
</ResizablePanel>
|
|
188
|
+
<ResizableHandle />
|
|
189
|
+
<ResizablePanel defaultSize={75}>
|
|
190
|
+
<ResizablePanelGroup orientation="vertical">
|
|
191
|
+
<ResizablePanel defaultSize={25} minSize={20}>
|
|
192
|
+
<div className="flex h-full items-center justify-center p-6">
|
|
193
|
+
<span className="font-semibold text-sm">Top Bar</span>
|
|
194
|
+
</div>
|
|
195
|
+
</ResizablePanel>
|
|
196
|
+
<ResizableHandle />
|
|
197
|
+
<ResizablePanel defaultSize={75}>
|
|
198
|
+
<div className="flex h-full items-center justify-center p-6">
|
|
199
|
+
<span className="font-semibold text-sm">Main Content</span>
|
|
200
|
+
</div>
|
|
201
|
+
</ResizablePanel>
|
|
202
|
+
</ResizablePanelGroup>
|
|
203
|
+
</ResizablePanel>
|
|
204
|
+
</ResizablePanelGroup>
|
|
205
|
+
</ExampleSection>
|
|
206
|
+
</div>
|
|
207
|
+
);
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
// ──────────────────────────────────────────────────────────
|
|
211
|
+
// SECTION 2: Entry point
|
|
212
|
+
// ──────────────────────────────────────────────────────────
|
|
213
|
+
export default function ResizableShowcase() {
|
|
214
|
+
return (
|
|
215
|
+
<Showcase
|
|
216
|
+
title="Resizable"
|
|
217
|
+
description="Panel có thể thay đổi kích thước với hỗ trợ bàn phím, lồng nhau linh hoạt."
|
|
218
|
+
generalConcept={
|
|
219
|
+
<ShowcaseDocs>
|
|
220
|
+
<DocsP>
|
|
221
|
+
Resizable sử dụng thư viện{" "}
|
|
222
|
+
<DocsCode>react-resizable-panels</DocsCode> để tạo các panel có thể
|
|
223
|
+
kéo thay đổi kích thước. Dùng{" "}
|
|
224
|
+
<DocsCode>ResizablePanelGroup</DocsCode> làm container,{" "}
|
|
225
|
+
<DocsCode>ResizablePanel</DocsCode> cho nội dung, và{" "}
|
|
226
|
+
<DocsCode>ResizableHandle</DocsCode> cho thanh phân cách tương tác.
|
|
227
|
+
Prop <DocsCode>withHandle</DocsCode> hiển thị visual grip giúp người
|
|
228
|
+
dùng dễ nhận biết vùng kéo hơn.
|
|
229
|
+
</DocsP>
|
|
230
|
+
</ShowcaseDocs>
|
|
231
|
+
}
|
|
232
|
+
tabs={[
|
|
233
|
+
{ label: "Micro (Primitive)", content: <ResizableMicroShowcase /> },
|
|
234
|
+
]}
|
|
235
|
+
/>
|
|
236
|
+
);
|
|
237
|
+
}
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
import { ScrollArea, ScrollBar } from "../../components/micro/scroll-area";
|
|
2
|
+
import {
|
|
3
|
+
DocsCode,
|
|
4
|
+
DocsH3,
|
|
5
|
+
DocsP,
|
|
6
|
+
ExampleGrid,
|
|
7
|
+
ExampleSection,
|
|
8
|
+
Showcase,
|
|
9
|
+
ShowcaseDocs,
|
|
10
|
+
} from "../../dev/components/showcase";
|
|
11
|
+
|
|
12
|
+
// ──────────────────────────────────────────────────────────
|
|
13
|
+
// SECTION 1: Explicit Sub-components for Demo
|
|
14
|
+
// ──────────────────────────────────────────────────────────
|
|
15
|
+
function VerticalList() {
|
|
16
|
+
const items = [
|
|
17
|
+
"Tùy chọn 1",
|
|
18
|
+
"Tùy chọn 2",
|
|
19
|
+
"Tùy chọn 3",
|
|
20
|
+
"Tùy chọn 4",
|
|
21
|
+
"Tùy chọn 5",
|
|
22
|
+
"Tùy chọn 6",
|
|
23
|
+
"Tùy chọn 7",
|
|
24
|
+
"Tùy chọn 8",
|
|
25
|
+
"Tùy chọn 9",
|
|
26
|
+
"Tùy chọn 10",
|
|
27
|
+
"Tùy chọn 11",
|
|
28
|
+
"Tùy chọn 12",
|
|
29
|
+
"Tùy chọn 13",
|
|
30
|
+
"Tùy chọn 14",
|
|
31
|
+
"Tùy chọn 15",
|
|
32
|
+
"Tùy chọn 16",
|
|
33
|
+
"Tùy chọn 17",
|
|
34
|
+
"Tùy chọn 18",
|
|
35
|
+
"Tùy chọn 19",
|
|
36
|
+
"Tùy chọn 20",
|
|
37
|
+
];
|
|
38
|
+
return (
|
|
39
|
+
<div className="p-4">
|
|
40
|
+
<h4 className="mb-4 text-sm font-medium leading-none">
|
|
41
|
+
Cài đặt hệ thống
|
|
42
|
+
</h4>
|
|
43
|
+
{items.map((label) => (
|
|
44
|
+
<div
|
|
45
|
+
key={label}
|
|
46
|
+
className="text-sm py-3 border-b border-b-border last:border-0 hover:bg-muted/50 cursor-pointer"
|
|
47
|
+
>
|
|
48
|
+
{label}
|
|
49
|
+
</div>
|
|
50
|
+
))}
|
|
51
|
+
</div>
|
|
52
|
+
);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
function HorizontalList() {
|
|
56
|
+
const works = [
|
|
57
|
+
{ title: "Tác phẩm 1", artist: "Họa sĩ 1" },
|
|
58
|
+
{ title: "Tác phẩm 2", artist: "Họa sĩ 2" },
|
|
59
|
+
{ title: "Tác phẩm 3", artist: "Họa sĩ 3" },
|
|
60
|
+
{ title: "Tác phẩm 4", artist: "Họa sĩ 4" },
|
|
61
|
+
{ title: "Tác phẩm 5", artist: "Họa sĩ 5" },
|
|
62
|
+
];
|
|
63
|
+
return (
|
|
64
|
+
<div className="flex w-max space-x-4 p-4">
|
|
65
|
+
{works.map((w) => (
|
|
66
|
+
<div key={w.title} className="w-[150px] shrink-0">
|
|
67
|
+
<div className="overflow-hidden rounded-md bg-muted aspect-[3/4] mb-2 flex items-center justify-center">
|
|
68
|
+
<span className="text-xs text-muted-foreground">Ảnh bìa</span>
|
|
69
|
+
</div>
|
|
70
|
+
<p className="text-sm font-medium">{w.title}</p>
|
|
71
|
+
<p className="text-xs text-muted-foreground">{w.artist}</p>
|
|
72
|
+
</div>
|
|
73
|
+
))}
|
|
74
|
+
</div>
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
// ──────────────────────────────────────────────────────────
|
|
79
|
+
// SECTION 2: Micro Content (Only Micro exists)
|
|
80
|
+
// ──────────────────────────────────────────────────────────
|
|
81
|
+
function ScrollAreaMicroShowcase() {
|
|
82
|
+
return (
|
|
83
|
+
<div className="space-y-10 mt-6">
|
|
84
|
+
<ExampleGrid>
|
|
85
|
+
<ExampleSection
|
|
86
|
+
label="Cuộn dọc (Vertical)"
|
|
87
|
+
description="Danh sách các mục có thể cuộn từ trên xuống dưới."
|
|
88
|
+
codeString={`<ScrollArea className="h-72 w-full max-w-sm rounded-xl border border-border bg-card">
|
|
89
|
+
<div className="p-4">
|
|
90
|
+
<h4 className="mb-4 text-sm font-medium leading-none">
|
|
91
|
+
Cài đặt hệ thống
|
|
92
|
+
</h4>
|
|
93
|
+
<div className="text-sm py-3 border-b border-b-border hover:bg-muted/50 cursor-pointer">Tùy chọn 1</div>
|
|
94
|
+
<div className="text-sm py-3 border-b border-b-border hover:bg-muted/50 cursor-pointer">Tùy chọn 2</div>
|
|
95
|
+
<div className="text-sm py-3 border-b border-b-border hover:bg-muted/50 cursor-pointer">Tùy chọn 3</div>
|
|
96
|
+
{/* ... */}
|
|
97
|
+
</div>
|
|
98
|
+
</ScrollArea>`}
|
|
99
|
+
>
|
|
100
|
+
<ScrollArea className="h-72 w-full max-w-sm rounded-xl border border-border bg-card">
|
|
101
|
+
<VerticalList />
|
|
102
|
+
</ScrollArea>
|
|
103
|
+
</ExampleSection>
|
|
104
|
+
|
|
105
|
+
<ExampleSection
|
|
106
|
+
label="Cuộn ngang (Horizontal)"
|
|
107
|
+
description="Trình bày danh sách phần tử nằm ngang (thường dùng cho ảnh, card)."
|
|
108
|
+
codeString={`<ScrollArea className="w-full max-w-sm whitespace-nowrap rounded-xl border border-border bg-card p-4">
|
|
109
|
+
<div className="flex w-max space-x-4">
|
|
110
|
+
<div className="w-[150px] shrink-0">
|
|
111
|
+
<div className="aspect-[3/4] rounded-md bg-muted" />
|
|
112
|
+
<p className="text-sm font-medium mt-2">Tác phẩm 1</p>
|
|
113
|
+
</div>
|
|
114
|
+
<div className="w-[150px] shrink-0">
|
|
115
|
+
<div className="aspect-[3/4] rounded-md bg-muted" />
|
|
116
|
+
<p className="text-sm font-medium mt-2">Tác phẩm 2</p>
|
|
117
|
+
</div>
|
|
118
|
+
{/* ... */}
|
|
119
|
+
</div>
|
|
120
|
+
<ScrollBar orientation="horizontal" />
|
|
121
|
+
</ScrollArea>`}
|
|
122
|
+
>
|
|
123
|
+
<ScrollArea className="w-full max-w-sm whitespace-nowrap rounded-xl border border-border bg-card">
|
|
124
|
+
<HorizontalList />
|
|
125
|
+
<ScrollBar orientation="horizontal" />
|
|
126
|
+
</ScrollArea>
|
|
127
|
+
</ExampleSection>
|
|
128
|
+
</ExampleGrid>
|
|
129
|
+
</div>
|
|
130
|
+
);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
// ──────────────────────────────────────────────────────────
|
|
134
|
+
// SECTION 3: Entry point
|
|
135
|
+
// ──────────────────────────────────────────────────────────
|
|
136
|
+
export default function ScrollAreaShowcase() {
|
|
137
|
+
return (
|
|
138
|
+
<Showcase
|
|
139
|
+
title="Scroll Area"
|
|
140
|
+
description="Khu vực nội dung có thanh cuộn tuỳ biến giao diện, đồng bộ trên mọi trình duyệt thay cho thanh cuộn mặc định."
|
|
141
|
+
generalConcept={
|
|
142
|
+
<ShowcaseDocs>
|
|
143
|
+
<DocsH3>Scroll Area (Khu vực cuộn)</DocsH3>
|
|
144
|
+
<DocsP>
|
|
145
|
+
<DocsCode>ScrollArea</DocsCode> không có phiên bản Macro. Nó thay
|
|
146
|
+
thế thanh cuộn mặc định của trình duyệt bằng một thanh cuộn tuỳ biến
|
|
147
|
+
đẹp mắt, đồng nhất trên mọi nền tảng (Windows/Mac) mà không làm mất
|
|
148
|
+
đi trải nghiệm native (chỉ hiện khi hover).
|
|
149
|
+
</DocsP>
|
|
150
|
+
</ShowcaseDocs>
|
|
151
|
+
}
|
|
152
|
+
tabs={[
|
|
153
|
+
{ label: "Micro (Primitive)", content: <ScrollAreaMicroShowcase /> },
|
|
154
|
+
]}
|
|
155
|
+
/>
|
|
156
|
+
);
|
|
157
|
+
}
|