@pure-ds/storybook 0.4.15 → 0.4.17

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.
Files changed (59) hide show
  1. package/.storybook/addons/html-preview/Panel.jsx +75 -23
  2. package/.storybook/addons/html-preview/preview.js +27 -1
  3. package/.storybook/docs.css +7 -0
  4. package/.storybook/htmlPreview.css +6 -6
  5. package/.storybook/htmlPreview.js +27 -1
  6. package/.storybook/manager-head.html +13 -0
  7. package/.storybook/preview-head.html +5 -0
  8. package/.storybook/preview.js +1 -1
  9. package/dist/pds-reference.json +2 -7
  10. package/package.json +2 -2
  11. package/public/assets/js/app.js +617 -10565
  12. package/public/assets/js/lit.js +3 -1048
  13. package/public/assets/js/pds.js +396 -7354
  14. package/public/assets/pds/components/pds-calendar.js +1 -1
  15. package/public/assets/pds/custom-elements.json +263 -18
  16. package/public/assets/pds/pds-runtime-config.json +1 -1
  17. package/public/assets/pds/styles/pds-components.css +83 -221
  18. package/public/assets/pds/styles/pds-components.css.js +166 -442
  19. package/public/assets/pds/styles/pds-styles.css +240 -437
  20. package/public/assets/pds/styles/pds-styles.css.js +479 -881
  21. package/public/assets/pds/styles/pds-utilities.css +151 -214
  22. package/public/assets/pds/styles/pds-utilities.css.js +302 -428
  23. package/src/js/pds-configurator/pds-demo.js +11 -1
  24. package/src/js/pds-core/pds-generator.js +88 -38
  25. package/src/js/pds-core/pds-ontology.js +1 -1
  26. package/stories/components/PdsCalendar.stories.js +2 -2
  27. package/stories/components/PdsDrawer.stories.js +15 -15
  28. package/stories/components/PdsJsonform.stories.js +78 -0
  29. package/stories/components/PdsRichtext.stories.js +4 -17
  30. package/stories/components/PdsScrollrow.stories.js +224 -72
  31. package/stories/components/PdsSplitpanel.stories.js +63 -28
  32. package/stories/components/PdsTabstrip.stories.js +7 -7
  33. package/stories/enhancements/Accordion.stories.js +2 -2
  34. package/stories/enhancements/Dropdowns.stories.js +13 -10
  35. package/stories/enhancements/RangeSliders.stories.js +9 -9
  36. package/stories/enhancements/RequiredFields.stories.js +8 -8
  37. package/stories/enhancements/Toggles.stories.js +45 -36
  38. package/stories/enhancements/_enhancement-header.js +2 -2
  39. package/stories/foundations/Colors.stories.js +13 -13
  40. package/stories/foundations/HTMLDefaults.stories.js +4 -4
  41. package/stories/foundations/Icons.stories.js +123 -288
  42. package/stories/foundations/MeshGradients.stories.js +161 -250
  43. package/stories/foundations/SmartSurfaces.stories.js +147 -64
  44. package/stories/foundations/Spacing.stories.js +30 -30
  45. package/stories/foundations/Typography.stories.js +352 -723
  46. package/stories/foundations/ZIndex.stories.js +124 -141
  47. package/stories/layout/LayoutOverview.stories.js +343 -250
  48. package/stories/layout/LayoutSystem.stories.js +60 -76
  49. package/stories/patterns/InteractiveStates.stories.js +29 -29
  50. package/stories/patterns/Utilities.stories.js +17 -5
  51. package/stories/primitives/Alerts.stories.js +6 -6
  52. package/stories/primitives/Cards.stories.js +22 -11
  53. package/stories/primitives/Forms.stories.js +17 -8
  54. package/stories/primitives/Media.stories.js +23 -20
  55. package/stories/utilities/Backdrop.stories.js +68 -27
  56. package/stories/utils/PdsAsk.stories.js +1 -1
  57. package/public/assets/js/app.js.map +0 -7
  58. package/public/assets/js/lit.js.map +0 -7
  59. package/public/assets/js/pds.js.map +0 -7
@@ -1,4 +1,44 @@
1
1
  import { html } from "lit";
2
+ import { highlight, getCurrentTheme, preloadShiki } from "../utils/shiki.js";
3
+
4
+ // Pre-load Shiki
5
+ preloadShiki();
6
+
7
+ const layoutOverviewStyles = html`
8
+ <style>
9
+ .story-compare-grid { margin-block: var(--spacing-6); }
10
+ .story-code-block { font-size: var(--font-size-sm); overflow-x: auto; }
11
+ .story-note { margin-block-start: var(--spacing-3); }
12
+ .story-list { margin-block: var(--spacing-4); }
13
+ .story-checkmark { font-size: var(--font-size-xl); }
14
+ </style>
15
+ `;
16
+
17
+ // Code samples for comparison
18
+ const tailwindCode = `<div class="p-4 mt-2 rounded-lg shadow-md bg-white
19
+ flex flex-col gap-2">
20
+ <div class="text-lg font-bold">
21
+ A Nice Box With a Title
22
+ </div>
23
+ <div class="text-sm text-gray-500">
24
+ The subtitle of the item
25
+ </div>
26
+ <div class="text-base">
27
+ The body of the item with some descriptive text.
28
+ </div>
29
+ </div>`;
30
+
31
+ const pdsCode = `<article class="card surface-overlay">
32
+ <header>
33
+ <h3>A Nice Box With a Title</h3>
34
+ <small class="text-muted">
35
+ The subtitle of the item
36
+ </small>
37
+ </header>
38
+ <p>
39
+ The body of the item with some descriptive text.
40
+ </p>
41
+ </article>`;
2
42
 
3
43
  export default {
4
44
  title: "Foundations/Layout",
@@ -12,277 +52,330 @@ export default {
12
52
  },
13
53
  };
14
54
 
15
- export const LayoutIntroduction = () => html`
16
- <header>
17
- <h1>Layout in PDS</h1>
18
- <h3 class="text-muted">
19
- Power through composition of high-level concepts, not atomic control.
20
- </h3>
21
- </header>
55
+ export const LayoutIntroduction = () => {
56
+ const container = document.createElement("div");
57
+ container.classList.add("stack-lg");
58
+
59
+ container.innerHTML = `
60
+ <style>
61
+ .story-render-result {
62
+ display: flex;
63
+ justify-content: center;
64
+
65
+ margin: var(--spacing-4) 0;
66
+ padding: var(--spacing-4);
22
67
 
23
- <article class="card surface-translucent-50">
24
- <h2>Why PDS Avoids Low-Level Utilities</h2>
25
-
26
- <p>
27
- Frameworks like Tailwind offer atomic utilities for every CSS property:
28
- <code>.p-4</code>, <code>.mt-2</code>, <code>.text-sm</code>,
29
- <code>.relative</code>. This approach has a hidden cost:
30
- <strong>DIV soup</strong>.
31
- </p>
32
-
33
- <div
34
- class="grid grid-cols-2 gap-lg surface-translucent-50"
35
- style="margin: var(--spacing-6) 0;"
36
- >
37
- <div class="card surface-subtle">
38
- <h3>❌ Tailwind Approach</h3>
39
- <pre
40
- style="font-size: var(--font-size-sm); overflow-x: auto;"
41
- ><code>&lt;div class="p-4 mt-2 rounded-lg
42
- bg-white shadow-md flex
43
- flex-col gap-2"&gt;
44
- &lt;div class="text-lg font-bold"&gt;
45
- Title
46
- &lt;/div&gt;
47
- &lt;div class="text-sm text-gray-500"&gt;
48
- Description
49
- &lt;/div&gt;
50
- &lt;/div&gt;</code></pre>
51
- <p class="text-muted" style="margin-top: var(--spacing-3);">
52
- 8 utility classes, no semantic meaning, hard to maintain.
53
- </p>
54
- </div>
68
+ > .card {
69
+ width: 400px
70
+ ;}
71
+ }
72
+ </style>
73
+ ${layoutOverviewStyles.strings[0]}
74
+ <header>
75
+ <h1>Layout in PDS</h1>
76
+ <h4 class="text-muted">
77
+ Power through composition of high-level concepts, not atomic control.
78
+ </h4>
79
+ </header>
55
80
 
56
- <div class="card surface-elevated">
57
- <h3>✅ PDS Approach</h3>
58
- <pre
59
- style="font-size: var(--font-size-sm); overflow-x: auto;"
60
- ><code>&lt;article class="card"&gt;
61
- &lt;h3&gt;Title&lt;/h3&gt;
62
- &lt;p class="text-muted"&gt;
63
- Description
64
- &lt;/p&gt;
65
- &lt;/article&gt;</code></pre>
66
- <p class="text-muted" style="margin-top: var(--spacing-3);">
67
- Semantic HTML + 1 primitive class. Self-documenting.
68
- </p>
69
- </div>
70
- </div>
71
- </article>
72
-
73
- <article class="card">
74
- <h2>The PDS Layout Hierarchy</h2>
75
-
76
- <table class="table-bordered">
77
- <thead>
78
- <tr>
79
- <th>Level</th>
80
- <th>What</th>
81
- <th>Examples</th>
82
- <th>Use When</th>
83
- </tr>
84
- </thead>
85
- <tbody>
86
- <tr>
87
- <td><strong>1. Semantic HTML</strong></td>
88
- <td>Native elements with built-in styling</td>
89
- <td>
90
- <code>&lt;article&gt;</code>, <code>&lt;nav&gt;</code>,
91
- <code>&lt;section&gt;</code>, <code>&lt;header&gt;</code>
92
- </td>
93
- <td>Always start here</td>
94
- </tr>
95
- <tr>
96
- <td><strong>2. Primitives</strong></td>
97
- <td>Single-class components with full styling</td>
98
- <td><code>.card</code>, <code>.alert</code>, <code>.badge</code></td>
99
- <td>Common UI patterns</td>
100
- </tr>
101
- <tr>
102
- <td><strong>3. Layout Patterns</strong></td>
103
- <td>High-level structural utilities</td>
104
- <td>
105
- <code>.container</code>, <code>.grid-auto-md</code>,
106
- <code>.stack-md</code>
107
- </td>
108
- <td>Page structure</td>
109
- </tr>
110
- <tr>
111
- <td><strong>4. Composable Utilities</strong></td>
112
- <td>Minimal, purposeful utilities</td>
113
- <td><code>.flex</code>, <code>.gap-md</code>, <code>.grow</code></td>
114
- <td>Custom compositions</td>
115
- </tr>
116
- <tr>
117
- <td><strong>5. Inline Styles</strong></td>
118
- <td>One-off values using tokens</td>
119
- <td><code>style="margin-top: var(--spacing-4)"</code></td>
120
- <td>Rare exceptions</td>
121
- </tr>
122
- </tbody>
123
- </table>
124
- </article>
125
-
126
- <article class="card">
127
- <h2>Why PDS Has <em>Some</em> Utilities</h2>
128
-
129
- <p>
130
- PDS isn't anti-utility. It's anti-<em>atomic</em>. We include utilities
131
- that:
132
- </p>
133
-
134
- <div class="stack-md" style="margin: var(--spacing-4) 0;">
135
- <div class="flex gap-md items-start">
136
- <span style="font-size: var(--font-size-xl);">✓</span>
137
- <div>
138
- <strong>Solve common layout problems</strong>
139
- <p class="text-muted">
140
- <code>.flex</code>, <code>.grid</code>, <code>.gap-*</code> —
141
- fundamental building blocks
81
+ <article class="card surface-translucent-75">
82
+ <h2>Why PDS Avoids Low-Level Utilities</h2>
83
+
84
+ <p>
85
+ Frameworks like Tailwind offer atomic utilities for every CSS property:
86
+ <code>.p-4</code>, <code>.mt-2</code>, <code>.text-sm</code>,
87
+ <code>.relative</code>.
88
+ </p>
89
+
90
+ <p>
91
+ While this approach offers maximum flexibility, it comes at a steep cost:
92
+ bloated HTML, poor maintainability, and a lack of semantic meaning.
93
+ </p>
94
+
95
+ <header>
96
+ <h3>Let's compare Tailwind and PDS styling</h3>
97
+ <small>Look at the box below</small>
98
+ </header>
99
+
100
+ <div class="story-render-result">
101
+ <article class="card surface-overlay">
102
+ <header>
103
+ <h3>A Nice Box With a Title</h3>
104
+ <small class="text-muted">The subtitle of the item</small>
105
+ </header>
106
+ <p>
107
+ The body of the item with some descriptive text.
142
108
  </p>
143
- </div>
144
- </div>
109
+ </article>
110
+ </div>
145
111
 
146
- <div class="flex gap-md items-start">
147
- <span style="font-size: var(--font-size-xl);">✓</span>
148
- <div>
149
- <strong>Encode complete patterns</strong>
150
- <p class="text-muted">
151
- <code>.stack-md</code> = flex + column + gap (one class instead of
152
- three)
112
+ <div class="grid grid-cols-2 gap-lg surface-translucent-50 story-compare-grid">
113
+ <div class="card surface-subtle">
114
+ <header>
115
+ <h3>❌ Tailwind Approach</h3>
116
+ <small class="text-muted">Atomic utilities for everything</small>
117
+ </header>
118
+ <div class="story-code-block code-tailwind"></div>
119
+ <p class="text-muted story-note">
120
+ 13 utility classes, no semantic meaning, hard to maintain.
153
121
  </p>
154
122
  </div>
155
- </div>
156
123
 
157
- <div class="flex gap-md items-start">
158
- <span style="font-size: var(--font-size-xl);">✓</span>
159
- <div>
160
- <strong>Can't be achieved with primitives</strong>
161
- <p class="text-muted">
162
- <code>.truncate</code>, <code>.grow</code> — no semantic element
163
- provides this
124
+ <div class="card surface-elevated">
125
+ <header>
126
+ <h3>✅ PDS Approach</h3>
127
+ <small class="text-muted">Semantic HTML + primitives</small>
128
+ </header>
129
+ <div class="story-code-block code-pds"></div>
130
+ <p class="text-muted story-note">
131
+ Semantic HTML + 4 primitive classes. Self-documenting.
164
132
  </p>
165
133
  </div>
166
134
  </div>
167
- </div>
135
+ </article>
168
136
 
169
- <h3>What PDS Does NOT Include</h3>
170
137
 
171
- <div class="stack-md" style="margin: var(--spacing-4) 0;">
172
- <div class="flex gap-md items-start">
173
- <span style="font-size: var(--font-size-xl);">✗</span>
138
+ <div class="alert alert-info">
139
+ <span class="alert-icon">
140
+ <pds-icon icon="info" size="md"></pds-icon>
141
+ </span>
174
142
  <div>
175
- <strong>Spacing utilities</strong> (<code>.p-4</code>,
176
- <code>.mt-2</code>, <code>.mx-auto</code>)
177
- <p class="text-muted">
178
- Primitives handle padding. Use <code>.section</code> or inline
179
- styles with tokens.
143
+ <h4 class="alert-title">The verdict</h4>
144
+ <p>Both approaches render identical output—but only one is maintainable.</p>
145
+ <p>
146
+ Don't even start thinking of dark and light modes, responsiveness, or
147
+ accessibility. With atomic utilities, every one of those concerns must be
148
+ manually addressed with more classes and more complexity.
180
149
  </p>
181
150
  </div>
182
151
  </div>
183
152
 
184
- <div class="flex gap-md items-start">
185
- <span style="font-size: var(--font-size-xl);">✗</span>
186
- <div>
187
- <strong>Typography scale</strong> (<code>.text-sm</code>,
188
- <code>.text-2xl</code>)
189
- <p class="text-muted">
190
- Use semantic elements:
191
- <code>&lt;h1&gt;</code>-<code>&lt;h6&gt;</code>,
192
- <code>&lt;small&gt;</code>, <code>&lt;strong&gt;</code>
193
- </p>
153
+ <article class="card">
154
+ <h2>The PDS Layout Hierarchy</h2>
155
+
156
+ <table class="table-bordered">
157
+ <thead>
158
+ <tr>
159
+ <th>Level</th>
160
+ <th>What</th>
161
+ <th>Examples</th>
162
+ <th>Use When</th>
163
+ </tr>
164
+ </thead>
165
+ <tbody>
166
+ <tr>
167
+ <td><strong>1. Semantic HTML</strong></td>
168
+ <td>Native elements with built-in styling</td>
169
+ <td>
170
+ <code>&lt;article&gt;</code>, <code>&lt;nav&gt;</code>,
171
+ <code>&lt;section&gt;</code>, <code>&lt;header&gt;</code>
172
+ </td>
173
+ <td>Always start here</td>
174
+ </tr>
175
+ <tr>
176
+ <td><strong>2. Primitives</strong></td>
177
+ <td>Single-class components with full styling</td>
178
+ <td><code>.card</code>, <code>.alert</code>, <code>.badge</code></td>
179
+ <td>Common UI patterns</td>
180
+ </tr>
181
+ <tr>
182
+ <td><strong>3. Layout Patterns</strong></td>
183
+ <td>High-level structural utilities</td>
184
+ <td>
185
+ <code>.container</code>, <code>.grid-auto-md</code>,
186
+ <code>.stack-md</code>
187
+ </td>
188
+ <td>Page structure</td>
189
+ </tr>
190
+ <tr>
191
+ <td><strong>4. Composable Utilities</strong></td>
192
+ <td>Minimal, purposeful utilities</td>
193
+ <td><code>.flex</code>, <code>.gap-md</code>, <code>.grow</code></td>
194
+ <td>Custom compositions</td>
195
+ </tr>
196
+ <tr>
197
+ <td><strong>5. Inline Styles</strong></td>
198
+ <td>One-off values using tokens</td>
199
+ <td><code>style="margin-top: var(--spacing-4)"</code></td>
200
+ <td>Rare exceptions</td>
201
+ </tr>
202
+ </tbody>
203
+ </table>
204
+ </article>
205
+
206
+ <article class="card">
207
+ <h2>Why PDS Has <em>Some</em> Utilities</h2>
208
+
209
+ <p>
210
+ PDS isn't anti-utility. It's anti-<em>atomic</em>. We include utilities
211
+ that:
212
+ </p>
213
+
214
+ <div class="stack-md story-list">
215
+ <div class="flex gap-md items-start">
216
+ <span class="story-checkmark">✓</span>
217
+ <div>
218
+ <strong>Solve common layout problems</strong>
219
+ <p class="text-muted">
220
+ <code>.flex</code>, <code>.grid</code>, <code>.gap-*</code> —
221
+ fundamental building blocks
222
+ </p>
223
+ </div>
224
+ </div>
225
+
226
+ <div class="flex gap-md items-start">
227
+ <span class="story-checkmark">✓</span>
228
+ <div>
229
+ <strong>Encode complete patterns</strong>
230
+ <p class="text-muted">
231
+ <code>.stack-md</code> = flex + column + gap (one class instead of
232
+ three)
233
+ </p>
234
+ </div>
235
+ </div>
236
+
237
+ <div class="flex gap-md items-start">
238
+ <span class="story-checkmark">✓</span>
239
+ <div>
240
+ <strong>Can't be achieved with primitives</strong>
241
+ <p class="text-muted">
242
+ <code>.truncate</code>, <code>.grow</code> — no semantic element
243
+ provides this
244
+ </p>
245
+ </div>
194
246
  </div>
195
247
  </div>
196
248
 
197
- <div class="flex gap-md items-start">
198
- <span style="font-size: var(--font-size-xl);">✗</span>
199
- <div>
200
- <strong>Position/display</strong> (<code>.relative</code>,
201
- <code>.block</code>, <code>.hidden</code>)
202
- <p class="text-muted">
203
- Component-internal concerns. Components handle their own
204
- positioning.
205
- </p>
249
+ <h3>What PDS Does NOT Include</h3>
250
+
251
+ <div class="stack-md story-list">
252
+ <div class="flex gap-md items-start">
253
+ <span class="story-checkmark">✗</span>
254
+ <div>
255
+ <strong>Spacing utilities</strong> (<code>.p-4</code>,
256
+ <code>.mt-2</code>, <code>.mx-auto</code>)
257
+ <p class="text-muted">
258
+ Primitives handle padding. Use <code>.section</code> or inline
259
+ styles with tokens.
260
+ </p>
261
+ </div>
262
+ </div>
263
+
264
+ <div class="flex gap-md items-start">
265
+ <span class="story-checkmark">✗</span>
266
+ <div>
267
+ <strong>Typography scale</strong> (<code>.text-sm</code>,
268
+ <code>.text-2xl</code>)
269
+ <p class="text-muted">
270
+ Use semantic elements:
271
+ <code>&lt;h1&gt;</code>-<code>&lt;h6&gt;</code>,
272
+ <code>&lt;small&gt;</code>, <code>&lt;strong&gt;</code>
273
+ </p>
274
+ </div>
275
+ </div>
276
+
277
+ <div class="flex gap-md items-start">
278
+ <span class="story-checkmark">✗</span>
279
+ <div>
280
+ <strong>Position/display</strong> (<code>.relative</code>,
281
+ <code>.block</code>, <code>.hidden</code>)
282
+ <p class="text-muted">
283
+ Component-internal concerns. Components handle their own
284
+ positioning.
285
+ </p>
286
+ </div>
206
287
  </div>
207
288
  </div>
208
- </div>
209
- </article>
210
-
211
- <article class="card">
212
- <h2>Quick Reference: Layout Utilities</h2>
213
-
214
- <table class="table-bordered">
215
- <thead>
216
- <tr>
217
- <th>Category</th>
218
- <th>Classes</th>
219
- <th>Purpose</th>
220
- </tr>
221
- </thead>
222
- <tbody>
223
- <tr>
224
- <td><strong>Container</strong></td>
225
- <td><code>.container</code></td>
226
- <td>Centered max-width wrapper with padding</td>
227
- </tr>
228
- <tr>
229
- <td><strong>Grid</strong></td>
230
- <td>
231
- <code>.grid</code>, <code>.grid-cols-*</code>,
232
- <code>.grid-auto-*</code>
233
- </td>
234
- <td>CSS Grid layouts</td>
235
- </tr>
236
- <tr>
237
- <td><strong>Flex</strong></td>
238
- <td>
239
- <code>.flex</code>, <code>.flex-col</code>, <code>.flex-wrap</code>,
240
- <code>.grow</code>
241
- </td>
242
- <td>Flexbox layouts</td>
243
- </tr>
244
- <tr>
245
- <td><strong>Stack</strong></td>
246
- <td>
247
- <code>.stack-sm</code>, <code>.stack-md</code>,
248
- <code>.stack-lg</code>, <code>.stack-xl</code>
249
- </td>
250
- <td>Vertical rhythm (flex + column + gap)</td>
251
- </tr>
252
- <tr>
253
- <td><strong>Gap</strong></td>
254
- <td>
255
- <code>.gap-xs</code>, <code>.gap-sm</code>, <code>.gap-md</code>,
256
- <code>.gap-lg</code>, <code>.gap-xl</code>
257
- </td>
258
- <td>Spacing between flex/grid children</td>
259
- </tr>
260
- <tr>
261
- <td><strong>Alignment</strong></td>
262
- <td><code>.items-*</code>, <code>.justify-*</code></td>
263
- <td>Cross-axis and main-axis alignment</td>
264
- </tr>
265
- <tr>
266
- <td><strong>Width</strong></td>
267
- <td>
268
- <code>.max-w-sm</code>, <code>.max-w-md</code>,
269
- <code>.max-w-lg</code>, <code>.max-w-xl</code>
270
- </td>
271
- <td>Content width constraints</td>
272
- </tr>
273
- <tr>
274
- <td><strong>Section</strong></td>
275
- <td><code>.section</code>, <code>.section-lg</code></td>
276
- <td>Vertical padding for content blocks</td>
277
- </tr>
278
- <tr>
279
- <td><strong>Responsive</strong></td>
280
- <td><code>.mobile-stack</code></td>
281
- <td>Stack on mobile, row on desktop</td>
282
- </tr>
283
- </tbody>
284
- </table>
285
- </article>
286
- `;
289
+ </article>
290
+
291
+ <article class="card">
292
+ <h2>Quick Reference: Layout Utilities</h2>
293
+
294
+ <table class="table-bordered">
295
+ <thead>
296
+ <tr>
297
+ <th>Category</th>
298
+ <th>Classes</th>
299
+ <th>Purpose</th>
300
+ </tr>
301
+ </thead>
302
+ <tbody>
303
+ <tr>
304
+ <td><strong>Container</strong></td>
305
+ <td><code>.container</code></td>
306
+ <td>Centered max-width wrapper with padding</td>
307
+ </tr>
308
+ <tr>
309
+ <td><strong>Grid</strong></td>
310
+ <td>
311
+ <code>.grid</code>, <code>.grid-cols-*</code>,
312
+ <code>.grid-auto-*</code>
313
+ </td>
314
+ <td>CSS Grid layouts</td>
315
+ </tr>
316
+ <tr>
317
+ <td><strong>Flex</strong></td>
318
+ <td>
319
+ <code>.flex</code>, <code>.flex-col</code>, <code>.flex-wrap</code>,
320
+ <code>.grow</code>
321
+ </td>
322
+ <td>Flexbox layouts</td>
323
+ </tr>
324
+ <tr>
325
+ <td><strong>Stack</strong></td>
326
+ <td>
327
+ <code>.stack-sm</code>, <code>.stack-md</code>,
328
+ <code>.stack-lg</code>, <code>.stack-xl</code>
329
+ </td>
330
+ <td>Vertical rhythm (flex + column + gap)</td>
331
+ </tr>
332
+ <tr>
333
+ <td><strong>Gap</strong></td>
334
+ <td>
335
+ <code>.gap-xs</code>, <code>.gap-sm</code>, <code>.gap-md</code>,
336
+ <code>.gap-lg</code>, <code>.gap-xl</code>
337
+ </td>
338
+ <td>Spacing between flex/grid children</td>
339
+ </tr>
340
+ <tr>
341
+ <td><strong>Alignment</strong></td>
342
+ <td><code>.items-*</code>, <code>.justify-*</code></td>
343
+ <td>Cross-axis and main-axis alignment</td>
344
+ </tr>
345
+ <tr>
346
+ <td><strong>Width</strong></td>
347
+ <td>
348
+ <code>.max-w-sm</code>, <code>.max-w-md</code>,
349
+ <code>.max-w-lg</code>, <code>.max-w-xl</code>
350
+ </td>
351
+ <td>Content width constraints</td>
352
+ </tr>
353
+ <tr>
354
+ <td><strong>Section</strong></td>
355
+ <td><code>.section</code>, <code>.section-lg</code></td>
356
+ <td>Vertical padding for content blocks</td>
357
+ </tr>
358
+ <tr>
359
+ <td><strong>Responsive</strong></td>
360
+ <td><code>.mobile-stack</code></td>
361
+ <td>Stack on mobile, row on desktop</td>
362
+ </tr>
363
+ </tbody>
364
+ </table>
365
+ </article>
366
+ `;
367
+
368
+ const theme = getCurrentTheme();
369
+
370
+ highlight(tailwindCode, "html", theme).then((h) => {
371
+ container.querySelector(".code-tailwind").innerHTML = h;
372
+ });
373
+
374
+ highlight(pdsCode, "html", theme).then((h) => {
375
+ container.querySelector(".code-pds").innerHTML = h;
376
+ });
377
+
378
+ return container;
379
+ };
287
380
 
288
381
  LayoutIntroduction.storyName = "Introduction";