@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
|
@@ -1,140 +1,140 @@
|
|
|
1
|
-
import { html } from 'lit';
|
|
2
|
-
|
|
3
|
-
const docsParameters = {
|
|
4
|
-
description: {
|
|
5
|
-
component: 'Horizontal scrolling container with navigation buttons'
|
|
6
|
-
}
|
|
7
|
-
};
|
|
8
|
-
|
|
9
|
-
if (typeof window !== 'undefined') {
|
|
10
|
-
import('../reference/reference-docs.js')
|
|
11
|
-
.then(({ createComponentDocsPage }) => {
|
|
12
|
-
docsParameters.page = createComponentDocsPage('pds-scrollrow');
|
|
13
|
-
})
|
|
14
|
-
.catch((error) => {
|
|
15
|
-
console.warn('storybook: docs page failed to load for pds-scrollrow', error);
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export default {
|
|
20
|
-
title: 'Components/Pds Scrollrow',
|
|
21
|
-
tags: ['autodocs'],
|
|
22
|
-
parameters: {
|
|
23
|
-
pds: {
|
|
24
|
-
tags: ['layout'
|
|
25
|
-
},
|
|
26
|
-
docs: docsParameters
|
|
27
|
-
}
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
export const Default = () => html`
|
|
31
|
-
<style>
|
|
32
|
-
.scrollrow-default-card {
|
|
33
|
-
min-width: 18.75rem;
|
|
34
|
-
}
|
|
35
|
-
</style>
|
|
36
|
-
<pds-scrollrow>
|
|
37
|
-
${Array.from({ length: 10 }, (_, i) => html`
|
|
38
|
-
<article class="card scrollrow-default-card">
|
|
39
|
-
<h4>Card ${i + 1}</h4>
|
|
40
|
-
<p>This is card content that scrolls horizontally.</p>
|
|
41
|
-
<button class="btn-primary">Action</button>
|
|
42
|
-
</article>
|
|
43
|
-
`)}
|
|
44
|
-
</pds-scrollrow>
|
|
45
|
-
`;
|
|
46
|
-
|
|
47
|
-
export const WithImages = () => html`
|
|
48
|
-
<style>
|
|
49
|
-
.scrollrow-image-card {
|
|
50
|
-
min-width: 18.75rem;
|
|
51
|
-
height: 12.5rem;
|
|
52
|
-
object-fit: cover;
|
|
53
|
-
border-radius: var(--radius-md);
|
|
54
|
-
}
|
|
55
|
-
</style>
|
|
56
|
-
<pds-scrollrow>
|
|
57
|
-
${Array.from({ length: 10 }, (_, i) => html`
|
|
58
|
-
<img
|
|
59
|
-
src="https://picsum.photos/300/200?random=${i}"
|
|
60
|
-
alt="Gallery image ${i + 1}"
|
|
61
|
-
class="scrollrow-image-card">
|
|
62
|
-
`)}
|
|
63
|
-
</pds-scrollrow>
|
|
64
|
-
`;
|
|
65
|
-
|
|
66
|
-
export const ProductGallery = () => html`
|
|
67
|
-
<style>
|
|
68
|
-
.scrollrow-product-wrap {
|
|
69
|
-
padding: var(--spacing-4);
|
|
70
|
-
}
|
|
71
|
-
.scrollrow-product-card {
|
|
72
|
-
min-width: 17.5rem;
|
|
73
|
-
}
|
|
74
|
-
.product-price {
|
|
75
|
-
font-size: 1.5rem; font-weight: 700; color: var(--color-primary);
|
|
76
|
-
}
|
|
77
|
-
.product-image {
|
|
78
|
-
width: 100%; height: 200px; object-fit: cover; border-radius: var(--radius-md); margin-bottom: var(--spacing-3);
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
</style>
|
|
82
|
-
<div class="scrollrow-product-wrap">
|
|
83
|
-
<h3>Featured Products</h3>
|
|
84
|
-
<pds-scrollrow snap="start">
|
|
85
|
-
${Array.from({ length: 8 }, (_, i) => html`
|
|
86
|
-
<article class="card scrollrow-product-card">
|
|
87
|
-
<img
|
|
88
|
-
src="https://picsum.photos/280/200?random=${100 + i}"
|
|
89
|
-
alt="Product ${i + 1}"
|
|
90
|
-
class="product-image">
|
|
91
|
-
<h4>Product ${i + 1}</h4>
|
|
92
|
-
<small class="text-muted">Premium quality product with amazing features.</small>
|
|
93
|
-
<div class="flex justify-between align-center" >
|
|
94
|
-
<span class="product-price">$${(i + 1) * 10 + 29}</span>
|
|
95
|
-
<button class="btn-primary btn-sm">
|
|
96
|
-
<pds-icon icon="shopping-cart" size="sm"></pds-icon>
|
|
97
|
-
Add
|
|
98
|
-
</button>
|
|
99
|
-
</div>
|
|
100
|
-
</article>
|
|
101
|
-
`)}
|
|
102
|
-
</pds-scrollrow>
|
|
103
|
-
</div>
|
|
104
|
-
`;
|
|
105
|
-
|
|
106
|
-
ProductGallery.storyName = 'Product Gallery';
|
|
107
|
-
|
|
108
|
-
export const UserProfiles = () => html`
|
|
109
|
-
<style>
|
|
110
|
-
.avatar-lg {
|
|
111
|
-
width: 100px; height: 100px; border-radius: var(--radius-full); margin: 0 auto var(--spacing-3);
|
|
112
|
-
}
|
|
113
|
-
.scrollrow-profile-card {
|
|
114
|
-
min-width: 12.5rem;
|
|
115
|
-
text-align: center;
|
|
116
|
-
}
|
|
117
|
-
</style>
|
|
118
|
-
<div>
|
|
119
|
-
<h3>Team Members</h3>
|
|
120
|
-
<pds-scrollrow>
|
|
121
|
-
${Array.from({ length: 12 }, (_, i) => html`
|
|
122
|
-
<article class="card surface-elevated scrollrow-profile-card">
|
|
123
|
-
<img
|
|
124
|
-
src="https://i.pravatar.cc/150?img=${i + 1}"
|
|
125
|
-
alt="Team member ${i + 1}"
|
|
126
|
-
class="avatar-lg"
|
|
127
|
-
>
|
|
128
|
-
<h4 class="">Team Member ${i + 1}</h4>
|
|
129
|
-
<p><small class="text-muted">Role Title</small></p>
|
|
130
|
-
<button class="btn-outline btn-sm">
|
|
131
|
-
<pds-icon icon="chat-circle" size="sm"></pds-icon>
|
|
132
|
-
Message
|
|
133
|
-
</button>
|
|
134
|
-
</article>
|
|
135
|
-
`)}
|
|
136
|
-
</pds-scrollrow>
|
|
137
|
-
</div>
|
|
138
|
-
`;
|
|
139
|
-
|
|
140
|
-
UserProfiles.storyName = 'User Profiles';
|
|
1
|
+
import { html } from 'lit';
|
|
2
|
+
|
|
3
|
+
const docsParameters = {
|
|
4
|
+
description: {
|
|
5
|
+
component: 'Horizontal scrolling container with navigation buttons'
|
|
6
|
+
}
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
if (typeof window !== 'undefined') {
|
|
10
|
+
import('../reference/reference-docs.js')
|
|
11
|
+
.then(({ createComponentDocsPage }) => {
|
|
12
|
+
docsParameters.page = createComponentDocsPage('pds-scrollrow');
|
|
13
|
+
})
|
|
14
|
+
.catch((error) => {
|
|
15
|
+
console.warn('storybook: docs page failed to load for pds-scrollrow', error);
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export default {
|
|
20
|
+
title: 'Components/Pds Scrollrow',
|
|
21
|
+
tags: ['autodocs', 'scrollrow', 'scroll', 'carousel', 'horizontal', 'overflow'],
|
|
22
|
+
parameters: {
|
|
23
|
+
pds: {
|
|
24
|
+
tags: ['scrollrow', 'scroll', 'carousel', 'horizontal', 'overflow', 'pds-scrollrow', 'layout']
|
|
25
|
+
},
|
|
26
|
+
docs: docsParameters
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export const Default = () => html`
|
|
31
|
+
<style>
|
|
32
|
+
.scrollrow-default-card {
|
|
33
|
+
min-width: 18.75rem;
|
|
34
|
+
}
|
|
35
|
+
</style>
|
|
36
|
+
<pds-scrollrow>
|
|
37
|
+
${Array.from({ length: 10 }, (_, i) => html`
|
|
38
|
+
<article class="card scrollrow-default-card">
|
|
39
|
+
<h4>Card ${i + 1}</h4>
|
|
40
|
+
<p>This is card content that scrolls horizontally.</p>
|
|
41
|
+
<button class="btn-primary">Action</button>
|
|
42
|
+
</article>
|
|
43
|
+
`)}
|
|
44
|
+
</pds-scrollrow>
|
|
45
|
+
`;
|
|
46
|
+
|
|
47
|
+
export const WithImages = () => html`
|
|
48
|
+
<style>
|
|
49
|
+
.scrollrow-image-card {
|
|
50
|
+
min-width: 18.75rem;
|
|
51
|
+
height: 12.5rem;
|
|
52
|
+
object-fit: cover;
|
|
53
|
+
border-radius: var(--radius-md);
|
|
54
|
+
}
|
|
55
|
+
</style>
|
|
56
|
+
<pds-scrollrow>
|
|
57
|
+
${Array.from({ length: 10 }, (_, i) => html`
|
|
58
|
+
<img
|
|
59
|
+
src="https://picsum.photos/300/200?random=${i}"
|
|
60
|
+
alt="Gallery image ${i + 1}"
|
|
61
|
+
class="scrollrow-image-card">
|
|
62
|
+
`)}
|
|
63
|
+
</pds-scrollrow>
|
|
64
|
+
`;
|
|
65
|
+
|
|
66
|
+
export const ProductGallery = () => html`
|
|
67
|
+
<style>
|
|
68
|
+
.scrollrow-product-wrap {
|
|
69
|
+
padding: var(--spacing-4);
|
|
70
|
+
}
|
|
71
|
+
.scrollrow-product-card {
|
|
72
|
+
min-width: 17.5rem;
|
|
73
|
+
}
|
|
74
|
+
.product-price {
|
|
75
|
+
font-size: 1.5rem; font-weight: 700; color: var(--color-primary);
|
|
76
|
+
}
|
|
77
|
+
.product-image {
|
|
78
|
+
width: 100%; height: 200px; object-fit: cover; border-radius: var(--radius-md); margin-bottom: var(--spacing-3);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
</style>
|
|
82
|
+
<div class="scrollrow-product-wrap">
|
|
83
|
+
<h3>Featured Products</h3>
|
|
84
|
+
<pds-scrollrow snap="start">
|
|
85
|
+
${Array.from({ length: 8 }, (_, i) => html`
|
|
86
|
+
<article class="card scrollrow-product-card">
|
|
87
|
+
<img
|
|
88
|
+
src="https://picsum.photos/280/200?random=${100 + i}"
|
|
89
|
+
alt="Product ${i + 1}"
|
|
90
|
+
class="product-image">
|
|
91
|
+
<h4>Product ${i + 1}</h4>
|
|
92
|
+
<small class="text-muted">Premium quality product with amazing features.</small>
|
|
93
|
+
<div class="flex justify-between align-center" >
|
|
94
|
+
<span class="product-price">$${(i + 1) * 10 + 29}</span>
|
|
95
|
+
<button class="btn-primary btn-sm">
|
|
96
|
+
<pds-icon icon="shopping-cart" size="sm"></pds-icon>
|
|
97
|
+
Add
|
|
98
|
+
</button>
|
|
99
|
+
</div>
|
|
100
|
+
</article>
|
|
101
|
+
`)}
|
|
102
|
+
</pds-scrollrow>
|
|
103
|
+
</div>
|
|
104
|
+
`;
|
|
105
|
+
|
|
106
|
+
ProductGallery.storyName = 'Product Gallery';
|
|
107
|
+
|
|
108
|
+
export const UserProfiles = () => html`
|
|
109
|
+
<style>
|
|
110
|
+
.avatar-lg {
|
|
111
|
+
width: 100px; height: 100px; border-radius: var(--radius-full); margin: 0 auto var(--spacing-3);
|
|
112
|
+
}
|
|
113
|
+
.scrollrow-profile-card {
|
|
114
|
+
min-width: 12.5rem;
|
|
115
|
+
text-align: center;
|
|
116
|
+
}
|
|
117
|
+
</style>
|
|
118
|
+
<div>
|
|
119
|
+
<h3>Team Members</h3>
|
|
120
|
+
<pds-scrollrow>
|
|
121
|
+
${Array.from({ length: 12 }, (_, i) => html`
|
|
122
|
+
<article class="card surface-elevated scrollrow-profile-card">
|
|
123
|
+
<img
|
|
124
|
+
src="https://i.pravatar.cc/150?img=${i + 1}"
|
|
125
|
+
alt="Team member ${i + 1}"
|
|
126
|
+
class="avatar-lg"
|
|
127
|
+
>
|
|
128
|
+
<h4 class="">Team Member ${i + 1}</h4>
|
|
129
|
+
<p><small class="text-muted">Role Title</small></p>
|
|
130
|
+
<button class="btn-outline btn-sm">
|
|
131
|
+
<pds-icon icon="chat-circle" size="sm"></pds-icon>
|
|
132
|
+
Message
|
|
133
|
+
</button>
|
|
134
|
+
</article>
|
|
135
|
+
`)}
|
|
136
|
+
</pds-scrollrow>
|
|
137
|
+
</div>
|
|
138
|
+
`;
|
|
139
|
+
|
|
140
|
+
UserProfiles.storyName = 'User Profiles';
|