@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.
- package/README.md +1 -0
- package/dist/cjs/core.cjs.js +1 -1
- package/dist/cjs/ic-badge.cjs.entry.js +23 -0
- package/dist/cjs/ic-badge.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-button_3.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-navigation-button.cjs.entry.js +2 -2
- package/dist/cjs/ic-navigation-button.cjs.entry.js.map +1 -1
- 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/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +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.js +39 -1
- package/dist/collection/components/ic-badge/ic-badge.js.map +1 -1
- package/dist/collection/components/ic-badge/ic-badge.stories.js +1082 -0
- package/dist/collection/components/ic-badge/test/basic/ic-badge.spec.js +194 -0
- package/dist/collection/components/ic-badge/test/basic/ic-badge.spec.js.map +1 -1
- 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-button/ic-navigation-button.css +4 -0
- package/dist/collection/components/ic-navigation-button/ic-navigation-button.js +1 -1
- package/dist/collection/components/ic-navigation-button/ic-navigation-button.js.map +1 -1
- 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.js +2 -5
- package/dist/collection/components/ic-tooltip/ic-tooltip.js.map +1 -1
- 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-badge.js +25 -2
- package/dist/components/ic-badge.js.map +1 -1
- package/dist/components/ic-navigation-button.js +2 -2
- package/dist/components/ic-navigation-button.js.map +1 -1
- 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/components/ic-tooltip2.js.map +1 -1
- package/dist/core/core.esm.js +1 -1
- package/dist/core/core.esm.js.map +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-ba06cc95.entry.js.map +1 -1
- 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/core/p-c05474f3.entry.js +2 -0
- package/dist/core/p-c05474f3.entry.js.map +1 -0
- package/dist/core/{p-5d3c6ea1.entry.js → p-d0299926.entry.js} +2 -2
- package/dist/core/p-d0299926.entry.js.map +1 -0
- package/dist/esm/core.js +1 -1
- package/dist/esm/ic-badge.entry.js +23 -0
- package/dist/esm/ic-badge.entry.js.map +1 -1
- package/dist/esm/ic-button_3.entry.js.map +1 -1
- package/dist/esm/ic-navigation-button.entry.js +2 -2
- package/dist/esm/ic-navigation-button.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/dist/esm/loader.js +1 -1
- package/dist/types/components/ic-badge/ic-badge.d.ts +5 -0
- package/dist/types/components/ic-tooltip/ic-tooltip.d.ts +1 -1
- package/dist/types/components.d.ts +7 -0
- package/hydrate/index.js +30 -7
- package/package.json +17 -12
- package/vscode-data.json +4 -0
- package/dist/core/p-405d89bb.entry.js +0 -2
- package/dist/core/p-405d89bb.entry.js.map +0 -1
- package/dist/core/p-5d3c6ea1.entry.js.map +0 -1
- package/dist/core/p-dfb3e76e.entry.js +0 -2
- package/dist/core/p-dfb3e76e.entry.js.map +0 -1
@@ -0,0 +1,953 @@
|
|
1
|
+
import { html } from "lit-html";
|
2
|
+
|
3
|
+
const defaultArgs = {
|
4
|
+
disabled: false,
|
5
|
+
["full-width"]: false,
|
6
|
+
["helper-text"]: "Select one option from the list",
|
7
|
+
["hide-label"]: false,
|
8
|
+
loading: false,
|
9
|
+
loadingLabel: "Loading...",
|
10
|
+
label: "What is your favourite coffee?",
|
11
|
+
placeholder: "Select an option",
|
12
|
+
readonly: false,
|
13
|
+
required: false,
|
14
|
+
size: "default",
|
15
|
+
["validation-status"]: "none",
|
16
|
+
["validation-text"]: "",
|
17
|
+
["include-descriptions-in-search"]: false,
|
18
|
+
["include-group-titles-in-search"]: false,
|
19
|
+
["search-match-position"]: "anywhere",
|
20
|
+
};
|
21
|
+
|
22
|
+
export default {
|
23
|
+
title: "Web Components/Select/Searchable",
|
24
|
+
component: "ic-select",
|
25
|
+
};
|
26
|
+
|
27
|
+
export const Default = {
|
28
|
+
render: (args) =>
|
29
|
+
html`<ic-select
|
30
|
+
id="select-default"
|
31
|
+
label="What is your favourite coffee?"
|
32
|
+
searchable
|
33
|
+
></ic-select>
|
34
|
+
<script>
|
35
|
+
var select = document.querySelector("#select-default");
|
36
|
+
select.options = [
|
37
|
+
{ label: "Cappuccino", value: "Cap" },
|
38
|
+
{ label: "Latte", value: "Lat" },
|
39
|
+
{ label: "Americano", value: "Ame" },
|
40
|
+
{ label: "Filter", value: "Fil" },
|
41
|
+
{ label: "Flat white", value: "Fla" },
|
42
|
+
{ label: "Mocha", value: "Moc" },
|
43
|
+
{ label: "Macchiato", value: "Mac" },
|
44
|
+
];
|
45
|
+
select.addEventListener("icInput", function (event) {
|
46
|
+
console.log("icInput: " + event.detail.value);
|
47
|
+
});
|
48
|
+
select.addEventListener("icChange", function (event) {
|
49
|
+
console.log("icChange: " + event.detail.value);
|
50
|
+
});
|
51
|
+
select.addEventListener("icOptionSelect", function (event) {
|
52
|
+
console.log("icOptionSelect: " + event.detail.value);
|
53
|
+
});
|
54
|
+
select.addEventListener("icOpen", function () {
|
55
|
+
console.log("select dropdown opened");
|
56
|
+
});
|
57
|
+
select.addEventListener("icClose", function () {
|
58
|
+
console.log("select dropdown closed");
|
59
|
+
});
|
60
|
+
</script>`,
|
61
|
+
|
62
|
+
name: "Default",
|
63
|
+
};
|
64
|
+
|
65
|
+
export const AsyncDefault = {
|
66
|
+
render: (args) =>
|
67
|
+
html`<ic-select
|
68
|
+
id="select-async"
|
69
|
+
label="What is your favourite coffee?"
|
70
|
+
searchable
|
71
|
+
loading
|
72
|
+
></ic-select>
|
73
|
+
<script>
|
74
|
+
var select = document.querySelector("#select-async");
|
75
|
+
select.options = [];
|
76
|
+
setTimeout(() => {
|
77
|
+
select.options = [
|
78
|
+
{ label: "Cappuccino", value: "Cap" },
|
79
|
+
{ label: "Latte", value: "Lat" },
|
80
|
+
{ label: "Americano", value: "Ame" },
|
81
|
+
{ label: "Filter", value: "Fil" },
|
82
|
+
{ label: "Flat white", value: "Fla" },
|
83
|
+
{ label: "Mocha", value: "Moc" },
|
84
|
+
{ label: "Macchiato", value: "Mac" },
|
85
|
+
];
|
86
|
+
}, 5000);
|
87
|
+
select.addEventListener("icChange", function (event) {
|
88
|
+
console.log("icChange: " + event.detail.value);
|
89
|
+
});
|
90
|
+
</script>`,
|
91
|
+
|
92
|
+
name: "Async default",
|
93
|
+
};
|
94
|
+
|
95
|
+
export const DefaultValue = {
|
96
|
+
render: (args) =>
|
97
|
+
html`<ic-select
|
98
|
+
id="select-default-value"
|
99
|
+
label="What is your favourite coffee?"
|
100
|
+
searchable
|
101
|
+
></ic-select>
|
102
|
+
<script>
|
103
|
+
var select = document.querySelector("#select-default-value");
|
104
|
+
select.value = "Lat";
|
105
|
+
select.options = [
|
106
|
+
{ label: "Cappuccino", value: "Cap" },
|
107
|
+
{ label: "Latte", value: "Lat" },
|
108
|
+
{ label: "Americano", value: "Ame" },
|
109
|
+
{ label: "Filter", value: "Fil" },
|
110
|
+
{ label: "Flat white", value: "Fla" },
|
111
|
+
{ label: "Mocha", value: "Moc" },
|
112
|
+
{ label: "Macchiato", value: "Mac" },
|
113
|
+
];
|
114
|
+
select.addEventListener("icChange", function (event) {
|
115
|
+
console.log("icChange: " + event.detail.value);
|
116
|
+
});
|
117
|
+
</script>`,
|
118
|
+
|
119
|
+
name: "Default value",
|
120
|
+
};
|
121
|
+
|
122
|
+
export const FilterByStartOfOptions = {
|
123
|
+
render: (args) =>
|
124
|
+
html`<ic-select
|
125
|
+
id="select-filter-start"
|
126
|
+
label="What is your favourite coffee?"
|
127
|
+
searchable
|
128
|
+
search-match-position="start"
|
129
|
+
></ic-select>
|
130
|
+
<script>
|
131
|
+
var select = document.querySelector("#select-filter-start");
|
132
|
+
select.options = [
|
133
|
+
{ label: "Cappuccino", value: "Cap" },
|
134
|
+
{ label: "Latte", value: "Lat" },
|
135
|
+
{ label: "Americano", value: "Ame" },
|
136
|
+
{ label: "Filter", value: "Fil" },
|
137
|
+
{ label: "Flat white", value: "Fla" },
|
138
|
+
{ label: "Mocha", value: "Moc" },
|
139
|
+
{ label: "Macchiato", value: "Mac" },
|
140
|
+
];
|
141
|
+
select.addEventListener("icChange", function (event) {
|
142
|
+
console.log("icChange: " + event.detail.value);
|
143
|
+
});
|
144
|
+
</script>`,
|
145
|
+
|
146
|
+
name: "Filter by start of options",
|
147
|
+
};
|
148
|
+
|
149
|
+
export const WithDescriptions = {
|
150
|
+
render: (args) =>
|
151
|
+
html`<ic-select
|
152
|
+
id="select-descriptions"
|
153
|
+
label="What is your favourite coffee?"
|
154
|
+
searchable
|
155
|
+
></ic-select>
|
156
|
+
<script>
|
157
|
+
var select = document.querySelector("#select-descriptions");
|
158
|
+
select.options = [
|
159
|
+
{
|
160
|
+
label: "Cappuccino",
|
161
|
+
value: "Cap",
|
162
|
+
description: "Coffee frothed up with pressurised steam",
|
163
|
+
},
|
164
|
+
{
|
165
|
+
label: "Latte",
|
166
|
+
value: "Lat",
|
167
|
+
description: "A milkier coffee than a cappuccino",
|
168
|
+
},
|
169
|
+
{
|
170
|
+
label: "Americano",
|
171
|
+
value: "Ame",
|
172
|
+
description: "Espresso coffee diluted with hot water",
|
173
|
+
},
|
174
|
+
{
|
175
|
+
label: "Filter",
|
176
|
+
value: "Fil",
|
177
|
+
description: "Coffee filtered using paper or a mesh",
|
178
|
+
},
|
179
|
+
{
|
180
|
+
label: "Flat white",
|
181
|
+
value: "Fla",
|
182
|
+
description:
|
183
|
+
"Coffee without froth made with espresso and hot steamed milk",
|
184
|
+
},
|
185
|
+
{
|
186
|
+
label: "Mocha",
|
187
|
+
value: "Moc",
|
188
|
+
description: "A mixture of coffee and chocolate",
|
189
|
+
},
|
190
|
+
{
|
191
|
+
label: "Macchiato",
|
192
|
+
value: "Mac",
|
193
|
+
description: "Espresso coffee with a dash of frothy steamed milk",
|
194
|
+
},
|
195
|
+
];
|
196
|
+
select.addEventListener("icChange", function (event) {
|
197
|
+
console.log("icChange: " + event.detail.value);
|
198
|
+
});
|
199
|
+
</script>`,
|
200
|
+
|
201
|
+
name: "With descriptions",
|
202
|
+
};
|
203
|
+
|
204
|
+
export const WithDescriptionsIncludedInSearch = {
|
205
|
+
render: (args) =>
|
206
|
+
html`<ic-select
|
207
|
+
id="select-descriptions-included"
|
208
|
+
label="What is your favourite coffee?"
|
209
|
+
searchable
|
210
|
+
include-descriptions-in-search
|
211
|
+
></ic-select>
|
212
|
+
<script>
|
213
|
+
var select = document.querySelector("#select-descriptions-included");
|
214
|
+
select.options = [
|
215
|
+
{
|
216
|
+
label: "Cappuccino",
|
217
|
+
value: "Cap",
|
218
|
+
description: "Coffee frothed up with pressurised steam",
|
219
|
+
},
|
220
|
+
{
|
221
|
+
label: "Latte",
|
222
|
+
value: "Lat",
|
223
|
+
description: "A milkier coffee than a cappuccino",
|
224
|
+
},
|
225
|
+
{
|
226
|
+
label: "Americano",
|
227
|
+
value: "Ame",
|
228
|
+
description: "Espresso coffee diluted with hot water",
|
229
|
+
},
|
230
|
+
{
|
231
|
+
label: "Filter",
|
232
|
+
value: "Fil",
|
233
|
+
description: "Coffee filtered using paper or a mesh",
|
234
|
+
},
|
235
|
+
{
|
236
|
+
label: "Flat white",
|
237
|
+
value: "Fla",
|
238
|
+
description:
|
239
|
+
"Coffee without froth made with espresso and hot steamed milk",
|
240
|
+
},
|
241
|
+
{
|
242
|
+
label: "Mocha",
|
243
|
+
value: "Moc",
|
244
|
+
description: "A mixture of coffee and chocolate",
|
245
|
+
},
|
246
|
+
{
|
247
|
+
label: "Macchiato",
|
248
|
+
value: "Mac",
|
249
|
+
description: "Espresso coffee with a dash of frothy steamed milk",
|
250
|
+
},
|
251
|
+
];
|
252
|
+
select.addEventListener("icChange", function (event) {
|
253
|
+
console.log("icChange: " + event.detail.value);
|
254
|
+
});
|
255
|
+
</script>`,
|
256
|
+
|
257
|
+
name: "With descriptions (included in search)",
|
258
|
+
};
|
259
|
+
|
260
|
+
export const HelperText = {
|
261
|
+
render: (args) =>
|
262
|
+
html`<ic-select
|
263
|
+
id="select-helper"
|
264
|
+
label="What is your favourite coffee?"
|
265
|
+
searchable
|
266
|
+
helper-text="Select one option from the list"
|
267
|
+
></ic-select>
|
268
|
+
<script>
|
269
|
+
var select = document.querySelector("#select-helper");
|
270
|
+
select.options = [
|
271
|
+
{ label: "Cappuccino", value: "Cap" },
|
272
|
+
{ label: "Latte", value: "Lat" },
|
273
|
+
{ label: "Americano", value: "Ame" },
|
274
|
+
{ label: "Filter", value: "Fil" },
|
275
|
+
{ label: "Flat white", value: "Fla" },
|
276
|
+
{ label: "Mocha", value: "Moc" },
|
277
|
+
{ label: "Macchiato", value: "Mac" },
|
278
|
+
];
|
279
|
+
select.addEventListener("icChange", function (event) {
|
280
|
+
console.log("icChange: " + event.detail.value);
|
281
|
+
});
|
282
|
+
</script>`,
|
283
|
+
|
284
|
+
name: "Helper text",
|
285
|
+
};
|
286
|
+
|
287
|
+
export const Sizes = {
|
288
|
+
render: (args) =>
|
289
|
+
html`<div style="display: flex; flex-direction: column; gap: 16px;">
|
290
|
+
<ic-select
|
291
|
+
id="select-size-small"
|
292
|
+
label="What is your favourite coffee?"
|
293
|
+
searchable
|
294
|
+
size="small"
|
295
|
+
></ic-select>
|
296
|
+
<script>
|
297
|
+
var select = document.querySelector("#select-size-small");
|
298
|
+
select.options = [
|
299
|
+
{ label: "Cappuccino", value: "Cap" },
|
300
|
+
{ label: "Latte", value: "Lat" },
|
301
|
+
{ label: "Americano", value: "Ame" },
|
302
|
+
{ label: "Filter", value: "Fil" },
|
303
|
+
{ label: "Flat white", value: "Fla" },
|
304
|
+
{ label: "Mocha", value: "Moc" },
|
305
|
+
{ label: "Macchiato", value: "Mac" },
|
306
|
+
];
|
307
|
+
select.addEventListener("icChange", function (event) {
|
308
|
+
console.log("icChange: " + event.detail.value);
|
309
|
+
});
|
310
|
+
</script>
|
311
|
+
<ic-select
|
312
|
+
id="select-size-default"
|
313
|
+
label="What is your favourite coffee?"
|
314
|
+
searchable
|
315
|
+
></ic-select>
|
316
|
+
<script>
|
317
|
+
var select = document.querySelector("#select-size-default");
|
318
|
+
select.options = [
|
319
|
+
{ label: "Cappuccino", value: "Cap" },
|
320
|
+
{ label: "Latte", value: "Lat" },
|
321
|
+
{ label: "Americano", value: "Ame" },
|
322
|
+
{ label: "Filter", value: "Fil" },
|
323
|
+
{ label: "Flat white", value: "Fla" },
|
324
|
+
{ label: "Mocha", value: "Moc" },
|
325
|
+
{ label: "Macchiato", value: "Mac" },
|
326
|
+
];
|
327
|
+
select.addEventListener("icChange", function (event) {
|
328
|
+
console.log("icChange: " + event.detail.value);
|
329
|
+
});
|
330
|
+
</script>
|
331
|
+
<ic-select
|
332
|
+
id="select-size-large"
|
333
|
+
label="What is your favourite coffee?"
|
334
|
+
searchable
|
335
|
+
size="large"
|
336
|
+
></ic-select>
|
337
|
+
<script>
|
338
|
+
var select = document.querySelector("#select-size-large");
|
339
|
+
select.options = [
|
340
|
+
{ label: "Cappuccino", value: "Cap" },
|
341
|
+
{ label: "Latte", value: "Lat" },
|
342
|
+
{ label: "Americano", value: "Ame" },
|
343
|
+
{ label: "Filter", value: "Fil" },
|
344
|
+
{ label: "Flat white", value: "Fla" },
|
345
|
+
{ label: "Mocha", value: "Moc" },
|
346
|
+
{ label: "Macchiato", value: "Mac" },
|
347
|
+
];
|
348
|
+
select.addEventListener("icChange", function (event) {
|
349
|
+
console.log("icChange: " + event.detail.value);
|
350
|
+
});
|
351
|
+
</script>
|
352
|
+
</div>`,
|
353
|
+
|
354
|
+
name: "Sizes",
|
355
|
+
};
|
356
|
+
|
357
|
+
export const Disabled = {
|
358
|
+
render: (args) =>
|
359
|
+
html`<ic-select
|
360
|
+
id="select-disabled"
|
361
|
+
label="What is your favourite coffee?"
|
362
|
+
searchable
|
363
|
+
disabled
|
364
|
+
></ic-select>
|
365
|
+
<script>
|
366
|
+
var select = document.querySelector("#select-disabled");
|
367
|
+
select.options = [
|
368
|
+
{ label: "Cappuccino", value: "Cap" },
|
369
|
+
{ label: "Latte", value: "Lat" },
|
370
|
+
{ label: "Americano", value: "Ame" },
|
371
|
+
{ label: "Filter", value: "Fil" },
|
372
|
+
{ label: "Flat white", value: "Fla" },
|
373
|
+
{ label: "Mocha", value: "Moc" },
|
374
|
+
{ label: "Macchiato", value: "Mac" },
|
375
|
+
];
|
376
|
+
select.addEventListener("icChange", function (event) {
|
377
|
+
console.log("icChange: " + event.detail.value);
|
378
|
+
});
|
379
|
+
</script>`,
|
380
|
+
|
381
|
+
name: "Disabled",
|
382
|
+
};
|
383
|
+
|
384
|
+
export const DisabledOptions = {
|
385
|
+
render: (args) =>
|
386
|
+
html`<ic-select
|
387
|
+
id="select-disabled-options"
|
388
|
+
label="What is your favourite coffee?"
|
389
|
+
searchable
|
390
|
+
></ic-select>
|
391
|
+
<script>
|
392
|
+
var select = document.querySelector("#select-disabled-options");
|
393
|
+
select.options = [
|
394
|
+
{ label: "Cappuccino", value: "Cap" },
|
395
|
+
{ label: "Latte", value: "Lat" },
|
396
|
+
{ label: "Americano", value: "Ame", disabled: true },
|
397
|
+
{ label: "Filter", value: "Fil", disabled: true },
|
398
|
+
{ label: "Flat white", value: "Fla" },
|
399
|
+
{ label: "Mocha", value: "Moc" },
|
400
|
+
{ label: "Macchiato", value: "Mac", disabled: true },
|
401
|
+
];
|
402
|
+
select.addEventListener("icChange", function (event) {
|
403
|
+
console.log("icChange: " + event.detail.value);
|
404
|
+
});
|
405
|
+
</script>`,
|
406
|
+
|
407
|
+
name: "Disabled options",
|
408
|
+
};
|
409
|
+
|
410
|
+
export const HiddenLabel = {
|
411
|
+
render: (args) =>
|
412
|
+
html`<ic-select
|
413
|
+
id="select-hidden-label"
|
414
|
+
label="What is your favourite coffee?"
|
415
|
+
searchable
|
416
|
+
hide-label
|
417
|
+
></ic-select>
|
418
|
+
<script>
|
419
|
+
var select = document.querySelector("#select-hidden-label");
|
420
|
+
select.options = [
|
421
|
+
{ label: "Cappuccino", value: "Cap" },
|
422
|
+
{ label: "Latte", value: "Lat" },
|
423
|
+
{ label: "Americano", value: "Ame" },
|
424
|
+
{ label: "Filter", value: "Fil" },
|
425
|
+
{ label: "Flat white", value: "Fla" },
|
426
|
+
{ label: "Mocha", value: "Moc" },
|
427
|
+
{ label: "Macchiato", value: "Mac" },
|
428
|
+
];
|
429
|
+
select.addEventListener("icChange", function (event) {
|
430
|
+
console.log("icChange: " + event.detail.value);
|
431
|
+
});
|
432
|
+
</script>`,
|
433
|
+
|
434
|
+
name: "Hidden label",
|
435
|
+
};
|
436
|
+
|
437
|
+
export const Required = {
|
438
|
+
render: (args) =>
|
439
|
+
html`<ic-select
|
440
|
+
id="select-required"
|
441
|
+
label="What is your favourite coffee?"
|
442
|
+
searchable
|
443
|
+
required
|
444
|
+
></ic-select>
|
445
|
+
<script>
|
446
|
+
var select = document.querySelector("#select-required");
|
447
|
+
select.options = [
|
448
|
+
{ label: "Cappuccino", value: "Cap" },
|
449
|
+
{ label: "Latte", value: "Lat" },
|
450
|
+
{ label: "Americano", value: "Ame" },
|
451
|
+
{ label: "Filter", value: "Fil" },
|
452
|
+
{ label: "Flat white", value: "Fla" },
|
453
|
+
{ label: "Mocha", value: "Moc" },
|
454
|
+
{ label: "Macchiato", value: "Mac" },
|
455
|
+
];
|
456
|
+
select.addEventListener("icChange", function (event) {
|
457
|
+
console.log("icChange: " + event.detail.value);
|
458
|
+
});
|
459
|
+
</script>`,
|
460
|
+
|
461
|
+
name: "Required",
|
462
|
+
};
|
463
|
+
|
464
|
+
export const Groups = {
|
465
|
+
render: (args) =>
|
466
|
+
html`<ic-select
|
467
|
+
id="select-groups"
|
468
|
+
label="What is your favourite coffee?"
|
469
|
+
searchable
|
470
|
+
></ic-select>
|
471
|
+
<script>
|
472
|
+
var select = document.querySelector("#select-groups");
|
473
|
+
select.options = [
|
474
|
+
{
|
475
|
+
label: "Fancy",
|
476
|
+
children: [
|
477
|
+
{ label: "Cappuccino", value: "Cap" },
|
478
|
+
{ label: "Flat white", value: "Fla" },
|
479
|
+
],
|
480
|
+
},
|
481
|
+
{
|
482
|
+
label: "Boring",
|
483
|
+
children: [
|
484
|
+
{ label: "Filter", value: "Fil" },
|
485
|
+
{ label: "Latte", value: "Lat" },
|
486
|
+
],
|
487
|
+
},
|
488
|
+
];
|
489
|
+
select.addEventListener("icChange", function (event) {
|
490
|
+
console.log("icChange: " + event.detail.value);
|
491
|
+
});
|
492
|
+
</script>`,
|
493
|
+
|
494
|
+
name: "Groups",
|
495
|
+
};
|
496
|
+
|
497
|
+
export const GroupsGroupTitlesIncludedInSearch = {
|
498
|
+
render: (args) =>
|
499
|
+
html`<ic-select
|
500
|
+
id="select-groups-included"
|
501
|
+
label="What is your favourite coffee?"
|
502
|
+
searchable
|
503
|
+
include-group-titles-in-search
|
504
|
+
></ic-select>
|
505
|
+
<script>
|
506
|
+
var select = document.querySelector("#select-groups-included");
|
507
|
+
select.options = [
|
508
|
+
{
|
509
|
+
label: "Fancy",
|
510
|
+
children: [
|
511
|
+
{ label: "Cappuccino", value: "Cap" },
|
512
|
+
{ label: "Flat white", value: "Fla" },
|
513
|
+
],
|
514
|
+
},
|
515
|
+
{
|
516
|
+
label: "Boring",
|
517
|
+
children: [
|
518
|
+
{ label: "Filter", value: "Fil" },
|
519
|
+
{ label: "Latte", value: "Lat" },
|
520
|
+
],
|
521
|
+
},
|
522
|
+
];
|
523
|
+
select.addEventListener("icChange", function (event) {
|
524
|
+
console.log("icChange: " + event.detail.value);
|
525
|
+
});
|
526
|
+
</script>`,
|
527
|
+
|
528
|
+
name: "Groups (group titles included in search)",
|
529
|
+
};
|
530
|
+
|
531
|
+
export const Recommended = {
|
532
|
+
render: (args) =>
|
533
|
+
html`<ic-select
|
534
|
+
id="select-recommended"
|
535
|
+
label="What is your favourite coffee?"
|
536
|
+
searchable
|
537
|
+
></ic-select>
|
538
|
+
<script>
|
539
|
+
var select = document.querySelector("#select-recommended");
|
540
|
+
select.options = [
|
541
|
+
{ label: "Cappuccino", value: "Cappuccino" },
|
542
|
+
{ label: "Flat white", value: "Flat white", recommended: true },
|
543
|
+
{ label: "Latte", value: "Latte" },
|
544
|
+
{ label: "Americano", value: "Americano", recommended: true },
|
545
|
+
{ label: "Filter", value: "Fil" },
|
546
|
+
{ label: "Mocha", value: "Moc" },
|
547
|
+
{ label: "Macchiato", value: "Mac" },
|
548
|
+
];
|
549
|
+
select.addEventListener("icChange", function (event) {
|
550
|
+
console.log("icChange: " + event.detail.value);
|
551
|
+
});
|
552
|
+
</script>`,
|
553
|
+
|
554
|
+
name: "Recommended",
|
555
|
+
};
|
556
|
+
|
557
|
+
export const Validation = {
|
558
|
+
render: (args) =>
|
559
|
+
html`<ic-select
|
560
|
+
id="select-success"
|
561
|
+
label="What is your favourite coffee?"
|
562
|
+
validation-status="success"
|
563
|
+
validation-text="Coffee available"
|
564
|
+
searchable
|
565
|
+
></ic-select>
|
566
|
+
<script>
|
567
|
+
var select1 = document.querySelector("#select-success");
|
568
|
+
var option1 = "Cappuccino";
|
569
|
+
select1.options = [
|
570
|
+
{ label: "Cappuccino", value: "Cap" },
|
571
|
+
{ label: "Latte", value: "Lat" },
|
572
|
+
{ label: "Americano", value: "Ame" },
|
573
|
+
{ label: "Filter", value: "Fil" },
|
574
|
+
{ label: "Flat white", value: "Fla" },
|
575
|
+
{ label: "Mocha", value: "Moc" },
|
576
|
+
{ label: "Macchiato", value: "Mac" },
|
577
|
+
];
|
578
|
+
select1.addEventListener("icChange", function (event) {
|
579
|
+
console.log("icChange: " + event.detail.value);
|
580
|
+
});
|
581
|
+
</script>
|
582
|
+
<ic-select
|
583
|
+
id="select-warning"
|
584
|
+
label="What is your favourite coffee?"
|
585
|
+
validation-status="warning"
|
586
|
+
validation-text="Only a few left"
|
587
|
+
searchable
|
588
|
+
></ic-select>
|
589
|
+
<script>
|
590
|
+
var select2 = document.querySelector("#select-warning");
|
591
|
+
var option2 = "Cappuccino";
|
592
|
+
select2.options = [
|
593
|
+
{ label: "Cappuccino", value: "Cap" },
|
594
|
+
{ label: "Latte", value: "Lat" },
|
595
|
+
{ label: "Americano", value: "Ame" },
|
596
|
+
{ label: "Filter", value: "Fil" },
|
597
|
+
{ label: "Flat white", value: "Fla" },
|
598
|
+
{ label: "Mocha", value: "Moc" },
|
599
|
+
{ label: "Macchiato", value: "Mac" },
|
600
|
+
];
|
601
|
+
select2.addEventListener("icChange", function (event) {
|
602
|
+
console.log("icChange: " + event.detail.value);
|
603
|
+
});
|
604
|
+
</script>
|
605
|
+
<ic-select
|
606
|
+
id="select-error"
|
607
|
+
label="What is your favourite coffee?"
|
608
|
+
validation-status="error"
|
609
|
+
validation-text="Coffee unavailable"
|
610
|
+
searchable
|
611
|
+
></ic-select>
|
612
|
+
<script>
|
613
|
+
var select3 = document.querySelector("#select-error");
|
614
|
+
var option3 = "Cappuccino";
|
615
|
+
select3.options = [
|
616
|
+
{ label: "Cappuccino", value: "Cap" },
|
617
|
+
{ label: "Latte", value: "Lat" },
|
618
|
+
{ label: "Americano", value: "Ame" },
|
619
|
+
{ label: "Filter", value: "Fil" },
|
620
|
+
{ label: "Flat white", value: "Fla" },
|
621
|
+
{ label: "Mocha", value: "Moc" },
|
622
|
+
{ label: "Macchiato", value: "Mac" },
|
623
|
+
];
|
624
|
+
select3.addEventListener("icChange", function (event) {
|
625
|
+
console.log("icChange: " + event.detail.value);
|
626
|
+
});
|
627
|
+
</script>`,
|
628
|
+
|
629
|
+
name: "Validation",
|
630
|
+
};
|
631
|
+
|
632
|
+
export const ScrollBehaviour = {
|
633
|
+
render: (args) =>
|
634
|
+
html`<ic-select
|
635
|
+
id="select-scroll"
|
636
|
+
label="What is your favourite coffee?"
|
637
|
+
searchable
|
638
|
+
></ic-select>
|
639
|
+
<script>
|
640
|
+
var select = document.querySelector("#select-scroll");
|
641
|
+
select.options = [
|
642
|
+
{ label: "Cappuccino", value: "Cap" },
|
643
|
+
{ label: "Latte", value: "Lat" },
|
644
|
+
{ label: "Americano", value: "Ame" },
|
645
|
+
{ label: "Filter", value: "Fil" },
|
646
|
+
{ label: "Flat white", value: "Fla" },
|
647
|
+
{ label: "Mocha", value: "Moc" },
|
648
|
+
{ label: "Macchiato", value: "Mac" },
|
649
|
+
{ label: "Café au lait", value: "Caf" },
|
650
|
+
{ label: "Espresso", value: "Esp" },
|
651
|
+
{ label: "Cortado", value: "Cor" },
|
652
|
+
{ label: "Ristretto", value: "Ris" },
|
653
|
+
];
|
654
|
+
select.addEventListener("icChange", function (event) {
|
655
|
+
console.log("icChange: " + event.detail.value);
|
656
|
+
});
|
657
|
+
</script>`,
|
658
|
+
|
659
|
+
name: "Scroll behaviour",
|
660
|
+
};
|
661
|
+
|
662
|
+
export const ExternalFiltering = {
|
663
|
+
render: (args) =>
|
664
|
+
html`<ic-select
|
665
|
+
label="What is your favourite coffee?"
|
666
|
+
searchable
|
667
|
+
debounce="300"
|
668
|
+
disable-filter
|
669
|
+
id="select-external-filtering"
|
670
|
+
timeout="1000"
|
671
|
+
></ic-select>
|
672
|
+
<br />
|
673
|
+
<ic-typography>
|
674
|
+
Suggested search options: Espresso, Double Espresso, Flat White, Filter,
|
675
|
+
Cappuccino, Americano, Mocha, Macchiato.
|
676
|
+
</ic-typography>
|
677
|
+
<br />
|
678
|
+
<ic-typography>
|
679
|
+
The IcChange event will trigger 300ms after you finish typing. 1 second
|
680
|
+
later, the options in the select menu will be updated.
|
681
|
+
</ic-typography>
|
682
|
+
<script>
|
683
|
+
var mockData = [
|
684
|
+
{ label: "Espresso", value: "Esp" },
|
685
|
+
{ label: "Double Espresso", value: "Dou" },
|
686
|
+
{ label: "Cappuccino", value: "Cap" },
|
687
|
+
{ label: "Latte", value: "Lat" },
|
688
|
+
{ label: "Americano", value: "Ame" },
|
689
|
+
{ label: "Filter", value: "Fil" },
|
690
|
+
{ label: "Flat white", value: "Fla" },
|
691
|
+
{ label: "Mocha", value: "Moc" },
|
692
|
+
{ label: "Macchiato", value: "Mac" },
|
693
|
+
];
|
694
|
+
function handleFilter(event) {
|
695
|
+
var option = event.detail.value;
|
696
|
+
console.log(option);
|
697
|
+
if (option !== selectedValue) {
|
698
|
+
if (option) {
|
699
|
+
select.loading = true;
|
700
|
+
mockAPI = (query) => {
|
701
|
+
filteredResults = mockData.filter((m) =>
|
702
|
+
m.label.toLowerCase().includes(query.toLowerCase())
|
703
|
+
);
|
704
|
+
return new Promise((resolve) =>
|
705
|
+
setTimeout(
|
706
|
+
() => resolve(filteredResults),
|
707
|
+
event.type === "icChange" ? 2000 : 900
|
708
|
+
)
|
709
|
+
);
|
710
|
+
};
|
711
|
+
mockAPI(option).then((results) => (select.options = results));
|
712
|
+
} else {
|
713
|
+
select.options = [];
|
714
|
+
}
|
715
|
+
}
|
716
|
+
}
|
717
|
+
var select = document.querySelector("#select-external-filtering");
|
718
|
+
var selectedValue = "";
|
719
|
+
select.addEventListener("icClear", function (event) {
|
720
|
+
select.options = [];
|
721
|
+
});
|
722
|
+
select.addEventListener("icOptionSelect", function (event) {
|
723
|
+
selectedValue = event.detail.value;
|
724
|
+
});
|
725
|
+
select.addEventListener("icChange", handleFilter);
|
726
|
+
select.addEventListener("icRetryLoad", handleFilter);
|
727
|
+
</script>`,
|
728
|
+
|
729
|
+
name: "External filtering",
|
730
|
+
};
|
731
|
+
|
732
|
+
export const InForm = {
|
733
|
+
render: (args) => html`
|
734
|
+
<form>
|
735
|
+
<ic-select
|
736
|
+
id="select-form"
|
737
|
+
label="What is your favourite coffee?"
|
738
|
+
searchable
|
739
|
+
></ic-select>
|
740
|
+
<br />
|
741
|
+
<br />
|
742
|
+
<input type="submit" value="Submit" />
|
743
|
+
<input type="reset" value="Reset" />
|
744
|
+
</form>
|
745
|
+
<script>
|
746
|
+
var select = document.querySelector("#select-form");
|
747
|
+
select.options = [
|
748
|
+
{ label: "Cappuccino", value: "Cap" },
|
749
|
+
{ label: "Latte", value: "Lat" },
|
750
|
+
{ label: "Americano", value: "Ame" },
|
751
|
+
];
|
752
|
+
select.addEventListener("icChange", function (event) {
|
753
|
+
console.log("icChange: " + event.detail.value);
|
754
|
+
});
|
755
|
+
document.querySelector("form").addEventListener("submit", (ev) => {
|
756
|
+
ev.preventDefault();
|
757
|
+
console.log(document.querySelector("input.ic-input").value);
|
758
|
+
});
|
759
|
+
</script>
|
760
|
+
`,
|
761
|
+
|
762
|
+
name: "In form",
|
763
|
+
};
|
764
|
+
|
765
|
+
export const UpdateInputValueFromExternalRequest = {
|
766
|
+
render: (args) =>
|
767
|
+
html`<ic-section-container>
|
768
|
+
<ic-select
|
769
|
+
id="select-external-request"
|
770
|
+
searchable
|
771
|
+
label="What is your favourite coffee? (searchable)"
|
772
|
+
></ic-select>
|
773
|
+
</ic-section-container>
|
774
|
+
<script>
|
775
|
+
const searchSelect = document.getElementById("select-external-request");
|
776
|
+
let options = [];
|
777
|
+
options.push({ label: "unknown", value: "unknown" });
|
778
|
+
options.push({ label: "item 1", value: "item-1" });
|
779
|
+
options.push({ label: "item 2", value: "item-2" });
|
780
|
+
options.push({ label: "item 3", value: "item-3" });
|
781
|
+
searchSelect.options = options;
|
782
|
+
let searchoption = "";
|
783
|
+
searchSelect.addEventListener("icChange", function (event) {
|
784
|
+
console.log("icChange", event.detail.value);
|
785
|
+
searchoption = event.detail.value;
|
786
|
+
if (searchoption === "unknown") {
|
787
|
+
searchoption = "item-1";
|
788
|
+
searchSelect.value = "item-1";
|
789
|
+
} else {
|
790
|
+
searchSelect.value = searchoption;
|
791
|
+
}
|
792
|
+
});
|
793
|
+
searchSelect.addEventListener("icOptionSelect", function (event) {
|
794
|
+
console.log("icOptionSelect: " + event.detail.value);
|
795
|
+
});
|
796
|
+
</script>`,
|
797
|
+
|
798
|
+
name: "Update input value from external request",
|
799
|
+
};
|
800
|
+
|
801
|
+
export const EmittingIcOptionSelectOnEnter = {
|
802
|
+
render: (args) =>
|
803
|
+
html`<ic-select
|
804
|
+
id="select-icoptionselect"
|
805
|
+
label="What is your favourite coffee?"
|
806
|
+
select-on-enter
|
807
|
+
searchable
|
808
|
+
></ic-select>
|
809
|
+
<script>
|
810
|
+
var select = document.querySelector("#select-icoptionselect");
|
811
|
+
select.options = [
|
812
|
+
{ label: "Cappuccino", value: "Cap" },
|
813
|
+
{ label: "Latte", value: "Lat" },
|
814
|
+
{ label: "Americano", value: "Ame" },
|
815
|
+
];
|
816
|
+
select.addEventListener("icOptionSelect", function (event) {
|
817
|
+
console.log("icOptionSelect: " + event.detail.value);
|
818
|
+
});
|
819
|
+
</script>`,
|
820
|
+
|
821
|
+
name: "Emitting icOptionSelect on enter",
|
822
|
+
};
|
823
|
+
|
824
|
+
export const Playground = {
|
825
|
+
render: (args) =>
|
826
|
+
html` <ic-select
|
827
|
+
id="select-playground"
|
828
|
+
disabled=${args.disabled}
|
829
|
+
full-width=${args["full-width"]}
|
830
|
+
helper-text=${args["helper-text"]}
|
831
|
+
hide-label=${args["hide-label"]}
|
832
|
+
include-descriptions-in-search=${args["include-descriptions-in-search"]}
|
833
|
+
include-group-titles-in-search=${args["include-group-titles-in-search"]}
|
834
|
+
loading=${args.loading}
|
835
|
+
loading-label=${args["loading-label"]}
|
836
|
+
label=${args.label}
|
837
|
+
placeholder=${args.placeholder}
|
838
|
+
readonly=${args.readonly}
|
839
|
+
required=${args.required}
|
840
|
+
search-match-position=${args["search-match-position"]}
|
841
|
+
searchable
|
842
|
+
size=${args.size}
|
843
|
+
validation-status=${args["validation-status"]}
|
844
|
+
validation-text=${args["validation-text"]}
|
845
|
+
>
|
846
|
+
${args.showIcon &&
|
847
|
+
html` <svg
|
848
|
+
slot="icon"
|
849
|
+
xmlns="http://www.w3.org/2000/svg"
|
850
|
+
height="24px"
|
851
|
+
viewBox="0 0 24 24"
|
852
|
+
width="24px"
|
853
|
+
fill="#000000"
|
854
|
+
>
|
855
|
+
<path d="M0 0h24v24H0z" fill="none" />
|
856
|
+
<path
|
857
|
+
d="M17 3H7c-1.1 0-1.99.9-1.99 2L5 21l7-3 7 3V5c0-1.1-.9-2-2-2z"
|
858
|
+
/>
|
859
|
+
</svg>`}
|
860
|
+
</ic-select>
|
861
|
+
<script>
|
862
|
+
var select = document.querySelector("#select-playground");
|
863
|
+
select.options = [
|
864
|
+
{
|
865
|
+
label: "Cappuccino",
|
866
|
+
value: "Cap",
|
867
|
+
description: "Coffee frothed up with pressurised steam",
|
868
|
+
},
|
869
|
+
{
|
870
|
+
label: "Boring",
|
871
|
+
children: [
|
872
|
+
{
|
873
|
+
label: "Latte",
|
874
|
+
value: "Lat",
|
875
|
+
description: "A milkier coffee than a cappuccino",
|
876
|
+
},
|
877
|
+
{
|
878
|
+
label: "Filter",
|
879
|
+
value: "Fil",
|
880
|
+
description: "Coffee filtered using paper or a mesh",
|
881
|
+
},
|
882
|
+
],
|
883
|
+
},
|
884
|
+
{
|
885
|
+
label: "Fancy",
|
886
|
+
children: [
|
887
|
+
{
|
888
|
+
label: "Flat white",
|
889
|
+
value: "Fla",
|
890
|
+
description:
|
891
|
+
"Coffee without froth made with espresso and hot steamed milk",
|
892
|
+
},
|
893
|
+
{
|
894
|
+
label: "Macchiato",
|
895
|
+
value: "Mac",
|
896
|
+
description:
|
897
|
+
"Espresso coffee with a dash of frothy steamed milk",
|
898
|
+
},
|
899
|
+
],
|
900
|
+
},
|
901
|
+
{
|
902
|
+
label: "Americano",
|
903
|
+
value: "Ame",
|
904
|
+
description: "Espresso coffee diluted with hot water",
|
905
|
+
},
|
906
|
+
{
|
907
|
+
label: "Mocha",
|
908
|
+
value: "Moc",
|
909
|
+
description: "A mixture of coffee and chocolate",
|
910
|
+
},
|
911
|
+
];
|
912
|
+
select.addEventListener("icChange", function (event) {
|
913
|
+
console.log("icChange: " + event.detail.value);
|
914
|
+
});
|
915
|
+
</script>`,
|
916
|
+
|
917
|
+
name: "Playground",
|
918
|
+
args: defaultArgs,
|
919
|
+
|
920
|
+
argTypes: {
|
921
|
+
["search-match-position"]: {
|
922
|
+
defaultValue: "anywhere",
|
923
|
+
options: ["anywhere", "start"],
|
924
|
+
|
925
|
+
control: {
|
926
|
+
type: "inline-radio",
|
927
|
+
},
|
928
|
+
},
|
929
|
+
|
930
|
+
["validation-status"]: {
|
931
|
+
defaultValue: "",
|
932
|
+
options: ["", "error", "success", "warning"],
|
933
|
+
|
934
|
+
control: {
|
935
|
+
type: "select",
|
936
|
+
},
|
937
|
+
},
|
938
|
+
|
939
|
+
size: {
|
940
|
+
options: ["small", "default", "large"],
|
941
|
+
|
942
|
+
control: {
|
943
|
+
type: "inline-radio",
|
944
|
+
},
|
945
|
+
},
|
946
|
+
|
947
|
+
showIcon: {
|
948
|
+
control: {
|
949
|
+
type: "boolean",
|
950
|
+
},
|
951
|
+
},
|
952
|
+
},
|
953
|
+
};
|