@ukic/web-components 2.35.0 → 2.35.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/README.md +1 -0
- package/dist/cjs/ic-navigation-item.cjs.entry.js +1 -1
- package/dist/cjs/ic-navigation-item.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-toast.cjs.entry.js +2 -2
- package/dist/cjs/ic-toast.cjs.entry.js.map +1 -1
- package/dist/collection/components/ic-accordion/ic-accordion.stories.js +635 -0
- package/dist/collection/components/ic-alert/ic-alert.stories.js +257 -0
- package/dist/collection/components/ic-back-to-top/ic-back-to-top.stories.js +162 -0
- package/dist/collection/components/ic-badge/ic-badge.stories.js +1082 -0
- package/dist/collection/components/ic-breadcrumb-group/ic-breadcrumb-group.stories.js +502 -0
- package/dist/collection/components/ic-button/ic-button.stories.js +2218 -0
- package/dist/collection/components/ic-card/ic-card.stories.js +1034 -0
- package/dist/collection/components/ic-checkbox-group/ic-checkbox-group.stories.js +687 -0
- package/dist/collection/components/ic-chip/ic-chip.stories.js +670 -0
- package/dist/collection/components/ic-classification-banner/ic-classification-banner.stories.js +131 -0
- package/dist/collection/components/ic-data-entity/ic-data-entity.stories.js +487 -0
- package/dist/collection/components/ic-dialog/ic-dialog.stories.js +1256 -0
- package/dist/collection/components/ic-empty-state/ic-empty-state.stories.js +397 -0
- package/dist/collection/components/ic-footer/ic-footer.stories.js +383 -0
- package/dist/collection/components/ic-hero/ic-hero.stories.js +489 -0
- package/dist/collection/components/ic-link/ic-link.stories.js +114 -0
- package/dist/collection/components/ic-loading-indicator/ic-loading-indicator.stories.js +416 -0
- package/dist/collection/components/ic-navigation-item/ic-navigation-item.css +7 -35
- package/dist/collection/components/ic-page-header/ic-page-header.stories.js +557 -0
- package/dist/collection/components/ic-pagination/ic-pagination.stories.js +125 -0
- package/dist/collection/components/ic-popover-menu/ic-popover-menu.stories.js +486 -0
- package/dist/collection/components/ic-radio-group/ic-radio-group.stories.js +450 -0
- package/dist/collection/components/ic-search-bar/ic-search-bar.stories.js +591 -0
- package/dist/collection/components/ic-section-container/ic-section-container.stories.js +62 -0
- package/dist/collection/components/ic-select/ic-select-searchable.stories.js +953 -0
- package/dist/collection/components/ic-select/ic-select-single.stories.js +780 -0
- package/dist/collection/components/ic-side-navigation/ic-side-navigation.stories.js +2526 -0
- package/dist/collection/components/ic-skeleton/ic-skeleton.stories.js +141 -0
- package/dist/collection/components/ic-status-tag/ic-status-tag.stories.js +161 -0
- package/dist/collection/components/ic-stepper/ic-stepper.stories.js +327 -0
- package/dist/collection/components/ic-switch/ic-switch.stories.js +171 -0
- package/dist/collection/components/ic-tab-context/ic-tabs.stories.js +388 -0
- package/dist/collection/components/ic-text-field/ic-text-field.stories.js +1083 -0
- package/dist/collection/components/ic-theme/ic-theme.stories.js +171 -0
- package/dist/collection/components/ic-toast/ic-toast.js +2 -2
- package/dist/collection/components/ic-toast/ic-toast.js.map +1 -1
- package/dist/collection/components/ic-toast/ic-toast.stories.js +413 -0
- package/dist/collection/components/ic-toast/test/basic/ic-toast.spec.js +3 -3
- package/dist/collection/components/ic-toast/test/basic/ic-toast.spec.js.map +1 -1
- package/dist/collection/components/ic-toggle-button/ic-toggle-button.stories.js +537 -0
- package/dist/collection/components/ic-toggle-button-group/ic-toggle-button-group.stories.js +610 -0
- package/dist/collection/components/ic-tooltip/ic-tooltip.stories.js +356 -0
- package/dist/collection/components/ic-top-navigation/ic-top-navigation.stories.js +1083 -0
- package/dist/collection/components/ic-typography/ic-typography.stories.js +437 -0
- package/dist/collection/patterns/top-nav-content-footer.stories.js +109 -0
- package/dist/collection/patterns/z-index.stories.js +474 -0
- package/dist/components/ic-navigation-item.js +1 -1
- package/dist/components/ic-navigation-item.js.map +1 -1
- package/dist/components/ic-toast.js +2 -2
- package/dist/components/ic-toast.js.map +1 -1
- package/dist/core/core.esm.js +1 -1
- package/dist/core/p-3e8023ff.entry.js +2 -0
- package/dist/core/p-3e8023ff.entry.js.map +1 -0
- package/dist/core/{p-7e8a4abd.entry.js → p-bfaa257c.entry.js} +2 -2
- package/dist/core/{p-7e8a4abd.entry.js.map → p-bfaa257c.entry.js.map} +1 -1
- package/dist/esm/ic-navigation-item.entry.js +1 -1
- package/dist/esm/ic-navigation-item.entry.js.map +1 -1
- package/dist/esm/ic-toast.entry.js +2 -2
- package/dist/esm/ic-toast.entry.js.map +1 -1
- package/hydrate/index.js +3 -3
- package/package.json +15 -11
- package/dist/core/p-dfb3e76e.entry.js +0 -2
- package/dist/core/p-dfb3e76e.entry.js.map +0 -1
@@ -0,0 +1,635 @@
|
|
1
|
+
import { html } from "lit-html";
|
2
|
+
|
3
|
+
const defaultArgs = {
|
4
|
+
accessibleButtonLabel: "accordions",
|
5
|
+
appearance: "default",
|
6
|
+
expanded: false,
|
7
|
+
groupTitle: "Accordion group",
|
8
|
+
singleExpansion: false,
|
9
|
+
size: "default",
|
10
|
+
disabled: false,
|
11
|
+
expandedAccordion: false,
|
12
|
+
heading: "Accordion 1",
|
13
|
+
message: "This is an example of the main body text.",
|
14
|
+
sizeAccordion: "default",
|
15
|
+
};
|
16
|
+
|
17
|
+
export default {
|
18
|
+
title: "Web Components/Accordion",
|
19
|
+
component: "ic-accordion",
|
20
|
+
};
|
21
|
+
|
22
|
+
export const Default = {
|
23
|
+
render: () =>
|
24
|
+
html` <ic-accordion heading="Accordion 1">
|
25
|
+
<ic-typography variant="body">
|
26
|
+
This is an example of the main body text.
|
27
|
+
</ic-typography>
|
28
|
+
</ic-accordion>
|
29
|
+
<ic-accordion heading="Accordion 2">
|
30
|
+
<ic-typography variant="body">
|
31
|
+
This is an example of the main body text.
|
32
|
+
</ic-typography>
|
33
|
+
</ic-accordion>`,
|
34
|
+
|
35
|
+
name: "Default",
|
36
|
+
};
|
37
|
+
|
38
|
+
export const Expanded = {
|
39
|
+
render: () =>
|
40
|
+
html` <ic-accordion expanded="true" heading="Accordion 1">
|
41
|
+
<ic-typography variant="body">
|
42
|
+
This is an example of the main body text.
|
43
|
+
</ic-typography>
|
44
|
+
</ic-accordion>
|
45
|
+
<ic-accordion heading="Accordion 2">
|
46
|
+
<ic-typography variant="body">
|
47
|
+
This is an example of the main body text.
|
48
|
+
</ic-typography>
|
49
|
+
</ic-accordion>`,
|
50
|
+
|
51
|
+
name: "Expanded",
|
52
|
+
};
|
53
|
+
|
54
|
+
export const Icon = {
|
55
|
+
render: () =>
|
56
|
+
html` <ic-accordion heading="Accordion 1">
|
57
|
+
<svg
|
58
|
+
slot="icon"
|
59
|
+
width="20"
|
60
|
+
height="1em"
|
61
|
+
viewBox="0 0 512 512"
|
62
|
+
fill="currentColor"
|
63
|
+
xmlns="http://www.w3.org/2000/svg"
|
64
|
+
>
|
65
|
+
<path
|
66
|
+
d="M362.7 19.3L314.3 67.7 444.3 197.7l48.4-48.4c25-25 25-65.5 0-90.5L453.3 19.3c-25-25-65.5-25-90.5 0zm-71 71L58.6 323.5c-10.4 10.4-18 23.3-22.2 37.4L1 481.2C-1.5 489.7 .8 498.8 7 505s15.3 8.5 23.7 6.1l120.3-35.4c14.1-4.2 27-11.8 37.4-22.2L421.7 220.3 291.7 90.3z"
|
67
|
+
/>
|
68
|
+
</svg>
|
69
|
+
<ic-typography variant="body">
|
70
|
+
This is an example of the main body text
|
71
|
+
</ic-typography>
|
72
|
+
</ic-accordion>
|
73
|
+
<ic-accordion heading="Accordion 2">
|
74
|
+
<svg
|
75
|
+
slot="icon"
|
76
|
+
width="20"
|
77
|
+
height="1em"
|
78
|
+
viewBox="0 0 512 512"
|
79
|
+
fill="currentColor"
|
80
|
+
xmlns="http://www.w3.org/2000/svg"
|
81
|
+
>
|
82
|
+
<path
|
83
|
+
d="M362.7 19.3L314.3 67.7 444.3 197.7l48.4-48.4c25-25 25-65.5 0-90.5L453.3 19.3c-25-25-65.5-25-90.5 0zm-71 71L58.6 323.5c-10.4 10.4-18 23.3-22.2 37.4L1 481.2C-1.5 489.7 .8 498.8 7 505s15.3 8.5 23.7 6.1l120.3-35.4c14.1-4.2 27-11.8 37.4-22.2L421.7 220.3 291.7 90.3z"
|
84
|
+
/>
|
85
|
+
</svg>
|
86
|
+
<ic-typography variant="body">
|
87
|
+
This is an example of the main body text
|
88
|
+
</ic-typography>
|
89
|
+
</ic-accordion>`,
|
90
|
+
|
91
|
+
name: "Icon",
|
92
|
+
};
|
93
|
+
|
94
|
+
export const GroupTitle = {
|
95
|
+
render: () =>
|
96
|
+
html` <ic-accordion-group group-title="Title of the Accordion Group">
|
97
|
+
<ic-accordion heading="Accordion 1">
|
98
|
+
<svg
|
99
|
+
slot="icon"
|
100
|
+
width="20"
|
101
|
+
height="1em"
|
102
|
+
viewBox="0 0 512 512"
|
103
|
+
fill="currentColor"
|
104
|
+
xmlns="http://www.w3.org/2000/svg"
|
105
|
+
>
|
106
|
+
<path
|
107
|
+
d="M362.7 19.3L314.3 67.7 444.3 197.7l48.4-48.4c25-25 25-65.5 0-90.5L453.3 19.3c-25-25-65.5-25-90.5 0zm-71 71L58.6 323.5c-10.4 10.4-18 23.3-22.2 37.4L1 481.2C-1.5 489.7 .8 498.8 7 505s15.3 8.5 23.7 6.1l120.3-35.4c14.1-4.2 27-11.8 37.4-22.2L421.7 220.3 291.7 90.3z"
|
108
|
+
/>
|
109
|
+
</svg>
|
110
|
+
<ic-typography variant="body">
|
111
|
+
This is an example of the main body text
|
112
|
+
</ic-typography>
|
113
|
+
</ic-accordion>
|
114
|
+
<ic-accordion heading="Accordion 2">
|
115
|
+
<svg
|
116
|
+
slot="icon"
|
117
|
+
width="20"
|
118
|
+
height="1em"
|
119
|
+
viewBox="0 0 512 512"
|
120
|
+
fill="currentColor"
|
121
|
+
xmlns="http://www.w3.org/2000/svg"
|
122
|
+
>
|
123
|
+
<path
|
124
|
+
d="M362.7 19.3L314.3 67.7 444.3 197.7l48.4-48.4c25-25 25-65.5 0-90.5L453.3 19.3c-25-25-65.5-25-90.5 0zm-71 71L58.6 323.5c-10.4 10.4-18 23.3-22.2 37.4L1 481.2C-1.5 489.7 .8 498.8 7 505s15.3 8.5 23.7 6.1l120.3-35.4c14.1-4.2 27-11.8 37.4-22.2L421.7 220.3 291.7 90.3z"
|
125
|
+
/>
|
126
|
+
</svg>
|
127
|
+
<ic-typography variant="body">
|
128
|
+
This is an example of the main body text
|
129
|
+
</ic-typography>
|
130
|
+
</ic-accordion>
|
131
|
+
</ic-accordion-group>`,
|
132
|
+
|
133
|
+
name: "Group Title",
|
134
|
+
};
|
135
|
+
|
136
|
+
export const Sizes = {
|
137
|
+
render: () =>
|
138
|
+
html` <ic-accordion-group group-title="Small Accordion Group" size="small">
|
139
|
+
<ic-accordion heading="Accordion 1">
|
140
|
+
<svg
|
141
|
+
slot="icon"
|
142
|
+
width="20"
|
143
|
+
height="1em"
|
144
|
+
viewBox="0 0 512 512"
|
145
|
+
fill="currentColor"
|
146
|
+
xmlns="http://www.w3.org/2000/svg"
|
147
|
+
>
|
148
|
+
<path
|
149
|
+
d="M362.7 19.3L314.3 67.7 444.3 197.7l48.4-48.4c25-25 25-65.5 0-90.5L453.3 19.3c-25-25-65.5-25-90.5 0zm-71 71L58.6 323.5c-10.4 10.4-18 23.3-22.2 37.4L1 481.2C-1.5 489.7 .8 498.8 7 505s15.3 8.5 23.7 6.1l120.3-35.4c14.1-4.2 27-11.8 37.4-22.2L421.7 220.3 291.7 90.3z"
|
150
|
+
/>
|
151
|
+
</svg>
|
152
|
+
<ic-typography variant="body">
|
153
|
+
This is an example of the main body text
|
154
|
+
</ic-typography>
|
155
|
+
</ic-accordion>
|
156
|
+
<ic-accordion heading="Accordion 2">
|
157
|
+
<svg
|
158
|
+
slot="icon"
|
159
|
+
width="20"
|
160
|
+
height="1em"
|
161
|
+
viewBox="0 0 512 512"
|
162
|
+
fill="currentColor"
|
163
|
+
xmlns="http://www.w3.org/2000/svg"
|
164
|
+
>
|
165
|
+
<path
|
166
|
+
d="M362.7 19.3L314.3 67.7 444.3 197.7l48.4-48.4c25-25 25-65.5 0-90.5L453.3 19.3c-25-25-65.5-25-90.5 0zm-71 71L58.6 323.5c-10.4 10.4-18 23.3-22.2 37.4L1 481.2C-1.5 489.7 .8 498.8 7 505s15.3 8.5 23.7 6.1l120.3-35.4c14.1-4.2 27-11.8 37.4-22.2L421.7 220.3 291.7 90.3z"
|
167
|
+
/>
|
168
|
+
</svg>
|
169
|
+
<ic-typography variant="body">
|
170
|
+
This is an example of the main body text
|
171
|
+
</ic-typography>
|
172
|
+
</ic-accordion>
|
173
|
+
</ic-accordion-group>
|
174
|
+
<ic-accordion-group group-title="Default Accordion Group" size="default">
|
175
|
+
<ic-accordion heading="Accordion 1">
|
176
|
+
<svg
|
177
|
+
slot="icon"
|
178
|
+
width="20"
|
179
|
+
height="1em"
|
180
|
+
viewBox="0 0 512 512"
|
181
|
+
fill="currentColor"
|
182
|
+
xmlns="http://www.w3.org/2000/svg"
|
183
|
+
>
|
184
|
+
<path
|
185
|
+
d="M362.7 19.3L314.3 67.7 444.3 197.7l48.4-48.4c25-25 25-65.5 0-90.5L453.3 19.3c-25-25-65.5-25-90.5 0zm-71 71L58.6 323.5c-10.4 10.4-18 23.3-22.2 37.4L1 481.2C-1.5 489.7 .8 498.8 7 505s15.3 8.5 23.7 6.1l120.3-35.4c14.1-4.2 27-11.8 37.4-22.2L421.7 220.3 291.7 90.3z"
|
186
|
+
/>
|
187
|
+
</svg>
|
188
|
+
<ic-typography variant="body">
|
189
|
+
This is an example of the main body text
|
190
|
+
</ic-typography>
|
191
|
+
</ic-accordion>
|
192
|
+
<ic-accordion heading="Accordion 2">
|
193
|
+
<svg
|
194
|
+
slot="icon"
|
195
|
+
width="20"
|
196
|
+
height="1em"
|
197
|
+
viewBox="0 0 512 512"
|
198
|
+
fill="currentColor"
|
199
|
+
xmlns="http://www.w3.org/2000/svg"
|
200
|
+
>
|
201
|
+
<path
|
202
|
+
d="M362.7 19.3L314.3 67.7 444.3 197.7l48.4-48.4c25-25 25-65.5 0-90.5L453.3 19.3c-25-25-65.5-25-90.5 0zm-71 71L58.6 323.5c-10.4 10.4-18 23.3-22.2 37.4L1 481.2C-1.5 489.7 .8 498.8 7 505s15.3 8.5 23.7 6.1l120.3-35.4c14.1-4.2 27-11.8 37.4-22.2L421.7 220.3 291.7 90.3z"
|
203
|
+
/>
|
204
|
+
</svg>
|
205
|
+
<ic-typography variant="body">
|
206
|
+
This is an example of the main body text
|
207
|
+
</ic-typography>
|
208
|
+
</ic-accordion>
|
209
|
+
</ic-accordion-group>
|
210
|
+
<ic-accordion-group group-title="Large Accordion Group" size="large">
|
211
|
+
<ic-accordion heading="Accordion 1">
|
212
|
+
<svg
|
213
|
+
slot="icon"
|
214
|
+
width="20"
|
215
|
+
height="1em"
|
216
|
+
viewBox="0 0 512 512"
|
217
|
+
fill="currentColor"
|
218
|
+
xmlns="http://www.w3.org/2000/svg"
|
219
|
+
>
|
220
|
+
<path
|
221
|
+
d="M362.7 19.3L314.3 67.7 444.3 197.7l48.4-48.4c25-25 25-65.5 0-90.5L453.3 19.3c-25-25-65.5-25-90.5 0zm-71 71L58.6 323.5c-10.4 10.4-18 23.3-22.2 37.4L1 481.2C-1.5 489.7 .8 498.8 7 505s15.3 8.5 23.7 6.1l120.3-35.4c14.1-4.2 27-11.8 37.4-22.2L421.7 220.3 291.7 90.3z"
|
222
|
+
/>
|
223
|
+
</svg>
|
224
|
+
<ic-typography variant="body">
|
225
|
+
This is an example of the main body text
|
226
|
+
</ic-typography>
|
227
|
+
</ic-accordion>
|
228
|
+
<ic-accordion heading="Accordion 2">
|
229
|
+
<svg
|
230
|
+
slot="icon"
|
231
|
+
width="20"
|
232
|
+
height="1em"
|
233
|
+
viewBox="0 0 512 512"
|
234
|
+
fill="currentColor"
|
235
|
+
xmlns="http://www.w3.org/2000/svg"
|
236
|
+
>
|
237
|
+
<path
|
238
|
+
d="M362.7 19.3L314.3 67.7 444.3 197.7l48.4-48.4c25-25 25-65.5 0-90.5L453.3 19.3c-25-25-65.5-25-90.5 0zm-71 71L58.6 323.5c-10.4 10.4-18 23.3-22.2 37.4L1 481.2C-1.5 489.7 .8 498.8 7 505s15.3 8.5 23.7 6.1l120.3-35.4c14.1-4.2 27-11.8 37.4-22.2L421.7 220.3 291.7 90.3z"
|
239
|
+
/>
|
240
|
+
</svg>
|
241
|
+
<ic-typography variant="body">
|
242
|
+
This is an example of the main body text
|
243
|
+
</ic-typography>
|
244
|
+
</ic-accordion>
|
245
|
+
</ic-accordion-group>`,
|
246
|
+
|
247
|
+
name: "Sizes",
|
248
|
+
};
|
249
|
+
|
250
|
+
export const SingleExpansion = {
|
251
|
+
render: () =>
|
252
|
+
html` <ic-accordion-group
|
253
|
+
group-title="Title of the Accordion Group"
|
254
|
+
single-expansion="true"
|
255
|
+
>
|
256
|
+
<ic-accordion heading="Accordion 1">
|
257
|
+
<svg
|
258
|
+
slot="icon"
|
259
|
+
width="20"
|
260
|
+
height="1em"
|
261
|
+
viewBox="0 0 512 512"
|
262
|
+
fill="currentColor"
|
263
|
+
xmlns="http://www.w3.org/2000/svg"
|
264
|
+
>
|
265
|
+
<path
|
266
|
+
d="M362.7 19.3L314.3 67.7 444.3 197.7l48.4-48.4c25-25 25-65.5 0-90.5L453.3 19.3c-25-25-65.5-25-90.5 0zm-71 71L58.6 323.5c-10.4 10.4-18 23.3-22.2 37.4L1 481.2C-1.5 489.7 .8 498.8 7 505s15.3 8.5 23.7 6.1l120.3-35.4c14.1-4.2 27-11.8 37.4-22.2L421.7 220.3 291.7 90.3z"
|
267
|
+
/>
|
268
|
+
</svg>
|
269
|
+
<ic-typography variant="body">
|
270
|
+
This is an example of the main body text
|
271
|
+
</ic-typography>
|
272
|
+
</ic-accordion>
|
273
|
+
<ic-accordion heading="Accordion 2">
|
274
|
+
<svg
|
275
|
+
slot="icon"
|
276
|
+
width="20"
|
277
|
+
height="1em"
|
278
|
+
viewBox="0 0 512 512"
|
279
|
+
fill="currentColor"
|
280
|
+
xmlns="http://www.w3.org/2000/svg"
|
281
|
+
>
|
282
|
+
<path
|
283
|
+
d="M362.7 19.3L314.3 67.7 444.3 197.7l48.4-48.4c25-25 25-65.5 0-90.5L453.3 19.3c-25-25-65.5-25-90.5 0zm-71 71L58.6 323.5c-10.4 10.4-18 23.3-22.2 37.4L1 481.2C-1.5 489.7 .8 498.8 7 505s15.3 8.5 23.7 6.1l120.3-35.4c14.1-4.2 27-11.8 37.4-22.2L421.7 220.3 291.7 90.3z"
|
284
|
+
/>
|
285
|
+
</svg>
|
286
|
+
<ic-typography variant="body">
|
287
|
+
This is an example of the main body text
|
288
|
+
</ic-typography>
|
289
|
+
</ic-accordion>
|
290
|
+
</ic-accordion-group>`,
|
291
|
+
|
292
|
+
name: "Single expansion",
|
293
|
+
};
|
294
|
+
|
295
|
+
export const LightText = {
|
296
|
+
render: () =>
|
297
|
+
html` <ic-accordion-group
|
298
|
+
group-title="Title of the Accordion Group"
|
299
|
+
appearance="light"
|
300
|
+
>
|
301
|
+
<ic-accordion heading="Accordion 1">
|
302
|
+
<svg
|
303
|
+
slot="icon"
|
304
|
+
width="20"
|
305
|
+
height="1em"
|
306
|
+
viewBox="0 0 512 512"
|
307
|
+
fill="currentColor"
|
308
|
+
xmlns="http://www.w3.org/2000/svg"
|
309
|
+
>
|
310
|
+
<path
|
311
|
+
d="M362.7 19.3L314.3 67.7 444.3 197.7l48.4-48.4c25-25 25-65.5 0-90.5L453.3 19.3c-25-25-65.5-25-90.5 0zm-71 71L58.6 323.5c-10.4 10.4-18 23.3-22.2 37.4L1 481.2C-1.5 489.7 .8 498.8 7 505s15.3 8.5 23.7 6.1l120.3-35.4c14.1-4.2 27-11.8 37.4-22.2L421.7 220.3 291.7 90.3z"
|
312
|
+
/>
|
313
|
+
</svg>
|
314
|
+
<ic-typography variant="body">
|
315
|
+
This is an example of the main body text
|
316
|
+
</ic-typography>
|
317
|
+
</ic-accordion>
|
318
|
+
<ic-accordion heading="Accordion 2">
|
319
|
+
<svg
|
320
|
+
slot="icon"
|
321
|
+
width="20"
|
322
|
+
height="1em"
|
323
|
+
viewBox="0 0 512 512"
|
324
|
+
fill="currentColor"
|
325
|
+
xmlns="http://www.w3.org/2000/svg"
|
326
|
+
>
|
327
|
+
<path
|
328
|
+
d="M362.7 19.3L314.3 67.7 444.3 197.7l48.4-48.4c25-25 25-65.5 0-90.5L453.3 19.3c-25-25-65.5-25-90.5 0zm-71 71L58.6 323.5c-10.4 10.4-18 23.3-22.2 37.4L1 481.2C-1.5 489.7 .8 498.8 7 505s15.3 8.5 23.7 6.1l120.3-35.4c14.1-4.2 27-11.8 37.4-22.2L421.7 220.3 291.7 90.3z"
|
329
|
+
/>
|
330
|
+
</svg>
|
331
|
+
<ic-typography variant="body">
|
332
|
+
This is an example of the main body text
|
333
|
+
</ic-typography>
|
334
|
+
</ic-accordion>
|
335
|
+
</ic-accordion-group>`,
|
336
|
+
|
337
|
+
name: "Light text",
|
338
|
+
|
339
|
+
parameters: {
|
340
|
+
backgrounds: {
|
341
|
+
default: "dark",
|
342
|
+
},
|
343
|
+
},
|
344
|
+
};
|
345
|
+
|
346
|
+
export const Parent = {
|
347
|
+
render: () =>
|
348
|
+
html` <ic-accordion-group group-title="Title of the Accordion Group">
|
349
|
+
<ic-accordion heading="Accordion 1">
|
350
|
+
<ic-typography variant="body">
|
351
|
+
This is an example of the main body text
|
352
|
+
</ic-typography>
|
353
|
+
</ic-accordion>
|
354
|
+
<ic-accordion heading="Accordion 2">
|
355
|
+
<ic-accordion heading="Child Accordion 1">
|
356
|
+
<ic-typography variant="body">
|
357
|
+
This is an example of the child main body text
|
358
|
+
</ic-typography>
|
359
|
+
</ic-accordion>
|
360
|
+
<ic-accordion heading="Child Accordion 2">
|
361
|
+
<ic-typography variant="body">
|
362
|
+
This is an example of the child main body text
|
363
|
+
</ic-typography>
|
364
|
+
</ic-accordion>
|
365
|
+
<ic-accordion heading="Child Accordion 3">
|
366
|
+
<ic-typography variant="body">
|
367
|
+
This is an example of the child main body text
|
368
|
+
</ic-typography>
|
369
|
+
</ic-accordion>
|
370
|
+
</ic-accordion>
|
371
|
+
</ic-accordion-group>`,
|
372
|
+
|
373
|
+
name: "Parent",
|
374
|
+
};
|
375
|
+
|
376
|
+
export const Disabled = {
|
377
|
+
render: () =>
|
378
|
+
html` <ic-accordion heading="Accordion 1">
|
379
|
+
<ic-typography variant="body">
|
380
|
+
This is an example of the main body text.
|
381
|
+
</ic-typography>
|
382
|
+
</ic-accordion>
|
383
|
+
<ic-accordion heading="Accordion 2" disabled>
|
384
|
+
<ic-typography variant="body">
|
385
|
+
This is an example of the main body text.
|
386
|
+
</ic-typography>
|
387
|
+
</ic-accordion>
|
388
|
+
<ic-accordion heading="Accordion 3">
|
389
|
+
<ic-typography variant="body">
|
390
|
+
This is an example of the main body text.
|
391
|
+
</ic-typography>
|
392
|
+
</ic-accordion>`,
|
393
|
+
|
394
|
+
name: "Disabled",
|
395
|
+
};
|
396
|
+
|
397
|
+
export const WithPopoverContent = {
|
398
|
+
render: () => html`
|
399
|
+
<ic-accordion heading="With Select">
|
400
|
+
<ic-select
|
401
|
+
id="select-1"
|
402
|
+
label="What is your favourite coffee?"
|
403
|
+
></ic-select>
|
404
|
+
<ic-button id="set-content-btn">Set Content</ic-button>
|
405
|
+
<div id="extra-content" style="width: 50px"></div>
|
406
|
+
</ic-accordion>
|
407
|
+
<ic-accordion heading="With Tooltip">
|
408
|
+
<ic-tooltip
|
409
|
+
label="This is a description of the button"
|
410
|
+
target="test-button-default"
|
411
|
+
>
|
412
|
+
<button
|
413
|
+
id="test-button-default"
|
414
|
+
aria-describedby="ic-tooltip-test-button-default"
|
415
|
+
>
|
416
|
+
Default
|
417
|
+
</button>
|
418
|
+
</ic-tooltip>
|
419
|
+
</ic-accordion>
|
420
|
+
<ic-accordion heading="With Search Bar">
|
421
|
+
<ic-search-bar label="What is your favourite coffee?"></ic-search-bar>
|
422
|
+
</ic-accordion>
|
423
|
+
<ic-accordion heading="With Popover Menu">
|
424
|
+
<ic-popover-menu anchor="button-1" aria-label="popover">
|
425
|
+
<ic-menu-item label="Copy code" disabled="true"></ic-menu-item>
|
426
|
+
<ic-menu-group label="View">
|
427
|
+
<ic-menu-item label="Zoom in" keyboard-shortcut="Cmd+"></ic-menu-item>
|
428
|
+
<ic-menu-item
|
429
|
+
label="Zoom out"
|
430
|
+
keyboard-shortcut="Cmd-"
|
431
|
+
></ic-menu-item>
|
432
|
+
</ic-menu-group>
|
433
|
+
<ic-menu-item label="Actions" submenu-trigger-for="abc"></ic-menu-item>
|
434
|
+
<ic-menu-item
|
435
|
+
label="Logout"
|
436
|
+
variant="destructive"
|
437
|
+
disabled="true"
|
438
|
+
></ic-menu-item>
|
439
|
+
</ic-popover-menu>
|
440
|
+
<ic-popover-menu submenu-id="abc">
|
441
|
+
<ic-menu-item label="Edit"></ic-menu-item>
|
442
|
+
<ic-menu-item label="Find" submenu-trigger-for="abc123"></ic-menu-item>
|
443
|
+
<ic-menu-item label="Delete" variant="destructive"></ic-menu-item>
|
444
|
+
</ic-popover-menu>
|
445
|
+
<ic-popover-menu submenu-id="abc123">
|
446
|
+
<ic-menu-item
|
447
|
+
disabled="true"
|
448
|
+
label="Search the web"
|
449
|
+
description="This will search the web to find the thing you are looking for."
|
450
|
+
></ic-menu-item>
|
451
|
+
<ic-menu-item label="Find..."></ic-menu-item>
|
452
|
+
<ic-menu-item label="Find icons">
|
453
|
+
<svg
|
454
|
+
slot="icon"
|
455
|
+
xmlns="http://www.w3.org/2000/svg"
|
456
|
+
height="24px"
|
457
|
+
viewBox="0 0 24 24"
|
458
|
+
width="24px"
|
459
|
+
>
|
460
|
+
<path d="M0 0h24v24H0V0z" fill="none" />
|
461
|
+
<path
|
462
|
+
d="M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"
|
463
|
+
/>
|
464
|
+
</svg>
|
465
|
+
</ic-menu-item>
|
466
|
+
<ic-menu-item
|
467
|
+
label="Show found results"
|
468
|
+
variant="toggle"
|
469
|
+
></ic-menu-item>
|
470
|
+
</ic-popover-menu>
|
471
|
+
<ic-button id="button-1" onclick="buttonClick()">Show popover</ic-button>
|
472
|
+
</ic-accordion>
|
473
|
+
<ic-button id="with-dialog">With Dialog</ic-button>
|
474
|
+
<ic-dialog
|
475
|
+
heading="This is a medium dialog"
|
476
|
+
label="medium"
|
477
|
+
size="medium"
|
478
|
+
id="medium-dialog"
|
479
|
+
>
|
480
|
+
<ic-typography>
|
481
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
|
482
|
+
tempor incididunt ut labore et dolore magna aliqua.
|
483
|
+
</ic-typography>
|
484
|
+
<ic-typography>
|
485
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
|
486
|
+
tempor incididunt ut labore et dolore magna aliqua.
|
487
|
+
</ic-typography>
|
488
|
+
<ic-accordion heading="Internal 1">
|
489
|
+
<ic-typography>
|
490
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do
|
491
|
+
eiusmod tempor incididunt ut labore et dolore magna aliqua.
|
492
|
+
</ic-typography>
|
493
|
+
<ic-select
|
494
|
+
id="select-2"
|
495
|
+
label="What is your favourite coffee?"
|
496
|
+
></ic-select>
|
497
|
+
</ic-accordion>
|
498
|
+
<ic-accordion heading="Internal 2">
|
499
|
+
<ic-typography>
|
500
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do
|
501
|
+
eiusmod tempor incididunt ut labore et dolore magna aliqua.
|
502
|
+
</ic-typography>
|
503
|
+
<ic-button>Click</ic-button>
|
504
|
+
</ic-accordion>
|
505
|
+
</ic-dialog>
|
506
|
+
<script>
|
507
|
+
document.querySelector("#with-dialog").addEventListener("click", () => {
|
508
|
+
document.querySelector("#medium-dialog").showDialog();
|
509
|
+
});
|
510
|
+
document.querySelector("#select-1").options = [
|
511
|
+
{ label: "Cappuccino", value: "Cap" },
|
512
|
+
{ label: "Latte", value: "Lat" },
|
513
|
+
{ label: "Americano", value: "Ame" },
|
514
|
+
];
|
515
|
+
document.querySelector("#select-2").options = [
|
516
|
+
{ label: "Cappuccino", value: "Cap" },
|
517
|
+
{ label: "Latte", value: "Lat" },
|
518
|
+
{ label: "Americano", value: "Ame" },
|
519
|
+
];
|
520
|
+
document.querySelector("ic-search-bar").options = [
|
521
|
+
{ label: "Espresso", value: "espresso" },
|
522
|
+
{ label: "Double Espresso", value: "doubleespresso" },
|
523
|
+
{ label: "Flat White", value: "flatwhite" },
|
524
|
+
{ label: "Cappuccino", value: "cappuccino" },
|
525
|
+
{ label: "Americano", value: "americano" },
|
526
|
+
{ label: "Ameno", value: "ameno" },
|
527
|
+
{ label: "Aicano", value: "acano" },
|
528
|
+
{ label: "Mocha", value: "mocha" },
|
529
|
+
];
|
530
|
+
var icPopover = document.querySelector("ic-popover-menu");
|
531
|
+
function buttonClick() {
|
532
|
+
icPopover.open = true;
|
533
|
+
}
|
534
|
+
document
|
535
|
+
.querySelector("#set-content-btn")
|
536
|
+
.addEventListener("click", () => {
|
537
|
+
document.querySelector("#extra-content").innerHTML =
|
538
|
+
"This is a very very very lon sentence which should appear below without any issues";
|
539
|
+
});
|
540
|
+
</script>
|
541
|
+
`,
|
542
|
+
|
543
|
+
name: "With popover content",
|
544
|
+
};
|
545
|
+
|
546
|
+
export const SlottedHeadings = {
|
547
|
+
render: () =>
|
548
|
+
html`<ic-accordion-group>
|
549
|
+
<ic-typography variant="h4" slot="group-title">
|
550
|
+
Slotted group title
|
551
|
+
</ic-typography>
|
552
|
+
<ic-accordion>
|
553
|
+
<ic-typography variant="h5" slot="heading">
|
554
|
+
Slotted heading
|
555
|
+
</ic-typography>
|
556
|
+
<ic-typography variant="body">
|
557
|
+
This is an example of the main body text.
|
558
|
+
</ic-typography>
|
559
|
+
</ic-accordion>
|
560
|
+
<ic-accordion heading="Accordion 2">
|
561
|
+
<ic-typography variant="body">
|
562
|
+
This is an example of the main body text.
|
563
|
+
</ic-typography>
|
564
|
+
</ic-accordion>
|
565
|
+
</ic-accordion-group>`,
|
566
|
+
|
567
|
+
name: "Slotted headings",
|
568
|
+
};
|
569
|
+
|
570
|
+
export const Playground = {
|
571
|
+
render: (args) =>
|
572
|
+
html`<ic-accordion-group
|
573
|
+
accessible-button-label=${args.accessibleButtonLabel}
|
574
|
+
group-title=${args.groupTitle}
|
575
|
+
expanded=${args.expanded}
|
576
|
+
single-expansion=${args.singleExpansion}
|
577
|
+
size=${args.size}
|
578
|
+
appearance=${args.appearance}
|
579
|
+
>
|
580
|
+
<ic-accordion
|
581
|
+
heading=${args.heading}
|
582
|
+
disabled=${args.disabled}
|
583
|
+
expanded=${args.expandedAccordion}
|
584
|
+
size=${args.sizeAccordion}
|
585
|
+
message=${args.message}
|
586
|
+
>
|
587
|
+
</ic-accordion>
|
588
|
+
<ic-accordion heading="Accordion 2">
|
589
|
+
<svg
|
590
|
+
slot="icon"
|
591
|
+
width="20"
|
592
|
+
height="1em"
|
593
|
+
viewBox="0 0 512 512"
|
594
|
+
fill="currentColor"
|
595
|
+
xmlns="http://www.w3.org/2000/svg"
|
596
|
+
>
|
597
|
+
<path
|
598
|
+
d="M362.7 19.3L314.3 67.7 444.3 197.7l48.4-48.4c25-25 25-65.5 0-90.5L453.3 19.3c-25-25-65.5-25-90.5 0zm-71 71L58.6 323.5c-10.4 10.4-18 23.3-22.2 37.4L1 481.2C-1.5 489.7 .8 498.8 7 505s15.3 8.5 23.7 6.1l120.3-35.4c14.1-4.2 27-11.8 37.4-22.2L421.7 220.3 291.7 90.3z"
|
599
|
+
/>
|
600
|
+
</svg>
|
601
|
+
<ic-typography variant="body">
|
602
|
+
This is an example of the main body text
|
603
|
+
</ic-typography>
|
604
|
+
</ic-accordion>
|
605
|
+
</ic-accordion-group>`,
|
606
|
+
|
607
|
+
args: defaultArgs,
|
608
|
+
name: "Playground",
|
609
|
+
|
610
|
+
argTypes: {
|
611
|
+
appearance: {
|
612
|
+
options: ["dark", "default", "light"],
|
613
|
+
|
614
|
+
control: {
|
615
|
+
type: "radio",
|
616
|
+
},
|
617
|
+
},
|
618
|
+
|
619
|
+
size: {
|
620
|
+
options: ["small", "default", "large"],
|
621
|
+
|
622
|
+
control: {
|
623
|
+
type: "radio",
|
624
|
+
},
|
625
|
+
},
|
626
|
+
|
627
|
+
sizeAccordion: {
|
628
|
+
options: ["small", "default", "large"],
|
629
|
+
|
630
|
+
control: {
|
631
|
+
type: "radio",
|
632
|
+
},
|
633
|
+
},
|
634
|
+
},
|
635
|
+
};
|