@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,185 +1,185 @@
|
|
|
1
|
-
import { html } from "lit";
|
|
2
|
-
|
|
3
|
-
const dropdownStoryStyles = html`
|
|
4
|
-
<style>
|
|
5
|
-
.dropdown-story-align-right {
|
|
6
|
-
text-align: right;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
.dropdown-story-dropup {
|
|
10
|
-
display: flex;
|
|
11
|
-
justify-content: center;
|
|
12
|
-
align-items: flex-end;
|
|
13
|
-
height: 260px;
|
|
14
|
-
padding: var(--spacing-6);
|
|
15
|
-
border-radius: var(--radius-lg);
|
|
16
|
-
}
|
|
17
|
-
</style>
|
|
18
|
-
`;
|
|
19
|
-
|
|
20
|
-
const dropdownGlassDemoStyles = html`
|
|
21
|
-
<style>
|
|
22
|
-
.dropdown-story-glass-demo {
|
|
23
|
-
position: relative;
|
|
24
|
-
display: flex;
|
|
25
|
-
justify-content: center;
|
|
26
|
-
align-items: center;
|
|
27
|
-
min-height: 100vh;
|
|
28
|
-
padding: var(--spacing-8);
|
|
29
|
-
border-radius: var(--radius-xl);
|
|
30
|
-
overflow: hidden;
|
|
31
|
-
background-image: var(--dropdown-demo-image);
|
|
32
|
-
background-size: cover;
|
|
33
|
-
background-position: center;
|
|
34
|
-
color: inherit;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
.dropdown-story-glass-demo::before {
|
|
38
|
-
content: "";
|
|
39
|
-
position: absolute;
|
|
40
|
-
inset: 0;
|
|
41
|
-
/* background: linear-gradient(
|
|
42
|
-
rgba(12, 18, 28, 0.72),
|
|
43
|
-
rgba(12, 18, 28, 0.32)
|
|
44
|
-
); */
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
.dropdown-story-glass-content {
|
|
48
|
-
position: relative;
|
|
49
|
-
display: grid;
|
|
50
|
-
gap: var(--spacing-4);
|
|
51
|
-
text-align: center;
|
|
52
|
-
max-width: 360px;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
.dropdown-story-glass-content h3 {
|
|
56
|
-
margin: 0;
|
|
57
|
-
font-weight: var(--font-weight-semibold);
|
|
58
|
-
letter-spacing: 0.04em;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
.dropdown-story-glass-content p {
|
|
62
|
-
margin: 0;
|
|
63
|
-
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
.dropdown-story-glass-content menu {
|
|
67
|
-
margin: 0;
|
|
68
|
-
padding: var(--spacing-3);
|
|
69
|
-
}
|
|
70
|
-
</style>
|
|
71
|
-
`;
|
|
72
|
-
|
|
73
|
-
export default {
|
|
74
|
-
title: "Enhancements/Dropdowns",
|
|
75
|
-
tags: [
|
|
76
|
-
parameters: {
|
|
77
|
-
pds: {
|
|
78
|
-
tags: [
|
|
79
|
-
},
|
|
80
|
-
docs: {
|
|
81
|
-
description: {
|
|
82
|
-
component:
|
|
83
|
-
"Progressive enhancement for dropdown menus using data-dropdown attribute",
|
|
84
|
-
},
|
|
85
|
-
},
|
|
86
|
-
},
|
|
87
|
-
};
|
|
88
|
-
|
|
89
|
-
export const BasicDropdown = () => html`
|
|
90
|
-
<nav data-dropdown>
|
|
91
|
-
<button class="btn-primary">Open Menu</button>
|
|
92
|
-
<menu>
|
|
93
|
-
<li><a href="#home">Home</a></li>
|
|
94
|
-
<li><a href="#about">About</a></li>
|
|
95
|
-
<li><a href="#services">Services</a></li>
|
|
96
|
-
<li><a href="#contact">Contact</a></li>
|
|
97
|
-
</menu>
|
|
98
|
-
</nav>
|
|
99
|
-
`;
|
|
100
|
-
|
|
101
|
-
export const RightAligned = () => html`
|
|
102
|
-
${dropdownStoryStyles}
|
|
103
|
-
<div class="dropdown-story-align-right">
|
|
104
|
-
<nav data-dropdown class="align-right">
|
|
105
|
-
<button class="btn-secondary">User Menu</button>
|
|
106
|
-
<menu>
|
|
107
|
-
<li><a href="#profile">Profile</a></li>
|
|
108
|
-
<li><a href="#settings">Settings</a></li>
|
|
109
|
-
<li><hr /></li>
|
|
110
|
-
<li><a href="#logout">Logout</a></li>
|
|
111
|
-
</menu>
|
|
112
|
-
</nav>
|
|
113
|
-
</div>
|
|
114
|
-
`;
|
|
115
|
-
|
|
116
|
-
export const WithIcons = () => html`
|
|
117
|
-
${dropdownStoryStyles}
|
|
118
|
-
<nav data-dropdown>
|
|
119
|
-
<button class="btn-outline">
|
|
120
|
-
<pds-icon icon="list" size="sm"></pds-icon>
|
|
121
|
-
Actions
|
|
122
|
-
</button>
|
|
123
|
-
<menu>
|
|
124
|
-
<li>
|
|
125
|
-
<a href="#edit">
|
|
126
|
-
<pds-icon icon="pencil" size="sm"></pds-icon>
|
|
127
|
-
Edit
|
|
128
|
-
</a>
|
|
129
|
-
</li>
|
|
130
|
-
<li>
|
|
131
|
-
<a href="#copy">
|
|
132
|
-
<pds-icon icon="copy" size="sm"></pds-icon>
|
|
133
|
-
Copy
|
|
134
|
-
</a>
|
|
135
|
-
</li>
|
|
136
|
-
<li>
|
|
137
|
-
<a href="#delete">
|
|
138
|
-
<pds-icon icon="trash" size="sm"></pds-icon>
|
|
139
|
-
Delete
|
|
140
|
-
</a>
|
|
141
|
-
</li>
|
|
142
|
-
</menu>
|
|
143
|
-
</nav>
|
|
144
|
-
`;
|
|
145
|
-
|
|
146
|
-
export const DropUp = () => html`
|
|
147
|
-
${dropdownStoryStyles}
|
|
148
|
-
<div class="dropdown-story-dropup">
|
|
149
|
-
<nav data-dropdown data-mode="up">
|
|
150
|
-
<button class="btn-primary">Resources</button>
|
|
151
|
-
<menu>
|
|
152
|
-
<li><a href="#guides">Guides</a></li>
|
|
153
|
-
<li><a href="#checklists">Checklists</a></li>
|
|
154
|
-
<li><a href="#support">Support</a></li>
|
|
155
|
-
</menu>
|
|
156
|
-
</nav>
|
|
157
|
-
</div>
|
|
158
|
-
`;
|
|
159
|
-
|
|
160
|
-
export const BackgroundImageLiquidGlass = () => html`
|
|
161
|
-
${dropdownStoryStyles} ${dropdownGlassDemoStyles}
|
|
162
|
-
<section
|
|
163
|
-
class="dropdown-story-glass-demo"
|
|
164
|
-
style="--dropdown-demo-image: url('https://images.unsplash.com/photo-1517832207067-4db24a2ae47c?auto=format&fit=crop&w=1200&q=80');"
|
|
165
|
-
>
|
|
166
|
-
<div class="dropdown-story-glass-content">
|
|
167
|
-
<div class="card liquid-glass">
|
|
168
|
-
<h3>Plan Your Escape</h3>
|
|
169
|
-
<p>
|
|
170
|
-
Frosted dropdown blends with the hero photo while keeping content
|
|
171
|
-
readable.
|
|
172
|
-
</p>
|
|
173
|
-
</div>
|
|
174
|
-
<nav data-dropdown data-mode="down">
|
|
175
|
-
<button class="btn-primary">Featured Cities</button>
|
|
176
|
-
<menu class="liquid-glass">
|
|
177
|
-
<li><a href="#barcelona">Barcelona</a></li>
|
|
178
|
-
<li><a href="#kyoto">Kyoto</a></li>
|
|
179
|
-
<li><a href="#cape-town">Cape Town</a></li>
|
|
180
|
-
<li><a href="#reykjavik">Reykjavik</a></li>
|
|
181
|
-
</menu>
|
|
182
|
-
</nav>
|
|
183
|
-
</div>
|
|
184
|
-
</section>
|
|
185
|
-
`;
|
|
1
|
+
import { html } from "lit";
|
|
2
|
+
|
|
3
|
+
const dropdownStoryStyles = html`
|
|
4
|
+
<style>
|
|
5
|
+
.dropdown-story-align-right {
|
|
6
|
+
text-align: right;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.dropdown-story-dropup {
|
|
10
|
+
display: flex;
|
|
11
|
+
justify-content: center;
|
|
12
|
+
align-items: flex-end;
|
|
13
|
+
height: 260px;
|
|
14
|
+
padding: var(--spacing-6);
|
|
15
|
+
border-radius: var(--radius-lg);
|
|
16
|
+
}
|
|
17
|
+
</style>
|
|
18
|
+
`;
|
|
19
|
+
|
|
20
|
+
const dropdownGlassDemoStyles = html`
|
|
21
|
+
<style>
|
|
22
|
+
.dropdown-story-glass-demo {
|
|
23
|
+
position: relative;
|
|
24
|
+
display: flex;
|
|
25
|
+
justify-content: center;
|
|
26
|
+
align-items: center;
|
|
27
|
+
min-height: 100vh;
|
|
28
|
+
padding: var(--spacing-8);
|
|
29
|
+
border-radius: var(--radius-xl);
|
|
30
|
+
overflow: hidden;
|
|
31
|
+
background-image: var(--dropdown-demo-image);
|
|
32
|
+
background-size: cover;
|
|
33
|
+
background-position: center;
|
|
34
|
+
color: inherit;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.dropdown-story-glass-demo::before {
|
|
38
|
+
content: "";
|
|
39
|
+
position: absolute;
|
|
40
|
+
inset: 0;
|
|
41
|
+
/* background: linear-gradient(
|
|
42
|
+
rgba(12, 18, 28, 0.72),
|
|
43
|
+
rgba(12, 18, 28, 0.32)
|
|
44
|
+
); */
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.dropdown-story-glass-content {
|
|
48
|
+
position: relative;
|
|
49
|
+
display: grid;
|
|
50
|
+
gap: var(--spacing-4);
|
|
51
|
+
text-align: center;
|
|
52
|
+
max-width: 360px;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.dropdown-story-glass-content h3 {
|
|
56
|
+
margin: 0;
|
|
57
|
+
font-weight: var(--font-weight-semibold);
|
|
58
|
+
letter-spacing: 0.04em;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.dropdown-story-glass-content p {
|
|
62
|
+
margin: 0;
|
|
63
|
+
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.dropdown-story-glass-content menu {
|
|
67
|
+
margin: 0;
|
|
68
|
+
padding: var(--spacing-3);
|
|
69
|
+
}
|
|
70
|
+
</style>
|
|
71
|
+
`;
|
|
72
|
+
|
|
73
|
+
export default {
|
|
74
|
+
title: "Enhancements/Dropdowns",
|
|
75
|
+
tags: ['dropdown', 'menu', 'navigation', 'popover', 'forms', 'interaction'],
|
|
76
|
+
parameters: {
|
|
77
|
+
pds: {
|
|
78
|
+
tags: ['dropdown', 'menu', 'navigation', 'popover', 'overlay', 'forms', 'interaction', 'data-dropdown']
|
|
79
|
+
},
|
|
80
|
+
docs: {
|
|
81
|
+
description: {
|
|
82
|
+
component:
|
|
83
|
+
"Progressive enhancement for dropdown menus using data-dropdown attribute",
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
export const BasicDropdown = () => html`
|
|
90
|
+
<nav data-dropdown>
|
|
91
|
+
<button class="btn-primary">Open Menu</button>
|
|
92
|
+
<menu>
|
|
93
|
+
<li><a href="#home">Home</a></li>
|
|
94
|
+
<li><a href="#about">About</a></li>
|
|
95
|
+
<li><a href="#services">Services</a></li>
|
|
96
|
+
<li><a href="#contact">Contact</a></li>
|
|
97
|
+
</menu>
|
|
98
|
+
</nav>
|
|
99
|
+
`;
|
|
100
|
+
|
|
101
|
+
export const RightAligned = () => html`
|
|
102
|
+
${dropdownStoryStyles}
|
|
103
|
+
<div class="dropdown-story-align-right">
|
|
104
|
+
<nav data-dropdown class="align-right">
|
|
105
|
+
<button class="btn-secondary">User Menu</button>
|
|
106
|
+
<menu>
|
|
107
|
+
<li><a href="#profile">Profile</a></li>
|
|
108
|
+
<li><a href="#settings">Settings</a></li>
|
|
109
|
+
<li><hr /></li>
|
|
110
|
+
<li><a href="#logout">Logout</a></li>
|
|
111
|
+
</menu>
|
|
112
|
+
</nav>
|
|
113
|
+
</div>
|
|
114
|
+
`;
|
|
115
|
+
|
|
116
|
+
export const WithIcons = () => html`
|
|
117
|
+
${dropdownStoryStyles}
|
|
118
|
+
<nav data-dropdown>
|
|
119
|
+
<button class="btn-outline">
|
|
120
|
+
<pds-icon icon="list" size="sm"></pds-icon>
|
|
121
|
+
Actions
|
|
122
|
+
</button>
|
|
123
|
+
<menu>
|
|
124
|
+
<li>
|
|
125
|
+
<a href="#edit">
|
|
126
|
+
<pds-icon icon="pencil" size="sm"></pds-icon>
|
|
127
|
+
Edit
|
|
128
|
+
</a>
|
|
129
|
+
</li>
|
|
130
|
+
<li>
|
|
131
|
+
<a href="#copy">
|
|
132
|
+
<pds-icon icon="copy" size="sm"></pds-icon>
|
|
133
|
+
Copy
|
|
134
|
+
</a>
|
|
135
|
+
</li>
|
|
136
|
+
<li>
|
|
137
|
+
<a href="#delete">
|
|
138
|
+
<pds-icon icon="trash" size="sm"></pds-icon>
|
|
139
|
+
Delete
|
|
140
|
+
</a>
|
|
141
|
+
</li>
|
|
142
|
+
</menu>
|
|
143
|
+
</nav>
|
|
144
|
+
`;
|
|
145
|
+
|
|
146
|
+
export const DropUp = () => html`
|
|
147
|
+
${dropdownStoryStyles}
|
|
148
|
+
<div class="dropdown-story-dropup">
|
|
149
|
+
<nav data-dropdown data-mode="up">
|
|
150
|
+
<button class="btn-primary">Resources</button>
|
|
151
|
+
<menu>
|
|
152
|
+
<li><a href="#guides">Guides</a></li>
|
|
153
|
+
<li><a href="#checklists">Checklists</a></li>
|
|
154
|
+
<li><a href="#support">Support</a></li>
|
|
155
|
+
</menu>
|
|
156
|
+
</nav>
|
|
157
|
+
</div>
|
|
158
|
+
`;
|
|
159
|
+
|
|
160
|
+
export const BackgroundImageLiquidGlass = () => html`
|
|
161
|
+
${dropdownStoryStyles} ${dropdownGlassDemoStyles}
|
|
162
|
+
<section
|
|
163
|
+
class="dropdown-story-glass-demo"
|
|
164
|
+
style="--dropdown-demo-image: url('https://images.unsplash.com/photo-1517832207067-4db24a2ae47c?auto=format&fit=crop&w=1200&q=80');"
|
|
165
|
+
>
|
|
166
|
+
<div class="dropdown-story-glass-content">
|
|
167
|
+
<div class="card liquid-glass">
|
|
168
|
+
<h3>Plan Your Escape</h3>
|
|
169
|
+
<p>
|
|
170
|
+
Frosted dropdown blends with the hero photo while keeping content
|
|
171
|
+
readable.
|
|
172
|
+
</p>
|
|
173
|
+
</div>
|
|
174
|
+
<nav data-dropdown data-mode="down">
|
|
175
|
+
<button class="btn-primary">Featured Cities</button>
|
|
176
|
+
<menu class="liquid-glass">
|
|
177
|
+
<li><a href="#barcelona">Barcelona</a></li>
|
|
178
|
+
<li><a href="#kyoto">Kyoto</a></li>
|
|
179
|
+
<li><a href="#cape-town">Cape Town</a></li>
|
|
180
|
+
<li><a href="#reykjavik">Reykjavik</a></li>
|
|
181
|
+
</menu>
|
|
182
|
+
</nav>
|
|
183
|
+
</div>
|
|
184
|
+
</section>
|
|
185
|
+
`;
|