@pure-ds/storybook 0.4.16 → 0.4.19
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/html-preview/Panel.jsx +80 -29
- package/.storybook/addons/html-preview/preview.js +4 -5
- package/.storybook/manager.js +337 -49
- package/.storybook/preview-head.html +2 -2
- package/.storybook/preview.js +2 -2
- package/README.md +2 -2
- package/dist/pds-reference.json +1916 -267
- package/package.json +2 -2
- package/public/assets/css/app.css +2 -2
- package/public/assets/js/app.js +645 -10574
- package/public/assets/js/lit.js +3 -1048
- package/public/assets/js/pds.js +429 -7368
- package/public/assets/pds/components/pds-calendar.js +1 -1
- package/public/assets/pds/components/{pds-jsonform.js → pds-form.js} +536 -45
- package/public/assets/pds/custom-elements.json +271 -26
- package/public/assets/pds/pds-runtime-config.json +1 -1
- package/public/assets/pds/styles/pds-components.css +83 -221
- package/public/assets/pds/styles/pds-components.css.js +166 -442
- package/public/assets/pds/styles/pds-styles.css +240 -437
- package/public/assets/pds/styles/pds-styles.css.js +479 -881
- package/public/assets/pds/styles/pds-utilities.css +151 -214
- package/public/assets/pds/styles/pds-utilities.css.js +302 -428
- package/public/assets/pds/vscode-custom-data.json +63 -63
- package/scripts/build-pds-reference.mjs +112 -38
- package/scripts/generate-stories.js +2 -2
- package/src/js/common/ask.js +48 -21
- package/src/js/pds-configurator/pds-config-form.js +9 -9
- package/src/js/pds-configurator/pds-demo.js +2 -2
- package/src/js/pds-core/pds-config.js +14 -14
- package/src/js/pds-core/pds-generator.js +113 -50
- package/src/js/pds-core/pds-ontology.js +6 -6
- package/src/js/pds.d.ts +2 -2
- package/stories/GettingStarted.stories.js +3 -0
- package/stories/WhatIsPDS.stories.js +3 -0
- package/stories/components/PdsCalendar.stories.js +2 -2
- package/stories/components/PdsDrawer.stories.js +15 -15
- package/stories/components/PdsForm.stories.js +4356 -0
- package/stories/components/{PdsJsonformUiSchema.md → PdsFormUiSchema.md} +2 -2
- package/stories/components/PdsRichtext.stories.js +4 -17
- package/stories/components/PdsScrollrow.stories.js +224 -72
- package/stories/components/PdsSplitpanel.stories.js +63 -28
- package/stories/components/PdsTabstrip.stories.js +7 -7
- package/stories/enhancements/Accordion.stories.js +2 -2
- package/stories/enhancements/Dropdowns.stories.js +13 -10
- package/stories/enhancements/RangeSliders.stories.js +9 -9
- package/stories/enhancements/RequiredFields.stories.js +8 -8
- package/stories/enhancements/Toggles.stories.js +45 -36
- package/stories/enhancements/_enhancement-header.js +2 -2
- package/stories/foundations/Colors.stories.js +13 -13
- package/stories/foundations/HTMLDefaults.stories.js +4 -4
- package/stories/foundations/Icons.stories.js +123 -288
- package/stories/foundations/MeshGradients.stories.js +161 -250
- package/stories/foundations/SmartSurfaces.stories.js +147 -64
- package/stories/foundations/Spacing.stories.js +30 -30
- package/stories/foundations/Typography.stories.js +352 -723
- package/stories/foundations/ZIndex.stories.js +124 -141
- package/stories/layout/LayoutOverview.stories.js +345 -250
- package/stories/layout/LayoutSystem.stories.js +60 -76
- package/stories/patterns/InteractiveStates.stories.js +29 -29
- package/stories/patterns/Utilities.stories.js +17 -5
- package/stories/primitives/Alerts.stories.js +6 -6
- package/stories/primitives/Cards.stories.js +22 -11
- package/stories/primitives/{Forms.stories.js → FormElements.stories.js} +20 -11
- package/stories/primitives/HtmlFormElements.stories.js +128 -0
- package/stories/primitives/{FormGroups.stories.js → HtmlFormGroups.stories.js} +70 -21
- package/stories/primitives/Media.stories.js +23 -20
- package/stories/utilities/Backdrop.stories.js +68 -27
- package/stories/utils/PdsAsk.stories.js +15 -14
- package/public/assets/js/app.js.map +0 -7
- package/public/assets/js/lit.js.map +0 -7
- package/public/assets/js/pds.js.map +0 -7
- package/stories/components/PdsJsonform.stories.js +0 -1929
- /package/src/{pds-core → node-api}/pds-api.js +0 -0
|
@@ -15,89 +15,66 @@ export default {
|
|
|
15
15
|
}
|
|
16
16
|
};
|
|
17
17
|
|
|
18
|
+
// Minimal styles - only what's needed for the z-index visual demo
|
|
18
19
|
const zIndexStoryStyles = html`
|
|
19
20
|
<style>
|
|
20
|
-
.z-index-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}
|
|
24
|
-
.z-index-value {
|
|
25
|
-
font-weight: 600;
|
|
26
|
-
}
|
|
27
|
-
.z-index-number {
|
|
28
|
-
font-family: var(--font-mono, monospace);
|
|
21
|
+
.story-z-index-value {
|
|
22
|
+
font-weight: var(--font-weight-semibold);
|
|
23
|
+
font-family: var(--font-family-mono);
|
|
29
24
|
margin-left: var(--spacing-3);
|
|
30
25
|
}
|
|
31
|
-
.z-index-
|
|
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 {
|
|
26
|
+
.story-z-index-demo {
|
|
42
27
|
position: relative;
|
|
43
28
|
height: 37.5rem;
|
|
44
29
|
overflow: hidden;
|
|
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
|
-
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);
|
|
30
|
+
|
|
31
|
+
.story-dropdown {
|
|
32
|
+
position: absolute;
|
|
33
|
+
top: 100px;
|
|
34
|
+
left: 50px;
|
|
35
|
+
z-index: var(--z-dropdown);
|
|
36
|
+
min-width: 12.5rem;
|
|
37
|
+
}
|
|
38
|
+
.story-sticky {
|
|
39
|
+
position: absolute;
|
|
40
|
+
top: 180px;
|
|
41
|
+
left: 100px;
|
|
42
|
+
z-index: var(--z-sticky);
|
|
43
|
+
min-width: 12.5rem;
|
|
44
|
+
}
|
|
45
|
+
.story-fixed {
|
|
46
|
+
position: absolute;
|
|
47
|
+
top: 260px;
|
|
48
|
+
left: 150px;
|
|
49
|
+
z-index: var(--z-fixed);
|
|
50
|
+
min-width: 12.5rem;
|
|
51
|
+
}
|
|
52
|
+
.story-modal-overlay {
|
|
53
|
+
position: absolute;
|
|
54
|
+
border-radius: var(--radius-md);
|
|
55
|
+
inset: 0;
|
|
56
|
+
z-index: var(--z-modal);
|
|
57
|
+
background: rgba(0, 0, 0, 0.1);
|
|
58
|
+
display: flex;
|
|
59
|
+
align-items: center;
|
|
60
|
+
justify-content: center;
|
|
61
|
+
}
|
|
62
|
+
.story-tooltip {
|
|
63
|
+
position: absolute;
|
|
64
|
+
top: 50px;
|
|
65
|
+
right: 50px;
|
|
66
|
+
z-index: var(--z-tooltip);
|
|
67
|
+
padding: var(--spacing-2) var(--spacing-3);
|
|
68
|
+
}
|
|
69
|
+
.story-toast {
|
|
70
|
+
position: absolute;
|
|
71
|
+
top: 20px;
|
|
72
|
+
right: 20px;
|
|
73
|
+
z-index: var(--z-notification);
|
|
74
|
+
background: var(--color-success);
|
|
75
|
+
color: var(--color-text-inverse, #ffffff);
|
|
76
|
+
min-width: 15.625rem;
|
|
77
|
+
}
|
|
101
78
|
}
|
|
102
79
|
</style>
|
|
103
80
|
`;
|
|
@@ -106,63 +83,65 @@ export const ZIndexScale = {
|
|
|
106
83
|
name: 'Z-Index Scale',
|
|
107
84
|
render: () => html`
|
|
108
85
|
${zIndexStoryStyles}
|
|
109
|
-
<
|
|
110
|
-
<
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
86
|
+
<section class="stack-lg max-w-5xl">
|
|
87
|
+
<header>
|
|
88
|
+
<h2>Z-Index Token Scale</h2>
|
|
89
|
+
<p class="text-muted">
|
|
90
|
+
Tokens are organized from lowest to highest z-index values, ensuring proper stacking of UI layers.
|
|
91
|
+
</p>
|
|
92
|
+
</header>
|
|
114
93
|
|
|
115
94
|
<div class="grid grid-cols-1 gap-md">
|
|
116
|
-
<div class="card surface-translucent-50">
|
|
117
|
-
<code
|
|
118
|
-
<span class="z-index-
|
|
119
|
-
<p class="text-muted">Dropdown menus and select options</p>
|
|
95
|
+
<div class="card surface-translucent-50 flex items-center gap-sm">
|
|
96
|
+
<code>--z-dropdown</code>
|
|
97
|
+
<span class="story-z-index-value">1000</span>
|
|
98
|
+
<p class="text-muted grow text-right">Dropdown menus and select options</p>
|
|
120
99
|
</div>
|
|
121
100
|
|
|
122
|
-
<div class="card surface-translucent-50">
|
|
123
|
-
<code
|
|
124
|
-
<span class="z-index-
|
|
125
|
-
<p class="text-muted">Sticky headers and navigation elements</p>
|
|
101
|
+
<div class="card surface-translucent-50 flex items-center gap-sm">
|
|
102
|
+
<code>--z-sticky</code>
|
|
103
|
+
<span class="story-z-index-value">1020</span>
|
|
104
|
+
<p class="text-muted grow text-right">Sticky headers and navigation elements</p>
|
|
126
105
|
</div>
|
|
127
106
|
|
|
128
|
-
<div class="card surface-translucent-50">
|
|
129
|
-
<code
|
|
130
|
-
<span class="z-index-
|
|
131
|
-
<p class="text-muted">Fixed position elements</p>
|
|
107
|
+
<div class="card surface-translucent-50 flex items-center gap-sm">
|
|
108
|
+
<code>--z-fixed</code>
|
|
109
|
+
<span class="story-z-index-value">1030</span>
|
|
110
|
+
<p class="text-muted grow text-right">Fixed position elements</p>
|
|
132
111
|
</div>
|
|
133
112
|
|
|
134
|
-
<div class="card surface-translucent-50">
|
|
135
|
-
<code
|
|
136
|
-
<span class="z-index-
|
|
137
|
-
<p class="text-muted">Modal dialogs and overlays</p>
|
|
113
|
+
<div class="card surface-translucent-50 flex items-center gap-sm">
|
|
114
|
+
<code>--z-modal</code>
|
|
115
|
+
<span class="story-z-index-value">1040</span>
|
|
116
|
+
<p class="text-muted grow text-right">Modal dialogs and overlays</p>
|
|
138
117
|
</div>
|
|
139
118
|
|
|
140
|
-
<div class="card surface-translucent-50">
|
|
141
|
-
<code
|
|
142
|
-
<span class="z-index-
|
|
143
|
-
<p class="text-muted">Drawer panels (side sheets)</p>
|
|
119
|
+
<div class="card surface-translucent-50 flex items-center gap-sm">
|
|
120
|
+
<code>--z-drawer</code>
|
|
121
|
+
<span class="story-z-index-value">1050</span>
|
|
122
|
+
<p class="text-muted grow text-right">Drawer panels (side sheets)</p>
|
|
144
123
|
</div>
|
|
145
124
|
|
|
146
|
-
<div class="card surface-translucent-50">
|
|
147
|
-
<code
|
|
148
|
-
<span class="z-index-
|
|
149
|
-
<p class="text-muted">Popovers and context menus</p>
|
|
125
|
+
<div class="card surface-translucent-50 flex items-center gap-sm">
|
|
126
|
+
<code>--z-popover</code>
|
|
127
|
+
<span class="story-z-index-value">1060</span>
|
|
128
|
+
<p class="text-muted grow text-right">Popovers and context menus</p>
|
|
150
129
|
</div>
|
|
151
130
|
|
|
152
|
-
<div class="card surface-translucent-50">
|
|
153
|
-
<code
|
|
154
|
-
<span class="z-index-
|
|
155
|
-
<p class="text-muted">Tooltips and helper text</p>
|
|
131
|
+
<div class="card surface-translucent-50 flex items-center gap-sm">
|
|
132
|
+
<code>--z-tooltip</code>
|
|
133
|
+
<span class="story-z-index-value">1070</span>
|
|
134
|
+
<p class="text-muted grow text-right">Tooltips and helper text</p>
|
|
156
135
|
</div>
|
|
157
136
|
|
|
158
|
-
<div class="card surface-translucent-50">
|
|
159
|
-
<code
|
|
160
|
-
<span class="z-index-
|
|
161
|
-
<p class="text-muted">Toast notifications and alerts</p>
|
|
137
|
+
<div class="card surface-translucent-50 flex items-center gap-sm">
|
|
138
|
+
<code>--z-notification</code>
|
|
139
|
+
<span class="story-z-index-value">1080</span>
|
|
140
|
+
<p class="text-muted grow text-right">Toast notifications and alerts</p>
|
|
162
141
|
</div>
|
|
163
142
|
</div>
|
|
164
143
|
|
|
165
|
-
<
|
|
144
|
+
<aside class="alert alert-info">
|
|
166
145
|
<h3><pds-icon icon="info"></pds-icon> Best Practices</h3>
|
|
167
146
|
<ul>
|
|
168
147
|
<li>Always use these tokens instead of hard-coded z-index values</li>
|
|
@@ -171,8 +150,8 @@ export const ZIndexScale = {
|
|
|
171
150
|
<li>Notifications have the highest z-index to ensure visibility</li>
|
|
172
151
|
<li>Never exceed these values unless absolutely necessary</li>
|
|
173
152
|
</ul>
|
|
174
|
-
</
|
|
175
|
-
</
|
|
153
|
+
</aside>
|
|
154
|
+
</section>
|
|
176
155
|
`
|
|
177
156
|
};
|
|
178
157
|
|
|
@@ -180,49 +159,51 @@ export const VisualDemo = {
|
|
|
180
159
|
name: 'Visual Stacking Demo',
|
|
181
160
|
render: () => html`
|
|
182
161
|
${zIndexStoryStyles}
|
|
183
|
-
<
|
|
184
|
-
<
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
162
|
+
<section class="stack-lg max-w-5xl">
|
|
163
|
+
<header>
|
|
164
|
+
<h2>Interactive Stacking Example</h2>
|
|
165
|
+
<p class="text-muted">
|
|
166
|
+
This demo shows how different z-index tokens create proper layering.
|
|
167
|
+
Lower elements appear behind higher ones.
|
|
168
|
+
</p>
|
|
169
|
+
</header>
|
|
189
170
|
|
|
190
|
-
<div class="surface z-index-demo
|
|
171
|
+
<div class="surface story-z-index-demo">
|
|
191
172
|
|
|
192
|
-
<div class="
|
|
173
|
+
<div class="card">
|
|
193
174
|
<h3>Base Content (z-index: auto)</h3>
|
|
194
175
|
<p>This is the base layer of content with no explicit z-index.</p>
|
|
195
176
|
</div>
|
|
196
177
|
|
|
197
|
-
<div class="card card-elevated
|
|
178
|
+
<div class="card card-elevated story-dropdown">
|
|
198
179
|
<strong>Dropdown Menu</strong>
|
|
199
180
|
<p><small>z-index: var(--z-dropdown) = 1000</small></p>
|
|
200
181
|
</div>
|
|
201
182
|
|
|
202
|
-
<div class="card surface-elevated
|
|
183
|
+
<div class="card surface-elevated story-sticky">
|
|
203
184
|
<strong>Sticky Header</strong>
|
|
204
185
|
<p><small>z-index: var(--z-sticky) = 1020</small></p>
|
|
205
186
|
</div>
|
|
206
187
|
|
|
207
|
-
<div class="card surface-elevated
|
|
188
|
+
<div class="card surface-elevated story-fixed">
|
|
208
189
|
<strong>Fixed Element</strong>
|
|
209
190
|
<p><small>z-index: var(--z-fixed) = 1030</small></p>
|
|
210
191
|
</div>
|
|
211
192
|
|
|
212
|
-
<div class="
|
|
213
|
-
<article class="card card-elevated
|
|
193
|
+
<div class="story-modal-overlay">
|
|
194
|
+
<article class="card card-elevated">
|
|
214
195
|
<h4>Modal Dialog</h4>
|
|
215
196
|
<p><small>z-index: var(--z-modal) = 1040</small></p>
|
|
216
197
|
<p class="text-muted">Modal dialogs appear above most other content.</p>
|
|
217
198
|
</article>
|
|
218
199
|
</div>
|
|
219
200
|
|
|
220
|
-
<div class="surface-inverse
|
|
201
|
+
<div class="surface-inverse story-tooltip">
|
|
221
202
|
<strong>Tooltip</strong>
|
|
222
203
|
<p><small>--z-tooltip: 1070</small></p>
|
|
223
204
|
</div>
|
|
224
205
|
|
|
225
|
-
<div class="card
|
|
206
|
+
<div class="card story-toast">
|
|
226
207
|
<strong>🎉 Notification Toast</strong>
|
|
227
208
|
<p><small>z-index: var(--z-notification) = 1080</small></p>
|
|
228
209
|
<p><small>Highest layer</small></p>
|
|
@@ -230,13 +211,13 @@ export const VisualDemo = {
|
|
|
230
211
|
|
|
231
212
|
</div>
|
|
232
213
|
|
|
233
|
-
<
|
|
214
|
+
<aside class="alert alert-neutral">
|
|
234
215
|
<p>
|
|
235
216
|
<strong>Note:</strong> In this demo, elements are positioned to overlap.
|
|
236
217
|
Notice how higher z-index values appear above lower ones, with notifications at the top.
|
|
237
218
|
</p>
|
|
238
|
-
</
|
|
239
|
-
</
|
|
219
|
+
</aside>
|
|
220
|
+
</section>
|
|
240
221
|
`
|
|
241
222
|
};
|
|
242
223
|
|
|
@@ -244,11 +225,13 @@ export const UsageExamples = {
|
|
|
244
225
|
name: 'Usage Examples',
|
|
245
226
|
render: () => html`
|
|
246
227
|
${zIndexStoryStyles}
|
|
247
|
-
<
|
|
248
|
-
<
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
228
|
+
<section class="stack-lg max-w-5xl">
|
|
229
|
+
<header>
|
|
230
|
+
<h2>Code Examples</h2>
|
|
231
|
+
<p class="text-muted">
|
|
232
|
+
How to use z-index tokens in your components and styles.
|
|
233
|
+
</p>
|
|
234
|
+
</header>
|
|
252
235
|
|
|
253
236
|
<div class="grid grid-cols-1 gap-lg">
|
|
254
237
|
|
|
@@ -314,7 +297,7 @@ export const UsageExamples = {
|
|
|
314
297
|
|
|
315
298
|
</div>
|
|
316
299
|
|
|
317
|
-
<aside class="
|
|
300
|
+
<aside class="alert alert-warning">
|
|
318
301
|
<h3><pds-icon icon="warning"></pds-icon> Important Guidelines</h3>
|
|
319
302
|
<ul>
|
|
320
303
|
<li><strong>Never use magic numbers:</strong> Always reference these tokens instead of hardcoded values</li>
|
|
@@ -324,6 +307,6 @@ export const UsageExamples = {
|
|
|
324
307
|
<li><strong>Component libraries:</strong> Ensure third-party components don't conflict with these ranges</li>
|
|
325
308
|
</ul>
|
|
326
309
|
</aside>
|
|
327
|
-
</
|
|
310
|
+
</section>
|
|
328
311
|
`
|
|
329
312
|
};
|