@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,502 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react-vite";
|
|
2
|
+
import { Theme } from "../theme";
|
|
3
|
+
import { ThemeToggle } from "../theme-toggle";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* The @neynar/ui color system uses semantic color tokens that automatically adapt between light and dark themes.
|
|
7
|
+
* All colors are based on CSS custom properties and use the OKLCH color space for better color consistency and accessibility.
|
|
8
|
+
*
|
|
9
|
+
* This comprehensive reference shows all 35+ semantic color tokens with live examples, usage guidelines, and technical details.
|
|
10
|
+
*/
|
|
11
|
+
const meta = {
|
|
12
|
+
title: "Colors/Colors",
|
|
13
|
+
parameters: {
|
|
14
|
+
layout: "fullscreen",
|
|
15
|
+
docs: {
|
|
16
|
+
description: {
|
|
17
|
+
component: `
|
|
18
|
+
The @neynar/ui color system uses semantic color tokens that automatically adapt between light and dark themes. All colors are based on CSS custom properties and use the OKLCH color space for better color consistency and accessibility.
|
|
19
|
+
|
|
20
|
+
**Key Features:**
|
|
21
|
+
- 🎨 Semantic color naming by purpose, not appearance
|
|
22
|
+
- 🌓 Automatic light/dark mode adaptation
|
|
23
|
+
- ♿ WCAG AA compliant contrast ratios
|
|
24
|
+
- 🎯 Figma design system aligned
|
|
25
|
+
- 🎪 35+ semantic color tokens
|
|
26
|
+
- 🔄 Perfect theme synchronization
|
|
27
|
+
|
|
28
|
+
**Architecture:**
|
|
29
|
+
- Uses CSS custom properties with OKLCH color space
|
|
30
|
+
- Single source of truth with cookie persistence
|
|
31
|
+
- Event-driven theme synchronization
|
|
32
|
+
- Framework-agnostic implementation
|
|
33
|
+
|
|
34
|
+
**Usage:**
|
|
35
|
+
Use the theme toggle to see how all colors automatically adapt between light and dark modes. Each color token has a corresponding foreground color for proper contrast.
|
|
36
|
+
`,
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
tags: ["autodocs"],
|
|
41
|
+
} satisfies Meta;
|
|
42
|
+
|
|
43
|
+
export default meta;
|
|
44
|
+
type Story = StoryObj<typeof meta>;
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Complete color palette showing all semantic color tokens with live theme switching.
|
|
48
|
+
* This is the definitive reference for all available colors in the design system.
|
|
49
|
+
*/
|
|
50
|
+
export const CompleteColorReference: Story = {
|
|
51
|
+
render: () => (
|
|
52
|
+
<div className="min-h-screen bg-background text-foreground">
|
|
53
|
+
<Theme />
|
|
54
|
+
|
|
55
|
+
<div className="max-w-7xl mx-auto p-8 space-y-12">
|
|
56
|
+
{/* Header */}
|
|
57
|
+
<div className="flex items-center justify-between">
|
|
58
|
+
<div>
|
|
59
|
+
<h1 className="text-4xl font-bold mb-3">Color System</h1>
|
|
60
|
+
<p className="text-lg text-muted-foreground max-w-3xl">
|
|
61
|
+
Complete reference for all 35+ semantic color tokens. Toggle between light and dark themes to see automatic adaptation.
|
|
62
|
+
</p>
|
|
63
|
+
</div>
|
|
64
|
+
<ThemeToggle showLabel />
|
|
65
|
+
</div>
|
|
66
|
+
|
|
67
|
+
{/* Color Architecture */}
|
|
68
|
+
<section className="bg-card text-card-foreground border rounded-lg p-6">
|
|
69
|
+
<h2 className="text-2xl font-semibold mb-4">Color Architecture</h2>
|
|
70
|
+
<div className="grid gap-6 md:grid-cols-2">
|
|
71
|
+
<div>
|
|
72
|
+
<h3 className="font-medium mb-3">Design Principles</h3>
|
|
73
|
+
<ul className="text-sm space-y-2 text-muted-foreground">
|
|
74
|
+
<li>🎯 <strong>Semantic naming</strong> - Colors named by purpose, not appearance</li>
|
|
75
|
+
<li>🌓 <strong>Theme adaptation</strong> - Automatic light/dark mode variants</li>
|
|
76
|
+
<li>♿ <strong>Accessibility first</strong> - WCAG AA contrast ratios maintained</li>
|
|
77
|
+
<li>🎨 <strong>Figma aligned</strong> - Direct mapping to design tokens</li>
|
|
78
|
+
</ul>
|
|
79
|
+
</div>
|
|
80
|
+
<div>
|
|
81
|
+
<h3 className="font-medium mb-3">Technical Implementation</h3>
|
|
82
|
+
<ul className="text-sm space-y-2 text-muted-foreground">
|
|
83
|
+
<li>🔧 <strong>OKLCH color space</strong> - Better color consistency</li>
|
|
84
|
+
<li>🍪 <strong>Cookie persistence</strong> - Maintains theme across sessions</li>
|
|
85
|
+
<li>⚡ <strong>Event synchronization</strong> - Perfect cross-instance sync</li>
|
|
86
|
+
<li>🚀 <strong>Zero-config</strong> - Works without providers</li>
|
|
87
|
+
</ul>
|
|
88
|
+
</div>
|
|
89
|
+
</div>
|
|
90
|
+
</section>
|
|
91
|
+
|
|
92
|
+
{/* Background & Surface Colors */}
|
|
93
|
+
<section>
|
|
94
|
+
<h2 className="text-2xl font-semibold mb-6">Background & Surface Colors</h2>
|
|
95
|
+
<div className="grid gap-4 md:grid-cols-2 lg:grid-cols-4">
|
|
96
|
+
<div className="p-6 rounded-lg border bg-background min-h-[120px] flex flex-col justify-between">
|
|
97
|
+
<div>
|
|
98
|
+
<strong className="text-foreground">Background</strong>
|
|
99
|
+
<div className="text-xs text-muted-foreground mt-1">bg-background</div>
|
|
100
|
+
</div>
|
|
101
|
+
<p className="text-sm text-foreground mt-2">Primary page background</p>
|
|
102
|
+
</div>
|
|
103
|
+
<div className="p-6 rounded-lg border bg-card min-h-[120px] flex flex-col justify-between">
|
|
104
|
+
<div>
|
|
105
|
+
<strong className="text-card-foreground">Card</strong>
|
|
106
|
+
<div className="text-xs text-muted-foreground mt-1">bg-card</div>
|
|
107
|
+
</div>
|
|
108
|
+
<p className="text-sm text-card-foreground mt-2">Elevated containers</p>
|
|
109
|
+
</div>
|
|
110
|
+
<div className="p-6 rounded-lg border bg-popover min-h-[120px] flex flex-col justify-between">
|
|
111
|
+
<div>
|
|
112
|
+
<strong className="text-popover-foreground">Popover</strong>
|
|
113
|
+
<div className="text-xs text-muted-foreground mt-1">bg-popover</div>
|
|
114
|
+
</div>
|
|
115
|
+
<p className="text-sm text-popover-foreground mt-2">Overlay containers</p>
|
|
116
|
+
</div>
|
|
117
|
+
<div className="p-6 rounded-lg border bg-input min-h-[120px] flex flex-col justify-between">
|
|
118
|
+
<div>
|
|
119
|
+
<strong className="text-foreground">Input</strong>
|
|
120
|
+
<div className="text-xs text-muted-foreground mt-1">bg-input</div>
|
|
121
|
+
</div>
|
|
122
|
+
<p className="text-sm text-foreground mt-2">Form field backgrounds</p>
|
|
123
|
+
</div>
|
|
124
|
+
</div>
|
|
125
|
+
</section>
|
|
126
|
+
|
|
127
|
+
{/* Brand Colors */}
|
|
128
|
+
<section>
|
|
129
|
+
<h2 className="text-2xl font-semibold mb-6">Brand Colors</h2>
|
|
130
|
+
<div className="grid gap-4 md:grid-cols-2 lg:grid-cols-4">
|
|
131
|
+
<div className="p-6 rounded-lg bg-primary min-h-[140px] flex flex-col justify-between">
|
|
132
|
+
<div>
|
|
133
|
+
<strong className="text-primary-foreground">Primary</strong>
|
|
134
|
+
<div className="text-xs text-primary-foreground/80 mt-1">bg-primary</div>
|
|
135
|
+
</div>
|
|
136
|
+
<div className="mt-3">
|
|
137
|
+
<p className="text-sm text-primary-foreground/90 mb-2">Farcaster Purple</p>
|
|
138
|
+
<p className="text-xs text-primary-foreground/80">#7f62c6</p>
|
|
139
|
+
</div>
|
|
140
|
+
</div>
|
|
141
|
+
<div className="p-6 rounded-lg border bg-secondary min-h-[140px] flex flex-col justify-between">
|
|
142
|
+
<div>
|
|
143
|
+
<strong className="text-secondary-foreground">Secondary</strong>
|
|
144
|
+
<div className="text-xs text-muted-foreground mt-1">bg-secondary</div>
|
|
145
|
+
</div>
|
|
146
|
+
<p className="text-sm text-secondary-foreground mt-2">Secondary actions</p>
|
|
147
|
+
</div>
|
|
148
|
+
<div className="p-6 rounded-lg border bg-muted min-h-[140px] flex flex-col justify-between">
|
|
149
|
+
<div>
|
|
150
|
+
<strong className="text-foreground">Muted</strong>
|
|
151
|
+
<div className="text-xs text-muted-foreground mt-1">bg-muted</div>
|
|
152
|
+
</div>
|
|
153
|
+
<p className="text-sm text-muted-foreground mt-2">Subtle backgrounds</p>
|
|
154
|
+
</div>
|
|
155
|
+
<div className="p-6 rounded-lg border bg-accent min-h-[140px] flex flex-col justify-between">
|
|
156
|
+
<div>
|
|
157
|
+
<strong className="text-accent-foreground">Accent</strong>
|
|
158
|
+
<div className="text-xs text-muted-foreground mt-1">bg-accent</div>
|
|
159
|
+
</div>
|
|
160
|
+
<p className="text-sm text-accent-foreground mt-2">Subtle emphasis</p>
|
|
161
|
+
</div>
|
|
162
|
+
</div>
|
|
163
|
+
</section>
|
|
164
|
+
|
|
165
|
+
{/* State Colors */}
|
|
166
|
+
<section>
|
|
167
|
+
<h2 className="text-2xl font-semibold mb-6">State & Feedback Colors</h2>
|
|
168
|
+
<div className="grid gap-4 md:grid-cols-3">
|
|
169
|
+
<div className="p-6 rounded-lg bg-destructive min-h-[140px] flex flex-col justify-between">
|
|
170
|
+
<div>
|
|
171
|
+
<strong className="text-destructive-foreground">Destructive</strong>
|
|
172
|
+
<div className="text-xs text-destructive-foreground/80 mt-1">bg-destructive</div>
|
|
173
|
+
</div>
|
|
174
|
+
<div className="mt-3">
|
|
175
|
+
<p className="text-sm text-destructive-foreground/90 mb-1">Error states</p>
|
|
176
|
+
<p className="text-xs text-destructive-foreground/80">Dangerous actions</p>
|
|
177
|
+
</div>
|
|
178
|
+
</div>
|
|
179
|
+
<div className="p-6 rounded-lg bg-success min-h-[140px] flex flex-col justify-between">
|
|
180
|
+
<div>
|
|
181
|
+
<strong className="text-success-foreground">Success</strong>
|
|
182
|
+
<div className="text-xs text-success-foreground/80 mt-1">bg-success</div>
|
|
183
|
+
</div>
|
|
184
|
+
<div className="mt-3">
|
|
185
|
+
<p className="text-sm text-success-foreground/90 mb-1">Success states</p>
|
|
186
|
+
<p className="text-xs text-success-foreground/80">Confirmations</p>
|
|
187
|
+
</div>
|
|
188
|
+
</div>
|
|
189
|
+
<div className="p-6 rounded-lg bg-warning min-h-[140px] flex flex-col justify-between">
|
|
190
|
+
<div>
|
|
191
|
+
<strong className="text-warning-foreground">Warning</strong>
|
|
192
|
+
<div className="text-xs text-warning-foreground/80 mt-1">bg-warning</div>
|
|
193
|
+
</div>
|
|
194
|
+
<div className="mt-3">
|
|
195
|
+
<p className="text-sm text-warning-foreground/90 mb-1">Warning states</p>
|
|
196
|
+
<p className="text-xs text-warning-foreground/80">Cautions</p>
|
|
197
|
+
</div>
|
|
198
|
+
</div>
|
|
199
|
+
</div>
|
|
200
|
+
</section>
|
|
201
|
+
|
|
202
|
+
{/* Interactive Elements */}
|
|
203
|
+
<section>
|
|
204
|
+
<h2 className="text-2xl font-semibold mb-6">Interactive & Border Colors</h2>
|
|
205
|
+
<div className="grid gap-4 md:grid-cols-3">
|
|
206
|
+
<div className="p-6 rounded-lg border-4 border-border bg-card min-h-[120px] flex flex-col justify-between">
|
|
207
|
+
<div>
|
|
208
|
+
<strong className="text-card-foreground">Border</strong>
|
|
209
|
+
<div className="text-xs text-muted-foreground mt-1">border-border</div>
|
|
210
|
+
</div>
|
|
211
|
+
<p className="text-sm text-muted-foreground mt-2">Default borders</p>
|
|
212
|
+
</div>
|
|
213
|
+
<div className="p-6 rounded-lg ring-4 ring-ring bg-card min-h-[120px] flex flex-col justify-between">
|
|
214
|
+
<div>
|
|
215
|
+
<strong className="text-card-foreground">Ring</strong>
|
|
216
|
+
<div className="text-xs text-muted-foreground mt-1">ring-ring</div>
|
|
217
|
+
</div>
|
|
218
|
+
<p className="text-sm text-muted-foreground mt-2">Focus indicators</p>
|
|
219
|
+
</div>
|
|
220
|
+
<div className="p-6 rounded-lg border-2 border-dashed border-muted bg-muted/20 min-h-[120px] flex flex-col justify-between">
|
|
221
|
+
<div>
|
|
222
|
+
<strong className="text-foreground">Interactive Demo</strong>
|
|
223
|
+
<div className="text-xs text-muted-foreground mt-1">Various borders</div>
|
|
224
|
+
</div>
|
|
225
|
+
<p className="text-sm text-muted-foreground mt-2">Hover & focus states</p>
|
|
226
|
+
</div>
|
|
227
|
+
</div>
|
|
228
|
+
</section>
|
|
229
|
+
|
|
230
|
+
{/* Chart Colors */}
|
|
231
|
+
<section>
|
|
232
|
+
<h2 className="text-2xl font-semibold mb-6">Data Visualization Colors</h2>
|
|
233
|
+
<div className="grid gap-4 grid-cols-5">
|
|
234
|
+
<div className="aspect-square rounded-lg text-white text-center flex flex-col items-center justify-center p-4" style={{backgroundColor: 'hsl(var(--chart-1))'}}>
|
|
235
|
+
<strong className="text-sm">Chart 1</strong>
|
|
236
|
+
<div className="text-xs opacity-90 mt-1">Blue 1</div>
|
|
237
|
+
<div className="text-xs opacity-80 mt-1">#829ae0</div>
|
|
238
|
+
</div>
|
|
239
|
+
<div className="aspect-square rounded-lg text-white text-center flex flex-col items-center justify-center p-4" style={{backgroundColor: 'hsl(var(--chart-2))'}}>
|
|
240
|
+
<strong className="text-sm">Chart 2</strong>
|
|
241
|
+
<div className="text-xs opacity-90 mt-1">Blue 2</div>
|
|
242
|
+
<div className="text-xs opacity-80 mt-1">#1a75ff</div>
|
|
243
|
+
</div>
|
|
244
|
+
<div className="aspect-square rounded-lg text-white text-center flex flex-col items-center justify-center p-4" style={{backgroundColor: 'hsl(var(--chart-3))'}}>
|
|
245
|
+
<strong className="text-sm">Chart 3</strong>
|
|
246
|
+
<div className="text-xs opacity-90 mt-1">Purple 1</div>
|
|
247
|
+
<div className="text-xs opacity-80 mt-1">#c6acde</div>
|
|
248
|
+
</div>
|
|
249
|
+
<div className="aspect-square rounded-lg text-white text-center flex flex-col items-center justify-center p-4" style={{backgroundColor: 'hsl(var(--chart-4))'}}>
|
|
250
|
+
<strong className="text-sm">Chart 4</strong>
|
|
251
|
+
<div className="text-xs opacity-90 mt-1">Purple 2</div>
|
|
252
|
+
<div className="text-xs opacity-80 mt-1">#9c27b0</div>
|
|
253
|
+
</div>
|
|
254
|
+
<div className="aspect-square rounded-lg text-white text-center flex flex-col items-center justify-center p-4" style={{backgroundColor: 'hsl(var(--chart-5))'}}>
|
|
255
|
+
<strong className="text-sm">Chart 5</strong>
|
|
256
|
+
<div className="text-xs opacity-90 mt-1">Violet</div>
|
|
257
|
+
<div className="text-xs opacity-80 mt-1">#7dc6da</div>
|
|
258
|
+
</div>
|
|
259
|
+
</div>
|
|
260
|
+
</section>
|
|
261
|
+
|
|
262
|
+
{/* Sidebar Colors */}
|
|
263
|
+
<section>
|
|
264
|
+
<h2 className="text-2xl font-semibold mb-6">Sidebar Colors</h2>
|
|
265
|
+
<div className="grid gap-4 md:grid-cols-2 lg:grid-cols-4">
|
|
266
|
+
<div className="p-6 rounded-lg border bg-sidebar min-h-[120px] flex flex-col justify-between">
|
|
267
|
+
<div>
|
|
268
|
+
<strong className="text-sidebar-foreground">Sidebar</strong>
|
|
269
|
+
<div className="text-xs text-muted-foreground mt-1">bg-sidebar</div>
|
|
270
|
+
</div>
|
|
271
|
+
<p className="text-sm text-sidebar-foreground mt-2">Sidebar background</p>
|
|
272
|
+
</div>
|
|
273
|
+
<div className="p-6 rounded-lg bg-sidebar-primary min-h-[120px] flex flex-col justify-between">
|
|
274
|
+
<div>
|
|
275
|
+
<strong className="text-sidebar-primary-foreground">Sidebar Primary</strong>
|
|
276
|
+
<div className="text-xs text-sidebar-primary-foreground/80 mt-1">bg-sidebar-primary</div>
|
|
277
|
+
</div>
|
|
278
|
+
<p className="text-sm text-sidebar-primary-foreground/90 mt-2">Active items</p>
|
|
279
|
+
</div>
|
|
280
|
+
<div className="p-6 rounded-lg bg-sidebar-accent min-h-[120px] flex flex-col justify-between">
|
|
281
|
+
<div>
|
|
282
|
+
<strong className="text-sidebar-accent-foreground">Sidebar Accent</strong>
|
|
283
|
+
<div className="text-xs text-muted-foreground mt-1">bg-sidebar-accent</div>
|
|
284
|
+
</div>
|
|
285
|
+
<p className="text-sm text-sidebar-accent-foreground mt-2">Accent backgrounds</p>
|
|
286
|
+
</div>
|
|
287
|
+
<div className="p-6 rounded-lg border-4 border-sidebar-border bg-sidebar min-h-[120px] flex flex-col justify-between">
|
|
288
|
+
<div>
|
|
289
|
+
<strong className="text-sidebar-foreground">Sidebar Border</strong>
|
|
290
|
+
<div className="text-xs text-muted-foreground mt-1">border-sidebar-border</div>
|
|
291
|
+
</div>
|
|
292
|
+
<p className="text-sm text-sidebar-foreground mt-2">Sidebar borders</p>
|
|
293
|
+
</div>
|
|
294
|
+
</div>
|
|
295
|
+
</section>
|
|
296
|
+
|
|
297
|
+
{/* Usage Guidelines */}
|
|
298
|
+
<section className="bg-card text-card-foreground border rounded-lg p-8">
|
|
299
|
+
<h2 className="text-2xl font-semibold mb-6">Usage Guidelines</h2>
|
|
300
|
+
|
|
301
|
+
<div className="grid gap-8 lg:grid-cols-2">
|
|
302
|
+
<div>
|
|
303
|
+
<h3 className="text-lg font-medium mb-4">Color Pairing Rules</h3>
|
|
304
|
+
<div className="space-y-3">
|
|
305
|
+
<div className="flex items-center gap-3">
|
|
306
|
+
<div className="w-4 h-4 bg-primary rounded"></div>
|
|
307
|
+
<code className="bg-muted px-2 py-1 rounded text-sm">bg-primary</code>
|
|
308
|
+
<span className="text-muted-foreground">→</span>
|
|
309
|
+
<code className="bg-muted px-2 py-1 rounded text-sm">text-primary-foreground</code>
|
|
310
|
+
</div>
|
|
311
|
+
<div className="flex items-center gap-3">
|
|
312
|
+
<div className="w-4 h-4 bg-secondary rounded border"></div>
|
|
313
|
+
<code className="bg-muted px-2 py-1 rounded text-sm">bg-secondary</code>
|
|
314
|
+
<span className="text-muted-foreground">→</span>
|
|
315
|
+
<code className="bg-muted px-2 py-1 rounded text-sm">text-secondary-foreground</code>
|
|
316
|
+
</div>
|
|
317
|
+
<div className="flex items-center gap-3">
|
|
318
|
+
<div className="w-4 h-4 bg-destructive rounded"></div>
|
|
319
|
+
<code className="bg-muted px-2 py-1 rounded text-sm">bg-destructive</code>
|
|
320
|
+
<span className="text-muted-foreground">→</span>
|
|
321
|
+
<code className="bg-muted px-2 py-1 rounded text-sm">text-destructive-foreground</code>
|
|
322
|
+
</div>
|
|
323
|
+
</div>
|
|
324
|
+
</div>
|
|
325
|
+
|
|
326
|
+
<div>
|
|
327
|
+
<h3 className="text-lg font-medium mb-4">Semantic Usage</h3>
|
|
328
|
+
<ul className="space-y-2 text-sm">
|
|
329
|
+
<li><strong className="text-primary">Primary:</strong> <span className="text-muted-foreground">Main actions, brand elements</span></li>
|
|
330
|
+
<li><strong className="text-destructive">Destructive:</strong> <span className="text-muted-foreground">Errors, dangerous actions</span></li>
|
|
331
|
+
<li><strong className="text-success">Success:</strong> <span className="text-muted-foreground">Confirmations, completed states</span></li>
|
|
332
|
+
<li><strong className="text-warning">Warning:</strong> <span className="text-muted-foreground">Cautions, important notices</span></li>
|
|
333
|
+
<li><strong>Muted:</strong> <span className="text-muted-foreground">Disabled states, subtle content</span></li>
|
|
334
|
+
<li><strong>Accent:</strong> <span className="text-muted-foreground">Information highlights</span></li>
|
|
335
|
+
</ul>
|
|
336
|
+
</div>
|
|
337
|
+
</div>
|
|
338
|
+
|
|
339
|
+
<div className="mt-8 p-4 bg-accent/50 rounded-lg border border-accent">
|
|
340
|
+
<h4 className="font-medium mb-2 text-accent-foreground">Accessibility Note</h4>
|
|
341
|
+
<p className="text-sm text-muted-foreground">
|
|
342
|
+
All color combinations maintain WCAG AA contrast ratios (4.5:1 minimum).
|
|
343
|
+
Colors automatically adapt between themes while preserving accessibility.
|
|
344
|
+
</p>
|
|
345
|
+
</div>
|
|
346
|
+
</section>
|
|
347
|
+
</div>
|
|
348
|
+
</div>
|
|
349
|
+
),
|
|
350
|
+
};
|
|
351
|
+
|
|
352
|
+
/**
|
|
353
|
+
* Component usage examples demonstrating proper color application in real UI patterns.
|
|
354
|
+
*/
|
|
355
|
+
export const ComponentExamples: Story = {
|
|
356
|
+
render: () => (
|
|
357
|
+
<div className="min-h-screen bg-background text-foreground">
|
|
358
|
+
<Theme />
|
|
359
|
+
|
|
360
|
+
<div className="max-w-6xl mx-auto p-8 space-y-12">
|
|
361
|
+
<div className="flex items-center justify-between">
|
|
362
|
+
<div>
|
|
363
|
+
<h1 className="text-3xl font-bold mb-2">Component Examples</h1>
|
|
364
|
+
<p className="text-muted-foreground">
|
|
365
|
+
Real-world usage patterns showing proper color application
|
|
366
|
+
</p>
|
|
367
|
+
</div>
|
|
368
|
+
<ThemeToggle showLabel />
|
|
369
|
+
</div>
|
|
370
|
+
|
|
371
|
+
{/* Buttons */}
|
|
372
|
+
<section className="space-y-6">
|
|
373
|
+
<h2 className="text-xl font-semibold">Buttons</h2>
|
|
374
|
+
<div className="flex flex-wrap gap-4">
|
|
375
|
+
<button className="px-6 py-3 bg-primary text-primary-foreground rounded-md hover:bg-primary/90 transition-colors">
|
|
376
|
+
Primary Action
|
|
377
|
+
</button>
|
|
378
|
+
<button className="px-6 py-3 bg-secondary text-secondary-foreground rounded-md hover:bg-secondary/80 transition-colors">
|
|
379
|
+
Secondary Action
|
|
380
|
+
</button>
|
|
381
|
+
<button className="px-6 py-3 bg-destructive text-destructive-foreground rounded-md hover:bg-destructive/90 transition-colors">
|
|
382
|
+
Delete Item
|
|
383
|
+
</button>
|
|
384
|
+
<button className="px-6 py-3 bg-success text-success-foreground rounded-md hover:bg-success/90 transition-colors">
|
|
385
|
+
Confirm
|
|
386
|
+
</button>
|
|
387
|
+
<button className="px-6 py-3 bg-muted text-muted-foreground rounded-md hover:bg-muted/80 transition-colors">
|
|
388
|
+
Disabled Style
|
|
389
|
+
</button>
|
|
390
|
+
</div>
|
|
391
|
+
</section>
|
|
392
|
+
|
|
393
|
+
{/* Cards */}
|
|
394
|
+
<section className="space-y-6">
|
|
395
|
+
<h2 className="text-xl font-semibold">Cards & Containers</h2>
|
|
396
|
+
<div className="grid gap-6 md:grid-cols-2 lg:grid-cols-3">
|
|
397
|
+
<div className="bg-card text-card-foreground border border-border rounded-lg p-6">
|
|
398
|
+
<h3 className="font-medium mb-2">Standard Card</h3>
|
|
399
|
+
<p className="text-sm text-muted-foreground mb-4">
|
|
400
|
+
Uses card background with proper text contrast
|
|
401
|
+
</p>
|
|
402
|
+
<button className="text-primary hover:text-primary/80 text-sm font-medium">
|
|
403
|
+
Learn more →
|
|
404
|
+
</button>
|
|
405
|
+
</div>
|
|
406
|
+
|
|
407
|
+
<div className="bg-muted text-muted-foreground rounded-lg p-6">
|
|
408
|
+
<h3 className="font-medium mb-2 text-foreground">Muted Card</h3>
|
|
409
|
+
<p className="text-sm mb-4">
|
|
410
|
+
Subtle container for less important content
|
|
411
|
+
</p>
|
|
412
|
+
<button className="text-primary hover:text-primary/80 text-sm font-medium">
|
|
413
|
+
View details
|
|
414
|
+
</button>
|
|
415
|
+
</div>
|
|
416
|
+
|
|
417
|
+
<div className="bg-accent text-accent-foreground border rounded-lg p-6">
|
|
418
|
+
<h3 className="font-medium mb-2">Accent Card</h3>
|
|
419
|
+
<p className="text-sm mb-4">
|
|
420
|
+
Highlighted information container
|
|
421
|
+
</p>
|
|
422
|
+
<button className="text-primary hover:text-primary/80 text-sm font-medium">
|
|
423
|
+
Take action
|
|
424
|
+
</button>
|
|
425
|
+
</div>
|
|
426
|
+
</div>
|
|
427
|
+
</section>
|
|
428
|
+
|
|
429
|
+
{/* Status Messages */}
|
|
430
|
+
<section className="space-y-6">
|
|
431
|
+
<h2 className="text-xl font-semibold">Status & Feedback</h2>
|
|
432
|
+
<div className="space-y-4 max-w-2xl">
|
|
433
|
+
<div className="bg-success text-success-foreground p-4 rounded-lg flex items-start gap-3">
|
|
434
|
+
<div className="w-5 h-5 bg-success-foreground/20 rounded-full flex items-center justify-center mt-0.5">
|
|
435
|
+
<div className="w-2 h-2 bg-success-foreground rounded-full"></div>
|
|
436
|
+
</div>
|
|
437
|
+
<div>
|
|
438
|
+
<strong>Success!</strong>
|
|
439
|
+
<p className="text-sm opacity-90 mt-1">Your changes have been saved successfully.</p>
|
|
440
|
+
</div>
|
|
441
|
+
</div>
|
|
442
|
+
|
|
443
|
+
<div className="bg-warning text-warning-foreground p-4 rounded-lg flex items-start gap-3">
|
|
444
|
+
<div className="w-5 h-5 bg-warning-foreground/20 rounded-full flex items-center justify-center mt-0.5">
|
|
445
|
+
<div className="w-2 h-2 bg-warning-foreground rounded-full"></div>
|
|
446
|
+
</div>
|
|
447
|
+
<div>
|
|
448
|
+
<strong>Warning:</strong>
|
|
449
|
+
<p className="text-sm opacity-90 mt-1">This action cannot be undone. Please proceed with caution.</p>
|
|
450
|
+
</div>
|
|
451
|
+
</div>
|
|
452
|
+
|
|
453
|
+
<div className="bg-destructive text-destructive-foreground p-4 rounded-lg flex items-start gap-3">
|
|
454
|
+
<div className="w-5 h-5 bg-destructive-foreground/20 rounded-full flex items-center justify-center mt-0.5">
|
|
455
|
+
<div className="w-2 h-2 bg-destructive-foreground rounded-full"></div>
|
|
456
|
+
</div>
|
|
457
|
+
<div>
|
|
458
|
+
<strong>Error:</strong>
|
|
459
|
+
<p className="text-sm opacity-90 mt-1">Unable to process your request. Please try again.</p>
|
|
460
|
+
</div>
|
|
461
|
+
</div>
|
|
462
|
+
</div>
|
|
463
|
+
</section>
|
|
464
|
+
|
|
465
|
+
{/* Form Elements */}
|
|
466
|
+
<section className="space-y-6">
|
|
467
|
+
<h2 className="text-xl font-semibold">Form Elements</h2>
|
|
468
|
+
<div className="space-y-6 max-w-md">
|
|
469
|
+
<div>
|
|
470
|
+
<label className="block text-sm font-medium mb-2">Normal Input</label>
|
|
471
|
+
<input
|
|
472
|
+
className="w-full px-3 py-2 bg-input text-foreground border border-input rounded-md focus:ring-2 focus:ring-ring focus:border-transparent outline-none transition-all"
|
|
473
|
+
placeholder="Enter your text..."
|
|
474
|
+
defaultValue="Sample input text"
|
|
475
|
+
/>
|
|
476
|
+
</div>
|
|
477
|
+
|
|
478
|
+
<div>
|
|
479
|
+
<label className="block text-sm font-medium mb-2">Success State</label>
|
|
480
|
+
<input
|
|
481
|
+
className="w-full px-3 py-2 bg-input text-foreground border border-success rounded-md focus:ring-2 focus:ring-success focus:border-transparent outline-none"
|
|
482
|
+
placeholder="Valid input"
|
|
483
|
+
defaultValue="valid@example.com"
|
|
484
|
+
/>
|
|
485
|
+
<p className="text-sm text-success mt-1">Email format is valid</p>
|
|
486
|
+
</div>
|
|
487
|
+
|
|
488
|
+
<div>
|
|
489
|
+
<label className="block text-sm font-medium mb-2">Error State</label>
|
|
490
|
+
<input
|
|
491
|
+
className="w-full px-3 py-2 bg-input text-foreground border border-destructive rounded-md focus:ring-2 focus:ring-destructive focus:border-transparent outline-none"
|
|
492
|
+
placeholder="Invalid input"
|
|
493
|
+
defaultValue="invalid-email"
|
|
494
|
+
/>
|
|
495
|
+
<p className="text-sm text-destructive mt-1">Please enter a valid email address</p>
|
|
496
|
+
</div>
|
|
497
|
+
</div>
|
|
498
|
+
</section>
|
|
499
|
+
</div>
|
|
500
|
+
</div>
|
|
501
|
+
),
|
|
502
|
+
};
|