@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,356 @@
|
|
1
|
+
import { html } from "lit-html";
|
2
|
+
|
3
|
+
const defaultArgs = {
|
4
|
+
disableHover: false,
|
5
|
+
maxLines: 3,
|
6
|
+
placement: "bottom",
|
7
|
+
label: "This is a description of the button",
|
8
|
+
};
|
9
|
+
|
10
|
+
export default {
|
11
|
+
title: "Web Components/Tooltip",
|
12
|
+
component: "ic-tooltip",
|
13
|
+
};
|
14
|
+
|
15
|
+
export const Default = {
|
16
|
+
render: (args) =>
|
17
|
+
html`<ic-tooltip
|
18
|
+
label="This is a description of the button"
|
19
|
+
target="test-button-default"
|
20
|
+
id="ic-tooltip-test-button-default"
|
21
|
+
><button
|
22
|
+
id="test-button-default"
|
23
|
+
aria-describedby="ic-tooltip-test-button-default"
|
24
|
+
>
|
25
|
+
Default
|
26
|
+
</button></ic-tooltip
|
27
|
+
>`,
|
28
|
+
|
29
|
+
name: "Default",
|
30
|
+
height: "100px",
|
31
|
+
};
|
32
|
+
|
33
|
+
export const UsingExternalMethod = {
|
34
|
+
render: (args) =>
|
35
|
+
html`<script>
|
36
|
+
let display = true;
|
37
|
+
document
|
38
|
+
.querySelector("#clickMe")
|
39
|
+
.addEventListener("click", handleDisplay);
|
40
|
+
const tooltip = document.querySelector("ic-tooltip");
|
41
|
+
function handleDisplay() {
|
42
|
+
tooltip.displayTooltip(display, display);
|
43
|
+
display = !display;
|
44
|
+
}
|
45
|
+
</script>
|
46
|
+
<button id="clickMe">Show tooltip</button>
|
47
|
+
<ic-tooltip
|
48
|
+
label="This is a description of the button"
|
49
|
+
target="test-button-default"
|
50
|
+
id="ic-tooltip-test-button-default"
|
51
|
+
><button
|
52
|
+
id="test-button-default"
|
53
|
+
aria-describedby="ic-tooltip-test-button-default"
|
54
|
+
>
|
55
|
+
Default
|
56
|
+
</button></ic-tooltip
|
57
|
+
>`,
|
58
|
+
|
59
|
+
name: "Using external method",
|
60
|
+
height: "100px",
|
61
|
+
};
|
62
|
+
|
63
|
+
export const DisabledHover = {
|
64
|
+
render: (args) =>
|
65
|
+
html`<ic-tooltip
|
66
|
+
label="This shows 'Code' has been copied"
|
67
|
+
target="test-button-disable-hover"
|
68
|
+
id="ic-tooltip-test-button-disable-hover"
|
69
|
+
disable-hover="true"
|
70
|
+
><button
|
71
|
+
id="test-button-disable-hover"
|
72
|
+
aria-labelledby="ic-tooltip-test-button-disable-hover"
|
73
|
+
onclick="navigator.clipboard.writeText('Code')"
|
74
|
+
>
|
75
|
+
Show tooltip
|
76
|
+
</button></ic-tooltip
|
77
|
+
>`,
|
78
|
+
|
79
|
+
name: "Disabled Hover",
|
80
|
+
height: "100px",
|
81
|
+
};
|
82
|
+
|
83
|
+
export const TopPlacements = {
|
84
|
+
render: (args) =>
|
85
|
+
html` <div style="margin: 40px">
|
86
|
+
<ic-tooltip
|
87
|
+
placement="top-start"
|
88
|
+
label="This is a description of the button"
|
89
|
+
id="ic-tooltip-test-button-top-start"
|
90
|
+
target="test-button-top-start"
|
91
|
+
>
|
92
|
+
<button
|
93
|
+
id="test-button-top-start"
|
94
|
+
aria-describedby="ic-tooltip-test-button-top-start"
|
95
|
+
>
|
96
|
+
Top start
|
97
|
+
</button>
|
98
|
+
</ic-tooltip>
|
99
|
+
<ic-tooltip
|
100
|
+
placement="top"
|
101
|
+
label="This is a description of the button"
|
102
|
+
id="ic-tooltip-test-button-top"
|
103
|
+
target="test-button-top"
|
104
|
+
>
|
105
|
+
<button
|
106
|
+
id="test-button-top"
|
107
|
+
aria-describedby="ic-tooltip-test-button-top"
|
108
|
+
>
|
109
|
+
Top
|
110
|
+
</button>
|
111
|
+
</ic-tooltip>
|
112
|
+
<ic-tooltip
|
113
|
+
placement="top-end"
|
114
|
+
label="This is a description of the button"
|
115
|
+
id="ic-tooltip-test-button-top-end"
|
116
|
+
target="test-button-top-end"
|
117
|
+
>
|
118
|
+
<button
|
119
|
+
id="test-button-top-end"
|
120
|
+
aria-describedby="ic-tooltip-test-button-top-end"
|
121
|
+
>
|
122
|
+
Top end
|
123
|
+
</button></ic-tooltip
|
124
|
+
>
|
125
|
+
</div>`,
|
126
|
+
|
127
|
+
name: "Top placements",
|
128
|
+
};
|
129
|
+
|
130
|
+
export const BottomPlacements = {
|
131
|
+
render: (args) =>
|
132
|
+
html` <div style="margin: 40px">
|
133
|
+
<ic-tooltip
|
134
|
+
placement="bottom-start"
|
135
|
+
label="This is a description of the button"
|
136
|
+
id="ic-tooltip-test-button-bottom-start"
|
137
|
+
target="test-button-bottom-start"
|
138
|
+
>
|
139
|
+
<button
|
140
|
+
id="test-button-bottom-start"
|
141
|
+
aria-describedby="ic-tooltip-test-button-bottom-start"
|
142
|
+
>
|
143
|
+
Bottom start
|
144
|
+
</button>
|
145
|
+
</ic-tooltip>
|
146
|
+
<ic-tooltip
|
147
|
+
placement="bottom"
|
148
|
+
label="This is a description of the button"
|
149
|
+
id="ic-tooltip-test-button-bottom"
|
150
|
+
target="test-button-bottom"
|
151
|
+
>
|
152
|
+
<button
|
153
|
+
id="test-button-bottom"
|
154
|
+
aria-describedby="ic-tooltip-test-button-bottom"
|
155
|
+
>
|
156
|
+
Bottom
|
157
|
+
</button>
|
158
|
+
</ic-tooltip>
|
159
|
+
<ic-tooltip
|
160
|
+
placement="bottom-end"
|
161
|
+
label="This is a description of the button"
|
162
|
+
id="ic-tooltip-test-button-bottom-end"
|
163
|
+
target="test-button-bottom-end"
|
164
|
+
>
|
165
|
+
<button
|
166
|
+
id="test-button-bottom-end"
|
167
|
+
aria-describedby="ic-tooltip-test-button-bottom-end"
|
168
|
+
>
|
169
|
+
Bottom end
|
170
|
+
</button></ic-tooltip
|
171
|
+
>
|
172
|
+
</div>`,
|
173
|
+
|
174
|
+
name: "Bottom placements",
|
175
|
+
};
|
176
|
+
|
177
|
+
export const RightPlacements = {
|
178
|
+
render: (args) =>
|
179
|
+
html` <div style="margin: 40px">
|
180
|
+
<ic-tooltip
|
181
|
+
placement="right-start"
|
182
|
+
label="This is a description of the button"
|
183
|
+
id="ic-tooltip-test-button-right-start"
|
184
|
+
target="test-button-right-start"
|
185
|
+
>
|
186
|
+
<button
|
187
|
+
id="test-button-right-start"
|
188
|
+
aria-describedby="ic-tooltip-test-button-right-start"
|
189
|
+
>
|
190
|
+
Right start
|
191
|
+
</button>
|
192
|
+
</ic-tooltip>
|
193
|
+
<ic-tooltip
|
194
|
+
placement="right"
|
195
|
+
label="This is a description of the button"
|
196
|
+
id="ic-tooltip-test-button-right"
|
197
|
+
target="test-button-right"
|
198
|
+
>
|
199
|
+
<button
|
200
|
+
id="test-button-right"
|
201
|
+
aria-describedby="ic-tooltip-test-button-right"
|
202
|
+
>
|
203
|
+
Right
|
204
|
+
</button>
|
205
|
+
</ic-tooltip>
|
206
|
+
<ic-tooltip
|
207
|
+
placement="right-end"
|
208
|
+
label="This is a description of the button"
|
209
|
+
id="ic-tooltip-test-button-right-end"
|
210
|
+
target="test-button-right-end"
|
211
|
+
>
|
212
|
+
<button
|
213
|
+
id="test-button-right-end"
|
214
|
+
aria-describedby="ic-tooltip-test-button-right-end"
|
215
|
+
>
|
216
|
+
Right end
|
217
|
+
</button></ic-tooltip
|
218
|
+
>
|
219
|
+
</div>`,
|
220
|
+
|
221
|
+
name: "Right placements",
|
222
|
+
};
|
223
|
+
|
224
|
+
export const LeftPlacements = {
|
225
|
+
render: (args) =>
|
226
|
+
html` <div style="margin-left: 400px">
|
227
|
+
<ic-tooltip
|
228
|
+
placement="left-start"
|
229
|
+
label="This is a description of the button"
|
230
|
+
id="ic-tooltip-test-button-left-start"
|
231
|
+
target="test-button-left-start"
|
232
|
+
>
|
233
|
+
<button
|
234
|
+
id="test-button-left-start"
|
235
|
+
aria-describedby="ic-tooltip-test-button-left-start"
|
236
|
+
>
|
237
|
+
Left start
|
238
|
+
</button>
|
239
|
+
</ic-tooltip>
|
240
|
+
<ic-tooltip
|
241
|
+
placement="left"
|
242
|
+
label="This is a description of the button"
|
243
|
+
id="ic-tooltip-test-button-left"
|
244
|
+
target="test-button-left"
|
245
|
+
>
|
246
|
+
<button
|
247
|
+
id="test-button-left"
|
248
|
+
aria-describedby="ic-tooltip-test-button-left"
|
249
|
+
>
|
250
|
+
Left
|
251
|
+
</button>
|
252
|
+
</ic-tooltip>
|
253
|
+
<ic-tooltip
|
254
|
+
placement="left-end"
|
255
|
+
label="This is a description of the button"
|
256
|
+
id="ic-tooltip-test-button-left-end"
|
257
|
+
target="test-button-left-end"
|
258
|
+
>
|
259
|
+
<button
|
260
|
+
id="test-button-left-end"
|
261
|
+
aria-describedby="ic-tooltip-test-button-left-end"
|
262
|
+
>
|
263
|
+
Left end
|
264
|
+
</button></ic-tooltip
|
265
|
+
>
|
266
|
+
</div>`,
|
267
|
+
|
268
|
+
name: "Left placements",
|
269
|
+
};
|
270
|
+
|
271
|
+
export const Truncation = {
|
272
|
+
render: (args) =>
|
273
|
+
html`<ic-tooltip
|
274
|
+
label="This is a body of text that is truncated to three lines within a tooltip. It has been truncated based on the max-lines property. The number of lines in the text is clamped to the number passed through the max-lines property."
|
275
|
+
target="test-button-truncation"
|
276
|
+
max-lines="3"
|
277
|
+
id="ic-tooltip-test-button-truncation"
|
278
|
+
><button
|
279
|
+
id="test-button-truncation"
|
280
|
+
aria-describedby="ic-tooltip-test-button-truncation"
|
281
|
+
>
|
282
|
+
Default
|
283
|
+
</button></ic-tooltip
|
284
|
+
>`,
|
285
|
+
|
286
|
+
name: "Truncation",
|
287
|
+
height: "100px",
|
288
|
+
};
|
289
|
+
|
290
|
+
export const DarkBackground = {
|
291
|
+
render: (args) =>
|
292
|
+
html`<div style="height: 100px;background-color:#333333;">
|
293
|
+
<ic-tooltip
|
294
|
+
label="This is a description of the button"
|
295
|
+
id="ic-tooltip-test-button-dark"
|
296
|
+
target="test-button-dark"
|
297
|
+
>
|
298
|
+
<button
|
299
|
+
id="test-button-dark"
|
300
|
+
aria-describedby="ic-tooltip-test-button-dark"
|
301
|
+
>
|
302
|
+
Default
|
303
|
+
</button>
|
304
|
+
</ic-tooltip>
|
305
|
+
</div>`,
|
306
|
+
|
307
|
+
name: "Dark background",
|
308
|
+
};
|
309
|
+
|
310
|
+
export const Playground = {
|
311
|
+
render: (args) =>
|
312
|
+
html`<div style="margin: 250px">
|
313
|
+
<ic-tooltip
|
314
|
+
label=${args.label}
|
315
|
+
placement=${args.placement}
|
316
|
+
max-lines=${args.maxLines}
|
317
|
+
disable-hover=${args.disableHover}
|
318
|
+
id="ic-tooltip-test-button-default"
|
319
|
+
target="button-id"
|
320
|
+
>
|
321
|
+
<button
|
322
|
+
id="button-id"
|
323
|
+
aria-describedby="ic-tooltip-test-button-default"
|
324
|
+
>
|
325
|
+
Button 1
|
326
|
+
</button>
|
327
|
+
</ic-tooltip>
|
328
|
+
</div> `,
|
329
|
+
|
330
|
+
args: defaultArgs,
|
331
|
+
|
332
|
+
argTypes: {
|
333
|
+
placement: {
|
334
|
+
options: [
|
335
|
+
"bottom",
|
336
|
+
"top-start",
|
337
|
+
"top",
|
338
|
+
"top-end",
|
339
|
+
"right-start",
|
340
|
+
"right",
|
341
|
+
"right-end",
|
342
|
+
"bottom-end",
|
343
|
+
"bottom-start",
|
344
|
+
"left-end",
|
345
|
+
"left",
|
346
|
+
"left-start",
|
347
|
+
],
|
348
|
+
|
349
|
+
control: {
|
350
|
+
type: "select",
|
351
|
+
},
|
352
|
+
},
|
353
|
+
},
|
354
|
+
|
355
|
+
name: "Playground",
|
356
|
+
};
|