@nationaldesignstudio/react 0.5.2 → 0.5.3
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/package.json +10 -2
- package/src/App.css +0 -0
- package/src/App.tsx +0 -7
- package/src/assets/fonts/PPNeueMontreal-Variable.woff2 +0 -0
- package/src/assets/react.svg +0 -1
- package/src/components/atoms/accordion/accordion.stories.tsx +0 -228
- package/src/components/atoms/accordion/accordion.test.tsx +0 -231
- package/src/components/atoms/accordion/index.ts +0 -6
- package/src/components/atoms/background/background.test.tsx +0 -213
- package/src/components/atoms/background/index.ts +0 -22
- package/src/components/atoms/button/__screenshots__/button.visual.test.tsx/button-charcoal-chromium-darwin.png +0 -0
- package/src/components/atoms/button/__screenshots__/button.visual.test.tsx/button-charcoal-chromium-linux.png +0 -0
- package/src/components/atoms/button/__screenshots__/button.visual.test.tsx/button-charcoal-outline-chromium-darwin.png +0 -0
- package/src/components/atoms/button/__screenshots__/button.visual.test.tsx/button-charcoal-outline-chromium-linux.png +0 -0
- package/src/components/atoms/button/__screenshots__/button.visual.test.tsx/button-charcoal-outline-quiet-chromium-darwin.png +0 -0
- package/src/components/atoms/button/__screenshots__/button.visual.test.tsx/button-charcoal-outline-quiet-chromium-linux.png +0 -0
- package/src/components/atoms/button/__screenshots__/button.visual.test.tsx/button-disabled-chromium-darwin.png +0 -0
- package/src/components/atoms/button/__screenshots__/button.visual.test.tsx/button-disabled-chromium-linux.png +0 -0
- package/src/components/atoms/button/__screenshots__/button.visual.test.tsx/button-ivory-chromium-darwin.png +0 -0
- package/src/components/atoms/button/__screenshots__/button.visual.test.tsx/button-ivory-chromium-linux.png +0 -0
- package/src/components/atoms/button/__screenshots__/button.visual.test.tsx/button-ivory-outline-chromium-darwin.png +0 -0
- package/src/components/atoms/button/__screenshots__/button.visual.test.tsx/button-ivory-outline-chromium-linux.png +0 -0
- package/src/components/atoms/button/__screenshots__/button.visual.test.tsx/button-ivory-outline-quiet-chromium-darwin.png +0 -0
- package/src/components/atoms/button/__screenshots__/button.visual.test.tsx/button-ivory-outline-quiet-chromium-linux.png +0 -0
- package/src/components/atoms/button/__screenshots__/button.visual.test.tsx/button-size-large-chromium-darwin.png +0 -0
- package/src/components/atoms/button/__screenshots__/button.visual.test.tsx/button-size-large-chromium-linux.png +0 -0
- package/src/components/atoms/button/__screenshots__/button.visual.test.tsx/button-size-medium-chromium-darwin.png +0 -0
- package/src/components/atoms/button/__screenshots__/button.visual.test.tsx/button-size-medium-chromium-linux.png +0 -0
- package/src/components/atoms/button/__screenshots__/button.visual.test.tsx/button-size-small-chromium-darwin.png +0 -0
- package/src/components/atoms/button/__screenshots__/button.visual.test.tsx/button-size-small-chromium-linux.png +0 -0
- package/src/components/atoms/button/button.stories.tsx +0 -289
- package/src/components/atoms/button/button.test.tsx +0 -419
- package/src/components/atoms/button/button.visual.test.tsx +0 -98
- package/src/components/atoms/button/icon-button.stories.tsx +0 -260
- package/src/components/atoms/button/icon-button.test.tsx +0 -186
- package/src/components/atoms/button/index.ts +0 -6
- package/src/components/atoms/input/index.ts +0 -17
- package/src/components/atoms/input/input-group.stories.tsx +0 -646
- package/src/components/atoms/input/input-group.test.tsx +0 -362
- package/src/components/atoms/input/input.stories.tsx +0 -228
- package/src/components/atoms/input/input.test.tsx +0 -167
- package/src/components/atoms/ndstudio-footer/index.ts +0 -1
- package/src/components/atoms/pager-control/index.ts +0 -5
- package/src/components/atoms/pager-control/pager-control.stories.tsx +0 -207
- package/src/components/atoms/pager-control/pager-control.test.tsx +0 -130
- package/src/components/atoms/popover/index.ts +0 -30
- package/src/components/atoms/popover/popover.stories.tsx +0 -531
- package/src/components/atoms/popover/popover.test.tsx +0 -486
- package/src/components/atoms/select/index.ts +0 -18
- package/src/components/atoms/select/select.stories.tsx +0 -455
- package/src/components/atoms/tooltip/index.ts +0 -24
- package/src/components/atoms/tooltip/tooltip.stories.tsx +0 -348
- package/src/components/atoms/tooltip/tooltip.test.tsx +0 -363
- package/src/components/dev-tools/dev-toolbar/dev-toolbar.stories.tsx +0 -73
- package/src/components/dev-tools/dev-toolbar/index.ts +0 -1
- package/src/components/dev-tools/grid-overlay/index.ts +0 -1
- package/src/components/dev-tools/index.ts +0 -2
- package/src/components/foundation/typography/typography.stories.tsx +0 -401
- package/src/components/organisms/card/__screenshots__/card.visual.test.tsx/card-default-vertical-chromium-darwin.png +0 -0
- package/src/components/organisms/card/__screenshots__/card.visual.test.tsx/card-default-vertical-chromium-linux.png +0 -0
- package/src/components/organisms/card/__screenshots__/card.visual.test.tsx/card-horizontal-chromium-darwin.png +0 -0
- package/src/components/organisms/card/__screenshots__/card.visual.test.tsx/card-horizontal-chromium-linux.png +0 -0
- package/src/components/organisms/card/__screenshots__/card.visual.test.tsx/card-minimal-chromium-darwin.png +0 -0
- package/src/components/organisms/card/__screenshots__/card.visual.test.tsx/card-minimal-chromium-linux.png +0 -0
- package/src/components/organisms/card/__screenshots__/card.visual.test.tsx/card-without-actions-chromium-darwin.png +0 -0
- package/src/components/organisms/card/__screenshots__/card.visual.test.tsx/card-without-actions-chromium-linux.png +0 -0
- package/src/components/organisms/card/__screenshots__/card.visual.test.tsx/card-without-eyebrow-chromium-darwin.png +0 -0
- package/src/components/organisms/card/__screenshots__/card.visual.test.tsx/card-without-eyebrow-chromium-linux.png +0 -0
- package/src/components/organisms/card/__screenshots__/card.visual.test.tsx/card-without-image-chromium-darwin.png +0 -0
- package/src/components/organisms/card/__screenshots__/card.visual.test.tsx/card-without-image-chromium-linux.png +0 -0
- package/src/components/organisms/card/card.stories.tsx +0 -293
- package/src/components/organisms/card/card.test.tsx +0 -247
- package/src/components/organisms/card/card.visual.test.tsx +0 -197
- package/src/components/organisms/card/index.ts +0 -26
- package/src/components/organisms/navbar/__screenshots__/navbar.visual.test.tsx/navbar-active-link-chromium-darwin.png +0 -0
- package/src/components/organisms/navbar/__screenshots__/navbar.visual.test.tsx/navbar-active-link-chromium-linux.png +0 -0
- package/src/components/organisms/navbar/__screenshots__/navbar.visual.test.tsx/navbar-brand-only-chromium-darwin.png +0 -0
- package/src/components/organisms/navbar/__screenshots__/navbar.visual.test.tsx/navbar-brand-only-chromium-linux.png +0 -0
- package/src/components/organisms/navbar/__screenshots__/navbar.visual.test.tsx/navbar-default-chromium-darwin.png +0 -0
- package/src/components/organisms/navbar/__screenshots__/navbar.visual.test.tsx/navbar-default-chromium-linux.png +0 -0
- package/src/components/organisms/navbar/index.ts +0 -18
- package/src/components/organisms/navbar/navbar.stories.tsx +0 -313
- package/src/components/organisms/navbar/navbar.test.tsx +0 -190
- package/src/components/organisms/navbar/navbar.visual.test.tsx +0 -85
- package/src/components/organisms/us-gov-banner/__screenshots__/us-gov-banner.visual.test.tsx/us-gov-banner-custom-icon-chromium-darwin.png +0 -0
- package/src/components/organisms/us-gov-banner/__screenshots__/us-gov-banner.visual.test.tsx/us-gov-banner-custom-icon-chromium-linux.png +0 -0
- package/src/components/organisms/us-gov-banner/__screenshots__/us-gov-banner.visual.test.tsx/us-gov-banner-custom-text-chromium-darwin.png +0 -0
- package/src/components/organisms/us-gov-banner/__screenshots__/us-gov-banner.visual.test.tsx/us-gov-banner-custom-text-chromium-linux.png +0 -0
- package/src/components/organisms/us-gov-banner/__screenshots__/us-gov-banner.visual.test.tsx/us-gov-banner-default-chromium-darwin.png +0 -0
- package/src/components/organisms/us-gov-banner/__screenshots__/us-gov-banner.visual.test.tsx/us-gov-banner-default-chromium-linux.png +0 -0
- package/src/components/organisms/us-gov-banner/index.ts +0 -5
- package/src/components/organisms/us-gov-banner/us-gov-banner.stories.tsx +0 -35
- package/src/components/organisms/us-gov-banner/us-gov-banner.test.tsx +0 -107
- package/src/components/organisms/us-gov-banner/us-gov-banner.visual.test.tsx +0 -46
- package/src/components/sections/banner/banner.stories.tsx +0 -150
- package/src/components/sections/banner/banner.test.tsx +0 -185
- package/src/components/sections/banner/index.ts +0 -2
- package/src/components/sections/card-grid/card-grid.stories.tsx +0 -351
- package/src/components/sections/card-grid/index.ts +0 -1
- package/src/components/sections/faq-section/faq-section.stories.tsx +0 -453
- package/src/components/sections/faq-section/index.ts +0 -2
- package/src/components/sections/hero/__screenshots__/hero.visual.test.tsx/hero-a1-desktop-chromium-darwin.png +0 -0
- package/src/components/sections/hero/__screenshots__/hero.visual.test.tsx/hero-a1-desktop-chromium-linux.png +0 -0
- package/src/components/sections/hero/__screenshots__/hero.visual.test.tsx/hero-a1-mobile-chromium-darwin.png +0 -0
- package/src/components/sections/hero/__screenshots__/hero.visual.test.tsx/hero-a1-mobile-chromium-linux.png +0 -0
- package/src/components/sections/hero/__screenshots__/hero.visual.test.tsx/hero-a1-tablet-chromium-darwin.png +0 -0
- package/src/components/sections/hero/__screenshots__/hero.visual.test.tsx/hero-a1-tablet-chromium-linux.png +0 -0
- package/src/components/sections/hero/__screenshots__/hero.visual.test.tsx/hero-a2-desktop-chromium-darwin.png +0 -0
- package/src/components/sections/hero/__screenshots__/hero.visual.test.tsx/hero-a2-desktop-chromium-linux.png +0 -0
- package/src/components/sections/hero/__screenshots__/hero.visual.test.tsx/hero-a2-mobile-chromium-darwin.png +0 -0
- package/src/components/sections/hero/__screenshots__/hero.visual.test.tsx/hero-a2-mobile-chromium-linux.png +0 -0
- package/src/components/sections/hero/__screenshots__/hero.visual.test.tsx/hero-a2-tablet-chromium-darwin.png +0 -0
- package/src/components/sections/hero/__screenshots__/hero.visual.test.tsx/hero-a2-tablet-chromium-linux.png +0 -0
- package/src/components/sections/hero/__screenshots__/hero.visual.test.tsx/hero-a3-desktop-chromium-darwin.png +0 -0
- package/src/components/sections/hero/__screenshots__/hero.visual.test.tsx/hero-a3-desktop-chromium-linux.png +0 -0
- package/src/components/sections/hero/__screenshots__/hero.visual.test.tsx/hero-a3-mobile-chromium-darwin.png +0 -0
- package/src/components/sections/hero/__screenshots__/hero.visual.test.tsx/hero-a3-mobile-chromium-linux.png +0 -0
- package/src/components/sections/hero/__screenshots__/hero.visual.test.tsx/hero-a3-tablet-chromium-darwin.png +0 -0
- package/src/components/sections/hero/__screenshots__/hero.visual.test.tsx/hero-a3-tablet-chromium-linux.png +0 -0
- package/src/components/sections/hero/__screenshots__/hero.visual.test.tsx/hero-custom-class-chromium-darwin.png +0 -0
- package/src/components/sections/hero/__screenshots__/hero.visual.test.tsx/hero-custom-class-chromium-linux.png +0 -0
- package/src/components/sections/hero/__screenshots__/hero.visual.test.tsx/hero-default-chromium-linux.png +0 -0
- package/src/components/sections/hero/__screenshots__/hero.visual.test.tsx/hero-long-title-chromium-darwin.png +0 -0
- package/src/components/sections/hero/__screenshots__/hero.visual.test.tsx/hero-long-title-chromium-linux.png +0 -0
- package/src/components/sections/hero/hero.stories.tsx +0 -397
- package/src/components/sections/hero/hero.test.tsx +0 -138
- package/src/components/sections/hero/hero.visual.test.tsx +0 -140
- package/src/components/sections/hero/index.ts +0 -23
- package/src/components/sections/prose/__screenshots__/prose.visual.test.tsx/prose-h3-heading-chromium-darwin.png +0 -0
- package/src/components/sections/prose/__screenshots__/prose.visual.test.tsx/prose-h3-heading-chromium-linux.png +0 -0
- package/src/components/sections/prose/__screenshots__/prose.visual.test.tsx/prose-multiple-paragraphs-chromium-darwin.png +0 -0
- package/src/components/sections/prose/__screenshots__/prose.visual.test.tsx/prose-multiple-paragraphs-chromium-linux.png +0 -0
- package/src/components/sections/prose/__screenshots__/prose.visual.test.tsx/prose-multiple-sections-chromium-darwin.png +0 -0
- package/src/components/sections/prose/__screenshots__/prose.visual.test.tsx/prose-multiple-sections-chromium-linux.png +0 -0
- package/src/components/sections/prose/__screenshots__/prose.visual.test.tsx/prose-single-section-chromium-darwin.png +0 -0
- package/src/components/sections/prose/__screenshots__/prose.visual.test.tsx/prose-single-section-chromium-linux.png +0 -0
- package/src/components/sections/prose/index.ts +0 -6
- package/src/components/sections/prose/prose.stories.tsx +0 -144
- package/src/components/sections/prose/prose.test.tsx +0 -178
- package/src/components/sections/prose/prose.visual.test.tsx +0 -105
- package/src/components/sections/quote-block/index.ts +0 -5
- package/src/components/sections/river/index.ts +0 -1
- package/src/components/sections/river/river.stories.tsx +0 -237
- package/src/components/sections/river/river.test.tsx +0 -268
- package/src/components/sections/tout/index.ts +0 -1
- package/src/components/sections/tout/tout.stories.tsx +0 -171
- package/src/components/sections/tout/tout.test.tsx +0 -242
- package/src/components/sections/two-column-section/index.ts +0 -5
- package/src/components/sections/two-column-section/two-column-section.stories.tsx +0 -285
- package/src/components/shared/index.ts +0 -5
- package/src/index.ts +0 -293
- package/src/main.tsx +0 -13
- package/src/stories/grid-system.stories.tsx +0 -309
- package/src/stories/introduction.mdx +0 -128
- package/src/stories/theme-provider.stories.tsx +0 -349
- package/src/stories/token-showcase.stories.tsx +0 -73
- package/src/stories/token-showcase.tsx +0 -777
- package/src/styles.css +0 -14
- package/src/tests/token-resolution.test.tsx +0 -298
- package/src/theme/theme-provider.test.tsx +0 -270
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from "@storybook/react-vite";
|
|
2
|
-
import { DevToolbar } from "./dev-toolbar";
|
|
3
|
-
|
|
4
|
-
const meta = {
|
|
5
|
-
title: "Dev Tools/DevToolbar",
|
|
6
|
-
component: DevToolbar,
|
|
7
|
-
parameters: {
|
|
8
|
-
layout: "fullscreen",
|
|
9
|
-
},
|
|
10
|
-
argTypes: {
|
|
11
|
-
defaultExpanded: {
|
|
12
|
-
control: "boolean",
|
|
13
|
-
},
|
|
14
|
-
},
|
|
15
|
-
} satisfies Meta<typeof DevToolbar>;
|
|
16
|
-
|
|
17
|
-
export default meta;
|
|
18
|
-
type Story = StoryObj<typeof meta>;
|
|
19
|
-
|
|
20
|
-
const DemoContent = () => (
|
|
21
|
-
<div className="min-h-screen bg-gray-100 py-64">
|
|
22
|
-
<div className="w-full max-w-[90rem] mx-auto px-[var(--spatial-grid-small-margin)] md:px-[var(--spatial-grid-medium-margin)] lg:px-[var(--spatial-grid-large-margin)]">
|
|
23
|
-
<h1 className="typography-h2 mb-16">Dev Toolbar Demo</h1>
|
|
24
|
-
<p className="typography-body-medium text-gray-600 mb-8">
|
|
25
|
-
Click the bar at the bottom to expand, then toggle the Grid overlay.
|
|
26
|
-
</p>
|
|
27
|
-
<p className="typography-body-medium text-gray-600 mb-32">
|
|
28
|
-
Keyboard shortcut:{" "}
|
|
29
|
-
<kbd className="px-8 py-4 bg-gray-200 rounded-radius-8">⌘G</kbd> or{" "}
|
|
30
|
-
<kbd className="px-8 py-4 bg-gray-200 rounded-radius-8">Ctrl+G</kbd>
|
|
31
|
-
</p>
|
|
32
|
-
|
|
33
|
-
<div className="grid grid-cols-4 md:grid-cols-12 lg:grid-cols-24 gap-[var(--spatial-grid-small-gutter)] md:gap-[var(--spatial-grid-medium-gutter)] lg:gap-[var(--spatial-grid-large-gutter)]">
|
|
34
|
-
{["alpha", "beta", "gamma", "delta", "epsilon", "zeta"].map((id) => (
|
|
35
|
-
<div
|
|
36
|
-
key={id}
|
|
37
|
-
className="col-span-4 md:col-span-4 lg:col-span-8 bg-white p-16 rounded-radius-12 shadow"
|
|
38
|
-
>
|
|
39
|
-
<h3 className="typography-h4 mb-8">Card {id}</h3>
|
|
40
|
-
<p className="typography-body-small text-gray-500">
|
|
41
|
-
Sample content to visualize how the grid overlay aligns with your
|
|
42
|
-
layout.
|
|
43
|
-
</p>
|
|
44
|
-
</div>
|
|
45
|
-
))}
|
|
46
|
-
</div>
|
|
47
|
-
</div>
|
|
48
|
-
</div>
|
|
49
|
-
);
|
|
50
|
-
|
|
51
|
-
export const Default: Story = {
|
|
52
|
-
args: {
|
|
53
|
-
defaultExpanded: false,
|
|
54
|
-
},
|
|
55
|
-
render: (args) => (
|
|
56
|
-
<>
|
|
57
|
-
<DemoContent />
|
|
58
|
-
<DevToolbar {...args} />
|
|
59
|
-
</>
|
|
60
|
-
),
|
|
61
|
-
};
|
|
62
|
-
|
|
63
|
-
export const Expanded: Story = {
|
|
64
|
-
args: {
|
|
65
|
-
defaultExpanded: true,
|
|
66
|
-
},
|
|
67
|
-
render: (args) => (
|
|
68
|
-
<>
|
|
69
|
-
<DemoContent />
|
|
70
|
-
<DevToolbar {...args} />
|
|
71
|
-
</>
|
|
72
|
-
),
|
|
73
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { DevToolbar, type DevToolbarProps } from "./dev-toolbar";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { GridOverlay, type GridOverlayProps } from "./grid-overlay";
|
|
@@ -1,401 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
-
|
|
3
|
-
const meta: Meta = {
|
|
4
|
-
title: "Foundation/Typography",
|
|
5
|
-
parameters: {
|
|
6
|
-
layout: "padded",
|
|
7
|
-
},
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
export default meta;
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* Typography Scale showcases all typography styles in the design system.
|
|
14
|
-
* Each style is shown with its class name and a sample text.
|
|
15
|
-
*/
|
|
16
|
-
export const TypeScale: StoryObj = {
|
|
17
|
-
render: () => (
|
|
18
|
-
<div className="space-y-48 p-24">
|
|
19
|
-
{/* Headings */}
|
|
20
|
-
<section>
|
|
21
|
-
<h2 className="typography-h5 text-gray-500 mb-24 uppercase tracking-wide">
|
|
22
|
-
Headings
|
|
23
|
-
</h2>
|
|
24
|
-
<div className="space-y-24">
|
|
25
|
-
<div>
|
|
26
|
-
<code className="text-12 text-gray-500 block mb-8">
|
|
27
|
-
typography-h1-display
|
|
28
|
-
</code>
|
|
29
|
-
<p className="typography-h1-display text-gray-900">
|
|
30
|
-
Display Heading
|
|
31
|
-
</p>
|
|
32
|
-
</div>
|
|
33
|
-
<div>
|
|
34
|
-
<code className="text-12 text-gray-500 block mb-8">
|
|
35
|
-
typography-h1
|
|
36
|
-
</code>
|
|
37
|
-
<p className="typography-h1 text-gray-900">Heading 1</p>
|
|
38
|
-
</div>
|
|
39
|
-
<div>
|
|
40
|
-
<code className="text-12 text-gray-500 block mb-8">
|
|
41
|
-
typography-h2
|
|
42
|
-
</code>
|
|
43
|
-
<p className="typography-h2 text-gray-900">Heading 2</p>
|
|
44
|
-
</div>
|
|
45
|
-
<div>
|
|
46
|
-
<code className="text-12 text-gray-500 block mb-8">
|
|
47
|
-
typography-h3
|
|
48
|
-
</code>
|
|
49
|
-
<p className="typography-h3 text-gray-900">Heading 3</p>
|
|
50
|
-
</div>
|
|
51
|
-
<div>
|
|
52
|
-
<code className="text-12 text-gray-500 block mb-8">
|
|
53
|
-
typography-h4
|
|
54
|
-
</code>
|
|
55
|
-
<p className="typography-h4 text-gray-900">Heading 4</p>
|
|
56
|
-
</div>
|
|
57
|
-
<div>
|
|
58
|
-
<code className="text-12 text-gray-500 block mb-8">
|
|
59
|
-
typography-h5
|
|
60
|
-
</code>
|
|
61
|
-
<p className="typography-h5 text-gray-900">Heading 5</p>
|
|
62
|
-
</div>
|
|
63
|
-
</div>
|
|
64
|
-
</section>
|
|
65
|
-
|
|
66
|
-
{/* Body Text */}
|
|
67
|
-
<section>
|
|
68
|
-
<h2 className="typography-h5 text-gray-500 mb-24 uppercase tracking-wide">
|
|
69
|
-
Body Text
|
|
70
|
-
</h2>
|
|
71
|
-
<div className="space-y-24">
|
|
72
|
-
<div>
|
|
73
|
-
<code className="text-12 text-gray-500 block mb-8">
|
|
74
|
-
typography-body-large
|
|
75
|
-
</code>
|
|
76
|
-
<p className="typography-body-large text-gray-900 max-w-640">
|
|
77
|
-
Body large is used for important introductory text. The quick
|
|
78
|
-
brown fox jumps over the lazy dog.
|
|
79
|
-
</p>
|
|
80
|
-
</div>
|
|
81
|
-
<div>
|
|
82
|
-
<code className="text-12 text-gray-500 block mb-8">
|
|
83
|
-
typography-body-medium
|
|
84
|
-
</code>
|
|
85
|
-
<p className="typography-body-medium text-gray-900 max-w-640">
|
|
86
|
-
Body medium is the default body text size for most content. The
|
|
87
|
-
quick brown fox jumps over the lazy dog.
|
|
88
|
-
</p>
|
|
89
|
-
</div>
|
|
90
|
-
<div>
|
|
91
|
-
<code className="text-12 text-gray-500 block mb-8">
|
|
92
|
-
typography-body-small
|
|
93
|
-
</code>
|
|
94
|
-
<p className="typography-body-small text-gray-900 max-w-640">
|
|
95
|
-
Body small is used for secondary text and compact layouts. The
|
|
96
|
-
quick brown fox jumps over the lazy dog.
|
|
97
|
-
</p>
|
|
98
|
-
</div>
|
|
99
|
-
</div>
|
|
100
|
-
</section>
|
|
101
|
-
|
|
102
|
-
{/* Supporting Text */}
|
|
103
|
-
<section>
|
|
104
|
-
<h2 className="typography-h5 text-gray-500 mb-24 uppercase tracking-wide">
|
|
105
|
-
Supporting Text
|
|
106
|
-
</h2>
|
|
107
|
-
<div className="space-y-24">
|
|
108
|
-
<div>
|
|
109
|
-
<code className="text-12 text-gray-500 block mb-8">
|
|
110
|
-
typography-overline
|
|
111
|
-
</code>
|
|
112
|
-
<p className="typography-overline text-gray-700 uppercase tracking-wide">
|
|
113
|
-
Overline Text
|
|
114
|
-
</p>
|
|
115
|
-
</div>
|
|
116
|
-
<div>
|
|
117
|
-
<code className="text-12 text-gray-500 block mb-8">
|
|
118
|
-
typography-caption
|
|
119
|
-
</code>
|
|
120
|
-
<p className="typography-caption text-gray-600">
|
|
121
|
-
Caption text for supplementary information
|
|
122
|
-
</p>
|
|
123
|
-
</div>
|
|
124
|
-
</div>
|
|
125
|
-
</section>
|
|
126
|
-
|
|
127
|
-
{/* UI Typography */}
|
|
128
|
-
<section>
|
|
129
|
-
<h2 className="typography-h5 text-gray-500 mb-24 uppercase tracking-wide">
|
|
130
|
-
UI Typography
|
|
131
|
-
</h2>
|
|
132
|
-
<div className="space-y-24">
|
|
133
|
-
<div>
|
|
134
|
-
<code className="text-12 text-gray-500 block mb-8">
|
|
135
|
-
typography-ui-button-large
|
|
136
|
-
</code>
|
|
137
|
-
<p className="typography-ui-button-large text-gray-900">
|
|
138
|
-
Large Button Text
|
|
139
|
-
</p>
|
|
140
|
-
</div>
|
|
141
|
-
<div>
|
|
142
|
-
<code className="text-12 text-gray-500 block mb-8">
|
|
143
|
-
typography-ui-button-medium
|
|
144
|
-
</code>
|
|
145
|
-
<p className="typography-ui-button-medium text-gray-900">
|
|
146
|
-
Medium Button Text
|
|
147
|
-
</p>
|
|
148
|
-
</div>
|
|
149
|
-
<div>
|
|
150
|
-
<code className="text-12 text-gray-500 block mb-8">
|
|
151
|
-
typography-ui-button-small
|
|
152
|
-
</code>
|
|
153
|
-
<p className="typography-ui-button-small text-gray-900">
|
|
154
|
-
Small Button Text
|
|
155
|
-
</p>
|
|
156
|
-
</div>
|
|
157
|
-
<div>
|
|
158
|
-
<code className="text-12 text-gray-500 block mb-8">
|
|
159
|
-
typography-ui-label
|
|
160
|
-
</code>
|
|
161
|
-
<p className="typography-ui-label text-gray-900">Form Label</p>
|
|
162
|
-
</div>
|
|
163
|
-
</div>
|
|
164
|
-
</section>
|
|
165
|
-
</div>
|
|
166
|
-
),
|
|
167
|
-
};
|
|
168
|
-
|
|
169
|
-
/**
|
|
170
|
-
* Responsive Typography demonstrates how typography scales across breakpoints.
|
|
171
|
-
* Resize the viewport to see the typography adapt.
|
|
172
|
-
*/
|
|
173
|
-
export const ResponsiveTypography: StoryObj = {
|
|
174
|
-
render: () => (
|
|
175
|
-
<div className="space-y-32 p-24">
|
|
176
|
-
<div className="bg-gray-100 p-16 rounded-8">
|
|
177
|
-
<p className="typography-body-small text-gray-700 mb-8">
|
|
178
|
-
Resize the viewport to see responsive typography in action
|
|
179
|
-
</p>
|
|
180
|
-
<p className="typography-caption text-gray-500">
|
|
181
|
-
Mobile (<768px) | Tablet (768px-1440px) | Desktop (>1440px)
|
|
182
|
-
</p>
|
|
183
|
-
</div>
|
|
184
|
-
|
|
185
|
-
<section>
|
|
186
|
-
<h3 className="typography-h5 text-gray-500 mb-24 uppercase tracking-wide">
|
|
187
|
-
Responsive Headings
|
|
188
|
-
</h3>
|
|
189
|
-
<div className="space-y-24">
|
|
190
|
-
<div className="border-l-4 border-indigo-500 pl-16">
|
|
191
|
-
<code className="text-12 text-gray-500 block mb-4">
|
|
192
|
-
typography-h1 (responsive)
|
|
193
|
-
</code>
|
|
194
|
-
<p className="typography-h1 text-gray-900">Responsive H1</p>
|
|
195
|
-
<p className="typography-caption text-gray-500 mt-4">
|
|
196
|
-
48px (sm) → 72px (md) → 96px (lg)
|
|
197
|
-
</p>
|
|
198
|
-
</div>
|
|
199
|
-
<div className="border-l-4 border-indigo-500 pl-16">
|
|
200
|
-
<code className="text-12 text-gray-500 block mb-4">
|
|
201
|
-
typography-h2 (responsive)
|
|
202
|
-
</code>
|
|
203
|
-
<p className="typography-h2 text-gray-900">Responsive H2</p>
|
|
204
|
-
<p className="typography-caption text-gray-500 mt-4">
|
|
205
|
-
48px (sm) → 64px (md) → 72px (lg)
|
|
206
|
-
</p>
|
|
207
|
-
</div>
|
|
208
|
-
<div className="border-l-4 border-indigo-500 pl-16">
|
|
209
|
-
<code className="text-12 text-gray-500 block mb-4">
|
|
210
|
-
typography-h3 (responsive)
|
|
211
|
-
</code>
|
|
212
|
-
<p className="typography-h3 text-gray-900">Responsive H3</p>
|
|
213
|
-
<p className="typography-caption text-gray-500 mt-4">
|
|
214
|
-
32px (sm) → 48px (md) → 64px (lg)
|
|
215
|
-
</p>
|
|
216
|
-
</div>
|
|
217
|
-
</div>
|
|
218
|
-
</section>
|
|
219
|
-
|
|
220
|
-
<section>
|
|
221
|
-
<h3 className="typography-h5 text-gray-500 mb-24 uppercase tracking-wide">
|
|
222
|
-
Breakpoint-Specific Utilities
|
|
223
|
-
</h3>
|
|
224
|
-
<div className="space-y-16">
|
|
225
|
-
<div className="grid grid-cols-1 md:grid-cols-3 gap-16">
|
|
226
|
-
<div className="bg-gray-50 p-16 rounded-8">
|
|
227
|
-
<code className="text-12 text-gray-500 block mb-8">
|
|
228
|
-
typography-h4-small
|
|
229
|
-
</code>
|
|
230
|
-
<p className="typography-h4-small text-gray-900">H4 Small</p>
|
|
231
|
-
</div>
|
|
232
|
-
<div className="bg-gray-50 p-16 rounded-8">
|
|
233
|
-
<code className="text-12 text-gray-500 block mb-8">
|
|
234
|
-
typography-h4-medium
|
|
235
|
-
</code>
|
|
236
|
-
<p className="typography-h4-medium text-gray-900">H4 Medium</p>
|
|
237
|
-
</div>
|
|
238
|
-
<div className="bg-gray-50 p-16 rounded-8">
|
|
239
|
-
<code className="text-12 text-gray-500 block mb-8">
|
|
240
|
-
typography-h4-large
|
|
241
|
-
</code>
|
|
242
|
-
<p className="typography-h4-large text-gray-900">H4 Large</p>
|
|
243
|
-
</div>
|
|
244
|
-
</div>
|
|
245
|
-
</div>
|
|
246
|
-
</section>
|
|
247
|
-
</div>
|
|
248
|
-
),
|
|
249
|
-
};
|
|
250
|
-
|
|
251
|
-
/**
|
|
252
|
-
* Typography specimen shows a sample page layout using the typography system.
|
|
253
|
-
*/
|
|
254
|
-
export const Specimen: StoryObj = {
|
|
255
|
-
render: () => (
|
|
256
|
-
<article className="max-w-800 mx-auto p-32">
|
|
257
|
-
<header className="mb-48">
|
|
258
|
-
<p className="typography-overline text-indigo-600 uppercase tracking-wide mb-8">
|
|
259
|
-
Design System
|
|
260
|
-
</p>
|
|
261
|
-
<h1 className="typography-h1 text-gray-900 mb-16">
|
|
262
|
-
Typography Specimen
|
|
263
|
-
</h1>
|
|
264
|
-
<p className="typography-body-large text-gray-700">
|
|
265
|
-
A demonstration of the typography system in a realistic content
|
|
266
|
-
layout, showing how different styles work together.
|
|
267
|
-
</p>
|
|
268
|
-
</header>
|
|
269
|
-
|
|
270
|
-
<section className="mb-48">
|
|
271
|
-
<h2 className="typography-h3 text-gray-900 mb-16">
|
|
272
|
-
The Foundation of Good Design
|
|
273
|
-
</h2>
|
|
274
|
-
<p className="typography-body-medium text-gray-800 mb-16">
|
|
275
|
-
Typography is the art and technique of arranging type to make written
|
|
276
|
-
language legible, readable, and appealing when displayed. The
|
|
277
|
-
arrangement of type involves selecting typefaces, point sizes, line
|
|
278
|
-
lengths, line-spacing, and letter-spacing.
|
|
279
|
-
</p>
|
|
280
|
-
<p className="typography-body-medium text-gray-800 mb-16">
|
|
281
|
-
The term typography is also applied to the style, arrangement, and
|
|
282
|
-
appearance of the letters, numbers, and symbols created by the
|
|
283
|
-
process. Type design is a closely related craft, sometimes considered
|
|
284
|
-
part of typography.
|
|
285
|
-
</p>
|
|
286
|
-
</section>
|
|
287
|
-
|
|
288
|
-
<section className="mb-48">
|
|
289
|
-
<h3 className="typography-h4 text-gray-900 mb-16">Key Principles</h3>
|
|
290
|
-
<p className="typography-body-medium text-gray-800 mb-16">
|
|
291
|
-
Most typefaces can be classified into one of four basic groups: those
|
|
292
|
-
with serifs, those without serifs, scripts and decorative styles.
|
|
293
|
-
</p>
|
|
294
|
-
|
|
295
|
-
<div className="bg-gray-50 p-24 rounded-8 mb-16">
|
|
296
|
-
<h4 className="typography-h5 text-gray-900 mb-8">
|
|
297
|
-
Hierarchy Matters
|
|
298
|
-
</h4>
|
|
299
|
-
<p className="typography-body-small text-gray-700">
|
|
300
|
-
Visual hierarchy guides readers through content by creating clear
|
|
301
|
-
distinctions between headings, body text, and supporting elements.
|
|
302
|
-
</p>
|
|
303
|
-
</div>
|
|
304
|
-
|
|
305
|
-
<p className="typography-body-medium text-gray-800">
|
|
306
|
-
Good typography requires attention to detail and an understanding of
|
|
307
|
-
how type creates meaning and emotion.
|
|
308
|
-
</p>
|
|
309
|
-
</section>
|
|
310
|
-
|
|
311
|
-
<footer className="border-t border-gray-200 pt-24">
|
|
312
|
-
<p className="typography-caption text-gray-500">
|
|
313
|
-
Typography specimen created for the NDS Design System
|
|
314
|
-
</p>
|
|
315
|
-
</footer>
|
|
316
|
-
</article>
|
|
317
|
-
),
|
|
318
|
-
};
|
|
319
|
-
|
|
320
|
-
/**
|
|
321
|
-
* Font comparison shows the different font families in the design system.
|
|
322
|
-
*/
|
|
323
|
-
export const FontFamilies: StoryObj = {
|
|
324
|
-
render: () => (
|
|
325
|
-
<div className="space-y-48 p-24">
|
|
326
|
-
<section>
|
|
327
|
-
<h2 className="typography-h5 text-gray-500 mb-24 uppercase tracking-wide">
|
|
328
|
-
Heading Font: Inter Tight
|
|
329
|
-
</h2>
|
|
330
|
-
<div className="space-y-16">
|
|
331
|
-
<p className="typography-h2 text-gray-900">
|
|
332
|
-
The quick brown fox jumps over the lazy dog
|
|
333
|
-
</p>
|
|
334
|
-
<p className="typography-h4 text-gray-800">
|
|
335
|
-
ABCDEFGHIJKLMNOPQRSTUVWXYZ
|
|
336
|
-
</p>
|
|
337
|
-
<p className="typography-h4 text-gray-700">
|
|
338
|
-
abcdefghijklmnopqrstuvwxyz
|
|
339
|
-
</p>
|
|
340
|
-
<p className="typography-h4 text-gray-600">0123456789</p>
|
|
341
|
-
</div>
|
|
342
|
-
</section>
|
|
343
|
-
|
|
344
|
-
<section>
|
|
345
|
-
<h2 className="typography-h5 text-gray-500 mb-24 uppercase tracking-wide">
|
|
346
|
-
Body Font: Inter
|
|
347
|
-
</h2>
|
|
348
|
-
<div className="space-y-16">
|
|
349
|
-
<p className="typography-body-large text-gray-900">
|
|
350
|
-
The quick brown fox jumps over the lazy dog
|
|
351
|
-
</p>
|
|
352
|
-
<p className="typography-body-medium text-gray-800">
|
|
353
|
-
ABCDEFGHIJKLMNOPQRSTUVWXYZ
|
|
354
|
-
</p>
|
|
355
|
-
<p className="typography-body-medium text-gray-700">
|
|
356
|
-
abcdefghijklmnopqrstuvwxyz
|
|
357
|
-
</p>
|
|
358
|
-
<p className="typography-body-medium text-gray-600">0123456789</p>
|
|
359
|
-
</div>
|
|
360
|
-
</section>
|
|
361
|
-
|
|
362
|
-
<section>
|
|
363
|
-
<h2 className="typography-h5 text-gray-500 mb-24 uppercase tracking-wide">
|
|
364
|
-
Font Weights
|
|
365
|
-
</h2>
|
|
366
|
-
<div className="grid grid-cols-2 gap-24">
|
|
367
|
-
<div>
|
|
368
|
-
<p className="typography-caption text-gray-500 mb-4">
|
|
369
|
-
Regular (400)
|
|
370
|
-
</p>
|
|
371
|
-
<p className="typography-body-medium font-normal text-gray-900">
|
|
372
|
-
The quick brown fox
|
|
373
|
-
</p>
|
|
374
|
-
</div>
|
|
375
|
-
<div>
|
|
376
|
-
<p className="typography-caption text-gray-500 mb-4">
|
|
377
|
-
Medium (500)
|
|
378
|
-
</p>
|
|
379
|
-
<p className="typography-body-medium font-medium text-gray-900">
|
|
380
|
-
The quick brown fox
|
|
381
|
-
</p>
|
|
382
|
-
</div>
|
|
383
|
-
<div>
|
|
384
|
-
<p className="typography-caption text-gray-500 mb-4">
|
|
385
|
-
Semibold (600)
|
|
386
|
-
</p>
|
|
387
|
-
<p className="typography-body-medium font-semibold text-gray-900">
|
|
388
|
-
The quick brown fox
|
|
389
|
-
</p>
|
|
390
|
-
</div>
|
|
391
|
-
<div>
|
|
392
|
-
<p className="typography-caption text-gray-500 mb-4">Bold (700)</p>
|
|
393
|
-
<p className="typography-body-medium font-bold text-gray-900">
|
|
394
|
-
The quick brown fox
|
|
395
|
-
</p>
|
|
396
|
-
</div>
|
|
397
|
-
</div>
|
|
398
|
-
</section>
|
|
399
|
-
</div>
|
|
400
|
-
),
|
|
401
|
-
};
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|