@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,325 +1,329 @@
|
|
|
1
|
-
import { html } from 'lit';
|
|
2
|
-
|
|
3
|
-
export default {
|
|
4
|
-
title: 'Foundations/Z-Index',
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
.z-index-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}
|
|
27
|
-
.z-index-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
}
|
|
31
|
-
.z-index-callout
|
|
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
|
-
<li>
|
|
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
|
-
<li><strong>
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
1
|
+
import { html } from 'lit';
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Foundations/Z-Index',
|
|
5
|
+
tags: ['z-index', 'zindex', 'stacking', 'layer', 'overlay', 'modal'],
|
|
6
|
+
parameters: {
|
|
7
|
+
pds: {
|
|
8
|
+
tags: ['z-index', 'zindex', 'stacking', 'layer', 'overlay', 'modal', 'dropdown', 'tokens']
|
|
9
|
+
},
|
|
10
|
+
docs: {
|
|
11
|
+
description: {
|
|
12
|
+
component: 'Z-Index tokens define the stacking order of UI elements along the z-axis. These tokens ensure consistent layering across the application, preventing z-index conflicts and establishing clear visual hierarchy for overlays, modals, dropdowns, and other elevated UI components.'
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
const zIndexStoryStyles = html`
|
|
19
|
+
<style>
|
|
20
|
+
.z-index-section {
|
|
21
|
+
padding: var(--spacing-8);
|
|
22
|
+
max-width: 75rem;
|
|
23
|
+
}
|
|
24
|
+
.z-index-value {
|
|
25
|
+
font-weight: 600;
|
|
26
|
+
}
|
|
27
|
+
.z-index-number {
|
|
28
|
+
font-family: var(--font-mono, monospace);
|
|
29
|
+
margin-left: var(--spacing-3);
|
|
30
|
+
}
|
|
31
|
+
.z-index-callout {
|
|
32
|
+
margin-top: var(--spacing-8);
|
|
33
|
+
border-left-width: 4px;
|
|
34
|
+
}
|
|
35
|
+
.z-index-callout--info {
|
|
36
|
+
border-left-color: var(--color-info);
|
|
37
|
+
}
|
|
38
|
+
.z-index-callout--warning {
|
|
39
|
+
border-left-color: var(--color-warning);
|
|
40
|
+
}
|
|
41
|
+
.z-index-demo-wrapper {
|
|
42
|
+
position: relative;
|
|
43
|
+
height: 37.5rem;
|
|
44
|
+
overflow: hidden;
|
|
45
|
+
}
|
|
46
|
+
.z-index-demo-base {
|
|
47
|
+
padding: var(--spacing-6);
|
|
48
|
+
}
|
|
49
|
+
.z-index-demo-dropdown {
|
|
50
|
+
position: absolute;
|
|
51
|
+
top: 100px;
|
|
52
|
+
left: 50px;
|
|
53
|
+
z-index: var(--z-dropdown);
|
|
54
|
+
min-width: 12.5rem;
|
|
55
|
+
}
|
|
56
|
+
.z-index-demo-sticky {
|
|
57
|
+
position: absolute;
|
|
58
|
+
top: 180px;
|
|
59
|
+
left: 100px;
|
|
60
|
+
z-index: var(--z-sticky);
|
|
61
|
+
min-width: 12.5rem;
|
|
62
|
+
}
|
|
63
|
+
.z-index-demo-fixed {
|
|
64
|
+
position: absolute;
|
|
65
|
+
top: 260px;
|
|
66
|
+
left: 150px;
|
|
67
|
+
z-index: var(--z-fixed);
|
|
68
|
+
min-width: 12.5rem;
|
|
69
|
+
}
|
|
70
|
+
.z-index-demo-modal-overlay {
|
|
71
|
+
position: absolute;
|
|
72
|
+
border-radius: var(--radius-md);
|
|
73
|
+
inset: 0;
|
|
74
|
+
z-index: var(--z-modal);
|
|
75
|
+
background: rgba(0, 0, 0, 0.1);
|
|
76
|
+
display: flex;
|
|
77
|
+
align-items: center;
|
|
78
|
+
justify-content: center;
|
|
79
|
+
}
|
|
80
|
+
.z-index-demo-modal-card {
|
|
81
|
+
max-width: 25rem;
|
|
82
|
+
}
|
|
83
|
+
.z-index-demo-tooltip {
|
|
84
|
+
position: absolute;
|
|
85
|
+
top: 50px;
|
|
86
|
+
right: 50px;
|
|
87
|
+
z-index: var(--z-tooltip);
|
|
88
|
+
padding: var(--spacing-2) var(--spacing-3);
|
|
89
|
+
}
|
|
90
|
+
.z-index-demo-toast {
|
|
91
|
+
position: absolute;
|
|
92
|
+
top: 20px;
|
|
93
|
+
right: 20px;
|
|
94
|
+
z-index: var(--z-notification);
|
|
95
|
+
background: var(--color-success);
|
|
96
|
+
color: var(--color-text-inverse, #ffffff);
|
|
97
|
+
min-width: 15.625rem;
|
|
98
|
+
}
|
|
99
|
+
.z-index-note {
|
|
100
|
+
margin-top: var(--spacing-6);
|
|
101
|
+
}
|
|
102
|
+
</style>
|
|
103
|
+
`;
|
|
104
|
+
|
|
105
|
+
export const ZIndexScale = {
|
|
106
|
+
name: 'Z-Index Scale',
|
|
107
|
+
render: () => html`
|
|
108
|
+
${zIndexStoryStyles}
|
|
109
|
+
<div class="z-index-section">
|
|
110
|
+
<h2>Z-Index Token Scale</h2>
|
|
111
|
+
<p class="text-muted">
|
|
112
|
+
Tokens are organized from lowest to highest z-index values, ensuring proper stacking of UI layers.
|
|
113
|
+
</p>
|
|
114
|
+
|
|
115
|
+
<div class="grid grid-cols-1 gap-md">
|
|
116
|
+
<div class="card surface-subtle">
|
|
117
|
+
<code class="z-index-value">--z-dropdown</code>
|
|
118
|
+
<span class="z-index-number">1000</span>
|
|
119
|
+
<p class="text-muted">Dropdown menus and select options</p>
|
|
120
|
+
</div>
|
|
121
|
+
|
|
122
|
+
<div class="card surface-subtle">
|
|
123
|
+
<code class="z-index-value">--z-sticky</code>
|
|
124
|
+
<span class="z-index-number">1020</span>
|
|
125
|
+
<p class="text-muted">Sticky headers and navigation elements</p>
|
|
126
|
+
</div>
|
|
127
|
+
|
|
128
|
+
<div class="card surface-subtle">
|
|
129
|
+
<code class="z-index-value">--z-fixed</code>
|
|
130
|
+
<span class="z-index-number">1030</span>
|
|
131
|
+
<p class="text-muted">Fixed position elements</p>
|
|
132
|
+
</div>
|
|
133
|
+
|
|
134
|
+
<div class="card surface-subtle">
|
|
135
|
+
<code class="z-index-value">--z-modal</code>
|
|
136
|
+
<span class="z-index-number">1040</span>
|
|
137
|
+
<p class="text-muted">Modal dialogs and overlays</p>
|
|
138
|
+
</div>
|
|
139
|
+
|
|
140
|
+
<div class="card surface-subtle">
|
|
141
|
+
<code class="z-index-value">--z-drawer</code>
|
|
142
|
+
<span class="z-index-number">1050</span>
|
|
143
|
+
<p class="text-muted">Drawer panels (side sheets)</p>
|
|
144
|
+
</div>
|
|
145
|
+
|
|
146
|
+
<div class="card surface-subtle">
|
|
147
|
+
<code class="z-index-value">--z-popover</code>
|
|
148
|
+
<span class="z-index-number">1060</span>
|
|
149
|
+
<p class="text-muted">Popovers and context menus</p>
|
|
150
|
+
</div>
|
|
151
|
+
|
|
152
|
+
<div class="card surface-subtle">
|
|
153
|
+
<code class="z-index-value">--z-tooltip</code>
|
|
154
|
+
<span class="z-index-number">1070</span>
|
|
155
|
+
<p class="text-muted">Tooltips and helper text</p>
|
|
156
|
+
</div>
|
|
157
|
+
|
|
158
|
+
<div class="card surface-subtle">
|
|
159
|
+
<code class="z-index-value">--z-notification</code>
|
|
160
|
+
<span class="z-index-number">1080</span>
|
|
161
|
+
<p class="text-muted">Toast notifications and alerts</p>
|
|
162
|
+
</div>
|
|
163
|
+
</div>
|
|
164
|
+
|
|
165
|
+
<div class="card card-outlined z-index-callout z-index-callout--info">
|
|
166
|
+
<h3><pds-icon icon="info"></pds-icon> Best Practices</h3>
|
|
167
|
+
<ul>
|
|
168
|
+
<li>Always use these tokens instead of hard-coded z-index values</li>
|
|
169
|
+
<li>Tokens are spaced by 10 to allow for intermediate values if needed</li>
|
|
170
|
+
<li>Higher values appear above lower values in the stacking context</li>
|
|
171
|
+
<li>Notifications have the highest z-index to ensure visibility</li>
|
|
172
|
+
<li>Never exceed these values unless absolutely necessary</li>
|
|
173
|
+
</ul>
|
|
174
|
+
</div>
|
|
175
|
+
</div>
|
|
176
|
+
`
|
|
177
|
+
};
|
|
178
|
+
|
|
179
|
+
export const VisualDemo = {
|
|
180
|
+
name: 'Visual Stacking Demo',
|
|
181
|
+
render: () => html`
|
|
182
|
+
${zIndexStoryStyles}
|
|
183
|
+
<div class="z-index-section">
|
|
184
|
+
<h2>Interactive Stacking Example</h2>
|
|
185
|
+
<p class="text-muted">
|
|
186
|
+
This demo shows how different z-index tokens create proper layering.
|
|
187
|
+
Lower elements appear behind higher ones.
|
|
188
|
+
</p>
|
|
189
|
+
|
|
190
|
+
<div class="surface z-index-demo-wrapper">
|
|
191
|
+
|
|
192
|
+
<div class="z-index-demo-base">
|
|
193
|
+
<h3>Base Content (z-index: auto)</h3>
|
|
194
|
+
<p>This is the base layer of content with no explicit z-index.</p>
|
|
195
|
+
</div>
|
|
196
|
+
|
|
197
|
+
<div class="card card-elevated z-index-demo-dropdown">
|
|
198
|
+
<strong>Dropdown Menu</strong>
|
|
199
|
+
<p><small>z-index: var(--z-dropdown) = 1000</small></p>
|
|
200
|
+
</div>
|
|
201
|
+
|
|
202
|
+
<div class="card surface-elevated z-index-demo-sticky">
|
|
203
|
+
<strong>Sticky Header</strong>
|
|
204
|
+
<p><small>z-index: var(--z-sticky) = 1020</small></p>
|
|
205
|
+
</div>
|
|
206
|
+
|
|
207
|
+
<div class="card surface-elevated z-index-demo-fixed">
|
|
208
|
+
<strong>Fixed Element</strong>
|
|
209
|
+
<p><small>z-index: var(--z-fixed) = 1030</small></p>
|
|
210
|
+
</div>
|
|
211
|
+
|
|
212
|
+
<div class="z-index-demo-modal-overlay">
|
|
213
|
+
<article class="card card-elevated z-index-demo-modal-card">
|
|
214
|
+
<h4>Modal Dialog</h4>
|
|
215
|
+
<p><small>z-index: var(--z-modal) = 1040</small></p>
|
|
216
|
+
<p class="text-muted">Modal dialogs appear above most other content.</p>
|
|
217
|
+
</article>
|
|
218
|
+
</div>
|
|
219
|
+
|
|
220
|
+
<div class="surface-inverse z-index-demo-tooltip">
|
|
221
|
+
<strong>Tooltip</strong>
|
|
222
|
+
<p><small>--z-tooltip: 1070</small></p>
|
|
223
|
+
</div>
|
|
224
|
+
|
|
225
|
+
<div class="card z-index-demo-toast">
|
|
226
|
+
<strong>🎉 Notification Toast</strong>
|
|
227
|
+
<p><small>z-index: var(--z-notification) = 1080</small></p>
|
|
228
|
+
<p><small>Highest layer</small></p>
|
|
229
|
+
</div>
|
|
230
|
+
|
|
231
|
+
</div>
|
|
232
|
+
|
|
233
|
+
<div class="card card-outlined z-index-note">
|
|
234
|
+
<p>
|
|
235
|
+
<strong>Note:</strong> In this demo, elements are positioned to overlap.
|
|
236
|
+
Notice how higher z-index values appear above lower ones, with notifications at the top.
|
|
237
|
+
</p>
|
|
238
|
+
</div>
|
|
239
|
+
</div>
|
|
240
|
+
`
|
|
241
|
+
};
|
|
242
|
+
|
|
243
|
+
export const UsageExamples = {
|
|
244
|
+
name: 'Usage Examples',
|
|
245
|
+
render: () => html`
|
|
246
|
+
${zIndexStoryStyles}
|
|
247
|
+
<div class="z-index-section">
|
|
248
|
+
<h2>Code Examples</h2>
|
|
249
|
+
<p class="text-muted">
|
|
250
|
+
How to use z-index tokens in your components and styles.
|
|
251
|
+
</p>
|
|
252
|
+
|
|
253
|
+
<div class="grid grid-cols-1 gap-lg">
|
|
254
|
+
|
|
255
|
+
<article class="card surface-subtle">
|
|
256
|
+
<h3>Modal Dialog</h3>
|
|
257
|
+
<pre><code>.modal {
|
|
258
|
+
position: fixed;
|
|
259
|
+
inset: 0;
|
|
260
|
+
z-index: var(--z-modal);
|
|
261
|
+
display: flex;
|
|
262
|
+
align-items: center;
|
|
263
|
+
justify-content: center;
|
|
264
|
+
}</code></pre>
|
|
265
|
+
</article>
|
|
266
|
+
|
|
267
|
+
<article class="card surface-subtle">
|
|
268
|
+
<h3>Dropdown Menu</h3>
|
|
269
|
+
<pre><code>.dropdown-menu {
|
|
270
|
+
position: absolute;
|
|
271
|
+
z-index: var(--z-dropdown);
|
|
272
|
+
background: var(--color-surface-elevated);
|
|
273
|
+
box-shadow: var(--shadow-lg);
|
|
274
|
+
border-radius: var(--radius-md);
|
|
275
|
+
}</code></pre>
|
|
276
|
+
</article>
|
|
277
|
+
|
|
278
|
+
<article class="card surface-subtle">
|
|
279
|
+
<h3>Sticky Header</h3>
|
|
280
|
+
<pre><code>.sticky-header {
|
|
281
|
+
position: sticky;
|
|
282
|
+
top: 0;
|
|
283
|
+
z-index: var(--z-sticky);
|
|
284
|
+
background: var(--color-surface-base);
|
|
285
|
+
box-shadow: var(--shadow-sm);
|
|
286
|
+
}</code></pre>
|
|
287
|
+
</article>
|
|
288
|
+
|
|
289
|
+
<article class="card surface-subtle">
|
|
290
|
+
<h3>Toast Notification</h3>
|
|
291
|
+
<pre><code>.toast-notification {
|
|
292
|
+
position: fixed;
|
|
293
|
+
top: var(--spacing-4);
|
|
294
|
+
right: var(--spacing-4);
|
|
295
|
+
z-index: var(--z-notification);
|
|
296
|
+
padding: var(--spacing-4);
|
|
297
|
+
border-radius: var(--radius-md);
|
|
298
|
+
box-shadow: var(--shadow-xl);
|
|
299
|
+
}</code></pre>
|
|
300
|
+
</article>
|
|
301
|
+
|
|
302
|
+
<article class="card surface-subtle">
|
|
303
|
+
<h3>Tooltip</h3>
|
|
304
|
+
<pre><code>.tooltip {
|
|
305
|
+
position: absolute;
|
|
306
|
+
z-index: var(--z-tooltip);
|
|
307
|
+
padding: var(--spacing-2);
|
|
308
|
+
background: var(--color-surface-inverse);
|
|
309
|
+
color: var(--color-text-inverse);
|
|
310
|
+
font-size: var(--font-size-sm);
|
|
311
|
+
border-radius: var(--radius-sm);
|
|
312
|
+
}</code></pre>
|
|
313
|
+
</article>
|
|
314
|
+
|
|
315
|
+
</div>
|
|
316
|
+
|
|
317
|
+
<aside class="card card-outlined z-index-callout z-index-callout--warning">
|
|
318
|
+
<h3><pds-icon icon="warning"></pds-icon> Important Guidelines</h3>
|
|
319
|
+
<ul>
|
|
320
|
+
<li><strong>Never use magic numbers:</strong> Always reference these tokens instead of hardcoded values</li>
|
|
321
|
+
<li><strong>Respect the hierarchy:</strong> Don't try to make a dropdown appear above a modal</li>
|
|
322
|
+
<li><strong>Stacking context:</strong> Remember that z-index only works within the same stacking context</li>
|
|
323
|
+
<li><strong>Negative values:</strong> Avoid negative z-index values; use these tokens instead</li>
|
|
324
|
+
<li><strong>Component libraries:</strong> Ensure third-party components don't conflict with these ranges</li>
|
|
325
|
+
</ul>
|
|
326
|
+
</aside>
|
|
327
|
+
</div>
|
|
328
|
+
`
|
|
329
|
+
};
|