@neynar/ui 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/LICENSE +21 -0
- package/README.md +195 -0
- package/dist/components/ui/accordion.d.ts +229 -0
- package/dist/components/ui/accordion.d.ts.map +1 -0
- package/dist/components/ui/alert-dialog.d.ts +247 -0
- package/dist/components/ui/alert-dialog.d.ts.map +1 -0
- package/dist/components/ui/alert.d.ts +187 -0
- package/dist/components/ui/alert.d.ts.map +1 -0
- package/dist/components/ui/aspect-ratio.d.ts +94 -0
- package/dist/components/ui/aspect-ratio.d.ts.map +1 -0
- package/dist/components/ui/avatar.d.ts +244 -0
- package/dist/components/ui/avatar.d.ts.map +1 -0
- package/dist/components/ui/badge.d.ts +163 -0
- package/dist/components/ui/badge.d.ts.map +1 -0
- package/dist/components/ui/breadcrumb.d.ts +281 -0
- package/dist/components/ui/breadcrumb.d.ts.map +1 -0
- package/dist/components/ui/button.d.ts +129 -0
- package/dist/components/ui/button.d.ts.map +1 -0
- package/dist/components/ui/calendar.d.ts +169 -0
- package/dist/components/ui/calendar.d.ts.map +1 -0
- package/dist/components/ui/card.d.ts +365 -0
- package/dist/components/ui/card.d.ts.map +1 -0
- package/dist/components/ui/carousel.d.ts +369 -0
- package/dist/components/ui/carousel.d.ts.map +1 -0
- package/dist/components/ui/chart.d.ts +442 -0
- package/dist/components/ui/chart.d.ts.map +1 -0
- package/dist/components/ui/checkbox.d.ts +88 -0
- package/dist/components/ui/checkbox.d.ts.map +1 -0
- package/dist/components/ui/collapsible.d.ts +182 -0
- package/dist/components/ui/collapsible.d.ts.map +1 -0
- package/dist/components/ui/combobox.d.ts +270 -0
- package/dist/components/ui/combobox.d.ts.map +1 -0
- package/dist/components/ui/command.d.ts +355 -0
- package/dist/components/ui/command.d.ts.map +1 -0
- package/dist/components/ui/container.d.ts +102 -0
- package/dist/components/ui/container.d.ts.map +1 -0
- package/dist/components/ui/context-menu.d.ts +339 -0
- package/dist/components/ui/context-menu.d.ts.map +1 -0
- package/dist/components/ui/date-picker.d.ts +145 -0
- package/dist/components/ui/date-picker.d.ts.map +1 -0
- package/dist/components/ui/dialog.d.ts +322 -0
- package/dist/components/ui/dialog.d.ts.map +1 -0
- package/dist/components/ui/drawer.d.ts +154 -0
- package/dist/components/ui/drawer.d.ts.map +1 -0
- package/dist/components/ui/dropdown-menu.d.ts +349 -0
- package/dist/components/ui/dropdown-menu.d.ts.map +1 -0
- package/dist/components/ui/empty-state.d.ts +133 -0
- package/dist/components/ui/empty-state.d.ts.map +1 -0
- package/dist/components/ui/hover-card.d.ts +109 -0
- package/dist/components/ui/hover-card.d.ts.map +1 -0
- package/dist/components/ui/input.d.ts +89 -0
- package/dist/components/ui/input.d.ts.map +1 -0
- package/dist/components/ui/label.d.ts +93 -0
- package/dist/components/ui/label.d.ts.map +1 -0
- package/dist/components/ui/menubar.d.ts +306 -0
- package/dist/components/ui/menubar.d.ts.map +1 -0
- package/dist/components/ui/navigation-menu.d.ts +318 -0
- package/dist/components/ui/navigation-menu.d.ts.map +1 -0
- package/dist/components/ui/pagination.d.ts +343 -0
- package/dist/components/ui/pagination.d.ts.map +1 -0
- package/dist/components/ui/popover.d.ts +178 -0
- package/dist/components/ui/popover.d.ts.map +1 -0
- package/dist/components/ui/progress.d.ts +64 -0
- package/dist/components/ui/progress.d.ts.map +1 -0
- package/dist/components/ui/radio-group.d.ts +144 -0
- package/dist/components/ui/radio-group.d.ts.map +1 -0
- package/dist/components/ui/resizable.d.ts +164 -0
- package/dist/components/ui/resizable.d.ts.map +1 -0
- package/dist/components/ui/scroll-area.d.ts +82 -0
- package/dist/components/ui/scroll-area.d.ts.map +1 -0
- package/dist/components/ui/select.d.ts +316 -0
- package/dist/components/ui/select.d.ts.map +1 -0
- package/dist/components/ui/separator.d.ts +80 -0
- package/dist/components/ui/separator.d.ts.map +1 -0
- package/dist/components/ui/sheet.d.ts +346 -0
- package/dist/components/ui/sheet.d.ts.map +1 -0
- package/dist/components/ui/sidebar.d.ts +1561 -0
- package/dist/components/ui/sidebar.d.ts.map +1 -0
- package/dist/components/ui/skeleton.d.ts +66 -0
- package/dist/components/ui/skeleton.d.ts.map +1 -0
- package/dist/components/ui/slider.d.ts +95 -0
- package/dist/components/ui/slider.d.ts.map +1 -0
- package/dist/components/ui/sonner.d.ts +101 -0
- package/dist/components/ui/sonner.d.ts.map +1 -0
- package/dist/components/ui/stack.d.ts +192 -0
- package/dist/components/ui/stack.d.ts.map +1 -0
- package/dist/components/ui/stories/accordion.stories.d.ts +71 -0
- package/dist/components/ui/stories/accordion.stories.d.ts.map +1 -0
- package/dist/components/ui/stories/alert-dialog.stories.d.ts +39 -0
- package/dist/components/ui/stories/alert-dialog.stories.d.ts.map +1 -0
- package/dist/components/ui/stories/alert.stories.d.ts +48 -0
- package/dist/components/ui/stories/alert.stories.d.ts.map +1 -0
- package/dist/components/ui/stories/aspect-ratio.stories.d.ts +53 -0
- package/dist/components/ui/stories/aspect-ratio.stories.d.ts.map +1 -0
- package/dist/components/ui/stories/avatar.stories.d.ts +49 -0
- package/dist/components/ui/stories/avatar.stories.d.ts.map +1 -0
- package/dist/components/ui/stories/badge.stories.d.ts +64 -0
- package/dist/components/ui/stories/badge.stories.d.ts.map +1 -0
- package/dist/components/ui/stories/breadcrumb.stories.d.ts +27 -0
- package/dist/components/ui/stories/breadcrumb.stories.d.ts.map +1 -0
- package/dist/components/ui/stories/button.stories.d.ts +92 -0
- package/dist/components/ui/stories/button.stories.d.ts.map +1 -0
- package/dist/components/ui/stories/calendar.stories.d.ts +94 -0
- package/dist/components/ui/stories/calendar.stories.d.ts.map +1 -0
- package/dist/components/ui/stories/card.stories.d.ts +29 -0
- package/dist/components/ui/stories/card.stories.d.ts.map +1 -0
- package/dist/components/ui/stories/carousel.stories.d.ts +42 -0
- package/dist/components/ui/stories/carousel.stories.d.ts.map +1 -0
- package/dist/components/ui/stories/chart.stories.d.ts +51 -0
- package/dist/components/ui/stories/chart.stories.d.ts.map +1 -0
- package/dist/components/ui/stories/checkbox.stories.d.ts +72 -0
- package/dist/components/ui/stories/checkbox.stories.d.ts.map +1 -0
- package/dist/components/ui/stories/cn.stories.d.ts +19 -0
- package/dist/components/ui/stories/cn.stories.d.ts.map +1 -0
- package/dist/components/ui/stories/collapsible.stories.d.ts +51 -0
- package/dist/components/ui/stories/collapsible.stories.d.ts.map +1 -0
- package/dist/components/ui/stories/colors.stories.d.ts +31 -0
- package/dist/components/ui/stories/colors.stories.d.ts.map +1 -0
- package/dist/components/ui/stories/combobox.stories.d.ts +89 -0
- package/dist/components/ui/stories/combobox.stories.d.ts.map +1 -0
- package/dist/components/ui/stories/command.stories.d.ts +69 -0
- package/dist/components/ui/stories/command.stories.d.ts.map +1 -0
- package/dist/components/ui/stories/container.stories.d.ts +42 -0
- package/dist/components/ui/stories/container.stories.d.ts.map +1 -0
- package/dist/components/ui/stories/context-menu.stories.d.ts +32 -0
- package/dist/components/ui/stories/context-menu.stories.d.ts.map +1 -0
- package/dist/components/ui/stories/date-picker.stories.d.ts +67 -0
- package/dist/components/ui/stories/date-picker.stories.d.ts.map +1 -0
- package/dist/components/ui/stories/dialog.stories.d.ts +48 -0
- package/dist/components/ui/stories/dialog.stories.d.ts.map +1 -0
- package/dist/components/ui/stories/drawer.stories.d.ts +33 -0
- package/dist/components/ui/stories/drawer.stories.d.ts.map +1 -0
- package/dist/components/ui/stories/dropdown-menu.stories.d.ts +31 -0
- package/dist/components/ui/stories/dropdown-menu.stories.d.ts.map +1 -0
- package/dist/components/ui/stories/empty-state.stories.d.ts +74 -0
- package/dist/components/ui/stories/empty-state.stories.d.ts.map +1 -0
- package/dist/components/ui/stories/hover-card.stories.d.ts +35 -0
- package/dist/components/ui/stories/hover-card.stories.d.ts.map +1 -0
- package/dist/components/ui/stories/input.stories.d.ts +69 -0
- package/dist/components/ui/stories/input.stories.d.ts.map +1 -0
- package/dist/components/ui/stories/label.stories.d.ts +47 -0
- package/dist/components/ui/stories/label.stories.d.ts.map +1 -0
- package/dist/components/ui/stories/menubar.stories.d.ts +39 -0
- package/dist/components/ui/stories/menubar.stories.d.ts.map +1 -0
- package/dist/components/ui/stories/navigation-menu.stories.d.ts +44 -0
- package/dist/components/ui/stories/navigation-menu.stories.d.ts.map +1 -0
- package/dist/components/ui/stories/pagination.stories.d.ts +33 -0
- package/dist/components/ui/stories/pagination.stories.d.ts.map +1 -0
- package/dist/components/ui/stories/popover.stories.d.ts +36 -0
- package/dist/components/ui/stories/popover.stories.d.ts.map +1 -0
- package/dist/components/ui/stories/progress.stories.d.ts +38 -0
- package/dist/components/ui/stories/progress.stories.d.ts.map +1 -0
- package/dist/components/ui/stories/radio-group.stories.d.ts +76 -0
- package/dist/components/ui/stories/radio-group.stories.d.ts.map +1 -0
- package/dist/components/ui/stories/resizable.stories.d.ts +49 -0
- package/dist/components/ui/stories/resizable.stories.d.ts.map +1 -0
- package/dist/components/ui/stories/scroll-area.stories.d.ts +35 -0
- package/dist/components/ui/stories/scroll-area.stories.d.ts.map +1 -0
- package/dist/components/ui/stories/select.stories.d.ts +51 -0
- package/dist/components/ui/stories/select.stories.d.ts.map +1 -0
- package/dist/components/ui/stories/separator.stories.d.ts +58 -0
- package/dist/components/ui/stories/separator.stories.d.ts.map +1 -0
- package/dist/components/ui/stories/sheet.stories.d.ts +43 -0
- package/dist/components/ui/stories/sheet.stories.d.ts.map +1 -0
- package/dist/components/ui/stories/sidebar.stories.d.ts +60 -0
- package/dist/components/ui/stories/sidebar.stories.d.ts.map +1 -0
- package/dist/components/ui/stories/skeleton.stories.d.ts +42 -0
- package/dist/components/ui/stories/skeleton.stories.d.ts.map +1 -0
- package/dist/components/ui/stories/slider.stories.d.ts +99 -0
- package/dist/components/ui/stories/slider.stories.d.ts.map +1 -0
- package/dist/components/ui/stories/sonner.stories.d.ts +9 -0
- package/dist/components/ui/stories/sonner.stories.d.ts.map +1 -0
- package/dist/components/ui/stories/stack.stories.d.ts +39 -0
- package/dist/components/ui/stories/stack.stories.d.ts.map +1 -0
- package/dist/components/ui/stories/switch.stories.d.ts +71 -0
- package/dist/components/ui/stories/switch.stories.d.ts.map +1 -0
- package/dist/components/ui/stories/table.stories.d.ts +40 -0
- package/dist/components/ui/stories/table.stories.d.ts.map +1 -0
- package/dist/components/ui/stories/tabs.stories.d.ts +62 -0
- package/dist/components/ui/stories/tabs.stories.d.ts.map +1 -0
- package/dist/components/ui/stories/text-field.stories.d.ts +78 -0
- package/dist/components/ui/stories/text-field.stories.d.ts.map +1 -0
- package/dist/components/ui/stories/textarea.stories.d.ts +57 -0
- package/dist/components/ui/stories/textarea.stories.d.ts.map +1 -0
- package/dist/components/ui/stories/theme-toggle.stories.d.ts +71 -0
- package/dist/components/ui/stories/theme-toggle.stories.d.ts.map +1 -0
- package/dist/components/ui/stories/theme.stories.d.ts +51 -0
- package/dist/components/ui/stories/theme.stories.d.ts.map +1 -0
- package/dist/components/ui/stories/toggle-group.stories.d.ts +71 -0
- package/dist/components/ui/stories/toggle-group.stories.d.ts.map +1 -0
- package/dist/components/ui/stories/toggle.stories.d.ts +78 -0
- package/dist/components/ui/stories/toggle.stories.d.ts.map +1 -0
- package/dist/components/ui/stories/tooltip.stories.d.ts +37 -0
- package/dist/components/ui/stories/tooltip.stories.d.ts.map +1 -0
- package/dist/components/ui/stories/typography.stories.d.ts +137 -0
- package/dist/components/ui/stories/typography.stories.d.ts.map +1 -0
- package/dist/components/ui/stories/use-mobile.stories.d.ts +20 -0
- package/dist/components/ui/stories/use-mobile.stories.d.ts.map +1 -0
- package/dist/components/ui/stories/use-theme.stories.d.ts +23 -0
- package/dist/components/ui/stories/use-theme.stories.d.ts.map +1 -0
- package/dist/components/ui/switch.d.ts +84 -0
- package/dist/components/ui/switch.d.ts.map +1 -0
- package/dist/components/ui/table.d.ts +321 -0
- package/dist/components/ui/table.d.ts.map +1 -0
- package/dist/components/ui/tabs.d.ts +260 -0
- package/dist/components/ui/tabs.d.ts.map +1 -0
- package/dist/components/ui/text-field.d.ts +157 -0
- package/dist/components/ui/text-field.d.ts.map +1 -0
- package/dist/components/ui/textarea.d.ts +84 -0
- package/dist/components/ui/textarea.d.ts.map +1 -0
- package/dist/components/ui/theme-toggle.d.ts +105 -0
- package/dist/components/ui/theme-toggle.d.ts.map +1 -0
- package/dist/components/ui/theme.d.ts +110 -0
- package/dist/components/ui/theme.d.ts.map +1 -0
- package/dist/components/ui/toggle-group.d.ts +133 -0
- package/dist/components/ui/toggle-group.d.ts.map +1 -0
- package/dist/components/ui/toggle.d.ts +84 -0
- package/dist/components/ui/toggle.d.ts.map +1 -0
- package/dist/components/ui/tooltip.d.ts +202 -0
- package/dist/components/ui/tooltip.d.ts.map +1 -0
- package/dist/components/ui/typography.d.ts +287 -0
- package/dist/components/ui/typography.d.ts.map +1 -0
- package/dist/hooks/use-mobile.d.ts +74 -0
- package/dist/hooks/use-mobile.d.ts.map +1 -0
- package/dist/hooks/use-theme.d.ts +142 -0
- package/dist/hooks/use-theme.d.ts.map +1 -0
- package/dist/index.d.ts +57 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +27498 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/utils.d.ts +43 -0
- package/dist/lib/utils.d.ts.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/docs/llm/colors.md +273 -0
- package/docs/llm/components/buttons.md +68 -0
- package/docs/llm/components/cards.md +53 -0
- package/docs/llm/components/display.md +134 -0
- package/docs/llm/components/feedback.md +96 -0
- package/docs/llm/components/forms.md +90 -0
- package/docs/llm/components/layout.md +59 -0
- package/docs/llm/components/menus.md +70 -0
- package/docs/llm/components/navigation.md +80 -0
- package/docs/llm/components/overlays.md +83 -0
- package/docs/llm/components/tables.md +73 -0
- package/docs/llm/components/typography.md +199 -0
- package/docs/llm/components/utilities.md +114 -0
- package/docs/llm/guide.md +165 -0
- package/llms.txt +122 -0
- package/package.json +104 -0
- package/src/components/ui/accordion.tsx +285 -0
- package/src/components/ui/alert-dialog.tsx +387 -0
- package/src/components/ui/alert.tsx +243 -0
- package/src/components/ui/aspect-ratio.tsx +99 -0
- package/src/components/ui/avatar.tsx +288 -0
- package/src/components/ui/badge.tsx +205 -0
- package/src/components/ui/breadcrumb.tsx +378 -0
- package/src/components/ui/button.tsx +195 -0
- package/src/components/ui/calendar.tsx +371 -0
- package/src/components/ui/card.tsx +447 -0
- package/src/components/ui/carousel.tsx +624 -0
- package/src/components/ui/chart.tsx +802 -0
- package/src/components/ui/checkbox.tsx +113 -0
- package/src/components/ui/collapsible.tsx +207 -0
- package/src/components/ui/combobox.tsx +373 -0
- package/src/components/ui/command.tsx +518 -0
- package/src/components/ui/container.tsx +114 -0
- package/src/components/ui/context-menu.tsx +563 -0
- package/src/components/ui/date-picker.tsx +213 -0
- package/src/components/ui/dialog.tsx +447 -0
- package/src/components/ui/drawer.tsx +273 -0
- package/src/components/ui/dropdown-menu.tsx +578 -0
- package/src/components/ui/empty-state.tsx +145 -0
- package/src/components/ui/hover-card.tsx +144 -0
- package/src/components/ui/input.tsx +106 -0
- package/src/components/ui/label.tsx +110 -0
- package/src/components/ui/menubar.tsx +553 -0
- package/src/components/ui/navigation-menu.tsx +471 -0
- package/src/components/ui/pagination.tsx +456 -0
- package/src/components/ui/popover.tsx +216 -0
- package/src/components/ui/progress.tsx +88 -0
- package/src/components/ui/radio-group.tsx +183 -0
- package/src/components/ui/resizable.tsx +209 -0
- package/src/components/ui/scroll-area.tsx +132 -0
- package/src/components/ui/select.tsx +485 -0
- package/src/components/ui/separator.tsx +101 -0
- package/src/components/ui/sheet.tsx +495 -0
- package/src/components/ui/sidebar.tsx +2211 -0
- package/src/components/ui/skeleton.tsx +76 -0
- package/src/components/ui/slider.tsx +147 -0
- package/src/components/ui/sonner.tsx +120 -0
- package/src/components/ui/stack.tsx +180 -0
- package/src/components/ui/stories/accordion.stories.tsx +429 -0
- package/src/components/ui/stories/alert-dialog.stories.tsx +519 -0
- package/src/components/ui/stories/alert.stories.tsx +228 -0
- package/src/components/ui/stories/aspect-ratio.stories.tsx +200 -0
- package/src/components/ui/stories/avatar.stories.tsx +317 -0
- package/src/components/ui/stories/badge.stories.tsx +260 -0
- package/src/components/ui/stories/breadcrumb.stories.tsx +482 -0
- package/src/components/ui/stories/button.stories.tsx +266 -0
- package/src/components/ui/stories/calendar.stories.tsx +375 -0
- package/src/components/ui/stories/card.stories.tsx +308 -0
- package/src/components/ui/stories/carousel.stories.tsx +328 -0
- package/src/components/ui/stories/chart.stories.tsx +430 -0
- package/src/components/ui/stories/checkbox.stories.tsx +297 -0
- package/src/components/ui/stories/cn.stories.tsx +433 -0
- package/src/components/ui/stories/collapsible.stories.tsx +256 -0
- package/src/components/ui/stories/colors.stories.tsx +502 -0
- package/src/components/ui/stories/combobox.stories.tsx +301 -0
- package/src/components/ui/stories/command.stories.tsx +632 -0
- package/src/components/ui/stories/container.stories.tsx +250 -0
- package/src/components/ui/stories/context-menu.stories.tsx +446 -0
- package/src/components/ui/stories/date-picker.stories.tsx +378 -0
- package/src/components/ui/stories/dialog.stories.tsx +535 -0
- package/src/components/ui/stories/drawer.stories.tsx +364 -0
- package/src/components/ui/stories/dropdown-menu.stories.tsx +374 -0
- package/src/components/ui/stories/empty-state.stories.tsx +244 -0
- package/src/components/ui/stories/hover-card.stories.tsx +355 -0
- package/src/components/ui/stories/input.stories.tsx +289 -0
- package/src/components/ui/stories/label.stories.tsx +294 -0
- package/src/components/ui/stories/menubar.stories.tsx +764 -0
- package/src/components/ui/stories/navigation-menu.stories.tsx +539 -0
- package/src/components/ui/stories/pagination.stories.tsx +604 -0
- package/src/components/ui/stories/popover.stories.tsx +392 -0
- package/src/components/ui/stories/progress.stories.tsx +218 -0
- package/src/components/ui/stories/radio-group.stories.tsx +400 -0
- package/src/components/ui/stories/resizable.stories.tsx +417 -0
- package/src/components/ui/stories/scroll-area.stories.tsx +180 -0
- package/src/components/ui/stories/select.stories.tsx +389 -0
- package/src/components/ui/stories/separator.stories.tsx +192 -0
- package/src/components/ui/stories/sheet.stories.tsx +468 -0
- package/src/components/ui/stories/sidebar.stories.tsx +731 -0
- package/src/components/ui/stories/skeleton.stories.tsx +216 -0
- package/src/components/ui/stories/slider.stories.tsx +321 -0
- package/src/components/ui/stories/sonner.stories.tsx +373 -0
- package/src/components/ui/stories/stack.stories.tsx +222 -0
- package/src/components/ui/stories/switch.stories.tsx +202 -0
- package/src/components/ui/stories/table.stories.tsx +541 -0
- package/src/components/ui/stories/tabs.stories.tsx +544 -0
- package/src/components/ui/stories/text-field.stories.tsx +280 -0
- package/src/components/ui/stories/textarea.stories.tsx +245 -0
- package/src/components/ui/stories/theme-toggle.stories.tsx +275 -0
- package/src/components/ui/stories/theme.stories.tsx +412 -0
- package/src/components/ui/stories/toggle-group.stories.tsx +337 -0
- package/src/components/ui/stories/toggle.stories.tsx +325 -0
- package/src/components/ui/stories/tooltip.stories.tsx +444 -0
- package/src/components/ui/stories/typography.stories.tsx +1586 -0
- package/src/components/ui/stories/use-mobile.stories.tsx +420 -0
- package/src/components/ui/stories/use-theme.stories.tsx +531 -0
- package/src/components/ui/switch.tsx +106 -0
- package/src/components/ui/table.tsx +424 -0
- package/src/components/ui/tabs.tsx +316 -0
- package/src/components/ui/text-field.tsx +206 -0
- package/src/components/ui/textarea.tsx +98 -0
- package/src/components/ui/theme-toggle.tsx +185 -0
- package/src/components/ui/theme.tsx +148 -0
- package/src/components/ui/toggle-group.tsx +196 -0
- package/src/components/ui/toggle.tsx +115 -0
- package/src/components/ui/tooltip.tsx +253 -0
- package/src/components/ui/typography.tsx +468 -0
- package/src/hooks/use-mobile.ts +91 -0
- package/src/hooks/use-theme.ts +319 -0
- package/src/index.ts +77 -0
- package/src/lib/utils.ts +57 -0
- package/src/styles/globals.css +160 -0
|
@@ -0,0 +1,535 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react-vite";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { Copy, Share2, Mail, MessageSquare } from "lucide-react";
|
|
4
|
+
import {
|
|
5
|
+
Dialog,
|
|
6
|
+
DialogClose,
|
|
7
|
+
DialogContent,
|
|
8
|
+
DialogDescription,
|
|
9
|
+
DialogFooter,
|
|
10
|
+
DialogHeader,
|
|
11
|
+
DialogTitle,
|
|
12
|
+
DialogTrigger,
|
|
13
|
+
} from "../dialog";
|
|
14
|
+
import { Button } from "../button";
|
|
15
|
+
import { Input } from "../input";
|
|
16
|
+
import { Label } from "../label";
|
|
17
|
+
import { Textarea } from "../textarea";
|
|
18
|
+
|
|
19
|
+
const meta = {
|
|
20
|
+
title: "Overlays/Dialog",
|
|
21
|
+
component: Dialog,
|
|
22
|
+
parameters: {
|
|
23
|
+
layout: "centered",
|
|
24
|
+
docs: {
|
|
25
|
+
description: {
|
|
26
|
+
component:
|
|
27
|
+
"A modal dialog component built on Radix UI Dialog. Displays content in a layer above the main content, with customizable animations and focus management. Used for critical interactions, confirmations, or detailed information that requires focus.",
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
tags: ["autodocs"],
|
|
32
|
+
argTypes: {
|
|
33
|
+
// Dialog root props
|
|
34
|
+
open: {
|
|
35
|
+
control: "boolean",
|
|
36
|
+
description: "The controlled open state of the dialog",
|
|
37
|
+
},
|
|
38
|
+
onOpenChange: {
|
|
39
|
+
action: "onOpenChange",
|
|
40
|
+
description: "Event handler called when the open state changes",
|
|
41
|
+
},
|
|
42
|
+
modal: {
|
|
43
|
+
control: "boolean",
|
|
44
|
+
description: "The modality of the dialog",
|
|
45
|
+
defaultValue: true,
|
|
46
|
+
},
|
|
47
|
+
// DialogContent props for Interactive story
|
|
48
|
+
},
|
|
49
|
+
} satisfies Meta<typeof Dialog>;
|
|
50
|
+
|
|
51
|
+
export default meta;
|
|
52
|
+
type Story = StoryObj<typeof meta>;
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Interactive playground story with all dialog props and controls
|
|
56
|
+
* Allows testing all dialog features and customization options
|
|
57
|
+
*/
|
|
58
|
+
export const Interactive: Story = {
|
|
59
|
+
render: ({ modal, ...args }) => {
|
|
60
|
+
const [open, setOpen] = React.useState(false);
|
|
61
|
+
|
|
62
|
+
return (
|
|
63
|
+
<Dialog open={open} onOpenChange={setOpen} modal={modal} {...args}>
|
|
64
|
+
<DialogTrigger asChild>
|
|
65
|
+
<Button>Open Interactive Dialog</Button>
|
|
66
|
+
</DialogTrigger>
|
|
67
|
+
<DialogContent className="sm:max-w-[425px]">
|
|
68
|
+
<DialogHeader>
|
|
69
|
+
<DialogTitle>Interactive Dialog</DialogTitle>
|
|
70
|
+
<DialogDescription>
|
|
71
|
+
This dialog showcases all available customization options. Use the
|
|
72
|
+
controls panel to modify its behavior and appearance.
|
|
73
|
+
</DialogDescription>
|
|
74
|
+
</DialogHeader>
|
|
75
|
+
<div className="grid gap-4 py-4">
|
|
76
|
+
<div className="grid gap-2">
|
|
77
|
+
<Label htmlFor="example-input">Example Input</Label>
|
|
78
|
+
<Input id="example-input" placeholder="Try typing here..." />
|
|
79
|
+
</div>
|
|
80
|
+
<div className="grid gap-2">
|
|
81
|
+
<Label htmlFor="example-textarea">Example Textarea</Label>
|
|
82
|
+
<Textarea
|
|
83
|
+
id="example-textarea"
|
|
84
|
+
placeholder="Enter some text..."
|
|
85
|
+
rows={3}
|
|
86
|
+
/>
|
|
87
|
+
</div>
|
|
88
|
+
</div>
|
|
89
|
+
<DialogFooter>
|
|
90
|
+
<DialogClose asChild>
|
|
91
|
+
<Button variant="outline">Cancel</Button>
|
|
92
|
+
</DialogClose>
|
|
93
|
+
<Button onClick={() => setOpen(false)}>Save Changes</Button>
|
|
94
|
+
</DialogFooter>
|
|
95
|
+
</DialogContent>
|
|
96
|
+
</Dialog>
|
|
97
|
+
);
|
|
98
|
+
},
|
|
99
|
+
args: {
|
|
100
|
+
modal: true,
|
|
101
|
+
},
|
|
102
|
+
parameters: {
|
|
103
|
+
docs: {
|
|
104
|
+
description: {
|
|
105
|
+
story:
|
|
106
|
+
"Interactive playground allowing you to test all dialog props and customization options. Use the controls to modify behavior and see real-time changes.",
|
|
107
|
+
},
|
|
108
|
+
},
|
|
109
|
+
},
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* Showcase of all dialog variants and common patterns
|
|
114
|
+
* Displays multiple dialog types side by side for comparison
|
|
115
|
+
*/
|
|
116
|
+
export const Variants: Story = {
|
|
117
|
+
render: () => (
|
|
118
|
+
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4">
|
|
119
|
+
{/* Basic Confirmation Dialog */}
|
|
120
|
+
<Dialog>
|
|
121
|
+
<DialogTrigger asChild>
|
|
122
|
+
<Button variant="outline" className="w-full">
|
|
123
|
+
Basic Confirmation
|
|
124
|
+
</Button>
|
|
125
|
+
</DialogTrigger>
|
|
126
|
+
<DialogContent>
|
|
127
|
+
<DialogHeader>
|
|
128
|
+
<DialogTitle>Are you absolutely sure?</DialogTitle>
|
|
129
|
+
<DialogDescription>
|
|
130
|
+
This action cannot be undone. This will permanently delete your
|
|
131
|
+
account and remove your data from our servers.
|
|
132
|
+
</DialogDescription>
|
|
133
|
+
</DialogHeader>
|
|
134
|
+
<DialogFooter>
|
|
135
|
+
<DialogClose asChild>
|
|
136
|
+
<Button variant="outline">Cancel</Button>
|
|
137
|
+
</DialogClose>
|
|
138
|
+
<Button variant="destructive">Delete Account</Button>
|
|
139
|
+
</DialogFooter>
|
|
140
|
+
</DialogContent>
|
|
141
|
+
</Dialog>
|
|
142
|
+
|
|
143
|
+
{/* Form Dialog */}
|
|
144
|
+
<Dialog>
|
|
145
|
+
<DialogTrigger asChild>
|
|
146
|
+
<Button className="w-full">Form Dialog</Button>
|
|
147
|
+
</DialogTrigger>
|
|
148
|
+
<DialogContent className="sm:max-w-[425px]">
|
|
149
|
+
<DialogHeader>
|
|
150
|
+
<DialogTitle>Edit Profile</DialogTitle>
|
|
151
|
+
<DialogDescription>
|
|
152
|
+
Make changes to your profile here. Click save when you're
|
|
153
|
+
done.
|
|
154
|
+
</DialogDescription>
|
|
155
|
+
</DialogHeader>
|
|
156
|
+
<div className="grid gap-4 py-4">
|
|
157
|
+
<div className="grid gap-2">
|
|
158
|
+
<Label htmlFor="name">Name</Label>
|
|
159
|
+
<Input id="name" defaultValue="Pedro Duarte" />
|
|
160
|
+
</div>
|
|
161
|
+
<div className="grid gap-2">
|
|
162
|
+
<Label htmlFor="username">Username</Label>
|
|
163
|
+
<Input id="username" defaultValue="@peduarte" />
|
|
164
|
+
</div>
|
|
165
|
+
</div>
|
|
166
|
+
<DialogFooter>
|
|
167
|
+
<DialogClose asChild>
|
|
168
|
+
<Button variant="outline">Cancel</Button>
|
|
169
|
+
</DialogClose>
|
|
170
|
+
<Button type="submit">Save Changes</Button>
|
|
171
|
+
</DialogFooter>
|
|
172
|
+
</DialogContent>
|
|
173
|
+
</Dialog>
|
|
174
|
+
|
|
175
|
+
{/* Custom Close Button */}
|
|
176
|
+
<Dialog>
|
|
177
|
+
<DialogTrigger asChild>
|
|
178
|
+
<Button variant="secondary" className="w-full">
|
|
179
|
+
Custom Close
|
|
180
|
+
</Button>
|
|
181
|
+
</DialogTrigger>
|
|
182
|
+
<DialogContent className="sm:max-w-md" showCloseButton={false}>
|
|
183
|
+
<DialogHeader>
|
|
184
|
+
<DialogTitle>Share Link</DialogTitle>
|
|
185
|
+
<DialogDescription>
|
|
186
|
+
Anyone who has this link will be able to view this.
|
|
187
|
+
</DialogDescription>
|
|
188
|
+
</DialogHeader>
|
|
189
|
+
<div className="flex items-center space-x-2">
|
|
190
|
+
<Input
|
|
191
|
+
defaultValue="https://ui.shadcn.com/docs/installation"
|
|
192
|
+
readOnly
|
|
193
|
+
/>
|
|
194
|
+
<Button size="sm" className="px-3">
|
|
195
|
+
<Copy className="h-4 w-4" />
|
|
196
|
+
</Button>
|
|
197
|
+
</div>
|
|
198
|
+
<DialogFooter className="sm:justify-start">
|
|
199
|
+
<DialogClose asChild>
|
|
200
|
+
<Button variant="secondary">Close</Button>
|
|
201
|
+
</DialogClose>
|
|
202
|
+
</DialogFooter>
|
|
203
|
+
</DialogContent>
|
|
204
|
+
</Dialog>
|
|
205
|
+
|
|
206
|
+
{/* Long Content Dialog */}
|
|
207
|
+
<Dialog>
|
|
208
|
+
<DialogTrigger asChild>
|
|
209
|
+
<Button variant="outline" className="w-full">
|
|
210
|
+
Long Content
|
|
211
|
+
</Button>
|
|
212
|
+
</DialogTrigger>
|
|
213
|
+
<DialogContent className="max-h-[80vh] overflow-y-auto">
|
|
214
|
+
<DialogHeader>
|
|
215
|
+
<DialogTitle>Terms of Service</DialogTitle>
|
|
216
|
+
<DialogDescription>Last updated: January 1, 2024</DialogDescription>
|
|
217
|
+
</DialogHeader>
|
|
218
|
+
<div className="space-y-4 text-sm">
|
|
219
|
+
<p>
|
|
220
|
+
Welcome to our service. By using our service, you agree to these
|
|
221
|
+
terms.
|
|
222
|
+
</p>
|
|
223
|
+
<h3 className="font-medium">1. Terms</h3>
|
|
224
|
+
<p>
|
|
225
|
+
By accessing this website, you are agreeing to be bound by these
|
|
226
|
+
terms.
|
|
227
|
+
</p>
|
|
228
|
+
<h3 className="font-medium">2. Use License</h3>
|
|
229
|
+
<p>
|
|
230
|
+
Permission is granted for personal, non-commercial viewing only.
|
|
231
|
+
</p>
|
|
232
|
+
</div>
|
|
233
|
+
<DialogFooter>
|
|
234
|
+
<DialogClose asChild>
|
|
235
|
+
<Button variant="outline">Decline</Button>
|
|
236
|
+
</DialogClose>
|
|
237
|
+
<Button>Accept</Button>
|
|
238
|
+
</DialogFooter>
|
|
239
|
+
</DialogContent>
|
|
240
|
+
</Dialog>
|
|
241
|
+
|
|
242
|
+
{/* Controlled Dialog */}
|
|
243
|
+
<ControlledDialogVariant />
|
|
244
|
+
|
|
245
|
+
{/* Custom Styled Dialog */}
|
|
246
|
+
<Dialog>
|
|
247
|
+
<DialogTrigger asChild>
|
|
248
|
+
<Button variant="outline" className="w-full">
|
|
249
|
+
Custom Styled
|
|
250
|
+
</Button>
|
|
251
|
+
</DialogTrigger>
|
|
252
|
+
<DialogContent className="bg-gradient-to-br from-primary/5 to-primary/10 border-primary/20">
|
|
253
|
+
<DialogHeader>
|
|
254
|
+
<DialogTitle className="text-primary">Custom Styling</DialogTitle>
|
|
255
|
+
<DialogDescription>
|
|
256
|
+
This dialog demonstrates custom styling with gradients.
|
|
257
|
+
</DialogDescription>
|
|
258
|
+
</DialogHeader>
|
|
259
|
+
<div className="py-4">
|
|
260
|
+
<p className="text-center text-sm">
|
|
261
|
+
Customize appearance using className props.
|
|
262
|
+
</p>
|
|
263
|
+
</div>
|
|
264
|
+
<DialogFooter>
|
|
265
|
+
<DialogClose asChild>
|
|
266
|
+
<Button variant="outline">Close</Button>
|
|
267
|
+
</DialogClose>
|
|
268
|
+
</DialogFooter>
|
|
269
|
+
</DialogContent>
|
|
270
|
+
</Dialog>
|
|
271
|
+
</div>
|
|
272
|
+
),
|
|
273
|
+
parameters: {
|
|
274
|
+
docs: {
|
|
275
|
+
description: {
|
|
276
|
+
story:
|
|
277
|
+
"Comprehensive showcase of all dialog variants and common patterns. Demonstrates different use cases including confirmation dialogs, forms, custom close buttons, long content handling, controlled state, and custom styling.",
|
|
278
|
+
},
|
|
279
|
+
},
|
|
280
|
+
},
|
|
281
|
+
};
|
|
282
|
+
|
|
283
|
+
/**
|
|
284
|
+
* Helper component for controlled dialog variant
|
|
285
|
+
*/
|
|
286
|
+
function ControlledDialogVariant() {
|
|
287
|
+
const [open, setOpen] = React.useState(false);
|
|
288
|
+
|
|
289
|
+
return (
|
|
290
|
+
<div className="space-y-2">
|
|
291
|
+
<Button
|
|
292
|
+
variant="outline"
|
|
293
|
+
className="w-full"
|
|
294
|
+
onClick={() => setOpen(true)}
|
|
295
|
+
>
|
|
296
|
+
Controlled Dialog
|
|
297
|
+
</Button>
|
|
298
|
+
<p className="text-xs text-muted-foreground text-center">
|
|
299
|
+
State: {open ? "open" : "closed"}
|
|
300
|
+
</p>
|
|
301
|
+
<Dialog open={open} onOpenChange={setOpen}>
|
|
302
|
+
<DialogContent>
|
|
303
|
+
<DialogHeader>
|
|
304
|
+
<DialogTitle>Controlled Dialog</DialogTitle>
|
|
305
|
+
<DialogDescription>
|
|
306
|
+
This dialog's state is controlled externally.
|
|
307
|
+
</DialogDescription>
|
|
308
|
+
</DialogHeader>
|
|
309
|
+
<DialogFooter>
|
|
310
|
+
<Button onClick={() => setOpen(false)}>Close</Button>
|
|
311
|
+
</DialogFooter>
|
|
312
|
+
</DialogContent>
|
|
313
|
+
</Dialog>
|
|
314
|
+
</div>
|
|
315
|
+
);
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
/**
|
|
319
|
+
* Real-world context showing dialog in a typical application scenario
|
|
320
|
+
* Demonstrates practical usage for designers and business teams
|
|
321
|
+
*/
|
|
322
|
+
export const InContext: Story = {
|
|
323
|
+
render: () => {
|
|
324
|
+
const [contactOpen, setContactOpen] = React.useState(false);
|
|
325
|
+
const [deleteOpen, setDeleteOpen] = React.useState(false);
|
|
326
|
+
const [shareOpen, setShareOpen] = React.useState(false);
|
|
327
|
+
|
|
328
|
+
return (
|
|
329
|
+
<div className="max-w-4xl mx-auto p-6 space-y-8">
|
|
330
|
+
{/* Application Header */}
|
|
331
|
+
<div className="border-b pb-4">
|
|
332
|
+
<h1 className="text-2xl font-bold">Dashboard</h1>
|
|
333
|
+
<p className="text-muted-foreground">
|
|
334
|
+
Manage your account and settings
|
|
335
|
+
</p>
|
|
336
|
+
</div>
|
|
337
|
+
|
|
338
|
+
{/* Action Cards */}
|
|
339
|
+
<div className="grid grid-cols-1 md:grid-cols-3 gap-6">
|
|
340
|
+
{/* Contact Support Card */}
|
|
341
|
+
<div className="border rounded-lg p-6 space-y-4">
|
|
342
|
+
<div className="flex items-center gap-3">
|
|
343
|
+
<Mail className="h-5 w-5 text-blue-500" />
|
|
344
|
+
<h3 className="font-semibold">Contact Support</h3>
|
|
345
|
+
</div>
|
|
346
|
+
<p className="text-sm text-muted-foreground">
|
|
347
|
+
Need help? Our support team is here to assist you with any
|
|
348
|
+
questions.
|
|
349
|
+
</p>
|
|
350
|
+
<Dialog open={contactOpen} onOpenChange={setContactOpen}>
|
|
351
|
+
<DialogTrigger asChild>
|
|
352
|
+
<Button className="w-full">
|
|
353
|
+
<Mail className="mr-2 h-4 w-4" />
|
|
354
|
+
Contact Us
|
|
355
|
+
</Button>
|
|
356
|
+
</DialogTrigger>
|
|
357
|
+
<DialogContent className="sm:max-w-[525px]">
|
|
358
|
+
<DialogHeader>
|
|
359
|
+
<DialogTitle>Contact Support</DialogTitle>
|
|
360
|
+
<DialogDescription>
|
|
361
|
+
Send us a message and we'll get back to you as soon as
|
|
362
|
+
possible.
|
|
363
|
+
</DialogDescription>
|
|
364
|
+
</DialogHeader>
|
|
365
|
+
<form
|
|
366
|
+
onSubmit={(e) => {
|
|
367
|
+
e.preventDefault();
|
|
368
|
+
setContactOpen(false);
|
|
369
|
+
}}
|
|
370
|
+
>
|
|
371
|
+
<div className="grid gap-4 py-4">
|
|
372
|
+
<div className="grid gap-2">
|
|
373
|
+
<Label htmlFor="email">Email</Label>
|
|
374
|
+
<Input
|
|
375
|
+
id="email"
|
|
376
|
+
type="email"
|
|
377
|
+
placeholder="you@example.com"
|
|
378
|
+
required
|
|
379
|
+
/>
|
|
380
|
+
</div>
|
|
381
|
+
<div className="grid gap-2">
|
|
382
|
+
<Label htmlFor="subject">Subject</Label>
|
|
383
|
+
<Input
|
|
384
|
+
id="subject"
|
|
385
|
+
placeholder="How can we help?"
|
|
386
|
+
required
|
|
387
|
+
/>
|
|
388
|
+
</div>
|
|
389
|
+
<div className="grid gap-2">
|
|
390
|
+
<Label htmlFor="message">Message</Label>
|
|
391
|
+
<Textarea
|
|
392
|
+
id="message"
|
|
393
|
+
placeholder="Tell us more..."
|
|
394
|
+
rows={4}
|
|
395
|
+
required
|
|
396
|
+
/>
|
|
397
|
+
</div>
|
|
398
|
+
</div>
|
|
399
|
+
<DialogFooter>
|
|
400
|
+
<DialogClose asChild>
|
|
401
|
+
<Button type="button" variant="outline">
|
|
402
|
+
Cancel
|
|
403
|
+
</Button>
|
|
404
|
+
</DialogClose>
|
|
405
|
+
<Button type="submit">Send Message</Button>
|
|
406
|
+
</DialogFooter>
|
|
407
|
+
</form>
|
|
408
|
+
</DialogContent>
|
|
409
|
+
</Dialog>
|
|
410
|
+
</div>
|
|
411
|
+
|
|
412
|
+
{/* Share Profile Card */}
|
|
413
|
+
<div className="border rounded-lg p-6 space-y-4">
|
|
414
|
+
<div className="flex items-center gap-3">
|
|
415
|
+
<Share2 className="h-5 w-5 text-green-500" />
|
|
416
|
+
<h3 className="font-semibold">Share Profile</h3>
|
|
417
|
+
</div>
|
|
418
|
+
<p className="text-sm text-muted-foreground">
|
|
419
|
+
Share your profile with colleagues and collaborators.
|
|
420
|
+
</p>
|
|
421
|
+
<Dialog open={shareOpen} onOpenChange={setShareOpen}>
|
|
422
|
+
<DialogTrigger asChild>
|
|
423
|
+
<Button variant="outline" className="w-full">
|
|
424
|
+
<Share2 className="mr-2 h-4 w-4" />
|
|
425
|
+
Share Profile
|
|
426
|
+
</Button>
|
|
427
|
+
</DialogTrigger>
|
|
428
|
+
<DialogContent className="sm:max-w-md">
|
|
429
|
+
<DialogHeader>
|
|
430
|
+
<DialogTitle>Share Your Profile</DialogTitle>
|
|
431
|
+
<DialogDescription>
|
|
432
|
+
Share your profile with friends and colleagues.
|
|
433
|
+
</DialogDescription>
|
|
434
|
+
</DialogHeader>
|
|
435
|
+
<div className="space-y-4">
|
|
436
|
+
<div className="flex items-center space-x-2">
|
|
437
|
+
<Input
|
|
438
|
+
defaultValue="https://example.com/profile/johndoe"
|
|
439
|
+
readOnly
|
|
440
|
+
className="flex-1"
|
|
441
|
+
/>
|
|
442
|
+
<Button size="sm" className="px-3">
|
|
443
|
+
<Copy className="h-4 w-4" />
|
|
444
|
+
</Button>
|
|
445
|
+
</div>
|
|
446
|
+
<div className="grid grid-cols-2 gap-2">
|
|
447
|
+
<Button
|
|
448
|
+
variant="outline"
|
|
449
|
+
size="sm"
|
|
450
|
+
className="justify-start"
|
|
451
|
+
>
|
|
452
|
+
<Mail className="mr-2 h-4 w-4" />
|
|
453
|
+
Email
|
|
454
|
+
</Button>
|
|
455
|
+
<Button
|
|
456
|
+
variant="outline"
|
|
457
|
+
size="sm"
|
|
458
|
+
className="justify-start"
|
|
459
|
+
>
|
|
460
|
+
<MessageSquare className="mr-2 h-4 w-4" />
|
|
461
|
+
Message
|
|
462
|
+
</Button>
|
|
463
|
+
</div>
|
|
464
|
+
</div>
|
|
465
|
+
<DialogFooter>
|
|
466
|
+
<DialogClose asChild>
|
|
467
|
+
<Button variant="outline" className="w-full">
|
|
468
|
+
Close
|
|
469
|
+
</Button>
|
|
470
|
+
</DialogClose>
|
|
471
|
+
</DialogFooter>
|
|
472
|
+
</DialogContent>
|
|
473
|
+
</Dialog>
|
|
474
|
+
</div>
|
|
475
|
+
|
|
476
|
+
{/* Danger Zone Card */}
|
|
477
|
+
<div className="border border-red-200 rounded-lg p-6 space-y-4">
|
|
478
|
+
<div className="flex items-center gap-3">
|
|
479
|
+
<div className="h-5 w-5 bg-red-500 rounded-full" />
|
|
480
|
+
<h3 className="font-semibold text-red-700">Danger Zone</h3>
|
|
481
|
+
</div>
|
|
482
|
+
<p className="text-sm text-muted-foreground">
|
|
483
|
+
Permanently delete your account and all associated data.
|
|
484
|
+
</p>
|
|
485
|
+
<Dialog open={deleteOpen} onOpenChange={setDeleteOpen}>
|
|
486
|
+
<DialogTrigger asChild>
|
|
487
|
+
<Button variant="destructive" className="w-full">
|
|
488
|
+
Delete Account
|
|
489
|
+
</Button>
|
|
490
|
+
</DialogTrigger>
|
|
491
|
+
<DialogContent>
|
|
492
|
+
<DialogHeader>
|
|
493
|
+
<DialogTitle>Are you absolutely sure?</DialogTitle>
|
|
494
|
+
<DialogDescription>
|
|
495
|
+
This action cannot be undone. This will permanently delete
|
|
496
|
+
your account and remove your data from our servers.
|
|
497
|
+
</DialogDescription>
|
|
498
|
+
</DialogHeader>
|
|
499
|
+
<DialogFooter>
|
|
500
|
+
<DialogClose asChild>
|
|
501
|
+
<Button variant="outline">Cancel</Button>
|
|
502
|
+
</DialogClose>
|
|
503
|
+
<Button
|
|
504
|
+
variant="destructive"
|
|
505
|
+
onClick={() => setDeleteOpen(false)}
|
|
506
|
+
>
|
|
507
|
+
Delete Account
|
|
508
|
+
</Button>
|
|
509
|
+
</DialogFooter>
|
|
510
|
+
</DialogContent>
|
|
511
|
+
</Dialog>
|
|
512
|
+
</div>
|
|
513
|
+
</div>
|
|
514
|
+
|
|
515
|
+
{/* Additional Context */}
|
|
516
|
+
<div className="border-t pt-4">
|
|
517
|
+
<p className="text-sm text-muted-foreground">
|
|
518
|
+
This example shows dialogs in a realistic application context,
|
|
519
|
+
demonstrating how they integrate with typical UI patterns and
|
|
520
|
+
workflows.
|
|
521
|
+
</p>
|
|
522
|
+
</div>
|
|
523
|
+
</div>
|
|
524
|
+
);
|
|
525
|
+
},
|
|
526
|
+
parameters: {
|
|
527
|
+
layout: "fullscreen",
|
|
528
|
+
docs: {
|
|
529
|
+
description: {
|
|
530
|
+
story:
|
|
531
|
+
"Real-world application scenario showing dialogs integrated into a typical dashboard interface. Demonstrates practical usage patterns including contact forms, sharing functionality, and confirmation dialogs for destructive actions. Perfect for showing designers and business teams how dialogs fit into complete user workflows.",
|
|
532
|
+
},
|
|
533
|
+
},
|
|
534
|
+
},
|
|
535
|
+
};
|