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,448 @@
|
|
|
1
|
+
import { useDevContext } from "../../dev/components/dev-context";
|
|
2
|
+
import {
|
|
3
|
+
DocsP,
|
|
4
|
+
ExampleGrid,
|
|
5
|
+
ExampleSection,
|
|
6
|
+
Showcase,
|
|
7
|
+
ShowcaseDocs,
|
|
8
|
+
} from "../../dev/components/showcase";
|
|
9
|
+
import { useState } from "react";
|
|
10
|
+
|
|
11
|
+
import { CardPreset } from "../../components/macro/card-preset";
|
|
12
|
+
import { Badge } from "../../components/micro/badge";
|
|
13
|
+
import { Button } from "../../components/micro/button";
|
|
14
|
+
import {
|
|
15
|
+
Card,
|
|
16
|
+
CardContent,
|
|
17
|
+
CardDescription,
|
|
18
|
+
CardFooter,
|
|
19
|
+
CardHeader,
|
|
20
|
+
CardTitle,
|
|
21
|
+
} from "../../components/micro/card";
|
|
22
|
+
import { Input } from "../../components/micro/input";
|
|
23
|
+
import { Label } from "../../components/micro/label";
|
|
24
|
+
import { type Size } from "../../lib/types";
|
|
25
|
+
|
|
26
|
+
// ──────────────────────────────────────────────────────────
|
|
27
|
+
// SECTION 1: Macro Content
|
|
28
|
+
// ──────────────────────────────────────────────────────────
|
|
29
|
+
function CardMacroShowcase({ globalSize }: { globalSize: Size }) {
|
|
30
|
+
return (
|
|
31
|
+
<div className="space-y-10 mt-6">
|
|
32
|
+
<ExampleGrid>
|
|
33
|
+
<ExampleSection
|
|
34
|
+
label="Tiêu chuẩn (Standard)"
|
|
35
|
+
description="Card cài sẵn với đầy đủ tiêu đề, nội dung và chân trang."
|
|
36
|
+
codeString={`<CardPreset
|
|
37
|
+
title="Account Settings"
|
|
38
|
+
description="Quản lý các cài đặt và tùy chọn cho tài khoản của bạn."
|
|
39
|
+
footer={<Button>Save Changes</Button>}
|
|
40
|
+
className="w-full"
|
|
41
|
+
>
|
|
42
|
+
<div className="text-sm text-muted-foreground bg-muted/30 p-4 rounded-lg border border-dashed border-border/50">
|
|
43
|
+
Settings form content goes here.
|
|
44
|
+
</div>
|
|
45
|
+
</CardPreset>`}
|
|
46
|
+
>
|
|
47
|
+
<CardPreset
|
|
48
|
+
size={globalSize}
|
|
49
|
+
title="Account Settings"
|
|
50
|
+
description="Quản lý các cài đặt và tùy chọn cho tài khoản của bạn."
|
|
51
|
+
footer={<Button size={globalSize}>Save Changes</Button>}
|
|
52
|
+
className="w-full"
|
|
53
|
+
>
|
|
54
|
+
<div className="text-sm text-muted-foreground bg-muted/30 p-4 rounded-lg border border-dashed border-border/50">
|
|
55
|
+
Settings form content goes here.
|
|
56
|
+
</div>
|
|
57
|
+
</CardPreset>
|
|
58
|
+
</ExampleSection>
|
|
59
|
+
|
|
60
|
+
<ExampleSection
|
|
61
|
+
label="Không có Footer"
|
|
62
|
+
description="Bỏ qua prop footer để ẩn hoàn toàn phần chân trang."
|
|
63
|
+
codeString={`<CardPreset
|
|
64
|
+
title="Notification Preferences"
|
|
65
|
+
description="Chọn những thông tin mà bạn muốn nhận thông báo."
|
|
66
|
+
className="w-full"
|
|
67
|
+
>
|
|
68
|
+
<div className="text-sm text-muted-foreground bg-muted/30 p-4 rounded-lg border border-dashed border-border/50">
|
|
69
|
+
Switches and toggles go here.
|
|
70
|
+
</div>
|
|
71
|
+
</CardPreset>
|
|
72
|
+
`}
|
|
73
|
+
>
|
|
74
|
+
<CardPreset
|
|
75
|
+
size={globalSize}
|
|
76
|
+
title="Notification Preferences"
|
|
77
|
+
description="Chọn những thông tin mà bạn muốn nhận thông báo."
|
|
78
|
+
className="w-full"
|
|
79
|
+
>
|
|
80
|
+
<div className="text-sm text-muted-foreground bg-muted/30 p-4 rounded-lg border border-dashed border-border/50">
|
|
81
|
+
Switches and toggles go here.
|
|
82
|
+
</div>
|
|
83
|
+
</CardPreset>
|
|
84
|
+
</ExampleSection>
|
|
85
|
+
|
|
86
|
+
<ExampleSection
|
|
87
|
+
label="Custom Title Node"
|
|
88
|
+
description="Tiêu đề hỗ trợ nhận ReactNode thay vì string."
|
|
89
|
+
codeString={`<CardPreset
|
|
90
|
+
title={
|
|
91
|
+
<div className="flex items-center gap-2">
|
|
92
|
+
<span>API Keys</span>
|
|
93
|
+
<Badge color="warning">Experimental</Badge>
|
|
94
|
+
</div>
|
|
95
|
+
}
|
|
96
|
+
description="Quản lý các khóa API bí mật của bạn."
|
|
97
|
+
className="w-full"
|
|
98
|
+
>
|
|
99
|
+
<div className="text-sm text-muted-foreground bg-muted/30 p-4 rounded-lg border border-dashed border-border/50 flex items-center justify-between">
|
|
100
|
+
<span className="font-mono">sk_live_123...</span>
|
|
101
|
+
<Button size="sm" variant="outline">Copy</Button>
|
|
102
|
+
</div>
|
|
103
|
+
</CardPreset>`}
|
|
104
|
+
>
|
|
105
|
+
<CardPreset
|
|
106
|
+
size={globalSize}
|
|
107
|
+
title={
|
|
108
|
+
<div className="flex items-center gap-2">
|
|
109
|
+
<span>API Keys</span>
|
|
110
|
+
<Badge color="warning">Experimental</Badge>
|
|
111
|
+
</div>
|
|
112
|
+
}
|
|
113
|
+
description="Quản lý các khóa API bí mật của bạn."
|
|
114
|
+
className="w-full"
|
|
115
|
+
>
|
|
116
|
+
<div className="text-sm text-muted-foreground bg-muted/30 p-4 rounded-lg border border-dashed border-border/50 flex items-center justify-between">
|
|
117
|
+
<span className="font-mono">sk_live_123...</span>
|
|
118
|
+
<Button size="sm" variant="outline">
|
|
119
|
+
Copy
|
|
120
|
+
</Button>
|
|
121
|
+
</div>
|
|
122
|
+
</CardPreset>
|
|
123
|
+
</ExampleSection>
|
|
124
|
+
|
|
125
|
+
<ExampleSection
|
|
126
|
+
label="Với Form Controls"
|
|
127
|
+
description="Sử dụng children để đặt input form bên trong nội dung."
|
|
128
|
+
codeString={`<CardPreset
|
|
129
|
+
title="Update Profile"
|
|
130
|
+
description="Thay đổi tên hiển thị và email của bạn."
|
|
131
|
+
footer={
|
|
132
|
+
<div className="flex justify-between w-full">
|
|
133
|
+
<Button variant="ghost">Cancel</Button>
|
|
134
|
+
<Button>Save</Button>
|
|
135
|
+
</div>
|
|
136
|
+
}
|
|
137
|
+
className="w-full"
|
|
138
|
+
>
|
|
139
|
+
<div className="grid gap-4">
|
|
140
|
+
<div className="flex flex-col space-y-1.5">
|
|
141
|
+
<Label htmlFor="macro-name">Name</Label>
|
|
142
|
+
<Input id="macro-name" placeholder="Enter your name" />
|
|
143
|
+
</div>
|
|
144
|
+
<div className="flex flex-col space-y-1.5">
|
|
145
|
+
<Label htmlFor="macro-email">Email</Label>
|
|
146
|
+
<Input id="macro-email" type="email" placeholder="hello@example.com" />
|
|
147
|
+
</div>
|
|
148
|
+
</div>
|
|
149
|
+
</CardPreset>`}
|
|
150
|
+
>
|
|
151
|
+
<CardPreset
|
|
152
|
+
size={globalSize}
|
|
153
|
+
title="Update Profile"
|
|
154
|
+
description="Thay đổi tên hiển thị và email của bạn."
|
|
155
|
+
footer={
|
|
156
|
+
<div className="flex justify-between w-full">
|
|
157
|
+
<Button variant="ghost" size={globalSize}>
|
|
158
|
+
Cancel
|
|
159
|
+
</Button>
|
|
160
|
+
<Button size={globalSize}>Save</Button>
|
|
161
|
+
</div>
|
|
162
|
+
}
|
|
163
|
+
className="w-full"
|
|
164
|
+
>
|
|
165
|
+
<div className="grid gap-4">
|
|
166
|
+
<div className="flex flex-col space-y-1.5">
|
|
167
|
+
<Label htmlFor="macro-name">Name</Label>
|
|
168
|
+
<Input id="macro-name" placeholder="Enter your name" />
|
|
169
|
+
</div>
|
|
170
|
+
<div className="flex flex-col space-y-1.5">
|
|
171
|
+
<Label htmlFor="macro-email">Email</Label>
|
|
172
|
+
<Input
|
|
173
|
+
id="macro-email"
|
|
174
|
+
type="email"
|
|
175
|
+
placeholder="hello@example.com"
|
|
176
|
+
/>
|
|
177
|
+
</div>
|
|
178
|
+
</div>
|
|
179
|
+
</CardPreset>
|
|
180
|
+
</ExampleSection>
|
|
181
|
+
</ExampleGrid>
|
|
182
|
+
</div>
|
|
183
|
+
);
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
// ──────────────────────────────────────────────────────────
|
|
187
|
+
// SECTION 2: Micro Content
|
|
188
|
+
// ──────────────────────────────────────────────────────────
|
|
189
|
+
function CardMicroShowcase({ globalSize }: { globalSize: Size }) {
|
|
190
|
+
return (
|
|
191
|
+
<div className="space-y-10 mt-6">
|
|
192
|
+
<ExampleSection
|
|
193
|
+
label="Cơ bản (Standard)"
|
|
194
|
+
description="Lắp ráp thủ công từ CardHeader, CardTitle, CardContent, CardFooter."
|
|
195
|
+
codeString={`<Card className="w-full max-w-sm">
|
|
196
|
+
<CardHeader>
|
|
197
|
+
<CardTitle>Create project</CardTitle>
|
|
198
|
+
<CardDescription>Deploy your new project in one-click.</CardDescription>
|
|
199
|
+
</CardHeader>
|
|
200
|
+
<CardContent>
|
|
201
|
+
<form>
|
|
202
|
+
<div className="grid w-full items-center gap-4">
|
|
203
|
+
<div className="flex flex-col space-y-1.5">
|
|
204
|
+
<Label htmlFor="name">Name</Label>
|
|
205
|
+
<Input id="name" placeholder="Name of your project" />
|
|
206
|
+
</div>
|
|
207
|
+
</div>
|
|
208
|
+
</form>
|
|
209
|
+
</CardContent>
|
|
210
|
+
<CardFooter className="flex justify-between">
|
|
211
|
+
<Button variant="outline">Cancel</Button>
|
|
212
|
+
<Button>Deploy</Button>
|
|
213
|
+
</CardFooter>
|
|
214
|
+
</Card>
|
|
215
|
+
`}
|
|
216
|
+
>
|
|
217
|
+
<Card size={globalSize} className="w-full max-w-sm">
|
|
218
|
+
<CardHeader>
|
|
219
|
+
<CardTitle>Create project</CardTitle>
|
|
220
|
+
<CardDescription>
|
|
221
|
+
Deploy your new project in one-click.
|
|
222
|
+
</CardDescription>
|
|
223
|
+
</CardHeader>
|
|
224
|
+
<CardContent>
|
|
225
|
+
<form>
|
|
226
|
+
<div className="grid w-full items-center gap-4">
|
|
227
|
+
<div className="flex flex-col space-y-1.5">
|
|
228
|
+
<Label htmlFor="name">Name</Label>
|
|
229
|
+
<Input id="name" placeholder="Name of your project" />
|
|
230
|
+
</div>
|
|
231
|
+
</div>
|
|
232
|
+
</form>
|
|
233
|
+
</CardContent>
|
|
234
|
+
<CardFooter className="flex justify-between">
|
|
235
|
+
<Button variant="outline" size={globalSize}>
|
|
236
|
+
Cancel
|
|
237
|
+
</Button>
|
|
238
|
+
<Button size={globalSize}>Deploy</Button>
|
|
239
|
+
</CardFooter>
|
|
240
|
+
</Card>
|
|
241
|
+
</ExampleSection>
|
|
242
|
+
|
|
243
|
+
<ExampleGrid>
|
|
244
|
+
<ExampleSection
|
|
245
|
+
label="Chỉ có nội dung (Content Only)"
|
|
246
|
+
description="Dùng Card như một container bọc ngoài đơn giản."
|
|
247
|
+
codeString={`<Card className="w-full">
|
|
248
|
+
<CardContent>
|
|
249
|
+
<p className="text-sm text-muted-foreground pt-4 md:pt-6">
|
|
250
|
+
This is a simple content-only card without a header or footer.
|
|
251
|
+
Useful for wrapping any content in a card container.
|
|
252
|
+
</p>
|
|
253
|
+
</CardContent>
|
|
254
|
+
</Card>
|
|
255
|
+
`}
|
|
256
|
+
>
|
|
257
|
+
<Card size={globalSize} className="w-full">
|
|
258
|
+
<CardContent>
|
|
259
|
+
<p className="text-sm text-muted-foreground pt-4 md:pt-6">
|
|
260
|
+
This is a simple content-only card without a header or footer.
|
|
261
|
+
Useful for wrapping any content in a card container.
|
|
262
|
+
</p>
|
|
263
|
+
</CardContent>
|
|
264
|
+
</Card>
|
|
265
|
+
</ExampleSection>
|
|
266
|
+
|
|
267
|
+
<ExampleSection
|
|
268
|
+
label="Header đặc chế"
|
|
269
|
+
description="Tích hợp menu góc phải mà Preset khó thực hiện."
|
|
270
|
+
codeString={`<Card className="w-full">
|
|
271
|
+
<CardHeader>
|
|
272
|
+
<div className="flex items-center justify-between">
|
|
273
|
+
<div className="flex flex-col gap-1.5">
|
|
274
|
+
<div className="flex items-center gap-2">
|
|
275
|
+
<CardTitle>Notifications</CardTitle>
|
|
276
|
+
<Badge color="secondary">3 new</Badge>
|
|
277
|
+
</div>
|
|
278
|
+
<CardDescription>You have 3 unread messages.</CardDescription>
|
|
279
|
+
</div>
|
|
280
|
+
<Button variant="ghost" size="sm" iconOnly className="h-8 w-8 rounded-full">
|
|
281
|
+
<span className="sr-only">Open menu</span>
|
|
282
|
+
<svg
|
|
283
|
+
width="15"
|
|
284
|
+
height="15"
|
|
285
|
+
viewBox="0 0 15 15"
|
|
286
|
+
fill="none"
|
|
287
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
288
|
+
className="h-4 w-4"
|
|
289
|
+
>
|
|
290
|
+
<path
|
|
291
|
+
d="M3.625 7.5C3.625 8.12132 3.12132 8.625 2.5 8.625C1.87868 8.625 1.375 8.12132 1.375 7.5C1.375 6.87868 1.87868 6.375 2.5 6.375C3.12132 6.375 3.625 6.87868 3.625 7.5ZM8.625 7.5C8.625 8.12132 8.12132 8.625 7.5 8.625C6.87868 8.625 6.375 8.12132 6.375 7.5C6.375 6.87868 6.87868 6.375 7.5 6.375C8.12132 6.375 8.625 6.87868 8.625 7.5ZM13.625 7.5C13.625 8.12132 13.1213 8.625 12.5 8.625C11.8787 8.625 11.375 8.12132 11.375 7.5C11.375 6.87868 11.8787 6.375 12.5 6.375C13.1213 6.375 13.625 6.87868 13.625 7.5Z"
|
|
292
|
+
fill="currentColor"
|
|
293
|
+
fillRule="evenodd"
|
|
294
|
+
clipRule="evenodd"
|
|
295
|
+
></path>
|
|
296
|
+
</svg>
|
|
297
|
+
</Button>
|
|
298
|
+
</div>
|
|
299
|
+
</CardHeader>
|
|
300
|
+
</Card>
|
|
301
|
+
`}
|
|
302
|
+
>
|
|
303
|
+
<Card size={globalSize} className="w-full">
|
|
304
|
+
<CardHeader>
|
|
305
|
+
<div className="flex items-center justify-between">
|
|
306
|
+
<div className="flex flex-col gap-1.5">
|
|
307
|
+
<div className="flex items-center gap-2">
|
|
308
|
+
<CardTitle>Notifications</CardTitle>
|
|
309
|
+
<Badge color="secondary">3 new</Badge>
|
|
310
|
+
</div>
|
|
311
|
+
<CardDescription>You have 3 unread messages.</CardDescription>
|
|
312
|
+
</div>
|
|
313
|
+
<Button
|
|
314
|
+
variant="ghost"
|
|
315
|
+
size="sm"
|
|
316
|
+
iconOnly
|
|
317
|
+
className="h-8 w-8 rounded-full"
|
|
318
|
+
>
|
|
319
|
+
<span className="sr-only">Open menu</span>
|
|
320
|
+
<svg
|
|
321
|
+
width="15"
|
|
322
|
+
height="15"
|
|
323
|
+
viewBox="0 0 15 15"
|
|
324
|
+
fill="none"
|
|
325
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
326
|
+
className="h-4 w-4"
|
|
327
|
+
>
|
|
328
|
+
<path
|
|
329
|
+
d="M3.625 7.5C3.625 8.12132 3.12132 8.625 2.5 8.625C1.87868 8.625 1.375 8.12132 1.375 7.5C1.375 6.87868 1.87868 6.375 2.5 6.375C3.12132 6.375 3.625 6.87868 3.625 7.5ZM8.625 7.5C8.625 8.12132 8.12132 8.625 7.5 8.625C6.87868 8.625 6.375 8.12132 6.375 7.5C6.375 6.87868 6.87868 6.375 7.5 6.375C8.12132 6.375 8.625 6.87868 8.625 7.5ZM13.625 7.5C13.625 8.12132 13.1213 8.625 12.5 8.625C11.8787 8.625 11.375 8.12132 11.375 7.5C11.375 6.87868 11.8787 6.375 12.5 6.375C13.1213 6.375 13.625 6.87868 13.625 7.5Z"
|
|
330
|
+
fill="currentColor"
|
|
331
|
+
fillRule="evenodd"
|
|
332
|
+
clipRule="evenodd"
|
|
333
|
+
></path>
|
|
334
|
+
</svg>
|
|
335
|
+
</Button>
|
|
336
|
+
</div>
|
|
337
|
+
</CardHeader>
|
|
338
|
+
</Card>
|
|
339
|
+
</ExampleSection>
|
|
340
|
+
</ExampleGrid>
|
|
341
|
+
|
|
342
|
+
<ExampleSection
|
|
343
|
+
label="Thẻ chỉ số KPI (Stats Cards)"
|
|
344
|
+
description="Thiết kế thẻ dashboard thông dụng trong thực tế."
|
|
345
|
+
fullWidth
|
|
346
|
+
codeString={`<div className="grid grid-cols-1 md:grid-cols-3 gap-6 w-full">
|
|
347
|
+
<Card>
|
|
348
|
+
<CardHeader className="pb-2">
|
|
349
|
+
<CardDescription>Total Revenue</CardDescription>
|
|
350
|
+
<CardTitle className="text-3xl">\$45,231.89</CardTitle>
|
|
351
|
+
</CardHeader>
|
|
352
|
+
<CardContent>
|
|
353
|
+
<p className="text-xs text-muted-foreground">+20.1% from last month</p>
|
|
354
|
+
</CardContent>
|
|
355
|
+
</Card>
|
|
356
|
+
<Card>
|
|
357
|
+
<CardHeader className="pb-2">
|
|
358
|
+
<CardDescription>Subscriptions</CardDescription>
|
|
359
|
+
<CardTitle className="text-3xl">+2,350</CardTitle>
|
|
360
|
+
</CardHeader>
|
|
361
|
+
<CardContent>
|
|
362
|
+
<p className="text-xs text-muted-foreground">+180.1% from last month</p>
|
|
363
|
+
</CardContent>
|
|
364
|
+
</Card>
|
|
365
|
+
<Card>
|
|
366
|
+
<CardHeader className="pb-2">
|
|
367
|
+
<CardDescription>Active Now</CardDescription>
|
|
368
|
+
<CardTitle className="text-3xl">+573</CardTitle>
|
|
369
|
+
</CardHeader>
|
|
370
|
+
<CardContent>
|
|
371
|
+
<p className="text-xs text-muted-foreground">+201 since last hour</p>
|
|
372
|
+
</CardContent>
|
|
373
|
+
</Card>
|
|
374
|
+
</div>
|
|
375
|
+
`}
|
|
376
|
+
>
|
|
377
|
+
<div className="grid grid-cols-1 md:grid-cols-3 gap-6 w-full">
|
|
378
|
+
<Card size={globalSize}>
|
|
379
|
+
<CardHeader className="pb-2">
|
|
380
|
+
<CardDescription>Total Revenue</CardDescription>
|
|
381
|
+
<CardTitle className="text-3xl">$45,231.89</CardTitle>
|
|
382
|
+
</CardHeader>
|
|
383
|
+
<CardContent>
|
|
384
|
+
<p className="text-xs text-muted-foreground">
|
|
385
|
+
+20.1% from last month
|
|
386
|
+
</p>
|
|
387
|
+
</CardContent>
|
|
388
|
+
</Card>
|
|
389
|
+
<Card size={globalSize}>
|
|
390
|
+
<CardHeader className="pb-2">
|
|
391
|
+
<CardDescription>Subscriptions</CardDescription>
|
|
392
|
+
<CardTitle className="text-3xl">+2,350</CardTitle>
|
|
393
|
+
</CardHeader>
|
|
394
|
+
<CardContent>
|
|
395
|
+
<p className="text-xs text-muted-foreground">
|
|
396
|
+
+180.1% from last month
|
|
397
|
+
</p>
|
|
398
|
+
</CardContent>
|
|
399
|
+
</Card>
|
|
400
|
+
<Card size={globalSize}>
|
|
401
|
+
<CardHeader className="pb-2">
|
|
402
|
+
<CardDescription>Active Now</CardDescription>
|
|
403
|
+
<CardTitle className="text-3xl">+573</CardTitle>
|
|
404
|
+
</CardHeader>
|
|
405
|
+
<CardContent>
|
|
406
|
+
<p className="text-xs text-muted-foreground">
|
|
407
|
+
+201 since last hour
|
|
408
|
+
</p>
|
|
409
|
+
</CardContent>
|
|
410
|
+
</Card>
|
|
411
|
+
</div>
|
|
412
|
+
</ExampleSection>
|
|
413
|
+
</div>
|
|
414
|
+
);
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
// ──────────────────────────────────────────────────────────
|
|
418
|
+
// SECTION 3: Entry point
|
|
419
|
+
// ──────────────────────────────────────────────────────────
|
|
420
|
+
export default function CardShowcase() {
|
|
421
|
+
const { size: globalSize } = useDevContext();
|
|
422
|
+
return (
|
|
423
|
+
<Showcase
|
|
424
|
+
title="Card"
|
|
425
|
+
description="Thẻ hiển thị thông tin đóng gói có cấu trúc (tiêu đề, nội dung, footer)."
|
|
426
|
+
generalConcept={
|
|
427
|
+
<ShowcaseDocs>
|
|
428
|
+
<DocsP>
|
|
429
|
+
Dùng để nhóm các thông tin liên quan lại với nhau trong một
|
|
430
|
+
container có cấu trúc rõ ràng. Thường được sử dụng để hiển thị các
|
|
431
|
+
mục dữ liệu, dashboard, hoặc các form
|
|
432
|
+
nhỏ.
|
|
433
|
+
</DocsP>
|
|
434
|
+
</ShowcaseDocs>
|
|
435
|
+
}
|
|
436
|
+
tabs={[
|
|
437
|
+
{
|
|
438
|
+
label: "Micro (Primitive)",
|
|
439
|
+
content: <CardMicroShowcase globalSize={globalSize} />,
|
|
440
|
+
},
|
|
441
|
+
{
|
|
442
|
+
label: "Macro (Preset)",
|
|
443
|
+
content: <CardMacroShowcase globalSize={globalSize} />,
|
|
444
|
+
},
|
|
445
|
+
]}
|
|
446
|
+
/>
|
|
447
|
+
);
|
|
448
|
+
}
|