@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,203 +1,442 @@
|
|
|
1
|
-
import { html } from 'lit';
|
|
2
|
-
|
|
3
|
-
export default {
|
|
4
|
-
title: 'Primitives/Media Elements',
|
|
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
|
-
</figcaption>
|
|
159
|
-
</figure>
|
|
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
|
-
</div>
|
|
201
|
-
`;
|
|
202
|
-
|
|
203
|
-
|
|
1
|
+
import { html } from 'lit';
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Primitives/Media Elements',
|
|
5
|
+
tags: ['media', 'image', 'figure', 'gallery', 'video', 'responsive'],
|
|
6
|
+
parameters: {
|
|
7
|
+
pds: {
|
|
8
|
+
tags: ['media', 'image', 'figure', 'gallery', 'video', 'responsive', 'caption', 'img']
|
|
9
|
+
},
|
|
10
|
+
docs: {
|
|
11
|
+
description: {
|
|
12
|
+
component: 'Responsive images, figures with captions, image galleries, and video elements with proper semantic HTML.'
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
const mediaStoryStyles = html`
|
|
19
|
+
<style>
|
|
20
|
+
.media-story-section {
|
|
21
|
+
padding: var(--spacing-4);
|
|
22
|
+
}
|
|
23
|
+
.media-responsive-grid {
|
|
24
|
+
display: grid;
|
|
25
|
+
gap: var(--spacing-6);
|
|
26
|
+
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
|
|
27
|
+
}
|
|
28
|
+
.media-gallery-grid {
|
|
29
|
+
display: grid;
|
|
30
|
+
gap: var(--spacing-3);
|
|
31
|
+
grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
|
|
32
|
+
}
|
|
33
|
+
.media-scroll-image,
|
|
34
|
+
.media-gallery-image {
|
|
35
|
+
width: 100%;
|
|
36
|
+
height: auto;
|
|
37
|
+
border-radius: var(--radius-md);
|
|
38
|
+
box-shadow: var(--shadow-sm);
|
|
39
|
+
}
|
|
40
|
+
.media-scroll-image {
|
|
41
|
+
width: auto;
|
|
42
|
+
}
|
|
43
|
+
.media-video-shell {
|
|
44
|
+
max-width: 56.25rem;
|
|
45
|
+
}
|
|
46
|
+
.media-video-figure {
|
|
47
|
+
margin-top: var(--spacing-4);
|
|
48
|
+
}
|
|
49
|
+
.media-video-element {
|
|
50
|
+
width: 100%;
|
|
51
|
+
border-radius: var(--radius-lg);
|
|
52
|
+
box-shadow: var(--shadow-md);
|
|
53
|
+
}
|
|
54
|
+
.media-mixed-layout {
|
|
55
|
+
display: grid;
|
|
56
|
+
grid-template-columns: 1fr 1fr;
|
|
57
|
+
gap: var(--spacing-6);
|
|
58
|
+
margin-top: var(--spacing-4);
|
|
59
|
+
}
|
|
60
|
+
.media-thumbnail-grid {
|
|
61
|
+
display: grid;
|
|
62
|
+
grid-template-columns: repeat(2, 1fr);
|
|
63
|
+
gap: var(--spacing-2);
|
|
64
|
+
}
|
|
65
|
+
.media-thumbnail-image {
|
|
66
|
+
width: 100%;
|
|
67
|
+
border-radius: var(--radius-sm);
|
|
68
|
+
box-shadow: var(--shadow-sm);
|
|
69
|
+
}
|
|
70
|
+
</style>
|
|
71
|
+
`;
|
|
72
|
+
|
|
73
|
+
export const ResponsiveImages = () => html`
|
|
74
|
+
${mediaStoryStyles}
|
|
75
|
+
<div class="media-story-section">
|
|
76
|
+
<div class="media-responsive-grid">
|
|
77
|
+
<figure class="media-figure">
|
|
78
|
+
<img
|
|
79
|
+
class="media-image"
|
|
80
|
+
src="https://picsum.photos/800/600?random=1"
|
|
81
|
+
alt="Random landscape"
|
|
82
|
+
loading="lazy"
|
|
83
|
+
/>
|
|
84
|
+
<figcaption class="media-caption">
|
|
85
|
+
<strong>Figure 1:</strong> A beautiful landscape demonstrating image handling in the design system.
|
|
86
|
+
</figcaption>
|
|
87
|
+
</figure>
|
|
88
|
+
|
|
89
|
+
<figure class="media-figure">
|
|
90
|
+
<img
|
|
91
|
+
class="media-image"
|
|
92
|
+
src="https://picsum.photos/800/600?random=2"
|
|
93
|
+
alt="Random architecture"
|
|
94
|
+
loading="lazy"
|
|
95
|
+
/>
|
|
96
|
+
<figcaption class="media-caption">
|
|
97
|
+
<strong>Figure 2:</strong> Architectural photography showcasing the responsive image behavior.
|
|
98
|
+
</figcaption>
|
|
99
|
+
</figure>
|
|
100
|
+
</div>
|
|
101
|
+
</div>
|
|
102
|
+
`;
|
|
103
|
+
|
|
104
|
+
ResponsiveImages.storyName = 'Responsive Images';
|
|
105
|
+
|
|
106
|
+
export const ImageGallery = () => html`
|
|
107
|
+
${mediaStoryStyles}
|
|
108
|
+
<div class="media-story-section">
|
|
109
|
+
<h3>Image Gallery Grid</h3>
|
|
110
|
+
<div class="gallery-grid media-gallery-grid">
|
|
111
|
+
${Array.from({ length: 8 }, (_, i) => html`
|
|
112
|
+
<img
|
|
113
|
+
class="gallery-image media-gallery-image"
|
|
114
|
+
src="https://picsum.photos/400/400?random=${i + 3}"
|
|
115
|
+
alt="Gallery image ${i + 1}"
|
|
116
|
+
loading="lazy"
|
|
117
|
+
/>
|
|
118
|
+
`)}
|
|
119
|
+
</div>
|
|
120
|
+
</div>
|
|
121
|
+
`;
|
|
122
|
+
|
|
123
|
+
ImageGallery.storyName = 'Image Gallery';
|
|
124
|
+
|
|
125
|
+
export const ScrollRowGallery = () => html`
|
|
126
|
+
${mediaStoryStyles}
|
|
127
|
+
<div class="media-story-section">
|
|
128
|
+
<h3>Netflix-Style Horizontal Scroll Row</h3>
|
|
129
|
+
<pds-scrollrow>
|
|
130
|
+
${Array.from({ length: 20 }, (_, i) => html`
|
|
131
|
+
<img
|
|
132
|
+
loading="lazy"
|
|
133
|
+
class="gallery-image media-scroll-image"
|
|
134
|
+
src="https://picsum.photos/200/200?random=${i + 10}"
|
|
135
|
+
alt="Gallery image ${i + 1}"
|
|
136
|
+
/>
|
|
137
|
+
`)}
|
|
138
|
+
</pds-scrollrow>
|
|
139
|
+
</div>
|
|
140
|
+
`;
|
|
141
|
+
|
|
142
|
+
ScrollRowGallery.storyName = 'Horizontal Scroll Row';
|
|
143
|
+
|
|
144
|
+
export const ImageRoundedUtilities = () => html`
|
|
145
|
+
<div class="card">
|
|
146
|
+
<h2>Image Rounded Utilities</h2>
|
|
147
|
+
<p class="text-muted">Apply consistent border-radius to images with <code>.img-rounded-*</code> classes.</p>
|
|
148
|
+
</div>
|
|
149
|
+
|
|
150
|
+
<div class="grid grid-auto-sm gap-lg">
|
|
151
|
+
<figure>
|
|
152
|
+
<img
|
|
153
|
+
src="https://picsum.photos/300/200?random=40"
|
|
154
|
+
alt="Small radius"
|
|
155
|
+
class="img-rounded-sm"
|
|
156
|
+
style="width: 100%;"
|
|
157
|
+
/>
|
|
158
|
+
<figcaption><code>.img-rounded-sm</code></figcaption>
|
|
159
|
+
</figure>
|
|
160
|
+
|
|
161
|
+
<figure>
|
|
162
|
+
<img
|
|
163
|
+
src="https://picsum.photos/300/200?random=41"
|
|
164
|
+
alt="Medium radius"
|
|
165
|
+
class="img-rounded-md"
|
|
166
|
+
style="width: 100%;"
|
|
167
|
+
/>
|
|
168
|
+
<figcaption><code>.img-rounded-md</code></figcaption>
|
|
169
|
+
</figure>
|
|
170
|
+
|
|
171
|
+
<figure>
|
|
172
|
+
<img
|
|
173
|
+
src="https://picsum.photos/300/200?random=42"
|
|
174
|
+
alt="Large radius"
|
|
175
|
+
class="img-rounded-lg"
|
|
176
|
+
style="width: 100%;"
|
|
177
|
+
/>
|
|
178
|
+
<figcaption><code>.img-rounded-lg</code></figcaption>
|
|
179
|
+
</figure>
|
|
180
|
+
|
|
181
|
+
<figure>
|
|
182
|
+
<img
|
|
183
|
+
src="https://picsum.photos/300/200?random=43"
|
|
184
|
+
alt="Extra large radius"
|
|
185
|
+
class="img-rounded-xl"
|
|
186
|
+
style="width: 100%;"
|
|
187
|
+
/>
|
|
188
|
+
<figcaption><code>.img-rounded-xl</code></figcaption>
|
|
189
|
+
</figure>
|
|
190
|
+
|
|
191
|
+
<figure>
|
|
192
|
+
<img
|
|
193
|
+
src="https://picsum.photos/200/200?random=44"
|
|
194
|
+
alt="Full radius (circle)"
|
|
195
|
+
class="img-rounded-full"
|
|
196
|
+
style="width: 200px; aspect-ratio: 1;"
|
|
197
|
+
/>
|
|
198
|
+
<figcaption><code>.img-rounded-full</code></figcaption>
|
|
199
|
+
</figure>
|
|
200
|
+
</div>
|
|
201
|
+
`;
|
|
202
|
+
|
|
203
|
+
ImageRoundedUtilities.storyName = 'Rounded Utilities';
|
|
204
|
+
|
|
205
|
+
export const ImageGalleryClass = () => html`
|
|
206
|
+
<div class="card">
|
|
207
|
+
<h2>.img-gallery Utility</h2>
|
|
208
|
+
<p class="text-muted">
|
|
209
|
+
The <code>.img-gallery</code> class creates square, cropped thumbnails perfect for grid galleries.
|
|
210
|
+
Images are set to <code>aspect-ratio: 1</code> and <code>object-fit: cover</code>.
|
|
211
|
+
</p>
|
|
212
|
+
</div>
|
|
213
|
+
|
|
214
|
+
<div class="grid grid-auto-sm gap-md">
|
|
215
|
+
${Array.from({ length: 8 }, (_, i) => html`
|
|
216
|
+
<img
|
|
217
|
+
src="https://picsum.photos/400/600?random=${i + 50}"
|
|
218
|
+
alt="Gallery item ${i + 1}"
|
|
219
|
+
class="img-gallery"
|
|
220
|
+
/>
|
|
221
|
+
`)}
|
|
222
|
+
</div>
|
|
223
|
+
`;
|
|
224
|
+
|
|
225
|
+
ImageGalleryClass.storyName = '.img-gallery';
|
|
226
|
+
|
|
227
|
+
export const InlineImages = () => html`
|
|
228
|
+
<div class="card">
|
|
229
|
+
<h2>Inline Images</h2>
|
|
230
|
+
<p class="text-muted">
|
|
231
|
+
Use <code>.img-inline</code> for small images within text flow, like avatars or icons.
|
|
232
|
+
</p>
|
|
233
|
+
</div>
|
|
234
|
+
|
|
235
|
+
<div class="card">
|
|
236
|
+
<p>
|
|
237
|
+
The team includes
|
|
238
|
+
<img src="https://i.pravatar.cc/60?img=1" alt="Alice" class="img-inline" />
|
|
239
|
+
Alice,
|
|
240
|
+
<img src="https://i.pravatar.cc/60?img=2" alt="Bob" class="img-inline" />
|
|
241
|
+
Bob, and
|
|
242
|
+
<img src="https://i.pravatar.cc/60?img=3" alt="Carol" class="img-inline" />
|
|
243
|
+
Carol who have been working on this project.
|
|
244
|
+
</p>
|
|
245
|
+
|
|
246
|
+
<p style="margin-top: var(--spacing-4);">
|
|
247
|
+
Click the
|
|
248
|
+
<img src="https://picsum.photos/60/60?random=60" alt="Settings icon" class="img-inline" />
|
|
249
|
+
icon to access settings, or the
|
|
250
|
+
<img src="https://picsum.photos/60/60?random=61" alt="Help icon" class="img-inline" />
|
|
251
|
+
icon for help.
|
|
252
|
+
</p>
|
|
253
|
+
</div>
|
|
254
|
+
|
|
255
|
+
<div class="card">
|
|
256
|
+
<h3>CSS Properties</h3>
|
|
257
|
+
<pre><code>.img-inline {
|
|
258
|
+
display: inline;
|
|
259
|
+
vertical-align: middle;
|
|
260
|
+
border-radius: var(--radius-xs);
|
|
261
|
+
margin: 0 var(--spacing-1);
|
|
262
|
+
max-width: 60px;
|
|
263
|
+
height: auto;
|
|
264
|
+
}</code></pre>
|
|
265
|
+
</div>
|
|
266
|
+
`;
|
|
267
|
+
|
|
268
|
+
InlineImages.storyName = 'Inline Images';
|
|
269
|
+
|
|
270
|
+
export const VideoResponsive = () => html`
|
|
271
|
+
<div class="card">
|
|
272
|
+
<h2>.video-responsive Utility</h2>
|
|
273
|
+
<p class="text-muted">
|
|
274
|
+
The <code>.video-responsive</code> class constrains video width and applies consistent styling.
|
|
275
|
+
</p>
|
|
276
|
+
</div>
|
|
277
|
+
|
|
278
|
+
<video
|
|
279
|
+
class="video-responsive"
|
|
280
|
+
controls
|
|
281
|
+
poster="https://picsum.photos/600/338?random=70"
|
|
282
|
+
>
|
|
283
|
+
<source
|
|
284
|
+
src="https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4"
|
|
285
|
+
type="video/mp4"
|
|
286
|
+
/>
|
|
287
|
+
Your browser does not support the video tag.
|
|
288
|
+
</video>
|
|
289
|
+
|
|
290
|
+
<div class="card">
|
|
291
|
+
<h3>CSS Properties</h3>
|
|
292
|
+
<pre><code>.video-responsive {
|
|
293
|
+
width: 100%;
|
|
294
|
+
max-width: 600px;
|
|
295
|
+
height: auto;
|
|
296
|
+
border-radius: var(--radius-md);
|
|
297
|
+
}</code></pre>
|
|
298
|
+
</div>
|
|
299
|
+
`;
|
|
300
|
+
|
|
301
|
+
VideoResponsive.storyName = '.video-responsive';
|
|
302
|
+
|
|
303
|
+
export const FigureResponsive = () => html`
|
|
304
|
+
<div class="card">
|
|
305
|
+
<h2>.figure-responsive Utility</h2>
|
|
306
|
+
<p class="text-muted">
|
|
307
|
+
Apply <code>.figure-responsive</code> to figures for full-width responsive images with captions.
|
|
308
|
+
</p>
|
|
309
|
+
</div>
|
|
310
|
+
|
|
311
|
+
<figure class="figure-responsive">
|
|
312
|
+
<img
|
|
313
|
+
src="https://picsum.photos/1200/600?random=80"
|
|
314
|
+
alt="Responsive figure example"
|
|
315
|
+
/>
|
|
316
|
+
<figcaption>
|
|
317
|
+
<strong>Figure 1:</strong> This figure scales responsively to fill its container width while maintaining aspect ratio.
|
|
318
|
+
</figcaption>
|
|
319
|
+
</figure>
|
|
320
|
+
`;
|
|
321
|
+
|
|
322
|
+
FigureResponsive.storyName = '.figure-responsive';
|
|
323
|
+
|
|
324
|
+
export const VideoElement = () => html`
|
|
325
|
+
${mediaStoryStyles}
|
|
326
|
+
<div class="media-story-section media-video-shell">
|
|
327
|
+
<h3>Video Element with Controls</h3>
|
|
328
|
+
<figure class="video-container media-video-figure">
|
|
329
|
+
<video
|
|
330
|
+
class="video-element media-video-element"
|
|
331
|
+
controls
|
|
332
|
+
poster="https://picsum.photos/1200/675?random=7"
|
|
333
|
+
>
|
|
334
|
+
<source
|
|
335
|
+
src="https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4"
|
|
336
|
+
type="video/mp4"
|
|
337
|
+
/>
|
|
338
|
+
Your browser does not support the video tag.
|
|
339
|
+
</video>
|
|
340
|
+
<figcaption class="media-caption">
|
|
341
|
+
<strong>Video Demo:</strong> Big Buck Bunny sample video demonstrating video element styling.
|
|
342
|
+
</figcaption>
|
|
343
|
+
</figure>
|
|
344
|
+
</div>
|
|
345
|
+
`;
|
|
346
|
+
|
|
347
|
+
VideoElement.storyName = 'Video Element';
|
|
348
|
+
|
|
349
|
+
export const MixedMedia = () => html`
|
|
350
|
+
${mediaStoryStyles}
|
|
351
|
+
<div class="media-story-section">
|
|
352
|
+
<h2>Mixed Media Layout</h2>
|
|
353
|
+
|
|
354
|
+
<div class="media-mixed-layout">
|
|
355
|
+
<div>
|
|
356
|
+
<h3>Featured Image</h3>
|
|
357
|
+
<figure class="media-figure">
|
|
358
|
+
<img
|
|
359
|
+
class="media-image"
|
|
360
|
+
src="https://picsum.photos/600/400?random=20"
|
|
361
|
+
alt="Featured content"
|
|
362
|
+
loading="lazy"
|
|
363
|
+
/>
|
|
364
|
+
<figcaption class="media-caption">
|
|
365
|
+
High-resolution featured image with caption
|
|
366
|
+
</figcaption>
|
|
367
|
+
</figure>
|
|
368
|
+
</div>
|
|
369
|
+
|
|
370
|
+
<div>
|
|
371
|
+
<h3>Thumbnail Grid</h3>
|
|
372
|
+
<div class="media-thumbnail-grid">
|
|
373
|
+
${Array.from({ length: 4 }, (_, i) => html`
|
|
374
|
+
<img
|
|
375
|
+
src="https://picsum.photos/200/200?random=${i + 30}"
|
|
376
|
+
alt="Thumbnail ${i + 1}"
|
|
377
|
+
loading="lazy"
|
|
378
|
+
class="media-thumbnail-image"
|
|
379
|
+
/>
|
|
380
|
+
`)}
|
|
381
|
+
</div>
|
|
382
|
+
</div>
|
|
383
|
+
</div>
|
|
384
|
+
</div>
|
|
385
|
+
`;
|
|
386
|
+
|
|
387
|
+
MixedMedia.storyName = 'Mixed Media Layout';
|
|
388
|
+
|
|
389
|
+
export const MediaReference = () => html`
|
|
390
|
+
<div class="card">
|
|
391
|
+
<h2>Media Utilities Reference</h2>
|
|
392
|
+
</div>
|
|
393
|
+
|
|
394
|
+
<table class="table-bordered">
|
|
395
|
+
<thead>
|
|
396
|
+
<tr>
|
|
397
|
+
<th>Class</th>
|
|
398
|
+
<th>Description</th>
|
|
399
|
+
</tr>
|
|
400
|
+
</thead>
|
|
401
|
+
<tbody>
|
|
402
|
+
<tr>
|
|
403
|
+
<td><code>.img-gallery</code></td>
|
|
404
|
+
<td>Square aspect ratio with object-fit: cover for gallery grids</td>
|
|
405
|
+
</tr>
|
|
406
|
+
<tr>
|
|
407
|
+
<td><code>.img-rounded-sm</code></td>
|
|
408
|
+
<td>Small border radius (--radius-sm)</td>
|
|
409
|
+
</tr>
|
|
410
|
+
<tr>
|
|
411
|
+
<td><code>.img-rounded-md</code></td>
|
|
412
|
+
<td>Medium border radius (--radius-md)</td>
|
|
413
|
+
</tr>
|
|
414
|
+
<tr>
|
|
415
|
+
<td><code>.img-rounded-lg</code></td>
|
|
416
|
+
<td>Large border radius (--radius-lg)</td>
|
|
417
|
+
</tr>
|
|
418
|
+
<tr>
|
|
419
|
+
<td><code>.img-rounded-xl</code></td>
|
|
420
|
+
<td>Extra large border radius (--radius-xl)</td>
|
|
421
|
+
</tr>
|
|
422
|
+
<tr>
|
|
423
|
+
<td><code>.img-rounded-full</code></td>
|
|
424
|
+
<td>Full border radius for circles (--radius-full)</td>
|
|
425
|
+
</tr>
|
|
426
|
+
<tr>
|
|
427
|
+
<td><code>.img-inline</code></td>
|
|
428
|
+
<td>Small inline images within text (max 60px)</td>
|
|
429
|
+
</tr>
|
|
430
|
+
<tr>
|
|
431
|
+
<td><code>.video-responsive</code></td>
|
|
432
|
+
<td>Responsive video with max-width and border radius</td>
|
|
433
|
+
</tr>
|
|
434
|
+
<tr>
|
|
435
|
+
<td><code>.figure-responsive</code></td>
|
|
436
|
+
<td>Full-width responsive figure</td>
|
|
437
|
+
</tr>
|
|
438
|
+
</tbody>
|
|
439
|
+
</table>
|
|
440
|
+
`;
|
|
441
|
+
|
|
442
|
+
MediaReference.storyName = 'Reference';
|