@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.
- package/.storybook/addons/pds-configurator/SearchTool.js +44 -44
- package/dist/pds-reference.json +65 -13
- package/package.json +50 -50
- package/stories/components/PdsCalendar.stories.js +266 -263
- package/stories/components/PdsDrawer.stories.js +2 -2
- package/stories/components/PdsIcon.stories.js +2 -2
- package/stories/components/PdsJsonform.stories.js +2 -2
- package/stories/components/PdsRichtext.stories.js +367 -367
- package/stories/components/PdsScrollrow.stories.js +140 -140
- package/stories/components/PdsSplitpanel.stories.js +502 -502
- package/stories/components/PdsTabstrip.stories.js +2 -2
- package/stories/components/PdsToaster.stories.js +186 -186
- package/stories/components/PdsUpload.stories.js +66 -66
- package/stories/enhancements/Dropdowns.stories.js +185 -185
- package/stories/enhancements/InteractiveStates.stories.js +625 -625
- package/stories/enhancements/MeshGradients.stories.js +321 -320
- package/stories/enhancements/OpenGroups.stories.js +227 -227
- package/stories/enhancements/RangeSliders.stories.js +232 -232
- package/stories/enhancements/RequiredFields.stories.js +189 -189
- package/stories/enhancements/Toggles.stories.js +167 -167
- package/stories/foundations/Colors.stories.js +2 -1
- package/stories/foundations/Icons.stories.js +4 -0
- package/stories/foundations/SmartSurfaces.stories.js +485 -367
- package/stories/foundations/Spacing.stories.js +5 -1
- package/stories/foundations/Typography.stories.js +4 -0
- package/stories/foundations/ZIndex.stories.js +329 -325
- package/stories/layout/LayoutOverview.stories.js +247 -0
- package/stories/layout/LayoutSystem.stories.js +852 -0
- package/stories/patterns/BorderEffects.stories.js +74 -72
- package/stories/primitives/Accordion.stories.js +5 -3
- package/stories/primitives/Alerts.stories.js +261 -46
- package/stories/primitives/Badges.stories.js +4 -0
- package/stories/primitives/Buttons.stories.js +2 -2
- package/stories/primitives/Cards.stories.js +98 -170
- package/stories/primitives/Media.stories.js +442 -203
- package/stories/primitives/Tables.stories.js +358 -232
- package/stories/utilities/Backdrop.stories.js +197 -0
- package/stories/patterns/Layout.stories.js +0 -99
- 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
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
<
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
<
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
<
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
<
|
|
247
|
-
|
|
248
|
-
<
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
<button class="btn-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
<
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
<
|
|
262
|
-
<
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
<
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
<
|
|
276
|
-
<
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
<
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
background-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
<
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
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';
|