@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,557 @@
|
|
1
|
+
import { html } from "lit-html";
|
2
|
+
|
3
|
+
export default {
|
4
|
+
title: "Web Components/Page header",
|
5
|
+
component: "ic-page-header",
|
6
|
+
|
7
|
+
parameters: {
|
8
|
+
layout: "fullscreen",
|
9
|
+
},
|
10
|
+
};
|
11
|
+
|
12
|
+
export const HeadingWithAdornment = {
|
13
|
+
render: () => html`
|
14
|
+
<ic-page-header heading="Page header">
|
15
|
+
<ic-status-tag slot="heading-adornment" label="Beta"></ic-status-tag>
|
16
|
+
</ic-page-header>
|
17
|
+
`,
|
18
|
+
|
19
|
+
name: "Heading with adornment",
|
20
|
+
};
|
21
|
+
|
22
|
+
export const LeftAligned = {
|
23
|
+
render: () => html`
|
24
|
+
<ic-page-header
|
25
|
+
aligned="left"
|
26
|
+
heading="Page header"
|
27
|
+
subheading="This is a simple page header component and this is the text."
|
28
|
+
>
|
29
|
+
<ic-status-tag slot="heading-adornment" label="Beta"></ic-status-tag>
|
30
|
+
</ic-page-header>
|
31
|
+
`,
|
32
|
+
|
33
|
+
name: "Left aligned",
|
34
|
+
};
|
35
|
+
|
36
|
+
export const Small = {
|
37
|
+
render: () => html`
|
38
|
+
<ic-page-header
|
39
|
+
aligned="left"
|
40
|
+
heading="Page header"
|
41
|
+
subheading="This is a simple page header component and this is the text."
|
42
|
+
size="small"
|
43
|
+
>
|
44
|
+
<ic-status-tag
|
45
|
+
slot="heading-adornment"
|
46
|
+
label="Beta"
|
47
|
+
size="small"
|
48
|
+
></ic-status-tag>
|
49
|
+
</ic-page-header>
|
50
|
+
`,
|
51
|
+
|
52
|
+
name: "Small",
|
53
|
+
};
|
54
|
+
|
55
|
+
export const DeprecatedSmall = {
|
56
|
+
render: () => html`
|
57
|
+
<ic-page-header
|
58
|
+
aligned="left"
|
59
|
+
heading="Page header"
|
60
|
+
subheading="This is a simple page header component and this is the text."
|
61
|
+
small
|
62
|
+
>
|
63
|
+
<ic-status-tag
|
64
|
+
slot="heading-adornment"
|
65
|
+
label="Beta"
|
66
|
+
size="small"
|
67
|
+
></ic-status-tag>
|
68
|
+
</ic-page-header>
|
69
|
+
`,
|
70
|
+
|
71
|
+
name: "Deprecated - small",
|
72
|
+
};
|
73
|
+
|
74
|
+
export const WithoutBorder = {
|
75
|
+
render: () => html`
|
76
|
+
<ic-page-header heading="Page header" border="false">
|
77
|
+
<ic-status-tag slot="heading-adornment" label="Beta"></ic-status-tag>
|
78
|
+
</ic-page-header>
|
79
|
+
`,
|
80
|
+
|
81
|
+
name: "Without border",
|
82
|
+
};
|
83
|
+
|
84
|
+
export const CenterAligned = {
|
85
|
+
render: () => html`
|
86
|
+
<ic-page-header
|
87
|
+
aligned="center"
|
88
|
+
heading="Page header"
|
89
|
+
subheading="This is a simple page header component and this is the text."
|
90
|
+
>
|
91
|
+
<ic-status-tag slot="heading-adornment" label="Beta"></ic-status-tag>
|
92
|
+
</ic-page-header>
|
93
|
+
`,
|
94
|
+
|
95
|
+
name: "Center aligned",
|
96
|
+
};
|
97
|
+
|
98
|
+
export const FullWidth = {
|
99
|
+
render: () => html`
|
100
|
+
<ic-page-header
|
101
|
+
aligned="full-width"
|
102
|
+
heading="Page header"
|
103
|
+
subheading="This is a simple page header component and this is the text."
|
104
|
+
>
|
105
|
+
<ic-status-tag slot="heading-adornment" label="Beta"></ic-status-tag>
|
106
|
+
</ic-page-header>
|
107
|
+
`,
|
108
|
+
|
109
|
+
name: "Full width",
|
110
|
+
};
|
111
|
+
|
112
|
+
export const Sticky = {
|
113
|
+
render: () => html`
|
114
|
+
<ic-page-header
|
115
|
+
sticky
|
116
|
+
heading="Page header"
|
117
|
+
subheading="This is a simple page header component and this is the text."
|
118
|
+
>
|
119
|
+
<ic-status-tag slot="heading-adornment" label="Beta"></ic-status-tag>
|
120
|
+
</ic-page-header>
|
121
|
+
`,
|
122
|
+
|
123
|
+
name: "Sticky",
|
124
|
+
};
|
125
|
+
|
126
|
+
export const StickyWithContentAndFooter = {
|
127
|
+
render: () => html`
|
128
|
+
<ic-top-navigation app-title="ApplicationName">
|
129
|
+
<svg
|
130
|
+
slot="app-icon"
|
131
|
+
xmlns="http://www.w3.org/2000/svg"
|
132
|
+
height="24px"
|
133
|
+
viewBox="0 0 24 24"
|
134
|
+
width="24px"
|
135
|
+
fill="#000000"
|
136
|
+
>
|
137
|
+
<path d="M0 0h24v24H0V0z" fill="none" />
|
138
|
+
<path
|
139
|
+
d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm-5.5-2.5l7.51-3.49L17.5 6.5 9.99 9.99 6.5 17.5zm5.5-6.6c.61 0 1.1.49 1.1 1.1s-.49 1.1-1.1 1.1-1.1-.49-1.1-1.1.49-1.1 1.1-1.1z"
|
140
|
+
/>
|
141
|
+
</svg>
|
142
|
+
</ic-top-navigation>
|
143
|
+
<ic-page-header
|
144
|
+
sticky
|
145
|
+
heading="Page header"
|
146
|
+
subheading="This is a simple page header component and this is the text."
|
147
|
+
>
|
148
|
+
<ic-status-tag slot="heading-adornment" label="Beta"></ic-status-tag>
|
149
|
+
</ic-page-header>
|
150
|
+
<ic-section-container style="height:800px">
|
151
|
+
This is an example of how the sticky variant of the page header would work
|
152
|
+
with some content and the footer.
|
153
|
+
</ic-section-container>
|
154
|
+
<ic-footer
|
155
|
+
description="The ICDS is maintained by the Design Practice Team. If you've got a question or want to feedback,
|
156
|
+
please get in touch."
|
157
|
+
caption="All content is available under the Open Government Licence v3.0, except source code and code examples which are available under the MIT Licence."
|
158
|
+
>
|
159
|
+
<ic-footer-link slot="link" href="/">Get Started</ic-footer-link>
|
160
|
+
<ic-footer-link slot="link" href="/">Accessibility</ic-footer-link>
|
161
|
+
<ic-footer-link slot="link" href="/">Styles</ic-footer-link>
|
162
|
+
<ic-footer-link slot="link" href="/">Components</ic-footer-link>
|
163
|
+
<ic-footer-link slot="link" href="/">Patterns</ic-footer-link>
|
164
|
+
<ic-footer-link slot="link" href="/">Design toolkit</ic-footer-link>
|
165
|
+
<div
|
166
|
+
slot="logo"
|
167
|
+
style="width:100px;height:100px;display:flex;align-items:center;justify-content:center;
|
168
|
+
background-color:var(--ic-theme-primary);color:var(--ic-theme-text);"
|
169
|
+
>
|
170
|
+
Logo
|
171
|
+
</div>
|
172
|
+
</ic-footer>
|
173
|
+
`,
|
174
|
+
|
175
|
+
name: "Sticky with content and footer",
|
176
|
+
};
|
177
|
+
|
178
|
+
export const StickyForLargeAndExtraLargeBreakpointsOnly = {
|
179
|
+
render: () => html`
|
180
|
+
<ic-top-navigation app-title="ApplicationName">
|
181
|
+
<svg
|
182
|
+
slot="app-icon"
|
183
|
+
xmlns="http://www.w3.org/2000/svg"
|
184
|
+
height="24px"
|
185
|
+
viewBox="0 0 24 24"
|
186
|
+
width="24px"
|
187
|
+
fill="#000000"
|
188
|
+
>
|
189
|
+
<path d="M0 0h24v24H0V0z" fill="none" />
|
190
|
+
<path
|
191
|
+
d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm-5.5-2.5l7.51-3.49L17.5 6.5 9.99 9.99 6.5 17.5zm5.5-6.6c.61 0 1.1.49 1.1 1.1s-.49 1.1-1.1 1.1-1.1-.49-1.1-1.1.49-1.1 1.1-1.1z"
|
192
|
+
/>
|
193
|
+
</svg>
|
194
|
+
</ic-top-navigation>
|
195
|
+
<ic-page-header
|
196
|
+
sticky-desktop-only
|
197
|
+
heading="Page header"
|
198
|
+
subheading="This is a simple page header component and this is the text. This page header is only sticky for viewport widths of 992px and above."
|
199
|
+
>
|
200
|
+
<ic-status-tag slot="heading-adornment" label="Beta"></ic-status-tag>
|
201
|
+
</ic-page-header>
|
202
|
+
<ic-section-container style="height:800px">
|
203
|
+
This is an example of how the sticky-desktop-only variant of the page
|
204
|
+
header would work with some content and the footer.
|
205
|
+
</ic-section-container>
|
206
|
+
<ic-footer
|
207
|
+
description="The ICDS is maintained by the Design Practice Team. If you've got a question or want to feedback,
|
208
|
+
please get in touch."
|
209
|
+
caption="All content is available under the Open Government Licence v3.0, except source code and code examples which are available under the MIT Licence."
|
210
|
+
>
|
211
|
+
<ic-footer-link slot="link" href="/">Get Started</ic-footer-link>
|
212
|
+
<ic-footer-link slot="link" href="/">Accessibility</ic-footer-link>
|
213
|
+
<ic-footer-link slot="link" href="/">Styles</ic-footer-link>
|
214
|
+
<ic-footer-link slot="link" href="/">Components</ic-footer-link>
|
215
|
+
<ic-footer-link slot="link" href="/">Patterns</ic-footer-link>
|
216
|
+
<ic-footer-link slot="link" href="/">Design toolkit</ic-footer-link>
|
217
|
+
<div
|
218
|
+
slot="logo"
|
219
|
+
style="width:100px;height:100px;display:flex;align-items:center;justify-content:center;
|
220
|
+
background-color:var(--ic-theme-primary);color:var(--ic-theme-text);"
|
221
|
+
>
|
222
|
+
Logo
|
223
|
+
</div>
|
224
|
+
</ic-footer>
|
225
|
+
`,
|
226
|
+
|
227
|
+
name: "Sticky for large and extra-large breakpoints only",
|
228
|
+
};
|
229
|
+
|
230
|
+
export const WithBreadcrumbs = {
|
231
|
+
render: () => html`
|
232
|
+
<ic-page-header
|
233
|
+
heading="Page header"
|
234
|
+
subheading="This is a page header component with additional functionality and this is the text."
|
235
|
+
reverse-order
|
236
|
+
>
|
237
|
+
<ic-breadcrumb-group slot="breadcrumbs">
|
238
|
+
<ic-breadcrumb
|
239
|
+
page-title="Breadcrumb 1"
|
240
|
+
href="/breadcrumb-1"
|
241
|
+
></ic-breadcrumb>
|
242
|
+
<ic-breadcrumb
|
243
|
+
current="true"
|
244
|
+
page-title="Breadcrumb 2"
|
245
|
+
href="/breadcrumb-2"
|
246
|
+
></ic-breadcrumb>
|
247
|
+
</ic-breadcrumb-group>
|
248
|
+
</ic-page-header>
|
249
|
+
`,
|
250
|
+
|
251
|
+
name: "With breadcrumbs",
|
252
|
+
};
|
253
|
+
|
254
|
+
export const WithActions = {
|
255
|
+
render: () => html`
|
256
|
+
<ic-page-header
|
257
|
+
heading="Page header"
|
258
|
+
subheading="This is a page header component with additional functionality and this is the text."
|
259
|
+
reverse-order
|
260
|
+
>
|
261
|
+
<ic-button slot="actions" variant="primary"
|
262
|
+
>Create coffee
|
263
|
+
<svg
|
264
|
+
slot="icon"
|
265
|
+
width="24"
|
266
|
+
height="24"
|
267
|
+
viewBox="0 0 24 24"
|
268
|
+
fill="none"
|
269
|
+
xmlns="http://www.w3.org/2000/svg"
|
270
|
+
>
|
271
|
+
<path
|
272
|
+
d="M19 13H13V19H11V13H5V11H11V5H13V11H19V13Z"
|
273
|
+
fill="currentColor"
|
274
|
+
/>
|
275
|
+
</svg>
|
276
|
+
</ic-button>
|
277
|
+
<ic-button slot="actions" variant="tertiary">Filter coffee</ic-button>
|
278
|
+
</ic-page-header>
|
279
|
+
`,
|
280
|
+
|
281
|
+
name: "With actions",
|
282
|
+
};
|
283
|
+
|
284
|
+
export const WithInput = {
|
285
|
+
render: () => html`
|
286
|
+
<ic-page-header
|
287
|
+
heading="Page header"
|
288
|
+
subheading="This is a page header component with additional functionality and this is the text."
|
289
|
+
>
|
290
|
+
<ic-status-tag slot="heading-adornment" label="Beta"></ic-status-tag>
|
291
|
+
<ic-text-field slot="input" placeholder="Enter your input" hide-label />
|
292
|
+
</ic-page-header>
|
293
|
+
`,
|
294
|
+
|
295
|
+
name: "With input",
|
296
|
+
};
|
297
|
+
|
298
|
+
export const WithStepper = {
|
299
|
+
render: () => html`
|
300
|
+
<ic-page-header
|
301
|
+
heading="Create a coffee"
|
302
|
+
subheading="This is a page header component with additional functionality and this is the text."
|
303
|
+
>
|
304
|
+
<ic-stepper slot="stepper">
|
305
|
+
<ic-step step-title="Warm kettle" step-type="completed"></ic-step>
|
306
|
+
<ic-step
|
307
|
+
step-title="Warm milk"
|
308
|
+
step-subtitle="Optional"
|
309
|
+
step-type="completed"
|
310
|
+
></ic-step>
|
311
|
+
<ic-step step-title="Pour milk" step-type="current" current></ic-step>
|
312
|
+
</ic-stepper>
|
313
|
+
</ic-page-header>
|
314
|
+
`,
|
315
|
+
|
316
|
+
name: "With stepper",
|
317
|
+
};
|
318
|
+
|
319
|
+
export const WithTabs = {
|
320
|
+
render: () => html`
|
321
|
+
<ic-page-header
|
322
|
+
heading="Coffee recipes"
|
323
|
+
subheading="This is a page header component with additional functionality and this is the text."
|
324
|
+
>
|
325
|
+
<ic-status-tag slot="heading-adornment" label="Beta"></ic-status-tag>
|
326
|
+
<ic-navigation-item
|
327
|
+
slot="tabs"
|
328
|
+
label="All recipes"
|
329
|
+
href="?path=/story/web-components-page-header--with-tabs"
|
330
|
+
selected
|
331
|
+
aria-label="This page shows all the recipes"
|
332
|
+
></ic-navigation-item>
|
333
|
+
<ic-navigation-item
|
334
|
+
slot="tabs"
|
335
|
+
label="Favourites"
|
336
|
+
href="?path=/story/web-components-page-header--with-tabs"
|
337
|
+
aria-label="Show your favourite recipes"
|
338
|
+
></ic-navigation-item>
|
339
|
+
<ic-navigation-item
|
340
|
+
slot="tabs"
|
341
|
+
label="Section Three"
|
342
|
+
href="?path=/story/web-components-page-header--with-tabs"
|
343
|
+
></ic-navigation-item>
|
344
|
+
<ic-navigation-item
|
345
|
+
slot="tabs"
|
346
|
+
label="Section Four"
|
347
|
+
href="?path=/story/web-components-page-header--with-tabs"
|
348
|
+
></ic-navigation-item>
|
349
|
+
<ic-navigation-item
|
350
|
+
slot="tabs"
|
351
|
+
label="Section Five"
|
352
|
+
href="?path=/story/web-components-page-header--with-tabs"
|
353
|
+
target="_blank"
|
354
|
+
></ic-navigation-item>
|
355
|
+
<ic-navigation-item
|
356
|
+
slot="tabs"
|
357
|
+
label="Section Six"
|
358
|
+
href="?path=/story/web-components-page-header--with-tabs"
|
359
|
+
></ic-navigation-item>
|
360
|
+
<ic-navigation-item
|
361
|
+
slot="tabs"
|
362
|
+
label="Section Seven"
|
363
|
+
href="?path=/story/web-components-page-header--with-tabs"
|
364
|
+
></ic-navigation-item>
|
365
|
+
<ic-navigation-item
|
366
|
+
slot="tabs"
|
367
|
+
label="Section Eight"
|
368
|
+
href="?path=/story/web-components-page-header--with-tabs"
|
369
|
+
></ic-navigation-item>
|
370
|
+
<ic-navigation-item
|
371
|
+
slot="tabs"
|
372
|
+
label="Section Nine"
|
373
|
+
href="?path=/story/web-components-page-header--with-tabs"
|
374
|
+
></ic-navigation-item>
|
375
|
+
<ic-navigation-item
|
376
|
+
slot="tabs"
|
377
|
+
label="Section Ten"
|
378
|
+
href="?path=/story/web-components-page-header--with-tabs"
|
379
|
+
></ic-navigation-item>
|
380
|
+
</ic-page-header>
|
381
|
+
`,
|
382
|
+
|
383
|
+
name: "With tabs",
|
384
|
+
};
|
385
|
+
|
386
|
+
export const WithBreadcrumbsInputActionsAndTabs = {
|
387
|
+
render: () => html`
|
388
|
+
<ic-page-header
|
389
|
+
heading="Coffee recipes"
|
390
|
+
subheading="This is a page header component that has breadcrumbs, an input area, actions & tabs."
|
391
|
+
reverse-order
|
392
|
+
>
|
393
|
+
<ic-breadcrumb-group slot="breadcrumbs">
|
394
|
+
<ic-breadcrumb
|
395
|
+
page-title="Breadcrumb 1"
|
396
|
+
href="/breadcrumb-1"
|
397
|
+
></ic-breadcrumb>
|
398
|
+
<ic-breadcrumb
|
399
|
+
current="true"
|
400
|
+
page-title="Breadcrumb 2"
|
401
|
+
href="/breadcrumb-2"
|
402
|
+
></ic-breadcrumb>
|
403
|
+
</ic-breadcrumb-group>
|
404
|
+
<ic-status-tag slot="heading-adornment" label="Beta"></ic-status-tag>
|
405
|
+
<ic-button slot="actions" variant="primary"
|
406
|
+
>Create coffee
|
407
|
+
<svg
|
408
|
+
slot="icon"
|
409
|
+
width="24"
|
410
|
+
height="24"
|
411
|
+
viewBox="0 0 24 24"
|
412
|
+
fill="none"
|
413
|
+
xmlns="http://www.w3.org/2000/svg"
|
414
|
+
>
|
415
|
+
<path
|
416
|
+
d="M19 13H13V19H11V13H5V11H11V5H13V11H19V13Z"
|
417
|
+
fill="currentColor"
|
418
|
+
/>
|
419
|
+
</svg>
|
420
|
+
</ic-button>
|
421
|
+
<ic-button slot="actions" variant="tertiary">Filter coffee</ic-button>
|
422
|
+
<ic-navigation-item
|
423
|
+
slot="tabs"
|
424
|
+
label="All recipes"
|
425
|
+
href="?path=/story/web-components-page-header--with-tabs"
|
426
|
+
selected
|
427
|
+
></ic-navigation-item>
|
428
|
+
<ic-navigation-item
|
429
|
+
slot="tabs"
|
430
|
+
label="Favourites"
|
431
|
+
href="?path=/story/web-components-page-header--with-tabs"
|
432
|
+
></ic-navigation-item>
|
433
|
+
<ic-text-field slot="input" placeholder="Enter your input" hide-label />
|
434
|
+
</ic-page-header>
|
435
|
+
`,
|
436
|
+
|
437
|
+
name: "With breadcrumbs, input, actions and tabs",
|
438
|
+
};
|
439
|
+
|
440
|
+
export const WithBreadcrumbsInputActionsAndStepper = {
|
441
|
+
render: () => html`
|
442
|
+
<ic-page-header
|
443
|
+
heading="Coffee recipes"
|
444
|
+
subheading="This is a page header component that has breadcrumbs, an input area, actions & stepper."
|
445
|
+
reverse-order
|
446
|
+
>
|
447
|
+
<ic-breadcrumb-group slot="breadcrumbs">
|
448
|
+
<ic-breadcrumb
|
449
|
+
page-title="Breadcrumb 1"
|
450
|
+
href="/breadcrumb-1"
|
451
|
+
></ic-breadcrumb>
|
452
|
+
<ic-breadcrumb
|
453
|
+
current="true"
|
454
|
+
page-title="Breadcrumb 2"
|
455
|
+
href="/breadcrumb-2"
|
456
|
+
></ic-breadcrumb>
|
457
|
+
</ic-breadcrumb-group>
|
458
|
+
<ic-status-tag slot="heading-adornment" label="Beta"></ic-status-tag>
|
459
|
+
<ic-button slot="actions" variant="primary"
|
460
|
+
>Create coffee
|
461
|
+
<svg
|
462
|
+
slot="icon"
|
463
|
+
width="24"
|
464
|
+
height="24"
|
465
|
+
viewBox="0 0 24 24"
|
466
|
+
fill="none"
|
467
|
+
xmlns="http://www.w3.org/2000/svg"
|
468
|
+
>
|
469
|
+
<path
|
470
|
+
d="M19 13H13V19H11V13H5V11H11V5H13V11H19V13Z"
|
471
|
+
fill="currentColor"
|
472
|
+
/>
|
473
|
+
</svg>
|
474
|
+
</ic-button>
|
475
|
+
<ic-button slot="actions" variant="tertiary">Filter coffee</ic-button>
|
476
|
+
<ic-stepper slot="stepper">
|
477
|
+
<ic-step step-title="Warm kettle" step-type="completed"></ic-step>
|
478
|
+
<ic-step
|
479
|
+
step-title="Warm milk"
|
480
|
+
step-subtitle="Optional"
|
481
|
+
step-type="completed"
|
482
|
+
></ic-step>
|
483
|
+
<ic-step step-title="Pour milk" step-type="current" current></ic-step>
|
484
|
+
</ic-stepper>
|
485
|
+
<ic-text-field slot="input" placeholder="Enter your input" hide-label />
|
486
|
+
</ic-page-header>
|
487
|
+
`,
|
488
|
+
|
489
|
+
name: "With breadcrumbs, input, actions and stepper",
|
490
|
+
};
|
491
|
+
|
492
|
+
export const ComponentOverrides = {
|
493
|
+
render: () => html`
|
494
|
+
<ic-page-header>
|
495
|
+
<ic-typography slot="heading" variant="h4">
|
496
|
+
<h2>heading</h2>
|
497
|
+
</ic-typography>
|
498
|
+
<ic-typography slot="subheading" variant="body">
|
499
|
+
subheading
|
500
|
+
</ic-typography>
|
501
|
+
</ic-page-header>
|
502
|
+
`,
|
503
|
+
|
504
|
+
name: "Component overrides",
|
505
|
+
};
|
506
|
+
|
507
|
+
export const WithBreadcrumbsInputActionsAndStepperAndLongTitle = {
|
508
|
+
render: () => html`
|
509
|
+
<ic-page-header
|
510
|
+
heading="Coffee recipes with a very very long title"
|
511
|
+
subheading="This is a page header component that has breadcrumbs, an input area, actions & stepper."
|
512
|
+
reverse-order
|
513
|
+
>
|
514
|
+
<ic-breadcrumb-group slot="breadcrumbs">
|
515
|
+
<ic-breadcrumb
|
516
|
+
page-title="Breadcrumb 1"
|
517
|
+
href="/breadcrumb-1"
|
518
|
+
></ic-breadcrumb>
|
519
|
+
<ic-breadcrumb
|
520
|
+
current="true"
|
521
|
+
page-title="Breadcrumb 2"
|
522
|
+
href="/breadcrumb-2"
|
523
|
+
></ic-breadcrumb>
|
524
|
+
</ic-breadcrumb-group>
|
525
|
+
<ic-status-tag slot="heading-adornment" label="Beta"></ic-status-tag>
|
526
|
+
<ic-button slot="actions" variant="primary"
|
527
|
+
>Create coffee
|
528
|
+
<svg
|
529
|
+
slot="icon"
|
530
|
+
width="24"
|
531
|
+
height="24"
|
532
|
+
viewBox="0 0 24 24"
|
533
|
+
fill="none"
|
534
|
+
xmlns="http://www.w3.org/2000/svg"
|
535
|
+
>
|
536
|
+
<path
|
537
|
+
d="M19 13H13V19H11V13H5V11H11V5H13V11H19V13Z"
|
538
|
+
fill="currentColor"
|
539
|
+
/>
|
540
|
+
</svg>
|
541
|
+
</ic-button>
|
542
|
+
<ic-button slot="actions" variant="tertiary">Filter coffee</ic-button>
|
543
|
+
<ic-stepper slot="stepper">
|
544
|
+
<ic-step step-title="Warm kettle" step-type="completed"></ic-step>
|
545
|
+
<ic-step
|
546
|
+
step-title="Warm milk"
|
547
|
+
step-subtitle="Optional"
|
548
|
+
step-type="completed"
|
549
|
+
></ic-step>
|
550
|
+
<ic-step step-title="Pour milk" step-type="current" current></ic-step>
|
551
|
+
</ic-stepper>
|
552
|
+
<ic-text-field slot="input" placeholder="Enter your input" hide-label />
|
553
|
+
</ic-page-header>
|
554
|
+
`,
|
555
|
+
|
556
|
+
name: "With breadcrumbs, input, actions and stepper and long title",
|
557
|
+
};
|
@@ -0,0 +1,125 @@
|
|
1
|
+
import { html } from "lit-html";
|
2
|
+
|
3
|
+
export default {
|
4
|
+
title: "Web Components/Pagination",
|
5
|
+
component: "Pagination",
|
6
|
+
};
|
7
|
+
|
8
|
+
export const Simple = {
|
9
|
+
render: (args) => html`
|
10
|
+
<p>Default/Dark/Light appearance</p>
|
11
|
+
<ic-pagination pages="15"></ic-pagination>
|
12
|
+
<br />
|
13
|
+
<ic-pagination pages="15" appearance="dark"></ic-pagination>
|
14
|
+
<br />
|
15
|
+
<div style="background-color: black; width: fit-content; padding: 6px 8px;">
|
16
|
+
<ic-pagination pages="15" appearance="light"></ic-pagination>
|
17
|
+
</div>
|
18
|
+
<br />
|
19
|
+
<p>Hidden current page</p>
|
20
|
+
<ic-pagination pages="15" hide-current-page></ic-pagination>
|
21
|
+
<br />
|
22
|
+
<p>Hidden first and last page buttons</p>
|
23
|
+
<ic-pagination pages="15" hide-first-and-last-page-button></ic-pagination>
|
24
|
+
<br />
|
25
|
+
<p>Default page</p>
|
26
|
+
<ic-pagination pages="15" default-page="3"></ic-pagination>
|
27
|
+
<br />
|
28
|
+
<p>Disabled</p>
|
29
|
+
<ic-pagination pages="15" disabled></ic-pagination>
|
30
|
+
<br />
|
31
|
+
<p>Label set</p>
|
32
|
+
<ic-pagination pages="15" label="Label"></ic-pagination>
|
33
|
+
`,
|
34
|
+
|
35
|
+
name: "Simple",
|
36
|
+
};
|
37
|
+
|
38
|
+
export const Complex = {
|
39
|
+
render: (args) => html`
|
40
|
+
<p>Default/Dark/Light appearance</p>
|
41
|
+
<ic-pagination pages="15" type="complex"></ic-pagination>
|
42
|
+
<br />
|
43
|
+
<ic-pagination pages="15" type="complex" appearance="dark"></ic-pagination>
|
44
|
+
<br />
|
45
|
+
<div style="background-color: black; width: fit-content; padding: 6px 8px;">
|
46
|
+
<ic-pagination
|
47
|
+
pages="15"
|
48
|
+
type="complex"
|
49
|
+
appearance="light"
|
50
|
+
></ic-pagination>
|
51
|
+
</div>
|
52
|
+
<br />
|
53
|
+
<p>Hidden first and last buttons</p>
|
54
|
+
<ic-pagination
|
55
|
+
pages="15"
|
56
|
+
type="complex"
|
57
|
+
hide-first-and-last-page-button
|
58
|
+
></ic-pagination>
|
59
|
+
<br />
|
60
|
+
<p>Default page</p>
|
61
|
+
<ic-pagination pages="15" type="complex" default-page="7"></ic-pagination>
|
62
|
+
<br />
|
63
|
+
<p>Disabled</p>
|
64
|
+
<ic-pagination pages="15" type="complex" disabled></ic-pagination>
|
65
|
+
`,
|
66
|
+
|
67
|
+
name: "Complex",
|
68
|
+
};
|
69
|
+
|
70
|
+
export const ComplexAdjacentBoundaryItemsSet = {
|
71
|
+
render: (args) => html`
|
72
|
+
<p style={{ padding: 10 }}>Adjacent: 0, Boundary: 0</p>
|
73
|
+
<ic-pagination
|
74
|
+
pages="15"
|
75
|
+
type="complex"
|
76
|
+
adjacent-count="0"
|
77
|
+
boundary-count="0"
|
78
|
+
></ic-pagination>
|
79
|
+
<br/>
|
80
|
+
<p style={{ padding: 10 }}>Adjacent: 0, Boundary: 1</p>
|
81
|
+
<ic-pagination
|
82
|
+
pages="15"
|
83
|
+
type="complex"
|
84
|
+
adjacent-count="0"
|
85
|
+
boundary-count="1"
|
86
|
+
></ic-pagination>
|
87
|
+
<br/>
|
88
|
+
<p style={{ padding: 10 }}>Adjacent: 0, Boundary: 2</p>
|
89
|
+
<ic-pagination
|
90
|
+
pages="15"
|
91
|
+
type="complex"
|
92
|
+
adjacent-count="0"
|
93
|
+
boundary-count="2"
|
94
|
+
></ic-pagination>
|
95
|
+
<br/>
|
96
|
+
<p style={{ padding: 10 }}>Adjacent: 1, Boundary: 0</p>
|
97
|
+
<ic-pagination
|
98
|
+
pages="15"
|
99
|
+
type="complex"
|
100
|
+
adjacent-count="1"
|
101
|
+
boundary-count="0"
|
102
|
+
></ic-pagination>
|
103
|
+
<br/>
|
104
|
+
<p style={{ padding: 10 }}>Adjacent: 2, Boundary: 0</p>
|
105
|
+
<ic-pagination
|
106
|
+
pages="15"
|
107
|
+
type="complex"
|
108
|
+
adjacent-count="2"
|
109
|
+
boundary-count="0"
|
110
|
+
></ic-pagination>
|
111
|
+
<br/>
|
112
|
+
<p style={{ padding: 10 }}>Adjacent: 1, Boundary: 1</p>
|
113
|
+
<ic-pagination pages="15" type="complex" ></ic-pagination>
|
114
|
+
<br/>
|
115
|
+
<p style={{ padding: 10 }}>Adjacent: 2, Boundary: 2</p>
|
116
|
+
<ic-pagination
|
117
|
+
pages="15"
|
118
|
+
type="complex"
|
119
|
+
adjacent-count="2"
|
120
|
+
boundary-count="2"
|
121
|
+
></ic-pagination>
|
122
|
+
`,
|
123
|
+
|
124
|
+
name: "Complex - Adjacent & Boundary Items Set",
|
125
|
+
};
|