@arolariu/components 0.0.40 → 0.1.1
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/DEBUGGING.md +396 -401
- package/EXAMPLES.md +1035 -1035
- package/{LICENSE → LICENSE.md} +21 -21
- package/{readme.md → README.md} +627 -627
- package/changelog.md +17 -0
- package/dist/components/ui/accordion.d.ts.map +1 -0
- package/dist/components/ui/alert-dialog.d.ts.map +1 -0
- package/dist/components/ui/alert.d.ts.map +1 -0
- package/dist/components/ui/aspect-ratio.d.ts.map +1 -0
- package/dist/components/ui/avatar.d.ts.map +1 -0
- package/dist/components/ui/background-beams.d.ts.map +1 -0
- package/dist/components/ui/badge.d.ts.map +1 -0
- package/dist/components/ui/breadcrumb.d.ts.map +1 -0
- package/dist/components/ui/bubble-background.d.ts.map +1 -0
- package/dist/components/ui/bubble-background.js.map +1 -0
- package/dist/components/ui/button.d.ts.map +1 -0
- package/dist/components/ui/calendar.d.ts.map +1 -0
- package/dist/{esm/components → components}/ui/calendar.js +1 -1
- package/dist/components/ui/calendar.js.map +1 -0
- package/dist/components/ui/card.d.ts.map +1 -0
- package/dist/components/ui/carousel.d.ts.map +1 -0
- package/dist/{types/components → components}/ui/chart.d.ts +13 -13
- package/dist/components/ui/chart.d.ts.map +1 -0
- package/dist/{esm/components → components}/ui/chart.js +4 -1
- package/dist/components/ui/chart.js.map +1 -0
- package/dist/components/ui/checkbox.d.ts.map +1 -0
- package/dist/components/ui/collapsible.d.ts.map +1 -0
- package/dist/components/ui/command.d.ts.map +1 -0
- package/dist/components/ui/context-menu.d.ts.map +1 -0
- package/dist/components/ui/counting-number.d.ts.map +1 -0
- package/dist/components/ui/dialog.d.ts.map +1 -0
- package/dist/components/ui/dot-background.d.ts.map +1 -0
- package/dist/components/ui/drawer.d.ts.map +1 -0
- package/dist/components/ui/drawer.js.map +1 -0
- package/dist/components/ui/dropdown-menu.d.ts.map +1 -0
- package/dist/components/ui/dropdrawer.d.ts.map +1 -0
- package/dist/components/ui/dropdrawer.js.map +1 -0
- package/dist/components/ui/fireworks-background.d.ts.map +1 -0
- package/dist/components/ui/flip-button.d.ts.map +1 -0
- package/dist/components/ui/form.d.ts.map +1 -0
- package/dist/components/ui/gradient-background.d.ts.map +1 -0
- package/dist/components/ui/gradient-text.d.ts.map +1 -0
- package/dist/components/ui/highlight-text.d.ts.map +1 -0
- package/dist/components/ui/hole-background.d.ts.map +1 -0
- package/dist/components/ui/hover-card.d.ts.map +1 -0
- package/dist/components/ui/input-otp.d.ts.map +1 -0
- package/dist/components/ui/input.d.ts.map +1 -0
- package/dist/components/ui/input.js.map +1 -0
- package/dist/components/ui/label.d.ts.map +1 -0
- package/dist/components/ui/menubar.d.ts.map +1 -0
- package/dist/components/ui/navigation-menu.d.ts.map +1 -0
- package/dist/components/ui/pagination.d.ts.map +1 -0
- package/dist/components/ui/popover.d.ts.map +1 -0
- package/dist/components/ui/progress.d.ts.map +1 -0
- package/dist/components/ui/radio-group.d.ts.map +1 -0
- package/dist/components/ui/resizable.d.ts.map +1 -0
- package/dist/components/ui/ripple-button.d.ts.map +1 -0
- package/dist/components/ui/ripple-button.js.map +1 -0
- package/dist/components/ui/scratcher.d.ts.map +1 -0
- package/dist/components/ui/scratcher.js.map +1 -0
- package/dist/components/ui/scroll-area.d.ts.map +1 -0
- package/dist/components/ui/select.d.ts.map +1 -0
- package/dist/components/ui/separator.d.ts.map +1 -0
- package/dist/components/ui/sheet.d.ts.map +1 -0
- package/dist/components/ui/sidebar.d.ts.map +1 -0
- package/dist/components/ui/skeleton.d.ts.map +1 -0
- package/dist/components/ui/slider.d.ts.map +1 -0
- package/dist/components/ui/sonner.d.ts.map +1 -0
- package/dist/components/ui/switch.d.ts.map +1 -0
- package/dist/components/ui/table.d.ts.map +1 -0
- package/dist/components/ui/tabs.d.ts.map +1 -0
- package/dist/components/ui/textarea.d.ts.map +1 -0
- package/dist/components/ui/toggle-group.d.ts.map +1 -0
- package/dist/components/ui/toggle.d.ts.map +1 -0
- package/dist/components/ui/tooltip.d.ts.map +1 -0
- package/dist/components/ui/typewriter.d.ts +18 -0
- package/dist/components/ui/typewriter.d.ts.map +1 -0
- package/dist/components/ui/typewriter.js +128 -0
- package/dist/components/ui/typewriter.js.map +1 -0
- package/dist/hooks/use-mobile.d.ts.map +1 -0
- package/dist/hooks/use-mobile.js.map +1 -0
- package/dist/index.css +66 -0
- package/dist/index.css.map +1 -0
- package/dist/{types/index.d.ts → index.d.ts} +2 -1
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +63 -62
- package/dist/lib/utils.d.ts.map +1 -0
- package/dist/lib/utils.js.map +1 -0
- package/package.json +254 -319
- package/src/components/ui/bubble-background.tsx +189 -189
- package/src/components/ui/calendar.tsx +216 -213
- package/src/components/ui/chart.tsx +385 -380
- package/src/components/ui/drawer.tsx +141 -141
- package/src/components/ui/dropdrawer.tsx +973 -973
- package/src/components/ui/input.tsx +22 -22
- package/src/components/ui/ripple-button.tsx +111 -111
- package/src/components/ui/scratcher.tsx +171 -171
- package/src/components/ui/typewriter.tsx +188 -0
- package/src/hooks/use-mobile.tsx +44 -44
- package/src/index.css +67 -69
- package/src/index.ts +407 -400
- package/src/lib/utils.ts +10 -10
- package/dist/cjs/components/ui/accordion.cjs +0 -92
- package/dist/cjs/components/ui/accordion.cjs.map +0 -1
- package/dist/cjs/components/ui/alert-dialog.cjs +0 -152
- package/dist/cjs/components/ui/alert-dialog.cjs.map +0 -1
- package/dist/cjs/components/ui/alert.cjs +0 -83
- package/dist/cjs/components/ui/alert.cjs.map +0 -1
- package/dist/cjs/components/ui/aspect-ratio.cjs +0 -47
- package/dist/cjs/components/ui/aspect-ratio.cjs.map +0 -1
- package/dist/cjs/components/ui/avatar.cjs +0 -69
- package/dist/cjs/components/ui/avatar.cjs.map +0 -1
- package/dist/cjs/components/ui/background-beams.cjs +0 -200
- package/dist/cjs/components/ui/background-beams.cjs.map +0 -1
- package/dist/cjs/components/ui/badge.cjs +0 -69
- package/dist/cjs/components/ui/badge.cjs.map +0 -1
- package/dist/cjs/components/ui/breadcrumb.cjs +0 -128
- package/dist/cjs/components/ui/breadcrumb.cjs.map +0 -1
- package/dist/cjs/components/ui/bubble-background.cjs +0 -213
- package/dist/cjs/components/ui/bubble-background.cjs.map +0 -1
- package/dist/cjs/components/ui/button.cjs +0 -80
- package/dist/cjs/components/ui/button.cjs.map +0 -1
- package/dist/cjs/components/ui/calendar.cjs +0 -146
- package/dist/cjs/components/ui/calendar.cjs.map +0 -1
- package/dist/cjs/components/ui/card.cjs +0 -108
- package/dist/cjs/components/ui/card.cjs.map +0 -1
- package/dist/cjs/components/ui/carousel.cjs +0 -207
- package/dist/cjs/components/ui/carousel.cjs.map +0 -1
- package/dist/cjs/components/ui/chart.cjs +0 -221
- package/dist/cjs/components/ui/chart.cjs.map +0 -1
- package/dist/cjs/components/ui/checkbox.cjs +0 -57
- package/dist/cjs/components/ui/checkbox.cjs.map +0 -1
- package/dist/cjs/components/ui/collapsible.cjs +0 -65
- package/dist/cjs/components/ui/collapsible.cjs.map +0 -1
- package/dist/cjs/components/ui/command.cjs +0 -159
- package/dist/cjs/components/ui/command.cjs.map +0 -1
- package/dist/cjs/components/ui/context-menu.cjs +0 -219
- package/dist/cjs/components/ui/context-menu.cjs.map +0 -1
- package/dist/cjs/components/ui/counting-number.cjs +0 -95
- package/dist/cjs/components/ui/counting-number.cjs.map +0 -1
- package/dist/cjs/components/ui/dialog.cjs +0 -156
- package/dist/cjs/components/ui/dialog.cjs.map +0 -1
- package/dist/cjs/components/ui/dot-background.cjs +0 -131
- package/dist/cjs/components/ui/dot-background.cjs.map +0 -1
- package/dist/cjs/components/ui/drawer.cjs +0 -147
- package/dist/cjs/components/ui/drawer.cjs.map +0 -1
- package/dist/cjs/components/ui/dropdown-menu.cjs +0 -220
- package/dist/cjs/components/ui/dropdown-menu.cjs.map +0 -1
- package/dist/cjs/components/ui/dropdrawer.cjs +0 -627
- package/dist/cjs/components/ui/dropdrawer.cjs.map +0 -1
- package/dist/cjs/components/ui/fireworks-background.cjs +0 -259
- package/dist/cjs/components/ui/fireworks-background.cjs.map +0 -1
- package/dist/cjs/components/ui/flip-button.cjs +0 -100
- package/dist/cjs/components/ui/flip-button.cjs.map +0 -1
- package/dist/cjs/components/ui/form.cjs +0 -149
- package/dist/cjs/components/ui/form.cjs.map +0 -1
- package/dist/cjs/components/ui/gradient-background.cjs +0 -60
- package/dist/cjs/components/ui/gradient-background.cjs.map +0 -1
- package/dist/cjs/components/ui/gradient-text.cjs +0 -83
- package/dist/cjs/components/ui/gradient-text.cjs.map +0 -1
- package/dist/cjs/components/ui/highlight-text.cjs +0 -74
- package/dist/cjs/components/ui/highlight-text.cjs.map +0 -1
- package/dist/cjs/components/ui/hole-background.cjs +0 -361
- package/dist/cjs/components/ui/hole-background.cjs.map +0 -1
- package/dist/cjs/components/ui/hover-card.cjs +0 -72
- package/dist/cjs/components/ui/hover-card.cjs.map +0 -1
- package/dist/cjs/components/ui/input-otp.cjs +0 -94
- package/dist/cjs/components/ui/input-otp.cjs.map +0 -1
- package/dist/cjs/components/ui/input.cjs +0 -49
- package/dist/cjs/components/ui/input.cjs.map +0 -1
- package/dist/cjs/components/ui/label.cjs +0 -49
- package/dist/cjs/components/ui/label.cjs.map +0 -1
- package/dist/cjs/components/ui/menubar.cjs +0 -233
- package/dist/cjs/components/ui/menubar.cjs.map +0 -1
- package/dist/cjs/components/ui/navigation-menu.cjs +0 -144
- package/dist/cjs/components/ui/navigation-menu.cjs.map +0 -1
- package/dist/cjs/components/ui/pagination.cjs +0 -142
- package/dist/cjs/components/ui/pagination.cjs.map +0 -1
- package/dist/cjs/components/ui/popover.cjs +0 -80
- package/dist/cjs/components/ui/popover.cjs.map +0 -1
- package/dist/cjs/components/ui/progress.cjs +0 -56
- package/dist/cjs/components/ui/progress.cjs.map +0 -1
- package/dist/cjs/components/ui/radio-group.cjs +0 -67
- package/dist/cjs/components/ui/radio-group.cjs.map +0 -1
- package/dist/cjs/components/ui/resizable.cjs +0 -75
- package/dist/cjs/components/ui/resizable.cjs.map +0 -1
- package/dist/cjs/components/ui/ripple-button.cjs +0 -108
- package/dist/cjs/components/ui/ripple-button.cjs.map +0 -1
- package/dist/cjs/components/ui/scratcher.cjs +0 -179
- package/dist/cjs/components/ui/scratcher.cjs.map +0 -1
- package/dist/cjs/components/ui/scroll-area.cjs +0 -73
- package/dist/cjs/components/ui/scroll-area.cjs.map +0 -1
- package/dist/cjs/components/ui/select.cjs +0 -177
- package/dist/cjs/components/ui/select.cjs.map +0 -1
- package/dist/cjs/components/ui/separator.cjs +0 -51
- package/dist/cjs/components/ui/separator.cjs.map +0 -1
- package/dist/cjs/components/ui/sheet.cjs +0 -150
- package/dist/cjs/components/ui/sheet.cjs.map +0 -1
- package/dist/cjs/components/ui/sidebar.cjs +0 -513
- package/dist/cjs/components/ui/sidebar.cjs.map +0 -1
- package/dist/cjs/components/ui/skeleton.cjs +0 -48
- package/dist/cjs/components/ui/skeleton.cjs.map +0 -1
- package/dist/cjs/components/ui/slider.cjs +0 -78
- package/dist/cjs/components/ui/slider.cjs.map +0 -1
- package/dist/cjs/components/ui/sonner.cjs +0 -58
- package/dist/cjs/components/ui/sonner.cjs.map +0 -1
- package/dist/cjs/components/ui/switch.cjs +0 -53
- package/dist/cjs/components/ui/switch.cjs.map +0 -1
- package/dist/cjs/components/ui/table.cjs +0 -122
- package/dist/cjs/components/ui/table.cjs.map +0 -1
- package/dist/cjs/components/ui/tabs.cjs +0 -79
- package/dist/cjs/components/ui/tabs.cjs.map +0 -1
- package/dist/cjs/components/ui/textarea.cjs +0 -48
- package/dist/cjs/components/ui/textarea.cjs.map +0 -1
- package/dist/cjs/components/ui/toggle-group.cjs +0 -80
- package/dist/cjs/components/ui/toggle-group.cjs.map +0 -1
- package/dist/cjs/components/ui/toggle.cjs +0 -74
- package/dist/cjs/components/ui/toggle.cjs.map +0 -1
- package/dist/cjs/components/ui/tooltip.cjs +0 -88
- package/dist/cjs/components/ui/tooltip.cjs.map +0 -1
- package/dist/cjs/hooks/use-mobile.cjs +0 -52
- package/dist/cjs/hooks/use-mobile.cjs.map +0 -1
- package/dist/cjs/index.cjs +0 -905
- package/dist/cjs/index.cjs.map +0 -1
- package/dist/cjs/index.css +0 -7309
- package/dist/cjs/index.css.map +0 -1
- package/dist/cjs/lib/utils.cjs +0 -42
- package/dist/cjs/lib/utils.cjs.map +0 -1
- package/dist/esm/components/ui/bubble-background.js.map +0 -1
- package/dist/esm/components/ui/calendar.js.map +0 -1
- package/dist/esm/components/ui/chart.js.map +0 -1
- package/dist/esm/components/ui/drawer.js.map +0 -1
- package/dist/esm/components/ui/dropdrawer.js.map +0 -1
- package/dist/esm/components/ui/input.js.map +0 -1
- package/dist/esm/components/ui/ripple-button.js.map +0 -1
- package/dist/esm/components/ui/scratcher.js.map +0 -1
- package/dist/esm/hooks/use-mobile.js.map +0 -1
- package/dist/esm/index.css +0 -7309
- package/dist/esm/index.css.map +0 -1
- package/dist/esm/index.js +0 -62
- package/dist/esm/lib/utils.js.map +0 -1
- package/dist/types/components/ui/accordion.d.ts.map +0 -1
- package/dist/types/components/ui/alert-dialog.d.ts.map +0 -1
- package/dist/types/components/ui/alert.d.ts.map +0 -1
- package/dist/types/components/ui/aspect-ratio.d.ts.map +0 -1
- package/dist/types/components/ui/avatar.d.ts.map +0 -1
- package/dist/types/components/ui/background-beams.d.ts.map +0 -1
- package/dist/types/components/ui/badge.d.ts.map +0 -1
- package/dist/types/components/ui/breadcrumb.d.ts.map +0 -1
- package/dist/types/components/ui/bubble-background.d.ts.map +0 -1
- package/dist/types/components/ui/button.d.ts.map +0 -1
- package/dist/types/components/ui/calendar.d.ts.map +0 -1
- package/dist/types/components/ui/card.d.ts.map +0 -1
- package/dist/types/components/ui/carousel.d.ts.map +0 -1
- package/dist/types/components/ui/chart.d.ts.map +0 -1
- package/dist/types/components/ui/checkbox.d.ts.map +0 -1
- package/dist/types/components/ui/collapsible.d.ts.map +0 -1
- package/dist/types/components/ui/command.d.ts.map +0 -1
- package/dist/types/components/ui/context-menu.d.ts.map +0 -1
- package/dist/types/components/ui/counting-number.d.ts.map +0 -1
- package/dist/types/components/ui/dialog.d.ts.map +0 -1
- package/dist/types/components/ui/dot-background.d.ts.map +0 -1
- package/dist/types/components/ui/drawer.d.ts.map +0 -1
- package/dist/types/components/ui/dropdown-menu.d.ts.map +0 -1
- package/dist/types/components/ui/dropdrawer.d.ts.map +0 -1
- package/dist/types/components/ui/fireworks-background.d.ts.map +0 -1
- package/dist/types/components/ui/flip-button.d.ts.map +0 -1
- package/dist/types/components/ui/form.d.ts.map +0 -1
- package/dist/types/components/ui/gradient-background.d.ts.map +0 -1
- package/dist/types/components/ui/gradient-text.d.ts.map +0 -1
- package/dist/types/components/ui/highlight-text.d.ts.map +0 -1
- package/dist/types/components/ui/hole-background.d.ts.map +0 -1
- package/dist/types/components/ui/hover-card.d.ts.map +0 -1
- package/dist/types/components/ui/input-otp.d.ts.map +0 -1
- package/dist/types/components/ui/input.d.ts.map +0 -1
- package/dist/types/components/ui/label.d.ts.map +0 -1
- package/dist/types/components/ui/menubar.d.ts.map +0 -1
- package/dist/types/components/ui/navigation-menu.d.ts.map +0 -1
- package/dist/types/components/ui/pagination.d.ts.map +0 -1
- package/dist/types/components/ui/popover.d.ts.map +0 -1
- package/dist/types/components/ui/progress.d.ts.map +0 -1
- package/dist/types/components/ui/radio-group.d.ts.map +0 -1
- package/dist/types/components/ui/resizable.d.ts.map +0 -1
- package/dist/types/components/ui/ripple-button.d.ts.map +0 -1
- package/dist/types/components/ui/scratcher.d.ts.map +0 -1
- package/dist/types/components/ui/scroll-area.d.ts.map +0 -1
- package/dist/types/components/ui/select.d.ts.map +0 -1
- package/dist/types/components/ui/separator.d.ts.map +0 -1
- package/dist/types/components/ui/sheet.d.ts.map +0 -1
- package/dist/types/components/ui/sidebar.d.ts.map +0 -1
- package/dist/types/components/ui/skeleton.d.ts.map +0 -1
- package/dist/types/components/ui/slider.d.ts.map +0 -1
- package/dist/types/components/ui/sonner.d.ts.map +0 -1
- package/dist/types/components/ui/switch.d.ts.map +0 -1
- package/dist/types/components/ui/table.d.ts.map +0 -1
- package/dist/types/components/ui/tabs.d.ts.map +0 -1
- package/dist/types/components/ui/textarea.d.ts.map +0 -1
- package/dist/types/components/ui/toggle-group.d.ts.map +0 -1
- package/dist/types/components/ui/toggle.d.ts.map +0 -1
- package/dist/types/components/ui/tooltip.d.ts.map +0 -1
- package/dist/types/hooks/use-mobile.d.ts.map +0 -1
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/lib/utils.d.ts.map +0 -1
- package/tailwind.config.mjs +0 -65
- package/tsconfig.json +0 -58
- /package/dist/{types/components → components}/ui/accordion.d.ts +0 -0
- /package/dist/{esm/components → components}/ui/accordion.js +0 -0
- /package/dist/{esm/components → components}/ui/accordion.js.map +0 -0
- /package/dist/{types/components → components}/ui/alert-dialog.d.ts +0 -0
- /package/dist/{esm/components → components}/ui/alert-dialog.js +0 -0
- /package/dist/{esm/components → components}/ui/alert-dialog.js.map +0 -0
- /package/dist/{types/components → components}/ui/alert.d.ts +0 -0
- /package/dist/{esm/components → components}/ui/alert.js +0 -0
- /package/dist/{esm/components → components}/ui/alert.js.map +0 -0
- /package/dist/{types/components → components}/ui/aspect-ratio.d.ts +0 -0
- /package/dist/{esm/components → components}/ui/aspect-ratio.js +0 -0
- /package/dist/{esm/components → components}/ui/aspect-ratio.js.map +0 -0
- /package/dist/{types/components → components}/ui/avatar.d.ts +0 -0
- /package/dist/{esm/components → components}/ui/avatar.js +0 -0
- /package/dist/{esm/components → components}/ui/avatar.js.map +0 -0
- /package/dist/{types/components → components}/ui/background-beams.d.ts +0 -0
- /package/dist/{esm/components → components}/ui/background-beams.js +0 -0
- /package/dist/{esm/components → components}/ui/background-beams.js.map +0 -0
- /package/dist/{types/components → components}/ui/badge.d.ts +0 -0
- /package/dist/{esm/components → components}/ui/badge.js +0 -0
- /package/dist/{esm/components → components}/ui/badge.js.map +0 -0
- /package/dist/{types/components → components}/ui/breadcrumb.d.ts +0 -0
- /package/dist/{esm/components → components}/ui/breadcrumb.js +0 -0
- /package/dist/{esm/components → components}/ui/breadcrumb.js.map +0 -0
- /package/dist/{types/components → components}/ui/bubble-background.d.ts +0 -0
- /package/dist/{esm/components → components}/ui/bubble-background.js +0 -0
- /package/dist/{types/components → components}/ui/button.d.ts +0 -0
- /package/dist/{esm/components → components}/ui/button.js +0 -0
- /package/dist/{esm/components → components}/ui/button.js.map +0 -0
- /package/dist/{types/components → components}/ui/calendar.d.ts +0 -0
- /package/dist/{types/components → components}/ui/card.d.ts +0 -0
- /package/dist/{esm/components → components}/ui/card.js +0 -0
- /package/dist/{esm/components → components}/ui/card.js.map +0 -0
- /package/dist/{types/components → components}/ui/carousel.d.ts +0 -0
- /package/dist/{esm/components → components}/ui/carousel.js +0 -0
- /package/dist/{esm/components → components}/ui/carousel.js.map +0 -0
- /package/dist/{types/components → components}/ui/checkbox.d.ts +0 -0
- /package/dist/{esm/components → components}/ui/checkbox.js +0 -0
- /package/dist/{esm/components → components}/ui/checkbox.js.map +0 -0
- /package/dist/{types/components → components}/ui/collapsible.d.ts +0 -0
- /package/dist/{esm/components → components}/ui/collapsible.js +0 -0
- /package/dist/{esm/components → components}/ui/collapsible.js.map +0 -0
- /package/dist/{types/components → components}/ui/command.d.ts +0 -0
- /package/dist/{esm/components → components}/ui/command.js +0 -0
- /package/dist/{esm/components → components}/ui/command.js.map +0 -0
- /package/dist/{types/components → components}/ui/context-menu.d.ts +0 -0
- /package/dist/{esm/components → components}/ui/context-menu.js +0 -0
- /package/dist/{esm/components → components}/ui/context-menu.js.map +0 -0
- /package/dist/{types/components → components}/ui/counting-number.d.ts +0 -0
- /package/dist/{esm/components → components}/ui/counting-number.js +0 -0
- /package/dist/{esm/components → components}/ui/counting-number.js.map +0 -0
- /package/dist/{types/components → components}/ui/dialog.d.ts +0 -0
- /package/dist/{esm/components → components}/ui/dialog.js +0 -0
- /package/dist/{esm/components → components}/ui/dialog.js.map +0 -0
- /package/dist/{types/components → components}/ui/dot-background.d.ts +0 -0
- /package/dist/{esm/components → components}/ui/dot-background.js +0 -0
- /package/dist/{esm/components → components}/ui/dot-background.js.map +0 -0
- /package/dist/{types/components → components}/ui/drawer.d.ts +0 -0
- /package/dist/{esm/components → components}/ui/drawer.js +0 -0
- /package/dist/{types/components → components}/ui/dropdown-menu.d.ts +0 -0
- /package/dist/{esm/components → components}/ui/dropdown-menu.js +0 -0
- /package/dist/{esm/components → components}/ui/dropdown-menu.js.map +0 -0
- /package/dist/{types/components → components}/ui/dropdrawer.d.ts +0 -0
- /package/dist/{esm/components → components}/ui/dropdrawer.js +0 -0
- /package/dist/{types/components → components}/ui/fireworks-background.d.ts +0 -0
- /package/dist/{esm/components → components}/ui/fireworks-background.js +0 -0
- /package/dist/{esm/components → components}/ui/fireworks-background.js.map +0 -0
- /package/dist/{types/components → components}/ui/flip-button.d.ts +0 -0
- /package/dist/{esm/components → components}/ui/flip-button.js +0 -0
- /package/dist/{esm/components → components}/ui/flip-button.js.map +0 -0
- /package/dist/{types/components → components}/ui/form.d.ts +0 -0
- /package/dist/{esm/components → components}/ui/form.js +0 -0
- /package/dist/{esm/components → components}/ui/form.js.map +0 -0
- /package/dist/{types/components → components}/ui/gradient-background.d.ts +0 -0
- /package/dist/{esm/components → components}/ui/gradient-background.js +0 -0
- /package/dist/{esm/components → components}/ui/gradient-background.js.map +0 -0
- /package/dist/{types/components → components}/ui/gradient-text.d.ts +0 -0
- /package/dist/{esm/components → components}/ui/gradient-text.js +0 -0
- /package/dist/{esm/components → components}/ui/gradient-text.js.map +0 -0
- /package/dist/{types/components → components}/ui/highlight-text.d.ts +0 -0
- /package/dist/{esm/components → components}/ui/highlight-text.js +0 -0
- /package/dist/{esm/components → components}/ui/highlight-text.js.map +0 -0
- /package/dist/{types/components → components}/ui/hole-background.d.ts +0 -0
- /package/dist/{esm/components → components}/ui/hole-background.js +0 -0
- /package/dist/{esm/components → components}/ui/hole-background.js.map +0 -0
- /package/dist/{types/components → components}/ui/hover-card.d.ts +0 -0
- /package/dist/{esm/components → components}/ui/hover-card.js +0 -0
- /package/dist/{esm/components → components}/ui/hover-card.js.map +0 -0
- /package/dist/{types/components → components}/ui/input-otp.d.ts +0 -0
- /package/dist/{esm/components → components}/ui/input-otp.js +0 -0
- /package/dist/{esm/components → components}/ui/input-otp.js.map +0 -0
- /package/dist/{types/components → components}/ui/input.d.ts +0 -0
- /package/dist/{esm/components → components}/ui/input.js +0 -0
- /package/dist/{types/components → components}/ui/label.d.ts +0 -0
- /package/dist/{esm/components → components}/ui/label.js +0 -0
- /package/dist/{esm/components → components}/ui/label.js.map +0 -0
- /package/dist/{types/components → components}/ui/menubar.d.ts +0 -0
- /package/dist/{esm/components → components}/ui/menubar.js +0 -0
- /package/dist/{esm/components → components}/ui/menubar.js.map +0 -0
- /package/dist/{types/components → components}/ui/navigation-menu.d.ts +0 -0
- /package/dist/{esm/components → components}/ui/navigation-menu.js +0 -0
- /package/dist/{esm/components → components}/ui/navigation-menu.js.map +0 -0
- /package/dist/{types/components → components}/ui/pagination.d.ts +0 -0
- /package/dist/{esm/components → components}/ui/pagination.js +0 -0
- /package/dist/{esm/components → components}/ui/pagination.js.map +0 -0
- /package/dist/{types/components → components}/ui/popover.d.ts +0 -0
- /package/dist/{esm/components → components}/ui/popover.js +0 -0
- /package/dist/{esm/components → components}/ui/popover.js.map +0 -0
- /package/dist/{types/components → components}/ui/progress.d.ts +0 -0
- /package/dist/{esm/components → components}/ui/progress.js +0 -0
- /package/dist/{esm/components → components}/ui/progress.js.map +0 -0
- /package/dist/{types/components → components}/ui/radio-group.d.ts +0 -0
- /package/dist/{esm/components → components}/ui/radio-group.js +0 -0
- /package/dist/{esm/components → components}/ui/radio-group.js.map +0 -0
- /package/dist/{types/components → components}/ui/resizable.d.ts +0 -0
- /package/dist/{esm/components → components}/ui/resizable.js +0 -0
- /package/dist/{esm/components → components}/ui/resizable.js.map +0 -0
- /package/dist/{types/components → components}/ui/ripple-button.d.ts +0 -0
- /package/dist/{esm/components → components}/ui/ripple-button.js +0 -0
- /package/dist/{types/components → components}/ui/scratcher.d.ts +0 -0
- /package/dist/{esm/components → components}/ui/scratcher.js +0 -0
- /package/dist/{types/components → components}/ui/scroll-area.d.ts +0 -0
- /package/dist/{esm/components → components}/ui/scroll-area.js +0 -0
- /package/dist/{esm/components → components}/ui/scroll-area.js.map +0 -0
- /package/dist/{types/components → components}/ui/select.d.ts +0 -0
- /package/dist/{esm/components → components}/ui/select.js +0 -0
- /package/dist/{esm/components → components}/ui/select.js.map +0 -0
- /package/dist/{types/components → components}/ui/separator.d.ts +0 -0
- /package/dist/{esm/components → components}/ui/separator.js +0 -0
- /package/dist/{esm/components → components}/ui/separator.js.map +0 -0
- /package/dist/{types/components → components}/ui/sheet.d.ts +0 -0
- /package/dist/{esm/components → components}/ui/sheet.js +0 -0
- /package/dist/{esm/components → components}/ui/sheet.js.map +0 -0
- /package/dist/{types/components → components}/ui/sidebar.d.ts +0 -0
- /package/dist/{esm/components → components}/ui/sidebar.js +0 -0
- /package/dist/{esm/components → components}/ui/sidebar.js.map +0 -0
- /package/dist/{types/components → components}/ui/skeleton.d.ts +0 -0
- /package/dist/{esm/components → components}/ui/skeleton.js +0 -0
- /package/dist/{esm/components → components}/ui/skeleton.js.map +0 -0
- /package/dist/{types/components → components}/ui/slider.d.ts +0 -0
- /package/dist/{esm/components → components}/ui/slider.js +0 -0
- /package/dist/{esm/components → components}/ui/slider.js.map +0 -0
- /package/dist/{types/components → components}/ui/sonner.d.ts +0 -0
- /package/dist/{esm/components → components}/ui/sonner.js +0 -0
- /package/dist/{esm/components → components}/ui/sonner.js.map +0 -0
- /package/dist/{types/components → components}/ui/switch.d.ts +0 -0
- /package/dist/{esm/components → components}/ui/switch.js +0 -0
- /package/dist/{esm/components → components}/ui/switch.js.map +0 -0
- /package/dist/{types/components → components}/ui/table.d.ts +0 -0
- /package/dist/{esm/components → components}/ui/table.js +0 -0
- /package/dist/{esm/components → components}/ui/table.js.map +0 -0
- /package/dist/{types/components → components}/ui/tabs.d.ts +0 -0
- /package/dist/{esm/components → components}/ui/tabs.js +0 -0
- /package/dist/{esm/components → components}/ui/tabs.js.map +0 -0
- /package/dist/{types/components → components}/ui/textarea.d.ts +0 -0
- /package/dist/{esm/components → components}/ui/textarea.js +0 -0
- /package/dist/{esm/components → components}/ui/textarea.js.map +0 -0
- /package/dist/{types/components → components}/ui/toggle-group.d.ts +0 -0
- /package/dist/{esm/components → components}/ui/toggle-group.js +0 -0
- /package/dist/{esm/components → components}/ui/toggle-group.js.map +0 -0
- /package/dist/{types/components → components}/ui/toggle.d.ts +0 -0
- /package/dist/{esm/components → components}/ui/toggle.js +0 -0
- /package/dist/{esm/components → components}/ui/toggle.js.map +0 -0
- /package/dist/{types/components → components}/ui/tooltip.d.ts +0 -0
- /package/dist/{esm/components → components}/ui/tooltip.js +0 -0
- /package/dist/{esm/components → components}/ui/tooltip.js.map +0 -0
- /package/dist/{types/hooks → hooks}/use-mobile.d.ts +0 -0
- /package/dist/{esm/hooks → hooks}/use-mobile.js +0 -0
- /package/dist/{types/lib → lib}/utils.d.ts +0 -0
- /package/dist/{esm/lib → lib}/utils.js +0 -0
package/EXAMPLES.md
CHANGED
|
@@ -1,1035 +1,1035 @@
|
|
|
1
|
-
# 💡 Usage Examples for @arolariu/components
|
|
2
|
-
|
|
3
|
-
> **Real-world examples to get you building faster!** Copy, paste, and customize these patterns for your projects.
|
|
4
|
-
|
|
5
|
-
## 🚀 Getting Started
|
|
6
|
-
|
|
7
|
-
### Installation & Setup
|
|
8
|
-
|
|
9
|
-
```bash
|
|
10
|
-
# Install the package
|
|
11
|
-
npm install @arolariu/components
|
|
12
|
-
|
|
13
|
-
# Install peer dependencies if needed
|
|
14
|
-
npm install react react-dom tailwindcss
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
```tsx
|
|
18
|
-
// Add to your app's root (App.tsx, main.tsx, or _app.tsx)
|
|
19
|
-
import "@arolariu/components/styles";
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
---
|
|
23
|
-
|
|
24
|
-
## 🎨 Layout Examples
|
|
25
|
-
|
|
26
|
-
### Simple Card Layout
|
|
27
|
-
|
|
28
|
-
```tsx
|
|
29
|
-
import {
|
|
30
|
-
Card,
|
|
31
|
-
CardHeader,
|
|
32
|
-
CardTitle,
|
|
33
|
-
CardContent,
|
|
34
|
-
CardFooter,
|
|
35
|
-
} from "@arolariu/components/card";
|
|
36
|
-
import { Button } from "@arolariu/components/button";
|
|
37
|
-
import { Badge } from "@arolariu/components/badge";
|
|
38
|
-
|
|
39
|
-
export function ProductCard() {
|
|
40
|
-
return (
|
|
41
|
-
<Card className="w-96">
|
|
42
|
-
<CardHeader>
|
|
43
|
-
<div className="flex items-center justify-between">
|
|
44
|
-
<CardTitle>Premium Plan</CardTitle>
|
|
45
|
-
<Badge variant="secondary">Popular</Badge>
|
|
46
|
-
</div>
|
|
47
|
-
</CardHeader>
|
|
48
|
-
<CardContent>
|
|
49
|
-
<p className="text-3xl font-bold">
|
|
50
|
-
$29<span className="text-sm font-normal">/month</span>
|
|
51
|
-
</p>
|
|
52
|
-
<ul className="mt-4 space-y-2">
|
|
53
|
-
<li>✅ Unlimited projects</li>
|
|
54
|
-
<li>✅ Priority support</li>
|
|
55
|
-
<li>✅ Advanced analytics</li>
|
|
56
|
-
</ul>
|
|
57
|
-
</CardContent>
|
|
58
|
-
<CardFooter>
|
|
59
|
-
<Button className="w-full">Subscribe Now</Button>
|
|
60
|
-
</CardFooter>
|
|
61
|
-
</Card>
|
|
62
|
-
);
|
|
63
|
-
}
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
### Dashboard Layout with Sidebar
|
|
67
|
-
|
|
68
|
-
```tsx
|
|
69
|
-
import {
|
|
70
|
-
Sidebar,
|
|
71
|
-
SidebarContent,
|
|
72
|
-
SidebarMenuItem,
|
|
73
|
-
} from "@arolariu/components/sidebar";
|
|
74
|
-
import {
|
|
75
|
-
Card,
|
|
76
|
-
CardContent,
|
|
77
|
-
CardHeader,
|
|
78
|
-
CardTitle,
|
|
79
|
-
} from "@arolariu/components/card";
|
|
80
|
-
import { Progress } from "@arolariu/components/progress";
|
|
81
|
-
import {
|
|
82
|
-
Avatar,
|
|
83
|
-
AvatarImage,
|
|
84
|
-
AvatarFallback,
|
|
85
|
-
} from "@arolariu/components/avatar";
|
|
86
|
-
|
|
87
|
-
export function Dashboard() {
|
|
88
|
-
return (
|
|
89
|
-
<div className="flex h-screen">
|
|
90
|
-
{/* Sidebar */}
|
|
91
|
-
<Sidebar>
|
|
92
|
-
<SidebarContent>
|
|
93
|
-
<SidebarMenuItem href="/dashboard">Dashboard</SidebarMenuItem>
|
|
94
|
-
<SidebarMenuItem href="/projects">Projects</SidebarMenuItem>
|
|
95
|
-
<SidebarMenuItem href="/settings">Settings</SidebarMenuItem>
|
|
96
|
-
</SidebarContent>
|
|
97
|
-
</Sidebar>
|
|
98
|
-
|
|
99
|
-
{/* Main Content */}
|
|
100
|
-
<main className="flex-1 p-6 overflow-auto">
|
|
101
|
-
<h1 className="text-3xl font-bold mb-6">Dashboard</h1>
|
|
102
|
-
|
|
103
|
-
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
|
|
104
|
-
<Card>
|
|
105
|
-
<CardHeader>
|
|
106
|
-
<CardTitle>Project Progress</CardTitle>
|
|
107
|
-
</CardHeader>
|
|
108
|
-
<CardContent>
|
|
109
|
-
<Progress value={75} className="w-full" />
|
|
110
|
-
<p className="text-sm text-muted-foreground mt-2">75% complete</p>
|
|
111
|
-
</CardContent>
|
|
112
|
-
</Card>
|
|
113
|
-
|
|
114
|
-
<Card>
|
|
115
|
-
<CardHeader>
|
|
116
|
-
<CardTitle>Team Members</CardTitle>
|
|
117
|
-
</CardHeader>
|
|
118
|
-
<CardContent>
|
|
119
|
-
<div className="flex -space-x-2">
|
|
120
|
-
<Avatar className="border-2 border-background">
|
|
121
|
-
<AvatarImage src="/avatar1.jpg" />
|
|
122
|
-
<AvatarFallback>JD</AvatarFallback>
|
|
123
|
-
</Avatar>
|
|
124
|
-
<Avatar className="border-2 border-background">
|
|
125
|
-
<AvatarImage src="/avatar2.jpg" />
|
|
126
|
-
<AvatarFallback>SM</AvatarFallback>
|
|
127
|
-
</Avatar>
|
|
128
|
-
<Avatar className="border-2 border-background">
|
|
129
|
-
<AvatarFallback>+3</AvatarFallback>
|
|
130
|
-
</Avatar>
|
|
131
|
-
</div>
|
|
132
|
-
</CardContent>
|
|
133
|
-
</Card>
|
|
134
|
-
</div>
|
|
135
|
-
</main>
|
|
136
|
-
</div>
|
|
137
|
-
);
|
|
138
|
-
}
|
|
139
|
-
```
|
|
140
|
-
|
|
141
|
-
---
|
|
142
|
-
|
|
143
|
-
## 📝 Form Examples
|
|
144
|
-
|
|
145
|
-
### Complete Login Form
|
|
146
|
-
|
|
147
|
-
```tsx
|
|
148
|
-
import {
|
|
149
|
-
Card,
|
|
150
|
-
CardHeader,
|
|
151
|
-
CardTitle,
|
|
152
|
-
CardContent,
|
|
153
|
-
CardFooter,
|
|
154
|
-
} from "@arolariu/components/card";
|
|
155
|
-
import { Input } from "@arolariu/components/input";
|
|
156
|
-
import { Button } from "@arolariu/components/button";
|
|
157
|
-
import { Label } from "@arolariu/components/label";
|
|
158
|
-
import { Checkbox } from "@arolariu/components/checkbox";
|
|
159
|
-
import { Alert, AlertDescription } from "@arolariu/components/alert";
|
|
160
|
-
import { useState } from "react";
|
|
161
|
-
|
|
162
|
-
export function LoginForm() {
|
|
163
|
-
const [email, setEmail] = useState("");
|
|
164
|
-
const [password, setPassword] = useState("");
|
|
165
|
-
const [rememberMe, setRememberMe] = useState(false);
|
|
166
|
-
const [error, setError] = useState("");
|
|
167
|
-
const [loading, setLoading] = useState(false);
|
|
168
|
-
|
|
169
|
-
const handleSubmit = async (e: React.FormEvent) => {
|
|
170
|
-
e.preventDefault();
|
|
171
|
-
setLoading(true);
|
|
172
|
-
setError("");
|
|
173
|
-
|
|
174
|
-
try {
|
|
175
|
-
// Your login logic here
|
|
176
|
-
await new Promise((resolve) => setTimeout(resolve, 1000)); // Simulate API call
|
|
177
|
-
console.log("Login successful!");
|
|
178
|
-
} catch (err) {
|
|
179
|
-
setError("Invalid email or password");
|
|
180
|
-
} finally {
|
|
181
|
-
setLoading(false);
|
|
182
|
-
}
|
|
183
|
-
};
|
|
184
|
-
|
|
185
|
-
return (
|
|
186
|
-
<div className="min-h-screen flex items-center justify-center bg-gray-50">
|
|
187
|
-
<Card className="w-full max-w-md">
|
|
188
|
-
<CardHeader>
|
|
189
|
-
<CardTitle className="text-center">Welcome Back</CardTitle>
|
|
190
|
-
</CardHeader>
|
|
191
|
-
<form onSubmit={handleSubmit}>
|
|
192
|
-
<CardContent className="space-y-4">
|
|
193
|
-
{error && (
|
|
194
|
-
<Alert variant="destructive">
|
|
195
|
-
<AlertDescription>{error}</AlertDescription>
|
|
196
|
-
</Alert>
|
|
197
|
-
)}
|
|
198
|
-
|
|
199
|
-
<div className="space-y-2">
|
|
200
|
-
<Label htmlFor="email">Email</Label>
|
|
201
|
-
<Input
|
|
202
|
-
id="email"
|
|
203
|
-
type="email"
|
|
204
|
-
placeholder="you@example.com"
|
|
205
|
-
value={email}
|
|
206
|
-
onChange={(e) => setEmail(e.target.value)}
|
|
207
|
-
required
|
|
208
|
-
/>
|
|
209
|
-
</div>
|
|
210
|
-
|
|
211
|
-
<div className="space-y-2">
|
|
212
|
-
<Label htmlFor="password">Password</Label>
|
|
213
|
-
<Input
|
|
214
|
-
id="password"
|
|
215
|
-
type="password"
|
|
216
|
-
value={password}
|
|
217
|
-
onChange={(e) => setPassword(e.target.value)}
|
|
218
|
-
required
|
|
219
|
-
/>
|
|
220
|
-
</div>
|
|
221
|
-
|
|
222
|
-
<div className="flex items-center space-x-2">
|
|
223
|
-
<Checkbox
|
|
224
|
-
id="remember"
|
|
225
|
-
checked={rememberMe}
|
|
226
|
-
onCheckedChange={setRememberMe}
|
|
227
|
-
/>
|
|
228
|
-
<Label htmlFor="remember">Remember me</Label>
|
|
229
|
-
</div>
|
|
230
|
-
</CardContent>
|
|
231
|
-
|
|
232
|
-
<CardFooter className="flex flex-col space-y-2">
|
|
233
|
-
<Button type="submit" className="w-full" disabled={loading}>
|
|
234
|
-
{loading ? "Signing in..." : "Sign In"}
|
|
235
|
-
</Button>
|
|
236
|
-
<Button variant="link" size="sm">
|
|
237
|
-
Forgot your password?
|
|
238
|
-
</Button>
|
|
239
|
-
</CardFooter>
|
|
240
|
-
</form>
|
|
241
|
-
</Card>
|
|
242
|
-
</div>
|
|
243
|
-
);
|
|
244
|
-
}
|
|
245
|
-
```
|
|
246
|
-
|
|
247
|
-
### Advanced Form with Validation
|
|
248
|
-
|
|
249
|
-
```tsx
|
|
250
|
-
import { useForm } from "react-hook-form";
|
|
251
|
-
import { zodResolver } from "@hookform/resolvers/zod";
|
|
252
|
-
import * as z from "zod";
|
|
253
|
-
import {
|
|
254
|
-
Form,
|
|
255
|
-
FormControl,
|
|
256
|
-
FormDescription,
|
|
257
|
-
FormField,
|
|
258
|
-
FormItem,
|
|
259
|
-
FormLabel,
|
|
260
|
-
FormMessage,
|
|
261
|
-
} from "@arolariu/components/form";
|
|
262
|
-
import { Input } from "@arolariu/components/input";
|
|
263
|
-
import { Button } from "@arolariu/components/button";
|
|
264
|
-
import {
|
|
265
|
-
Select,
|
|
266
|
-
SelectContent,
|
|
267
|
-
SelectItem,
|
|
268
|
-
SelectTrigger,
|
|
269
|
-
SelectValue,
|
|
270
|
-
} from "@arolariu/components/select";
|
|
271
|
-
import { Textarea } from "@arolariu/components/textarea";
|
|
272
|
-
|
|
273
|
-
const formSchema = z.object({
|
|
274
|
-
firstName: z.string().min(2, "First name must be at least 2 characters"),
|
|
275
|
-
lastName: z.string().min(2, "Last name must be at least 2 characters"),
|
|
276
|
-
email: z.string().email("Invalid email address"),
|
|
277
|
-
role: z.string().min(1, "Please select a role"),
|
|
278
|
-
bio: z.string().max(500, "Bio must be less than 500 characters").optional(),
|
|
279
|
-
});
|
|
280
|
-
|
|
281
|
-
export function ProfileForm() {
|
|
282
|
-
const form = useForm<z.infer<typeof formSchema>>({
|
|
283
|
-
resolver: zodResolver(formSchema),
|
|
284
|
-
defaultValues: {
|
|
285
|
-
firstName: "",
|
|
286
|
-
lastName: "",
|
|
287
|
-
email: "",
|
|
288
|
-
role: "",
|
|
289
|
-
bio: "",
|
|
290
|
-
},
|
|
291
|
-
});
|
|
292
|
-
|
|
293
|
-
function onSubmit(values: z.infer<typeof formSchema>) {
|
|
294
|
-
console.log(values);
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
return (
|
|
298
|
-
<Form {...form}>
|
|
299
|
-
<form
|
|
300
|
-
onSubmit={form.handleSubmit(onSubmit)}
|
|
301
|
-
className="space-y-6 max-w-md"
|
|
302
|
-
>
|
|
303
|
-
<div className="grid grid-cols-2 gap-4">
|
|
304
|
-
<FormField
|
|
305
|
-
control={form.control}
|
|
306
|
-
name="firstName"
|
|
307
|
-
render={({ field }) => (
|
|
308
|
-
<FormItem>
|
|
309
|
-
<FormLabel>First Name</FormLabel>
|
|
310
|
-
<FormControl>
|
|
311
|
-
<Input placeholder="John" {...field} />
|
|
312
|
-
</FormControl>
|
|
313
|
-
<FormMessage />
|
|
314
|
-
</FormItem>
|
|
315
|
-
)}
|
|
316
|
-
/>
|
|
317
|
-
|
|
318
|
-
<FormField
|
|
319
|
-
control={form.control}
|
|
320
|
-
name="lastName"
|
|
321
|
-
render={({ field }) => (
|
|
322
|
-
<FormItem>
|
|
323
|
-
<FormLabel>Last Name</FormLabel>
|
|
324
|
-
<FormControl>
|
|
325
|
-
<Input placeholder="Doe" {...field} />
|
|
326
|
-
</FormControl>
|
|
327
|
-
<FormMessage />
|
|
328
|
-
</FormItem>
|
|
329
|
-
)}
|
|
330
|
-
/>
|
|
331
|
-
</div>
|
|
332
|
-
|
|
333
|
-
<FormField
|
|
334
|
-
control={form.control}
|
|
335
|
-
name="email"
|
|
336
|
-
render={({ field }) => (
|
|
337
|
-
<FormItem>
|
|
338
|
-
<FormLabel>Email</FormLabel>
|
|
339
|
-
<FormControl>
|
|
340
|
-
<Input placeholder="john.doe@example.com" {...field} />
|
|
341
|
-
</FormControl>
|
|
342
|
-
<FormDescription>
|
|
343
|
-
We'll never share your email with anyone else.
|
|
344
|
-
</FormDescription>
|
|
345
|
-
<FormMessage />
|
|
346
|
-
</FormItem>
|
|
347
|
-
)}
|
|
348
|
-
/>
|
|
349
|
-
|
|
350
|
-
<FormField
|
|
351
|
-
control={form.control}
|
|
352
|
-
name="role"
|
|
353
|
-
render={({ field }) => (
|
|
354
|
-
<FormItem>
|
|
355
|
-
<FormLabel>Role</FormLabel>
|
|
356
|
-
<Select onValueChange={field.onChange} defaultValue={field.value}>
|
|
357
|
-
<FormControl>
|
|
358
|
-
<SelectTrigger>
|
|
359
|
-
<SelectValue placeholder="Select a role" />
|
|
360
|
-
</SelectTrigger>
|
|
361
|
-
</FormControl>
|
|
362
|
-
<SelectContent>
|
|
363
|
-
<SelectItem value="developer">Developer</SelectItem>
|
|
364
|
-
<SelectItem value="designer">Designer</SelectItem>
|
|
365
|
-
<SelectItem value="manager">Manager</SelectItem>
|
|
366
|
-
</SelectContent>
|
|
367
|
-
</Select>
|
|
368
|
-
<FormMessage />
|
|
369
|
-
</FormItem>
|
|
370
|
-
)}
|
|
371
|
-
/>
|
|
372
|
-
|
|
373
|
-
<FormField
|
|
374
|
-
control={form.control}
|
|
375
|
-
name="bio"
|
|
376
|
-
render={({ field }) => (
|
|
377
|
-
<FormItem>
|
|
378
|
-
<FormLabel>Bio</FormLabel>
|
|
379
|
-
<FormControl>
|
|
380
|
-
<Textarea
|
|
381
|
-
placeholder="Tell us about yourself"
|
|
382
|
-
className="min-h-[100px]"
|
|
383
|
-
{...field}
|
|
384
|
-
/>
|
|
385
|
-
</FormControl>
|
|
386
|
-
<FormMessage />
|
|
387
|
-
</FormItem>
|
|
388
|
-
)}
|
|
389
|
-
/>
|
|
390
|
-
|
|
391
|
-
<Button type="submit">Save Profile</Button>
|
|
392
|
-
</form>
|
|
393
|
-
</Form>
|
|
394
|
-
);
|
|
395
|
-
}
|
|
396
|
-
```
|
|
397
|
-
|
|
398
|
-
---
|
|
399
|
-
|
|
400
|
-
## 🧭 Navigation Examples
|
|
401
|
-
|
|
402
|
-
### Responsive Header Navigation
|
|
403
|
-
|
|
404
|
-
```tsx
|
|
405
|
-
import {
|
|
406
|
-
NavigationMenu,
|
|
407
|
-
NavigationMenuItem,
|
|
408
|
-
NavigationMenuList,
|
|
409
|
-
} from "@arolariu/components/navigation-menu";
|
|
410
|
-
import { Button } from "@arolariu/components/button";
|
|
411
|
-
import { Sheet, SheetContent, SheetTrigger } from "@arolariu/components/sheet";
|
|
412
|
-
import {
|
|
413
|
-
Avatar,
|
|
414
|
-
AvatarImage,
|
|
415
|
-
AvatarFallback,
|
|
416
|
-
} from "@arolariu/components/avatar";
|
|
417
|
-
import {
|
|
418
|
-
DropdownMenu,
|
|
419
|
-
DropdownMenuContent,
|
|
420
|
-
DropdownMenuItem,
|
|
421
|
-
DropdownMenuTrigger,
|
|
422
|
-
} from "@arolariu/components/dropdown-menu";
|
|
423
|
-
import { MenuIcon, User, Settings, LogOut } from "lucide-react";
|
|
424
|
-
|
|
425
|
-
export function AppHeader() {
|
|
426
|
-
return (
|
|
427
|
-
<header className="sticky top-0 z-50 w-full border-b bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60">
|
|
428
|
-
<div className="container flex h-14 items-center">
|
|
429
|
-
<div className="mr-4 hidden md:flex">
|
|
430
|
-
<a className="mr-6 flex items-center space-x-2" href="/">
|
|
431
|
-
<span className="hidden font-bold sm:inline-block">MyApp</span>
|
|
432
|
-
</a>
|
|
433
|
-
|
|
434
|
-
<NavigationMenu>
|
|
435
|
-
<NavigationMenuList>
|
|
436
|
-
<NavigationMenuItem>
|
|
437
|
-
<Button variant="ghost" href="/dashboard">
|
|
438
|
-
Dashboard
|
|
439
|
-
</Button>
|
|
440
|
-
</NavigationMenuItem>
|
|
441
|
-
<NavigationMenuItem>
|
|
442
|
-
<Button variant="ghost" href="/projects">
|
|
443
|
-
Projects
|
|
444
|
-
</Button>
|
|
445
|
-
</NavigationMenuItem>
|
|
446
|
-
<NavigationMenuItem>
|
|
447
|
-
<Button variant="ghost" href="/analytics">
|
|
448
|
-
Analytics
|
|
449
|
-
</Button>
|
|
450
|
-
</NavigationMenuItem>
|
|
451
|
-
</NavigationMenuList>
|
|
452
|
-
</NavigationMenu>
|
|
453
|
-
</div>
|
|
454
|
-
|
|
455
|
-
{/* Mobile Navigation */}
|
|
456
|
-
<Sheet>
|
|
457
|
-
<SheetTrigger asChild>
|
|
458
|
-
<Button
|
|
459
|
-
variant="ghost"
|
|
460
|
-
className="mr-2 px-0 text-base hover:bg-transparent focus-visible:bg-transparent focus-visible:ring-0 focus-visible:ring-offset-0 md:hidden"
|
|
461
|
-
>
|
|
462
|
-
<MenuIcon className="h-5 w-5" />
|
|
463
|
-
</Button>
|
|
464
|
-
</SheetTrigger>
|
|
465
|
-
<SheetContent side="left">
|
|
466
|
-
<nav className="flex flex-col space-y-3">
|
|
467
|
-
<Button
|
|
468
|
-
variant="ghost"
|
|
469
|
-
className="justify-start"
|
|
470
|
-
href="/dashboard"
|
|
471
|
-
>
|
|
472
|
-
Dashboard
|
|
473
|
-
</Button>
|
|
474
|
-
<Button
|
|
475
|
-
variant="ghost"
|
|
476
|
-
className="justify-start"
|
|
477
|
-
href="/projects"
|
|
478
|
-
>
|
|
479
|
-
Projects
|
|
480
|
-
</Button>
|
|
481
|
-
<Button
|
|
482
|
-
variant="ghost"
|
|
483
|
-
className="justify-start"
|
|
484
|
-
href="/analytics"
|
|
485
|
-
>
|
|
486
|
-
Analytics
|
|
487
|
-
</Button>
|
|
488
|
-
</nav>
|
|
489
|
-
</SheetContent>
|
|
490
|
-
</Sheet>
|
|
491
|
-
|
|
492
|
-
<div className="flex flex-1 items-center justify-between space-x-2 md:justify-end">
|
|
493
|
-
<div className="w-full flex-1 md:w-auto md:flex-none">
|
|
494
|
-
{/* Search or other content can go here */}
|
|
495
|
-
</div>
|
|
496
|
-
|
|
497
|
-
{/* User Menu */}
|
|
498
|
-
<DropdownMenu>
|
|
499
|
-
<DropdownMenuTrigger asChild>
|
|
500
|
-
<Button variant="ghost" className="relative h-8 w-8 rounded-full">
|
|
501
|
-
<Avatar className="h-8 w-8">
|
|
502
|
-
<AvatarImage src="/avatars/01.png" alt="User" />
|
|
503
|
-
<AvatarFallback>JD</AvatarFallback>
|
|
504
|
-
</Avatar>
|
|
505
|
-
</Button>
|
|
506
|
-
</DropdownMenuTrigger>
|
|
507
|
-
<DropdownMenuContent className="w-56" align="end" forceMount>
|
|
508
|
-
<DropdownMenuItem>
|
|
509
|
-
<User className="mr-2 h-4 w-4" />
|
|
510
|
-
<span>Profile</span>
|
|
511
|
-
</DropdownMenuItem>
|
|
512
|
-
<DropdownMenuItem>
|
|
513
|
-
<Settings className="mr-2 h-4 w-4" />
|
|
514
|
-
<span>Settings</span>
|
|
515
|
-
</DropdownMenuItem>
|
|
516
|
-
<DropdownMenuItem>
|
|
517
|
-
<LogOut className="mr-2 h-4 w-4" />
|
|
518
|
-
<span>Log out</span>
|
|
519
|
-
</DropdownMenuItem>
|
|
520
|
-
</DropdownMenuContent>
|
|
521
|
-
</DropdownMenu>
|
|
522
|
-
</div>
|
|
523
|
-
</div>
|
|
524
|
-
</header>
|
|
525
|
-
);
|
|
526
|
-
}
|
|
527
|
-
```
|
|
528
|
-
|
|
529
|
-
---
|
|
530
|
-
|
|
531
|
-
## 📊 Data Display Examples
|
|
532
|
-
|
|
533
|
-
### Interactive Data Table
|
|
534
|
-
|
|
535
|
-
```tsx
|
|
536
|
-
import {
|
|
537
|
-
Table,
|
|
538
|
-
TableBody,
|
|
539
|
-
TableCaption,
|
|
540
|
-
TableCell,
|
|
541
|
-
TableHead,
|
|
542
|
-
TableHeader,
|
|
543
|
-
TableRow,
|
|
544
|
-
} from "@arolariu/components/table";
|
|
545
|
-
import { Badge } from "@arolariu/components/badge";
|
|
546
|
-
import { Button } from "@arolariu/components/button";
|
|
547
|
-
import {
|
|
548
|
-
DropdownMenu,
|
|
549
|
-
DropdownMenuContent,
|
|
550
|
-
DropdownMenuItem,
|
|
551
|
-
DropdownMenuTrigger,
|
|
552
|
-
} from "@arolariu/components/dropdown-menu";
|
|
553
|
-
import { MoreHorizontal, Eye, Edit, Trash } from "lucide-react";
|
|
554
|
-
|
|
555
|
-
interface User {
|
|
556
|
-
id: string;
|
|
557
|
-
name: string;
|
|
558
|
-
email: string;
|
|
559
|
-
role: string;
|
|
560
|
-
status: "active" | "inactive" | "pending";
|
|
561
|
-
lastLogin: string;
|
|
562
|
-
}
|
|
563
|
-
|
|
564
|
-
const users: User[] = [
|
|
565
|
-
{
|
|
566
|
-
id: "1",
|
|
567
|
-
name: "John Doe",
|
|
568
|
-
email: "john@example.com",
|
|
569
|
-
role: "Admin",
|
|
570
|
-
status: "active",
|
|
571
|
-
lastLogin: "2 hours ago",
|
|
572
|
-
},
|
|
573
|
-
{
|
|
574
|
-
id: "2",
|
|
575
|
-
name: "Jane Smith",
|
|
576
|
-
email: "jane@example.com",
|
|
577
|
-
role: "User",
|
|
578
|
-
status: "active",
|
|
579
|
-
lastLogin: "1 day ago",
|
|
580
|
-
},
|
|
581
|
-
{
|
|
582
|
-
id: "3",
|
|
583
|
-
name: "Bob Johnson",
|
|
584
|
-
email: "bob@example.com",
|
|
585
|
-
role: "User",
|
|
586
|
-
status: "pending",
|
|
587
|
-
lastLogin: "Never",
|
|
588
|
-
},
|
|
589
|
-
];
|
|
590
|
-
|
|
591
|
-
export function UsersTable() {
|
|
592
|
-
const getStatusBadge = (status: User["status"]) => {
|
|
593
|
-
const variants = {
|
|
594
|
-
active: "default",
|
|
595
|
-
inactive: "secondary",
|
|
596
|
-
pending: "outline",
|
|
597
|
-
} as const;
|
|
598
|
-
|
|
599
|
-
return <Badge variant={variants[status]}>{status}</Badge>;
|
|
600
|
-
};
|
|
601
|
-
|
|
602
|
-
return (
|
|
603
|
-
<div className="w-full">
|
|
604
|
-
<div className="rounded-md border">
|
|
605
|
-
<Table>
|
|
606
|
-
<TableCaption>A list of your team members.</TableCaption>
|
|
607
|
-
<TableHeader>
|
|
608
|
-
<TableRow>
|
|
609
|
-
<TableHead>Name</TableHead>
|
|
610
|
-
<TableHead>Email</TableHead>
|
|
611
|
-
<TableHead>Role</TableHead>
|
|
612
|
-
<TableHead>Status</TableHead>
|
|
613
|
-
<TableHead>Last Login</TableHead>
|
|
614
|
-
<TableHead className="w-[100px]">Actions</TableHead>
|
|
615
|
-
</TableRow>
|
|
616
|
-
</TableHeader>
|
|
617
|
-
<TableBody>
|
|
618
|
-
{users.map((user) => (
|
|
619
|
-
<TableRow key={user.id}>
|
|
620
|
-
<TableCell className="font-medium">{user.name}</TableCell>
|
|
621
|
-
<TableCell>{user.email}</TableCell>
|
|
622
|
-
<TableCell>{user.role}</TableCell>
|
|
623
|
-
<TableCell>{getStatusBadge(user.status)}</TableCell>
|
|
624
|
-
<TableCell>{user.lastLogin}</TableCell>
|
|
625
|
-
<TableCell>
|
|
626
|
-
<DropdownMenu>
|
|
627
|
-
<DropdownMenuTrigger asChild>
|
|
628
|
-
<Button variant="ghost" className="h-8 w-8 p-0">
|
|
629
|
-
<MoreHorizontal className="h-4 w-4" />
|
|
630
|
-
</Button>
|
|
631
|
-
</DropdownMenuTrigger>
|
|
632
|
-
<DropdownMenuContent align="end">
|
|
633
|
-
<DropdownMenuItem>
|
|
634
|
-
<Eye className="mr-2 h-4 w-4" />
|
|
635
|
-
View
|
|
636
|
-
</DropdownMenuItem>
|
|
637
|
-
<DropdownMenuItem>
|
|
638
|
-
<Edit className="mr-2 h-4 w-4" />
|
|
639
|
-
Edit
|
|
640
|
-
</DropdownMenuItem>
|
|
641
|
-
<DropdownMenuItem className="text-red-600">
|
|
642
|
-
<Trash className="mr-2 h-4 w-4" />
|
|
643
|
-
Delete
|
|
644
|
-
</DropdownMenuItem>
|
|
645
|
-
</DropdownMenuContent>
|
|
646
|
-
</DropdownMenu>
|
|
647
|
-
</TableCell>
|
|
648
|
-
</TableRow>
|
|
649
|
-
))}
|
|
650
|
-
</TableBody>
|
|
651
|
-
</Table>
|
|
652
|
-
</div>
|
|
653
|
-
</div>
|
|
654
|
-
);
|
|
655
|
-
}
|
|
656
|
-
```
|
|
657
|
-
|
|
658
|
-
---
|
|
659
|
-
|
|
660
|
-
## 💬 Modal & Dialog Examples
|
|
661
|
-
|
|
662
|
-
### Confirmation Dialog
|
|
663
|
-
|
|
664
|
-
```tsx
|
|
665
|
-
import {
|
|
666
|
-
AlertDialog,
|
|
667
|
-
AlertDialogAction,
|
|
668
|
-
AlertDialogCancel,
|
|
669
|
-
AlertDialogContent,
|
|
670
|
-
AlertDialogDescription,
|
|
671
|
-
AlertDialogFooter,
|
|
672
|
-
AlertDialogHeader,
|
|
673
|
-
AlertDialogTitle,
|
|
674
|
-
AlertDialogTrigger,
|
|
675
|
-
} from "@arolariu/components/alert-dialog";
|
|
676
|
-
import { Button } from "@arolariu/components/button";
|
|
677
|
-
import { Trash } from "lucide-react";
|
|
678
|
-
|
|
679
|
-
export function DeleteConfirmation({
|
|
680
|
-
itemName,
|
|
681
|
-
onConfirm,
|
|
682
|
-
}: {
|
|
683
|
-
itemName: string;
|
|
684
|
-
onConfirm: () => void;
|
|
685
|
-
}) {
|
|
686
|
-
return (
|
|
687
|
-
<AlertDialog>
|
|
688
|
-
<AlertDialogTrigger asChild>
|
|
689
|
-
<Button variant="destructive" size="sm">
|
|
690
|
-
<Trash className="mr-2 h-4 w-4" />
|
|
691
|
-
Delete
|
|
692
|
-
</Button>
|
|
693
|
-
</AlertDialogTrigger>
|
|
694
|
-
<AlertDialogContent>
|
|
695
|
-
<AlertDialogHeader>
|
|
696
|
-
<AlertDialogTitle>Are you absolutely sure?</AlertDialogTitle>
|
|
697
|
-
<AlertDialogDescription>
|
|
698
|
-
This action cannot be undone. This will permanently delete "
|
|
699
|
-
{itemName}" and remove all associated data from our servers.
|
|
700
|
-
</AlertDialogDescription>
|
|
701
|
-
</AlertDialogHeader>
|
|
702
|
-
<AlertDialogFooter>
|
|
703
|
-
<AlertDialogCancel>Cancel</AlertDialogCancel>
|
|
704
|
-
<AlertDialogAction
|
|
705
|
-
onClick={onConfirm}
|
|
706
|
-
className="bg-destructive text-destructive-foreground hover:bg-destructive/90"
|
|
707
|
-
>
|
|
708
|
-
Yes, delete it
|
|
709
|
-
</AlertDialogAction>
|
|
710
|
-
</AlertDialogFooter>
|
|
711
|
-
</AlertDialogContent>
|
|
712
|
-
</AlertDialog>
|
|
713
|
-
);
|
|
714
|
-
}
|
|
715
|
-
```
|
|
716
|
-
|
|
717
|
-
### Settings Modal
|
|
718
|
-
|
|
719
|
-
```tsx
|
|
720
|
-
import {
|
|
721
|
-
Dialog,
|
|
722
|
-
DialogContent,
|
|
723
|
-
DialogDescription,
|
|
724
|
-
DialogFooter,
|
|
725
|
-
DialogHeader,
|
|
726
|
-
DialogTitle,
|
|
727
|
-
DialogTrigger,
|
|
728
|
-
} from "@arolariu/components/dialog";
|
|
729
|
-
import { Button } from "@arolariu/components/button";
|
|
730
|
-
import { Input } from "@arolariu/components/input";
|
|
731
|
-
import { Label } from "@arolariu/components/label";
|
|
732
|
-
import { Switch } from "@arolariu/components/switch";
|
|
733
|
-
import {
|
|
734
|
-
Select,
|
|
735
|
-
SelectContent,
|
|
736
|
-
SelectItem,
|
|
737
|
-
SelectTrigger,
|
|
738
|
-
SelectValue,
|
|
739
|
-
} from "@arolariu/components/select";
|
|
740
|
-
import {
|
|
741
|
-
Tabs,
|
|
742
|
-
TabsContent,
|
|
743
|
-
TabsList,
|
|
744
|
-
TabsTrigger,
|
|
745
|
-
} from "@arolariu/components/tabs";
|
|
746
|
-
import { Settings } from "lucide-react";
|
|
747
|
-
|
|
748
|
-
export function SettingsDialog() {
|
|
749
|
-
return (
|
|
750
|
-
<Dialog>
|
|
751
|
-
<DialogTrigger asChild>
|
|
752
|
-
<Button variant="outline">
|
|
753
|
-
<Settings className="mr-2 h-4 w-4" />
|
|
754
|
-
Settings
|
|
755
|
-
</Button>
|
|
756
|
-
</DialogTrigger>
|
|
757
|
-
<DialogContent className="sm:max-w-[525px]">
|
|
758
|
-
<DialogHeader>
|
|
759
|
-
<DialogTitle>Settings</DialogTitle>
|
|
760
|
-
<DialogDescription>
|
|
761
|
-
Manage your account settings and preferences.
|
|
762
|
-
</DialogDescription>
|
|
763
|
-
</DialogHeader>
|
|
764
|
-
|
|
765
|
-
<Tabs defaultValue="general" className="w-full">
|
|
766
|
-
<TabsList className="grid w-full grid-cols-3">
|
|
767
|
-
<TabsTrigger value="general">General</TabsTrigger>
|
|
768
|
-
<TabsTrigger value="notifications">Notifications</TabsTrigger>
|
|
769
|
-
<TabsTrigger value="security">Security</TabsTrigger>
|
|
770
|
-
</TabsList>
|
|
771
|
-
|
|
772
|
-
<TabsContent value="general" className="space-y-4">
|
|
773
|
-
<div className="space-y-2">
|
|
774
|
-
<Label htmlFor="name">Display Name</Label>
|
|
775
|
-
<Input id="name" defaultValue="John Doe" />
|
|
776
|
-
</div>
|
|
777
|
-
<div className="space-y-2">
|
|
778
|
-
<Label htmlFor="email">Email</Label>
|
|
779
|
-
<Input id="email" defaultValue="john@example.com" />
|
|
780
|
-
</div>
|
|
781
|
-
<div className="space-y-2">
|
|
782
|
-
<Label htmlFor="timezone">Timezone</Label>
|
|
783
|
-
<Select defaultValue="utc">
|
|
784
|
-
<SelectTrigger>
|
|
785
|
-
<SelectValue />
|
|
786
|
-
</SelectTrigger>
|
|
787
|
-
<SelectContent>
|
|
788
|
-
<SelectItem value="utc">UTC</SelectItem>
|
|
789
|
-
<SelectItem value="est">Eastern Time</SelectItem>
|
|
790
|
-
<SelectItem value="pst">Pacific Time</SelectItem>
|
|
791
|
-
</SelectContent>
|
|
792
|
-
</Select>
|
|
793
|
-
</div>
|
|
794
|
-
</TabsContent>
|
|
795
|
-
|
|
796
|
-
<TabsContent value="notifications" className="space-y-4">
|
|
797
|
-
<div className="flex items-center justify-between">
|
|
798
|
-
<div className="space-y-0.5">
|
|
799
|
-
<Label>Email Notifications</Label>
|
|
800
|
-
<div className="text-sm text-muted-foreground">
|
|
801
|
-
Receive emails about your account activity.
|
|
802
|
-
</div>
|
|
803
|
-
</div>
|
|
804
|
-
<Switch />
|
|
805
|
-
</div>
|
|
806
|
-
<div className="flex items-center justify-between">
|
|
807
|
-
<div className="space-y-0.5">
|
|
808
|
-
<Label>Push Notifications</Label>
|
|
809
|
-
<div className="text-sm text-muted-foreground">
|
|
810
|
-
Receive push notifications on your devices.
|
|
811
|
-
</div>
|
|
812
|
-
</div>
|
|
813
|
-
<Switch />
|
|
814
|
-
</div>
|
|
815
|
-
</TabsContent>
|
|
816
|
-
|
|
817
|
-
<TabsContent value="security" className="space-y-4">
|
|
818
|
-
<div className="space-y-2">
|
|
819
|
-
<Label htmlFor="current-password">Current Password</Label>
|
|
820
|
-
<Input id="current-password" type="password" />
|
|
821
|
-
</div>
|
|
822
|
-
<div className="space-y-2">
|
|
823
|
-
<Label htmlFor="new-password">New Password</Label>
|
|
824
|
-
<Input id="new-password" type="password" />
|
|
825
|
-
</div>
|
|
826
|
-
<div className="space-y-2">
|
|
827
|
-
<Label htmlFor="confirm-password">Confirm Password</Label>
|
|
828
|
-
<Input id="confirm-password" type="password" />
|
|
829
|
-
</div>
|
|
830
|
-
</TabsContent>
|
|
831
|
-
</Tabs>
|
|
832
|
-
|
|
833
|
-
<DialogFooter>
|
|
834
|
-
<Button variant="outline">Cancel</Button>
|
|
835
|
-
<Button>Save Changes</Button>
|
|
836
|
-
</DialogFooter>
|
|
837
|
-
</DialogContent>
|
|
838
|
-
</Dialog>
|
|
839
|
-
);
|
|
840
|
-
}
|
|
841
|
-
```
|
|
842
|
-
|
|
843
|
-
---
|
|
844
|
-
|
|
845
|
-
## 🎨 Background Effects Examples
|
|
846
|
-
|
|
847
|
-
### Animated Landing Page
|
|
848
|
-
|
|
849
|
-
```tsx
|
|
850
|
-
import { DotBackground } from "@arolariu/components/dot-background";
|
|
851
|
-
import { BubbleBackground } from "@arolariu/components/bubble-background";
|
|
852
|
-
import { GradientBackground } from "@arolariu/components/gradient-background";
|
|
853
|
-
import { Button } from "@arolariu/components/button";
|
|
854
|
-
import { Card, CardContent } from "@arolariu/components/card";
|
|
855
|
-
|
|
856
|
-
export function LandingPage() {
|
|
857
|
-
return (
|
|
858
|
-
<div className="relative min-h-screen overflow-hidden">
|
|
859
|
-
{/* Animated Background */}
|
|
860
|
-
<DotBackground className="absolute inset-0" />
|
|
861
|
-
<GradientBackground className="absolute inset-0" />
|
|
862
|
-
|
|
863
|
-
{/* Content */}
|
|
864
|
-
<div className="relative z-10 flex min-h-screen flex-col items-center justify-center px-4 text-center">
|
|
865
|
-
<h1 className="mb-6 text-4xl font-bold tracking-tight sm:text-6xl">
|
|
866
|
-
Build Beautiful Apps
|
|
867
|
-
<span className="bg-gradient-to-r from-purple-600 to-pink-600 bg-clip-text text-transparent">
|
|
868
|
-
{" "}
|
|
869
|
-
Faster
|
|
870
|
-
</span>
|
|
871
|
-
</h1>
|
|
872
|
-
|
|
873
|
-
<p className="mb-8 max-w-2xl text-lg text-muted-foreground">
|
|
874
|
-
Create stunning user interfaces with our comprehensive React component
|
|
875
|
-
library. Built with accessibility, performance, and developer
|
|
876
|
-
experience in mind.
|
|
877
|
-
</p>
|
|
878
|
-
|
|
879
|
-
<div className="flex flex-col gap-4 sm:flex-row">
|
|
880
|
-
<Button size="lg" className="px-8">
|
|
881
|
-
Get Started
|
|
882
|
-
</Button>
|
|
883
|
-
<Button variant="outline" size="lg" className="px-8">
|
|
884
|
-
View Components
|
|
885
|
-
</Button>
|
|
886
|
-
</div>
|
|
887
|
-
|
|
888
|
-
{/* Feature Cards */}
|
|
889
|
-
<div className="mt-16 grid gap-6 sm:grid-cols-3">
|
|
890
|
-
<Card className="bg-card/50 backdrop-blur">
|
|
891
|
-
<CardContent className="p-6 text-center">
|
|
892
|
-
<h3 className="mb-2 text-lg font-semibold">60+ Components</h3>
|
|
893
|
-
<p className="text-sm text-muted-foreground">
|
|
894
|
-
Comprehensive set of UI components for any project
|
|
895
|
-
</p>
|
|
896
|
-
</CardContent>
|
|
897
|
-
</Card>
|
|
898
|
-
|
|
899
|
-
<Card className="bg-card/50 backdrop-blur">
|
|
900
|
-
<CardContent className="p-6 text-center">
|
|
901
|
-
<h3 className="mb-2 text-lg font-semibold">TypeScript First</h3>
|
|
902
|
-
<p className="text-sm text-muted-foreground">
|
|
903
|
-
Full type safety and excellent developer experience
|
|
904
|
-
</p>
|
|
905
|
-
</CardContent>
|
|
906
|
-
</Card>
|
|
907
|
-
|
|
908
|
-
<Card className="bg-card/50 backdrop-blur">
|
|
909
|
-
<CardContent className="p-6 text-center">
|
|
910
|
-
<h3 className="mb-2 text-lg font-semibold">Accessible</h3>
|
|
911
|
-
<p className="text-sm text-muted-foreground">
|
|
912
|
-
Built on Radix UI with WAI-ARIA compliance
|
|
913
|
-
</p>
|
|
914
|
-
</CardContent>
|
|
915
|
-
</Card>
|
|
916
|
-
</div>
|
|
917
|
-
</div>
|
|
918
|
-
</div>
|
|
919
|
-
);
|
|
920
|
-
}
|
|
921
|
-
```
|
|
922
|
-
|
|
923
|
-
---
|
|
924
|
-
|
|
925
|
-
## 📱 Mobile-First Examples
|
|
926
|
-
|
|
927
|
-
### Mobile-Optimized Form
|
|
928
|
-
|
|
929
|
-
```tsx
|
|
930
|
-
import {
|
|
931
|
-
Sheet,
|
|
932
|
-
SheetContent,
|
|
933
|
-
SheetDescription,
|
|
934
|
-
SheetHeader,
|
|
935
|
-
SheetTitle,
|
|
936
|
-
SheetTrigger,
|
|
937
|
-
} from "@arolariu/components/sheet";
|
|
938
|
-
import { Button } from "@arolariu/components/button";
|
|
939
|
-
import { Input } from "@arolariu/components/input";
|
|
940
|
-
import { Label } from "@arolariu/components/label";
|
|
941
|
-
import { Textarea } from "@arolariu/components/textarea";
|
|
942
|
-
import { Plus } from "lucide-react";
|
|
943
|
-
|
|
944
|
-
export function MobileAddForm() {
|
|
945
|
-
return (
|
|
946
|
-
<Sheet>
|
|
947
|
-
<SheetTrigger asChild>
|
|
948
|
-
<Button className="fixed bottom-4 right-4 h-14 w-14 rounded-full shadow-lg md:hidden">
|
|
949
|
-
<Plus className="h-6 w-6" />
|
|
950
|
-
</Button>
|
|
951
|
-
</SheetTrigger>
|
|
952
|
-
<SheetContent side="bottom" className="h-[80vh]">
|
|
953
|
-
<SheetHeader>
|
|
954
|
-
<SheetTitle>Add New Item</SheetTitle>
|
|
955
|
-
<SheetDescription>
|
|
956
|
-
Fill out the form below to add a new item to your collection.
|
|
957
|
-
</SheetDescription>
|
|
958
|
-
</SheetHeader>
|
|
959
|
-
|
|
960
|
-
<div className="mt-6 space-y-4">
|
|
961
|
-
<div className="space-y-2">
|
|
962
|
-
<Label htmlFor="title">Title</Label>
|
|
963
|
-
<Input id="title" placeholder="Enter title" />
|
|
964
|
-
</div>
|
|
965
|
-
|
|
966
|
-
<div className="space-y-2">
|
|
967
|
-
<Label htmlFor="description">Description</Label>
|
|
968
|
-
<Textarea
|
|
969
|
-
id="description"
|
|
970
|
-
placeholder="Enter description"
|
|
971
|
-
className="min-h-[100px]"
|
|
972
|
-
/>
|
|
973
|
-
</div>
|
|
974
|
-
|
|
975
|
-
<div className="flex gap-2 pt-4">
|
|
976
|
-
<Button className="flex-1">Save</Button>
|
|
977
|
-
<Button variant="outline" className="flex-1">
|
|
978
|
-
Cancel
|
|
979
|
-
</Button>
|
|
980
|
-
</div>
|
|
981
|
-
</div>
|
|
982
|
-
</SheetContent>
|
|
983
|
-
</Sheet>
|
|
984
|
-
);
|
|
985
|
-
}
|
|
986
|
-
```
|
|
987
|
-
|
|
988
|
-
---
|
|
989
|
-
|
|
990
|
-
## 🎯 Tips for Success
|
|
991
|
-
|
|
992
|
-
### Performance Optimization
|
|
993
|
-
|
|
994
|
-
```tsx
|
|
995
|
-
// ✅ Import only what you need for optimal bundle size
|
|
996
|
-
import { Button } from "@arolariu/components/button";
|
|
997
|
-
import { Card } from "@arolariu/components/card";
|
|
998
|
-
|
|
999
|
-
// ❌ Avoid barrel imports
|
|
1000
|
-
import { Button, Card } from "@arolariu/components";
|
|
1001
|
-
```
|
|
1002
|
-
|
|
1003
|
-
### Accessibility Best Practices
|
|
1004
|
-
|
|
1005
|
-
```tsx
|
|
1006
|
-
// ✅ Always include proper labels and ARIA attributes
|
|
1007
|
-
<Button aria-label="Close dialog" onClick={handleClose}>
|
|
1008
|
-
<X className="h-4 w-4" />
|
|
1009
|
-
</Button>
|
|
1010
|
-
|
|
1011
|
-
// ✅ Use semantic HTML structure
|
|
1012
|
-
<main role="main">
|
|
1013
|
-
<section aria-labelledby="section-title">
|
|
1014
|
-
<h2 id="section-title">Section Title</h2>
|
|
1015
|
-
{/* content */}
|
|
1016
|
-
</section>
|
|
1017
|
-
</main>
|
|
1018
|
-
```
|
|
1019
|
-
|
|
1020
|
-
### Responsive Design
|
|
1021
|
-
|
|
1022
|
-
```tsx
|
|
1023
|
-
// ✅ Use Tailwind's responsive utilities
|
|
1024
|
-
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4">
|
|
1025
|
-
{/* components */}
|
|
1026
|
-
</div>
|
|
1027
|
-
|
|
1028
|
-
// ✅ Hide/show components based on screen size
|
|
1029
|
-
<div className="block md:hidden">Mobile only content</div>
|
|
1030
|
-
<div className="hidden md:block">Desktop only content</div>
|
|
1031
|
-
```
|
|
1032
|
-
|
|
1033
|
-
---
|
|
1034
|
-
|
|
1035
|
-
Ready to build something amazing? **[🚀 Start with our Quick Start Guide](./README.md#-quick-start)**
|
|
1
|
+
# 💡 Usage Examples for @arolariu/components
|
|
2
|
+
|
|
3
|
+
> **Real-world examples to get you building faster!** Copy, paste, and customize these patterns for your projects.
|
|
4
|
+
|
|
5
|
+
## 🚀 Getting Started
|
|
6
|
+
|
|
7
|
+
### Installation & Setup
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
# Install the package
|
|
11
|
+
npm install @arolariu/components
|
|
12
|
+
|
|
13
|
+
# Install peer dependencies if needed
|
|
14
|
+
npm install react react-dom tailwindcss
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
```tsx
|
|
18
|
+
// Add to your app's root (App.tsx, main.tsx, or _app.tsx)
|
|
19
|
+
import "@arolariu/components/styles";
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## 🎨 Layout Examples
|
|
25
|
+
|
|
26
|
+
### Simple Card Layout
|
|
27
|
+
|
|
28
|
+
```tsx
|
|
29
|
+
import {
|
|
30
|
+
Card,
|
|
31
|
+
CardHeader,
|
|
32
|
+
CardTitle,
|
|
33
|
+
CardContent,
|
|
34
|
+
CardFooter,
|
|
35
|
+
} from "@arolariu/components/card";
|
|
36
|
+
import { Button } from "@arolariu/components/button";
|
|
37
|
+
import { Badge } from "@arolariu/components/badge";
|
|
38
|
+
|
|
39
|
+
export function ProductCard() {
|
|
40
|
+
return (
|
|
41
|
+
<Card className="w-96">
|
|
42
|
+
<CardHeader>
|
|
43
|
+
<div className="flex items-center justify-between">
|
|
44
|
+
<CardTitle>Premium Plan</CardTitle>
|
|
45
|
+
<Badge variant="secondary">Popular</Badge>
|
|
46
|
+
</div>
|
|
47
|
+
</CardHeader>
|
|
48
|
+
<CardContent>
|
|
49
|
+
<p className="text-3xl font-bold">
|
|
50
|
+
$29<span className="text-sm font-normal">/month</span>
|
|
51
|
+
</p>
|
|
52
|
+
<ul className="mt-4 space-y-2">
|
|
53
|
+
<li>✅ Unlimited projects</li>
|
|
54
|
+
<li>✅ Priority support</li>
|
|
55
|
+
<li>✅ Advanced analytics</li>
|
|
56
|
+
</ul>
|
|
57
|
+
</CardContent>
|
|
58
|
+
<CardFooter>
|
|
59
|
+
<Button className="w-full">Subscribe Now</Button>
|
|
60
|
+
</CardFooter>
|
|
61
|
+
</Card>
|
|
62
|
+
);
|
|
63
|
+
}
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### Dashboard Layout with Sidebar
|
|
67
|
+
|
|
68
|
+
```tsx
|
|
69
|
+
import {
|
|
70
|
+
Sidebar,
|
|
71
|
+
SidebarContent,
|
|
72
|
+
SidebarMenuItem,
|
|
73
|
+
} from "@arolariu/components/sidebar";
|
|
74
|
+
import {
|
|
75
|
+
Card,
|
|
76
|
+
CardContent,
|
|
77
|
+
CardHeader,
|
|
78
|
+
CardTitle,
|
|
79
|
+
} from "@arolariu/components/card";
|
|
80
|
+
import { Progress } from "@arolariu/components/progress";
|
|
81
|
+
import {
|
|
82
|
+
Avatar,
|
|
83
|
+
AvatarImage,
|
|
84
|
+
AvatarFallback,
|
|
85
|
+
} from "@arolariu/components/avatar";
|
|
86
|
+
|
|
87
|
+
export function Dashboard() {
|
|
88
|
+
return (
|
|
89
|
+
<div className="flex h-screen">
|
|
90
|
+
{/* Sidebar */}
|
|
91
|
+
<Sidebar>
|
|
92
|
+
<SidebarContent>
|
|
93
|
+
<SidebarMenuItem href="/dashboard">Dashboard</SidebarMenuItem>
|
|
94
|
+
<SidebarMenuItem href="/projects">Projects</SidebarMenuItem>
|
|
95
|
+
<SidebarMenuItem href="/settings">Settings</SidebarMenuItem>
|
|
96
|
+
</SidebarContent>
|
|
97
|
+
</Sidebar>
|
|
98
|
+
|
|
99
|
+
{/* Main Content */}
|
|
100
|
+
<main className="flex-1 p-6 overflow-auto">
|
|
101
|
+
<h1 className="text-3xl font-bold mb-6">Dashboard</h1>
|
|
102
|
+
|
|
103
|
+
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
|
|
104
|
+
<Card>
|
|
105
|
+
<CardHeader>
|
|
106
|
+
<CardTitle>Project Progress</CardTitle>
|
|
107
|
+
</CardHeader>
|
|
108
|
+
<CardContent>
|
|
109
|
+
<Progress value={75} className="w-full" />
|
|
110
|
+
<p className="text-sm text-muted-foreground mt-2">75% complete</p>
|
|
111
|
+
</CardContent>
|
|
112
|
+
</Card>
|
|
113
|
+
|
|
114
|
+
<Card>
|
|
115
|
+
<CardHeader>
|
|
116
|
+
<CardTitle>Team Members</CardTitle>
|
|
117
|
+
</CardHeader>
|
|
118
|
+
<CardContent>
|
|
119
|
+
<div className="flex -space-x-2">
|
|
120
|
+
<Avatar className="border-2 border-background">
|
|
121
|
+
<AvatarImage src="/avatar1.jpg" />
|
|
122
|
+
<AvatarFallback>JD</AvatarFallback>
|
|
123
|
+
</Avatar>
|
|
124
|
+
<Avatar className="border-2 border-background">
|
|
125
|
+
<AvatarImage src="/avatar2.jpg" />
|
|
126
|
+
<AvatarFallback>SM</AvatarFallback>
|
|
127
|
+
</Avatar>
|
|
128
|
+
<Avatar className="border-2 border-background">
|
|
129
|
+
<AvatarFallback>+3</AvatarFallback>
|
|
130
|
+
</Avatar>
|
|
131
|
+
</div>
|
|
132
|
+
</CardContent>
|
|
133
|
+
</Card>
|
|
134
|
+
</div>
|
|
135
|
+
</main>
|
|
136
|
+
</div>
|
|
137
|
+
);
|
|
138
|
+
}
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
---
|
|
142
|
+
|
|
143
|
+
## 📝 Form Examples
|
|
144
|
+
|
|
145
|
+
### Complete Login Form
|
|
146
|
+
|
|
147
|
+
```tsx
|
|
148
|
+
import {
|
|
149
|
+
Card,
|
|
150
|
+
CardHeader,
|
|
151
|
+
CardTitle,
|
|
152
|
+
CardContent,
|
|
153
|
+
CardFooter,
|
|
154
|
+
} from "@arolariu/components/card";
|
|
155
|
+
import { Input } from "@arolariu/components/input";
|
|
156
|
+
import { Button } from "@arolariu/components/button";
|
|
157
|
+
import { Label } from "@arolariu/components/label";
|
|
158
|
+
import { Checkbox } from "@arolariu/components/checkbox";
|
|
159
|
+
import { Alert, AlertDescription } from "@arolariu/components/alert";
|
|
160
|
+
import { useState } from "react";
|
|
161
|
+
|
|
162
|
+
export function LoginForm() {
|
|
163
|
+
const [email, setEmail] = useState("");
|
|
164
|
+
const [password, setPassword] = useState("");
|
|
165
|
+
const [rememberMe, setRememberMe] = useState(false);
|
|
166
|
+
const [error, setError] = useState("");
|
|
167
|
+
const [loading, setLoading] = useState(false);
|
|
168
|
+
|
|
169
|
+
const handleSubmit = async (e: React.FormEvent) => {
|
|
170
|
+
e.preventDefault();
|
|
171
|
+
setLoading(true);
|
|
172
|
+
setError("");
|
|
173
|
+
|
|
174
|
+
try {
|
|
175
|
+
// Your login logic here
|
|
176
|
+
await new Promise((resolve) => setTimeout(resolve, 1000)); // Simulate API call
|
|
177
|
+
console.log("Login successful!");
|
|
178
|
+
} catch (err) {
|
|
179
|
+
setError("Invalid email or password");
|
|
180
|
+
} finally {
|
|
181
|
+
setLoading(false);
|
|
182
|
+
}
|
|
183
|
+
};
|
|
184
|
+
|
|
185
|
+
return (
|
|
186
|
+
<div className="min-h-screen flex items-center justify-center bg-gray-50">
|
|
187
|
+
<Card className="w-full max-w-md">
|
|
188
|
+
<CardHeader>
|
|
189
|
+
<CardTitle className="text-center">Welcome Back</CardTitle>
|
|
190
|
+
</CardHeader>
|
|
191
|
+
<form onSubmit={handleSubmit}>
|
|
192
|
+
<CardContent className="space-y-4">
|
|
193
|
+
{error && (
|
|
194
|
+
<Alert variant="destructive">
|
|
195
|
+
<AlertDescription>{error}</AlertDescription>
|
|
196
|
+
</Alert>
|
|
197
|
+
)}
|
|
198
|
+
|
|
199
|
+
<div className="space-y-2">
|
|
200
|
+
<Label htmlFor="email">Email</Label>
|
|
201
|
+
<Input
|
|
202
|
+
id="email"
|
|
203
|
+
type="email"
|
|
204
|
+
placeholder="you@example.com"
|
|
205
|
+
value={email}
|
|
206
|
+
onChange={(e) => setEmail(e.target.value)}
|
|
207
|
+
required
|
|
208
|
+
/>
|
|
209
|
+
</div>
|
|
210
|
+
|
|
211
|
+
<div className="space-y-2">
|
|
212
|
+
<Label htmlFor="password">Password</Label>
|
|
213
|
+
<Input
|
|
214
|
+
id="password"
|
|
215
|
+
type="password"
|
|
216
|
+
value={password}
|
|
217
|
+
onChange={(e) => setPassword(e.target.value)}
|
|
218
|
+
required
|
|
219
|
+
/>
|
|
220
|
+
</div>
|
|
221
|
+
|
|
222
|
+
<div className="flex items-center space-x-2">
|
|
223
|
+
<Checkbox
|
|
224
|
+
id="remember"
|
|
225
|
+
checked={rememberMe}
|
|
226
|
+
onCheckedChange={setRememberMe}
|
|
227
|
+
/>
|
|
228
|
+
<Label htmlFor="remember">Remember me</Label>
|
|
229
|
+
</div>
|
|
230
|
+
</CardContent>
|
|
231
|
+
|
|
232
|
+
<CardFooter className="flex flex-col space-y-2">
|
|
233
|
+
<Button type="submit" className="w-full" disabled={loading}>
|
|
234
|
+
{loading ? "Signing in..." : "Sign In"}
|
|
235
|
+
</Button>
|
|
236
|
+
<Button variant="link" size="sm">
|
|
237
|
+
Forgot your password?
|
|
238
|
+
</Button>
|
|
239
|
+
</CardFooter>
|
|
240
|
+
</form>
|
|
241
|
+
</Card>
|
|
242
|
+
</div>
|
|
243
|
+
);
|
|
244
|
+
}
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
### Advanced Form with Validation
|
|
248
|
+
|
|
249
|
+
```tsx
|
|
250
|
+
import { useForm } from "react-hook-form";
|
|
251
|
+
import { zodResolver } from "@hookform/resolvers/zod";
|
|
252
|
+
import * as z from "zod";
|
|
253
|
+
import {
|
|
254
|
+
Form,
|
|
255
|
+
FormControl,
|
|
256
|
+
FormDescription,
|
|
257
|
+
FormField,
|
|
258
|
+
FormItem,
|
|
259
|
+
FormLabel,
|
|
260
|
+
FormMessage,
|
|
261
|
+
} from "@arolariu/components/form";
|
|
262
|
+
import { Input } from "@arolariu/components/input";
|
|
263
|
+
import { Button } from "@arolariu/components/button";
|
|
264
|
+
import {
|
|
265
|
+
Select,
|
|
266
|
+
SelectContent,
|
|
267
|
+
SelectItem,
|
|
268
|
+
SelectTrigger,
|
|
269
|
+
SelectValue,
|
|
270
|
+
} from "@arolariu/components/select";
|
|
271
|
+
import { Textarea } from "@arolariu/components/textarea";
|
|
272
|
+
|
|
273
|
+
const formSchema = z.object({
|
|
274
|
+
firstName: z.string().min(2, "First name must be at least 2 characters"),
|
|
275
|
+
lastName: z.string().min(2, "Last name must be at least 2 characters"),
|
|
276
|
+
email: z.string().email("Invalid email address"),
|
|
277
|
+
role: z.string().min(1, "Please select a role"),
|
|
278
|
+
bio: z.string().max(500, "Bio must be less than 500 characters").optional(),
|
|
279
|
+
});
|
|
280
|
+
|
|
281
|
+
export function ProfileForm() {
|
|
282
|
+
const form = useForm<z.infer<typeof formSchema>>({
|
|
283
|
+
resolver: zodResolver(formSchema),
|
|
284
|
+
defaultValues: {
|
|
285
|
+
firstName: "",
|
|
286
|
+
lastName: "",
|
|
287
|
+
email: "",
|
|
288
|
+
role: "",
|
|
289
|
+
bio: "",
|
|
290
|
+
},
|
|
291
|
+
});
|
|
292
|
+
|
|
293
|
+
function onSubmit(values: z.infer<typeof formSchema>) {
|
|
294
|
+
console.log(values);
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
return (
|
|
298
|
+
<Form {...form}>
|
|
299
|
+
<form
|
|
300
|
+
onSubmit={form.handleSubmit(onSubmit)}
|
|
301
|
+
className="space-y-6 max-w-md"
|
|
302
|
+
>
|
|
303
|
+
<div className="grid grid-cols-2 gap-4">
|
|
304
|
+
<FormField
|
|
305
|
+
control={form.control}
|
|
306
|
+
name="firstName"
|
|
307
|
+
render={({ field }) => (
|
|
308
|
+
<FormItem>
|
|
309
|
+
<FormLabel>First Name</FormLabel>
|
|
310
|
+
<FormControl>
|
|
311
|
+
<Input placeholder="John" {...field} />
|
|
312
|
+
</FormControl>
|
|
313
|
+
<FormMessage />
|
|
314
|
+
</FormItem>
|
|
315
|
+
)}
|
|
316
|
+
/>
|
|
317
|
+
|
|
318
|
+
<FormField
|
|
319
|
+
control={form.control}
|
|
320
|
+
name="lastName"
|
|
321
|
+
render={({ field }) => (
|
|
322
|
+
<FormItem>
|
|
323
|
+
<FormLabel>Last Name</FormLabel>
|
|
324
|
+
<FormControl>
|
|
325
|
+
<Input placeholder="Doe" {...field} />
|
|
326
|
+
</FormControl>
|
|
327
|
+
<FormMessage />
|
|
328
|
+
</FormItem>
|
|
329
|
+
)}
|
|
330
|
+
/>
|
|
331
|
+
</div>
|
|
332
|
+
|
|
333
|
+
<FormField
|
|
334
|
+
control={form.control}
|
|
335
|
+
name="email"
|
|
336
|
+
render={({ field }) => (
|
|
337
|
+
<FormItem>
|
|
338
|
+
<FormLabel>Email</FormLabel>
|
|
339
|
+
<FormControl>
|
|
340
|
+
<Input placeholder="john.doe@example.com" {...field} />
|
|
341
|
+
</FormControl>
|
|
342
|
+
<FormDescription>
|
|
343
|
+
We'll never share your email with anyone else.
|
|
344
|
+
</FormDescription>
|
|
345
|
+
<FormMessage />
|
|
346
|
+
</FormItem>
|
|
347
|
+
)}
|
|
348
|
+
/>
|
|
349
|
+
|
|
350
|
+
<FormField
|
|
351
|
+
control={form.control}
|
|
352
|
+
name="role"
|
|
353
|
+
render={({ field }) => (
|
|
354
|
+
<FormItem>
|
|
355
|
+
<FormLabel>Role</FormLabel>
|
|
356
|
+
<Select onValueChange={field.onChange} defaultValue={field.value}>
|
|
357
|
+
<FormControl>
|
|
358
|
+
<SelectTrigger>
|
|
359
|
+
<SelectValue placeholder="Select a role" />
|
|
360
|
+
</SelectTrigger>
|
|
361
|
+
</FormControl>
|
|
362
|
+
<SelectContent>
|
|
363
|
+
<SelectItem value="developer">Developer</SelectItem>
|
|
364
|
+
<SelectItem value="designer">Designer</SelectItem>
|
|
365
|
+
<SelectItem value="manager">Manager</SelectItem>
|
|
366
|
+
</SelectContent>
|
|
367
|
+
</Select>
|
|
368
|
+
<FormMessage />
|
|
369
|
+
</FormItem>
|
|
370
|
+
)}
|
|
371
|
+
/>
|
|
372
|
+
|
|
373
|
+
<FormField
|
|
374
|
+
control={form.control}
|
|
375
|
+
name="bio"
|
|
376
|
+
render={({ field }) => (
|
|
377
|
+
<FormItem>
|
|
378
|
+
<FormLabel>Bio</FormLabel>
|
|
379
|
+
<FormControl>
|
|
380
|
+
<Textarea
|
|
381
|
+
placeholder="Tell us about yourself"
|
|
382
|
+
className="min-h-[100px]"
|
|
383
|
+
{...field}
|
|
384
|
+
/>
|
|
385
|
+
</FormControl>
|
|
386
|
+
<FormMessage />
|
|
387
|
+
</FormItem>
|
|
388
|
+
)}
|
|
389
|
+
/>
|
|
390
|
+
|
|
391
|
+
<Button type="submit">Save Profile</Button>
|
|
392
|
+
</form>
|
|
393
|
+
</Form>
|
|
394
|
+
);
|
|
395
|
+
}
|
|
396
|
+
```
|
|
397
|
+
|
|
398
|
+
---
|
|
399
|
+
|
|
400
|
+
## 🧭 Navigation Examples
|
|
401
|
+
|
|
402
|
+
### Responsive Header Navigation
|
|
403
|
+
|
|
404
|
+
```tsx
|
|
405
|
+
import {
|
|
406
|
+
NavigationMenu,
|
|
407
|
+
NavigationMenuItem,
|
|
408
|
+
NavigationMenuList,
|
|
409
|
+
} from "@arolariu/components/navigation-menu";
|
|
410
|
+
import { Button } from "@arolariu/components/button";
|
|
411
|
+
import { Sheet, SheetContent, SheetTrigger } from "@arolariu/components/sheet";
|
|
412
|
+
import {
|
|
413
|
+
Avatar,
|
|
414
|
+
AvatarImage,
|
|
415
|
+
AvatarFallback,
|
|
416
|
+
} from "@arolariu/components/avatar";
|
|
417
|
+
import {
|
|
418
|
+
DropdownMenu,
|
|
419
|
+
DropdownMenuContent,
|
|
420
|
+
DropdownMenuItem,
|
|
421
|
+
DropdownMenuTrigger,
|
|
422
|
+
} from "@arolariu/components/dropdown-menu";
|
|
423
|
+
import { MenuIcon, User, Settings, LogOut } from "lucide-react";
|
|
424
|
+
|
|
425
|
+
export function AppHeader() {
|
|
426
|
+
return (
|
|
427
|
+
<header className="sticky top-0 z-50 w-full border-b bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60">
|
|
428
|
+
<div className="container flex h-14 items-center">
|
|
429
|
+
<div className="mr-4 hidden md:flex">
|
|
430
|
+
<a className="mr-6 flex items-center space-x-2" href="/">
|
|
431
|
+
<span className="hidden font-bold sm:inline-block">MyApp</span>
|
|
432
|
+
</a>
|
|
433
|
+
|
|
434
|
+
<NavigationMenu>
|
|
435
|
+
<NavigationMenuList>
|
|
436
|
+
<NavigationMenuItem>
|
|
437
|
+
<Button variant="ghost" href="/dashboard">
|
|
438
|
+
Dashboard
|
|
439
|
+
</Button>
|
|
440
|
+
</NavigationMenuItem>
|
|
441
|
+
<NavigationMenuItem>
|
|
442
|
+
<Button variant="ghost" href="/projects">
|
|
443
|
+
Projects
|
|
444
|
+
</Button>
|
|
445
|
+
</NavigationMenuItem>
|
|
446
|
+
<NavigationMenuItem>
|
|
447
|
+
<Button variant="ghost" href="/analytics">
|
|
448
|
+
Analytics
|
|
449
|
+
</Button>
|
|
450
|
+
</NavigationMenuItem>
|
|
451
|
+
</NavigationMenuList>
|
|
452
|
+
</NavigationMenu>
|
|
453
|
+
</div>
|
|
454
|
+
|
|
455
|
+
{/* Mobile Navigation */}
|
|
456
|
+
<Sheet>
|
|
457
|
+
<SheetTrigger asChild>
|
|
458
|
+
<Button
|
|
459
|
+
variant="ghost"
|
|
460
|
+
className="mr-2 px-0 text-base hover:bg-transparent focus-visible:bg-transparent focus-visible:ring-0 focus-visible:ring-offset-0 md:hidden"
|
|
461
|
+
>
|
|
462
|
+
<MenuIcon className="h-5 w-5" />
|
|
463
|
+
</Button>
|
|
464
|
+
</SheetTrigger>
|
|
465
|
+
<SheetContent side="left">
|
|
466
|
+
<nav className="flex flex-col space-y-3">
|
|
467
|
+
<Button
|
|
468
|
+
variant="ghost"
|
|
469
|
+
className="justify-start"
|
|
470
|
+
href="/dashboard"
|
|
471
|
+
>
|
|
472
|
+
Dashboard
|
|
473
|
+
</Button>
|
|
474
|
+
<Button
|
|
475
|
+
variant="ghost"
|
|
476
|
+
className="justify-start"
|
|
477
|
+
href="/projects"
|
|
478
|
+
>
|
|
479
|
+
Projects
|
|
480
|
+
</Button>
|
|
481
|
+
<Button
|
|
482
|
+
variant="ghost"
|
|
483
|
+
className="justify-start"
|
|
484
|
+
href="/analytics"
|
|
485
|
+
>
|
|
486
|
+
Analytics
|
|
487
|
+
</Button>
|
|
488
|
+
</nav>
|
|
489
|
+
</SheetContent>
|
|
490
|
+
</Sheet>
|
|
491
|
+
|
|
492
|
+
<div className="flex flex-1 items-center justify-between space-x-2 md:justify-end">
|
|
493
|
+
<div className="w-full flex-1 md:w-auto md:flex-none">
|
|
494
|
+
{/* Search or other content can go here */}
|
|
495
|
+
</div>
|
|
496
|
+
|
|
497
|
+
{/* User Menu */}
|
|
498
|
+
<DropdownMenu>
|
|
499
|
+
<DropdownMenuTrigger asChild>
|
|
500
|
+
<Button variant="ghost" className="relative h-8 w-8 rounded-full">
|
|
501
|
+
<Avatar className="h-8 w-8">
|
|
502
|
+
<AvatarImage src="/avatars/01.png" alt="User" />
|
|
503
|
+
<AvatarFallback>JD</AvatarFallback>
|
|
504
|
+
</Avatar>
|
|
505
|
+
</Button>
|
|
506
|
+
</DropdownMenuTrigger>
|
|
507
|
+
<DropdownMenuContent className="w-56" align="end" forceMount>
|
|
508
|
+
<DropdownMenuItem>
|
|
509
|
+
<User className="mr-2 h-4 w-4" />
|
|
510
|
+
<span>Profile</span>
|
|
511
|
+
</DropdownMenuItem>
|
|
512
|
+
<DropdownMenuItem>
|
|
513
|
+
<Settings className="mr-2 h-4 w-4" />
|
|
514
|
+
<span>Settings</span>
|
|
515
|
+
</DropdownMenuItem>
|
|
516
|
+
<DropdownMenuItem>
|
|
517
|
+
<LogOut className="mr-2 h-4 w-4" />
|
|
518
|
+
<span>Log out</span>
|
|
519
|
+
</DropdownMenuItem>
|
|
520
|
+
</DropdownMenuContent>
|
|
521
|
+
</DropdownMenu>
|
|
522
|
+
</div>
|
|
523
|
+
</div>
|
|
524
|
+
</header>
|
|
525
|
+
);
|
|
526
|
+
}
|
|
527
|
+
```
|
|
528
|
+
|
|
529
|
+
---
|
|
530
|
+
|
|
531
|
+
## 📊 Data Display Examples
|
|
532
|
+
|
|
533
|
+
### Interactive Data Table
|
|
534
|
+
|
|
535
|
+
```tsx
|
|
536
|
+
import {
|
|
537
|
+
Table,
|
|
538
|
+
TableBody,
|
|
539
|
+
TableCaption,
|
|
540
|
+
TableCell,
|
|
541
|
+
TableHead,
|
|
542
|
+
TableHeader,
|
|
543
|
+
TableRow,
|
|
544
|
+
} from "@arolariu/components/table";
|
|
545
|
+
import { Badge } from "@arolariu/components/badge";
|
|
546
|
+
import { Button } from "@arolariu/components/button";
|
|
547
|
+
import {
|
|
548
|
+
DropdownMenu,
|
|
549
|
+
DropdownMenuContent,
|
|
550
|
+
DropdownMenuItem,
|
|
551
|
+
DropdownMenuTrigger,
|
|
552
|
+
} from "@arolariu/components/dropdown-menu";
|
|
553
|
+
import { MoreHorizontal, Eye, Edit, Trash } from "lucide-react";
|
|
554
|
+
|
|
555
|
+
interface User {
|
|
556
|
+
id: string;
|
|
557
|
+
name: string;
|
|
558
|
+
email: string;
|
|
559
|
+
role: string;
|
|
560
|
+
status: "active" | "inactive" | "pending";
|
|
561
|
+
lastLogin: string;
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
const users: User[] = [
|
|
565
|
+
{
|
|
566
|
+
id: "1",
|
|
567
|
+
name: "John Doe",
|
|
568
|
+
email: "john@example.com",
|
|
569
|
+
role: "Admin",
|
|
570
|
+
status: "active",
|
|
571
|
+
lastLogin: "2 hours ago",
|
|
572
|
+
},
|
|
573
|
+
{
|
|
574
|
+
id: "2",
|
|
575
|
+
name: "Jane Smith",
|
|
576
|
+
email: "jane@example.com",
|
|
577
|
+
role: "User",
|
|
578
|
+
status: "active",
|
|
579
|
+
lastLogin: "1 day ago",
|
|
580
|
+
},
|
|
581
|
+
{
|
|
582
|
+
id: "3",
|
|
583
|
+
name: "Bob Johnson",
|
|
584
|
+
email: "bob@example.com",
|
|
585
|
+
role: "User",
|
|
586
|
+
status: "pending",
|
|
587
|
+
lastLogin: "Never",
|
|
588
|
+
},
|
|
589
|
+
];
|
|
590
|
+
|
|
591
|
+
export function UsersTable() {
|
|
592
|
+
const getStatusBadge = (status: User["status"]) => {
|
|
593
|
+
const variants = {
|
|
594
|
+
active: "default",
|
|
595
|
+
inactive: "secondary",
|
|
596
|
+
pending: "outline",
|
|
597
|
+
} as const;
|
|
598
|
+
|
|
599
|
+
return <Badge variant={variants[status]}>{status}</Badge>;
|
|
600
|
+
};
|
|
601
|
+
|
|
602
|
+
return (
|
|
603
|
+
<div className="w-full">
|
|
604
|
+
<div className="rounded-md border">
|
|
605
|
+
<Table>
|
|
606
|
+
<TableCaption>A list of your team members.</TableCaption>
|
|
607
|
+
<TableHeader>
|
|
608
|
+
<TableRow>
|
|
609
|
+
<TableHead>Name</TableHead>
|
|
610
|
+
<TableHead>Email</TableHead>
|
|
611
|
+
<TableHead>Role</TableHead>
|
|
612
|
+
<TableHead>Status</TableHead>
|
|
613
|
+
<TableHead>Last Login</TableHead>
|
|
614
|
+
<TableHead className="w-[100px]">Actions</TableHead>
|
|
615
|
+
</TableRow>
|
|
616
|
+
</TableHeader>
|
|
617
|
+
<TableBody>
|
|
618
|
+
{users.map((user) => (
|
|
619
|
+
<TableRow key={user.id}>
|
|
620
|
+
<TableCell className="font-medium">{user.name}</TableCell>
|
|
621
|
+
<TableCell>{user.email}</TableCell>
|
|
622
|
+
<TableCell>{user.role}</TableCell>
|
|
623
|
+
<TableCell>{getStatusBadge(user.status)}</TableCell>
|
|
624
|
+
<TableCell>{user.lastLogin}</TableCell>
|
|
625
|
+
<TableCell>
|
|
626
|
+
<DropdownMenu>
|
|
627
|
+
<DropdownMenuTrigger asChild>
|
|
628
|
+
<Button variant="ghost" className="h-8 w-8 p-0">
|
|
629
|
+
<MoreHorizontal className="h-4 w-4" />
|
|
630
|
+
</Button>
|
|
631
|
+
</DropdownMenuTrigger>
|
|
632
|
+
<DropdownMenuContent align="end">
|
|
633
|
+
<DropdownMenuItem>
|
|
634
|
+
<Eye className="mr-2 h-4 w-4" />
|
|
635
|
+
View
|
|
636
|
+
</DropdownMenuItem>
|
|
637
|
+
<DropdownMenuItem>
|
|
638
|
+
<Edit className="mr-2 h-4 w-4" />
|
|
639
|
+
Edit
|
|
640
|
+
</DropdownMenuItem>
|
|
641
|
+
<DropdownMenuItem className="text-red-600">
|
|
642
|
+
<Trash className="mr-2 h-4 w-4" />
|
|
643
|
+
Delete
|
|
644
|
+
</DropdownMenuItem>
|
|
645
|
+
</DropdownMenuContent>
|
|
646
|
+
</DropdownMenu>
|
|
647
|
+
</TableCell>
|
|
648
|
+
</TableRow>
|
|
649
|
+
))}
|
|
650
|
+
</TableBody>
|
|
651
|
+
</Table>
|
|
652
|
+
</div>
|
|
653
|
+
</div>
|
|
654
|
+
);
|
|
655
|
+
}
|
|
656
|
+
```
|
|
657
|
+
|
|
658
|
+
---
|
|
659
|
+
|
|
660
|
+
## 💬 Modal & Dialog Examples
|
|
661
|
+
|
|
662
|
+
### Confirmation Dialog
|
|
663
|
+
|
|
664
|
+
```tsx
|
|
665
|
+
import {
|
|
666
|
+
AlertDialog,
|
|
667
|
+
AlertDialogAction,
|
|
668
|
+
AlertDialogCancel,
|
|
669
|
+
AlertDialogContent,
|
|
670
|
+
AlertDialogDescription,
|
|
671
|
+
AlertDialogFooter,
|
|
672
|
+
AlertDialogHeader,
|
|
673
|
+
AlertDialogTitle,
|
|
674
|
+
AlertDialogTrigger,
|
|
675
|
+
} from "@arolariu/components/alert-dialog";
|
|
676
|
+
import { Button } from "@arolariu/components/button";
|
|
677
|
+
import { Trash } from "lucide-react";
|
|
678
|
+
|
|
679
|
+
export function DeleteConfirmation({
|
|
680
|
+
itemName,
|
|
681
|
+
onConfirm,
|
|
682
|
+
}: {
|
|
683
|
+
itemName: string;
|
|
684
|
+
onConfirm: () => void;
|
|
685
|
+
}) {
|
|
686
|
+
return (
|
|
687
|
+
<AlertDialog>
|
|
688
|
+
<AlertDialogTrigger asChild>
|
|
689
|
+
<Button variant="destructive" size="sm">
|
|
690
|
+
<Trash className="mr-2 h-4 w-4" />
|
|
691
|
+
Delete
|
|
692
|
+
</Button>
|
|
693
|
+
</AlertDialogTrigger>
|
|
694
|
+
<AlertDialogContent>
|
|
695
|
+
<AlertDialogHeader>
|
|
696
|
+
<AlertDialogTitle>Are you absolutely sure?</AlertDialogTitle>
|
|
697
|
+
<AlertDialogDescription>
|
|
698
|
+
This action cannot be undone. This will permanently delete "
|
|
699
|
+
{itemName}" and remove all associated data from our servers.
|
|
700
|
+
</AlertDialogDescription>
|
|
701
|
+
</AlertDialogHeader>
|
|
702
|
+
<AlertDialogFooter>
|
|
703
|
+
<AlertDialogCancel>Cancel</AlertDialogCancel>
|
|
704
|
+
<AlertDialogAction
|
|
705
|
+
onClick={onConfirm}
|
|
706
|
+
className="bg-destructive text-destructive-foreground hover:bg-destructive/90"
|
|
707
|
+
>
|
|
708
|
+
Yes, delete it
|
|
709
|
+
</AlertDialogAction>
|
|
710
|
+
</AlertDialogFooter>
|
|
711
|
+
</AlertDialogContent>
|
|
712
|
+
</AlertDialog>
|
|
713
|
+
);
|
|
714
|
+
}
|
|
715
|
+
```
|
|
716
|
+
|
|
717
|
+
### Settings Modal
|
|
718
|
+
|
|
719
|
+
```tsx
|
|
720
|
+
import {
|
|
721
|
+
Dialog,
|
|
722
|
+
DialogContent,
|
|
723
|
+
DialogDescription,
|
|
724
|
+
DialogFooter,
|
|
725
|
+
DialogHeader,
|
|
726
|
+
DialogTitle,
|
|
727
|
+
DialogTrigger,
|
|
728
|
+
} from "@arolariu/components/dialog";
|
|
729
|
+
import { Button } from "@arolariu/components/button";
|
|
730
|
+
import { Input } from "@arolariu/components/input";
|
|
731
|
+
import { Label } from "@arolariu/components/label";
|
|
732
|
+
import { Switch } from "@arolariu/components/switch";
|
|
733
|
+
import {
|
|
734
|
+
Select,
|
|
735
|
+
SelectContent,
|
|
736
|
+
SelectItem,
|
|
737
|
+
SelectTrigger,
|
|
738
|
+
SelectValue,
|
|
739
|
+
} from "@arolariu/components/select";
|
|
740
|
+
import {
|
|
741
|
+
Tabs,
|
|
742
|
+
TabsContent,
|
|
743
|
+
TabsList,
|
|
744
|
+
TabsTrigger,
|
|
745
|
+
} from "@arolariu/components/tabs";
|
|
746
|
+
import { Settings } from "lucide-react";
|
|
747
|
+
|
|
748
|
+
export function SettingsDialog() {
|
|
749
|
+
return (
|
|
750
|
+
<Dialog>
|
|
751
|
+
<DialogTrigger asChild>
|
|
752
|
+
<Button variant="outline">
|
|
753
|
+
<Settings className="mr-2 h-4 w-4" />
|
|
754
|
+
Settings
|
|
755
|
+
</Button>
|
|
756
|
+
</DialogTrigger>
|
|
757
|
+
<DialogContent className="sm:max-w-[525px]">
|
|
758
|
+
<DialogHeader>
|
|
759
|
+
<DialogTitle>Settings</DialogTitle>
|
|
760
|
+
<DialogDescription>
|
|
761
|
+
Manage your account settings and preferences.
|
|
762
|
+
</DialogDescription>
|
|
763
|
+
</DialogHeader>
|
|
764
|
+
|
|
765
|
+
<Tabs defaultValue="general" className="w-full">
|
|
766
|
+
<TabsList className="grid w-full grid-cols-3">
|
|
767
|
+
<TabsTrigger value="general">General</TabsTrigger>
|
|
768
|
+
<TabsTrigger value="notifications">Notifications</TabsTrigger>
|
|
769
|
+
<TabsTrigger value="security">Security</TabsTrigger>
|
|
770
|
+
</TabsList>
|
|
771
|
+
|
|
772
|
+
<TabsContent value="general" className="space-y-4">
|
|
773
|
+
<div className="space-y-2">
|
|
774
|
+
<Label htmlFor="name">Display Name</Label>
|
|
775
|
+
<Input id="name" defaultValue="John Doe" />
|
|
776
|
+
</div>
|
|
777
|
+
<div className="space-y-2">
|
|
778
|
+
<Label htmlFor="email">Email</Label>
|
|
779
|
+
<Input id="email" defaultValue="john@example.com" />
|
|
780
|
+
</div>
|
|
781
|
+
<div className="space-y-2">
|
|
782
|
+
<Label htmlFor="timezone">Timezone</Label>
|
|
783
|
+
<Select defaultValue="utc">
|
|
784
|
+
<SelectTrigger>
|
|
785
|
+
<SelectValue />
|
|
786
|
+
</SelectTrigger>
|
|
787
|
+
<SelectContent>
|
|
788
|
+
<SelectItem value="utc">UTC</SelectItem>
|
|
789
|
+
<SelectItem value="est">Eastern Time</SelectItem>
|
|
790
|
+
<SelectItem value="pst">Pacific Time</SelectItem>
|
|
791
|
+
</SelectContent>
|
|
792
|
+
</Select>
|
|
793
|
+
</div>
|
|
794
|
+
</TabsContent>
|
|
795
|
+
|
|
796
|
+
<TabsContent value="notifications" className="space-y-4">
|
|
797
|
+
<div className="flex items-center justify-between">
|
|
798
|
+
<div className="space-y-0.5">
|
|
799
|
+
<Label>Email Notifications</Label>
|
|
800
|
+
<div className="text-sm text-muted-foreground">
|
|
801
|
+
Receive emails about your account activity.
|
|
802
|
+
</div>
|
|
803
|
+
</div>
|
|
804
|
+
<Switch />
|
|
805
|
+
</div>
|
|
806
|
+
<div className="flex items-center justify-between">
|
|
807
|
+
<div className="space-y-0.5">
|
|
808
|
+
<Label>Push Notifications</Label>
|
|
809
|
+
<div className="text-sm text-muted-foreground">
|
|
810
|
+
Receive push notifications on your devices.
|
|
811
|
+
</div>
|
|
812
|
+
</div>
|
|
813
|
+
<Switch />
|
|
814
|
+
</div>
|
|
815
|
+
</TabsContent>
|
|
816
|
+
|
|
817
|
+
<TabsContent value="security" className="space-y-4">
|
|
818
|
+
<div className="space-y-2">
|
|
819
|
+
<Label htmlFor="current-password">Current Password</Label>
|
|
820
|
+
<Input id="current-password" type="password" />
|
|
821
|
+
</div>
|
|
822
|
+
<div className="space-y-2">
|
|
823
|
+
<Label htmlFor="new-password">New Password</Label>
|
|
824
|
+
<Input id="new-password" type="password" />
|
|
825
|
+
</div>
|
|
826
|
+
<div className="space-y-2">
|
|
827
|
+
<Label htmlFor="confirm-password">Confirm Password</Label>
|
|
828
|
+
<Input id="confirm-password" type="password" />
|
|
829
|
+
</div>
|
|
830
|
+
</TabsContent>
|
|
831
|
+
</Tabs>
|
|
832
|
+
|
|
833
|
+
<DialogFooter>
|
|
834
|
+
<Button variant="outline">Cancel</Button>
|
|
835
|
+
<Button>Save Changes</Button>
|
|
836
|
+
</DialogFooter>
|
|
837
|
+
</DialogContent>
|
|
838
|
+
</Dialog>
|
|
839
|
+
);
|
|
840
|
+
}
|
|
841
|
+
```
|
|
842
|
+
|
|
843
|
+
---
|
|
844
|
+
|
|
845
|
+
## 🎨 Background Effects Examples
|
|
846
|
+
|
|
847
|
+
### Animated Landing Page
|
|
848
|
+
|
|
849
|
+
```tsx
|
|
850
|
+
import { DotBackground } from "@arolariu/components/dot-background";
|
|
851
|
+
import { BubbleBackground } from "@arolariu/components/bubble-background";
|
|
852
|
+
import { GradientBackground } from "@arolariu/components/gradient-background";
|
|
853
|
+
import { Button } from "@arolariu/components/button";
|
|
854
|
+
import { Card, CardContent } from "@arolariu/components/card";
|
|
855
|
+
|
|
856
|
+
export function LandingPage() {
|
|
857
|
+
return (
|
|
858
|
+
<div className="relative min-h-screen overflow-hidden">
|
|
859
|
+
{/* Animated Background */}
|
|
860
|
+
<DotBackground className="absolute inset-0" />
|
|
861
|
+
<GradientBackground className="absolute inset-0" />
|
|
862
|
+
|
|
863
|
+
{/* Content */}
|
|
864
|
+
<div className="relative z-10 flex min-h-screen flex-col items-center justify-center px-4 text-center">
|
|
865
|
+
<h1 className="mb-6 text-4xl font-bold tracking-tight sm:text-6xl">
|
|
866
|
+
Build Beautiful Apps
|
|
867
|
+
<span className="bg-gradient-to-r from-purple-600 to-pink-600 bg-clip-text text-transparent">
|
|
868
|
+
{" "}
|
|
869
|
+
Faster
|
|
870
|
+
</span>
|
|
871
|
+
</h1>
|
|
872
|
+
|
|
873
|
+
<p className="mb-8 max-w-2xl text-lg text-muted-foreground">
|
|
874
|
+
Create stunning user interfaces with our comprehensive React component
|
|
875
|
+
library. Built with accessibility, performance, and developer
|
|
876
|
+
experience in mind.
|
|
877
|
+
</p>
|
|
878
|
+
|
|
879
|
+
<div className="flex flex-col gap-4 sm:flex-row">
|
|
880
|
+
<Button size="lg" className="px-8">
|
|
881
|
+
Get Started
|
|
882
|
+
</Button>
|
|
883
|
+
<Button variant="outline" size="lg" className="px-8">
|
|
884
|
+
View Components
|
|
885
|
+
</Button>
|
|
886
|
+
</div>
|
|
887
|
+
|
|
888
|
+
{/* Feature Cards */}
|
|
889
|
+
<div className="mt-16 grid gap-6 sm:grid-cols-3">
|
|
890
|
+
<Card className="bg-card/50 backdrop-blur">
|
|
891
|
+
<CardContent className="p-6 text-center">
|
|
892
|
+
<h3 className="mb-2 text-lg font-semibold">60+ Components</h3>
|
|
893
|
+
<p className="text-sm text-muted-foreground">
|
|
894
|
+
Comprehensive set of UI components for any project
|
|
895
|
+
</p>
|
|
896
|
+
</CardContent>
|
|
897
|
+
</Card>
|
|
898
|
+
|
|
899
|
+
<Card className="bg-card/50 backdrop-blur">
|
|
900
|
+
<CardContent className="p-6 text-center">
|
|
901
|
+
<h3 className="mb-2 text-lg font-semibold">TypeScript First</h3>
|
|
902
|
+
<p className="text-sm text-muted-foreground">
|
|
903
|
+
Full type safety and excellent developer experience
|
|
904
|
+
</p>
|
|
905
|
+
</CardContent>
|
|
906
|
+
</Card>
|
|
907
|
+
|
|
908
|
+
<Card className="bg-card/50 backdrop-blur">
|
|
909
|
+
<CardContent className="p-6 text-center">
|
|
910
|
+
<h3 className="mb-2 text-lg font-semibold">Accessible</h3>
|
|
911
|
+
<p className="text-sm text-muted-foreground">
|
|
912
|
+
Built on Radix UI with WAI-ARIA compliance
|
|
913
|
+
</p>
|
|
914
|
+
</CardContent>
|
|
915
|
+
</Card>
|
|
916
|
+
</div>
|
|
917
|
+
</div>
|
|
918
|
+
</div>
|
|
919
|
+
);
|
|
920
|
+
}
|
|
921
|
+
```
|
|
922
|
+
|
|
923
|
+
---
|
|
924
|
+
|
|
925
|
+
## 📱 Mobile-First Examples
|
|
926
|
+
|
|
927
|
+
### Mobile-Optimized Form
|
|
928
|
+
|
|
929
|
+
```tsx
|
|
930
|
+
import {
|
|
931
|
+
Sheet,
|
|
932
|
+
SheetContent,
|
|
933
|
+
SheetDescription,
|
|
934
|
+
SheetHeader,
|
|
935
|
+
SheetTitle,
|
|
936
|
+
SheetTrigger,
|
|
937
|
+
} from "@arolariu/components/sheet";
|
|
938
|
+
import { Button } from "@arolariu/components/button";
|
|
939
|
+
import { Input } from "@arolariu/components/input";
|
|
940
|
+
import { Label } from "@arolariu/components/label";
|
|
941
|
+
import { Textarea } from "@arolariu/components/textarea";
|
|
942
|
+
import { Plus } from "lucide-react";
|
|
943
|
+
|
|
944
|
+
export function MobileAddForm() {
|
|
945
|
+
return (
|
|
946
|
+
<Sheet>
|
|
947
|
+
<SheetTrigger asChild>
|
|
948
|
+
<Button className="fixed bottom-4 right-4 h-14 w-14 rounded-full shadow-lg md:hidden">
|
|
949
|
+
<Plus className="h-6 w-6" />
|
|
950
|
+
</Button>
|
|
951
|
+
</SheetTrigger>
|
|
952
|
+
<SheetContent side="bottom" className="h-[80vh]">
|
|
953
|
+
<SheetHeader>
|
|
954
|
+
<SheetTitle>Add New Item</SheetTitle>
|
|
955
|
+
<SheetDescription>
|
|
956
|
+
Fill out the form below to add a new item to your collection.
|
|
957
|
+
</SheetDescription>
|
|
958
|
+
</SheetHeader>
|
|
959
|
+
|
|
960
|
+
<div className="mt-6 space-y-4">
|
|
961
|
+
<div className="space-y-2">
|
|
962
|
+
<Label htmlFor="title">Title</Label>
|
|
963
|
+
<Input id="title" placeholder="Enter title" />
|
|
964
|
+
</div>
|
|
965
|
+
|
|
966
|
+
<div className="space-y-2">
|
|
967
|
+
<Label htmlFor="description">Description</Label>
|
|
968
|
+
<Textarea
|
|
969
|
+
id="description"
|
|
970
|
+
placeholder="Enter description"
|
|
971
|
+
className="min-h-[100px]"
|
|
972
|
+
/>
|
|
973
|
+
</div>
|
|
974
|
+
|
|
975
|
+
<div className="flex gap-2 pt-4">
|
|
976
|
+
<Button className="flex-1">Save</Button>
|
|
977
|
+
<Button variant="outline" className="flex-1">
|
|
978
|
+
Cancel
|
|
979
|
+
</Button>
|
|
980
|
+
</div>
|
|
981
|
+
</div>
|
|
982
|
+
</SheetContent>
|
|
983
|
+
</Sheet>
|
|
984
|
+
);
|
|
985
|
+
}
|
|
986
|
+
```
|
|
987
|
+
|
|
988
|
+
---
|
|
989
|
+
|
|
990
|
+
## 🎯 Tips for Success
|
|
991
|
+
|
|
992
|
+
### Performance Optimization
|
|
993
|
+
|
|
994
|
+
```tsx
|
|
995
|
+
// ✅ Import only what you need for optimal bundle size
|
|
996
|
+
import { Button } from "@arolariu/components/button";
|
|
997
|
+
import { Card } from "@arolariu/components/card";
|
|
998
|
+
|
|
999
|
+
// ❌ Avoid barrel imports
|
|
1000
|
+
import { Button, Card } from "@arolariu/components";
|
|
1001
|
+
```
|
|
1002
|
+
|
|
1003
|
+
### Accessibility Best Practices
|
|
1004
|
+
|
|
1005
|
+
```tsx
|
|
1006
|
+
// ✅ Always include proper labels and ARIA attributes
|
|
1007
|
+
<Button aria-label="Close dialog" onClick={handleClose}>
|
|
1008
|
+
<X className="h-4 w-4" />
|
|
1009
|
+
</Button>
|
|
1010
|
+
|
|
1011
|
+
// ✅ Use semantic HTML structure
|
|
1012
|
+
<main role="main">
|
|
1013
|
+
<section aria-labelledby="section-title">
|
|
1014
|
+
<h2 id="section-title">Section Title</h2>
|
|
1015
|
+
{/* content */}
|
|
1016
|
+
</section>
|
|
1017
|
+
</main>
|
|
1018
|
+
```
|
|
1019
|
+
|
|
1020
|
+
### Responsive Design
|
|
1021
|
+
|
|
1022
|
+
```tsx
|
|
1023
|
+
// ✅ Use Tailwind's responsive utilities
|
|
1024
|
+
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4">
|
|
1025
|
+
{/* components */}
|
|
1026
|
+
</div>
|
|
1027
|
+
|
|
1028
|
+
// ✅ Hide/show components based on screen size
|
|
1029
|
+
<div className="block md:hidden">Mobile only content</div>
|
|
1030
|
+
<div className="hidden md:block">Desktop only content</div>
|
|
1031
|
+
```
|
|
1032
|
+
|
|
1033
|
+
---
|
|
1034
|
+
|
|
1035
|
+
Ready to build something amazing? **[🚀 Start with our Quick Start Guide](./README.md#-quick-start)**
|