@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.
Files changed (40) hide show
  1. package/.storybook/addons/pds-configurator/SearchTool.js +44 -44
  2. package/.storybook/preview.js +6 -2
  3. package/dist/pds-reference.json +65 -13
  4. package/package.json +50 -50
  5. package/stories/components/PdsCalendar.stories.js +266 -263
  6. package/stories/components/PdsDrawer.stories.js +2 -2
  7. package/stories/components/PdsIcon.stories.js +2 -2
  8. package/stories/components/PdsJsonform.stories.js +2 -2
  9. package/stories/components/PdsRichtext.stories.js +367 -367
  10. package/stories/components/PdsScrollrow.stories.js +140 -140
  11. package/stories/components/PdsSplitpanel.stories.js +502 -502
  12. package/stories/components/PdsTabstrip.stories.js +2 -2
  13. package/stories/components/PdsToaster.stories.js +186 -186
  14. package/stories/components/PdsUpload.stories.js +66 -66
  15. package/stories/enhancements/Dropdowns.stories.js +185 -185
  16. package/stories/enhancements/InteractiveStates.stories.js +625 -625
  17. package/stories/enhancements/MeshGradients.stories.js +321 -320
  18. package/stories/enhancements/OpenGroups.stories.js +227 -227
  19. package/stories/enhancements/RangeSliders.stories.js +232 -232
  20. package/stories/enhancements/RequiredFields.stories.js +189 -189
  21. package/stories/enhancements/Toggles.stories.js +167 -167
  22. package/stories/foundations/Colors.stories.js +2 -1
  23. package/stories/foundations/Icons.stories.js +4 -0
  24. package/stories/foundations/SmartSurfaces.stories.js +485 -367
  25. package/stories/foundations/Spacing.stories.js +5 -1
  26. package/stories/foundations/Typography.stories.js +4 -0
  27. package/stories/foundations/ZIndex.stories.js +329 -325
  28. package/stories/layout/LayoutOverview.stories.js +247 -0
  29. package/stories/layout/LayoutSystem.stories.js +852 -0
  30. package/stories/patterns/BorderEffects.stories.js +74 -72
  31. package/stories/primitives/Accordion.stories.js +5 -3
  32. package/stories/primitives/Alerts.stories.js +261 -46
  33. package/stories/primitives/Badges.stories.js +4 -0
  34. package/stories/primitives/Buttons.stories.js +2 -2
  35. package/stories/primitives/Cards.stories.js +98 -170
  36. package/stories/primitives/Media.stories.js +442 -203
  37. package/stories/primitives/Tables.stories.js +358 -232
  38. package/stories/utilities/Backdrop.stories.js +197 -0
  39. package/stories/patterns/Layout.stories.js +0 -99
  40. package/stories/utilities/GridSystem.stories.js +0 -208
@@ -1,72 +1,74 @@
1
- import { html } from 'lit';
2
-
3
- export default {
4
- title: 'Patterns/Border Effects',
5
- parameters: {
6
- docs: {
7
- description: {
8
- component: 'Special border effects including gradients and glows'
9
- }
10
- }
11
- }
12
- };
13
-
14
- const borderEffectsStoryStyles = html`
15
- <style>
16
- .border-effects-grid {
17
- display: grid;
18
- grid-template-columns: repeat(auto-fit, minmax(15.625rem, 1fr));
19
- gap: var(--spacing-4);
20
- }
21
- .border-effects-card {
22
- padding: var(--spacing-4);
23
- }
24
- .border-effects-card-angle {
25
- --gradient-angle: 45deg;
26
- }
27
- .border-effects-actions {
28
- display: flex;
29
- gap: var(--spacing-2);
30
- margin-top: var(--spacing-4);
31
- }
32
- </style>
33
- `;
34
-
35
- export const BorderGradient = () => html`
36
- ${borderEffectsStoryStyles}
37
- <div class="border-effects-grid">
38
- <div class="border-gradient border-effects-card">
39
- <h3>Gradient Border</h3>
40
- <p>Animated gradient border effect that follows the primary color scheme.</p>
41
- </div>
42
- <div class="border-gradient border-effects-card border-effects-card-angle">
43
- <h3>Custom Angle</h3>
44
- <p>Use CSS variables to customize the gradient direction.</p>
45
- </div>
46
- </div>
47
- `;
48
-
49
- export const BorderGlow = () => html`
50
- <div class="grid gap-md" >
51
- <div class="card border-glow" >
52
- <h3>Glowing Border</h3>
53
- <p>Subtle glow effect.</p>
54
- </div>
55
- <div class="card border-glow border-gradient" >
56
- <h3>Glow + Gradient</h3>
57
- <p>Combined glow and gradient border effects.</p>
58
- </div>
59
- </div>
60
- `;
61
-
62
- export const Combined = () => html`
63
- ${borderEffectsStoryStyles}
64
- <article class="card border-gradient">
65
- <h2>Premium Feature Card</h2>
66
- <p>Combining card primitive with gradient border effect.</p>
67
- <div class="border-effects-actions">
68
- <button class="btn-primary">Get Started</button>
69
- <button class="btn-outline">Learn More</button>
70
- </div>
71
- </article>
72
- `;
1
+ import { html } from 'lit';
2
+
3
+ export default {
4
+ title: 'Patterns/Border Effects',
5
+ tags: ['border', 'gradient', 'glow', 'effect', 'decoration'],
6
+ parameters: {
7
+ pds: {
8
+ tags: ['border', 'gradient', 'glow', 'effect', 'decoration', 'border-gradient', 'border-glow']
9
+ },
10
+ docs: {
11
+ description: {
12
+ component: 'Special border effects including gradients and glows'
13
+ }
14
+ }
15
+ }
16
+ };
17
+
18
+ const borderEffectsStoryStyles = html`
19
+ <style>
20
+ .border-effects-grid {
21
+ display: grid;
22
+ grid-template-columns: repeat(auto-fit, minmax(15.625rem, 1fr));
23
+ gap: var(--spacing-4);
24
+ }
25
+
26
+ .border-effects-card-angle {
27
+ --gradient-angle: 45deg;
28
+ }
29
+ .border-effects-actions {
30
+ display: flex;
31
+ gap: var(--spacing-2);
32
+ margin-top: var(--spacing-4);
33
+ }
34
+ </style>
35
+ `;
36
+
37
+ export const BorderGradient = () => html`
38
+ ${borderEffectsStoryStyles}
39
+ <div class="border-effects-grid">
40
+ <div class="card border-gradient border-effects-card">
41
+ <h3>Gradient Border</h3>
42
+ <p>Animated gradient border effect that follows the primary color scheme.</p>
43
+ </div>
44
+ <div class="card border-gradient border-effects-card border-effects-card-angle">
45
+ <h3>Custom Angle</h3>
46
+ <p>Use CSS variables to customize the gradient direction.</p>
47
+ </div>
48
+ </div>
49
+ `;
50
+
51
+ export const BorderGlow = () => html`
52
+ <div class="grid gap-md" >
53
+ <div class="card border-glow" >
54
+ <h3>Glowing Border</h3>
55
+ <p>Subtle glow effect.</p>
56
+ </div>
57
+ <div class="card border-glow border-gradient" >
58
+ <h3>Glow + Gradient</h3>
59
+ <p>Combined glow and gradient border effects.</p>
60
+ </div>
61
+ </div>
62
+ `;
63
+
64
+ export const Combined = () => html`
65
+ ${borderEffectsStoryStyles}
66
+ <article class="card border-gradient">
67
+ <h2>Premium Feature Card</h2>
68
+ <p>Combining card primitive with gradient border effect.</p>
69
+ <div class="border-effects-actions">
70
+ <button class="btn-primary">Get Started</button>
71
+ <button class="btn-outline">Learn More</button>
72
+ </div>
73
+ </article>
74
+ `;
@@ -323,9 +323,11 @@ export const SingleExpandAccordion = () => html`
323
323
  <input type="checkbox" />
324
324
  <span>Login alerts</span>
325
325
  </label>
326
- <button class="btn-secondary btn-sm accordion-button-spacing">
327
- Change Password
328
- </button>
326
+ <div class="flex">
327
+ <button class="btn-secondary btn-sm accordion-button-spacing">
328
+ Change Password
329
+ </button>
330
+ </div>
329
331
  </div>
330
332
  </details>
331
333
 
@@ -2,63 +2,278 @@ import { html } from 'lit';
2
2
 
3
3
  export default {
4
4
  title: 'Primitives/Alerts',
5
+ tags: ['alerts', 'notifications', 'feedback', 'colors'],
5
6
  parameters: {
6
7
  pds: {
7
- tags: ['colors']
8
+ tags: ['alerts', 'colors', 'feedback']
8
9
  },
9
10
  docs: {
10
11
  description: {
11
- component: 'Basic UI elements - buttons, forms, cards, badges'
12
+ component: 'Alert components for feedback messages, notifications, and status indicators. Supports icons, titles, dismissible variants, and semantic messages.'
12
13
  }
13
14
  }
14
- },
15
- argTypes: {
16
- preset: {
17
- control: 'select',
18
- options: ['default', 'ocean-breeze', 'midnight-steel', 'sunset-vibes', 'forest-calm', 'lavender-dream'],
19
- description: 'Choose a design preset'
20
- },
21
- primaryColor: {
22
- control: 'color',
23
- description: 'Override primary color'
24
- },
25
- secondaryColor: {
26
- control: 'color',
27
- description: 'Override secondary color'
28
- }
29
15
  }
30
16
  };
31
17
 
32
- const alertsStoryStyles = html`
33
- <style>
34
- .alerts-story-container {
35
- padding: var(--spacing-8);
36
- }
37
- .alerts-stack {
38
- display: flex;
39
- flex-direction: column;
40
- gap: var(--spacing-4);
41
- }
42
- </style>
18
+ export const Default = () => html`
19
+ <div class="card">
20
+ <h2>Basic Alerts</h2>
21
+ <p class="text-muted">Simple alert messages with semantic color variants.</p>
22
+ </div>
23
+
24
+ <div class="flex flex-col gap-md">
25
+ <div class="alert alert-info">This is an info alert — check it out!</div>
26
+ <div class="alert alert-success">This is a success alert — great job!</div>
27
+ <div class="alert alert-warning">This is a warning alert — be careful!</div>
28
+ <div class="alert alert-danger">This is a danger alert — something went wrong!</div>
29
+ </div>
43
30
  `;
44
31
 
45
- export const Default = {
46
- render: (args) => {
47
- // Preset changes are handled by toolbar in preview.js
32
+ Default.storyName = 'Basic Alerts';
33
+
34
+ export const AlertsWithIcons = () => html`
35
+ <div class="card">
36
+ <h2>Alerts with Icons</h2>
37
+ <p class="text-muted">Use <code>.alert-icon</code> to add visual context with icons.</p>
38
+ </div>
39
+
40
+ <div class="flex flex-col gap-md">
41
+ <div class="alert alert-info">
42
+ <span class="alert-icon">
43
+ <pds-icon icon="info" size="md"></pds-icon>
44
+ </span>
45
+ <div>
46
+ <strong>Information:</strong> Here's some helpful info you might want to know.
47
+ </div>
48
+ </div>
48
49
 
49
- return html`
50
- ${alertsStoryStyles}
51
- <div class="story-container alerts-story-container">
52
- <div class="alerts-stack">
53
- <div class="alert alert-info">This is an info alert.</div>
54
- <div class="alert alert-success">This is a success alert.</div>
55
- <div class="alert alert-warning">This is a warning alert.</div>
56
- <div class="alert alert-danger">This is a danger alert.</div>
57
- </div>
50
+ <div class="alert alert-success">
51
+ <span class="alert-icon">
52
+ <pds-icon icon="check-circle" size="md"></pds-icon>
53
+ </span>
54
+ <div>
55
+ <strong>Success!</strong> Your changes have been saved successfully.
58
56
  </div>
59
- `;
60
- },
61
- args: {
62
- preset: 'default'
63
- }
64
- };
57
+ </div>
58
+
59
+ <div class="alert alert-warning">
60
+ <span class="alert-icon">
61
+ <pds-icon icon="warning" size="md"></pds-icon>
62
+ </span>
63
+ <div>
64
+ <strong>Warning:</strong> Your session will expire in 5 minutes.
65
+ </div>
66
+ </div>
67
+
68
+ <div class="alert alert-danger">
69
+ <span class="alert-icon">
70
+ <pds-icon icon="x-circle" size="md"></pds-icon>
71
+ </span>
72
+ <div>
73
+ <strong>Error!</strong> Unable to process your request. Please try again.
74
+ </div>
75
+ </div>
76
+ </div>
77
+ `;
78
+
79
+ AlertsWithIcons.storyName = 'With Icons';
80
+
81
+ export const AlertsWithTitles = () => html`
82
+ <div class="card">
83
+ <h2>Alerts with Titles</h2>
84
+ <p class="text-muted">Use <code>.alert-title</code> for prominent headings within alerts.</p>
85
+ </div>
86
+
87
+ <div class="flex flex-col gap-md">
88
+ <div class="alert alert-info">
89
+ <span class="alert-icon">
90
+ <pds-icon icon="info" size="md"></pds-icon>
91
+ </span>
92
+ <div>
93
+ <h4 class="alert-title">Did you know?</h4>
94
+ <p>You can customize your notification preferences in Settings. This helps you stay informed about what matters most.</p>
95
+ </div>
96
+ </div>
97
+
98
+ <div class="alert alert-success">
99
+ <span class="alert-icon">
100
+ <pds-icon icon="check-circle" size="md"></pds-icon>
101
+ </span>
102
+ <div>
103
+ <h4 class="alert-title">Payment Successful</h4>
104
+ <p>Your order #12345 has been confirmed. You'll receive a confirmation email shortly.</p>
105
+ </div>
106
+ </div>
107
+
108
+ <div class="alert alert-warning">
109
+ <span class="alert-icon">
110
+ <pds-icon icon="warning" size="md"></pds-icon>
111
+ </span>
112
+ <div>
113
+ <h4 class="alert-title">Action Required</h4>
114
+ <p>Your account verification is pending. Please verify your email address to continue.</p>
115
+ </div>
116
+ </div>
117
+
118
+ <div class="alert alert-danger">
119
+ <span class="alert-icon">
120
+ <pds-icon icon="x-circle" size="md"></pds-icon>
121
+ </span>
122
+ <div>
123
+ <h4 class="alert-title">Connection Lost</h4>
124
+ <p>Unable to connect to the server. Check your internet connection and try again.</p>
125
+ </div>
126
+ </div>
127
+ </div>
128
+ `;
129
+
130
+ AlertsWithTitles.storyName = 'With Titles';
131
+
132
+ export const DismissibleAlerts = () => html`
133
+ <div class="card">
134
+ <h2>Dismissible Alerts</h2>
135
+ <p class="text-muted">
136
+ Add <code>.alert-dismissible</code> and <code>.alert-close</code> for closeable alerts.
137
+ Click the × to dismiss (demo only, JS required for actual dismissal).
138
+ </p>
139
+ </div>
140
+
141
+ <div class="flex flex-col gap-md">
142
+ <div class="alert alert-info alert-dismissible">
143
+ <span class="alert-icon">
144
+ <pds-icon icon="info" size="md"></pds-icon>
145
+ </span>
146
+ <div>
147
+ <h4 class="alert-title">New Feature Available</h4>
148
+ <p>Check out our latest updates in the What's New section.</p>
149
+ </div>
150
+ <button class="alert-close" aria-label="Dismiss">×</button>
151
+ </div>
152
+
153
+ <div class="alert alert-success alert-dismissible">
154
+ <span class="alert-icon">
155
+ <pds-icon icon="check-circle" size="md"></pds-icon>
156
+ </span>
157
+ <div>This dismissible success alert can be closed by the user.</div>
158
+ <button class="alert-close" aria-label="Dismiss">×</button>
159
+ </div>
160
+
161
+ <div class="alert alert-warning alert-dismissible">
162
+ <span class="alert-icon">
163
+ <pds-icon icon="warning" size="md"></pds-icon>
164
+ </span>
165
+ <div>Warning messages that users can acknowledge and dismiss.</div>
166
+ <button class="alert-close" aria-label="Dismiss">×</button>
167
+ </div>
168
+ </div>
169
+ `;
170
+
171
+ DismissibleAlerts.storyName = 'Dismissible';
172
+
173
+ export const SemanticMessages = () => html`
174
+ <div class="card">
175
+ <h2>Semantic Messages</h2>
176
+ <p class="text-muted">
177
+ The <code>.semantic-message</code> class is an alias for alerts with slightly different semantics.
178
+ Useful for inline form feedback or contextual messages.
179
+ </p>
180
+ </div>
181
+
182
+ <div class="flex flex-col gap-md">
183
+ <div class="semantic-message info">
184
+ <strong>Tip:</strong>
185
+ <p>Use semantic messages for inline feedback within forms or content areas.</p>
186
+ </div>
187
+
188
+ <div class="semantic-message success">
189
+ <strong>Saved!</strong>
190
+ <p>Your profile has been updated successfully.</p>
191
+ </div>
192
+
193
+ <div class="semantic-message warning">
194
+ <strong>Heads up:</strong>
195
+ <p>This action cannot be undone. Please review before proceeding.</p>
196
+ </div>
197
+
198
+ <div class="semantic-message danger">
199
+ <strong>Error:</strong>
200
+ <p>Please fix the errors below before submitting the form.</p>
201
+ </div>
202
+ </div>
203
+
204
+ <div class="card">
205
+ <h3>In a Form Context</h3>
206
+ <form class="max-w-md">
207
+ <label>
208
+ <span>Email Address</span>
209
+ <input type="email" value="invalid-email" />
210
+ </label>
211
+ <div class="semantic-message danger" style="margin-top: var(--spacing-2);">
212
+ <strong>Invalid email format</strong>
213
+ <p>Please enter a valid email address (e.g., user@example.com)</p>
214
+ </div>
215
+ <div class="flex gap-sm justify-end" style="margin-top: var(--spacing-4);">
216
+ <button type="submit">Submit</button>
217
+ </div>
218
+ </form>
219
+ </div>
220
+ `;
221
+
222
+ SemanticMessages.storyName = 'Semantic Messages';
223
+
224
+ export const AlertsReference = () => html`
225
+ <div class="card">
226
+ <h2>Alert Classes Reference</h2>
227
+ </div>
228
+
229
+ <table class="table-bordered table-compact">
230
+ <thead>
231
+ <tr>
232
+ <th>Class</th>
233
+ <th>Description</th>
234
+ </tr>
235
+ </thead>
236
+ <tbody>
237
+ <tr>
238
+ <td><code>.alert</code></td>
239
+ <td>Base alert container with flex layout and left border</td>
240
+ </tr>
241
+ <tr>
242
+ <td><code>.alert-info</code></td>
243
+ <td>Blue/cyan variant for informational messages</td>
244
+ </tr>
245
+ <tr>
246
+ <td><code>.alert-success</code></td>
247
+ <td>Green variant for success/confirmation messages</td>
248
+ </tr>
249
+ <tr>
250
+ <td><code>.alert-warning</code></td>
251
+ <td>Yellow/orange variant for warnings</td>
252
+ </tr>
253
+ <tr>
254
+ <td><code>.alert-danger</code> / <code>.alert-error</code></td>
255
+ <td>Red variant for errors and critical messages</td>
256
+ </tr>
257
+ <tr>
258
+ <td><code>.alert-icon</code></td>
259
+ <td>Container for alert icons (flex-shrink: 0)</td>
260
+ </tr>
261
+ <tr>
262
+ <td><code>.alert-title</code></td>
263
+ <td>Bold heading within alert content</td>
264
+ </tr>
265
+ <tr>
266
+ <td><code>.alert-dismissible</code></td>
267
+ <td>Adds right padding for close button</td>
268
+ </tr>
269
+ <tr>
270
+ <td><code>.alert-close</code></td>
271
+ <td>Absolutely positioned close button</td>
272
+ </tr>
273
+ <tr>
274
+ <td><code>.semantic-message</code></td>
275
+ <td>Alias for alert with semantic variants (.info, .success, etc.)</td>
276
+ </tr>
277
+ </tbody>
278
+ </table>
279
+ `;
@@ -2,7 +2,11 @@ import { html } from 'lit';
2
2
 
3
3
  export default {
4
4
  title: 'Primitives/Badges & Pills',
5
+ tags: ['badge', 'pill', 'tag', 'chip', 'status', 'label', 'indicator'],
5
6
  parameters: {
7
+ pds: {
8
+ tags: ['badge', 'pill', 'tag', 'chip', 'status', 'label', 'indicator', 'inline']
9
+ },
6
10
  docs: {
7
11
  description: {
8
12
  component: 'Badges and pills for labels, tags, status indicators, and categorization'
@@ -151,7 +151,7 @@ export const ButtonGroups = () => html`
151
151
  ${buttonsStoryStyles}
152
152
  <div class="buttons-story-section">
153
153
  <h3>Button Groups</h3>
154
- <div class="btn-group">
154
+ <div class="flex gap-sm">
155
155
  <button class="btn-primary">
156
156
  <pds-icon icon="download"></pds-icon>
157
157
  Get Started
@@ -163,7 +163,7 @@ export const ButtonGroups = () => html`
163
163
  </div>
164
164
 
165
165
  <h3 class="buttons-story-heading-spacer">Icon-Only Group</h3>
166
- <div class="btn-group">
166
+ <div class="flex gap-sm">
167
167
  <button class="icon-only btn-outline">
168
168
  <pds-icon icon="text-align-left" label="Align left"></pds-icon>
169
169
  </button>