@ukic/web-components 2.35.0 → 2.35.2

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.
Files changed (110) hide show
  1. package/README.md +1 -0
  2. package/dist/cjs/core.cjs.js +1 -1
  3. package/dist/cjs/ic-badge.cjs.entry.js +23 -0
  4. package/dist/cjs/ic-badge.cjs.entry.js.map +1 -1
  5. package/dist/cjs/ic-button_3.cjs.entry.js.map +1 -1
  6. package/dist/cjs/ic-navigation-button.cjs.entry.js +2 -2
  7. package/dist/cjs/ic-navigation-button.cjs.entry.js.map +1 -1
  8. package/dist/cjs/ic-navigation-item.cjs.entry.js +1 -1
  9. package/dist/cjs/ic-navigation-item.cjs.entry.js.map +1 -1
  10. package/dist/cjs/ic-toast.cjs.entry.js +2 -2
  11. package/dist/cjs/ic-toast.cjs.entry.js.map +1 -1
  12. package/dist/cjs/loader.cjs.js +1 -1
  13. package/dist/collection/collection-manifest.json +1 -1
  14. package/dist/collection/components/ic-accordion/ic-accordion.stories.js +635 -0
  15. package/dist/collection/components/ic-alert/ic-alert.stories.js +257 -0
  16. package/dist/collection/components/ic-back-to-top/ic-back-to-top.stories.js +162 -0
  17. package/dist/collection/components/ic-badge/ic-badge.js +39 -1
  18. package/dist/collection/components/ic-badge/ic-badge.js.map +1 -1
  19. package/dist/collection/components/ic-badge/ic-badge.stories.js +1082 -0
  20. package/dist/collection/components/ic-badge/test/basic/ic-badge.spec.js +194 -0
  21. package/dist/collection/components/ic-badge/test/basic/ic-badge.spec.js.map +1 -1
  22. package/dist/collection/components/ic-breadcrumb-group/ic-breadcrumb-group.stories.js +502 -0
  23. package/dist/collection/components/ic-button/ic-button.stories.js +2218 -0
  24. package/dist/collection/components/ic-card/ic-card.stories.js +1034 -0
  25. package/dist/collection/components/ic-checkbox-group/ic-checkbox-group.stories.js +687 -0
  26. package/dist/collection/components/ic-chip/ic-chip.stories.js +670 -0
  27. package/dist/collection/components/ic-classification-banner/ic-classification-banner.stories.js +131 -0
  28. package/dist/collection/components/ic-data-entity/ic-data-entity.stories.js +487 -0
  29. package/dist/collection/components/ic-dialog/ic-dialog.stories.js +1256 -0
  30. package/dist/collection/components/ic-empty-state/ic-empty-state.stories.js +397 -0
  31. package/dist/collection/components/ic-footer/ic-footer.stories.js +383 -0
  32. package/dist/collection/components/ic-hero/ic-hero.stories.js +489 -0
  33. package/dist/collection/components/ic-link/ic-link.stories.js +114 -0
  34. package/dist/collection/components/ic-loading-indicator/ic-loading-indicator.stories.js +416 -0
  35. package/dist/collection/components/ic-navigation-button/ic-navigation-button.css +4 -0
  36. package/dist/collection/components/ic-navigation-button/ic-navigation-button.js +1 -1
  37. package/dist/collection/components/ic-navigation-button/ic-navigation-button.js.map +1 -1
  38. package/dist/collection/components/ic-navigation-item/ic-navigation-item.css +7 -35
  39. package/dist/collection/components/ic-page-header/ic-page-header.stories.js +557 -0
  40. package/dist/collection/components/ic-pagination/ic-pagination.stories.js +125 -0
  41. package/dist/collection/components/ic-popover-menu/ic-popover-menu.stories.js +486 -0
  42. package/dist/collection/components/ic-radio-group/ic-radio-group.stories.js +450 -0
  43. package/dist/collection/components/ic-search-bar/ic-search-bar.stories.js +591 -0
  44. package/dist/collection/components/ic-section-container/ic-section-container.stories.js +62 -0
  45. package/dist/collection/components/ic-select/ic-select-searchable.stories.js +953 -0
  46. package/dist/collection/components/ic-select/ic-select-single.stories.js +780 -0
  47. package/dist/collection/components/ic-side-navigation/ic-side-navigation.stories.js +2526 -0
  48. package/dist/collection/components/ic-skeleton/ic-skeleton.stories.js +141 -0
  49. package/dist/collection/components/ic-status-tag/ic-status-tag.stories.js +161 -0
  50. package/dist/collection/components/ic-stepper/ic-stepper.stories.js +327 -0
  51. package/dist/collection/components/ic-switch/ic-switch.stories.js +171 -0
  52. package/dist/collection/components/ic-tab-context/ic-tabs.stories.js +388 -0
  53. package/dist/collection/components/ic-text-field/ic-text-field.stories.js +1083 -0
  54. package/dist/collection/components/ic-theme/ic-theme.stories.js +171 -0
  55. package/dist/collection/components/ic-toast/ic-toast.js +2 -2
  56. package/dist/collection/components/ic-toast/ic-toast.js.map +1 -1
  57. package/dist/collection/components/ic-toast/ic-toast.stories.js +413 -0
  58. package/dist/collection/components/ic-toast/test/basic/ic-toast.spec.js +3 -3
  59. package/dist/collection/components/ic-toast/test/basic/ic-toast.spec.js.map +1 -1
  60. package/dist/collection/components/ic-toggle-button/ic-toggle-button.stories.js +537 -0
  61. package/dist/collection/components/ic-toggle-button-group/ic-toggle-button-group.stories.js +610 -0
  62. package/dist/collection/components/ic-tooltip/ic-tooltip.js +2 -5
  63. package/dist/collection/components/ic-tooltip/ic-tooltip.js.map +1 -1
  64. package/dist/collection/components/ic-tooltip/ic-tooltip.stories.js +356 -0
  65. package/dist/collection/components/ic-top-navigation/ic-top-navigation.stories.js +1083 -0
  66. package/dist/collection/components/ic-typography/ic-typography.stories.js +437 -0
  67. package/dist/collection/patterns/top-nav-content-footer.stories.js +109 -0
  68. package/dist/collection/patterns/z-index.stories.js +474 -0
  69. package/dist/components/ic-badge.js +25 -2
  70. package/dist/components/ic-badge.js.map +1 -1
  71. package/dist/components/ic-navigation-button.js +2 -2
  72. package/dist/components/ic-navigation-button.js.map +1 -1
  73. package/dist/components/ic-navigation-item.js +1 -1
  74. package/dist/components/ic-navigation-item.js.map +1 -1
  75. package/dist/components/ic-toast.js +2 -2
  76. package/dist/components/ic-toast.js.map +1 -1
  77. package/dist/components/ic-tooltip2.js.map +1 -1
  78. package/dist/core/core.esm.js +1 -1
  79. package/dist/core/core.esm.js.map +1 -1
  80. package/dist/core/p-3e8023ff.entry.js +2 -0
  81. package/dist/core/p-3e8023ff.entry.js.map +1 -0
  82. package/dist/core/p-ba06cc95.entry.js.map +1 -1
  83. package/dist/core/{p-7e8a4abd.entry.js → p-bfaa257c.entry.js} +2 -2
  84. package/dist/core/{p-7e8a4abd.entry.js.map → p-bfaa257c.entry.js.map} +1 -1
  85. package/dist/core/p-c05474f3.entry.js +2 -0
  86. package/dist/core/p-c05474f3.entry.js.map +1 -0
  87. package/dist/core/{p-5d3c6ea1.entry.js → p-d0299926.entry.js} +2 -2
  88. package/dist/core/p-d0299926.entry.js.map +1 -0
  89. package/dist/esm/core.js +1 -1
  90. package/dist/esm/ic-badge.entry.js +23 -0
  91. package/dist/esm/ic-badge.entry.js.map +1 -1
  92. package/dist/esm/ic-button_3.entry.js.map +1 -1
  93. package/dist/esm/ic-navigation-button.entry.js +2 -2
  94. package/dist/esm/ic-navigation-button.entry.js.map +1 -1
  95. package/dist/esm/ic-navigation-item.entry.js +1 -1
  96. package/dist/esm/ic-navigation-item.entry.js.map +1 -1
  97. package/dist/esm/ic-toast.entry.js +2 -2
  98. package/dist/esm/ic-toast.entry.js.map +1 -1
  99. package/dist/esm/loader.js +1 -1
  100. package/dist/types/components/ic-badge/ic-badge.d.ts +5 -0
  101. package/dist/types/components/ic-tooltip/ic-tooltip.d.ts +1 -1
  102. package/dist/types/components.d.ts +7 -0
  103. package/hydrate/index.js +30 -7
  104. package/package.json +17 -12
  105. package/vscode-data.json +4 -0
  106. package/dist/core/p-405d89bb.entry.js +0 -2
  107. package/dist/core/p-405d89bb.entry.js.map +0 -1
  108. package/dist/core/p-5d3c6ea1.entry.js.map +0 -1
  109. package/dist/core/p-dfb3e76e.entry.js +0 -2
  110. package/dist/core/p-dfb3e76e.entry.js.map +0 -1
@@ -0,0 +1,489 @@
1
+ import { html } from "lit-html";
2
+
3
+ import image from "./assets/example-background.png";
4
+
5
+ export default {
6
+ title: "Web Components/Hero",
7
+ component: "ic-hero",
8
+ };
9
+
10
+ export const LeftAligned = {
11
+ render: () =>
12
+ html`<ic-hero
13
+ heading="Hero heading"
14
+ subheading="Hero description. This is a Hero component, it should be used as a page heading."
15
+ >
16
+ <ic-button variant="primary" appearance="light" slot="interaction"
17
+ >Button</ic-button
18
+ >
19
+ <ic-button variant="secondary" appearance="light" slot="interaction"
20
+ >Button</ic-button
21
+ >
22
+ <ic-link
23
+ href="https://google.com"
24
+ slot="interaction"
25
+ style="margin-top: var(--ic-space-sm)"
26
+ >Help</ic-link
27
+ >
28
+ </ic-hero>`,
29
+
30
+ name: "Left aligned",
31
+
32
+ parameters: {
33
+ layout: "fullscreen",
34
+ },
35
+ };
36
+
37
+ export const CenterAligned = {
38
+ render: () =>
39
+ html`<ic-hero
40
+ heading="Hero heading"
41
+ subheading="Hero description. This is a Hero component, it should be used as a page heading."
42
+ aligned="center"
43
+ >
44
+ <ic-button variant="primary" appearance="light" slot="interaction"
45
+ >Button</ic-button
46
+ >
47
+ <ic-button variant="secondary" appearance="light" slot="interaction"
48
+ >Button</ic-button
49
+ >
50
+ <ic-link
51
+ href="https://google.com"
52
+ slot="interaction"
53
+ style="margin-top: var(--ic-space-sm)"
54
+ >Help</ic-link
55
+ >
56
+ </ic-hero>`,
57
+
58
+ name: "Center aligned",
59
+
60
+ parameters: {
61
+ layout: "fullscreen",
62
+ },
63
+ };
64
+
65
+ export const SlottedHeadingAndSubheading = {
66
+ render: () =>
67
+ html`<ic-hero>
68
+ <ic-typography slot="heading" variant="h1">Slotted heading</ic-typography>
69
+ <ic-typography slot="subheading">Slotted subheading</ic-typography>
70
+ <ic-button variant="primary" appearance="light" slot="interaction"
71
+ >Button</ic-button
72
+ >
73
+ <ic-button variant="secondary" appearance="light" slot="interaction"
74
+ >Button</ic-button
75
+ >
76
+ <ic-link
77
+ href="https://google.com"
78
+ slot="interaction"
79
+ style="margin-top: var(--ic-space-sm)"
80
+ >Help</ic-link
81
+ >
82
+ </ic-hero>`,
83
+
84
+ name: "Slotted heading and subheading",
85
+
86
+ parameters: {
87
+ layout: "fullscreen",
88
+ },
89
+ };
90
+
91
+ export const LongHeading = {
92
+ render: () =>
93
+ html`<ic-hero
94
+ heading="Hero heading. This is a Hero component, it should be used as a page heading."
95
+ subheading="Hero description. This is a Hero component, it should be used as a page heading."
96
+ aligned="center"
97
+ >
98
+ <ic-button variant="primary" appearance="light" slot="interaction"
99
+ >Button</ic-button
100
+ >
101
+ <ic-button variant="secondary" appearance="light" slot="interaction"
102
+ >Button</ic-button
103
+ >
104
+ <ic-link
105
+ href="https://google.com"
106
+ slot="interaction"
107
+ style="margin-top: var(--ic-space-sm)"
108
+ >Help</ic-link
109
+ >
110
+ <ic-card
111
+ heading="Latest announcement"
112
+ message="This is some example text that can be included in the card copy."
113
+ slot="secondary"
114
+ ></ic-card>
115
+ </ic-hero>`,
116
+
117
+ name: "Long heading",
118
+
119
+ parameters: {
120
+ layout: "fullscreen",
121
+ },
122
+ };
123
+
124
+ export const FullWidth = {
125
+ render: () =>
126
+ html`<ic-hero
127
+ heading="Hero heading"
128
+ subheading="Hero description. This is a Hero component, it should be used as a page heading."
129
+ aligned="full-width"
130
+ >
131
+ <ic-button variant="primary" appearance="light" slot="interaction"
132
+ >Button</ic-button
133
+ >
134
+ <ic-button variant="secondary" appearance="light" slot="interaction"
135
+ >Button</ic-button
136
+ >
137
+ </ic-hero>`,
138
+
139
+ name: "Full width",
140
+
141
+ parameters: {
142
+ layout: "fullscreen",
143
+ },
144
+ };
145
+
146
+ export const ContentCenterAligned = {
147
+ render: () =>
148
+ html`<ic-hero
149
+ heading="Hero heading"
150
+ subheading="Hero description. This is a Hero component, it should be used as a page heading."
151
+ aligned="center"
152
+ content-aligned="center"
153
+ >
154
+ <ic-button variant="primary" appearance="light" slot="interaction"
155
+ >Button</ic-button
156
+ >
157
+ <ic-button variant="secondary" appearance="light" slot="interaction"
158
+ >Button</ic-button
159
+ >
160
+ </ic-hero>`,
161
+
162
+ name: "Content center aligned",
163
+
164
+ parameters: {
165
+ layout: "fullscreen",
166
+ },
167
+ };
168
+
169
+ export const Small = {
170
+ render: () =>
171
+ html`<ic-hero
172
+ heading="Hero heading"
173
+ subheading="Hero description. This is a Hero component, it should be used as a page heading."
174
+ aligned="center"
175
+ size="small"
176
+ >
177
+ <ic-button variant="primary" appearance="light" slot="interaction"
178
+ >Button</ic-button
179
+ >
180
+ <ic-button variant="secondary" appearance="light" slot="interaction"
181
+ >Button</ic-button
182
+ >
183
+ </ic-hero>`,
184
+
185
+ name: "Small",
186
+
187
+ parameters: {
188
+ layout: "fullscreen",
189
+ },
190
+ };
191
+
192
+ export const DeprecatedSmall = {
193
+ render: () =>
194
+ html`<ic-hero
195
+ heading="Hero heading"
196
+ subheading="Hero description. This is a Hero component, it should be used as a page heading."
197
+ aligned="center"
198
+ small
199
+ >
200
+ <ic-button variant="primary" appearance="light" slot="interaction"
201
+ >Button</ic-button
202
+ >
203
+ <ic-button variant="secondary" appearance="light" slot="interaction"
204
+ >Button</ic-button
205
+ >
206
+ </ic-hero>`,
207
+
208
+ name: "Deprecated - small",
209
+
210
+ parameters: {
211
+ layout: "fullscreen",
212
+ },
213
+ };
214
+
215
+ export const SecondaryHeading = {
216
+ render: () =>
217
+ html`<ic-hero
218
+ heading="Hero heading"
219
+ subheading="Hero description. This is a Hero component, it should be used as a page heading."
220
+ secondary-heading="Secondary Heading"
221
+ secondary-subheading="This is a secondary description."
222
+ aligned="center"
223
+ >
224
+ <ic-button variant="primary" appearance="light" slot="interaction"
225
+ >Button</ic-button
226
+ >
227
+ <ic-button variant="secondary" appearance="light" slot="interaction"
228
+ >Button</ic-button
229
+ >
230
+ </ic-hero>`,
231
+
232
+ name: "Secondary heading",
233
+
234
+ parameters: {
235
+ layout: "fullscreen",
236
+ },
237
+ };
238
+
239
+ export const SearchBarInteraction = {
240
+ render: () =>
241
+ html`<ic-hero
242
+ heading="Hero heading"
243
+ subheading="Hero description. This is a Hero component, it should be used as a page heading."
244
+ aligned="center"
245
+ >
246
+ <ic-search-bar
247
+ slot="interaction"
248
+ full-width
249
+ style="max-width: 322px;"
250
+ ></ic-search-bar>
251
+ </ic-hero>`,
252
+
253
+ name: "Search bar interaction",
254
+
255
+ parameters: {
256
+ layout: "fullscreen",
257
+ },
258
+ };
259
+
260
+ export const CardRightContent = {
261
+ render: () =>
262
+ html`<ic-hero
263
+ heading="Hero heading"
264
+ subheading="Hero description. This is a Hero component, it should be used as a page heading."
265
+ aligned="full-width"
266
+ >
267
+ <ic-button variant="primary" appearance="light" slot="interaction"
268
+ >Button</ic-button
269
+ >
270
+ <ic-button variant="secondary" appearance="light" slot="interaction"
271
+ >Button</ic-button
272
+ >
273
+ <ic-card
274
+ heading="Latest announcement"
275
+ message="This is some example text that can be included in the card copy."
276
+ slot="secondary"
277
+ ></ic-card>
278
+ </ic-hero>`,
279
+
280
+ name: "Card right content",
281
+
282
+ parameters: {
283
+ layout: "fullscreen",
284
+ },
285
+ };
286
+
287
+ export const ImageRightContent = {
288
+ render: () =>
289
+ html`<ic-hero
290
+ heading="Hero heading"
291
+ subheading="Hero description. This is a Hero component, it should be used as a page heading."
292
+ aligned="center"
293
+ >
294
+ <ic-button variant="primary" appearance="light" slot="interaction"
295
+ >Button</ic-button
296
+ >
297
+ <ic-button variant="secondary" appearance="light" slot="interaction"
298
+ >Button</ic-button
299
+ >
300
+ <svg
301
+ slot="secondary"
302
+ style="width:300px;"
303
+ xmlns="http://www.w3.org/2000/svg"
304
+ viewBox="0 0 1600 900"
305
+ >
306
+ <rect fill="#ff7700" width="1600" height="900" />
307
+ <polygon fill="#cc0000" points="957 450 539 900 1396 900" />
308
+ <polygon fill="#aa0000" points="957 450 872.9 900 1396 900" />
309
+ <polygon fill="#c50022" points="-60 900 398 662 816 900" />
310
+ <polygon fill="#a3001b" points="337 900 398 662 816 900" />
311
+ <polygon fill="#be0044" points="1203 546 1552 900 876 900" />
312
+ <polygon fill="#9c0036" points="1203 546 1552 900 1162 900" />
313
+ <polygon fill="#b80066" points="641 695 886 900 367 900" />
314
+ <polygon fill="#960052" points="587 900 641 695 886 900" />
315
+ <polygon fill="#b10088" points="1710 900 1401 632 1096 900" />
316
+ <polygon fill="#8f006d" points="1710 900 1401 632 1365 900" />
317
+ <polygon fill="#aa00aa" points="1210 900 971 687 725 900" />
318
+ <polygon fill="#880088" points="943 900 1210 900 971 687" />
319
+ </svg>
320
+ </ic-hero>`,
321
+
322
+ name: "Image right content",
323
+
324
+ parameters: {
325
+ layout: "fullscreen",
326
+ },
327
+ };
328
+
329
+ export const Theme = {
330
+ render: () =>
331
+ html`<ic-theme color="rgb(27, 60, 121)"></ic-theme>
332
+ <ic-hero
333
+ heading="Hero heading"
334
+ subheading="Hero description. This is a Hero component, it should be used as a page heading."
335
+ aligned="center"
336
+ >
337
+ <div slot="interaction" style="display: flex">
338
+ <ic-text-field
339
+ placeholder="Filter display"
340
+ label="Filter display"
341
+ hide-label
342
+ ></ic-text-field>
343
+ <ic-button variant="primary" style="margin-left: var(--ic-space-md)"
344
+ >Filter</ic-button
345
+ >
346
+ </div>
347
+ <ic-card
348
+ heading="Latest announcement"
349
+ message="This is some example text that can be included in the card copy."
350
+ slot="secondary"
351
+ ></ic-card>
352
+ </ic-hero>
353
+ <br />
354
+ <ic-button
355
+ variant="primary"
356
+ id="default-btn"
357
+ onClick="document.querySelector('ic-theme').color='rgb(27, 60, 121)'"
358
+ >
359
+ Default theme
360
+ </ic-button>
361
+ <ic-button
362
+ variant="primary"
363
+ id="custom-btn"
364
+ onClick="document.querySelector('ic-theme').color='rgb(255, 201, 60)'"
365
+ >
366
+ Sunrise theme
367
+ </ic-button> `,
368
+
369
+ name: "Theme",
370
+
371
+ parameters: {
372
+ layout: "fullscreen",
373
+ },
374
+ };
375
+
376
+ export const WithBackgroundImageParallaxEffect = {
377
+ render: () =>
378
+ html`<ic-theme color="rgb(27, 60, 121)"></ic-theme>
379
+ <ic-top-navigation app-title="Application Name">
380
+ <svg
381
+ slot="app-icon"
382
+ xmlns="http://www.w3.org/2000/svg"
383
+ height="24px"
384
+ viewBox="0 0 24 24"
385
+ width="24px"
386
+ fill="#000000"
387
+ >
388
+ <path d="M0 0h24v24H0V0z" fill="none" />
389
+ <path
390
+ 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"
391
+ />
392
+ </svg>
393
+ </ic-top-navigation>
394
+ <ic-hero
395
+ heading="Hero heading"
396
+ subheading="Hero description. This is a Hero component, it should be used as a page heading."
397
+ background-image="${image}"
398
+ >
399
+ <div slot="interaction">
400
+ <ic-button variant="primary" style="margin-right: var(--ic-space-md)"
401
+ >Button</ic-button
402
+ >
403
+ <ic-button
404
+ variant="secondary"
405
+ style="margin-right: var(--ic-space-md)"
406
+ >Button</ic-button
407
+ >
408
+ <ic-link
409
+ href="https://google.com"
410
+ style="margin-top: var(--ic-space-sm)"
411
+ >Help</ic-link
412
+ >
413
+ </div>
414
+ </ic-hero>
415
+ <br />
416
+ <ic-typography>You can scroll.</ic-typography>
417
+ <ic-button
418
+ variant="primary"
419
+ id="default-btn"
420
+ onClick="document.querySelector('ic-theme').color='rgb(27, 60, 121)'"
421
+ style="margin-bottom:1300px"
422
+ >
423
+ Reset theme
424
+ </ic-button>`,
425
+
426
+ name: "With background image (parallax effect)",
427
+
428
+ parameters: {
429
+ layout: "fullscreen",
430
+ },
431
+ };
432
+
433
+ export const WithBackgroundImageNoParallaxEffect = {
434
+ render: () =>
435
+ html`<ic-theme color="rgb(27, 60, 121)"></ic-theme>
436
+ <ic-top-navigation app-title="Application Name">
437
+ <svg
438
+ slot="app-icon"
439
+ xmlns="http://www.w3.org/2000/svg"
440
+ height="24px"
441
+ viewBox="0 0 24 24"
442
+ width="24px"
443
+ fill="#000000"
444
+ >
445
+ <path d="M0 0h24v24H0V0z" fill="none" />
446
+ <path
447
+ 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"
448
+ />
449
+ </svg>
450
+ </ic-top-navigation>
451
+ <ic-hero
452
+ heading="Hero heading"
453
+ subheading="Hero description. This is a Hero component, it should be used as a page heading."
454
+ background-image="${image}"
455
+ disable-background-parallax
456
+ >
457
+ <div slot="interaction">
458
+ <ic-button variant="primary" style="margin-right: var(--ic-space-md)"
459
+ >Button</ic-button
460
+ >
461
+ <ic-button
462
+ variant="secondary"
463
+ style="margin-right: var(--ic-space-md)"
464
+ >Button</ic-button
465
+ >
466
+ <ic-link
467
+ href="https://google.com"
468
+ style="margin-top: var(--ic-space-sm)"
469
+ >Help</ic-link
470
+ >
471
+ </div>
472
+ </ic-hero>
473
+ <br />
474
+ <ic-typography>You can scroll.</ic-typography>
475
+ <ic-button
476
+ variant="primary"
477
+ id="default-btn"
478
+ onClick="document.querySelector('ic-theme').color='rgb(27, 60, 121)'"
479
+ style="margin-bottom:1300px"
480
+ >
481
+ Reset theme
482
+ </ic-button>`,
483
+
484
+ name: "With background image (no parallax effect)",
485
+
486
+ parameters: {
487
+ layout: "fullscreen",
488
+ },
489
+ };
@@ -0,0 +1,114 @@
1
+ import { html } from "lit-html";
2
+
3
+ const defaultArgs = {
4
+ appearance: "default",
5
+ href: "/",
6
+ target: "",
7
+ };
8
+
9
+ export default {
10
+ title: "Web Components/Link",
11
+ component: "ic-link",
12
+ };
13
+
14
+ export const Default = {
15
+ render: () =>
16
+ html`<div>
17
+ <ic-link href="/">This is a link</ic-link>
18
+ <br />
19
+ <br />
20
+ <div style="width: 100px">
21
+ <ic-link href="/"
22
+ >This is a very very long link that goes multi-line</ic-link
23
+ >
24
+ </div>
25
+ </div>`,
26
+
27
+ name: "Default",
28
+
29
+ parameters: {
30
+ layout: "fullscreen",
31
+ },
32
+ };
33
+
34
+ export const WithIcon = {
35
+ render: () => html`<ic-link href="/" show-icon>This is a link</ic-link>`,
36
+ name: "With icon",
37
+
38
+ parameters: {
39
+ layout: "fullscreen",
40
+ },
41
+ };
42
+
43
+ export const DownloadLink = {
44
+ render: () => html`<ic-link href="/" download>Download File</ic-link>`,
45
+ name: "Download link",
46
+
47
+ parameters: {
48
+ layout: "fullscreen",
49
+ },
50
+ };
51
+
52
+ export const Dark = {
53
+ render: () =>
54
+ html`<ic-link href="/" appearance="dark" target="_blank"
55
+ >This is a link</ic-link
56
+ >`,
57
+
58
+ name: "Dark",
59
+
60
+ parameters: {
61
+ layout: "fullscreen",
62
+ },
63
+ };
64
+
65
+ export const Light = {
66
+ render: () =>
67
+ html` <ic-link href="/" appearance="light" show-icon
68
+ >This is a link</ic-link
69
+ >`,
70
+
71
+ name: "Light",
72
+
73
+ parameters: {
74
+ backgrounds: {
75
+ default: "dark",
76
+ },
77
+ },
78
+ };
79
+
80
+ export const Playground = {
81
+ render: (args) =>
82
+ html` <div
83
+ style="background-color: ${args.appearance == "light" ? "black" : ""}"
84
+ >
85
+ <ic-link
86
+ href=${args.href}
87
+ appearance=${args.appearance}
88
+ target=${args.target}
89
+ >This is a link</ic-link
90
+ >
91
+ </div>`,
92
+
93
+ args: defaultArgs,
94
+
95
+ argTypes: {
96
+ appearance: {
97
+ options: ["default", "light", "dark"],
98
+
99
+ control: {
100
+ type: "radio",
101
+ },
102
+ },
103
+
104
+ target: {
105
+ options: ["_blank", "_self", "_parent", "_top", ""],
106
+
107
+ control: {
108
+ type: "radio",
109
+ },
110
+ },
111
+ },
112
+
113
+ name: "Playground",
114
+ };