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,493 @@
|
|
|
1
|
+
import {
|
|
2
|
+
DocsP,
|
|
3
|
+
ExampleGrid,
|
|
4
|
+
ExampleSection,
|
|
5
|
+
Showcase,
|
|
6
|
+
ShowcaseDocs,
|
|
7
|
+
} from "../../dev/components/showcase";
|
|
8
|
+
|
|
9
|
+
import {
|
|
10
|
+
CheckCircle2Icon,
|
|
11
|
+
FileTextIcon,
|
|
12
|
+
FolderOpenIcon,
|
|
13
|
+
InboxIcon,
|
|
14
|
+
LayersIcon,
|
|
15
|
+
PlusIcon,
|
|
16
|
+
SearchIcon,
|
|
17
|
+
} from "lucide-react";
|
|
18
|
+
|
|
19
|
+
import { EmptyPreset } from "../../components/macro/empty-preset";
|
|
20
|
+
import { Button } from "../../components/micro/button";
|
|
21
|
+
import {
|
|
22
|
+
Empty,
|
|
23
|
+
EmptyAction,
|
|
24
|
+
EmptyContent,
|
|
25
|
+
EmptyDescription,
|
|
26
|
+
EmptyHeader,
|
|
27
|
+
EmptyMedia,
|
|
28
|
+
EmptyTitle,
|
|
29
|
+
} from "../../components/micro/empty";
|
|
30
|
+
|
|
31
|
+
// ──────────────────────────────────────────────────────────
|
|
32
|
+
// SECTION 1: Macro Content
|
|
33
|
+
// ──────────────────────────────────────────────────────────
|
|
34
|
+
function EmptyMacroShowcase() {
|
|
35
|
+
return (
|
|
36
|
+
<div className="space-y-10 mt-6">
|
|
37
|
+
<ExampleGrid>
|
|
38
|
+
<ExampleSection
|
|
39
|
+
label="Tiêu chuẩn (Standard)"
|
|
40
|
+
description="Đầy đủ icon, title, description, action button."
|
|
41
|
+
codeString={`<EmptyPreset
|
|
42
|
+
icon={<FolderOpenIcon className="size-4 text-muted-foreground" />}
|
|
43
|
+
title="No projects yet"
|
|
44
|
+
description="Create your first project to get started."
|
|
45
|
+
action={<Button>New Project</Button>}
|
|
46
|
+
className="w-full min-h-[280px]"
|
|
47
|
+
/>`}
|
|
48
|
+
>
|
|
49
|
+
<EmptyPreset
|
|
50
|
+
icon={<FolderOpenIcon className="size-4 text-muted-foreground" />}
|
|
51
|
+
title="No projects yet"
|
|
52
|
+
description="Create your first project to get started."
|
|
53
|
+
action={<Button>New Project</Button>}
|
|
54
|
+
className="w-full min-h-[280px]"
|
|
55
|
+
/>
|
|
56
|
+
</ExampleSection>
|
|
57
|
+
|
|
58
|
+
<ExampleSection
|
|
59
|
+
label="Không có Icon (Without Icon)"
|
|
60
|
+
description="Bỏ prop icon — phù hợp khi không cần hình ảnh minh họa."
|
|
61
|
+
codeString={`<EmptyPreset
|
|
62
|
+
title="No notifications"
|
|
63
|
+
description="You're all caught up. Check back later."
|
|
64
|
+
action={<Button variant="outline">Refresh</Button>}
|
|
65
|
+
className="w-full min-h-[280px]"
|
|
66
|
+
/>
|
|
67
|
+
`}
|
|
68
|
+
>
|
|
69
|
+
<EmptyPreset
|
|
70
|
+
title="No notifications"
|
|
71
|
+
description="You're all caught up. Check back later."
|
|
72
|
+
action={<Button variant="outline">Refresh</Button>}
|
|
73
|
+
className="w-full min-h-[280px]"
|
|
74
|
+
/>
|
|
75
|
+
</ExampleSection>
|
|
76
|
+
</ExampleGrid>
|
|
77
|
+
|
|
78
|
+
<ExampleGrid>
|
|
79
|
+
<ExampleSection
|
|
80
|
+
label="Không có Nút (Without Action)"
|
|
81
|
+
description="Chỉ hiển thị trạng thái, không yêu cầu hành động."
|
|
82
|
+
codeString={`<EmptyPreset
|
|
83
|
+
icon={<InboxIcon className="size-4 text-muted-foreground" />}
|
|
84
|
+
title="No messages"
|
|
85
|
+
description="Messages from your team will appear here."
|
|
86
|
+
className="w-full min-h-[240px]"
|
|
87
|
+
/>`}
|
|
88
|
+
>
|
|
89
|
+
<EmptyPreset
|
|
90
|
+
icon={<InboxIcon className="size-4 text-muted-foreground" />}
|
|
91
|
+
title="No messages"
|
|
92
|
+
description="Messages from your team will appear here."
|
|
93
|
+
className="w-full min-h-[240px]"
|
|
94
|
+
/>
|
|
95
|
+
</ExampleSection>
|
|
96
|
+
|
|
97
|
+
<ExampleSection
|
|
98
|
+
label="Tối giản (Minimal)"
|
|
99
|
+
description="Chỉ có tiêu đề."
|
|
100
|
+
codeString={`<EmptyPreset
|
|
101
|
+
title="Nothing here yet"
|
|
102
|
+
className="w-full min-h-[240px]"
|
|
103
|
+
/>
|
|
104
|
+
`}
|
|
105
|
+
>
|
|
106
|
+
<EmptyPreset
|
|
107
|
+
title="Nothing here yet"
|
|
108
|
+
className="w-full min-h-[240px]"
|
|
109
|
+
/>
|
|
110
|
+
</ExampleSection>
|
|
111
|
+
</ExampleGrid>
|
|
112
|
+
|
|
113
|
+
<ExampleGrid>
|
|
114
|
+
<ExampleSection
|
|
115
|
+
label="Kết quả tìm kiếm trống"
|
|
116
|
+
description="Pattern phổ biến khi tìm kiếm không ra kết quả."
|
|
117
|
+
fullWidth
|
|
118
|
+
codeString={`<EmptyPreset
|
|
119
|
+
icon={<SearchIcon className="size-4 text-muted-foreground" />}
|
|
120
|
+
title={'No results for "invoice"'}
|
|
121
|
+
description="Try a different search term or clear all active filters."
|
|
122
|
+
action={
|
|
123
|
+
<div className="flex gap-2">
|
|
124
|
+
<Button variant="outline">Clear filters</Button>
|
|
125
|
+
<Button>Browse all</Button>
|
|
126
|
+
</div>
|
|
127
|
+
}
|
|
128
|
+
className="w-full min-h-[240px]"
|
|
129
|
+
/>`}
|
|
130
|
+
>
|
|
131
|
+
<div className="w-full max-w-md">
|
|
132
|
+
<EmptyPreset
|
|
133
|
+
icon={<SearchIcon className="size-4 text-muted-foreground" />}
|
|
134
|
+
title={`No results for "invoice"`}
|
|
135
|
+
description="Try a different search term or clear all active filters."
|
|
136
|
+
action={
|
|
137
|
+
<div className="flex gap-2">
|
|
138
|
+
<Button variant="outline">Clear filters</Button>
|
|
139
|
+
<Button>Browse all</Button>
|
|
140
|
+
</div>
|
|
141
|
+
}
|
|
142
|
+
className="w-full min-h-[240px]"
|
|
143
|
+
/>
|
|
144
|
+
</div>
|
|
145
|
+
</ExampleSection>
|
|
146
|
+
|
|
147
|
+
<ExampleSection
|
|
148
|
+
label="Danh sách tài liệu (Document State)"
|
|
149
|
+
description="Description chứa liên kết HTML."
|
|
150
|
+
fullWidth
|
|
151
|
+
codeString={`<EmptyPreset
|
|
152
|
+
icon={<FileTextIcon className="size-4 text-muted-foreground" />}
|
|
153
|
+
title="No documents"
|
|
154
|
+
description={
|
|
155
|
+
<>
|
|
156
|
+
Upload or create your first document. <a href="#">Learn more</a>.
|
|
157
|
+
</>
|
|
158
|
+
}
|
|
159
|
+
action={<Button>Upload Document</Button>}
|
|
160
|
+
className="w-full min-h-[240px]"
|
|
161
|
+
/>`}
|
|
162
|
+
>
|
|
163
|
+
<div className="w-full max-w-md">
|
|
164
|
+
<EmptyPreset
|
|
165
|
+
icon={<FileTextIcon className="size-4 text-muted-foreground" />}
|
|
166
|
+
title="No documents"
|
|
167
|
+
description={
|
|
168
|
+
<>
|
|
169
|
+
Upload or create your first document.{" "}
|
|
170
|
+
<a href="#">Learn more</a>.
|
|
171
|
+
</>
|
|
172
|
+
}
|
|
173
|
+
action={<Button>Upload Document</Button>}
|
|
174
|
+
className="w-full min-h-[240px]"
|
|
175
|
+
/>
|
|
176
|
+
</div>
|
|
177
|
+
</ExampleSection>
|
|
178
|
+
</ExampleGrid>
|
|
179
|
+
</div>
|
|
180
|
+
);
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
// ──────────────────────────────────────────────────────────
|
|
184
|
+
// SECTION 2: Micro Content
|
|
185
|
+
// ──────────────────────────────────────────────────────────
|
|
186
|
+
function EmptyMicroShowcase() {
|
|
187
|
+
return (
|
|
188
|
+
<div className="space-y-10 mt-6">
|
|
189
|
+
<ExampleGrid>
|
|
190
|
+
<ExampleSection
|
|
191
|
+
label="Cơ bản (Default)"
|
|
192
|
+
description="Trạng thái trống cơ bản với cấu trúc thủ công."
|
|
193
|
+
codeString={`<Empty className="w-full min-h-[280px]">
|
|
194
|
+
<EmptyHeader>
|
|
195
|
+
<EmptyTitle>No customers found</EmptyTitle>
|
|
196
|
+
<EmptyDescription>
|
|
197
|
+
Get started by adding your first customer.
|
|
198
|
+
</EmptyDescription>
|
|
199
|
+
</EmptyHeader>
|
|
200
|
+
<EmptyContent>
|
|
201
|
+
<EmptyAction>
|
|
202
|
+
<Button>
|
|
203
|
+
<PlusIcon className="mr-2" />
|
|
204
|
+
Add Customer
|
|
205
|
+
</Button>
|
|
206
|
+
</EmptyAction>
|
|
207
|
+
</EmptyContent>
|
|
208
|
+
</Empty>
|
|
209
|
+
`}
|
|
210
|
+
>
|
|
211
|
+
<Empty className="w-full min-h-[280px]">
|
|
212
|
+
<EmptyHeader>
|
|
213
|
+
<EmptyTitle>No customers found</EmptyTitle>
|
|
214
|
+
<EmptyDescription>
|
|
215
|
+
Get started by adding your first customer.
|
|
216
|
+
</EmptyDescription>
|
|
217
|
+
</EmptyHeader>
|
|
218
|
+
<EmptyContent>
|
|
219
|
+
<EmptyAction>
|
|
220
|
+
<Button>
|
|
221
|
+
<PlusIcon className="mr-2" />
|
|
222
|
+
Add Customer
|
|
223
|
+
</Button>
|
|
224
|
+
</EmptyAction>
|
|
225
|
+
</EmptyContent>
|
|
226
|
+
</Empty>
|
|
227
|
+
</ExampleSection>
|
|
228
|
+
|
|
229
|
+
<ExampleSection
|
|
230
|
+
label="Kèm Icon nền màu (Icon Variant)"
|
|
231
|
+
description="Dùng EmptyMedia variant='icon' để hiển thị background mờ cho Icon."
|
|
232
|
+
codeString={`<Empty className="w-full min-h-[280px]">
|
|
233
|
+
<EmptyHeader>
|
|
234
|
+
<EmptyMedia variant="icon">
|
|
235
|
+
<FolderOpenIcon className="size-4 text-muted-foreground" />
|
|
236
|
+
</EmptyMedia>
|
|
237
|
+
<EmptyTitle>No projects</EmptyTitle>
|
|
238
|
+
<EmptyDescription>
|
|
239
|
+
You don't have any active projects.
|
|
240
|
+
</EmptyDescription>
|
|
241
|
+
</EmptyHeader>
|
|
242
|
+
<EmptyContent>
|
|
243
|
+
<EmptyAction>
|
|
244
|
+
<Button>
|
|
245
|
+
<PlusIcon className="mr-2" />
|
|
246
|
+
New Project
|
|
247
|
+
</Button>
|
|
248
|
+
</EmptyAction>
|
|
249
|
+
</EmptyContent>
|
|
250
|
+
</Empty>`}
|
|
251
|
+
>
|
|
252
|
+
<Empty className="w-full min-h-[280px]">
|
|
253
|
+
<EmptyHeader>
|
|
254
|
+
<EmptyMedia variant="icon">
|
|
255
|
+
<FolderOpenIcon className="size-4 text-muted-foreground" />
|
|
256
|
+
</EmptyMedia>
|
|
257
|
+
<EmptyTitle>No projects</EmptyTitle>
|
|
258
|
+
<EmptyDescription>
|
|
259
|
+
You don't have any active projects.
|
|
260
|
+
</EmptyDescription>
|
|
261
|
+
</EmptyHeader>
|
|
262
|
+
<EmptyContent>
|
|
263
|
+
<EmptyAction>
|
|
264
|
+
<Button>
|
|
265
|
+
<PlusIcon className="mr-2" />
|
|
266
|
+
New Project
|
|
267
|
+
</Button>
|
|
268
|
+
</EmptyAction>
|
|
269
|
+
</EmptyContent>
|
|
270
|
+
</Empty>
|
|
271
|
+
</ExampleSection>
|
|
272
|
+
</ExampleGrid>
|
|
273
|
+
|
|
274
|
+
<ExampleGrid>
|
|
275
|
+
<ExampleSection
|
|
276
|
+
label="Chỉ văn bản (Text Only)"
|
|
277
|
+
description="Không icon, không action."
|
|
278
|
+
codeString={`<Empty className="w-full min-h-[200px]">
|
|
279
|
+
<EmptyHeader>
|
|
280
|
+
<EmptyTitle>No results</EmptyTitle>
|
|
281
|
+
<EmptyDescription>
|
|
282
|
+
Try adjusting your filters or search terms.
|
|
283
|
+
</EmptyDescription>
|
|
284
|
+
</EmptyHeader>
|
|
285
|
+
</Empty>
|
|
286
|
+
`}
|
|
287
|
+
>
|
|
288
|
+
<Empty className="w-full min-h-[200px]">
|
|
289
|
+
<EmptyHeader>
|
|
290
|
+
<EmptyTitle>No results</EmptyTitle>
|
|
291
|
+
<EmptyDescription>
|
|
292
|
+
Try adjusting your filters or search terms.
|
|
293
|
+
</EmptyDescription>
|
|
294
|
+
</EmptyHeader>
|
|
295
|
+
</Empty>
|
|
296
|
+
</ExampleSection>
|
|
297
|
+
|
|
298
|
+
<ExampleSection
|
|
299
|
+
label="Link bên trong mô tả (Link in Description)"
|
|
300
|
+
description="EmptyDescription tự động style thẻ <a> bên trong."
|
|
301
|
+
codeString={`<Empty className="w-full min-h-[200px]">
|
|
302
|
+
<EmptyHeader>
|
|
303
|
+
<EmptyMedia variant="icon">
|
|
304
|
+
<InboxIcon className="size-4 text-muted-foreground" />
|
|
305
|
+
</EmptyMedia>
|
|
306
|
+
<EmptyTitle>No messages yet</EmptyTitle>
|
|
307
|
+
<EmptyDescription>
|
|
308
|
+
Messages from your team will appear here. Learn more in our{" "}
|
|
309
|
+
<a href="#">documentation</a>.
|
|
310
|
+
</EmptyDescription>
|
|
311
|
+
</EmptyHeader>
|
|
312
|
+
</Empty>`}
|
|
313
|
+
>
|
|
314
|
+
<Empty className="w-full min-h-[200px]">
|
|
315
|
+
<EmptyHeader>
|
|
316
|
+
<EmptyMedia variant="icon">
|
|
317
|
+
<InboxIcon className="size-4 text-muted-foreground" />
|
|
318
|
+
</EmptyMedia>
|
|
319
|
+
<EmptyTitle>No messages yet</EmptyTitle>
|
|
320
|
+
<EmptyDescription>
|
|
321
|
+
Messages from your team will appear here. Learn more in our{" "}
|
|
322
|
+
<a href="#">documentation</a>.
|
|
323
|
+
</EmptyDescription>
|
|
324
|
+
</EmptyHeader>
|
|
325
|
+
</Empty>
|
|
326
|
+
</ExampleSection>
|
|
327
|
+
</ExampleGrid>
|
|
328
|
+
|
|
329
|
+
<ExampleSection
|
|
330
|
+
label="Cấu trúc tùy chỉnh nâng cao"
|
|
331
|
+
description="Nút xóa bộ lọc nằm tách biệt khỏi hành động chính."
|
|
332
|
+
fullWidth
|
|
333
|
+
codeString={`<div className="w-full max-w-md">
|
|
334
|
+
<Empty className="w-full min-h-[240px]">
|
|
335
|
+
<EmptyHeader>
|
|
336
|
+
<EmptyMedia variant="icon">
|
|
337
|
+
<SearchIcon className="size-4 text-muted-foreground" />
|
|
338
|
+
</EmptyMedia>
|
|
339
|
+
<EmptyTitle>No results for "invoice"</EmptyTitle>
|
|
340
|
+
<EmptyDescription>
|
|
341
|
+
Try a different search term or clear all filters.
|
|
342
|
+
</EmptyDescription>
|
|
343
|
+
</EmptyHeader>
|
|
344
|
+
<EmptyContent>
|
|
345
|
+
<EmptyAction>
|
|
346
|
+
<Button variant="outline">Clear filters</Button>
|
|
347
|
+
</EmptyAction>
|
|
348
|
+
</EmptyContent>
|
|
349
|
+
</Empty>
|
|
350
|
+
</div>
|
|
351
|
+
`}
|
|
352
|
+
>
|
|
353
|
+
<div className="w-full max-w-md">
|
|
354
|
+
<Empty className="w-full min-h-[240px]">
|
|
355
|
+
<EmptyHeader>
|
|
356
|
+
<EmptyMedia variant="icon">
|
|
357
|
+
<SearchIcon className="size-4 text-muted-foreground" />
|
|
358
|
+
</EmptyMedia>
|
|
359
|
+
<EmptyTitle>No results for "invoice"</EmptyTitle>
|
|
360
|
+
<EmptyDescription>
|
|
361
|
+
Try a different search term or clear all filters.
|
|
362
|
+
</EmptyDescription>
|
|
363
|
+
</EmptyHeader>
|
|
364
|
+
<EmptyContent>
|
|
365
|
+
<EmptyAction>
|
|
366
|
+
<Button variant="outline">Clear filters</Button>
|
|
367
|
+
</EmptyAction>
|
|
368
|
+
</EmptyContent>
|
|
369
|
+
</Empty>
|
|
370
|
+
</div>
|
|
371
|
+
</ExampleSection>
|
|
372
|
+
|
|
373
|
+
{/* ── Use Case Comparison ─────────────────────── */}
|
|
374
|
+
<ExampleSection
|
|
375
|
+
label="🧭 Use Case Comparison"
|
|
376
|
+
description="Các kịch bản thực tế giúp bạn quyết định nên dùng Micro hay Macro."
|
|
377
|
+
fullWidth
|
|
378
|
+
codeString={`<div className="grid grid-cols-1 gap-6 md:grid-cols-2">
|
|
379
|
+
{/* ── Story 1: Macro wins ── */}
|
|
380
|
+
<div className="rounded-xl border border-border bg-card p-5 flex flex-col gap-4">
|
|
381
|
+
<div className="flex items-start gap-3">
|
|
382
|
+
<span className="mt-0.5 shrink-0 rounded-full bg-green-500/10 p-1.5 text-green-600">
|
|
383
|
+
<CheckCircle2Icon className="size-4" aria-hidden="true" />
|
|
384
|
+
</span>
|
|
385
|
+
<div>
|
|
386
|
+
<p className="text-xs font-semibold uppercase tracking-wider text-muted-foreground">
|
|
387
|
+
Story 1 · Dùng Macro
|
|
388
|
+
</p>
|
|
389
|
+
<h3 className="mt-0.5 text-sm font-semibold text-foreground">
|
|
390
|
+
Giao diện trống tiêu chuẩn
|
|
391
|
+
</h3>
|
|
392
|
+
</div>
|
|
393
|
+
</div>
|
|
394
|
+
<p className="text-xs text-muted-foreground leading-relaxed">
|
|
395
|
+
Dùng \`EmptyPreset\` khi bạn chỉ cần một cấu trúc trạng thái trống mặc định, bao gồm icon, tiêu đề, mô tả và nút hành động. Giúp rút ngắn code đáng kể.
|
|
396
|
+
</p>
|
|
397
|
+
</div>
|
|
398
|
+
|
|
399
|
+
{/* ── Story 2: Micro wins ── */}
|
|
400
|
+
<div className="rounded-xl border border-border bg-card p-5 flex flex-col gap-4">
|
|
401
|
+
<div className="flex items-start gap-3">
|
|
402
|
+
<span className="mt-0.5 shrink-0 rounded-full bg-blue-500/10 p-1.5 text-blue-600">
|
|
403
|
+
<LayersIcon className="size-4" aria-hidden="true" />
|
|
404
|
+
</span>
|
|
405
|
+
<div>
|
|
406
|
+
<p className="text-xs font-semibold uppercase tracking-wider text-muted-foreground">
|
|
407
|
+
Story 2 · Dùng Micro
|
|
408
|
+
</p>
|
|
409
|
+
<h3 className="mt-0.5 text-sm font-semibold text-foreground">
|
|
410
|
+
Bố cục tuỳ biến phức tạp
|
|
411
|
+
</h3>
|
|
412
|
+
</div>
|
|
413
|
+
</div>
|
|
414
|
+
<p className="text-xs text-muted-foreground leading-relaxed">
|
|
415
|
+
Dùng các thành phần con khi cần render SVG animation tuỳ chỉnh, hoán đổi vị trí của phần mô tả hoặc nút, thêm nội dung phụ như danh sách liên kết.
|
|
416
|
+
</p>
|
|
417
|
+
</div>
|
|
418
|
+
</div>`}
|
|
419
|
+
>
|
|
420
|
+
<div className="grid grid-cols-1 gap-6 md:grid-cols-2">
|
|
421
|
+
{/* ── Story 1: Macro wins ── */}
|
|
422
|
+
<div className="rounded-xl border border-border bg-card p-5 flex flex-col gap-4">
|
|
423
|
+
<div className="flex items-start gap-3">
|
|
424
|
+
<span className="mt-0.5 shrink-0 rounded-full bg-green-500/10 p-1.5 text-green-600">
|
|
425
|
+
<CheckCircle2Icon className="size-4" aria-hidden="true" />
|
|
426
|
+
</span>
|
|
427
|
+
<div>
|
|
428
|
+
<p className="text-xs font-semibold uppercase tracking-wider text-muted-foreground">
|
|
429
|
+
Story 1 · Dùng Macro
|
|
430
|
+
</p>
|
|
431
|
+
<h3 className="mt-0.5 text-sm font-semibold text-foreground">
|
|
432
|
+
Giao diện trống tiêu chuẩn
|
|
433
|
+
</h3>
|
|
434
|
+
</div>
|
|
435
|
+
</div>
|
|
436
|
+
<p className="text-xs text-muted-foreground leading-relaxed">
|
|
437
|
+
Dùng <code>EmptyPreset</code> khi bạn chỉ cần một cấu trúc trạng
|
|
438
|
+
thái trống mặc định, bao gồm icon, tiêu đề, mô tả và nút hành
|
|
439
|
+
động. Giúp rút ngắn code đáng kể.
|
|
440
|
+
</p>
|
|
441
|
+
</div>
|
|
442
|
+
|
|
443
|
+
{/* ── Story 2: Micro wins ── */}
|
|
444
|
+
<div className="rounded-xl border border-border bg-card p-5 flex flex-col gap-4">
|
|
445
|
+
<div className="flex items-start gap-3">
|
|
446
|
+
<span className="mt-0.5 shrink-0 rounded-full bg-blue-500/10 p-1.5 text-blue-600">
|
|
447
|
+
<LayersIcon className="size-4" aria-hidden="true" />
|
|
448
|
+
</span>
|
|
449
|
+
<div>
|
|
450
|
+
<p className="text-xs font-semibold uppercase tracking-wider text-muted-foreground">
|
|
451
|
+
Story 2 · Dùng Micro
|
|
452
|
+
</p>
|
|
453
|
+
<h3 className="mt-0.5 text-sm font-semibold text-foreground">
|
|
454
|
+
Bố cục tuỳ biến phức tạp
|
|
455
|
+
</h3>
|
|
456
|
+
</div>
|
|
457
|
+
</div>
|
|
458
|
+
<p className="text-xs text-muted-foreground leading-relaxed">
|
|
459
|
+
Dùng các thành phần con khi cần render SVG animation tuỳ chỉnh,
|
|
460
|
+
hoán đổi vị trí của phần mô tả hoặc nút, thêm nội dung phụ như
|
|
461
|
+
danh sách liên kết.
|
|
462
|
+
</p>
|
|
463
|
+
</div>
|
|
464
|
+
</div>
|
|
465
|
+
</ExampleSection>
|
|
466
|
+
</div>
|
|
467
|
+
);
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
// ──────────────────────────────────────────────────────────
|
|
471
|
+
// SECTION 3: Entry point
|
|
472
|
+
// ──────────────────────────────────────────────────────────
|
|
473
|
+
export default function EmptyShowcase() {
|
|
474
|
+
return (
|
|
475
|
+
<Showcase
|
|
476
|
+
title="Empty"
|
|
477
|
+
description="Trạng thái trống hiển thị khi không có dữ liệu, chưa có nội dung, hoặc tìm kiếm không ra kết quả."
|
|
478
|
+
generalConcept={
|
|
479
|
+
<ShowcaseDocs>
|
|
480
|
+
<DocsP>
|
|
481
|
+
Dùng để thông báo cho người dùng rằng không có dữ liệu để hiển thị ở
|
|
482
|
+
đây. Nó thường đi kèm với hình ảnh hoặc icon minh họa
|
|
483
|
+
và một hành động hướng dẫn để lấp đầy nội dung này (ví dụ: Tạo mới).
|
|
484
|
+
</DocsP>
|
|
485
|
+
</ShowcaseDocs>
|
|
486
|
+
}
|
|
487
|
+
tabs={[
|
|
488
|
+
{ label: "Micro (Primitive)", content: <EmptyMicroShowcase /> },
|
|
489
|
+
{ label: "Macro (Preset)", content: <EmptyMacroShowcase /> },
|
|
490
|
+
]}
|
|
491
|
+
/>
|
|
492
|
+
);
|
|
493
|
+
}
|