@pure-ds/storybook 0.3.19 → 0.4.1
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/.storybook/preview.js +6 -2
- 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,367 +1,485 @@
|
|
|
1
|
-
import { html } from 'lit';
|
|
2
|
-
|
|
3
|
-
export default {
|
|
4
|
-
title: 'Foundations/Smart Surfaces',
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
<
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
<
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
<
|
|
192
|
-
<
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
<
|
|
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
|
-
|
|
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
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
<
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
<
|
|
319
|
-
<
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
<
|
|
325
|
-
<
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
<
|
|
331
|
-
<
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
<
|
|
337
|
-
<
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
<
|
|
343
|
-
<
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
<
|
|
349
|
-
<
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
<
|
|
355
|
-
<
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
<
|
|
361
|
-
<
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
1
|
+
import { html } from 'lit';
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Foundations/Smart Surfaces',
|
|
5
|
+
tags: ['surface', 'background', 'theming', 'contrast', 'elevated'],
|
|
6
|
+
parameters: {
|
|
7
|
+
pds: {
|
|
8
|
+
tags: ['surface', 'background', 'theming', 'contrast', 'elevated', 'subtle', 'sunken', 'overlay', 'inverse', 'colors', 'layout']
|
|
9
|
+
},
|
|
10
|
+
docs: {
|
|
11
|
+
description: {
|
|
12
|
+
component: 'Smart surface system that automatically adapts text, icons, shadows, and borders based on backgrounds. Maintains WCAG AA contrast ratios automatically.'
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
const smartSurfacesStoryStyles = html`
|
|
19
|
+
<style>
|
|
20
|
+
.smart-surfaces-section {
|
|
21
|
+
padding: var(--spacing-4);
|
|
22
|
+
}
|
|
23
|
+
.smart-surfaces-subtitle {
|
|
24
|
+
margin-bottom: var(--spacing-6);
|
|
25
|
+
}
|
|
26
|
+
.smart-surfaces-grid--variants {
|
|
27
|
+
display: grid;
|
|
28
|
+
grid-template-columns: repeat(auto-fit, minmax(15.625rem, 1fr));
|
|
29
|
+
gap: var(--spacing-4);
|
|
30
|
+
}
|
|
31
|
+
.smart-surfaces-grid--shadows {
|
|
32
|
+
display: grid;
|
|
33
|
+
grid-template-columns: repeat(auto-fit, minmax(12.5rem, 1fr));
|
|
34
|
+
gap: var(--spacing-6);
|
|
35
|
+
}
|
|
36
|
+
.smart-surfaces-grid--inversion {
|
|
37
|
+
display: grid;
|
|
38
|
+
grid-template-columns: repeat(auto-fit, minmax(18.75rem, 1fr));
|
|
39
|
+
gap: var(--spacing-4);
|
|
40
|
+
}
|
|
41
|
+
.smart-surfaces-grid--borders {
|
|
42
|
+
display: grid;
|
|
43
|
+
grid-template-columns: repeat(auto-fit, minmax(18.75rem, 1fr));
|
|
44
|
+
gap: var(--spacing-6);
|
|
45
|
+
}
|
|
46
|
+
.smart-surfaces-surface {
|
|
47
|
+
padding: var(--spacing-6);
|
|
48
|
+
border-radius: var(--radius-md);
|
|
49
|
+
}
|
|
50
|
+
.smart-surfaces-title {
|
|
51
|
+
display: flex;
|
|
52
|
+
align-items: center;
|
|
53
|
+
gap: var(--spacing-2);
|
|
54
|
+
}
|
|
55
|
+
.smart-surfaces-description {
|
|
56
|
+
margin-top: var(--spacing-2);
|
|
57
|
+
}
|
|
58
|
+
.smart-surfaces-button-spacing {
|
|
59
|
+
margin-top: var(--spacing-3);
|
|
60
|
+
}
|
|
61
|
+
.smart-surfaces-button-spacing-sm {
|
|
62
|
+
margin-top: var(--spacing-2);
|
|
63
|
+
}
|
|
64
|
+
.smart-surfaces-shadow-card {
|
|
65
|
+
padding: var(--spacing-6);
|
|
66
|
+
border-radius: var(--radius-md);
|
|
67
|
+
text-align: center;
|
|
68
|
+
}
|
|
69
|
+
.smart-surfaces-shadow-label {
|
|
70
|
+
display: block;
|
|
71
|
+
margin-top: var(--spacing-2);
|
|
72
|
+
}
|
|
73
|
+
.smart-surfaces-shadow-token {
|
|
74
|
+
margin: var(--spacing-1) 0 0 0;
|
|
75
|
+
opacity: 0.7;
|
|
76
|
+
}
|
|
77
|
+
.smart-surfaces-nested {
|
|
78
|
+
padding: var(--spacing-6);
|
|
79
|
+
border-radius: var(--radius-md);
|
|
80
|
+
}
|
|
81
|
+
.smart-surfaces-nested-inner {
|
|
82
|
+
padding: var(--spacing-6);
|
|
83
|
+
margin-top: var(--spacing-4);
|
|
84
|
+
border-radius: var(--radius-md);
|
|
85
|
+
}
|
|
86
|
+
.smart-surfaces-nested-grid {
|
|
87
|
+
display: grid;
|
|
88
|
+
grid-template-columns: repeat(2, 1fr);
|
|
89
|
+
gap: var(--spacing-4);
|
|
90
|
+
margin-top: var(--spacing-4);
|
|
91
|
+
}
|
|
92
|
+
.smart-surfaces-card {
|
|
93
|
+
padding: var(--spacing-4);
|
|
94
|
+
}
|
|
95
|
+
.smart-surfaces-sunken {
|
|
96
|
+
padding: var(--spacing-4);
|
|
97
|
+
margin-top: var(--spacing-3);
|
|
98
|
+
border-radius: var(--radius-sm);
|
|
99
|
+
}
|
|
100
|
+
.smart-surfaces-inline {
|
|
101
|
+
display: flex;
|
|
102
|
+
align-items: center;
|
|
103
|
+
gap: var(--spacing-2);
|
|
104
|
+
}
|
|
105
|
+
.smart-surfaces-border-card {
|
|
106
|
+
padding: var(--spacing-6);
|
|
107
|
+
}
|
|
108
|
+
.smart-surfaces-border-code {
|
|
109
|
+
font-size: var(--font-size-sm);
|
|
110
|
+
opacity: 0.7;
|
|
111
|
+
}
|
|
112
|
+
</style>
|
|
113
|
+
`;
|
|
114
|
+
|
|
115
|
+
export const SurfaceVariants = () => html`
|
|
116
|
+
${smartSurfacesStoryStyles}
|
|
117
|
+
<div class="smart-surfaces-section">
|
|
118
|
+
<h2>Surface Variants</h2>
|
|
119
|
+
<p class="smart-surfaces-subtitle">
|
|
120
|
+
All surfaces automatically adjust text, icon, shadow, and border colors to maintain proper contrast.
|
|
121
|
+
</p>
|
|
122
|
+
|
|
123
|
+
<div class="smart-surfaces-grid--variants">
|
|
124
|
+
<div class="surface-base smart-surfaces-surface">
|
|
125
|
+
<strong class="surface-title smart-surfaces-title">
|
|
126
|
+
<pds-icon icon="square"></pds-icon>
|
|
127
|
+
Base Surface
|
|
128
|
+
</strong>
|
|
129
|
+
<p class="surface-description smart-surfaces-description">
|
|
130
|
+
Default background with auto-adjusted text and icons
|
|
131
|
+
</p>
|
|
132
|
+
<button class="btn-primary smart-surfaces-button-spacing">
|
|
133
|
+
Button
|
|
134
|
+
</button>
|
|
135
|
+
</div>
|
|
136
|
+
|
|
137
|
+
<div class="surface-subtle smart-surfaces-surface">
|
|
138
|
+
<strong class="surface-title smart-surfaces-title">
|
|
139
|
+
<pds-icon icon="square"></pds-icon>
|
|
140
|
+
Subtle Surface
|
|
141
|
+
</strong>
|
|
142
|
+
<p class="surface-description smart-surfaces-description">
|
|
143
|
+
Slightly different tone for visual hierarchy
|
|
144
|
+
</p>
|
|
145
|
+
<button class="btn-secondary smart-surfaces-button-spacing">
|
|
146
|
+
Button
|
|
147
|
+
</button>
|
|
148
|
+
</div>
|
|
149
|
+
|
|
150
|
+
<div class="surface-elevated smart-surfaces-surface">
|
|
151
|
+
<strong class="surface-title smart-surfaces-title">
|
|
152
|
+
<pds-icon icon="arrow-up"></pds-icon>
|
|
153
|
+
Elevated Surface
|
|
154
|
+
</strong>
|
|
155
|
+
<p class="surface-description smart-surfaces-description">
|
|
156
|
+
Raised with smart shadows that adapt in dark mode
|
|
157
|
+
</p>
|
|
158
|
+
<button class="btn-primary smart-surfaces-button-spacing">
|
|
159
|
+
Button
|
|
160
|
+
</button>
|
|
161
|
+
</div>
|
|
162
|
+
|
|
163
|
+
<div class="surface-overlay smart-surfaces-surface">
|
|
164
|
+
<strong class="surface-title smart-surfaces-title">
|
|
165
|
+
<pds-icon icon="desktop"></pds-icon>
|
|
166
|
+
Overlay Surface
|
|
167
|
+
</strong>
|
|
168
|
+
<p class="surface-description smart-surfaces-description">
|
|
169
|
+
Modal/dropdown backgrounds with stronger shadows
|
|
170
|
+
</p>
|
|
171
|
+
<button class="btn-outline smart-surfaces-button-spacing">
|
|
172
|
+
Button
|
|
173
|
+
</button>
|
|
174
|
+
</div>
|
|
175
|
+
</div>
|
|
176
|
+
</div>
|
|
177
|
+
`;
|
|
178
|
+
|
|
179
|
+
SurfaceVariants.storyName = 'Surface Variants';
|
|
180
|
+
|
|
181
|
+
export const ContextAwareShadows = () => html`
|
|
182
|
+
${smartSurfacesStoryStyles}
|
|
183
|
+
<div class="smart-surfaces-section">
|
|
184
|
+
<h2>Context-Aware Shadows</h2>
|
|
185
|
+
<p class="smart-surfaces-subtitle">
|
|
186
|
+
Shadows automatically invert in dark mode: dark shadows on light surfaces, light shadows on dark surfaces.
|
|
187
|
+
</p>
|
|
188
|
+
|
|
189
|
+
<div class="smart-surfaces-grid--shadows">
|
|
190
|
+
<div class="shadow-sm surface-elevated smart-surfaces-shadow-card">
|
|
191
|
+
<pds-icon icon="feather" size="lg"></pds-icon>
|
|
192
|
+
<strong class="smart-surfaces-shadow-label">Small</strong>
|
|
193
|
+
<p class="smart-surfaces-shadow-token">--shadow-sm</p>
|
|
194
|
+
</div>
|
|
195
|
+
|
|
196
|
+
<div class="shadow-md surface-elevated smart-surfaces-shadow-card">
|
|
197
|
+
<pds-icon icon="grid-four" size="lg"></pds-icon>
|
|
198
|
+
<strong class="smart-surfaces-shadow-label">Medium</strong>
|
|
199
|
+
<p class="smart-surfaces-shadow-token">--shadow-md</p>
|
|
200
|
+
</div>
|
|
201
|
+
|
|
202
|
+
<div class="shadow-lg surface-elevated smart-surfaces-shadow-card">
|
|
203
|
+
<pds-icon icon="rocket" size="lg"></pds-icon>
|
|
204
|
+
<strong class="smart-surfaces-shadow-label">Large</strong>
|
|
205
|
+
<p class="smart-surfaces-shadow-token">--shadow-lg</p>
|
|
206
|
+
</div>
|
|
207
|
+
</div>
|
|
208
|
+
</div>
|
|
209
|
+
`;
|
|
210
|
+
|
|
211
|
+
ContextAwareShadows.storyName = 'Context-Aware Shadows';
|
|
212
|
+
|
|
213
|
+
export const NestedSurfaces = () => html`
|
|
214
|
+
${smartSurfacesStoryStyles}
|
|
215
|
+
<div class="smart-surfaces-section">
|
|
216
|
+
<h2>Nested Surfaces</h2>
|
|
217
|
+
<p class="smart-surfaces-subtitle">
|
|
218
|
+
Surfaces can be nested infinitely. Each level maintains proper contrast and visual hierarchy automatically.
|
|
219
|
+
</p>
|
|
220
|
+
|
|
221
|
+
<div class="surface-base smart-surfaces-nested">
|
|
222
|
+
<h4 class="smart-surfaces-title">
|
|
223
|
+
<pds-icon icon="circle"></pds-icon>
|
|
224
|
+
Level 1: Base Surface
|
|
225
|
+
</h4>
|
|
226
|
+
<p>Notice how icons and text adapt at each nesting level to maintain readability.</p>
|
|
227
|
+
|
|
228
|
+
<div class="surface-elevated smart-surfaces-nested-inner">
|
|
229
|
+
<h5 class="smart-surfaces-title">
|
|
230
|
+
<pds-icon icon="arrow-right"></pds-icon>
|
|
231
|
+
Level 2: Elevated Surface
|
|
232
|
+
</h5>
|
|
233
|
+
<p>Shadows and text colors automatically adjust</p>
|
|
234
|
+
|
|
235
|
+
<div class="smart-surfaces-nested-grid">
|
|
236
|
+
<div class="card smart-surfaces-card">
|
|
237
|
+
<h6 class="smart-surfaces-title">
|
|
238
|
+
<pds-icon icon="check"></pds-icon>
|
|
239
|
+
Level 3: Card
|
|
240
|
+
</h6>
|
|
241
|
+
<p>Perfect contrast maintained</p>
|
|
242
|
+
|
|
243
|
+
<div class="surface-sunken smart-surfaces-sunken">
|
|
244
|
+
<small class="smart-surfaces-inline">
|
|
245
|
+
<pds-icon icon="info" size="sm"></pds-icon>
|
|
246
|
+
Level 4: Sunken surface inside card
|
|
247
|
+
</small>
|
|
248
|
+
</div>
|
|
249
|
+
</div>
|
|
250
|
+
|
|
251
|
+
<div class="card smart-surfaces-card">
|
|
252
|
+
<h6 class="smart-surfaces-title">
|
|
253
|
+
<pds-icon icon="star"></pds-icon>
|
|
254
|
+
Another Card
|
|
255
|
+
</h6>
|
|
256
|
+
<p>All elements adapt automatically</p>
|
|
257
|
+
<button class="btn-primary btn-sm smart-surfaces-button-spacing-sm">
|
|
258
|
+
<pds-icon icon="heart" size="sm"></pds-icon>
|
|
259
|
+
Action
|
|
260
|
+
</button>
|
|
261
|
+
</div>
|
|
262
|
+
</div>
|
|
263
|
+
</div>
|
|
264
|
+
</div>
|
|
265
|
+
</div>
|
|
266
|
+
`;
|
|
267
|
+
|
|
268
|
+
NestedSurfaces.storyName = 'Nested Surfaces';
|
|
269
|
+
|
|
270
|
+
export const SurfaceInversion = () => html`
|
|
271
|
+
${smartSurfacesStoryStyles}
|
|
272
|
+
<div class="smart-surfaces-section">
|
|
273
|
+
<h2>Surface Inversion</h2>
|
|
274
|
+
<p class="smart-surfaces-subtitle">
|
|
275
|
+
The smart surface system automatically inverts text and icon colors on contrasting backgrounds. Toggle dark mode to see the magic!
|
|
276
|
+
</p>
|
|
277
|
+
|
|
278
|
+
<div class="smart-surfaces-grid--inversion">
|
|
279
|
+
<div class="surface-inverse smart-surfaces-surface">
|
|
280
|
+
<h4 class="smart-surfaces-title">
|
|
281
|
+
<pds-icon icon="moon"></pds-icon>
|
|
282
|
+
Automatic Inversion
|
|
283
|
+
</h4>
|
|
284
|
+
<p>
|
|
285
|
+
This inverted surface automatically uses contrasting text and icons for perfect readability
|
|
286
|
+
</p>
|
|
287
|
+
<button class="btn-primary smart-surfaces-button-spacing">
|
|
288
|
+
Primary Button
|
|
289
|
+
</button>
|
|
290
|
+
</div>
|
|
291
|
+
|
|
292
|
+
<div class="surface-overlay smart-surfaces-surface">
|
|
293
|
+
<h4 class="smart-surfaces-title">
|
|
294
|
+
<pds-icon icon="palette"></pds-icon>
|
|
295
|
+
Overlay Surface
|
|
296
|
+
</h4>
|
|
297
|
+
<p>Text and icons auto-adapt to maintain WCAG AA contrast</p>
|
|
298
|
+
<button class="btn-secondary smart-surfaces-button-spacing">
|
|
299
|
+
Secondary Button
|
|
300
|
+
</button>
|
|
301
|
+
</div>
|
|
302
|
+
</div>
|
|
303
|
+
</div>
|
|
304
|
+
`;
|
|
305
|
+
|
|
306
|
+
SurfaceInversion.storyName = 'Surface Inversion';
|
|
307
|
+
|
|
308
|
+
export const BorderGradients = () => html`
|
|
309
|
+
${smartSurfacesStoryStyles}
|
|
310
|
+
<div class="smart-surfaces-section">
|
|
311
|
+
<h2>Surface Border Effects</h2>
|
|
312
|
+
<p class="smart-surfaces-subtitle">
|
|
313
|
+
Advanced border gradient effects for standout surfaces. All gradients are animated and adapt to your theme.
|
|
314
|
+
</p>
|
|
315
|
+
|
|
316
|
+
<div class="smart-surfaces-grid--borders">
|
|
317
|
+
<article class="card border-gradient smart-surfaces-border-card">
|
|
318
|
+
<h3>Default Gradient</h3>
|
|
319
|
+
<p>A card with a subtle animated border gradient that follows your color palette.</p>
|
|
320
|
+
<code class="smart-surfaces-border-code">.border-gradient</code>
|
|
321
|
+
</article>
|
|
322
|
+
|
|
323
|
+
<article class="card border-gradient-primary smart-surfaces-border-card">
|
|
324
|
+
<h3>Primary Gradient</h3>
|
|
325
|
+
<p>Border gradient using the primary color scheme for brand emphasis.</p>
|
|
326
|
+
<code class="smart-surfaces-border-code">.border-gradient-primary</code>
|
|
327
|
+
</article>
|
|
328
|
+
|
|
329
|
+
<article class="card border-gradient-accent smart-surfaces-border-card">
|
|
330
|
+
<h3>Accent Gradient</h3>
|
|
331
|
+
<p>Border gradient using the accent color for highlights and attention.</p>
|
|
332
|
+
<code class="smart-surfaces-border-code">.border-gradient-accent</code>
|
|
333
|
+
</article>
|
|
334
|
+
|
|
335
|
+
<article class="card border-gradient-secondary smart-surfaces-border-card">
|
|
336
|
+
<h3>Secondary Gradient</h3>
|
|
337
|
+
<p>Border gradient using the secondary color palette for variety.</p>
|
|
338
|
+
<code class="smart-surfaces-border-code">.border-gradient-secondary</code>
|
|
339
|
+
</article>
|
|
340
|
+
|
|
341
|
+
<article class="card border-gradient-soft smart-surfaces-border-card">
|
|
342
|
+
<h3>Soft Gradient</h3>
|
|
343
|
+
<p>A gentle, subdued border gradient for subtle visual interest.</p>
|
|
344
|
+
<code class="smart-surfaces-border-code">.border-gradient-soft</code>
|
|
345
|
+
</article>
|
|
346
|
+
|
|
347
|
+
<article class="card border-gradient-medium smart-surfaces-border-card">
|
|
348
|
+
<h3>Medium Gradient</h3>
|
|
349
|
+
<p>A balanced border gradient with moderate intensity and presence.</p>
|
|
350
|
+
<code class="smart-surfaces-border-code">.border-gradient-medium</code>
|
|
351
|
+
</article>
|
|
352
|
+
|
|
353
|
+
<article class="card border-gradient-strong smart-surfaces-border-card">
|
|
354
|
+
<h3>Strong Gradient</h3>
|
|
355
|
+
<p>A bold, vibrant border gradient for maximum visual impact.</p>
|
|
356
|
+
<code class="smart-surfaces-border-code">.border-gradient-strong</code>
|
|
357
|
+
</article>
|
|
358
|
+
|
|
359
|
+
<article class="card border-gradient-glow smart-surfaces-border-card">
|
|
360
|
+
<h3>Glowing Border</h3>
|
|
361
|
+
<p>A card with a glowing border gradient effect for emphasis and visual interest.</p>
|
|
362
|
+
<code class="smart-surfaces-border-code">.border-gradient-glow</code>
|
|
363
|
+
</article>
|
|
364
|
+
</div>
|
|
365
|
+
</div>
|
|
366
|
+
`;
|
|
367
|
+
|
|
368
|
+
BorderGradients.storyName = 'Border Gradients';
|
|
369
|
+
|
|
370
|
+
export const TranslucentSurfaces = () => html`
|
|
371
|
+
${smartSurfacesStoryStyles}
|
|
372
|
+
<div class="smart-surfaces-section">
|
|
373
|
+
<h2>Translucent Surfaces</h2>
|
|
374
|
+
<p class="smart-surfaces-subtitle">
|
|
375
|
+
Semi-transparent surfaces for glassmorphism effects and layered UI.
|
|
376
|
+
Works beautifully over images and gradients.
|
|
377
|
+
</p>
|
|
378
|
+
|
|
379
|
+
<div style="position: relative; padding: var(--spacing-8); border-radius: var(--radius-lg); overflow: hidden;">
|
|
380
|
+
<img
|
|
381
|
+
src="https://picsum.photos/1200/600?random=10"
|
|
382
|
+
alt="Background"
|
|
383
|
+
style="position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0;"
|
|
384
|
+
/>
|
|
385
|
+
|
|
386
|
+
<div class="grid grid-auto-md gap-lg" style="position: relative; z-index: 1;">
|
|
387
|
+
<article class="surface-translucent-25 smart-surfaces-surface" style="backdrop-filter: blur(10px);">
|
|
388
|
+
<h4>.surface-translucent-25</h4>
|
|
389
|
+
<p>25% opacity - very subtle, mostly transparent</p>
|
|
390
|
+
<code>--color-surface-translucent-25</code>
|
|
391
|
+
</article>
|
|
392
|
+
|
|
393
|
+
<article class="surface-translucent-50 smart-surfaces-surface" style="backdrop-filter: blur(10px);">
|
|
394
|
+
<h4>.surface-translucent-50</h4>
|
|
395
|
+
<p>50% opacity - balanced transparency</p>
|
|
396
|
+
<code>--color-surface-translucent-50</code>
|
|
397
|
+
</article>
|
|
398
|
+
|
|
399
|
+
<article class="surface-translucent-75 smart-surfaces-surface" style="backdrop-filter: blur(10px);">
|
|
400
|
+
<h4>.surface-translucent-75</h4>
|
|
401
|
+
<p>75% opacity - more solid, less see-through</p>
|
|
402
|
+
<code>--color-surface-translucent-75</code>
|
|
403
|
+
</article>
|
|
404
|
+
|
|
405
|
+
<article class="surface-translucent smart-surfaces-surface" style="backdrop-filter: blur(10px);">
|
|
406
|
+
<h4>.surface-translucent</h4>
|
|
407
|
+
<p>Default (50%) - alias for translucent-50</p>
|
|
408
|
+
<code>Shorthand class</code>
|
|
409
|
+
</article>
|
|
410
|
+
</div>
|
|
411
|
+
</div>
|
|
412
|
+
</div>
|
|
413
|
+
`;
|
|
414
|
+
|
|
415
|
+
TranslucentSurfaces.storyName = 'Translucent Surfaces';
|
|
416
|
+
|
|
417
|
+
export const SurfaceInverseExpanded = () => html`
|
|
418
|
+
${smartSurfacesStoryStyles}
|
|
419
|
+
<div class="smart-surfaces-section">
|
|
420
|
+
<h2>Inverse Surface Deep Dive</h2>
|
|
421
|
+
<p class="smart-surfaces-subtitle">
|
|
422
|
+
The <code>.surface-inverse</code> class automatically inverts all text, icon, and border colors
|
|
423
|
+
for perfect contrast on dark backgrounds.
|
|
424
|
+
</p>
|
|
425
|
+
|
|
426
|
+
<div class="grid grid-auto-md gap-lg">
|
|
427
|
+
<article class="surface-inverse smart-surfaces-surface">
|
|
428
|
+
<h3 class="smart-surfaces-title">
|
|
429
|
+
<pds-icon icon="moon"></pds-icon>
|
|
430
|
+
Inverse Surface
|
|
431
|
+
</h3>
|
|
432
|
+
<p>All text automatically uses light colors for dark backgrounds.</p>
|
|
433
|
+
<p class="text-muted">Even muted text adapts correctly.</p>
|
|
434
|
+
<div class="flex gap-sm smart-surfaces-button-spacing">
|
|
435
|
+
<button class="btn-primary">Primary</button>
|
|
436
|
+
<button class="btn-secondary">Secondary</button>
|
|
437
|
+
</div>
|
|
438
|
+
</article>
|
|
439
|
+
|
|
440
|
+
<article class="surface-inverse smart-surfaces-surface">
|
|
441
|
+
<h4>Code on Inverse</h4>
|
|
442
|
+
<p>Inline <code>code elements</code> also adapt their background for visibility.</p>
|
|
443
|
+
<pre><code>// Code blocks work too
|
|
444
|
+
const example = "Hello!";</code></pre>
|
|
445
|
+
</article>
|
|
446
|
+
|
|
447
|
+
<article class="surface-inverse smart-surfaces-surface">
|
|
448
|
+
<h4>Icons on Inverse</h4>
|
|
449
|
+
<div class="flex gap-md flex-wrap">
|
|
450
|
+
<pds-icon icon="check" size="lg"></pds-icon>
|
|
451
|
+
<pds-icon icon="star" size="lg"></pds-icon>
|
|
452
|
+
<pds-icon icon="heart" size="lg"></pds-icon>
|
|
453
|
+
<pds-icon icon="settings" size="lg"></pds-icon>
|
|
454
|
+
<pds-icon icon="bell" size="lg"></pds-icon>
|
|
455
|
+
</div>
|
|
456
|
+
<p style="margin-top: var(--spacing-3);">Icons inherit the correct inverse color automatically.</p>
|
|
457
|
+
</article>
|
|
458
|
+
|
|
459
|
+
<article class="surface-inverse smart-surfaces-surface">
|
|
460
|
+
<h4>Form Elements</h4>
|
|
461
|
+
<label style="margin-bottom: var(--spacing-3);">
|
|
462
|
+
<span>Input Field</span>
|
|
463
|
+
<input type="text" placeholder="Type here..." />
|
|
464
|
+
</label>
|
|
465
|
+
<button class="btn-outline" style="border-color: currentColor;">Outline Button</button>
|
|
466
|
+
</article>
|
|
467
|
+
</div>
|
|
468
|
+
|
|
469
|
+
<div class="card" style="margin-top: var(--spacing-8);">
|
|
470
|
+
<h3>CSS Variables Set by .surface-inverse</h3>
|
|
471
|
+
<pre><code>.surface-inverse {
|
|
472
|
+
background-color: var(--color-surface-inverse);
|
|
473
|
+
color: var(--surface-inverse-text);
|
|
474
|
+
--color-text-primary: var(--surface-inverse-text);
|
|
475
|
+
--color-text-secondary: var(--surface-inverse-text-secondary);
|
|
476
|
+
--color-text-muted: var(--surface-inverse-text-muted);
|
|
477
|
+
--color-surface-muted: rgba(255, 255, 255, 0.08);
|
|
478
|
+
--color-border: var(--surface-inverse-border);
|
|
479
|
+
}</code></pre>
|
|
480
|
+
</div>
|
|
481
|
+
</div>
|
|
482
|
+
`;
|
|
483
|
+
|
|
484
|
+
SurfaceInverseExpanded.storyName = 'Inverse Surface Details';
|
|
485
|
+
|