@pure-ds/storybook 0.1.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/description/preview.js +15 -0
- package/.storybook/addons/description/register.js +60 -0
- package/.storybook/addons/html-preview/Panel.jsx +327 -0
- package/.storybook/addons/html-preview/constants.js +6 -0
- package/.storybook/addons/html-preview/preview.js +178 -0
- package/.storybook/addons/html-preview/register.js +16 -0
- package/.storybook/addons/pds-configurator/SearchTool.js +44 -0
- package/.storybook/addons/pds-configurator/Tool.js +30 -0
- package/.storybook/addons/pds-configurator/constants.js +9 -0
- package/.storybook/addons/pds-configurator/preview.js +159 -0
- package/.storybook/addons/pds-configurator/register.js +24 -0
- package/.storybook/docs.css +35 -0
- package/.storybook/htmlPreview.css +103 -0
- package/.storybook/htmlPreview.js +271 -0
- package/.storybook/main.js +160 -0
- package/.storybook/preview-body.html +48 -0
- package/.storybook/preview-head.html +11 -0
- package/.storybook/preview.js +1563 -0
- package/README.md +266 -0
- package/bin/index.js +40 -0
- package/dist/pds-reference.json +2101 -0
- package/package.json +45 -0
- package/pds.config.js +6 -0
- package/public/assets/css/app.css +1216 -0
- package/public/assets/data/auto-design-advanced.json +704 -0
- package/public/assets/data/auto-design-simple.json +123 -0
- package/public/assets/img/icon-512x512.png +0 -0
- package/public/assets/img/logo-trans.png +0 -0
- package/public/assets/img/logo.png +0 -0
- package/public/assets/js/app.js +15088 -0
- package/public/assets/js/app.js.map +7 -0
- package/public/assets/js/lit.js +1176 -0
- package/public/assets/js/lit.js.map +7 -0
- package/public/assets/js/pds.js +9801 -0
- package/public/assets/js/pds.js.map +7 -0
- package/public/assets/pds/components/pds-calendar.js +837 -0
- package/public/assets/pds/components/pds-drawer.js +857 -0
- package/public/assets/pds/components/pds-icon.js +338 -0
- package/public/assets/pds/components/pds-jsonform.js +1775 -0
- package/public/assets/pds/components/pds-richtext.js +1035 -0
- package/public/assets/pds/components/pds-scrollrow.js +331 -0
- package/public/assets/pds/components/pds-splitpanel.js +401 -0
- package/public/assets/pds/components/pds-tabstrip.js +251 -0
- package/public/assets/pds/components/pds-toaster.js +446 -0
- package/public/assets/pds/components/pds-upload.js +657 -0
- package/public/assets/pds/custom-elements.json +2003 -0
- package/public/assets/pds/icons/pds-icons.svg +498 -0
- package/public/assets/pds/pds-css-complete.json +1861 -0
- package/public/assets/pds/pds-runtime-config.json +11 -0
- package/public/assets/pds/pds.css-data.json +2152 -0
- package/public/assets/pds/styles/pds-components.css +1944 -0
- package/public/assets/pds/styles/pds-components.css.js +3895 -0
- package/public/assets/pds/styles/pds-primitives.css +352 -0
- package/public/assets/pds/styles/pds-primitives.css.js +711 -0
- package/public/assets/pds/styles/pds-styles.css +3761 -0
- package/public/assets/pds/styles/pds-styles.css.js +7529 -0
- package/public/assets/pds/styles/pds-tokens.css +699 -0
- package/public/assets/pds/styles/pds-tokens.css.js +1405 -0
- package/public/assets/pds/styles/pds-utilities.css +763 -0
- package/public/assets/pds/styles/pds-utilities.css.js +1533 -0
- package/public/assets/pds/vscode-custom-data.json +824 -0
- package/scripts/build-pds-reference.mjs +807 -0
- package/scripts/generate-stories.js +542 -0
- package/scripts/package-build.js +86 -0
- package/src/js/app.js +17 -0
- package/src/js/common/ask.js +208 -0
- package/src/js/common/common.js +20 -0
- package/src/js/common/font-loader.js +200 -0
- package/src/js/common/msg.js +90 -0
- package/src/js/lit.js +40 -0
- package/src/js/pds-core/pds-config.js +1162 -0
- package/src/js/pds-core/pds-enhancer-metadata.js +75 -0
- package/src/js/pds-core/pds-enhancers.js +357 -0
- package/src/js/pds-core/pds-enums.js +86 -0
- package/src/js/pds-core/pds-generator.js +5317 -0
- package/src/js/pds-core/pds-ontology.js +256 -0
- package/src/js/pds-core/pds-paths.js +109 -0
- package/src/js/pds-core/pds-query.js +571 -0
- package/src/js/pds-core/pds-registry.js +129 -0
- package/src/js/pds-core/pds.d.ts +129 -0
- package/src/js/pds.d.ts +408 -0
- package/src/js/pds.js +1579 -0
- package/src/pds-core/pds-api.js +105 -0
- package/stories/GettingStarted.md +96 -0
- package/stories/GettingStarted.stories.js +144 -0
- package/stories/WhatIsPDS.md +194 -0
- package/stories/WhatIsPDS.stories.js +144 -0
- package/stories/components/PdsCalendar.stories.js +263 -0
- package/stories/components/PdsDrawer.stories.js +623 -0
- package/stories/components/PdsIcon.stories.js +78 -0
- package/stories/components/PdsJsonform.stories.js +1444 -0
- package/stories/components/PdsRichtext.stories.js +367 -0
- package/stories/components/PdsScrollrow.stories.js +140 -0
- package/stories/components/PdsSplitpanel.stories.js +502 -0
- package/stories/components/PdsTabstrip.stories.js +442 -0
- package/stories/components/PdsToaster.stories.js +186 -0
- package/stories/components/PdsUpload.stories.js +66 -0
- package/stories/enhancements/Dropdowns.stories.js +185 -0
- package/stories/enhancements/InteractiveStates.stories.js +625 -0
- package/stories/enhancements/MeshGradients.stories.js +320 -0
- package/stories/enhancements/OpenGroups.stories.js +227 -0
- package/stories/enhancements/RangeSliders.stories.js +232 -0
- package/stories/enhancements/RequiredFields.stories.js +189 -0
- package/stories/enhancements/Toggles.stories.js +167 -0
- package/stories/foundations/Colors.stories.js +283 -0
- package/stories/foundations/Icons.stories.js +305 -0
- package/stories/foundations/SmartSurfaces.stories.js +367 -0
- package/stories/foundations/Spacing.stories.js +175 -0
- package/stories/foundations/Typography.stories.js +960 -0
- package/stories/foundations/ZIndex.stories.js +325 -0
- package/stories/patterns/BorderEffects.stories.js +72 -0
- package/stories/patterns/Layout.stories.js +99 -0
- package/stories/patterns/Utilities.stories.js +107 -0
- package/stories/primitives/Accordion.stories.js +359 -0
- package/stories/primitives/Alerts.stories.js +64 -0
- package/stories/primitives/Badges.stories.js +183 -0
- package/stories/primitives/Buttons.stories.js +229 -0
- package/stories/primitives/Cards.stories.js +353 -0
- package/stories/primitives/FormGroups.stories.js +569 -0
- package/stories/primitives/Forms.stories.js +131 -0
- package/stories/primitives/Media.stories.js +203 -0
- package/stories/primitives/Tables.stories.js +232 -0
- package/stories/reference/ReferenceCatalog.stories.js +28 -0
- package/stories/reference/reference-catalog.js +413 -0
- package/stories/reference/reference-docs.js +302 -0
- package/stories/reference/reference-helpers.js +310 -0
- package/stories/utilities/GridSystem.stories.js +208 -0
- package/stories/utils/PdsAsk.stories.js +420 -0
- package/stories/utils/toast-utils.js +148 -0
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
import { html } from 'lit';
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Primitives/Buttons',
|
|
5
|
+
tags: ['buttons', 'interaction'],
|
|
6
|
+
parameters: {
|
|
7
|
+
pds: {
|
|
8
|
+
tags: ['buttons', 'interaction']
|
|
9
|
+
},
|
|
10
|
+
docs: {
|
|
11
|
+
description: {
|
|
12
|
+
component: 'Button primitives with variants, sizes, and icon support. All buttons automatically adapt to your theme with proper focus states and accessibility.'
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
const buttonsStoryStyles = html`
|
|
19
|
+
<style>
|
|
20
|
+
.buttons-story-section {
|
|
21
|
+
padding: var(--spacing-4);
|
|
22
|
+
}
|
|
23
|
+
.buttons-story-heading-spacer {
|
|
24
|
+
margin-top: var(--spacing-6);
|
|
25
|
+
}
|
|
26
|
+
.buttons-story-helper {
|
|
27
|
+
margin-bottom: var(--spacing-4);
|
|
28
|
+
opacity: 0.8;
|
|
29
|
+
}
|
|
30
|
+
.buttons-story-row {
|
|
31
|
+
margin-bottom: var(--spacing-4);
|
|
32
|
+
}
|
|
33
|
+
</style>
|
|
34
|
+
`;
|
|
35
|
+
|
|
36
|
+
export const ButtonVariants = () => html`
|
|
37
|
+
${buttonsStoryStyles}
|
|
38
|
+
<div class="buttons-story-section">
|
|
39
|
+
<h3>Button Variants</h3>
|
|
40
|
+
<div class="flex gap-sm flex-wrap">
|
|
41
|
+
<button class="btn-primary">Primary</button>
|
|
42
|
+
<button class="btn-secondary">Secondary</button>
|
|
43
|
+
<button class="btn-outline">Outline</button>
|
|
44
|
+
<button class="btn-primary" disabled>Disabled</button>
|
|
45
|
+
</div>
|
|
46
|
+
</div>
|
|
47
|
+
`;
|
|
48
|
+
|
|
49
|
+
ButtonVariants.storyName = 'Button Variants';
|
|
50
|
+
|
|
51
|
+
export const ButtonSizes = () => html`
|
|
52
|
+
${buttonsStoryStyles}
|
|
53
|
+
<div class="buttons-story-section">
|
|
54
|
+
<h3>Button Sizes</h3>
|
|
55
|
+
<div class="flex gap-sm flex-wrap items-center">
|
|
56
|
+
<button class="btn-primary btn-sm">Small</button>
|
|
57
|
+
<button class="btn-primary">Default</button>
|
|
58
|
+
<button class="btn-primary btn-lg">Large</button>
|
|
59
|
+
</div>
|
|
60
|
+
</div>
|
|
61
|
+
`;
|
|
62
|
+
|
|
63
|
+
ButtonSizes.storyName = 'Button Sizes';
|
|
64
|
+
|
|
65
|
+
export const IconButtons = () => html`
|
|
66
|
+
${buttonsStoryStyles}
|
|
67
|
+
<div class="buttons-story-section">
|
|
68
|
+
<h3>Buttons with Icons</h3>
|
|
69
|
+
<div class="flex gap-sm flex-wrap">
|
|
70
|
+
<button class="btn-primary">
|
|
71
|
+
<pds-icon icon="download"></pds-icon>
|
|
72
|
+
<span>Download</span>
|
|
73
|
+
</button>
|
|
74
|
+
<button class="btn-secondary">
|
|
75
|
+
<pds-icon icon="gear"></pds-icon>
|
|
76
|
+
<span>Settings</span>
|
|
77
|
+
</button>
|
|
78
|
+
<button class="btn-outline">
|
|
79
|
+
<pds-icon icon="bell"></pds-icon>
|
|
80
|
+
<span>Notifications</span>
|
|
81
|
+
</button>
|
|
82
|
+
<button class="btn-primary">
|
|
83
|
+
<pds-icon icon="heart"></pds-icon>
|
|
84
|
+
<span>Favorite</span>
|
|
85
|
+
</button>
|
|
86
|
+
</div>
|
|
87
|
+
|
|
88
|
+
<h3 class="buttons-story-heading-spacer">Icon on Right</h3>
|
|
89
|
+
<div class="flex gap-sm flex-wrap">
|
|
90
|
+
<button class="btn-primary">
|
|
91
|
+
<span>Next</span>
|
|
92
|
+
<pds-icon icon="arrow-right"></pds-icon>
|
|
93
|
+
</button>
|
|
94
|
+
<button class="btn-secondary">
|
|
95
|
+
<span>Previous</span>
|
|
96
|
+
<pds-icon icon="arrow-left"></pds-icon>
|
|
97
|
+
</button>
|
|
98
|
+
</div>
|
|
99
|
+
</div>
|
|
100
|
+
`;
|
|
101
|
+
|
|
102
|
+
IconButtons.storyName = 'Buttons with Icons';
|
|
103
|
+
|
|
104
|
+
export const IconOnlyButtons = () => html`
|
|
105
|
+
${buttonsStoryStyles}
|
|
106
|
+
<div class="buttons-story-section">
|
|
107
|
+
<h3>Icon-Only Buttons</h3>
|
|
108
|
+
<p class="buttons-story-helper">
|
|
109
|
+
Use <code>.icon-only</code> class for square icon buttons
|
|
110
|
+
</p>
|
|
111
|
+
|
|
112
|
+
<div class="flex gap-sm flex-wrap">
|
|
113
|
+
<button class="icon-only btn-primary">
|
|
114
|
+
<pds-icon icon="gear" label="Settings"></pds-icon>
|
|
115
|
+
</button>
|
|
116
|
+
<button class="icon-only btn-secondary">
|
|
117
|
+
<pds-icon icon="bell" label="Notifications"></pds-icon>
|
|
118
|
+
</button>
|
|
119
|
+
<button class="icon-only btn-outline">
|
|
120
|
+
<pds-icon icon="heart" label="Favorite"></pds-icon>
|
|
121
|
+
</button>
|
|
122
|
+
<button class="icon-only btn-primary">
|
|
123
|
+
<pds-icon icon="trash" label="Delete"></pds-icon>
|
|
124
|
+
</button>
|
|
125
|
+
<button class="icon-only btn-secondary">
|
|
126
|
+
<pds-icon icon="pencil" label="Edit"></pds-icon>
|
|
127
|
+
</button>
|
|
128
|
+
<button class="icon-only btn-outline">
|
|
129
|
+
<pds-icon icon="copy" label="Copy"></pds-icon>
|
|
130
|
+
</button>
|
|
131
|
+
</div>
|
|
132
|
+
|
|
133
|
+
<h3 class="buttons-story-heading-spacer">Icon-Only Sizes</h3>
|
|
134
|
+
<div class="flex gap-sm flex-wrap items-center">
|
|
135
|
+
<button class="icon-only btn-primary btn-sm">
|
|
136
|
+
<pds-icon icon="plus" size="sm" label="Add"></pds-icon>
|
|
137
|
+
</button>
|
|
138
|
+
<button class="icon-only btn-primary">
|
|
139
|
+
<pds-icon icon="plus" label="Add"></pds-icon>
|
|
140
|
+
</button>
|
|
141
|
+
<button class="icon-only btn-primary btn-lg">
|
|
142
|
+
<pds-icon icon="plus" size="lg" label="Add"></pds-icon>
|
|
143
|
+
</button>
|
|
144
|
+
</div>
|
|
145
|
+
</div>
|
|
146
|
+
`;
|
|
147
|
+
|
|
148
|
+
IconOnlyButtons.storyName = 'Icon-Only Buttons';
|
|
149
|
+
|
|
150
|
+
export const ButtonGroups = () => html`
|
|
151
|
+
${buttonsStoryStyles}
|
|
152
|
+
<div class="buttons-story-section">
|
|
153
|
+
<h3>Button Groups</h3>
|
|
154
|
+
<div class="btn-group">
|
|
155
|
+
<button class="btn-primary">
|
|
156
|
+
<pds-icon icon="download"></pds-icon>
|
|
157
|
+
Get Started
|
|
158
|
+
</button>
|
|
159
|
+
<button class="btn-secondary">
|
|
160
|
+
<pds-icon icon="book-open"></pds-icon>
|
|
161
|
+
View Docs
|
|
162
|
+
</button>
|
|
163
|
+
</div>
|
|
164
|
+
|
|
165
|
+
<h3 class="buttons-story-heading-spacer">Icon-Only Group</h3>
|
|
166
|
+
<div class="btn-group">
|
|
167
|
+
<button class="icon-only btn-outline">
|
|
168
|
+
<pds-icon icon="text-align-left" label="Align left"></pds-icon>
|
|
169
|
+
</button>
|
|
170
|
+
<button class="icon-only btn-outline">
|
|
171
|
+
<pds-icon icon="text-align-center" label="Align center"></pds-icon>
|
|
172
|
+
</button>
|
|
173
|
+
<button class="icon-only btn-outline">
|
|
174
|
+
<pds-icon icon="text-align-right" label="Align right"></pds-icon>
|
|
175
|
+
</button>
|
|
176
|
+
</div>
|
|
177
|
+
</div>
|
|
178
|
+
`;
|
|
179
|
+
|
|
180
|
+
ButtonGroups.storyName = 'Button Groups';
|
|
181
|
+
|
|
182
|
+
export const AllSizesCombinations = () => html`
|
|
183
|
+
${buttonsStoryStyles}
|
|
184
|
+
<div class="buttons-story-section">
|
|
185
|
+
<h3>Small Buttons</h3>
|
|
186
|
+
<div class="flex gap-sm flex-wrap buttons-story-row">
|
|
187
|
+
<button class="btn-primary btn-sm">Primary</button>
|
|
188
|
+
<button class="btn-secondary btn-sm">Secondary</button>
|
|
189
|
+
<button class="btn-outline btn-sm">Outline</button>
|
|
190
|
+
<button class="btn-primary btn-sm">
|
|
191
|
+
<pds-icon icon="heart" size="sm"></pds-icon>
|
|
192
|
+
With Icon
|
|
193
|
+
</button>
|
|
194
|
+
<button class="icon-only btn-primary btn-sm">
|
|
195
|
+
<pds-icon icon="gear" size="sm" label="Settings"></pds-icon>
|
|
196
|
+
</button>
|
|
197
|
+
</div>
|
|
198
|
+
|
|
199
|
+
<h3>Default Buttons</h3>
|
|
200
|
+
<div class="flex gap-sm flex-wrap buttons-story-row">
|
|
201
|
+
<button class="btn-primary">Primary</button>
|
|
202
|
+
<button class="btn-secondary">Secondary</button>
|
|
203
|
+
<button class="btn-outline">Outline</button>
|
|
204
|
+
<button class="btn-primary">
|
|
205
|
+
<pds-icon icon="heart"></pds-icon>
|
|
206
|
+
With Icon
|
|
207
|
+
</button>
|
|
208
|
+
<button class="icon-only btn-primary">
|
|
209
|
+
<pds-icon icon="gear" label="Settings"></pds-icon>
|
|
210
|
+
</button>
|
|
211
|
+
</div>
|
|
212
|
+
|
|
213
|
+
<h3>Large Buttons</h3>
|
|
214
|
+
<div class="flex gap-sm flex-wrap">
|
|
215
|
+
<button class="btn-primary btn-lg">Primary</button>
|
|
216
|
+
<button class="btn-secondary btn-lg">Secondary</button>
|
|
217
|
+
<button class="btn-outline btn-lg">Outline</button>
|
|
218
|
+
<button class="btn-primary btn-lg">
|
|
219
|
+
<pds-icon icon="heart" size="lg"></pds-icon>
|
|
220
|
+
With Icon
|
|
221
|
+
</button>
|
|
222
|
+
<button class="icon-only btn-primary btn-lg">
|
|
223
|
+
<pds-icon icon="gear" size="lg" label="Settings"></pds-icon>
|
|
224
|
+
</button>
|
|
225
|
+
</div>
|
|
226
|
+
</div>
|
|
227
|
+
`;
|
|
228
|
+
|
|
229
|
+
AllSizesCombinations.storyName = 'All Sizes & Combinations';
|
|
@@ -0,0 +1,353 @@
|
|
|
1
|
+
import { html } from 'lit';
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Primitives/Cards',
|
|
5
|
+
tags: ['cards', 'layout', 'spacing', 'surface', 'colors'],
|
|
6
|
+
parameters: {
|
|
7
|
+
pds: {
|
|
8
|
+
tags: ['cards', 'layout', 'spacing', 'surface', 'colors']
|
|
9
|
+
},
|
|
10
|
+
docs: {
|
|
11
|
+
description: {
|
|
12
|
+
component: 'Versatile content containers with multiple surface variants. Cards automatically adapt to your theme and support nesting for complex layouts.'
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
const cardsStoryStyles = html`
|
|
19
|
+
<style>
|
|
20
|
+
.cards-story-section {
|
|
21
|
+
padding: var(--spacing-4);
|
|
22
|
+
}
|
|
23
|
+
.cards-basic-grid {
|
|
24
|
+
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
|
|
25
|
+
}
|
|
26
|
+
.cards-surface-grid {
|
|
27
|
+
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
|
|
28
|
+
}
|
|
29
|
+
.cards-helper {
|
|
30
|
+
margin-bottom: var(--spacing-4);
|
|
31
|
+
opacity: 0.8;
|
|
32
|
+
}
|
|
33
|
+
.cards-inline-actions {
|
|
34
|
+
margin-top: var(--spacing-3);
|
|
35
|
+
}
|
|
36
|
+
.cards-nested-shell {
|
|
37
|
+
max-width: 37.5rem;
|
|
38
|
+
}
|
|
39
|
+
.cards-nested-spacing {
|
|
40
|
+
margin-top: var(--spacing-4);
|
|
41
|
+
}
|
|
42
|
+
.cards-nested-deep {
|
|
43
|
+
margin-top: var(--spacing-3);
|
|
44
|
+
}
|
|
45
|
+
.cards-parent-action {
|
|
46
|
+
margin-top: var(--spacing-4);
|
|
47
|
+
}
|
|
48
|
+
.cards-horizontal-card {
|
|
49
|
+
max-width: 37.5rem;
|
|
50
|
+
margin-bottom: var(--spacing-6);
|
|
51
|
+
}
|
|
52
|
+
.cards-horizontal-media {
|
|
53
|
+
flex-shrink: 0;
|
|
54
|
+
width: 7.5rem;
|
|
55
|
+
height: 7.5rem;
|
|
56
|
+
background: var(--color-primary);
|
|
57
|
+
border-radius: var(--radius-md);
|
|
58
|
+
}
|
|
59
|
+
.cards-horizontal-icon {
|
|
60
|
+
color: white;
|
|
61
|
+
opacity: 0.6;
|
|
62
|
+
}
|
|
63
|
+
.cards-horizontal-body {
|
|
64
|
+
flex: 1;
|
|
65
|
+
}
|
|
66
|
+
.cards-grid-visuals {
|
|
67
|
+
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
|
|
68
|
+
}
|
|
69
|
+
.cards-visual-block {
|
|
70
|
+
height: 100px;
|
|
71
|
+
border-radius: var(--radius-sm);
|
|
72
|
+
margin-bottom: var(--spacing-3);
|
|
73
|
+
}
|
|
74
|
+
.cards-gradient-one {
|
|
75
|
+
background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
|
|
76
|
+
}
|
|
77
|
+
.cards-gradient-two {
|
|
78
|
+
background: linear-gradient(135deg, var(--color-secondary), var(--color-primary));
|
|
79
|
+
}
|
|
80
|
+
.cards-gradient-three {
|
|
81
|
+
background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
|
|
82
|
+
}
|
|
83
|
+
.cards-small-copy {
|
|
84
|
+
font-size: 0.9rem;
|
|
85
|
+
}
|
|
86
|
+
.cards-complex-grid {
|
|
87
|
+
grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
|
|
88
|
+
}
|
|
89
|
+
.cards-profile-header {
|
|
90
|
+
margin-bottom: var(--spacing-4);
|
|
91
|
+
}
|
|
92
|
+
.cards-profile-avatar {
|
|
93
|
+
width: 48px;
|
|
94
|
+
height: 48px;
|
|
95
|
+
background: var(--color-primary);
|
|
96
|
+
border-radius: 50%;
|
|
97
|
+
}
|
|
98
|
+
.cards-profile-avatar pds-icon {
|
|
99
|
+
color: white;
|
|
100
|
+
}
|
|
101
|
+
.cards-profile-title {
|
|
102
|
+
margin: 0;
|
|
103
|
+
}
|
|
104
|
+
.cards-profile-meta {
|
|
105
|
+
margin: 0;
|
|
106
|
+
font-size: 0.85rem;
|
|
107
|
+
opacity: 0.7;
|
|
108
|
+
}
|
|
109
|
+
.cards-profile-actions {
|
|
110
|
+
margin-top: var(--spacing-4);
|
|
111
|
+
}
|
|
112
|
+
.cards-premium-header {
|
|
113
|
+
margin-bottom: var(--spacing-3);
|
|
114
|
+
}
|
|
115
|
+
.cards-pro-badge {
|
|
116
|
+
padding: var(--spacing-1) var(--spacing-2);
|
|
117
|
+
background: var(--color-primary);
|
|
118
|
+
color: white;
|
|
119
|
+
border-radius: var(--radius-full);
|
|
120
|
+
font-size: 0.75rem;
|
|
121
|
+
font-weight: 600;
|
|
122
|
+
}
|
|
123
|
+
.cards-premium-list {
|
|
124
|
+
margin: var(--spacing-3) 0;
|
|
125
|
+
}
|
|
126
|
+
.cards-stats-grid {
|
|
127
|
+
margin: var(--spacing-4) 0;
|
|
128
|
+
}
|
|
129
|
+
.cards-stat-value {
|
|
130
|
+
font-size: 2rem;
|
|
131
|
+
font-weight: 700;
|
|
132
|
+
}
|
|
133
|
+
.cards-stat-value.primary {
|
|
134
|
+
color: var(--color-primary);
|
|
135
|
+
}
|
|
136
|
+
.cards-stat-value.secondary {
|
|
137
|
+
color: var(--color-secondary);
|
|
138
|
+
}
|
|
139
|
+
.cards-stat-label {
|
|
140
|
+
font-size: 0.85rem;
|
|
141
|
+
opacity: 0.7;
|
|
142
|
+
}
|
|
143
|
+
</style>
|
|
144
|
+
`;
|
|
145
|
+
|
|
146
|
+
export const BasicCards = () => html`
|
|
147
|
+
${cardsStoryStyles}
|
|
148
|
+
<div class="cards-story-section">
|
|
149
|
+
<h3>Basic Cards</h3>
|
|
150
|
+
<div class="grid gap-md cards-basic-grid">
|
|
151
|
+
<article class="card">
|
|
152
|
+
<h3>Default Card</h3>
|
|
153
|
+
<p>Card content goes here. This is a basic card primitive with automatic theming.</p>
|
|
154
|
+
<button class="btn-primary">Action</button>
|
|
155
|
+
</article>
|
|
156
|
+
|
|
157
|
+
<article class="card">
|
|
158
|
+
<h3>With Icon</h3>
|
|
159
|
+
<div class="flex items-start gap-sm">
|
|
160
|
+
<pds-icon icon="star" size="lg" class="icon-primary"></pds-icon>
|
|
161
|
+
<div>
|
|
162
|
+
<p>Cards can contain icons, buttons, forms, and any other content.</p>
|
|
163
|
+
</div>
|
|
164
|
+
</div>
|
|
165
|
+
<button class="btn-outline">Learn More</button>
|
|
166
|
+
</article>
|
|
167
|
+
|
|
168
|
+
<article class="card">
|
|
169
|
+
<h3>Interactive Card</h3>
|
|
170
|
+
<p>With multiple actions and rich content.</p>
|
|
171
|
+
<div class="flex gap-sm cards-inline-actions">
|
|
172
|
+
<button class="btn-primary btn-sm">
|
|
173
|
+
<pds-icon icon="heart" size="sm"></pds-icon>
|
|
174
|
+
Like
|
|
175
|
+
</button>
|
|
176
|
+
<button class="btn-secondary btn-sm">
|
|
177
|
+
<pds-icon icon="share" size="sm"></pds-icon>
|
|
178
|
+
Share
|
|
179
|
+
</button>
|
|
180
|
+
<button class="icon-only btn-outline btn-sm">
|
|
181
|
+
<pds-icon icon="bookmark" size="sm" label="Bookmark"></pds-icon>
|
|
182
|
+
</button>
|
|
183
|
+
</div>
|
|
184
|
+
</article>
|
|
185
|
+
</div>
|
|
186
|
+
</div>
|
|
187
|
+
`;
|
|
188
|
+
|
|
189
|
+
BasicCards.storyName = 'Basic Cards';
|
|
190
|
+
|
|
191
|
+
export const SurfaceVariants = () => html`
|
|
192
|
+
${cardsStoryStyles}
|
|
193
|
+
<div class="cards-story-section">
|
|
194
|
+
<h3>Surface Variants</h3>
|
|
195
|
+
<p class="cards-helper">
|
|
196
|
+
Different surface levels create visual hierarchy
|
|
197
|
+
</p>
|
|
198
|
+
|
|
199
|
+
<div class="grid gap-md cards-surface-grid">
|
|
200
|
+
<article class="card">
|
|
201
|
+
<h4>Default Surface</h4>
|
|
202
|
+
<p>Standard card surface level. Use for most content containers.</p>
|
|
203
|
+
<code>.card</code>
|
|
204
|
+
</article>
|
|
205
|
+
|
|
206
|
+
<article class="card surface-elevated">
|
|
207
|
+
<h4>Elevated Surface</h4>
|
|
208
|
+
<p>Appears raised above the default surface. Great for important content or hover states.</p>
|
|
209
|
+
<code>.surface-elevated</code>
|
|
210
|
+
</article>
|
|
211
|
+
|
|
212
|
+
<article class="card surface-overlay">
|
|
213
|
+
<h4>Overlay Surface</h4>
|
|
214
|
+
<p>Highest surface level. Perfect for modal dialogs and floating panels.</p>
|
|
215
|
+
<code>.surface-overlay</code>
|
|
216
|
+
</article>
|
|
217
|
+
</div>
|
|
218
|
+
</div>
|
|
219
|
+
`;
|
|
220
|
+
|
|
221
|
+
SurfaceVariants.storyName = 'Surface Variants';
|
|
222
|
+
|
|
223
|
+
export const NestedCards = () => html`
|
|
224
|
+
${cardsStoryStyles}
|
|
225
|
+
<div class="cards-story-section">
|
|
226
|
+
<h3>Nested Cards</h3>
|
|
227
|
+
<p class="cards-helper">
|
|
228
|
+
Surface variants enable natural nesting without visual confusion
|
|
229
|
+
</p>
|
|
230
|
+
|
|
231
|
+
<article class="card cards-nested-shell">
|
|
232
|
+
<h3>Parent Card (Default Surface)</h3>
|
|
233
|
+
<p>This is the outer container using the default card surface.</p>
|
|
234
|
+
|
|
235
|
+
<div class="cards-nested-spacing">
|
|
236
|
+
<article class="card surface-elevated">
|
|
237
|
+
<h4>Nested Card (Elevated)</h4>
|
|
238
|
+
<p>This card is nested inside the parent and uses the elevated surface for clear visual separation.</p>
|
|
239
|
+
|
|
240
|
+
<div class="cards-nested-deep">
|
|
241
|
+
<article class="card surface-overlay">
|
|
242
|
+
<h5>Deeply Nested (Overlay)</h5>
|
|
243
|
+
<p class="cards-small-copy">Even deeper nesting maintains readability with the overlay surface.</p>
|
|
244
|
+
</article>
|
|
245
|
+
</div>
|
|
246
|
+
</article>
|
|
247
|
+
</div>
|
|
248
|
+
|
|
249
|
+
<button class="btn-primary cards-parent-action">Parent Action</button>
|
|
250
|
+
</article>
|
|
251
|
+
</div>
|
|
252
|
+
`;
|
|
253
|
+
|
|
254
|
+
NestedCards.storyName = 'Nested Cards';
|
|
255
|
+
|
|
256
|
+
export const CardLayouts = () => html`
|
|
257
|
+
${cardsStoryStyles}
|
|
258
|
+
<div class="cards-story-section">
|
|
259
|
+
<h3>Horizontal Card</h3>
|
|
260
|
+
<article class="card flex gap-md cards-horizontal-card">
|
|
261
|
+
<div class="flex items-center justify-center cards-horizontal-media">
|
|
262
|
+
<pds-icon icon="image" size="xl" class="cards-horizontal-icon"></pds-icon>
|
|
263
|
+
</div>
|
|
264
|
+
<div class="cards-horizontal-body">
|
|
265
|
+
<h4>Horizontal Layout</h4>
|
|
266
|
+
<p>Cards work great with flexbox for horizontal layouts.</p>
|
|
267
|
+
<button class="btn-outline btn-sm">View Details</button>
|
|
268
|
+
</div>
|
|
269
|
+
</article>
|
|
270
|
+
|
|
271
|
+
<h3>Card Grid</h3>
|
|
272
|
+
<div class="grid gap-sm cards-grid-visuals">
|
|
273
|
+
<article class="card">
|
|
274
|
+
<div class="cards-visual-block cards-gradient-one"></div>
|
|
275
|
+
<h4>Card 1</h4>
|
|
276
|
+
<p class="cards-small-copy">Grid layout with cards.</p>
|
|
277
|
+
</article>
|
|
278
|
+
<article class="card">
|
|
279
|
+
<div class="cards-visual-block cards-gradient-two"></div>
|
|
280
|
+
<h4>Card 2</h4>
|
|
281
|
+
<p class="cards-small-copy">Responsive and flexible.</p>
|
|
282
|
+
</article>
|
|
283
|
+
<article class="card">
|
|
284
|
+
<div class="cards-visual-block cards-gradient-three"></div>
|
|
285
|
+
<h4>Card 3</h4>
|
|
286
|
+
<p class="cards-small-copy">Auto-fits to space.</p>
|
|
287
|
+
</article>
|
|
288
|
+
</div>
|
|
289
|
+
</div>
|
|
290
|
+
`;
|
|
291
|
+
|
|
292
|
+
CardLayouts.storyName = 'Card Layouts';
|
|
293
|
+
|
|
294
|
+
export const ComplexCards = () => html`
|
|
295
|
+
${cardsStoryStyles}
|
|
296
|
+
<div class="cards-story-section">
|
|
297
|
+
<h3>Complex Card Examples</h3>
|
|
298
|
+
<div class="grid gap-md cards-complex-grid">
|
|
299
|
+
|
|
300
|
+
<article class="card">
|
|
301
|
+
<div class="flex items-center gap-sm cards-profile-header">
|
|
302
|
+
<div class="flex items-center justify-center cards-profile-avatar">
|
|
303
|
+
<pds-icon icon="user"></pds-icon>
|
|
304
|
+
</div>
|
|
305
|
+
<div>
|
|
306
|
+
<h4 class="cards-profile-title">User Profile</h4>
|
|
307
|
+
<p class="cards-profile-meta">@username</p>
|
|
308
|
+
</div>
|
|
309
|
+
</div>
|
|
310
|
+
<p>Profile description goes here with some interesting details about the user.</p>
|
|
311
|
+
<div class="flex gap-sm cards-profile-actions">
|
|
312
|
+
<button class="btn-primary btn-sm">Follow</button>
|
|
313
|
+
<button class="btn-outline btn-sm">Message</button>
|
|
314
|
+
</div>
|
|
315
|
+
</article>
|
|
316
|
+
|
|
317
|
+
<article class="card surface-elevated">
|
|
318
|
+
<div class="flex justify-between items-start cards-premium-header">
|
|
319
|
+
<h4>Premium Feature</h4>
|
|
320
|
+
<span class="cards-pro-badge">PRO</span>
|
|
321
|
+
</div>
|
|
322
|
+
<p>This elevated card highlights a premium feature with a badge and special styling.</p>
|
|
323
|
+
<ul class="cards-premium-list">
|
|
324
|
+
<li>Feature benefit one</li>
|
|
325
|
+
<li>Feature benefit two</li>
|
|
326
|
+
<li>Feature benefit three</li>
|
|
327
|
+
</ul>
|
|
328
|
+
<button class="btn-primary">
|
|
329
|
+
<pds-icon icon="star"></pds-icon>
|
|
330
|
+
Upgrade Now
|
|
331
|
+
</button>
|
|
332
|
+
</article>
|
|
333
|
+
|
|
334
|
+
<article class="card">
|
|
335
|
+
<h4>Stats Card</h4>
|
|
336
|
+
<div class="grid grid-cols-2 gap-md cards-stats-grid">
|
|
337
|
+
<div>
|
|
338
|
+
<div class="cards-stat-value primary">1.2K</div>
|
|
339
|
+
<div class="cards-stat-label">Followers</div>
|
|
340
|
+
</div>
|
|
341
|
+
<div>
|
|
342
|
+
<div class="cards-stat-value secondary">847</div>
|
|
343
|
+
<div class="cards-stat-label">Following</div>
|
|
344
|
+
</div>
|
|
345
|
+
</div>
|
|
346
|
+
<button class="btn-outline btn-sm">View All</button>
|
|
347
|
+
</article>
|
|
348
|
+
|
|
349
|
+
</div>
|
|
350
|
+
</div>
|
|
351
|
+
`;
|
|
352
|
+
|
|
353
|
+
ComplexCards.storyName = 'Complex Cards';
|