@pure-ds/storybook 0.7.25 → 0.7.26
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/.storybook/preview.js +5 -4
- package/dist/pds-reference.json +2266 -1017
- package/package.json +2 -2
- package/public/assets/js/app.js +1 -1
- package/public/assets/js/pds-ask.js +6 -6
- package/public/assets/js/pds-manager.js +104 -29
- package/public/assets/pds/components/pds-calendar.js +91 -159
- package/public/assets/pds/components/pds-daterange.js +683 -0
- package/public/assets/pds/components/pds-form.js +123 -21
- package/public/assets/pds/components/pds-rating.js +648 -0
- package/public/assets/pds/components/pds-tags.js +802 -0
- package/public/assets/pds/core/pds-ask.js +6 -6
- package/public/assets/pds/core/pds-manager.js +104 -29
- package/public/assets/pds/custom-elements.json +1099 -74
- package/public/assets/pds/pds-css-complete.json +7 -2
- package/public/assets/pds/pds-runtime-config.json +1 -1
- package/public/assets/pds/pds.css-data.json +4 -4
- package/public/assets/pds/styles/pds-components.css +96 -24
- package/public/assets/pds/styles/pds-components.css.js +192 -48
- package/public/assets/pds/styles/pds-primitives.css +6 -3
- package/public/assets/pds/styles/pds-primitives.css.js +12 -6
- package/public/assets/pds/styles/pds-styles.css +104 -29
- package/public/assets/pds/styles/pds-styles.css.js +208 -58
- package/public/assets/pds/styles/pds-utilities.css +2 -2
- package/public/assets/pds/styles/pds-utilities.css.js +4 -4
- package/public/assets/pds/vscode-custom-data.json +97 -0
- package/src/js/common/ask.js +122 -12
- package/src/js/pds-core/pds-generator.js +103 -28
- package/src/js/pds-core/pds-ontology.js +2 -2
- package/stories/components/PdsCalendar.stories.js +650 -168
- package/stories/components/PdsDaterange.stories.js +85 -0
- package/stories/components/PdsForm.Basics.stories.js +16 -0
- package/stories/components/PdsForm.ConditionalAndCalculated.stories.js +16 -0
- package/stories/components/PdsForm.CustomContent.stories.js +10 -0
- package/stories/components/PdsForm.Dialogs.stories.js +7 -0
- package/stories/components/PdsForm.Layout.stories.js +16 -0
- package/stories/components/PdsForm.SelectionAndArrays.stories.js +12 -0
- package/stories/components/PdsForm.stories.js +179 -219
- package/stories/components/PdsIcon.stories.js +17 -7
- package/stories/components/PdsOmnibox.stories.js +1 -60
- package/stories/components/PdsRating.stories.js +126 -0
- package/stories/components/PdsTags.stories.js +224 -0
- package/stories/components/PdsToaster.stories.js +1 -1
- package/stories/components/omnibox-countries-api-settings.js +63 -0
- package/stories/foundations/Colors.stories.js +6 -1
- package/stories/foundations/HTMLDefaults.stories.js +6 -6
- package/stories/foundations/Icons.stories.js +4 -4
- package/stories/foundations/MeshGradients.stories.js +13 -3
- package/stories/foundations/SmartSurfaces.stories.js +43 -31
- package/stories/foundations/Typography.stories.js +30 -108
- package/stories/foundations/ZIndex.stories.js +3 -3
- package/stories/layout/LayoutOverview.stories.js +3 -3
- package/stories/layout/LayoutSystem.stories.js +24 -18
- package/stories/patterns/BorderEffects.stories.js +28 -16
- package/stories/patterns/InteractiveStates.stories.js +39 -24
- package/stories/patterns/Utilities.stories.js +45 -23
- package/stories/primitives/ArticleLayout.stories.js +176 -0
- package/stories/primitives/Badges.stories.js +24 -8
- package/stories/primitives/Buttons.stories.js +29 -9
- package/stories/primitives/Callouts.stories.js +8 -7
- package/stories/primitives/Cards.stories.js +4 -1
- package/stories/primitives/FormElements.stories.js +8 -2
- package/stories/primitives/HtmlFormElements.stories.js +8 -2
- package/stories/primitives/HtmlFormGroups.stories.js +5 -2
- package/stories/primitives/Media.stories.js +44 -30
- package/stories/primitives/Tables.stories.js +25 -7
- package/stories/utils/PdsAsk.stories.js +17 -5
- package/stories/utils/PdsObjectApi.stories.js +16 -4
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
import { html } from "#pds/lit";
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: "Primitives/Articles",
|
|
5
|
+
tags: ["typography", "content", "article", "layout", "readability"],
|
|
6
|
+
parameters: {
|
|
7
|
+
pds: {
|
|
8
|
+
tags: ["typography", "content", "article", "layout", "readability"],
|
|
9
|
+
},
|
|
10
|
+
docs: {
|
|
11
|
+
description: {
|
|
12
|
+
component:
|
|
13
|
+
"Long-form content layout pattern using semantic article markup and PDS primitives.",
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export const ArticleLayout = {
|
|
20
|
+
name: "Article Layout",
|
|
21
|
+
render: () => html`
|
|
22
|
+
<article>
|
|
23
|
+
<header>
|
|
24
|
+
<div class="text-muted story-article-meta">Design Systems</div>
|
|
25
|
+
<h1>Building Scalable Design Systems for Modern Web Applications</h1>
|
|
26
|
+
<small class="text-muted"
|
|
27
|
+
>By Sarah Chen • <time datetime="2025-11-17">November 17, 2025</time>
|
|
28
|
+
• 8 min read</small
|
|
29
|
+
>
|
|
30
|
+
</header>
|
|
31
|
+
|
|
32
|
+
<p>
|
|
33
|
+
<strong>
|
|
34
|
+
A design system is more than a component library—it's a shared language
|
|
35
|
+
that bridges design and development, ensuring consistency and quality
|
|
36
|
+
across your entire product ecosystem.
|
|
37
|
+
</strong>
|
|
38
|
+
</p>
|
|
39
|
+
|
|
40
|
+
<figure class="flex flex-col items-center gap-sm">
|
|
41
|
+
<img
|
|
42
|
+
src="/assets/img/og.webp"
|
|
43
|
+
alt="Pure Design System logo"
|
|
44
|
+
loading="lazy"
|
|
45
|
+
/>
|
|
46
|
+
<figcaption class="text-muted">
|
|
47
|
+
Keep brand assets semantic and documented alongside implementation
|
|
48
|
+
guidance.
|
|
49
|
+
</figcaption>
|
|
50
|
+
</figure>
|
|
51
|
+
|
|
52
|
+
<p>
|
|
53
|
+
In today's fast-paced development environment, maintaining visual and
|
|
54
|
+
functional consistency across multiple products and teams is
|
|
55
|
+
increasingly challenging. Design systems have emerged as the solution,
|
|
56
|
+
providing a single source of truth for design decisions, component
|
|
57
|
+
patterns, and implementation guidelines.
|
|
58
|
+
</p>
|
|
59
|
+
|
|
60
|
+
<nav aria-label="Article sections">
|
|
61
|
+
<h2 class="h4">In this article</h2>
|
|
62
|
+
<ol>
|
|
63
|
+
<li><a href="#components">Key components</a></li>
|
|
64
|
+
<li><a href="#tokens">Design tokens</a></li>
|
|
65
|
+
<li><a href="#rollout">Rollout checklist</a></li>
|
|
66
|
+
</ol>
|
|
67
|
+
</nav>
|
|
68
|
+
|
|
69
|
+
<section id="components">
|
|
70
|
+
<h2>Key Components of a Design System</h2>
|
|
71
|
+
|
|
72
|
+
<p>
|
|
73
|
+
A comprehensive design system consists of several interconnected
|
|
74
|
+
layers, each serving a specific purpose in the overall architecture:
|
|
75
|
+
</p>
|
|
76
|
+
|
|
77
|
+
<ul>
|
|
78
|
+
<li>
|
|
79
|
+
<strong>Design Tokens:</strong> The foundational layer defining
|
|
80
|
+
colors, typography, spacing, and other atomic values
|
|
81
|
+
</li>
|
|
82
|
+
<li>
|
|
83
|
+
<strong>Component Library:</strong> Reusable UI components built
|
|
84
|
+
with consistent patterns
|
|
85
|
+
</li>
|
|
86
|
+
<li>
|
|
87
|
+
<strong>Documentation:</strong> Clear guidelines on when and how to
|
|
88
|
+
use each component
|
|
89
|
+
</li>
|
|
90
|
+
<li>
|
|
91
|
+
<strong>Tools & Resources:</strong> Figma libraries, code templates,
|
|
92
|
+
and development tools
|
|
93
|
+
</li>
|
|
94
|
+
</ul>
|
|
95
|
+
|
|
96
|
+
<blockquote>
|
|
97
|
+
<p>
|
|
98
|
+
A design system isn't a project. It's a product serving products.
|
|
99
|
+
</p>
|
|
100
|
+
<cite>Nathan Curtis, Design Systems Expert</cite>
|
|
101
|
+
</blockquote>
|
|
102
|
+
</section>
|
|
103
|
+
|
|
104
|
+
<section id="tokens">
|
|
105
|
+
<h3>Getting Started with Design Tokens</h3>
|
|
106
|
+
|
|
107
|
+
<p>
|
|
108
|
+
Design tokens are the DNA of your design system. These named values
|
|
109
|
+
represent design decisions that can be shared across platforms and
|
|
110
|
+
technologies. Instead of repeating one-off values in many places, you
|
|
111
|
+
define reusable variables like <code>--color-primary</code> that can be
|
|
112
|
+
updated globally.
|
|
113
|
+
</p>
|
|
114
|
+
|
|
115
|
+
<figure>
|
|
116
|
+
<pre
|
|
117
|
+
class="surface-base story-code-block"
|
|
118
|
+
><code>/* Design tokens in CSS */
|
|
119
|
+
:root {
|
|
120
|
+
--color-primary: var(--color-brand-500);
|
|
121
|
+
--spacing-unit: var(--spacing-1x);
|
|
122
|
+
--font-family-base: var(--font-family-sans);
|
|
123
|
+
--border-radius-md: var(--radius-md);
|
|
124
|
+
}</code></pre>
|
|
125
|
+
<figcaption class="text-muted">
|
|
126
|
+
Token-first foundation: define semantic aliases once and consume them
|
|
127
|
+
throughout components and layouts.
|
|
128
|
+
</figcaption>
|
|
129
|
+
</figure>
|
|
130
|
+
</section>
|
|
131
|
+
|
|
132
|
+
<aside class="callout callout-info" aria-label="Editorial note">
|
|
133
|
+
<h4>Editorial note</h4>
|
|
134
|
+
<p>
|
|
135
|
+
Teams that publish token naming conventions early usually reduce
|
|
136
|
+
handoff friction. Keep terminology consistent between design files and
|
|
137
|
+
code.
|
|
138
|
+
</p>
|
|
139
|
+
</aside>
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
<h4 class="story-impl-heading">Rollout Checklist</h4>
|
|
144
|
+
<ul>
|
|
145
|
+
<li>Document token categories and ownership</li>
|
|
146
|
+
<li>Ship a pilot component set with usage guidance</li>
|
|
147
|
+
<li>Track adoption with a lightweight release cadence</li>
|
|
148
|
+
</ul>
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
<p>
|
|
152
|
+
By adopting this approach, you create a flexible foundation that can
|
|
153
|
+
evolve with your product needs while maintaining consistency across
|
|
154
|
+
all touchpoints.
|
|
155
|
+
</p>
|
|
156
|
+
|
|
157
|
+
</section>
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
<footer>
|
|
161
|
+
|
|
162
|
+
<div class="flex gap-sm flex-wrap">
|
|
163
|
+
<span class="badge badge-outline badge-primary">Design Systems</span>
|
|
164
|
+
<span class="badge badge-outline badge-primary">Web Components</span>
|
|
165
|
+
<span class="badge badge-outline badge-primary">CSS Architecture</span>
|
|
166
|
+
</div>
|
|
167
|
+
|
|
168
|
+
<hr/>
|
|
169
|
+
|
|
170
|
+
<address class="text-muted">
|
|
171
|
+
<small>Written for the PDS documentation team.</small>
|
|
172
|
+
</address>
|
|
173
|
+
</footer>
|
|
174
|
+
</article>
|
|
175
|
+
`,
|
|
176
|
+
};
|
|
@@ -34,7 +34,10 @@ export const DefaultBadges = {
|
|
|
34
34
|
render: (args) => {
|
|
35
35
|
return html`
|
|
36
36
|
<div class="card">
|
|
37
|
-
<
|
|
37
|
+
<header>
|
|
38
|
+
<h3>Default Badges</h3>
|
|
39
|
+
<small class="text-muted">Baseline badge styles for lightweight labels and status markers.</small>
|
|
40
|
+
</header>
|
|
38
41
|
<div class="flex gap-md flex-wrap items-center">
|
|
39
42
|
<span class="badge">Default</span>
|
|
40
43
|
<span class="badge badge-primary">Primary</span>
|
|
@@ -56,7 +59,10 @@ export const OutlinedBadges = {
|
|
|
56
59
|
render: (args) => {
|
|
57
60
|
return html`
|
|
58
61
|
<div class="card">
|
|
59
|
-
<
|
|
62
|
+
<header>
|
|
63
|
+
<h3>Outlined Badges</h3>
|
|
64
|
+
<small class="text-muted">Use <code>.badge-outline</code> for subtle, low-emphasis badge treatments.</small>
|
|
65
|
+
</header>
|
|
60
66
|
<div class="flex gap-md flex-wrap items-center">
|
|
61
67
|
<span class="badge badge-outline badge-primary">Primary</span>
|
|
62
68
|
<span class="badge badge-outline badge-secondary">Secondary</span>
|
|
@@ -77,7 +83,10 @@ export const BadgeSizes = {
|
|
|
77
83
|
render: (args) => {
|
|
78
84
|
return html`
|
|
79
85
|
<div class="card">
|
|
80
|
-
<
|
|
86
|
+
<header>
|
|
87
|
+
<h3>Badge Sizes</h3>
|
|
88
|
+
<small class="text-muted">Scale badges with <code>.badge-sm</code> and <code>.badge-lg</code> for density and emphasis.</small>
|
|
89
|
+
</header>
|
|
81
90
|
<div class="flex gap-md flex-wrap items-center">
|
|
82
91
|
<span class="badge badge-primary badge-sm">Small</span>
|
|
83
92
|
<span class="badge badge-primary">Default</span>
|
|
@@ -95,7 +104,10 @@ export const Pills = {
|
|
|
95
104
|
render: (args) => {
|
|
96
105
|
return html`
|
|
97
106
|
<div class="card">
|
|
98
|
-
<
|
|
107
|
+
<header>
|
|
108
|
+
<h3>Pills</h3>
|
|
109
|
+
<small class="text-muted">Rounded pill variants for tags, categories, and topic labels.</small>
|
|
110
|
+
</header>
|
|
99
111
|
<div class="flex gap-md flex-wrap items-center">
|
|
100
112
|
<span class="pill badge-primary">React</span>
|
|
101
113
|
<span class="pill badge-secondary">Vue</span>
|
|
@@ -116,8 +128,12 @@ export const AllVariations = {
|
|
|
116
128
|
render: (args) => {
|
|
117
129
|
return html`
|
|
118
130
|
<div class="card gap-lg">
|
|
131
|
+
<header>
|
|
132
|
+
<h3>All Variations</h3>
|
|
133
|
+
<small class="text-muted">Side-by-side comparison of badge styles, sizes, and pill variants.</small>
|
|
134
|
+
</header>
|
|
119
135
|
<section class="stack-md">
|
|
120
|
-
<
|
|
136
|
+
<h4>Default Badges</h4>
|
|
121
137
|
<div class="flex gap-md flex-wrap items-center">
|
|
122
138
|
<span class="badge">Default</span>
|
|
123
139
|
<span class="badge badge-primary">Primary</span>
|
|
@@ -130,7 +146,7 @@ export const AllVariations = {
|
|
|
130
146
|
</section>
|
|
131
147
|
|
|
132
148
|
<section class="stack-md">
|
|
133
|
-
<
|
|
149
|
+
<h4>Outlined Badges</h4>
|
|
134
150
|
<div class="flex gap-md flex-wrap items-center">
|
|
135
151
|
<span class="badge badge-outline badge-primary">Primary</span>
|
|
136
152
|
<span class="badge badge-outline badge-secondary">Secondary</span>
|
|
@@ -142,7 +158,7 @@ export const AllVariations = {
|
|
|
142
158
|
</section>
|
|
143
159
|
|
|
144
160
|
<section class="stack-md">
|
|
145
|
-
<
|
|
161
|
+
<h4>Badge Sizes</h4>
|
|
146
162
|
<div class="flex gap-md flex-wrap items-center">
|
|
147
163
|
<span class="badge badge-primary badge-sm">Small</span>
|
|
148
164
|
<span class="badge badge-primary">Default</span>
|
|
@@ -151,7 +167,7 @@ export const AllVariations = {
|
|
|
151
167
|
</section>
|
|
152
168
|
|
|
153
169
|
<section class="stack-md">
|
|
154
|
-
<
|
|
170
|
+
<h4>Pills</h4>
|
|
155
171
|
<div class="flex gap-md flex-wrap items-center">
|
|
156
172
|
<span class="pill badge-primary">React</span>
|
|
157
173
|
<span class="pill badge-secondary">Vue</span>
|
|
@@ -17,11 +17,16 @@ export default {
|
|
|
17
17
|
|
|
18
18
|
export const ButtonVariants = () => html`
|
|
19
19
|
<div class="card">
|
|
20
|
-
<
|
|
20
|
+
<header>
|
|
21
|
+
<h3>Button Variants</h3>
|
|
22
|
+
<small class="text-muted">Core button styles for primary, secondary, outline, and semantic actions.</small>
|
|
23
|
+
</header>
|
|
21
24
|
<div class="flex gap-sm flex-wrap">
|
|
22
25
|
<button class="btn-primary">Primary</button>
|
|
23
26
|
<button class="btn-secondary">Secondary</button>
|
|
24
27
|
<button class="btn-outline">Outline</button>
|
|
28
|
+
<button class="btn-danger">Danger</button>
|
|
29
|
+
<button class="btn-danger btn-outline">Danger Outline</button>
|
|
25
30
|
<button class="btn-primary" disabled>Disabled</button>
|
|
26
31
|
</div>
|
|
27
32
|
</div>
|
|
@@ -31,7 +36,10 @@ ButtonVariants.storyName = 'Button Variants';
|
|
|
31
36
|
|
|
32
37
|
export const ButtonSizes = () => html`
|
|
33
38
|
<div class="card">
|
|
34
|
-
<
|
|
39
|
+
<header>
|
|
40
|
+
<h3>Button Sizes</h3>
|
|
41
|
+
<small class="text-muted">Scale actions with <code>.btn-sm</code> and <code>.btn-lg</code> size utilities.</small>
|
|
42
|
+
</header>
|
|
35
43
|
<div class="flex gap-sm flex-wrap items-center">
|
|
36
44
|
<button class="btn-primary btn-sm">Small</button>
|
|
37
45
|
<button class="btn-primary">Default</button>
|
|
@@ -44,8 +52,12 @@ ButtonSizes.storyName = 'Button Sizes';
|
|
|
44
52
|
|
|
45
53
|
export const IconButtons = () => html`
|
|
46
54
|
<div class="card gap-lg">
|
|
47
|
-
<
|
|
55
|
+
<header>
|
|
48
56
|
<h3>Buttons with Icons</h3>
|
|
57
|
+
<small class="text-muted">Combine labels and icons to improve clarity and scanability.</small>
|
|
58
|
+
</header>
|
|
59
|
+
<section class="stack-md">
|
|
60
|
+
<h4>Buttons with Icons</h4>
|
|
49
61
|
<div class="flex gap-sm flex-wrap">
|
|
50
62
|
<button class="btn-primary">
|
|
51
63
|
<pds-icon icon="download"></pds-icon>
|
|
@@ -67,7 +79,7 @@ export const IconButtons = () => html`
|
|
|
67
79
|
</section>
|
|
68
80
|
|
|
69
81
|
<section class="stack-md">
|
|
70
|
-
<
|
|
82
|
+
<h4>Icon on Right</h4>
|
|
71
83
|
<div class="flex gap-sm flex-wrap">
|
|
72
84
|
<button class="btn-primary">
|
|
73
85
|
<span>Next</span>
|
|
@@ -132,8 +144,12 @@ IconOnlyButtons.storyName = 'Icon-Only Buttons';
|
|
|
132
144
|
|
|
133
145
|
export const ButtonGroups = () => html`
|
|
134
146
|
<div class="card gap-lg">
|
|
135
|
-
<
|
|
147
|
+
<header>
|
|
136
148
|
<h3>Button Groups</h3>
|
|
149
|
+
<small class="text-muted">Cluster related actions for faster decision-making.</small>
|
|
150
|
+
</header>
|
|
151
|
+
<section class="stack-md">
|
|
152
|
+
<h4>Button Groups</h4>
|
|
137
153
|
<div class="flex gap-sm">
|
|
138
154
|
<button class="btn-primary">
|
|
139
155
|
<pds-icon icon="download"></pds-icon>
|
|
@@ -147,7 +163,7 @@ export const ButtonGroups = () => html`
|
|
|
147
163
|
</section>
|
|
148
164
|
|
|
149
165
|
<section class="stack-md">
|
|
150
|
-
<
|
|
166
|
+
<h4>Icon-Only Group</h4>
|
|
151
167
|
<div class="flex gap-sm">
|
|
152
168
|
<button class="icon-only btn-outline">
|
|
153
169
|
<pds-icon icon="text-align-left" label="Align left"></pds-icon>
|
|
@@ -167,8 +183,12 @@ ButtonGroups.storyName = 'Button Groups';
|
|
|
167
183
|
|
|
168
184
|
export const AllSizesCombinations = () => html`
|
|
169
185
|
<div class="card gap-lg">
|
|
186
|
+
<header>
|
|
187
|
+
<h3>All Sizes & Combinations</h3>
|
|
188
|
+
<small class="text-muted">Compare all button variants across small, default, and large sizes.</small>
|
|
189
|
+
</header>
|
|
170
190
|
<section class="stack-md">
|
|
171
|
-
<
|
|
191
|
+
<h4>Small Buttons</h4>
|
|
172
192
|
<div class="flex gap-sm flex-wrap">
|
|
173
193
|
<button class="btn-primary btn-sm">Primary</button>
|
|
174
194
|
<button class="btn-secondary btn-sm">Secondary</button>
|
|
@@ -184,7 +204,7 @@ export const AllSizesCombinations = () => html`
|
|
|
184
204
|
</section>
|
|
185
205
|
|
|
186
206
|
<section class="stack-md">
|
|
187
|
-
<
|
|
207
|
+
<h4>Default Buttons</h4>
|
|
188
208
|
<div class="flex gap-sm flex-wrap">
|
|
189
209
|
<button class="btn-primary">Primary</button>
|
|
190
210
|
<button class="btn-secondary">Secondary</button>
|
|
@@ -200,7 +220,7 @@ export const AllSizesCombinations = () => html`
|
|
|
200
220
|
</section>
|
|
201
221
|
|
|
202
222
|
<section class="stack-md">
|
|
203
|
-
<
|
|
223
|
+
<h4>Large Buttons</h4>
|
|
204
224
|
<div class="flex gap-sm flex-wrap">
|
|
205
225
|
<button class="btn-primary btn-lg">Primary</button>
|
|
206
226
|
<button class="btn-secondary btn-lg">Secondary</button>
|
|
@@ -17,7 +17,7 @@ export default {
|
|
|
17
17
|
|
|
18
18
|
export const Default = () => html`
|
|
19
19
|
<header class="card">
|
|
20
|
-
<
|
|
20
|
+
<h3>Basic Callouts</h3>
|
|
21
21
|
<small class="text-muted">Simple callout messages with semantic color variants.</small>
|
|
22
22
|
</header>
|
|
23
23
|
|
|
@@ -33,7 +33,7 @@ Default.storyName = 'Basic Callouts';
|
|
|
33
33
|
|
|
34
34
|
export const CalloutsWithIcons = () => html`
|
|
35
35
|
<header class="card">
|
|
36
|
-
<
|
|
36
|
+
<h3>Callouts with Icons</h3>
|
|
37
37
|
<small class="text-muted">Use <code>.callout-icon</code> to add visual context with icons.</small>
|
|
38
38
|
</header>
|
|
39
39
|
|
|
@@ -80,7 +80,7 @@ CalloutsWithIcons.storyName = 'With Icons';
|
|
|
80
80
|
|
|
81
81
|
export const CalloutsWithTitles = () => html`
|
|
82
82
|
<header class="card">
|
|
83
|
-
<
|
|
83
|
+
<h3>Callouts with Titles</h3>
|
|
84
84
|
<small class="text-muted">Use <code>.callout-title</code> on text elements for consistent title rendering across presets.</small>
|
|
85
85
|
</header>
|
|
86
86
|
|
|
@@ -131,7 +131,7 @@ CalloutsWithTitles.storyName = 'With Titles';
|
|
|
131
131
|
|
|
132
132
|
export const DismissibleCallouts = () => html`
|
|
133
133
|
<header class="card">
|
|
134
|
-
<
|
|
134
|
+
<h3>Dismissible Callouts</h3>
|
|
135
135
|
<small class="text-muted">
|
|
136
136
|
Add <code>.callout-dismissible</code> and <code>.callout-close</code> for closeable Callouts.
|
|
137
137
|
Click the × to dismiss (demo only, JS required for actual dismissal).
|
|
@@ -171,9 +171,10 @@ export const DismissibleCallouts = () => html`
|
|
|
171
171
|
DismissibleCallouts.storyName = 'Dismissible';
|
|
172
172
|
|
|
173
173
|
export const CalloutsReference = () => html`
|
|
174
|
-
<
|
|
175
|
-
<
|
|
176
|
-
|
|
174
|
+
<header class="card">
|
|
175
|
+
<h3>Callout Classes Reference</h3>
|
|
176
|
+
<small class="text-muted">Quick overview of the available callout utility classes and behaviors.</small>
|
|
177
|
+
</header>
|
|
177
178
|
|
|
178
179
|
<table class="table-bordered table-compact">
|
|
179
180
|
<thead>
|
|
@@ -271,7 +271,10 @@ ComplexCards.storyName = "Complex Cards";
|
|
|
271
271
|
|
|
272
272
|
export const CardVariantsReference = () => html`
|
|
273
273
|
<div class="card">
|
|
274
|
-
<
|
|
274
|
+
<header>
|
|
275
|
+
<h3>Card Classes Reference</h3>
|
|
276
|
+
<small class="text-muted">Reference for card primitives and common composition patterns.</small>
|
|
277
|
+
</header>
|
|
275
278
|
|
|
276
279
|
<table class="table-bordered">
|
|
277
280
|
<thead>
|
|
@@ -53,6 +53,10 @@ export const Default = {
|
|
|
53
53
|
return html`
|
|
54
54
|
${formsStoryStyles}
|
|
55
55
|
<div class="card">
|
|
56
|
+
<header>
|
|
57
|
+
<h3>Form Elements</h3>
|
|
58
|
+
<small class="text-muted">Core HTML controls styled with PDS primitives for manual form composition.</small>
|
|
59
|
+
</header>
|
|
56
60
|
<form class="story-form-max" @submit=${handleSubmit}>
|
|
57
61
|
<label>
|
|
58
62
|
<span data-label>Text Input</span>
|
|
@@ -92,8 +96,10 @@ export const InputsWithIcons = {
|
|
|
92
96
|
return html`
|
|
93
97
|
${formsStoryStyles}
|
|
94
98
|
<div class="card">
|
|
95
|
-
<
|
|
96
|
-
|
|
99
|
+
<header>
|
|
100
|
+
<h3>Inputs with Icons</h3>
|
|
101
|
+
<small class="text-muted">Enhance inputs with icons positioned at the start or end for better context.</small>
|
|
102
|
+
</header>
|
|
97
103
|
|
|
98
104
|
<div class="stack-lg story-form-max">
|
|
99
105
|
<label>
|
|
@@ -54,6 +54,10 @@ export const HtmlElementsDefault = {
|
|
|
54
54
|
return html`
|
|
55
55
|
${formsStoryStyles}
|
|
56
56
|
<div class="card">
|
|
57
|
+
<header>
|
|
58
|
+
<h3>Form Elements</h3>
|
|
59
|
+
<small class="text-muted">Core HTML controls styled with PDS primitives for manual form composition.</small>
|
|
60
|
+
</header>
|
|
57
61
|
<form class="story-form-max" @submit=${handleSubmit}>
|
|
58
62
|
<label>
|
|
59
63
|
<span data-label>Text Input</span>
|
|
@@ -94,8 +98,10 @@ export const HtmlElementsInputsWithIcons = {
|
|
|
94
98
|
return html`
|
|
95
99
|
${formsStoryStyles}
|
|
96
100
|
<div class="card">
|
|
97
|
-
<
|
|
98
|
-
|
|
101
|
+
<header>
|
|
102
|
+
<h3>Inputs with Icons</h3>
|
|
103
|
+
<small class="text-muted">Enhance inputs with icons positioned at the start or end for better context.</small>
|
|
104
|
+
</header>
|
|
99
105
|
|
|
100
106
|
<div class="stack-lg story-form-max">
|
|
101
107
|
<label>
|
|
@@ -331,7 +331,10 @@ ToggleSwitches.storyName = "Toggle Switches";
|
|
|
331
331
|
export const CustomLayout = () => html`
|
|
332
332
|
${styles}
|
|
333
333
|
<div class="card">
|
|
334
|
-
<
|
|
334
|
+
<header>
|
|
335
|
+
<h3>Custom Layout with Flex Utilities</h3>
|
|
336
|
+
<small class="text-muted">Override default group flow with flex utilities for horizontal and wrapped layouts.</small>
|
|
337
|
+
</header>
|
|
335
338
|
<div class="callout callout-info">
|
|
336
339
|
Override default column layout using standard CSS flex properties
|
|
337
340
|
</div>
|
|
@@ -457,7 +460,7 @@ export const AccessibleFormGroups = {
|
|
|
457
460
|
return html`
|
|
458
461
|
<div class="card">
|
|
459
462
|
<header>
|
|
460
|
-
<
|
|
463
|
+
<h3>Accessibility Features</h3>
|
|
461
464
|
<small class="text-muted"
|
|
462
465
|
>Form groups include proper ARIA attributes, semantic HTML, and
|
|
463
466
|
keyboard navigation support.</small
|
|
@@ -36,6 +36,10 @@ const mediaStoryStyles = html`
|
|
|
36
36
|
export const ResponsiveImages = () => html`
|
|
37
37
|
${mediaStoryStyles}
|
|
38
38
|
<div class="stack-md">
|
|
39
|
+
<header>
|
|
40
|
+
<h3>Responsive Images</h3>
|
|
41
|
+
<small class="text-muted">Semantic figures with responsive images and descriptive captions.</small>
|
|
42
|
+
</header>
|
|
39
43
|
<div class="grid grid-auto-md gap-lg">
|
|
40
44
|
<figure class="media-figure">
|
|
41
45
|
<img
|
|
@@ -69,7 +73,10 @@ ResponsiveImages.storyName = 'Responsive Images';
|
|
|
69
73
|
export const ImageGallery = () => html`
|
|
70
74
|
${mediaStoryStyles}
|
|
71
75
|
<div class="stack-md">
|
|
72
|
-
<
|
|
76
|
+
<header>
|
|
77
|
+
<h3>Image Gallery Grid</h3>
|
|
78
|
+
<small class="text-muted">Uniform thumbnail gallery layout using PDS media utilities.</small>
|
|
79
|
+
</header>
|
|
73
80
|
<div class="grid grid-auto-sm gap-sm">
|
|
74
81
|
${Array.from({ length: 8 }, (_, i) => html`
|
|
75
82
|
<img
|
|
@@ -110,10 +117,10 @@ export const ScrollRowGallery = () => html`
|
|
|
110
117
|
ScrollRowGallery.storyName = 'Horizontal Scroll Row';
|
|
111
118
|
|
|
112
119
|
export const ImageRoundedUtilities = () => html`
|
|
113
|
-
<
|
|
114
|
-
<
|
|
115
|
-
<
|
|
116
|
-
</
|
|
120
|
+
<header class="card">
|
|
121
|
+
<h3>Image Rounded Utilities</h3>
|
|
122
|
+
<small class="text-muted">Apply consistent border-radius to images with <code>.img-rounded-*</code> classes.</small>
|
|
123
|
+
</header>
|
|
117
124
|
|
|
118
125
|
<div class="grid grid-auto-sm gap-lg">
|
|
119
126
|
<figure>
|
|
@@ -166,13 +173,13 @@ export const ImageRoundedUtilities = () => html`
|
|
|
166
173
|
ImageRoundedUtilities.storyName = 'Rounded Utilities';
|
|
167
174
|
|
|
168
175
|
export const ImageGalleryClass = () => html`
|
|
169
|
-
<
|
|
170
|
-
<
|
|
171
|
-
<
|
|
176
|
+
<header class="card">
|
|
177
|
+
<h3>.img-gallery Utility</h3>
|
|
178
|
+
<small class="text-muted">
|
|
172
179
|
The <code>.img-gallery</code> class creates square, cropped thumbnails perfect for grid galleries.
|
|
173
180
|
Images are set to <code>aspect-ratio: 1</code> and <code>object-fit: cover</code>.
|
|
174
|
-
</
|
|
175
|
-
</
|
|
181
|
+
</small>
|
|
182
|
+
</header>
|
|
176
183
|
|
|
177
184
|
<div class="grid grid-auto-sm gap-md">
|
|
178
185
|
${Array.from({ length: 8 }, (_, i) => html`
|
|
@@ -188,12 +195,12 @@ export const ImageGalleryClass = () => html`
|
|
|
188
195
|
ImageGalleryClass.storyName = '.img-gallery';
|
|
189
196
|
|
|
190
197
|
export const InlineImages = () => html`
|
|
191
|
-
<
|
|
192
|
-
<
|
|
193
|
-
<
|
|
198
|
+
<header class="card">
|
|
199
|
+
<h3>Inline Images</h3>
|
|
200
|
+
<small class="text-muted">
|
|
194
201
|
Use <code>.img-inline</code> for small images within text flow, like avatars or icons.
|
|
195
|
-
</
|
|
196
|
-
</
|
|
202
|
+
</small>
|
|
203
|
+
</header>
|
|
197
204
|
|
|
198
205
|
<div class="card">
|
|
199
206
|
<p>
|
|
@@ -231,12 +238,12 @@ export const InlineImages = () => html`
|
|
|
231
238
|
InlineImages.storyName = 'Inline Images';
|
|
232
239
|
|
|
233
240
|
export const VideoResponsive = () => html`
|
|
234
|
-
<
|
|
235
|
-
<
|
|
236
|
-
<
|
|
241
|
+
<header class="card">
|
|
242
|
+
<h3>.video-responsive Utility</h3>
|
|
243
|
+
<small class="text-muted">
|
|
237
244
|
The <code>.video-responsive</code> class constrains video width and applies consistent styling.
|
|
238
|
-
</
|
|
239
|
-
</
|
|
245
|
+
</small>
|
|
246
|
+
</header>
|
|
240
247
|
|
|
241
248
|
<video
|
|
242
249
|
class="story-video-responsive"
|
|
@@ -264,12 +271,12 @@ export const VideoResponsive = () => html`
|
|
|
264
271
|
VideoResponsive.storyName = '.video-responsive';
|
|
265
272
|
|
|
266
273
|
export const FigureResponsive = () => html`
|
|
267
|
-
<
|
|
268
|
-
<
|
|
269
|
-
<
|
|
274
|
+
<header class="card">
|
|
275
|
+
<h3>.figure-responsive Utility</h3>
|
|
276
|
+
<small class="text-muted">
|
|
270
277
|
Apply <code>.figure-responsive</code> to figures for full-width responsive images with captions.
|
|
271
|
-
</
|
|
272
|
-
</
|
|
278
|
+
</small>
|
|
279
|
+
</header>
|
|
273
280
|
|
|
274
281
|
<figure class="figure-responsive">
|
|
275
282
|
<img
|
|
@@ -287,7 +294,10 @@ FigureResponsive.storyName = '.figure-responsive';
|
|
|
287
294
|
export const VideoElement = () => html`
|
|
288
295
|
${mediaStoryStyles}
|
|
289
296
|
<div class="stack-md media-video-shell">
|
|
290
|
-
<
|
|
297
|
+
<header>
|
|
298
|
+
<h3>Video Element with Controls</h3>
|
|
299
|
+
<small class="text-muted">Native video playback with responsive styling and semantic caption support.</small>
|
|
300
|
+
</header>
|
|
291
301
|
<figure class="video-container">
|
|
292
302
|
<video
|
|
293
303
|
class="video-responsive shadow-md"
|
|
@@ -312,7 +322,10 @@ VideoElement.storyName = 'Video Element';
|
|
|
312
322
|
export const MixedMedia = () => html`
|
|
313
323
|
${mediaStoryStyles}
|
|
314
324
|
<div class="stack-md">
|
|
315
|
-
<
|
|
325
|
+
<header>
|
|
326
|
+
<h3>Mixed Media Layout</h3>
|
|
327
|
+
<small class="text-muted">Combine featured media and supporting thumbnails in a balanced content layout.</small>
|
|
328
|
+
</header>
|
|
316
329
|
|
|
317
330
|
<div class="grid grid-cols-2 gap-lg">
|
|
318
331
|
<div>
|
|
@@ -350,9 +363,10 @@ export const MixedMedia = () => html`
|
|
|
350
363
|
MixedMedia.storyName = 'Mixed Media Layout';
|
|
351
364
|
|
|
352
365
|
export const MediaReference = () => html`
|
|
353
|
-
<
|
|
354
|
-
<
|
|
355
|
-
|
|
366
|
+
<header class="card">
|
|
367
|
+
<h3>Media Utilities Reference</h3>
|
|
368
|
+
<small class="text-muted">Reference table for image, figure, and video utility classes.</small>
|
|
369
|
+
</header>
|
|
356
370
|
|
|
357
371
|
<table class="table-bordered">
|
|
358
372
|
<thead>
|