From 791d811209c1ab6f4458d59b0341ac902f8a2ab3 Mon Sep 17 00:00:00 2001
From: Jamie Henson
- Type definitions do not include margin as it can be contextual. Figma
- and the below list include recommended margins.
-
- The below list is created with ui-text-* helpers which include
- properties beyond the standard{" "}
-
- Title - this is a title
- H1 - this is an h1 H2 - this is an h2 H3 - this is an h3 H4 - this is an h4 H5 - this is an h5 Paragraph 1 Paragraph 1 (strong) Paragraph 2 Paragraph 2 (strong) Paragraph 3 Paragraph 3 (strong) This is a figure caption style Quote Sub-header Overline 1 Overline 2 Menu label 1 Menu label 1 (strong) Menu label 2 Menu label 2 (strong) Menu label 3 Menu label 3 (strong) Code 1 font for code blocks Code 2 font for code blocks
- Text, then styling for{" "}
- inline code, within
- paragraphs.
-
The default text color is inherited from the surrounding text.
@@ -94,27 +117,45 @@ import { Unstyled, Meta } from "@storybook/blocks";
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer nec
odio. Class aptent taciti sociosqu ad litora torquent per conubia
- nostra, per inceptos himenaeos.
+ nostra,{" "}
+
+ {" "}
+ per inceptos himenaeos
+
+ .
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer nec
odio. Class aptent taciti sociosqu ad litora torquent per conubia
- nostra, per inceptos himenaeos.
+ nostra,{" "}
+
+ {" "}
+ per inceptos himenaeos
+
+ .
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer nec
odio. Class aptent taciti sociosqu ad litora torquent per conubia
- nostra per inceptos himenaeos.
+ nostra{" "}
+
+ per inceptos himenaeos
+
+ .
Note that lists support having li items and li items with children,
@@ -128,8 +169,8 @@ import { Unstyled, Meta } from "@storybook/blocks";
This is the preceding paragraph sed nisl id lectus scelerisque
facilisis consectetur eget nisl. Morbi scelerisque felis vel
ullamcorper viverra. In id ante quis quam sodales auctor in a ante.
- Maecenas faucibus, diam sit amet sollicitudin pellentesque, est
- nulla pellentesque sapien.
+ Maecenas faucibus, diam sit amet sollicitudin pellentesque, est nulla
+ pellentesque sapien.
Typography
- font-size
and{" "}
- line-height
that text-*
- includes.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+const styles = {
+ primary: [
+ { label: "Title XL", className: "ui-text-title text-title-xl" },
+ { label: "Title", className: "ui-text-title" },
+ { label: "Title XS", className: "ui-text-title text-title-xs" },
+ { label: "h1 XL", className: "ui-text-h1 text-h1-xl" },
+ { label: "h1", className: "ui-text-h1" },
+ { label: "h1 XS", className: "ui-text-h1 text-h1-xs" },
+ { label: "h2 XL", className: "ui-text-h2 text-h2-xl" },
+ { label: "h2", className: "ui-text-h2" },
+ { label: "h2 XS", className: "ui-text-h2 text-h2-xs" },
+ { label: "h3", className: "ui-text-h3" },
+ { label: "h4", className: "ui-text-h4" },
+ { label: "h5", className: "ui-text-h5" },
+ { label: "p1", className: "ui-text-p1" },
+ { label: "p2", className: "ui-text-p2" },
+ { label: "p3", className: "ui-text-p3" },
+ { label: "p4", className: "ui-text-p4" },
+ ],
+ decorative: [
+ { label: "Sub-header", className: "ui-text-sub-header" },
+ { label: "Sub-header XS", className: "ui-text-sub-header" },
+ { label: "Overline 1", className: "ui-text-overline1" },
+ { label: "Overline 2", className: "ui-text-overline2" },
+ ],
+ gui: [
+ { label: "Button label 1", className: "ui-text-button1" },
+ { label: "Button label 2", className: "ui-text-button2" },
+ { label: "Button label 3", className: "ui-text-button3" },
+ { label: "Button label 4", className: "ui-text-button4" },
+ { label: "Menu label 1", className: "ui-text-menu1" },
+ { label: "Menu label 2", className: "ui-text-menu2" },
+ { label: "Menu label 3", className: "ui-text-menu3" },
+ { label: "Menu label 4", className: "ui-text-menu4" },
+ { label: "Link", className: "ui-text" },
+ ],
+ code: [
+ { label: "Code 1", className: "ui-text-code" },
+ { label: "Code 2", className: "ui-text-code2" },
+ ],
+};
-
-
-
-
-
-
-
-
-
-
-
-
-
+const fontCell = (style) => (
+
+ {style.className
+ .split(" ")
+ .map((className) => `.${className}`)
+ .join("")}
+
+ Links
Lists
- Pellentesque consequat elit eget tristique sagittis. Etiam et - erat et lorem elementum commodo. Aenean congue diam a nibh - accumsan tincidunt. + Pellentesque consequat elit eget tristique sagittis. Etiam et erat + et lorem elementum commodo. Aenean congue diam a nibh accumsan + tincidunt.
+ .ui-text-code
+
+
+ .ui-text-code2
+
+
+ .ui-text-sub-header
+
+
+ .ui-text-sub-header
+
+
+ .ui-text-overline1
+
+
+ .ui-text-overline2
+
+
+ .ui-text
+
+ + The default text color is inherited from the surrounding text. +
++ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer nec odio. Class aptent taciti sociosqu ad litora torquent per conubia nostra, + + per inceptos himenaeos + + . +
++ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer nec odio. Class aptent taciti sociosqu ad litora torquent per conubia nostra, + + per inceptos himenaeos + + . +
++ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer nec odio. Class aptent taciti sociosqu ad litora torquent per conubia nostra + + per inceptos himenaeos + + . +
++ Note that lists support having li items and li items with children, while keeping the same margin (in these examples, the ordered list has paragraphs). +
++ This is the preceding paragraph sed nisl id lectus scelerisque facilisis consectetur eget nisl. Morbi scelerisque felis vel ullamcorper viverra. In id ante quis quam sodales auctor in a ante. Maecenas faucibus, diam sit amet sollicitudin pellentesque, est nulla pellentesque sapien. +
++ This is the following paragraph sed nisl id lectus scelerisque facilisis consectetur eget nisl. Morbi scelerisque felis vel ullamcorper viverra. In id ante quis quam sodales auctor in a ante. Maecenas faucibus, diam sit amet sollicitudin pellentesque, est nulla pellentesque sapien. +
++ This is the preceding paragraph sed nisl id lectus scelerisque facilisis consectetur eget nisl. Morbi scelerisque felis vel ullamcorper viverra. In id ante quis quam sodales auctor in a ante. Maecenas faucibus, diam sit amet sollicitudin pellentesque, est nulla pellentesque sapien. +
++ Pellentesque consequat elit eget tristique sagittis. Etiam et erat et lorem elementum commodo. Aenean congue diam a nibh accumsan tincidunt. +
++ In id ante quis quam sodales auctor in a ante. Maecenas faucibus, diam sit amet sollicitudin pellentesque, est nulla pellentesque sapien. +
++ Etiam et erat et lorem elementum commodo. +
++ This is the following paragraph sed nisl id lectus scelerisque facilisis consectetur eget nisl. Morbi scelerisque felis vel ullamcorper viverra. In id ante quis quam sodales auctor in a ante. Maecenas faucibus, diam sit amet sollicitudin pellentesque, est nulla pellentesque sapien. +
+
+ .ui-text-title.text-title-xl
+
+
+ .ui-text-title
+
+
+ .ui-text-title.text-title-xs
+
+
+ .ui-text-h1.text-h1-xl
+
+
+ .ui-text-h1
+
+
+ .ui-text-h1.text-h1-xs
+
+
+ .ui-text-h2.text-h2-xl
+
+
+ .ui-text-h2
+
+
+ .ui-text-h2.text-h2-xs
+
+
+ .ui-text-h3
+
+
+ .ui-text-h4
+
+
+ .ui-text-h5
+
+
+ .ui-text-p1
+
+
+ .ui-text-p2
+
+
+ .ui-text-p3
+
+
+ .ui-text-p4
+
+