@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,1586 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react-vite";
|
|
2
|
+
import {
|
|
3
|
+
Typography,
|
|
4
|
+
H1,
|
|
5
|
+
H2,
|
|
6
|
+
H3,
|
|
7
|
+
H4,
|
|
8
|
+
H5,
|
|
9
|
+
H6,
|
|
10
|
+
P,
|
|
11
|
+
A,
|
|
12
|
+
Span,
|
|
13
|
+
Code,
|
|
14
|
+
Small,
|
|
15
|
+
Strong,
|
|
16
|
+
Lead,
|
|
17
|
+
Blockquote,
|
|
18
|
+
} from "../typography";
|
|
19
|
+
import { Label } from "../label";
|
|
20
|
+
import {
|
|
21
|
+
Card,
|
|
22
|
+
CardContent,
|
|
23
|
+
CardDescription,
|
|
24
|
+
CardHeader,
|
|
25
|
+
CardTitle,
|
|
26
|
+
} from "../card";
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Typography component stories for design system documentation
|
|
30
|
+
*
|
|
31
|
+
* This story file demonstrates the Typography component's capabilities through three focused stories:
|
|
32
|
+
* - Interactive: Playground for testing all props and variants
|
|
33
|
+
* - Variants: Systematic showcase of all available typography variants
|
|
34
|
+
* - InContext: Real-world usage examples for business and design teams
|
|
35
|
+
*/
|
|
36
|
+
const meta = {
|
|
37
|
+
title: "Typography/Typography",
|
|
38
|
+
component: Typography,
|
|
39
|
+
parameters: {
|
|
40
|
+
layout: "centered",
|
|
41
|
+
docs: {
|
|
42
|
+
description: {
|
|
43
|
+
component:
|
|
44
|
+
"A comprehensive typography component providing consistent text styling across the application. Built with semantic HTML elements, accessibility features, and flexible styling options using design system tokens.",
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
tags: ["autodocs"],
|
|
49
|
+
argTypes: {
|
|
50
|
+
variant: {
|
|
51
|
+
control: { type: "select" },
|
|
52
|
+
options: [
|
|
53
|
+
"heading",
|
|
54
|
+
"subheading",
|
|
55
|
+
"body",
|
|
56
|
+
"bodyEmphasized",
|
|
57
|
+
"details",
|
|
58
|
+
"field",
|
|
59
|
+
"code",
|
|
60
|
+
"microcopy",
|
|
61
|
+
"tableCell",
|
|
62
|
+
"tableHeader",
|
|
63
|
+
],
|
|
64
|
+
description:
|
|
65
|
+
"Typography variant for semantic styling and visual hierarchy",
|
|
66
|
+
},
|
|
67
|
+
color: {
|
|
68
|
+
control: { type: "select" },
|
|
69
|
+
options: [
|
|
70
|
+
"default",
|
|
71
|
+
"muted",
|
|
72
|
+
"accent",
|
|
73
|
+
"destructive",
|
|
74
|
+
"success",
|
|
75
|
+
"warning",
|
|
76
|
+
],
|
|
77
|
+
description: "Color variant for different semantic meanings",
|
|
78
|
+
},
|
|
79
|
+
align: {
|
|
80
|
+
control: { type: "select" },
|
|
81
|
+
options: ["left", "center", "right", "justify"],
|
|
82
|
+
description: "Text alignment",
|
|
83
|
+
},
|
|
84
|
+
transform: {
|
|
85
|
+
control: { type: "select" },
|
|
86
|
+
options: ["none", "uppercase", "lowercase", "capitalize"],
|
|
87
|
+
description: "Text transformation",
|
|
88
|
+
},
|
|
89
|
+
weight: {
|
|
90
|
+
control: { type: "select" },
|
|
91
|
+
options: ["normal", "medium", "semibold", "bold"],
|
|
92
|
+
description: "Font weight override",
|
|
93
|
+
},
|
|
94
|
+
as: {
|
|
95
|
+
control: { type: "select" },
|
|
96
|
+
options: [
|
|
97
|
+
"p",
|
|
98
|
+
"span",
|
|
99
|
+
"div",
|
|
100
|
+
"h1",
|
|
101
|
+
"h2",
|
|
102
|
+
"h3",
|
|
103
|
+
"h4",
|
|
104
|
+
"h5",
|
|
105
|
+
"h6",
|
|
106
|
+
"code",
|
|
107
|
+
"pre",
|
|
108
|
+
"blockquote",
|
|
109
|
+
],
|
|
110
|
+
description: "HTML element to render as",
|
|
111
|
+
},
|
|
112
|
+
asChild: {
|
|
113
|
+
control: { type: "boolean" },
|
|
114
|
+
description: "Render as Slot for composition",
|
|
115
|
+
},
|
|
116
|
+
italic: {
|
|
117
|
+
control: { type: "boolean" },
|
|
118
|
+
description: "Apply italic styling",
|
|
119
|
+
},
|
|
120
|
+
underline: {
|
|
121
|
+
control: { type: "boolean" },
|
|
122
|
+
description: "Apply underline styling",
|
|
123
|
+
},
|
|
124
|
+
strikethrough: {
|
|
125
|
+
control: { type: "boolean" },
|
|
126
|
+
description: "Apply strikethrough styling",
|
|
127
|
+
},
|
|
128
|
+
truncate: {
|
|
129
|
+
control: { type: "boolean" },
|
|
130
|
+
description: "Apply text truncation with ellipsis",
|
|
131
|
+
},
|
|
132
|
+
srOnly: {
|
|
133
|
+
control: { type: "boolean" },
|
|
134
|
+
description: "Hide visually but keep accessible to screen readers",
|
|
135
|
+
},
|
|
136
|
+
children: {
|
|
137
|
+
control: { type: "text" },
|
|
138
|
+
description: "Text content to render",
|
|
139
|
+
},
|
|
140
|
+
},
|
|
141
|
+
} satisfies Meta<typeof Typography>;
|
|
142
|
+
|
|
143
|
+
export default meta;
|
|
144
|
+
type Story = StoryObj<typeof meta>;
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* Interactive playground for testing all Typography component features.
|
|
148
|
+
* Use controls to experiment with different combinations of props.
|
|
149
|
+
*/
|
|
150
|
+
export const Interactive: Story = {
|
|
151
|
+
args: {
|
|
152
|
+
variant: "body",
|
|
153
|
+
color: "default",
|
|
154
|
+
align: "left",
|
|
155
|
+
transform: null,
|
|
156
|
+
children: "The quick brown fox jumps over the lazy dog.",
|
|
157
|
+
as: "p",
|
|
158
|
+
asChild: false,
|
|
159
|
+
italic: false,
|
|
160
|
+
underline: false,
|
|
161
|
+
strikethrough: false,
|
|
162
|
+
truncate: false,
|
|
163
|
+
srOnly: false,
|
|
164
|
+
},
|
|
165
|
+
};
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* Systematic showcase of all typography variants with consistent content.
|
|
169
|
+
* Demonstrates the visual hierarchy and size relationships between variants.
|
|
170
|
+
*/
|
|
171
|
+
export const Variants: Story = {
|
|
172
|
+
render: () => (
|
|
173
|
+
<div className="space-y-4 max-w-4xl">
|
|
174
|
+
<div className="space-y-2">
|
|
175
|
+
<Typography variant="microcopy" color="muted" as="span">
|
|
176
|
+
Typography Variants
|
|
177
|
+
</Typography>
|
|
178
|
+
<div className="grid gap-4">
|
|
179
|
+
<div className="space-y-1">
|
|
180
|
+
<Typography variant="heading" as="h1">
|
|
181
|
+
Heading (20px) - Main page and section titles
|
|
182
|
+
</Typography>
|
|
183
|
+
<Typography variant="details" color="muted">
|
|
184
|
+
text-lg font-semibold leading-tight
|
|
185
|
+
</Typography>
|
|
186
|
+
</div>
|
|
187
|
+
|
|
188
|
+
<div className="space-y-1">
|
|
189
|
+
<Typography variant="subheading" as="h2">
|
|
190
|
+
Sub Heading (17px) - Secondary headings for subsections
|
|
191
|
+
</Typography>
|
|
192
|
+
<Typography variant="details" color="muted">
|
|
193
|
+
text-base font-medium leading-relaxed
|
|
194
|
+
</Typography>
|
|
195
|
+
</div>
|
|
196
|
+
|
|
197
|
+
<div className="space-y-1">
|
|
198
|
+
<Typography variant="body">
|
|
199
|
+
Body (14px) - Standard body text for content and paragraphs. This
|
|
200
|
+
is the default variant for most content.
|
|
201
|
+
</Typography>
|
|
202
|
+
<Typography variant="details" color="muted">
|
|
203
|
+
text-sm leading-relaxed
|
|
204
|
+
</Typography>
|
|
205
|
+
</div>
|
|
206
|
+
|
|
207
|
+
<div className="space-y-1">
|
|
208
|
+
<Typography variant="bodyEmphasized">
|
|
209
|
+
Body Emphasized (14px) - Emphasized body text with medium weight
|
|
210
|
+
for important content.
|
|
211
|
+
</Typography>
|
|
212
|
+
<Typography variant="details" color="muted">
|
|
213
|
+
text-sm font-medium leading-relaxed
|
|
214
|
+
</Typography>
|
|
215
|
+
</div>
|
|
216
|
+
|
|
217
|
+
<div className="space-y-1">
|
|
218
|
+
<Typography variant="details">
|
|
219
|
+
Details (12px) - Smaller text for details, descriptions, and
|
|
220
|
+
secondary information.
|
|
221
|
+
</Typography>
|
|
222
|
+
<Typography variant="details" color="muted">
|
|
223
|
+
text-xs leading-normal
|
|
224
|
+
</Typography>
|
|
225
|
+
</div>
|
|
226
|
+
|
|
227
|
+
<div className="space-y-1">
|
|
228
|
+
<Typography variant="field" as="label">
|
|
229
|
+
Field Label (17px) - Text for form fields and input labels
|
|
230
|
+
</Typography>
|
|
231
|
+
<Typography variant="details" color="muted">
|
|
232
|
+
text-base leading-normal
|
|
233
|
+
</Typography>
|
|
234
|
+
</div>
|
|
235
|
+
|
|
236
|
+
<div className="space-y-1">
|
|
237
|
+
<Typography variant="code" as="code">
|
|
238
|
+
const codeExample = "Code text (17px) for snippets and
|
|
239
|
+
technical content";
|
|
240
|
+
</Typography>
|
|
241
|
+
<Typography variant="details" color="muted">
|
|
242
|
+
text-base font-mono leading-normal
|
|
243
|
+
</Typography>
|
|
244
|
+
</div>
|
|
245
|
+
|
|
246
|
+
<div className="space-y-1">
|
|
247
|
+
<Typography variant="microcopy">
|
|
248
|
+
Microcopy (10px) - Very small text for captions and fine print
|
|
249
|
+
</Typography>
|
|
250
|
+
<Typography variant="details" color="muted">
|
|
251
|
+
text-microcopy leading-tight
|
|
252
|
+
</Typography>
|
|
253
|
+
</div>
|
|
254
|
+
|
|
255
|
+
<div className="space-y-1">
|
|
256
|
+
<Typography variant="tableCell">
|
|
257
|
+
Table Cell (17px) - Content for table cells and data display
|
|
258
|
+
</Typography>
|
|
259
|
+
<Typography variant="details" color="muted">
|
|
260
|
+
text-base leading-normal
|
|
261
|
+
</Typography>
|
|
262
|
+
</div>
|
|
263
|
+
|
|
264
|
+
<div className="space-y-1">
|
|
265
|
+
<Typography variant="tableHeader" as="th">
|
|
266
|
+
Table Header (17px) - Headers for table columns with emphasis
|
|
267
|
+
</Typography>
|
|
268
|
+
<Typography variant="details" color="muted">
|
|
269
|
+
text-base font-medium leading-normal
|
|
270
|
+
</Typography>
|
|
271
|
+
</div>
|
|
272
|
+
</div>
|
|
273
|
+
</div>
|
|
274
|
+
</div>
|
|
275
|
+
),
|
|
276
|
+
};
|
|
277
|
+
|
|
278
|
+
/**
|
|
279
|
+
* Real-world usage examples demonstrating Typography in practical scenarios.
|
|
280
|
+
* Shows how to combine variants with semantic HTML and accessibility features.
|
|
281
|
+
*/
|
|
282
|
+
export const InContext: Story = {
|
|
283
|
+
render: () => (
|
|
284
|
+
<div className="space-y-8 max-w-4xl">
|
|
285
|
+
{/* Article Layout */}
|
|
286
|
+
<article className="space-y-4">
|
|
287
|
+
<Typography variant="heading" as="h1">
|
|
288
|
+
Building Better Typography Systems
|
|
289
|
+
</Typography>
|
|
290
|
+
<Typography variant="subheading" as="h2" color="muted">
|
|
291
|
+
A comprehensive guide to design system typography
|
|
292
|
+
</Typography>
|
|
293
|
+
<Typography variant="body">
|
|
294
|
+
Typography is one of the most critical aspects of any design system.
|
|
295
|
+
It provides visual hierarchy, improves readability, and helps users
|
|
296
|
+
navigate content effectively. A well-designed typography system
|
|
297
|
+
ensures consistency across all touchpoints while maintaining
|
|
298
|
+
flexibility for different use cases.
|
|
299
|
+
</Typography>
|
|
300
|
+
<Typography variant="bodyEmphasized">
|
|
301
|
+
Key principles include establishing clear hierarchy, ensuring
|
|
302
|
+
accessibility, and maintaining consistency across all platforms and
|
|
303
|
+
devices.
|
|
304
|
+
</Typography>
|
|
305
|
+
<Typography variant="details" color="muted">
|
|
306
|
+
Published on March 15, 2024 • 5 min read
|
|
307
|
+
</Typography>
|
|
308
|
+
</article>
|
|
309
|
+
|
|
310
|
+
{/* Form Example */}
|
|
311
|
+
<Card>
|
|
312
|
+
<CardHeader>
|
|
313
|
+
<CardTitle>Contact Information</CardTitle>
|
|
314
|
+
<CardDescription>
|
|
315
|
+
Example form using Typography components for labels and help text
|
|
316
|
+
</CardDescription>
|
|
317
|
+
</CardHeader>
|
|
318
|
+
<CardContent>
|
|
319
|
+
<div className="space-y-3">
|
|
320
|
+
<div className="space-y-1">
|
|
321
|
+
<Typography variant="field" as="label" htmlFor="email">
|
|
322
|
+
Email Address
|
|
323
|
+
</Typography>
|
|
324
|
+
<input
|
|
325
|
+
id="email"
|
|
326
|
+
type="email"
|
|
327
|
+
className="w-full px-3 py-2 border rounded-md"
|
|
328
|
+
placeholder="Enter your email"
|
|
329
|
+
/>
|
|
330
|
+
<Typography variant="details" color="muted">
|
|
331
|
+
We'll never share your email with third parties
|
|
332
|
+
</Typography>
|
|
333
|
+
</div>
|
|
334
|
+
</div>
|
|
335
|
+
</CardContent>
|
|
336
|
+
</Card>
|
|
337
|
+
|
|
338
|
+
{/* Data Table */}
|
|
339
|
+
<div className="space-y-4">
|
|
340
|
+
<Typography variant="subheading" as="h3">
|
|
341
|
+
Project Status
|
|
342
|
+
</Typography>
|
|
343
|
+
<table className="w-full border-collapse border border-border">
|
|
344
|
+
<thead>
|
|
345
|
+
<tr className="bg-muted/50">
|
|
346
|
+
<Typography
|
|
347
|
+
variant="tableHeader"
|
|
348
|
+
as="th"
|
|
349
|
+
className="border border-border px-4 py-2 text-left"
|
|
350
|
+
>
|
|
351
|
+
Project Name
|
|
352
|
+
</Typography>
|
|
353
|
+
<Typography
|
|
354
|
+
variant="tableHeader"
|
|
355
|
+
as="th"
|
|
356
|
+
className="border border-border px-4 py-2 text-left"
|
|
357
|
+
>
|
|
358
|
+
Status
|
|
359
|
+
</Typography>
|
|
360
|
+
<Typography
|
|
361
|
+
variant="tableHeader"
|
|
362
|
+
as="th"
|
|
363
|
+
className="border border-border px-4 py-2 text-left"
|
|
364
|
+
>
|
|
365
|
+
Due Date
|
|
366
|
+
</Typography>
|
|
367
|
+
</tr>
|
|
368
|
+
</thead>
|
|
369
|
+
<tbody>
|
|
370
|
+
<tr>
|
|
371
|
+
<Typography
|
|
372
|
+
variant="tableCell"
|
|
373
|
+
as="td"
|
|
374
|
+
className="border border-border px-4 py-2"
|
|
375
|
+
>
|
|
376
|
+
Design System v2.0
|
|
377
|
+
</Typography>
|
|
378
|
+
<Typography
|
|
379
|
+
variant="tableCell"
|
|
380
|
+
as="td"
|
|
381
|
+
className="border border-border px-4 py-2"
|
|
382
|
+
color="success"
|
|
383
|
+
>
|
|
384
|
+
Complete
|
|
385
|
+
</Typography>
|
|
386
|
+
<Typography
|
|
387
|
+
variant="tableCell"
|
|
388
|
+
as="td"
|
|
389
|
+
className="border border-border px-4 py-2"
|
|
390
|
+
>
|
|
391
|
+
March 1, 2024
|
|
392
|
+
</Typography>
|
|
393
|
+
</tr>
|
|
394
|
+
<tr>
|
|
395
|
+
<Typography
|
|
396
|
+
variant="tableCell"
|
|
397
|
+
as="td"
|
|
398
|
+
className="border border-border px-4 py-2"
|
|
399
|
+
>
|
|
400
|
+
Mobile App Redesign
|
|
401
|
+
</Typography>
|
|
402
|
+
<Typography
|
|
403
|
+
variant="tableCell"
|
|
404
|
+
as="td"
|
|
405
|
+
className="border border-border px-4 py-2"
|
|
406
|
+
color="warning"
|
|
407
|
+
>
|
|
408
|
+
In Progress
|
|
409
|
+
</Typography>
|
|
410
|
+
<Typography
|
|
411
|
+
variant="tableCell"
|
|
412
|
+
as="td"
|
|
413
|
+
className="border border-border px-4 py-2"
|
|
414
|
+
>
|
|
415
|
+
April 15, 2024
|
|
416
|
+
</Typography>
|
|
417
|
+
</tr>
|
|
418
|
+
</tbody>
|
|
419
|
+
</table>
|
|
420
|
+
</div>
|
|
421
|
+
|
|
422
|
+
{/* Code Block */}
|
|
423
|
+
<Card>
|
|
424
|
+
<CardHeader>
|
|
425
|
+
<CardTitle>Code Example</CardTitle>
|
|
426
|
+
<CardDescription>
|
|
427
|
+
Example showing semantic HTML with Typography variants
|
|
428
|
+
</CardDescription>
|
|
429
|
+
</CardHeader>
|
|
430
|
+
<CardContent>
|
|
431
|
+
<Typography
|
|
432
|
+
variant="code"
|
|
433
|
+
as="pre"
|
|
434
|
+
className="bg-muted p-4 rounded-md overflow-x-auto"
|
|
435
|
+
>
|
|
436
|
+
{`// Typography component usage
|
|
437
|
+
<Typography variant="heading" as="h1">
|
|
438
|
+
Page Title
|
|
439
|
+
</Typography>
|
|
440
|
+
|
|
441
|
+
<Typography variant="body" color="muted">
|
|
442
|
+
Supporting text content
|
|
443
|
+
</Typography>`}
|
|
444
|
+
</Typography>
|
|
445
|
+
</CardContent>
|
|
446
|
+
</Card>
|
|
447
|
+
|
|
448
|
+
{/* Accessibility Features */}
|
|
449
|
+
<Card>
|
|
450
|
+
<CardHeader>
|
|
451
|
+
<CardTitle>Accessibility Features</CardTitle>
|
|
452
|
+
<CardDescription>
|
|
453
|
+
Demonstrating accessibility features of the Typography component
|
|
454
|
+
</CardDescription>
|
|
455
|
+
</CardHeader>
|
|
456
|
+
<CardContent className="space-y-4">
|
|
457
|
+
<ul className="space-y-2">
|
|
458
|
+
<li>
|
|
459
|
+
<Typography variant="body">
|
|
460
|
+
• Semantic HTML elements for proper document structure
|
|
461
|
+
</Typography>
|
|
462
|
+
</li>
|
|
463
|
+
<li>
|
|
464
|
+
<Typography variant="body">
|
|
465
|
+
• Color contrast ratios meeting WCAG 2.1 AA standards
|
|
466
|
+
</Typography>
|
|
467
|
+
</li>
|
|
468
|
+
<li>
|
|
469
|
+
<Typography variant="body">
|
|
470
|
+
• Screen reader support with proper labeling
|
|
471
|
+
</Typography>
|
|
472
|
+
</li>
|
|
473
|
+
</ul>
|
|
474
|
+
<Typography variant="details" srOnly>
|
|
475
|
+
This text is hidden visually but available to screen readers
|
|
476
|
+
</Typography>
|
|
477
|
+
<Typography variant="details" color="muted">
|
|
478
|
+
Note: The line above contains screen reader only content
|
|
479
|
+
</Typography>
|
|
480
|
+
</CardContent>
|
|
481
|
+
</Card>
|
|
482
|
+
|
|
483
|
+
{/* Color Variants */}
|
|
484
|
+
<div className="space-y-4">
|
|
485
|
+
<Typography variant="subheading" as="h3">
|
|
486
|
+
Color Variants
|
|
487
|
+
</Typography>
|
|
488
|
+
<div className="grid grid-cols-1 md:grid-cols-2 gap-4">
|
|
489
|
+
<Typography variant="body" color="default">
|
|
490
|
+
Default color for standard content
|
|
491
|
+
</Typography>
|
|
492
|
+
<Typography variant="body" color="muted">
|
|
493
|
+
Muted color for secondary information
|
|
494
|
+
</Typography>
|
|
495
|
+
<Typography variant="body" color="accent">
|
|
496
|
+
Accent color for emphasis
|
|
497
|
+
</Typography>
|
|
498
|
+
<Typography variant="body" color="destructive">
|
|
499
|
+
Destructive color for errors and warnings
|
|
500
|
+
</Typography>
|
|
501
|
+
<Typography variant="body" color="success">
|
|
502
|
+
Success color for positive states
|
|
503
|
+
</Typography>
|
|
504
|
+
<Typography variant="body" color="warning">
|
|
505
|
+
Warning color for caution states
|
|
506
|
+
</Typography>
|
|
507
|
+
</div>
|
|
508
|
+
</div>
|
|
509
|
+
|
|
510
|
+
{/* Text Styling Options */}
|
|
511
|
+
<div className="space-y-4">
|
|
512
|
+
<Typography variant="subheading" as="h3">
|
|
513
|
+
Text Styling Options
|
|
514
|
+
</Typography>
|
|
515
|
+
<div className="space-y-2">
|
|
516
|
+
<Typography variant="body" italic>
|
|
517
|
+
Italic text for emphasis and quotes
|
|
518
|
+
</Typography>
|
|
519
|
+
<Typography variant="body" underline>
|
|
520
|
+
Underlined text for links and emphasis
|
|
521
|
+
</Typography>
|
|
522
|
+
<Typography variant="body" strikethrough>
|
|
523
|
+
Strikethrough text for corrections and deletions
|
|
524
|
+
</Typography>
|
|
525
|
+
<Typography variant="body" transform="uppercase">
|
|
526
|
+
Uppercase text for labels and headings
|
|
527
|
+
</Typography>
|
|
528
|
+
<Typography variant="body" weight="bold">
|
|
529
|
+
Bold text for strong emphasis
|
|
530
|
+
</Typography>
|
|
531
|
+
<div className="max-w-xs">
|
|
532
|
+
<Typography variant="body" truncate>
|
|
533
|
+
This is a very long text that will be truncated with ellipsis when
|
|
534
|
+
it exceeds the container width
|
|
535
|
+
</Typography>
|
|
536
|
+
</div>
|
|
537
|
+
</div>
|
|
538
|
+
</div>
|
|
539
|
+
</div>
|
|
540
|
+
),
|
|
541
|
+
};
|
|
542
|
+
|
|
543
|
+
/**
|
|
544
|
+
* Showcase of individual semantic typography components for better TypeScript support.
|
|
545
|
+
* Demonstrates the recommended approach using semantic components vs generic Typography.
|
|
546
|
+
*/
|
|
547
|
+
export const SemanticComponents: Story = {
|
|
548
|
+
render: () => (
|
|
549
|
+
<div className="space-y-8 max-w-4xl">
|
|
550
|
+
<div className="space-y-2">
|
|
551
|
+
<Typography variant="microcopy" color="muted" as="span">
|
|
552
|
+
Semantic Typography Components
|
|
553
|
+
</Typography>
|
|
554
|
+
<Typography variant="body" color="muted">
|
|
555
|
+
Individual semantic components provide better TypeScript support and
|
|
556
|
+
developer experience.
|
|
557
|
+
</Typography>
|
|
558
|
+
</div>
|
|
559
|
+
|
|
560
|
+
{/* Headings */}
|
|
561
|
+
<div className="space-y-4">
|
|
562
|
+
<Typography variant="subheading" as="h3">
|
|
563
|
+
Heading Components
|
|
564
|
+
</Typography>
|
|
565
|
+
<div className="space-y-3 pl-4 border-l-2 border-border">
|
|
566
|
+
<H1>H1 - Main page title (20px)</H1>
|
|
567
|
+
<H2>H2 - Section heading (17px)</H2>
|
|
568
|
+
<H3>H3 - Subsection heading (17px)</H3>
|
|
569
|
+
<H4>H4 - Minor heading (14px emphasized)</H4>
|
|
570
|
+
<H5>H5 - Small heading (14px emphasized)</H5>
|
|
571
|
+
<H6>H6 - Smallest heading (12px)</H6>
|
|
572
|
+
</div>
|
|
573
|
+
</div>
|
|
574
|
+
|
|
575
|
+
{/* Text Components */}
|
|
576
|
+
<div className="space-y-4">
|
|
577
|
+
<Typography variant="subheading" as="h3">
|
|
578
|
+
Text Components
|
|
579
|
+
</Typography>
|
|
580
|
+
<div className="space-y-3 pl-4 border-l-2 border-border">
|
|
581
|
+
<P>P - Standard paragraph text for body content and descriptions.</P>
|
|
582
|
+
<P>
|
|
583
|
+
Inline text with{" "}
|
|
584
|
+
<Span color="accent">highlighted span content</Span> and
|
|
585
|
+
<Strong> emphasized strong text</Strong> for better readability.
|
|
586
|
+
</P>
|
|
587
|
+
<Lead>
|
|
588
|
+
Lead - Introductory text that stands out from regular paragraphs.
|
|
589
|
+
</Lead>
|
|
590
|
+
<Small>Small - Fine print and microcopy text (10px)</Small>
|
|
591
|
+
</div>
|
|
592
|
+
</div>
|
|
593
|
+
|
|
594
|
+
{/* Code and Technical */}
|
|
595
|
+
<div className="space-y-4">
|
|
596
|
+
<Typography variant="subheading" as="h3">
|
|
597
|
+
Code and Technical
|
|
598
|
+
</Typography>
|
|
599
|
+
<div className="space-y-3 pl-4 border-l-2 border-border">
|
|
600
|
+
<P>
|
|
601
|
+
Use the <Code>useState</Code> hook to manage component state.
|
|
602
|
+
</P>
|
|
603
|
+
<Code>const [count, setCount] = useState(0);</Code>
|
|
604
|
+
</div>
|
|
605
|
+
</div>
|
|
606
|
+
|
|
607
|
+
{/* Form Elements */}
|
|
608
|
+
<div className="space-y-4">
|
|
609
|
+
<Typography variant="subheading" as="h3">
|
|
610
|
+
Form Elements
|
|
611
|
+
</Typography>
|
|
612
|
+
<div className="space-y-3 pl-4 border-l-2 border-border">
|
|
613
|
+
<div className="space-y-1">
|
|
614
|
+
<Label htmlFor="example-input">Email Address</Label>
|
|
615
|
+
<input
|
|
616
|
+
id="example-input"
|
|
617
|
+
type="email"
|
|
618
|
+
className="w-full px-3 py-2 border rounded-md"
|
|
619
|
+
placeholder="Enter your email"
|
|
620
|
+
/>
|
|
621
|
+
<Small color="muted">
|
|
622
|
+
We'll never share your email with third parties
|
|
623
|
+
</Small>
|
|
624
|
+
</div>
|
|
625
|
+
</div>
|
|
626
|
+
</div>
|
|
627
|
+
|
|
628
|
+
{/* Links and Navigation */}
|
|
629
|
+
<div className="space-y-4">
|
|
630
|
+
<Typography variant="subheading" as="h3">
|
|
631
|
+
Links and Navigation
|
|
632
|
+
</Typography>
|
|
633
|
+
<div className="space-y-3 pl-4 border-l-2 border-border">
|
|
634
|
+
<P>
|
|
635
|
+
Standard link with href:{" "}
|
|
636
|
+
<A href="https://example.com">External link</A>
|
|
637
|
+
</P>
|
|
638
|
+
<P>
|
|
639
|
+
Link with custom styling:{" "}
|
|
640
|
+
<A href="/about" color="accent">
|
|
641
|
+
Internal link
|
|
642
|
+
</A>
|
|
643
|
+
</P>
|
|
644
|
+
<P>
|
|
645
|
+
Composition pattern:{" "}
|
|
646
|
+
<A asChild>
|
|
647
|
+
<span role="button" tabIndex={0}>
|
|
648
|
+
Custom component
|
|
649
|
+
</span>
|
|
650
|
+
</A>
|
|
651
|
+
</P>
|
|
652
|
+
</div>
|
|
653
|
+
</div>
|
|
654
|
+
|
|
655
|
+
{/* Quoted Content */}
|
|
656
|
+
<div className="space-y-4">
|
|
657
|
+
<Typography variant="subheading" as="h3">
|
|
658
|
+
Quoted Content
|
|
659
|
+
</Typography>
|
|
660
|
+
<div className="pl-4 border-l-2 border-border">
|
|
661
|
+
<Blockquote>
|
|
662
|
+
"The best way to predict the future is to invent it." -
|
|
663
|
+
Alan Kay
|
|
664
|
+
</Blockquote>
|
|
665
|
+
</div>
|
|
666
|
+
</div>
|
|
667
|
+
|
|
668
|
+
{/* Comparison Table */}
|
|
669
|
+
<div className="space-y-4">
|
|
670
|
+
<Typography variant="subheading" as="h3">
|
|
671
|
+
Generic vs Semantic Approach
|
|
672
|
+
</Typography>
|
|
673
|
+
<div className="overflow-x-auto">
|
|
674
|
+
<table className="w-full border-collapse border border-border">
|
|
675
|
+
<thead>
|
|
676
|
+
<tr className="bg-muted/50">
|
|
677
|
+
<Typography
|
|
678
|
+
variant="tableHeader"
|
|
679
|
+
as="th"
|
|
680
|
+
className="border border-border px-4 py-2 text-left"
|
|
681
|
+
>
|
|
682
|
+
Approach
|
|
683
|
+
</Typography>
|
|
684
|
+
<Typography
|
|
685
|
+
variant="tableHeader"
|
|
686
|
+
as="th"
|
|
687
|
+
className="border border-border px-4 py-2 text-left"
|
|
688
|
+
>
|
|
689
|
+
Code Example
|
|
690
|
+
</Typography>
|
|
691
|
+
<Typography
|
|
692
|
+
variant="tableHeader"
|
|
693
|
+
as="th"
|
|
694
|
+
className="border border-border px-4 py-2 text-left"
|
|
695
|
+
>
|
|
696
|
+
Benefits
|
|
697
|
+
</Typography>
|
|
698
|
+
</tr>
|
|
699
|
+
</thead>
|
|
700
|
+
<tbody>
|
|
701
|
+
<tr>
|
|
702
|
+
<Typography
|
|
703
|
+
variant="tableCell"
|
|
704
|
+
as="td"
|
|
705
|
+
className="border border-border px-4 py-2"
|
|
706
|
+
>
|
|
707
|
+
Generic
|
|
708
|
+
</Typography>
|
|
709
|
+
<Typography
|
|
710
|
+
variant="tableCell"
|
|
711
|
+
as="td"
|
|
712
|
+
className="border border-border px-4 py-2"
|
|
713
|
+
>
|
|
714
|
+
<Code>
|
|
715
|
+
<Typography variant="heading"
|
|
716
|
+
as="h1">
|
|
717
|
+
</Code>
|
|
718
|
+
</Typography>
|
|
719
|
+
<Typography
|
|
720
|
+
variant="tableCell"
|
|
721
|
+
as="td"
|
|
722
|
+
className="border border-border px-4 py-2"
|
|
723
|
+
>
|
|
724
|
+
Full control over variant and element
|
|
725
|
+
</Typography>
|
|
726
|
+
</tr>
|
|
727
|
+
<tr>
|
|
728
|
+
<Typography
|
|
729
|
+
variant="tableCell"
|
|
730
|
+
as="td"
|
|
731
|
+
className="border border-border px-4 py-2"
|
|
732
|
+
>
|
|
733
|
+
Semantic
|
|
734
|
+
</Typography>
|
|
735
|
+
<Typography
|
|
736
|
+
variant="tableCell"
|
|
737
|
+
as="td"
|
|
738
|
+
className="border border-border px-4 py-2"
|
|
739
|
+
>
|
|
740
|
+
<Code><H1></Code>
|
|
741
|
+
</Typography>
|
|
742
|
+
<Typography
|
|
743
|
+
variant="tableCell"
|
|
744
|
+
as="td"
|
|
745
|
+
className="border border-border px-4 py-2"
|
|
746
|
+
>
|
|
747
|
+
Better TypeScript, shorter syntax, semantic clarity
|
|
748
|
+
</Typography>
|
|
749
|
+
</tr>
|
|
750
|
+
</tbody>
|
|
751
|
+
</table>
|
|
752
|
+
</div>
|
|
753
|
+
</div>
|
|
754
|
+
|
|
755
|
+
{/* Usage Recommendations */}
|
|
756
|
+
<Card>
|
|
757
|
+
<CardHeader>
|
|
758
|
+
<CardTitle>Usage Recommendations</CardTitle>
|
|
759
|
+
<CardDescription>
|
|
760
|
+
Best practices for using Typography components in your application
|
|
761
|
+
</CardDescription>
|
|
762
|
+
</CardHeader>
|
|
763
|
+
<CardContent>
|
|
764
|
+
<ul className="space-y-2">
|
|
765
|
+
<li>
|
|
766
|
+
<Strong>✅ Recommended:</Strong>{" "}
|
|
767
|
+
<P className="inline">
|
|
768
|
+
Use semantic components (H1, P, etc.) for better developer
|
|
769
|
+
experience and TypeScript support.
|
|
770
|
+
</P>
|
|
771
|
+
</li>
|
|
772
|
+
<li>
|
|
773
|
+
<Strong>⚠️ When to use generic:</Strong>{" "}
|
|
774
|
+
<P className="inline">
|
|
775
|
+
Use Typography component when you need custom variant/element
|
|
776
|
+
combinations not covered by semantic components.
|
|
777
|
+
</P>
|
|
778
|
+
</li>
|
|
779
|
+
<li>
|
|
780
|
+
<Strong>🎯 Best practice:</Strong>{" "}
|
|
781
|
+
<P className="inline">
|
|
782
|
+
Semantic components provide pre-configured defaults that match
|
|
783
|
+
design system specifications.
|
|
784
|
+
</P>
|
|
785
|
+
</li>
|
|
786
|
+
</ul>
|
|
787
|
+
</CardContent>
|
|
788
|
+
</Card>
|
|
789
|
+
</div>
|
|
790
|
+
),
|
|
791
|
+
parameters: {
|
|
792
|
+
docs: {
|
|
793
|
+
description: {
|
|
794
|
+
story:
|
|
795
|
+
"Showcase of individual semantic typography components that provide better TypeScript support and developer experience. Compare semantic components (H1, P, etc.) with the generic Typography approach.",
|
|
796
|
+
},
|
|
797
|
+
},
|
|
798
|
+
},
|
|
799
|
+
};
|
|
800
|
+
|
|
801
|
+
/**
|
|
802
|
+
* Complete reference table of all semantic typography components with their defaults and usage.
|
|
803
|
+
* Provides a comprehensive overview for developers to quickly understand each component.
|
|
804
|
+
*/
|
|
805
|
+
export const ComponentReference: Story = {
|
|
806
|
+
render: () => (
|
|
807
|
+
<div className="space-y-6 max-w-6xl">
|
|
808
|
+
<div className="space-y-2">
|
|
809
|
+
<Typography variant="heading" as="h2">
|
|
810
|
+
Semantic Typography Components Reference
|
|
811
|
+
</Typography>
|
|
812
|
+
<Typography variant="body" color="muted">
|
|
813
|
+
Complete reference of all individual semantic components with their
|
|
814
|
+
default variants, HTML elements, and use cases.
|
|
815
|
+
</Typography>
|
|
816
|
+
</div>
|
|
817
|
+
|
|
818
|
+
<Card>
|
|
819
|
+
<CardHeader>
|
|
820
|
+
<CardTitle>Component Reference Table</CardTitle>
|
|
821
|
+
<CardDescription>
|
|
822
|
+
All semantic typography components with their configurations and
|
|
823
|
+
recommended usage
|
|
824
|
+
</CardDescription>
|
|
825
|
+
</CardHeader>
|
|
826
|
+
<CardContent>
|
|
827
|
+
<div className="overflow-x-auto">
|
|
828
|
+
<table className="w-full border-collapse border border-border">
|
|
829
|
+
<thead>
|
|
830
|
+
<tr className="bg-muted/50">
|
|
831
|
+
<Typography
|
|
832
|
+
variant="tableHeader"
|
|
833
|
+
as="th"
|
|
834
|
+
className="border border-border px-4 py-2 text-left"
|
|
835
|
+
>
|
|
836
|
+
Component
|
|
837
|
+
</Typography>
|
|
838
|
+
<Typography
|
|
839
|
+
variant="tableHeader"
|
|
840
|
+
as="th"
|
|
841
|
+
className="border border-border px-4 py-2 text-left"
|
|
842
|
+
>
|
|
843
|
+
HTML Element
|
|
844
|
+
</Typography>
|
|
845
|
+
<Typography
|
|
846
|
+
variant="tableHeader"
|
|
847
|
+
as="th"
|
|
848
|
+
className="border border-border px-4 py-2 text-left"
|
|
849
|
+
>
|
|
850
|
+
Default Variant
|
|
851
|
+
</Typography>
|
|
852
|
+
<Typography
|
|
853
|
+
variant="tableHeader"
|
|
854
|
+
as="th"
|
|
855
|
+
className="border border-border px-4 py-2 text-left"
|
|
856
|
+
>
|
|
857
|
+
Font Size
|
|
858
|
+
</Typography>
|
|
859
|
+
<Typography
|
|
860
|
+
variant="tableHeader"
|
|
861
|
+
as="th"
|
|
862
|
+
className="border border-border px-4 py-2 text-left"
|
|
863
|
+
>
|
|
864
|
+
Use Case
|
|
865
|
+
</Typography>
|
|
866
|
+
<Typography
|
|
867
|
+
variant="tableHeader"
|
|
868
|
+
as="th"
|
|
869
|
+
className="border border-border px-4 py-2 text-left"
|
|
870
|
+
>
|
|
871
|
+
Example
|
|
872
|
+
</Typography>
|
|
873
|
+
</tr>
|
|
874
|
+
</thead>
|
|
875
|
+
<tbody>
|
|
876
|
+
<tr>
|
|
877
|
+
<Typography
|
|
878
|
+
variant="tableCell"
|
|
879
|
+
as="td"
|
|
880
|
+
className="border border-border px-4 py-2"
|
|
881
|
+
>
|
|
882
|
+
<Code>H1</Code>
|
|
883
|
+
</Typography>
|
|
884
|
+
<Typography
|
|
885
|
+
variant="tableCell"
|
|
886
|
+
as="td"
|
|
887
|
+
className="border border-border px-4 py-2"
|
|
888
|
+
>
|
|
889
|
+
h1
|
|
890
|
+
</Typography>
|
|
891
|
+
<Typography
|
|
892
|
+
variant="tableCell"
|
|
893
|
+
as="td"
|
|
894
|
+
className="border border-border px-4 py-2"
|
|
895
|
+
>
|
|
896
|
+
heading
|
|
897
|
+
</Typography>
|
|
898
|
+
<Typography
|
|
899
|
+
variant="tableCell"
|
|
900
|
+
as="td"
|
|
901
|
+
className="border border-border px-4 py-2"
|
|
902
|
+
>
|
|
903
|
+
20px
|
|
904
|
+
</Typography>
|
|
905
|
+
<Typography
|
|
906
|
+
variant="tableCell"
|
|
907
|
+
as="td"
|
|
908
|
+
className="border border-border px-4 py-2"
|
|
909
|
+
>
|
|
910
|
+
Main page titles
|
|
911
|
+
</Typography>
|
|
912
|
+
<Typography
|
|
913
|
+
variant="tableCell"
|
|
914
|
+
as="td"
|
|
915
|
+
className="border border-border px-4 py-2"
|
|
916
|
+
>
|
|
917
|
+
<H1 className="text-sm">Page Title</H1>
|
|
918
|
+
</Typography>
|
|
919
|
+
</tr>
|
|
920
|
+
<tr>
|
|
921
|
+
<Typography
|
|
922
|
+
variant="tableCell"
|
|
923
|
+
as="td"
|
|
924
|
+
className="border border-border px-4 py-2"
|
|
925
|
+
>
|
|
926
|
+
<Code>H2</Code>
|
|
927
|
+
</Typography>
|
|
928
|
+
<Typography
|
|
929
|
+
variant="tableCell"
|
|
930
|
+
as="td"
|
|
931
|
+
className="border border-border px-4 py-2"
|
|
932
|
+
>
|
|
933
|
+
h2
|
|
934
|
+
</Typography>
|
|
935
|
+
<Typography
|
|
936
|
+
variant="tableCell"
|
|
937
|
+
as="td"
|
|
938
|
+
className="border border-border px-4 py-2"
|
|
939
|
+
>
|
|
940
|
+
subheading
|
|
941
|
+
</Typography>
|
|
942
|
+
<Typography
|
|
943
|
+
variant="tableCell"
|
|
944
|
+
as="td"
|
|
945
|
+
className="border border-border px-4 py-2"
|
|
946
|
+
>
|
|
947
|
+
17px
|
|
948
|
+
</Typography>
|
|
949
|
+
<Typography
|
|
950
|
+
variant="tableCell"
|
|
951
|
+
as="td"
|
|
952
|
+
className="border border-border px-4 py-2"
|
|
953
|
+
>
|
|
954
|
+
Section headings
|
|
955
|
+
</Typography>
|
|
956
|
+
<Typography
|
|
957
|
+
variant="tableCell"
|
|
958
|
+
as="td"
|
|
959
|
+
className="border border-border px-4 py-2"
|
|
960
|
+
>
|
|
961
|
+
<H2 className="text-sm">Section Title</H2>
|
|
962
|
+
</Typography>
|
|
963
|
+
</tr>
|
|
964
|
+
<tr>
|
|
965
|
+
<Typography
|
|
966
|
+
variant="tableCell"
|
|
967
|
+
as="td"
|
|
968
|
+
className="border border-border px-4 py-2"
|
|
969
|
+
>
|
|
970
|
+
<Code>H3</Code>
|
|
971
|
+
</Typography>
|
|
972
|
+
<Typography
|
|
973
|
+
variant="tableCell"
|
|
974
|
+
as="td"
|
|
975
|
+
className="border border-border px-4 py-2"
|
|
976
|
+
>
|
|
977
|
+
h3
|
|
978
|
+
</Typography>
|
|
979
|
+
<Typography
|
|
980
|
+
variant="tableCell"
|
|
981
|
+
as="td"
|
|
982
|
+
className="border border-border px-4 py-2"
|
|
983
|
+
>
|
|
984
|
+
subheading
|
|
985
|
+
</Typography>
|
|
986
|
+
<Typography
|
|
987
|
+
variant="tableCell"
|
|
988
|
+
as="td"
|
|
989
|
+
className="border border-border px-4 py-2"
|
|
990
|
+
>
|
|
991
|
+
17px
|
|
992
|
+
</Typography>
|
|
993
|
+
<Typography
|
|
994
|
+
variant="tableCell"
|
|
995
|
+
as="td"
|
|
996
|
+
className="border border-border px-4 py-2"
|
|
997
|
+
>
|
|
998
|
+
Subsection headings
|
|
999
|
+
</Typography>
|
|
1000
|
+
<Typography
|
|
1001
|
+
variant="tableCell"
|
|
1002
|
+
as="td"
|
|
1003
|
+
className="border border-border px-4 py-2"
|
|
1004
|
+
>
|
|
1005
|
+
<H3 className="text-sm">Subsection</H3>
|
|
1006
|
+
</Typography>
|
|
1007
|
+
</tr>
|
|
1008
|
+
<tr>
|
|
1009
|
+
<Typography
|
|
1010
|
+
variant="tableCell"
|
|
1011
|
+
as="td"
|
|
1012
|
+
className="border border-border px-4 py-2"
|
|
1013
|
+
>
|
|
1014
|
+
<Code>H4</Code>
|
|
1015
|
+
</Typography>
|
|
1016
|
+
<Typography
|
|
1017
|
+
variant="tableCell"
|
|
1018
|
+
as="td"
|
|
1019
|
+
className="border border-border px-4 py-2"
|
|
1020
|
+
>
|
|
1021
|
+
h4
|
|
1022
|
+
</Typography>
|
|
1023
|
+
<Typography
|
|
1024
|
+
variant="tableCell"
|
|
1025
|
+
as="td"
|
|
1026
|
+
className="border border-border px-4 py-2"
|
|
1027
|
+
>
|
|
1028
|
+
bodyEmphasized
|
|
1029
|
+
</Typography>
|
|
1030
|
+
<Typography
|
|
1031
|
+
variant="tableCell"
|
|
1032
|
+
as="td"
|
|
1033
|
+
className="border border-border px-4 py-2"
|
|
1034
|
+
>
|
|
1035
|
+
14px
|
|
1036
|
+
</Typography>
|
|
1037
|
+
<Typography
|
|
1038
|
+
variant="tableCell"
|
|
1039
|
+
as="td"
|
|
1040
|
+
className="border border-border px-4 py-2"
|
|
1041
|
+
>
|
|
1042
|
+
Minor headings
|
|
1043
|
+
</Typography>
|
|
1044
|
+
<Typography
|
|
1045
|
+
variant="tableCell"
|
|
1046
|
+
as="td"
|
|
1047
|
+
className="border border-border px-4 py-2"
|
|
1048
|
+
>
|
|
1049
|
+
<H4 className="text-sm">Minor Heading</H4>
|
|
1050
|
+
</Typography>
|
|
1051
|
+
</tr>
|
|
1052
|
+
<tr>
|
|
1053
|
+
<Typography
|
|
1054
|
+
variant="tableCell"
|
|
1055
|
+
as="td"
|
|
1056
|
+
className="border border-border px-4 py-2"
|
|
1057
|
+
>
|
|
1058
|
+
<Code>H5</Code>
|
|
1059
|
+
</Typography>
|
|
1060
|
+
<Typography
|
|
1061
|
+
variant="tableCell"
|
|
1062
|
+
as="td"
|
|
1063
|
+
className="border border-border px-4 py-2"
|
|
1064
|
+
>
|
|
1065
|
+
h5
|
|
1066
|
+
</Typography>
|
|
1067
|
+
<Typography
|
|
1068
|
+
variant="tableCell"
|
|
1069
|
+
as="td"
|
|
1070
|
+
className="border border-border px-4 py-2"
|
|
1071
|
+
>
|
|
1072
|
+
bodyEmphasized
|
|
1073
|
+
</Typography>
|
|
1074
|
+
<Typography
|
|
1075
|
+
variant="tableCell"
|
|
1076
|
+
as="td"
|
|
1077
|
+
className="border border-border px-4 py-2"
|
|
1078
|
+
>
|
|
1079
|
+
14px
|
|
1080
|
+
</Typography>
|
|
1081
|
+
<Typography
|
|
1082
|
+
variant="tableCell"
|
|
1083
|
+
as="td"
|
|
1084
|
+
className="border border-border px-4 py-2"
|
|
1085
|
+
>
|
|
1086
|
+
Small headings
|
|
1087
|
+
</Typography>
|
|
1088
|
+
<Typography
|
|
1089
|
+
variant="tableCell"
|
|
1090
|
+
as="td"
|
|
1091
|
+
className="border border-border px-4 py-2"
|
|
1092
|
+
>
|
|
1093
|
+
<H5 className="text-sm">Small Heading</H5>
|
|
1094
|
+
</Typography>
|
|
1095
|
+
</tr>
|
|
1096
|
+
<tr>
|
|
1097
|
+
<Typography
|
|
1098
|
+
variant="tableCell"
|
|
1099
|
+
as="td"
|
|
1100
|
+
className="border border-border px-4 py-2"
|
|
1101
|
+
>
|
|
1102
|
+
<Code>H6</Code>
|
|
1103
|
+
</Typography>
|
|
1104
|
+
<Typography
|
|
1105
|
+
variant="tableCell"
|
|
1106
|
+
as="td"
|
|
1107
|
+
className="border border-border px-4 py-2"
|
|
1108
|
+
>
|
|
1109
|
+
h6
|
|
1110
|
+
</Typography>
|
|
1111
|
+
<Typography
|
|
1112
|
+
variant="tableCell"
|
|
1113
|
+
as="td"
|
|
1114
|
+
className="border border-border px-4 py-2"
|
|
1115
|
+
>
|
|
1116
|
+
details
|
|
1117
|
+
</Typography>
|
|
1118
|
+
<Typography
|
|
1119
|
+
variant="tableCell"
|
|
1120
|
+
as="td"
|
|
1121
|
+
className="border border-border px-4 py-2"
|
|
1122
|
+
>
|
|
1123
|
+
12px
|
|
1124
|
+
</Typography>
|
|
1125
|
+
<Typography
|
|
1126
|
+
variant="tableCell"
|
|
1127
|
+
as="td"
|
|
1128
|
+
className="border border-border px-4 py-2"
|
|
1129
|
+
>
|
|
1130
|
+
Smallest headings
|
|
1131
|
+
</Typography>
|
|
1132
|
+
<Typography
|
|
1133
|
+
variant="tableCell"
|
|
1134
|
+
as="td"
|
|
1135
|
+
className="border border-border px-4 py-2"
|
|
1136
|
+
>
|
|
1137
|
+
<H6 className="text-sm">Tiny Heading</H6>
|
|
1138
|
+
</Typography>
|
|
1139
|
+
</tr>
|
|
1140
|
+
<tr>
|
|
1141
|
+
<Typography
|
|
1142
|
+
variant="tableCell"
|
|
1143
|
+
as="td"
|
|
1144
|
+
className="border border-border px-4 py-2"
|
|
1145
|
+
>
|
|
1146
|
+
<Code>P</Code>
|
|
1147
|
+
</Typography>
|
|
1148
|
+
<Typography
|
|
1149
|
+
variant="tableCell"
|
|
1150
|
+
as="td"
|
|
1151
|
+
className="border border-border px-4 py-2"
|
|
1152
|
+
>
|
|
1153
|
+
p
|
|
1154
|
+
</Typography>
|
|
1155
|
+
<Typography
|
|
1156
|
+
variant="tableCell"
|
|
1157
|
+
as="td"
|
|
1158
|
+
className="border border-border px-4 py-2"
|
|
1159
|
+
>
|
|
1160
|
+
body
|
|
1161
|
+
</Typography>
|
|
1162
|
+
<Typography
|
|
1163
|
+
variant="tableCell"
|
|
1164
|
+
as="td"
|
|
1165
|
+
className="border border-border px-4 py-2"
|
|
1166
|
+
>
|
|
1167
|
+
14px
|
|
1168
|
+
</Typography>
|
|
1169
|
+
<Typography
|
|
1170
|
+
variant="tableCell"
|
|
1171
|
+
as="td"
|
|
1172
|
+
className="border border-border px-4 py-2"
|
|
1173
|
+
>
|
|
1174
|
+
Body text, paragraphs
|
|
1175
|
+
</Typography>
|
|
1176
|
+
<Typography
|
|
1177
|
+
variant="tableCell"
|
|
1178
|
+
as="td"
|
|
1179
|
+
className="border border-border px-4 py-2"
|
|
1180
|
+
>
|
|
1181
|
+
<P className="text-sm">Standard paragraph text.</P>
|
|
1182
|
+
</Typography>
|
|
1183
|
+
</tr>
|
|
1184
|
+
<tr>
|
|
1185
|
+
<Typography
|
|
1186
|
+
variant="tableCell"
|
|
1187
|
+
as="td"
|
|
1188
|
+
className="border border-border px-4 py-2"
|
|
1189
|
+
>
|
|
1190
|
+
<Code>A</Code>
|
|
1191
|
+
</Typography>
|
|
1192
|
+
<Typography
|
|
1193
|
+
variant="tableCell"
|
|
1194
|
+
as="td"
|
|
1195
|
+
className="border border-border px-4 py-2"
|
|
1196
|
+
>
|
|
1197
|
+
a
|
|
1198
|
+
</Typography>
|
|
1199
|
+
<Typography
|
|
1200
|
+
variant="tableCell"
|
|
1201
|
+
as="td"
|
|
1202
|
+
className="border border-border px-4 py-2"
|
|
1203
|
+
>
|
|
1204
|
+
body + underline
|
|
1205
|
+
</Typography>
|
|
1206
|
+
<Typography
|
|
1207
|
+
variant="tableCell"
|
|
1208
|
+
as="td"
|
|
1209
|
+
className="border border-border px-4 py-2"
|
|
1210
|
+
>
|
|
1211
|
+
14px
|
|
1212
|
+
</Typography>
|
|
1213
|
+
<Typography
|
|
1214
|
+
variant="tableCell"
|
|
1215
|
+
as="td"
|
|
1216
|
+
className="border border-border px-4 py-2"
|
|
1217
|
+
>
|
|
1218
|
+
Links with hover states
|
|
1219
|
+
</Typography>
|
|
1220
|
+
<Typography
|
|
1221
|
+
variant="tableCell"
|
|
1222
|
+
as="td"
|
|
1223
|
+
className="border border-border px-4 py-2"
|
|
1224
|
+
>
|
|
1225
|
+
<A className="text-sm" href="https://example.com">
|
|
1226
|
+
Example Link
|
|
1227
|
+
</A>
|
|
1228
|
+
</Typography>
|
|
1229
|
+
</tr>
|
|
1230
|
+
<tr>
|
|
1231
|
+
<Typography
|
|
1232
|
+
variant="tableCell"
|
|
1233
|
+
as="td"
|
|
1234
|
+
className="border border-border px-4 py-2"
|
|
1235
|
+
>
|
|
1236
|
+
<Code>Span</Code>
|
|
1237
|
+
</Typography>
|
|
1238
|
+
<Typography
|
|
1239
|
+
variant="tableCell"
|
|
1240
|
+
as="td"
|
|
1241
|
+
className="border border-border px-4 py-2"
|
|
1242
|
+
>
|
|
1243
|
+
span
|
|
1244
|
+
</Typography>
|
|
1245
|
+
<Typography
|
|
1246
|
+
variant="tableCell"
|
|
1247
|
+
as="td"
|
|
1248
|
+
className="border border-border px-4 py-2"
|
|
1249
|
+
>
|
|
1250
|
+
body (default)
|
|
1251
|
+
</Typography>
|
|
1252
|
+
<Typography
|
|
1253
|
+
variant="tableCell"
|
|
1254
|
+
as="td"
|
|
1255
|
+
className="border border-border px-4 py-2"
|
|
1256
|
+
>
|
|
1257
|
+
14px
|
|
1258
|
+
</Typography>
|
|
1259
|
+
<Typography
|
|
1260
|
+
variant="tableCell"
|
|
1261
|
+
as="td"
|
|
1262
|
+
className="border border-border px-4 py-2"
|
|
1263
|
+
>
|
|
1264
|
+
Inline text, highlights
|
|
1265
|
+
</Typography>
|
|
1266
|
+
<Typography
|
|
1267
|
+
variant="tableCell"
|
|
1268
|
+
as="td"
|
|
1269
|
+
className="border border-border px-4 py-2"
|
|
1270
|
+
>
|
|
1271
|
+
<Span className="text-sm" color="accent">
|
|
1272
|
+
Highlighted text
|
|
1273
|
+
</Span>
|
|
1274
|
+
</Typography>
|
|
1275
|
+
</tr>
|
|
1276
|
+
<tr>
|
|
1277
|
+
<Typography
|
|
1278
|
+
variant="tableCell"
|
|
1279
|
+
as="td"
|
|
1280
|
+
className="border border-border px-4 py-2"
|
|
1281
|
+
>
|
|
1282
|
+
<Code>Strong</Code>
|
|
1283
|
+
</Typography>
|
|
1284
|
+
<Typography
|
|
1285
|
+
variant="tableCell"
|
|
1286
|
+
as="td"
|
|
1287
|
+
className="border border-border px-4 py-2"
|
|
1288
|
+
>
|
|
1289
|
+
strong
|
|
1290
|
+
</Typography>
|
|
1291
|
+
<Typography
|
|
1292
|
+
variant="tableCell"
|
|
1293
|
+
as="td"
|
|
1294
|
+
className="border border-border px-4 py-2"
|
|
1295
|
+
>
|
|
1296
|
+
bodyEmphasized
|
|
1297
|
+
</Typography>
|
|
1298
|
+
<Typography
|
|
1299
|
+
variant="tableCell"
|
|
1300
|
+
as="td"
|
|
1301
|
+
className="border border-border px-4 py-2"
|
|
1302
|
+
>
|
|
1303
|
+
14px
|
|
1304
|
+
</Typography>
|
|
1305
|
+
<Typography
|
|
1306
|
+
variant="tableCell"
|
|
1307
|
+
as="td"
|
|
1308
|
+
className="border border-border px-4 py-2"
|
|
1309
|
+
>
|
|
1310
|
+
Emphasized text
|
|
1311
|
+
</Typography>
|
|
1312
|
+
<Typography
|
|
1313
|
+
variant="tableCell"
|
|
1314
|
+
as="td"
|
|
1315
|
+
className="border border-border px-4 py-2"
|
|
1316
|
+
>
|
|
1317
|
+
<Strong className="text-sm">Important text</Strong>
|
|
1318
|
+
</Typography>
|
|
1319
|
+
</tr>
|
|
1320
|
+
<tr>
|
|
1321
|
+
<Typography
|
|
1322
|
+
variant="tableCell"
|
|
1323
|
+
as="td"
|
|
1324
|
+
className="border border-border px-4 py-2"
|
|
1325
|
+
>
|
|
1326
|
+
<Code>Lead</Code>
|
|
1327
|
+
</Typography>
|
|
1328
|
+
<Typography
|
|
1329
|
+
variant="tableCell"
|
|
1330
|
+
as="td"
|
|
1331
|
+
className="border border-border px-4 py-2"
|
|
1332
|
+
>
|
|
1333
|
+
p
|
|
1334
|
+
</Typography>
|
|
1335
|
+
<Typography
|
|
1336
|
+
variant="tableCell"
|
|
1337
|
+
as="td"
|
|
1338
|
+
className="border border-border px-4 py-2"
|
|
1339
|
+
>
|
|
1340
|
+
subheading + muted
|
|
1341
|
+
</Typography>
|
|
1342
|
+
<Typography
|
|
1343
|
+
variant="tableCell"
|
|
1344
|
+
as="td"
|
|
1345
|
+
className="border border-border px-4 py-2"
|
|
1346
|
+
>
|
|
1347
|
+
17px
|
|
1348
|
+
</Typography>
|
|
1349
|
+
<Typography
|
|
1350
|
+
variant="tableCell"
|
|
1351
|
+
as="td"
|
|
1352
|
+
className="border border-border px-4 py-2"
|
|
1353
|
+
>
|
|
1354
|
+
Introductory text
|
|
1355
|
+
</Typography>
|
|
1356
|
+
<Typography
|
|
1357
|
+
variant="tableCell"
|
|
1358
|
+
as="td"
|
|
1359
|
+
className="border border-border px-4 py-2"
|
|
1360
|
+
>
|
|
1361
|
+
<Lead className="text-sm">Article introduction</Lead>
|
|
1362
|
+
</Typography>
|
|
1363
|
+
</tr>
|
|
1364
|
+
<tr>
|
|
1365
|
+
<Typography
|
|
1366
|
+
variant="tableCell"
|
|
1367
|
+
as="td"
|
|
1368
|
+
className="border border-border px-4 py-2"
|
|
1369
|
+
>
|
|
1370
|
+
<Code>Small</Code>
|
|
1371
|
+
</Typography>
|
|
1372
|
+
<Typography
|
|
1373
|
+
variant="tableCell"
|
|
1374
|
+
as="td"
|
|
1375
|
+
className="border border-border px-4 py-2"
|
|
1376
|
+
>
|
|
1377
|
+
small
|
|
1378
|
+
</Typography>
|
|
1379
|
+
<Typography
|
|
1380
|
+
variant="tableCell"
|
|
1381
|
+
as="td"
|
|
1382
|
+
className="border border-border px-4 py-2"
|
|
1383
|
+
>
|
|
1384
|
+
microcopy
|
|
1385
|
+
</Typography>
|
|
1386
|
+
<Typography
|
|
1387
|
+
variant="tableCell"
|
|
1388
|
+
as="td"
|
|
1389
|
+
className="border border-border px-4 py-2"
|
|
1390
|
+
>
|
|
1391
|
+
10px
|
|
1392
|
+
</Typography>
|
|
1393
|
+
<Typography
|
|
1394
|
+
variant="tableCell"
|
|
1395
|
+
as="td"
|
|
1396
|
+
className="border border-border px-4 py-2"
|
|
1397
|
+
>
|
|
1398
|
+
Fine print, captions
|
|
1399
|
+
</Typography>
|
|
1400
|
+
<Typography
|
|
1401
|
+
variant="tableCell"
|
|
1402
|
+
as="td"
|
|
1403
|
+
className="border border-border px-4 py-2"
|
|
1404
|
+
>
|
|
1405
|
+
<Small className="text-xs">Terms apply</Small>
|
|
1406
|
+
</Typography>
|
|
1407
|
+
</tr>
|
|
1408
|
+
<tr>
|
|
1409
|
+
<Typography
|
|
1410
|
+
variant="tableCell"
|
|
1411
|
+
as="td"
|
|
1412
|
+
className="border border-border px-4 py-2"
|
|
1413
|
+
>
|
|
1414
|
+
<Code>Code</Code>
|
|
1415
|
+
</Typography>
|
|
1416
|
+
<Typography
|
|
1417
|
+
variant="tableCell"
|
|
1418
|
+
as="td"
|
|
1419
|
+
className="border border-border px-4 py-2"
|
|
1420
|
+
>
|
|
1421
|
+
code
|
|
1422
|
+
</Typography>
|
|
1423
|
+
<Typography
|
|
1424
|
+
variant="tableCell"
|
|
1425
|
+
as="td"
|
|
1426
|
+
className="border border-border px-4 py-2"
|
|
1427
|
+
>
|
|
1428
|
+
code
|
|
1429
|
+
</Typography>
|
|
1430
|
+
<Typography
|
|
1431
|
+
variant="tableCell"
|
|
1432
|
+
as="td"
|
|
1433
|
+
className="border border-border px-4 py-2"
|
|
1434
|
+
>
|
|
1435
|
+
17px
|
|
1436
|
+
</Typography>
|
|
1437
|
+
<Typography
|
|
1438
|
+
variant="tableCell"
|
|
1439
|
+
as="td"
|
|
1440
|
+
className="border border-border px-4 py-2"
|
|
1441
|
+
>
|
|
1442
|
+
Inline code snippets
|
|
1443
|
+
</Typography>
|
|
1444
|
+
<Typography
|
|
1445
|
+
variant="tableCell"
|
|
1446
|
+
as="td"
|
|
1447
|
+
className="border border-border px-4 py-2"
|
|
1448
|
+
>
|
|
1449
|
+
<Code className="text-xs">useState</Code>
|
|
1450
|
+
</Typography>
|
|
1451
|
+
</tr>
|
|
1452
|
+
<tr>
|
|
1453
|
+
<Typography
|
|
1454
|
+
variant="tableCell"
|
|
1455
|
+
as="td"
|
|
1456
|
+
className="border border-border px-4 py-2"
|
|
1457
|
+
>
|
|
1458
|
+
<Code>Blockquote</Code>
|
|
1459
|
+
</Typography>
|
|
1460
|
+
<Typography
|
|
1461
|
+
variant="tableCell"
|
|
1462
|
+
as="td"
|
|
1463
|
+
className="border border-border px-4 py-2"
|
|
1464
|
+
>
|
|
1465
|
+
blockquote
|
|
1466
|
+
</Typography>
|
|
1467
|
+
<Typography
|
|
1468
|
+
variant="tableCell"
|
|
1469
|
+
as="td"
|
|
1470
|
+
className="border border-border px-4 py-2"
|
|
1471
|
+
>
|
|
1472
|
+
body + italic
|
|
1473
|
+
</Typography>
|
|
1474
|
+
<Typography
|
|
1475
|
+
variant="tableCell"
|
|
1476
|
+
as="td"
|
|
1477
|
+
className="border border-border px-4 py-2"
|
|
1478
|
+
>
|
|
1479
|
+
14px
|
|
1480
|
+
</Typography>
|
|
1481
|
+
<Typography
|
|
1482
|
+
variant="tableCell"
|
|
1483
|
+
as="td"
|
|
1484
|
+
className="border border-border px-4 py-2"
|
|
1485
|
+
>
|
|
1486
|
+
Quoted text
|
|
1487
|
+
</Typography>
|
|
1488
|
+
<Typography
|
|
1489
|
+
variant="tableCell"
|
|
1490
|
+
as="td"
|
|
1491
|
+
className="border border-border px-4 py-2"
|
|
1492
|
+
>
|
|
1493
|
+
<Blockquote className="text-xs border-l-2 border-border pl-2">
|
|
1494
|
+
"Quote text"
|
|
1495
|
+
</Blockquote>
|
|
1496
|
+
</Typography>
|
|
1497
|
+
</tr>
|
|
1498
|
+
</tbody>
|
|
1499
|
+
</table>
|
|
1500
|
+
</div>
|
|
1501
|
+
</CardContent>
|
|
1502
|
+
</Card>
|
|
1503
|
+
|
|
1504
|
+
<Card>
|
|
1505
|
+
<CardHeader>
|
|
1506
|
+
<CardTitle>Additional Properties</CardTitle>
|
|
1507
|
+
<CardDescription>
|
|
1508
|
+
All semantic components inherit the full Typography component API
|
|
1509
|
+
</CardDescription>
|
|
1510
|
+
</CardHeader>
|
|
1511
|
+
<CardContent>
|
|
1512
|
+
<div className="space-y-4">
|
|
1513
|
+
<div>
|
|
1514
|
+
<Typography variant="bodyEmphasized">Available Props:</Typography>
|
|
1515
|
+
<ul className="mt-2 space-y-1 ml-4">
|
|
1516
|
+
<li>
|
|
1517
|
+
<Code>color</Code> - default, muted, accent, destructive,
|
|
1518
|
+
success, warning
|
|
1519
|
+
</li>
|
|
1520
|
+
<li>
|
|
1521
|
+
<Code>align</Code> - left, center, right, justify
|
|
1522
|
+
</li>
|
|
1523
|
+
<li>
|
|
1524
|
+
<Code>transform</Code> - none, uppercase, lowercase,
|
|
1525
|
+
capitalize
|
|
1526
|
+
</li>
|
|
1527
|
+
<li>
|
|
1528
|
+
<Code>weight</Code> - normal, medium, semibold, bold
|
|
1529
|
+
</li>
|
|
1530
|
+
<li>
|
|
1531
|
+
<Code>italic</Code> - boolean
|
|
1532
|
+
</li>
|
|
1533
|
+
<li>
|
|
1534
|
+
<Code>underline</Code> - boolean
|
|
1535
|
+
</li>
|
|
1536
|
+
<li>
|
|
1537
|
+
<Code>strikethrough</Code> - boolean
|
|
1538
|
+
</li>
|
|
1539
|
+
<li>
|
|
1540
|
+
<Code>truncate</Code> - boolean
|
|
1541
|
+
</li>
|
|
1542
|
+
<li>
|
|
1543
|
+
<Code>srOnly</Code> - boolean
|
|
1544
|
+
</li>
|
|
1545
|
+
<li>
|
|
1546
|
+
<Code>className</Code> - additional CSS classes
|
|
1547
|
+
</li>
|
|
1548
|
+
</ul>
|
|
1549
|
+
</div>
|
|
1550
|
+
<div>
|
|
1551
|
+
<Typography variant="bodyEmphasized">Usage Examples:</Typography>
|
|
1552
|
+
<div className="mt-2 space-y-2">
|
|
1553
|
+
<div>
|
|
1554
|
+
<Code>
|
|
1555
|
+
<H1 color="accent">Colored
|
|
1556
|
+
heading</H1>
|
|
1557
|
+
</Code>
|
|
1558
|
+
</div>
|
|
1559
|
+
<div>
|
|
1560
|
+
<Code>
|
|
1561
|
+
<P align="center" italic>Centered italic
|
|
1562
|
+
text</P>
|
|
1563
|
+
</Code>
|
|
1564
|
+
</div>
|
|
1565
|
+
<div>
|
|
1566
|
+
<Code>
|
|
1567
|
+
<Span weight="bold"
|
|
1568
|
+
color="destructive">Bold red text</Span>
|
|
1569
|
+
</Code>
|
|
1570
|
+
</div>
|
|
1571
|
+
</div>
|
|
1572
|
+
</div>
|
|
1573
|
+
</div>
|
|
1574
|
+
</CardContent>
|
|
1575
|
+
</Card>
|
|
1576
|
+
</div>
|
|
1577
|
+
),
|
|
1578
|
+
parameters: {
|
|
1579
|
+
docs: {
|
|
1580
|
+
description: {
|
|
1581
|
+
story:
|
|
1582
|
+
"Comprehensive reference table showing all semantic typography components with their default configurations, HTML elements, font sizes, and use cases. Perfect for quick lookup during development.",
|
|
1583
|
+
},
|
|
1584
|
+
},
|
|
1585
|
+
},
|
|
1586
|
+
};
|