@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
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
import { html } from 'lit';
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Utilities/Backdrop',
|
|
5
|
+
tags: ['layout', 'backdrop', 'modal', 'overlay', 'utilities'],
|
|
6
|
+
parameters: {
|
|
7
|
+
pds: {
|
|
8
|
+
tags: ['backdrop', 'modal', 'overlay', 'utilities']
|
|
9
|
+
},
|
|
10
|
+
docs: {
|
|
11
|
+
description: {
|
|
12
|
+
component: 'Backdrop utilities for modal overlays, drawers, and lightboxes. Provides consistent blur and dimming effects with light/dark variants.'
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export const BackdropVariants = () => html`
|
|
19
|
+
<div class="card">
|
|
20
|
+
<h2>Backdrop Utilities</h2>
|
|
21
|
+
<p class="text-muted">
|
|
22
|
+
The <code>.backdrop</code> class provides a full-screen overlay for modals and dialogs.
|
|
23
|
+
Add <code>.active</code> to show the backdrop.
|
|
24
|
+
</p>
|
|
25
|
+
</div>
|
|
26
|
+
|
|
27
|
+
<div class="grid grid-auto-md gap-lg">
|
|
28
|
+
<article class="card">
|
|
29
|
+
<h3>Default Backdrop</h3>
|
|
30
|
+
<p>Uses theme backdrop variables with subtle blur and gradient.</p>
|
|
31
|
+
<code>.backdrop.active</code>
|
|
32
|
+
<div style="position: relative; height: 200px; margin-top: var(--spacing-4); border-radius: var(--radius-md); overflow: hidden;">
|
|
33
|
+
<img src="https://picsum.photos/400/200?random=1" alt="Background" style="width: 100%; height: 100%; object-fit: cover;" />
|
|
34
|
+
<div class="backdrop active" style="position: absolute;"></div>
|
|
35
|
+
<div style="position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; z-index: 1;">
|
|
36
|
+
<div class="card surface-overlay" style="text-align: center;">
|
|
37
|
+
<p>Modal content</p>
|
|
38
|
+
</div>
|
|
39
|
+
</div>
|
|
40
|
+
</div>
|
|
41
|
+
</article>
|
|
42
|
+
|
|
43
|
+
<article class="card">
|
|
44
|
+
<h3>Light Backdrop</h3>
|
|
45
|
+
<p>For light-themed overlays or subtle dimming.</p>
|
|
46
|
+
<code>.backdrop.backdrop-light.active</code>
|
|
47
|
+
<div style="position: relative; height: 200px; margin-top: var(--spacing-4); border-radius: var(--radius-md); overflow: hidden;">
|
|
48
|
+
<img src="https://picsum.photos/400/200?random=2" alt="Background" style="width: 100%; height: 100%; object-fit: cover;" />
|
|
49
|
+
<div class="backdrop backdrop-light active" style="position: absolute;"></div>
|
|
50
|
+
<div style="position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; z-index: 1;">
|
|
51
|
+
<div class="card" style="text-align: center;">
|
|
52
|
+
<p>Light overlay</p>
|
|
53
|
+
</div>
|
|
54
|
+
</div>
|
|
55
|
+
</div>
|
|
56
|
+
</article>
|
|
57
|
+
|
|
58
|
+
<article class="card">
|
|
59
|
+
<h3>Dark Backdrop</h3>
|
|
60
|
+
<p>For dramatic dimming and focus on content.</p>
|
|
61
|
+
<code>.backdrop.backdrop-dark.active</code>
|
|
62
|
+
<div style="position: relative; height: 200px; margin-top: var(--spacing-4); border-radius: var(--radius-md); overflow: hidden;">
|
|
63
|
+
<img src="https://picsum.photos/400/200?random=3" alt="Background" style="width: 100%; height: 100%; object-fit: cover;" />
|
|
64
|
+
<div class="backdrop backdrop-dark active" style="position: absolute;"></div>
|
|
65
|
+
<div style="position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; z-index: 1;">
|
|
66
|
+
<div class="card surface-overlay" style="text-align: center; color: white;">
|
|
67
|
+
<p>Dark overlay</p>
|
|
68
|
+
</div>
|
|
69
|
+
</div>
|
|
70
|
+
</div>
|
|
71
|
+
</article>
|
|
72
|
+
</div>
|
|
73
|
+
`;
|
|
74
|
+
|
|
75
|
+
BackdropVariants.storyName = 'Backdrop Variants';
|
|
76
|
+
|
|
77
|
+
export const BlurLevels = () => html`
|
|
78
|
+
<div class="card">
|
|
79
|
+
<h2>Backdrop Blur Levels</h2>
|
|
80
|
+
<p class="text-muted">
|
|
81
|
+
Control the blur intensity with <code>.backdrop-blur-sm</code>, <code>.backdrop-blur-md</code>,
|
|
82
|
+
and <code>.backdrop-blur-lg</code>.
|
|
83
|
+
</p>
|
|
84
|
+
</div>
|
|
85
|
+
|
|
86
|
+
<div class="grid grid-cols-3 gap-md">
|
|
87
|
+
<article class="card">
|
|
88
|
+
<h4>Small Blur</h4>
|
|
89
|
+
<code>.backdrop-blur-sm</code>
|
|
90
|
+
<div style="position: relative; height: 150px; margin-top: var(--spacing-3); border-radius: var(--radius-md); overflow: hidden;">
|
|
91
|
+
<img src="https://picsum.photos/300/150?random=4" alt="Background" style="width: 100%; height: 100%; object-fit: cover;" />
|
|
92
|
+
<div class="backdrop backdrop-blur-sm active" style="position: absolute;"></div>
|
|
93
|
+
<div style="position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; z-index: 1;">
|
|
94
|
+
<span class="badge badge-primary">5px blur</span>
|
|
95
|
+
</div>
|
|
96
|
+
</div>
|
|
97
|
+
</article>
|
|
98
|
+
|
|
99
|
+
<article class="card">
|
|
100
|
+
<h4>Medium Blur</h4>
|
|
101
|
+
<code>.backdrop-blur-md</code>
|
|
102
|
+
<div style="position: relative; height: 150px; margin-top: var(--spacing-3); border-radius: var(--radius-md); overflow: hidden;">
|
|
103
|
+
<img src="https://picsum.photos/300/150?random=5" alt="Background" style="width: 100%; height: 100%; object-fit: cover;" />
|
|
104
|
+
<div class="backdrop backdrop-blur-md active" style="position: absolute;"></div>
|
|
105
|
+
<div style="position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; z-index: 1;">
|
|
106
|
+
<span class="badge badge-secondary">10px blur</span>
|
|
107
|
+
</div>
|
|
108
|
+
</div>
|
|
109
|
+
</article>
|
|
110
|
+
|
|
111
|
+
<article class="card">
|
|
112
|
+
<h4>Large Blur</h4>
|
|
113
|
+
<code>.backdrop-blur-lg</code>
|
|
114
|
+
<div style="position: relative; height: 150px; margin-top: var(--spacing-3); border-radius: var(--radius-md); overflow: hidden;">
|
|
115
|
+
<img src="https://picsum.photos/300/150?random=6" alt="Background" style="width: 100%; height: 100%; object-fit: cover;" />
|
|
116
|
+
<div class="backdrop backdrop-blur-lg active" style="position: absolute;"></div>
|
|
117
|
+
<div style="position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; z-index: 1;">
|
|
118
|
+
<span class="badge badge-info">20px blur</span>
|
|
119
|
+
</div>
|
|
120
|
+
</div>
|
|
121
|
+
</article>
|
|
122
|
+
</div>
|
|
123
|
+
`;
|
|
124
|
+
|
|
125
|
+
BlurLevels.storyName = 'Blur Levels';
|
|
126
|
+
|
|
127
|
+
export const BackdropReference = () => html`
|
|
128
|
+
<div class="card">
|
|
129
|
+
<h2>Backdrop Utilities Reference</h2>
|
|
130
|
+
</div>
|
|
131
|
+
|
|
132
|
+
<table class="table-bordered">
|
|
133
|
+
<thead>
|
|
134
|
+
<tr>
|
|
135
|
+
<th>Class</th>
|
|
136
|
+
<th>Description</th>
|
|
137
|
+
<th>CSS Variable Override</th>
|
|
138
|
+
</tr>
|
|
139
|
+
</thead>
|
|
140
|
+
<tbody>
|
|
141
|
+
<tr>
|
|
142
|
+
<td><code>.backdrop</code></td>
|
|
143
|
+
<td>Base backdrop with fixed positioning, uses theme variables</td>
|
|
144
|
+
<td>Uses <code>--backdrop-bg</code>, <code>--backdrop-filter</code></td>
|
|
145
|
+
</tr>
|
|
146
|
+
<tr>
|
|
147
|
+
<td><code>.backdrop.active</code></td>
|
|
148
|
+
<td>Shows the backdrop with opacity transition</td>
|
|
149
|
+
<td><code>--backdrop-opacity</code></td>
|
|
150
|
+
</tr>
|
|
151
|
+
<tr>
|
|
152
|
+
<td><code>.backdrop-light</code></td>
|
|
153
|
+
<td>Light gradient overlay (white-based)</td>
|
|
154
|
+
<td>Sets <code>--backdrop-bg</code> to light gradient</td>
|
|
155
|
+
</tr>
|
|
156
|
+
<tr>
|
|
157
|
+
<td><code>.backdrop-dark</code></td>
|
|
158
|
+
<td>Dark gradient overlay (black-based)</td>
|
|
159
|
+
<td>Sets <code>--backdrop-bg</code> to dark gradient</td>
|
|
160
|
+
</tr>
|
|
161
|
+
<tr>
|
|
162
|
+
<td><code>.backdrop-blur-sm</code></td>
|
|
163
|
+
<td>Small blur effect (5px)</td>
|
|
164
|
+
<td>Sets <code>--backdrop-blur: 5px</code></td>
|
|
165
|
+
</tr>
|
|
166
|
+
<tr>
|
|
167
|
+
<td><code>.backdrop-blur-md</code></td>
|
|
168
|
+
<td>Medium blur effect (10px)</td>
|
|
169
|
+
<td>Sets <code>--backdrop-blur: 10px</code></td>
|
|
170
|
+
</tr>
|
|
171
|
+
<tr>
|
|
172
|
+
<td><code>.backdrop-blur-lg</code></td>
|
|
173
|
+
<td>Large blur effect (20px)</td>
|
|
174
|
+
<td>Sets <code>--backdrop-blur: 20px</code></td>
|
|
175
|
+
</tr>
|
|
176
|
+
</tbody>
|
|
177
|
+
</table>
|
|
178
|
+
|
|
179
|
+
<div class="card">
|
|
180
|
+
<h3>Usage with PDS Dialogs</h3>
|
|
181
|
+
<p>
|
|
182
|
+
Note: PDS dialogs (<code><dialog></code>) and <code>PDS.ask()</code>
|
|
183
|
+
automatically use the <code>::backdrop</code> pseudo-element with proper styling.
|
|
184
|
+
These utilities are primarily for custom overlay implementations.
|
|
185
|
+
</p>
|
|
186
|
+
<pre><code><!-- Custom overlay pattern -->
|
|
187
|
+
<div class="backdrop backdrop-blur-md" id="customOverlay"></div>
|
|
188
|
+
<div class="modal-content">...</div>
|
|
189
|
+
|
|
190
|
+
<script>
|
|
191
|
+
// Toggle backdrop
|
|
192
|
+
customOverlay.classList.toggle('active');
|
|
193
|
+
</script></code></pre>
|
|
194
|
+
</div>
|
|
195
|
+
`;
|
|
196
|
+
|
|
197
|
+
BackdropReference.storyName = 'Reference';
|
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
import { html } from 'lit';
|
|
2
|
-
|
|
3
|
-
export default {
|
|
4
|
-
title: 'Patterns/Layout',
|
|
5
|
-
tags: ['grouping'],
|
|
6
|
-
parameters: {
|
|
7
|
-
pds: {
|
|
8
|
-
tags: ['layout', 'grid', 'flex', 'grouping']
|
|
9
|
-
},
|
|
10
|
-
docs: {
|
|
11
|
-
description: {
|
|
12
|
-
component: 'Layout patterns using grid, flex, and container utilities'
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
const layoutStoryStyles = html`
|
|
19
|
-
<style>
|
|
20
|
-
.layout-auto-grid {
|
|
21
|
-
grid-template-columns: repeat(auto-fill, minmax(12.5rem, 1fr));
|
|
22
|
-
gap: var(--spacing-4);
|
|
23
|
-
}
|
|
24
|
-
.layout-flex-item {
|
|
25
|
-
flex: 1;
|
|
26
|
-
min-width: 12.5rem;
|
|
27
|
-
}
|
|
28
|
-
.layout-container {
|
|
29
|
-
max-width: 75rem;
|
|
30
|
-
margin: 0 auto;
|
|
31
|
-
padding: var(--spacing-4);
|
|
32
|
-
}
|
|
33
|
-
.layout-section-spacing {
|
|
34
|
-
margin-top: var(--spacing-4);
|
|
35
|
-
}
|
|
36
|
-
.layout-grid-card {
|
|
37
|
-
padding: var(--spacing-4);
|
|
38
|
-
text-align: center;
|
|
39
|
-
}
|
|
40
|
-
</style>
|
|
41
|
-
`;
|
|
42
|
-
|
|
43
|
-
export const GridLayout = () => html`
|
|
44
|
-
${layoutStoryStyles}
|
|
45
|
-
<div class="grid layout-auto-grid">
|
|
46
|
-
${Array.from({ length: 6 }, (_, i) => html`
|
|
47
|
-
<div class="card">
|
|
48
|
-
<h4>Grid Item ${i + 1}</h4>
|
|
49
|
-
<p>Content in grid cell</p>
|
|
50
|
-
</div>
|
|
51
|
-
`)}
|
|
52
|
-
</div>
|
|
53
|
-
`;
|
|
54
|
-
|
|
55
|
-
export const FlexLayout = () => html`
|
|
56
|
-
${layoutStoryStyles}
|
|
57
|
-
<div class="flex gap-sm flex-wrap">
|
|
58
|
-
<div class="card layout-flex-item">
|
|
59
|
-
<h4>Flexible Box 1</h4>
|
|
60
|
-
<p>Grows to fill space</p>
|
|
61
|
-
</div>
|
|
62
|
-
<div class="card layout-flex-item">
|
|
63
|
-
<h4>Flexible Box 2</h4>
|
|
64
|
-
<p>Equal flex basis</p>
|
|
65
|
-
</div>
|
|
66
|
-
<div class="card layout-flex-item">
|
|
67
|
-
<h4>Flexible Box 3</h4>
|
|
68
|
-
<p>Responsive wrapping</p>
|
|
69
|
-
</div>
|
|
70
|
-
</div>
|
|
71
|
-
`;
|
|
72
|
-
|
|
73
|
-
export const ContainerLayout = () => html`
|
|
74
|
-
${layoutStoryStyles}
|
|
75
|
-
<div class="layout-container">
|
|
76
|
-
<h2>Centered Container</h2>
|
|
77
|
-
<p>Content is constrained to a maximum width and centered.</p>
|
|
78
|
-
<div class="grid grid-cols-3 gap-md layout-section-spacing">
|
|
79
|
-
${Array.from({ length: 3 }, (_, i) => html`
|
|
80
|
-
<div class="card">
|
|
81
|
-
<h4>Column ${i + 1}</h4>
|
|
82
|
-
<p>Three equal columns</p>
|
|
83
|
-
</div>
|
|
84
|
-
`)}
|
|
85
|
-
</div>
|
|
86
|
-
</div>
|
|
87
|
-
`;
|
|
88
|
-
|
|
89
|
-
export const ResponsiveGrid = () => html`
|
|
90
|
-
${layoutStoryStyles}
|
|
91
|
-
<div class="grid grid-auto-md gap-md">
|
|
92
|
-
${Array.from({ length: 12 }, (_, i) => html`
|
|
93
|
-
<div class="card layout-grid-card">
|
|
94
|
-
<h4>Item ${i + 1}</h4>
|
|
95
|
-
<p>Auto-responsive grid cell</p>
|
|
96
|
-
</div>
|
|
97
|
-
`)}
|
|
98
|
-
</div>
|
|
99
|
-
`;
|
|
@@ -1,208 +0,0 @@
|
|
|
1
|
-
import { html } from 'lit';
|
|
2
|
-
|
|
3
|
-
export default {
|
|
4
|
-
title: 'Utilities/Grid System',
|
|
5
|
-
tags: ['layout', 'grid', 'spacing', 'utilities', 'gap'],
|
|
6
|
-
parameters: {
|
|
7
|
-
pds: {
|
|
8
|
-
tags: ['grid', 'layout', 'utilities', 'spacing', 'gap']
|
|
9
|
-
},
|
|
10
|
-
docs: {
|
|
11
|
-
description: {
|
|
12
|
-
component: 'Modern, config-driven grid system with fixed column grids and auto-fit responsive layouts. All utilities are generated from layout.gridSystem configuration.'
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
const gridSystemStoryStyles = html`
|
|
19
|
-
<style>
|
|
20
|
-
.grid-system-card-title {
|
|
21
|
-
margin-top: var(--spacing-3);
|
|
22
|
-
}
|
|
23
|
-
</style>
|
|
24
|
-
`;
|
|
25
|
-
|
|
26
|
-
export const FixedColumnGrids = () => html`
|
|
27
|
-
<div class="card">
|
|
28
|
-
<h3>Two Column Grid (.grid-cols-2)</h3>
|
|
29
|
-
<div class="grid grid-cols-2 gap-md">
|
|
30
|
-
<div class="card text-center">
|
|
31
|
-
<pds-icon icon="square" size="lg" class="icon-primary"></pds-icon>
|
|
32
|
-
<h4>Column 1</h4>
|
|
33
|
-
<p>Equal width columns</p>
|
|
34
|
-
</div>
|
|
35
|
-
<div class="card text-center">
|
|
36
|
-
<pds-icon icon="square" size="lg" class="icon-secondary"></pds-icon>
|
|
37
|
-
<h4>Column 2</h4>
|
|
38
|
-
<p>Auto responsive</p>
|
|
39
|
-
</div>
|
|
40
|
-
</div>
|
|
41
|
-
</div>
|
|
42
|
-
|
|
43
|
-
<div class="card">
|
|
44
|
-
<h3>Three Column Grid (.grid-cols-3)</h3>
|
|
45
|
-
<div class="grid grid-cols-3 gap-sm">
|
|
46
|
-
<div class="card text-center">
|
|
47
|
-
<pds-icon icon="circle" size="md" class="icon-success"></pds-icon>
|
|
48
|
-
<p>Column 1</p>
|
|
49
|
-
</div>
|
|
50
|
-
<div class="card text-center">
|
|
51
|
-
<pds-icon icon="circle" size="md" class="icon-warning"></pds-icon>
|
|
52
|
-
<p>Column 2</p>
|
|
53
|
-
</div>
|
|
54
|
-
<div class="card text-center">
|
|
55
|
-
<pds-icon icon="circle" size="md" class="icon-danger"></pds-icon>
|
|
56
|
-
<p>Column 3</p>
|
|
57
|
-
</div>
|
|
58
|
-
</div>
|
|
59
|
-
</div>
|
|
60
|
-
|
|
61
|
-
<div class="card">
|
|
62
|
-
<h3>Four Column Grid (.grid-cols-4)</h3>
|
|
63
|
-
<div class="grid grid-cols-4 gap-xs">
|
|
64
|
-
${Array.from({ length: 4 }, (_, i) => html`
|
|
65
|
-
<div class="card text-center">
|
|
66
|
-
<strong>${i + 1}</strong>
|
|
67
|
-
</div>
|
|
68
|
-
`)}
|
|
69
|
-
</div>
|
|
70
|
-
</div>
|
|
71
|
-
`;
|
|
72
|
-
|
|
73
|
-
FixedColumnGrids.storyName = 'Fixed Column Grids';
|
|
74
|
-
|
|
75
|
-
export const AutoFitGrids = () => html`
|
|
76
|
-
<div class="card">
|
|
77
|
-
<h3>.grid-auto-sm (min 150px)</h3>
|
|
78
|
-
<p class="text-muted">
|
|
79
|
-
<em>Resize the window to see columns automatically adjust</em>
|
|
80
|
-
</p>
|
|
81
|
-
<div class="grid grid-auto-sm gap-md">
|
|
82
|
-
<div class="card text-center">
|
|
83
|
-
<pds-icon icon="desktop" size="lg" class="icon-info"></pds-icon>
|
|
84
|
-
<h5>Responsive</h5>
|
|
85
|
-
<p>Automatically wraps</p>
|
|
86
|
-
</div>
|
|
87
|
-
<div class="card text-center">
|
|
88
|
-
<pds-icon icon="device-mobile" size="lg" class="icon-info"></pds-icon>
|
|
89
|
-
<h5>Adaptive</h5>
|
|
90
|
-
<p>Based on space</p>
|
|
91
|
-
</div>
|
|
92
|
-
<div class="card text-center">
|
|
93
|
-
<pds-icon icon="globe" size="lg" class="icon-info"></pds-icon>
|
|
94
|
-
<h5>Flexible</h5>
|
|
95
|
-
<p>Resize the window</p>
|
|
96
|
-
</div>
|
|
97
|
-
<div class="card text-center">
|
|
98
|
-
<pds-icon icon="feather" size="lg" class="icon-info"></pds-icon>
|
|
99
|
-
<h5>Dynamic</h5>
|
|
100
|
-
<p>No breakpoints needed</p>
|
|
101
|
-
</div>
|
|
102
|
-
</div>
|
|
103
|
-
</div>
|
|
104
|
-
|
|
105
|
-
<div class="card">
|
|
106
|
-
<h3>.grid-auto-md (min 250px)</h3>
|
|
107
|
-
<div class="grid grid-auto-md gap-lg">
|
|
108
|
-
<div class="card surface-elevated text-center">
|
|
109
|
-
<pds-icon icon="rocket" size="xl" class="icon-accent"></pds-icon>
|
|
110
|
-
<h5>Card 1</h5>
|
|
111
|
-
<p>Larger minimum width means fewer columns on small screens</p>
|
|
112
|
-
</div>
|
|
113
|
-
<div class="card surface-elevated text-center">
|
|
114
|
-
<pds-icon icon="palette" size="xl" class="icon-accent"></pds-icon>
|
|
115
|
-
<h5>Card 2</h5>
|
|
116
|
-
<p>Smart surface tokens apply automatically</p>
|
|
117
|
-
</div>
|
|
118
|
-
<div class="card surface-elevated text-center">
|
|
119
|
-
<pds-icon icon="heart" size="xl" class="icon-accent"></pds-icon>
|
|
120
|
-
<h5>Card 3</h5>
|
|
121
|
-
<p>Consistent spacing with gap utilities</p>
|
|
122
|
-
</div>
|
|
123
|
-
</div>
|
|
124
|
-
</div>
|
|
125
|
-
`;
|
|
126
|
-
|
|
127
|
-
AutoFitGrids.storyName = 'Auto-Fit Responsive Grids';
|
|
128
|
-
|
|
129
|
-
export const GapUtilities = () => html`
|
|
130
|
-
<div class="card">
|
|
131
|
-
<h2>Gap Utilities</h2>
|
|
132
|
-
<p>Control spacing between grid items with <code>.gap-{size}</code> classes</p>
|
|
133
|
-
</div>
|
|
134
|
-
|
|
135
|
-
<h3>.gap-xs (spacing-1)</h3>
|
|
136
|
-
<div class="card">
|
|
137
|
-
<div class="grid grid-cols-3 gap-xs">
|
|
138
|
-
${Array.from({ length: 3 }, (_, i) => html`
|
|
139
|
-
<div class="card text-center">
|
|
140
|
-
<strong>${String.fromCharCode(65 + i)}</strong>
|
|
141
|
-
</div>
|
|
142
|
-
`)}
|
|
143
|
-
</div>
|
|
144
|
-
</div>
|
|
145
|
-
|
|
146
|
-
<h3>.gap-sm (spacing-2)</h3>
|
|
147
|
-
<div class="card">
|
|
148
|
-
<div class="grid grid-cols-3 gap-sm">
|
|
149
|
-
${Array.from({ length: 3 }, (_, i) => html`
|
|
150
|
-
<div class="card text-center">
|
|
151
|
-
<strong>${String.fromCharCode(65 + i)}</strong>
|
|
152
|
-
</div>
|
|
153
|
-
`)}
|
|
154
|
-
</div>
|
|
155
|
-
</div>
|
|
156
|
-
|
|
157
|
-
<h3>.gap-md (spacing-4)</h3>
|
|
158
|
-
<div class="card">
|
|
159
|
-
<div class="grid grid-cols-3 gap-md">
|
|
160
|
-
${Array.from({ length: 3 }, (_, i) => html`
|
|
161
|
-
<div class="card text-center">
|
|
162
|
-
<strong>${String.fromCharCode(65 + i)}</strong>
|
|
163
|
-
</div>
|
|
164
|
-
`)}
|
|
165
|
-
</div>
|
|
166
|
-
</div>
|
|
167
|
-
|
|
168
|
-
<h3>.gap-lg (spacing-6)</h3>
|
|
169
|
-
<div class="card">
|
|
170
|
-
<div class="grid grid-cols-3 gap-lg">
|
|
171
|
-
${Array.from({ length: 3 }, (_, i) => html`
|
|
172
|
-
<div class="card text-center">
|
|
173
|
-
<strong>${String.fromCharCode(65 + i)}</strong>
|
|
174
|
-
</div>
|
|
175
|
-
`)}
|
|
176
|
-
</div>
|
|
177
|
-
</div>
|
|
178
|
-
`;
|
|
179
|
-
|
|
180
|
-
GapUtilities.storyName = 'Gap Utilities';
|
|
181
|
-
|
|
182
|
-
export const CardGridLayouts = () => html`
|
|
183
|
-
${gridSystemStoryStyles}
|
|
184
|
-
<div class="card">
|
|
185
|
-
<h2>Card Grid Layouts</h2>
|
|
186
|
-
<p>Practical examples using grid utilities for card-based layouts</p>
|
|
187
|
-
|
|
188
|
-
<div class="grid grid-cols-3 gap-md">
|
|
189
|
-
<div class="card">
|
|
190
|
-
<pds-icon icon="palette" size="xl" class="icon-primary"></pds-icon>
|
|
191
|
-
<h5 class="grid-system-card-title">Design</h5>
|
|
192
|
-
<p>Smart surfaces handle theming automatically</p>
|
|
193
|
-
</div>
|
|
194
|
-
<div class="card">
|
|
195
|
-
<pds-icon icon="code" size="xl" class="icon-success"></pds-icon>
|
|
196
|
-
<h5 class="grid-system-card-title">Development</h5>
|
|
197
|
-
<p>Zero manual color overrides needed</p>
|
|
198
|
-
</div>
|
|
199
|
-
<div class="card">
|
|
200
|
-
<pds-icon icon="rocket" size="xl" class="icon-info"></pds-icon>
|
|
201
|
-
<h5 class="grid-system-card-title">Performance</h5>
|
|
202
|
-
<p>CSS custom properties are fast</p>
|
|
203
|
-
</div>
|
|
204
|
-
</div>
|
|
205
|
-
</div>
|
|
206
|
-
`;
|
|
207
|
-
|
|
208
|
-
CardGridLayouts.storyName = 'Card Grid Layouts';
|