@pure-ds/storybook 0.3.19 → 0.4.0

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 (39) hide show
  1. package/.storybook/addons/pds-configurator/SearchTool.js +44 -44
  2. package/dist/pds-reference.json +65 -13
  3. package/package.json +50 -50
  4. package/stories/components/PdsCalendar.stories.js +266 -263
  5. package/stories/components/PdsDrawer.stories.js +2 -2
  6. package/stories/components/PdsIcon.stories.js +2 -2
  7. package/stories/components/PdsJsonform.stories.js +2 -2
  8. package/stories/components/PdsRichtext.stories.js +367 -367
  9. package/stories/components/PdsScrollrow.stories.js +140 -140
  10. package/stories/components/PdsSplitpanel.stories.js +502 -502
  11. package/stories/components/PdsTabstrip.stories.js +2 -2
  12. package/stories/components/PdsToaster.stories.js +186 -186
  13. package/stories/components/PdsUpload.stories.js +66 -66
  14. package/stories/enhancements/Dropdowns.stories.js +185 -185
  15. package/stories/enhancements/InteractiveStates.stories.js +625 -625
  16. package/stories/enhancements/MeshGradients.stories.js +321 -320
  17. package/stories/enhancements/OpenGroups.stories.js +227 -227
  18. package/stories/enhancements/RangeSliders.stories.js +232 -232
  19. package/stories/enhancements/RequiredFields.stories.js +189 -189
  20. package/stories/enhancements/Toggles.stories.js +167 -167
  21. package/stories/foundations/Colors.stories.js +2 -1
  22. package/stories/foundations/Icons.stories.js +4 -0
  23. package/stories/foundations/SmartSurfaces.stories.js +485 -367
  24. package/stories/foundations/Spacing.stories.js +5 -1
  25. package/stories/foundations/Typography.stories.js +4 -0
  26. package/stories/foundations/ZIndex.stories.js +329 -325
  27. package/stories/layout/LayoutOverview.stories.js +247 -0
  28. package/stories/layout/LayoutSystem.stories.js +852 -0
  29. package/stories/patterns/BorderEffects.stories.js +74 -72
  30. package/stories/primitives/Accordion.stories.js +5 -3
  31. package/stories/primitives/Alerts.stories.js +261 -46
  32. package/stories/primitives/Badges.stories.js +4 -0
  33. package/stories/primitives/Buttons.stories.js +2 -2
  34. package/stories/primitives/Cards.stories.js +98 -170
  35. package/stories/primitives/Media.stories.js +442 -203
  36. package/stories/primitives/Tables.stories.js +358 -232
  37. package/stories/utilities/Backdrop.stories.js +197 -0
  38. package/stories/patterns/Layout.stories.js +0 -99
  39. package/stories/utilities/GridSystem.stories.js +0 -208
@@ -1,320 +1,321 @@
1
- import { html } from 'lit';
2
-
3
- const meshGradientStoryStyles = html`
4
- <style>
5
- .mesh-story {
6
- padding: var(--spacing-4);
7
- display: grid;
8
- gap: var(--spacing-6);
9
- }
10
-
11
- .mesh-story__intro {
12
- margin: 0 0 var(--spacing-6);
13
- }
14
-
15
- .mesh-story__grid {
16
- display: grid;
17
- gap: var(--spacing-6);
18
- }
19
-
20
- .mesh-story__grid--featured {
21
- grid-template-columns: repeat(auto-fit, minmax(18.75rem, 1fr));
22
- }
23
-
24
- .mesh-story__grid--tiles {
25
- grid-template-columns: repeat(auto-fit, minmax(12.5rem, 1fr));
26
- gap: var(--spacing-4);
27
- }
28
-
29
- .mesh-story__panel,
30
- .mesh-story__surface {
31
- border-radius: var(--radius-lg);
32
- border: 1px solid var(--color-border);
33
- }
34
-
35
- .mesh-story__panel {
36
- position: relative;
37
- padding: var(--spacing-6);
38
- min-height: 12.5rem;
39
- display: flex;
40
- align-items: center;
41
- justify-content: center;
42
- }
43
-
44
- .mesh-story__panel--mesh-01 {
45
- background: var(--background-mesh-01);
46
- }
47
-
48
- .mesh-story__panel--mesh-02 {
49
- background: var(--background-mesh-02);
50
- }
51
-
52
- .mesh-story__inner {
53
- background: var(--color-surface-base);
54
- padding: var(--spacing-4);
55
- border-radius: var(--radius-md);
56
- box-shadow: var(--shadow-md);
57
- text-align: center;
58
- display: grid;
59
- gap: var(--spacing-2);
60
- }
61
-
62
- .mesh-story__inner-heading {
63
- margin: 0;
64
- }
65
-
66
- .mesh-story__inner-subtitle {
67
- margin: 0;
68
- opacity: 0.7;
69
- }
70
-
71
- .mesh-story__tile {
72
- position: relative;
73
- padding: var(--spacing-5);
74
- border-radius: var(--radius-md);
75
- min-height: 9.375rem;
76
- display: flex;
77
- flex-direction: column;
78
- align-items: center;
79
- justify-content: center;
80
- text-align: center;
81
- border: 1px solid var(--color-border);
82
- }
83
-
84
- .mesh-story__tile--mesh-03 {
85
- background: var(--background-mesh-03);
86
- }
87
-
88
- .mesh-story__tile--mesh-04 {
89
- background: var(--background-mesh-04);
90
- }
91
-
92
- .mesh-story__tile--mesh-05 {
93
- background: var(--background-mesh-05);
94
- }
95
-
96
- .mesh-story__tile-icon {
97
- opacity: 0.9;
98
- margin-bottom: var(--spacing-2);
99
- }
100
-
101
- .mesh-story__tile-code {
102
- font-size: 0.75rem;
103
- }
104
-
105
- .mesh-story__subheading {
106
- margin: var(--spacing-6) 0 var(--spacing-2);
107
- }
108
-
109
- .mesh-story__hero {
110
- background: var(--background-mesh-01);
111
- padding: var(--spacing-8);
112
- text-align: center;
113
- }
114
-
115
- .mesh-story__hero-text {
116
- font-size: 1.25rem;
117
- margin-top: var(--spacing-3);
118
- }
119
-
120
- .mesh-story__hero-actions {
121
- display: flex;
122
- justify-content: center;
123
- gap: var(--spacing-3);
124
- margin-top: var(--spacing-4);
125
- }
126
-
127
- .mesh-story__card-surface {
128
- background: var(--background-mesh-03);
129
- padding: var(--spacing-6);
130
- }
131
-
132
- .mesh-story__card-overlay {
133
- padding: var(--spacing-6);
134
- max-width: 31.25rem;
135
- }
136
-
137
- .mesh-story__action-button {
138
- margin-top: var(--spacing-3);
139
- }
140
-
141
- .mesh-story__grid-surface {
142
- background: var(--background-mesh-05);
143
- padding: var(--spacing-6);
144
- }
145
-
146
- .mesh-story__feature-card {
147
- padding: var(--spacing-5);
148
- text-align: center;
149
- }
150
-
151
- .mesh-story__feature-heading {
152
- margin-top: var(--spacing-2);
153
- }
154
-
155
- .mesh-story__code-block {
156
- background: var(--color-surface-subtle);
157
- padding: var(--spacing-4);
158
- border-radius: var(--radius-md);
159
- overflow-x: auto;
160
- }
161
-
162
- .mesh-story__list {
163
- list-style: none;
164
- margin: 0;
165
- padding: 0;
166
- }
167
-
168
- .mesh-story__list-item {
169
- padding: var(--spacing-2);
170
- border-bottom: 1px solid var(--color-border);
171
- }
172
-
173
- .mesh-story__list-item:last-child {
174
- border-bottom: 0;
175
- }
176
- </style>
177
- `;
178
-
179
- const featuredMeshCards = [
180
- {
181
- key: 'mesh-01',
182
- title: 'Mesh 01',
183
- description: 'Subtle radial blend'
184
- },
185
- {
186
- key: 'mesh-02',
187
- title: 'Mesh 02',
188
- description: 'Corner accents'
189
- }
190
- ];
191
-
192
- const meshTileBackgrounds = ['mesh-03', 'mesh-04', 'mesh-05'];
193
-
194
- const meshVariableList = ['mesh-01', 'mesh-02', 'mesh-03', 'mesh-04', 'mesh-05'];
195
-
196
- export default {
197
- title: 'Enhancements/Mesh Gradients',
198
- parameters: {
199
- pds: {
200
- tags: ['colors']
201
- },
202
- docs: {
203
- description: {
204
- component: 'Beautiful mesh gradient backgrounds generated from your color palette. Automatically adapts to light and dark modes with 5 different variations.'
205
- }
206
- }
207
- }
208
- };
209
-
210
- export const AllMeshGradients = () => html`
211
- ${meshGradientStoryStyles}
212
- <section class="mesh-story">
213
- <h2>Mesh Gradient Backgrounds</h2>
214
- <p class="mesh-story__intro">
215
- Subtle, beautiful mesh gradient backgrounds using <code>--background-mesh-01</code> through <code>--background-mesh-05</code>. Toggle dark mode to see automatic adaptation.
216
- </p>
217
- <div class="mesh-story__grid mesh-story__grid--featured">
218
- ${featuredMeshCards.map(({ key, title, description }) => html`
219
- <div class="mesh-story__panel mesh-story__panel--${key}">
220
- <div class="mesh-story__inner">
221
- <h4 class="mesh-story__inner-heading">${title}</h4>
222
- <p class="mesh-story__inner-subtitle">${description}</p>
223
- </div>
224
- </div>
225
- `)}
226
- </div>
227
- <div class="mesh-story__grid mesh-story__grid--tiles">
228
- ${meshTileBackgrounds.map((meshKey) => html`
229
- <div class="mesh-story__tile mesh-story__tile--${meshKey}">
230
- <pds-icon icon="sparkle" size="xl" class="mesh-story__tile-icon"></pds-icon>
231
- <code class="mesh-story__tile-code">${meshKey}</code>
232
- </div>
233
- `)}
234
- </div>
235
- </section>
236
- `;
237
-
238
- AllMeshGradients.storyName = 'All Mesh Gradients';
239
-
240
- export const MeshUsageExamples = () => html`
241
- ${meshGradientStoryStyles}
242
- <section class="mesh-story">
243
- <h2>Usage Examples</h2>
244
-
245
- <h3 class="mesh-story__subheading">Hero Section</h3>
246
- <div class="mesh-story__surface mesh-story__hero">
247
- <h1>Welcome to Pure Design System</h1>
248
- <p class="mesh-story__hero-text">
249
- Beautiful backgrounds generated from your color palette
250
- </p>
251
- <div class="mesh-story__hero-actions">
252
- <button class="btn-primary btn-lg">Get Started</button>
253
- <button class="btn-secondary btn-lg">Learn More</button>
254
- </div>
255
- </div>
256
-
257
- <h3 class="mesh-story__subheading">Card with Mesh Background</h3>
258
- <div class="mesh-story__surface mesh-story__card-surface">
259
- <div class="card surface-elevated mesh-story__card-overlay">
260
- <h4>Layered Design</h4>
261
- <p>Mesh gradients work beautifully as backgrounds with overlaid content using surface tokens.</p>
262
- <button class="btn-primary mesh-story__action-button">
263
- <pds-icon icon="rocket"></pds-icon>
264
- Take Action
265
- </button>
266
- </div>
267
- </div>
268
-
269
- <h3 class="mesh-story__subheading">Grid Layout with Mesh</h3>
270
- <div class="mesh-story__surface mesh-story__grid-surface">
271
- <div class="grid grid-cols-3 gap-md">
272
- ${Array.from({ length: 3 }, (_, index) => html`
273
- <div class="card surface-base mesh-story__feature-card">
274
- <pds-icon icon="star" size="xl" class="icon-accent"></pds-icon>
275
- <h5 class="mesh-story__feature-heading">Feature ${index + 1}</h5>
276
- <p>Mesh backgrounds create visual interest without overwhelming content</p>
277
- </div>
278
- `)}
279
- </div>
280
- </div>
281
- </section>
282
- `;
283
-
284
- MeshUsageExamples.storyName = 'Usage Examples';
285
-
286
- export const CodeSamples = () => html`
287
- ${meshGradientStoryStyles}
288
- <section class="mesh-story">
289
- <h2>Code Samples</h2>
290
-
291
- <h3 class="mesh-story__subheading">Apply as Background</h3>
292
- <pre class="mesh-story__code-block"><code>/* Use CSS custom properties */
293
- .hero-section {
294
- background: var(--background-mesh-01);
295
- }
296
-
297
- /* Combine with surface colors */
298
- .card {
299
- background: var(--background-mesh-03);
300
- backdrop-filter: blur(10px);
301
- }
302
-
303
- /* Layer over solid colors */
304
- .container {
305
- background-color: var(--color-surface-base);
306
- background-image: var(--background-mesh-02);
307
- }</code></pre>
308
-
309
- <h3 class="mesh-story__subheading">Available Variables</h3>
310
- <ul class="mesh-story__list">
311
- ${meshVariableList.map((meshKey) => html`
312
- <li class="mesh-story__list-item">
313
- <code>--background-${meshKey}</code>
314
- </li>
315
- `)}
316
- </ul>
317
- </section>
318
- `;
319
-
320
- CodeSamples.storyName = 'Code Samples';
1
+ import { html } from 'lit';
2
+
3
+ const meshGradientStoryStyles = html`
4
+ <style>
5
+ .mesh-story {
6
+ padding: var(--spacing-4);
7
+ display: grid;
8
+ gap: var(--spacing-6);
9
+ }
10
+
11
+ .mesh-story__intro {
12
+ margin: 0 0 var(--spacing-6);
13
+ }
14
+
15
+ .mesh-story__grid {
16
+ display: grid;
17
+ gap: var(--spacing-6);
18
+ }
19
+
20
+ .mesh-story__grid--featured {
21
+ grid-template-columns: repeat(auto-fit, minmax(18.75rem, 1fr));
22
+ }
23
+
24
+ .mesh-story__grid--tiles {
25
+ grid-template-columns: repeat(auto-fit, minmax(12.5rem, 1fr));
26
+ gap: var(--spacing-4);
27
+ }
28
+
29
+ .mesh-story__panel,
30
+ .mesh-story__surface {
31
+ border-radius: var(--radius-lg);
32
+ border: 1px solid var(--color-border);
33
+ }
34
+
35
+ .mesh-story__panel {
36
+ position: relative;
37
+ padding: var(--spacing-6);
38
+ min-height: 12.5rem;
39
+ display: flex;
40
+ align-items: center;
41
+ justify-content: center;
42
+ }
43
+
44
+ .mesh-story__panel--mesh-01 {
45
+ background: var(--background-mesh-01);
46
+ }
47
+
48
+ .mesh-story__panel--mesh-02 {
49
+ background: var(--background-mesh-02);
50
+ }
51
+
52
+ .mesh-story__inner {
53
+ background: var(--color-surface-base);
54
+ padding: var(--spacing-4);
55
+ border-radius: var(--radius-md);
56
+ box-shadow: var(--shadow-md);
57
+ text-align: center;
58
+ display: grid;
59
+ gap: var(--spacing-2);
60
+ }
61
+
62
+ .mesh-story__inner-heading {
63
+ margin: 0;
64
+ }
65
+
66
+ .mesh-story__inner-subtitle {
67
+ margin: 0;
68
+ opacity: 0.7;
69
+ }
70
+
71
+ .mesh-story__tile {
72
+ position: relative;
73
+ padding: var(--spacing-5);
74
+ border-radius: var(--radius-md);
75
+ min-height: 9.375rem;
76
+ display: flex;
77
+ flex-direction: column;
78
+ align-items: center;
79
+ justify-content: center;
80
+ text-align: center;
81
+ border: 1px solid var(--color-border);
82
+ }
83
+
84
+ .mesh-story__tile--mesh-03 {
85
+ background: var(--background-mesh-03);
86
+ }
87
+
88
+ .mesh-story__tile--mesh-04 {
89
+ background: var(--background-mesh-04);
90
+ }
91
+
92
+ .mesh-story__tile--mesh-05 {
93
+ background: var(--background-mesh-05);
94
+ }
95
+
96
+ .mesh-story__tile-icon {
97
+ opacity: 0.9;
98
+ margin-bottom: var(--spacing-2);
99
+ }
100
+
101
+ .mesh-story__tile-code {
102
+ font-size: 0.75rem;
103
+ }
104
+
105
+ .mesh-story__subheading {
106
+ margin: var(--spacing-6) 0 var(--spacing-2);
107
+ }
108
+
109
+ .mesh-story__hero {
110
+ background: var(--background-mesh-01);
111
+ padding: var(--spacing-8);
112
+ text-align: center;
113
+ }
114
+
115
+ .mesh-story__hero-text {
116
+ font-size: 1.25rem;
117
+ margin-top: var(--spacing-3);
118
+ }
119
+
120
+ .mesh-story__hero-actions {
121
+ display: flex;
122
+ justify-content: center;
123
+ gap: var(--spacing-3);
124
+ margin-top: var(--spacing-4);
125
+ }
126
+
127
+ .mesh-story__card-surface {
128
+ background: var(--background-mesh-03);
129
+ padding: var(--spacing-6);
130
+ }
131
+
132
+ .mesh-story__card-overlay {
133
+ padding: var(--spacing-6);
134
+ max-width: 31.25rem;
135
+ }
136
+
137
+ .mesh-story__action-button {
138
+ margin-top: var(--spacing-3);
139
+ }
140
+
141
+ .mesh-story__grid-surface {
142
+ background: var(--background-mesh-05);
143
+ padding: var(--spacing-6);
144
+ }
145
+
146
+ .mesh-story__feature-card {
147
+ padding: var(--spacing-5);
148
+ text-align: center;
149
+ }
150
+
151
+ .mesh-story__feature-heading {
152
+ margin-top: var(--spacing-2);
153
+ }
154
+
155
+ .mesh-story__code-block {
156
+ background: var(--color-surface-subtle);
157
+ padding: var(--spacing-4);
158
+ border-radius: var(--radius-md);
159
+ overflow-x: auto;
160
+ }
161
+
162
+ .mesh-story__list {
163
+ list-style: none;
164
+ margin: 0;
165
+ padding: 0;
166
+ }
167
+
168
+ .mesh-story__list-item {
169
+ padding: var(--spacing-2);
170
+ border-bottom: 1px solid var(--color-border);
171
+ }
172
+
173
+ .mesh-story__list-item:last-child {
174
+ border-bottom: 0;
175
+ }
176
+ </style>
177
+ `;
178
+
179
+ const featuredMeshCards = [
180
+ {
181
+ key: 'mesh-01',
182
+ title: 'Mesh 01',
183
+ description: 'Subtle radial blend'
184
+ },
185
+ {
186
+ key: 'mesh-02',
187
+ title: 'Mesh 02',
188
+ description: 'Corner accents'
189
+ }
190
+ ];
191
+
192
+ const meshTileBackgrounds = ['mesh-03', 'mesh-04', 'mesh-05'];
193
+
194
+ const meshVariableList = ['mesh-01', 'mesh-02', 'mesh-03', 'mesh-04', 'mesh-05'];
195
+
196
+ export default {
197
+ title: 'Enhancements/Mesh Gradients',
198
+ tags: ['mesh', 'gradient', 'background', 'effect', 'decoration'],
199
+ parameters: {
200
+ pds: {
201
+ tags: ['mesh', 'gradient', 'background', 'effect', 'decoration', 'colors', 'theming']
202
+ },
203
+ docs: {
204
+ description: {
205
+ component: 'Beautiful mesh gradient backgrounds generated from your color palette. Automatically adapts to light and dark modes with 5 different variations.'
206
+ }
207
+ }
208
+ }
209
+ };
210
+
211
+ export const AllMeshGradients = () => html`
212
+ ${meshGradientStoryStyles}
213
+ <section class="mesh-story">
214
+ <h2>Mesh Gradient Backgrounds</h2>
215
+ <p class="mesh-story__intro">
216
+ Subtle, beautiful mesh gradient backgrounds using <code>--background-mesh-01</code> through <code>--background-mesh-05</code>. Toggle dark mode to see automatic adaptation.
217
+ </p>
218
+ <div class="mesh-story__grid mesh-story__grid--featured">
219
+ ${featuredMeshCards.map(({ key, title, description }) => html`
220
+ <div class="mesh-story__panel mesh-story__panel--${key}">
221
+ <div class="mesh-story__inner">
222
+ <h4 class="mesh-story__inner-heading">${title}</h4>
223
+ <p class="mesh-story__inner-subtitle">${description}</p>
224
+ </div>
225
+ </div>
226
+ `)}
227
+ </div>
228
+ <div class="mesh-story__grid mesh-story__grid--tiles">
229
+ ${meshTileBackgrounds.map((meshKey) => html`
230
+ <div class="mesh-story__tile mesh-story__tile--${meshKey}">
231
+ <pds-icon icon="sparkle" size="xl" class="mesh-story__tile-icon"></pds-icon>
232
+ <code class="mesh-story__tile-code">${meshKey}</code>
233
+ </div>
234
+ `)}
235
+ </div>
236
+ </section>
237
+ `;
238
+
239
+ AllMeshGradients.storyName = 'All Mesh Gradients';
240
+
241
+ export const MeshUsageExamples = () => html`
242
+ ${meshGradientStoryStyles}
243
+ <section class="mesh-story">
244
+ <h2>Usage Examples</h2>
245
+
246
+ <h3 class="mesh-story__subheading">Hero Section</h3>
247
+ <div class="mesh-story__surface mesh-story__hero">
248
+ <h1>Welcome to Pure Design System</h1>
249
+ <p class="mesh-story__hero-text">
250
+ Beautiful backgrounds generated from your color palette
251
+ </p>
252
+ <div class="mesh-story__hero-actions">
253
+ <button class="btn-primary btn-lg">Get Started</button>
254
+ <button class="btn-secondary btn-lg">Learn More</button>
255
+ </div>
256
+ </div>
257
+
258
+ <h3 class="mesh-story__subheading">Card with Mesh Background</h3>
259
+ <div class="mesh-story__surface mesh-story__card-surface">
260
+ <div class="card surface-elevated mesh-story__card-overlay">
261
+ <h4>Layered Design</h4>
262
+ <p>Mesh gradients work beautifully as backgrounds with overlaid content using surface tokens.</p>
263
+ <button class="btn-primary mesh-story__action-button">
264
+ <pds-icon icon="rocket"></pds-icon>
265
+ Take Action
266
+ </button>
267
+ </div>
268
+ </div>
269
+
270
+ <h3 class="mesh-story__subheading">Grid Layout with Mesh</h3>
271
+ <div class="mesh-story__surface mesh-story__grid-surface">
272
+ <div class="grid grid-cols-3 gap-md">
273
+ ${Array.from({ length: 3 }, (_, index) => html`
274
+ <div class="card surface-base mesh-story__feature-card">
275
+ <pds-icon icon="star" size="xl" class="icon-accent"></pds-icon>
276
+ <h5 class="mesh-story__feature-heading">Feature ${index + 1}</h5>
277
+ <p>Mesh backgrounds create visual interest without overwhelming content</p>
278
+ </div>
279
+ `)}
280
+ </div>
281
+ </div>
282
+ </section>
283
+ `;
284
+
285
+ MeshUsageExamples.storyName = 'Usage Examples';
286
+
287
+ export const CodeSamples = () => html`
288
+ ${meshGradientStoryStyles}
289
+ <section class="mesh-story">
290
+ <h2>Code Samples</h2>
291
+
292
+ <h3 class="mesh-story__subheading">Apply as Background</h3>
293
+ <pre class="mesh-story__code-block"><code>/* Use CSS custom properties */
294
+ .hero-section {
295
+ background: var(--background-mesh-01);
296
+ }
297
+
298
+ /* Combine with surface colors */
299
+ .card {
300
+ background: var(--background-mesh-03);
301
+ backdrop-filter: blur(10px);
302
+ }
303
+
304
+ /* Layer over solid colors */
305
+ .container {
306
+ background-color: var(--color-surface-base);
307
+ background-image: var(--background-mesh-02);
308
+ }</code></pre>
309
+
310
+ <h3 class="mesh-story__subheading">Available Variables</h3>
311
+ <ul class="mesh-story__list">
312
+ ${meshVariableList.map((meshKey) => html`
313
+ <li class="mesh-story__list-item">
314
+ <code>--background-${meshKey}</code>
315
+ </li>
316
+ `)}
317
+ </ul>
318
+ </section>
319
+ `;
320
+
321
+ CodeSamples.storyName = 'Code Samples';