@ukic/react 3.4.0 → 3.6.0
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/dist/core/core.css +67 -49
- package/dist/performance-tests/App.js +109 -7
- package/dist/performance-tests/pages/IcAccordion/IcAccordionMultiple/index.d.ts +6 -0
- package/dist/performance-tests/pages/IcAccordion/IcAccordionMultiple/index.js +25 -0
- package/dist/performance-tests/pages/IcAccordion/IcAccordionSingle/index.d.ts +6 -0
- package/dist/performance-tests/pages/IcAccordion/IcAccordionSingle/index.js +17 -0
- package/dist/performance-tests/pages/IcButton/IcButtonMultiple/index.d.ts +6 -0
- package/dist/performance-tests/pages/IcButton/IcButtonMultiple/index.js +15 -0
- package/dist/performance-tests/pages/IcButton/IcButtonSingle/index.d.ts +6 -0
- package/dist/performance-tests/pages/IcButton/IcButtonSingle/index.js +12 -0
- package/dist/performance-tests/pages/IcButton/IcButtonVariants/index.d.ts +6 -0
- package/dist/performance-tests/pages/IcButton/IcButtonVariants/index.js +50 -0
- package/dist/performance-tests/pages/IcButton/IcButtonWithEvents/index.d.ts +6 -0
- package/dist/performance-tests/pages/IcButton/IcButtonWithEvents/index.js +18 -0
- package/dist/performance-tests/pages/IcCheckbox/IcCheckboxBasicMultiple/index.d.ts +6 -0
- package/dist/performance-tests/pages/IcCheckbox/IcCheckboxBasicMultiple/index.js +44 -0
- package/dist/performance-tests/pages/IcCheckbox/IcCheckboxMultiple/index.d.ts +6 -0
- package/dist/performance-tests/pages/IcCheckbox/IcCheckboxMultiple/index.js +33 -0
- package/dist/performance-tests/pages/IcCheckbox/IcCheckboxSingle/index.d.ts +6 -0
- package/dist/performance-tests/pages/IcCheckbox/IcCheckboxSingle/index.js +25 -0
- package/dist/performance-tests/pages/IcDialog/IcDialogAllOpen/index.d.ts +6 -0
- package/dist/performance-tests/pages/IcDialog/IcDialogAllOpen/index.js +16 -0
- package/dist/performance-tests/pages/IcDialog/IcDialogMultiple/index.d.ts +6 -0
- package/dist/performance-tests/pages/IcDialog/IcDialogMultiple/index.js +146 -0
- package/dist/performance-tests/pages/IcDialog/IcDialogSingle/index.d.ts +6 -0
- package/dist/performance-tests/pages/IcDialog/IcDialogSingle/index.js +27 -0
- package/dist/performance-tests/pages/IcDialog/IcDialogSlottedContent/index.d.ts +6 -0
- package/dist/performance-tests/pages/IcDialog/IcDialogSlottedContent/index.js +38 -0
- package/dist/performance-tests/pages/IcFooter/index.d.ts +6 -0
- package/dist/performance-tests/pages/IcFooter/index.js +38 -0
- package/dist/performance-tests/pages/IcHero/index.d.ts +6 -0
- package/dist/performance-tests/pages/IcHero/index.js +18 -0
- package/dist/performance-tests/pages/IcPageHeader/index.d.ts +6 -0
- package/dist/performance-tests/pages/IcPageHeader/index.js +24 -0
- package/dist/performance-tests/pages/IcPopoverMenu/IcPopoverMenuMultiple/index.d.ts +6 -0
- package/dist/performance-tests/pages/IcPopoverMenu/IcPopoverMenuMultiple/index.js +51 -0
- package/dist/performance-tests/pages/IcPopoverMenu/IcPopoverMenuMultipleNotRendered/index.d.ts +6 -0
- package/dist/performance-tests/pages/IcPopoverMenu/IcPopoverMenuMultipleNotRendered/index.js +51 -0
- package/dist/performance-tests/pages/IcPopoverMenu/IcPopoverMenuSingle/index.d.ts +6 -0
- package/dist/performance-tests/pages/IcPopoverMenu/IcPopoverMenuSingle/index.js +37 -0
- package/dist/performance-tests/pages/IcRadio/IcRadioMultiple/index.d.ts +6 -0
- package/dist/performance-tests/pages/IcRadio/IcRadioMultiple/index.js +32 -0
- package/dist/performance-tests/pages/IcRadio/IcRadioSingle/index.d.ts +6 -0
- package/dist/performance-tests/pages/IcRadio/IcRadioSingle/index.js +22 -0
- package/dist/performance-tests/pages/IcRadio/IcRadioVariants/index.d.ts +6 -0
- package/dist/performance-tests/pages/IcRadio/IcRadioVariants/index.js +84 -0
- package/dist/performance-tests/pages/IcSearchBar/IcSearchBarMultiple/index.d.ts +6 -0
- package/dist/performance-tests/pages/IcSearchBar/IcSearchBarMultiple/index.js +49 -0
- package/dist/performance-tests/pages/IcSearchBar/IcSearchBarSingle/index.d.ts +6 -0
- package/dist/performance-tests/pages/IcSearchBar/IcSearchBarSingle/index.js +23 -0
- package/dist/performance-tests/pages/IcSearchBar/IcSearchBarVariants/index.d.ts +6 -0
- package/dist/performance-tests/pages/IcSearchBar/IcSearchBarVariants/index.js +63 -0
- package/dist/performance-tests/pages/IcSelect/Multi/IcSelectMultiMultiple/index.d.ts +6 -0
- package/dist/performance-tests/pages/IcSelect/Multi/IcSelectMultiMultiple/index.js +58 -0
- package/dist/performance-tests/pages/IcSelect/Multi/IcSelectMultiSingle/index.d.ts +6 -0
- package/dist/performance-tests/pages/IcSelect/Multi/IcSelectMultiSingle/index.js +55 -0
- package/dist/performance-tests/pages/IcSelect/Multi/IcSelectMultiVariants/index.d.ts +6 -0
- package/dist/performance-tests/pages/IcSelect/Multi/IcSelectMultiVariants/index.js +115 -0
- package/dist/performance-tests/pages/IcSelect/Searchable/IcSelectSearchableMultiple/index.d.ts +6 -0
- package/dist/performance-tests/pages/IcSelect/Searchable/IcSelectSearchableMultiple/index.js +58 -0
- package/dist/performance-tests/pages/IcSelect/Searchable/IcSelectSearchableSingle/index.d.ts +6 -0
- package/dist/performance-tests/pages/IcSelect/Searchable/IcSelectSearchableSingle/index.js +55 -0
- package/dist/performance-tests/pages/IcSelect/Searchable/IcSelectSearchableVariants/index.d.ts +6 -0
- package/dist/performance-tests/pages/IcSelect/Searchable/IcSelectSearchableVariants/index.js +115 -0
- package/dist/performance-tests/pages/IcSelect/Single/IcSelectMultiple/index.d.ts +6 -0
- package/dist/performance-tests/pages/IcSelect/Single/IcSelectMultiple/index.js +58 -0
- package/dist/performance-tests/pages/IcSelect/Single/IcSelectSingle/index.d.ts +6 -0
- package/dist/performance-tests/pages/IcSelect/Single/IcSelectSingle/index.js +35 -0
- package/dist/performance-tests/pages/IcSelect/Single/IcSelectVariants/index.d.ts +6 -0
- package/dist/performance-tests/pages/IcSelect/Single/IcSelectVariants/index.js +115 -0
- package/dist/performance-tests/pages/IcSideNavigation/IcSideNavigationClosed/index.d.ts +6 -0
- package/dist/performance-tests/pages/IcSideNavigation/IcSideNavigationClosed/index.js +43 -0
- package/dist/performance-tests/pages/IcSideNavigation/IcSideNavigationExpanded/index.d.ts +6 -0
- package/dist/performance-tests/pages/IcSideNavigation/IcSideNavigationExpanded/index.js +42 -0
- package/dist/performance-tests/pages/IcStepper/index.d.ts +6 -0
- package/dist/performance-tests/pages/IcStepper/index.js +29 -0
- package/dist/performance-tests/pages/IcToast/IcToastMultiple/index.d.ts +6 -0
- package/dist/performance-tests/pages/IcToast/IcToastMultiple/index.js +30 -0
- package/dist/performance-tests/pages/IcToast/IcToastSingle/index.d.ts +6 -0
- package/dist/performance-tests/pages/IcToast/IcToastSingle/index.js +23 -0
- package/dist/performance-tests/pages/IcToast/IcToastVariants/index.d.ts +6 -0
- package/dist/performance-tests/pages/IcToast/IcToastVariants/index.js +87 -0
- package/dist/performance-tests/pages/IcTopNavigation/IcTopNavigationBasic/index.d.ts +6 -0
- package/dist/performance-tests/pages/IcTopNavigation/IcTopNavigationBasic/index.js +17 -0
- package/dist/performance-tests/pages/IcTopNavigation/IcTopNavigationWithNavigation/index.d.ts +6 -0
- package/dist/performance-tests/pages/IcTopNavigation/IcTopNavigationWithNavigation/index.js +35 -0
- package/package.json +3 -3
- package/dist/performance-tests/pages/IcButton/index.d.ts +0 -3
- package/dist/performance-tests/pages/IcButton/index.js +0 -8
- package/dist/performance-tests/pages/IcCheckbox/index.d.ts +0 -3
- package/dist/performance-tests/pages/IcCheckbox/index.js +0 -15
- package/dist/performance-tests/pages/MultipleIcButtons/index.d.ts +0 -3
- package/dist/performance-tests/pages/MultipleIcButtons/index.js +0 -18
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
// / IcSelectMultiSinglePage displays a single multi-select component for performance testing of the IcSelect component.
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { IcSelect, IcTheme, IcTypography } from "../../../../../components";
|
|
4
|
+
var options = [
|
|
5
|
+
{
|
|
6
|
+
label: "Cappuccino",
|
|
7
|
+
value: "Cap",
|
|
8
|
+
description: "Coffee frothed up with pressurised steam",
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
label: "Latte",
|
|
12
|
+
value: "Lat",
|
|
13
|
+
description: "A milkier coffee than a cappuccino",
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
label: "Americano",
|
|
17
|
+
value: "Ame",
|
|
18
|
+
description: "Espresso coffee diluted with hot water",
|
|
19
|
+
disabled: true,
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
label: "Filter",
|
|
23
|
+
value: "Fil",
|
|
24
|
+
description: "Coffee filtered using paper or a mesh",
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
label: "Flat white",
|
|
28
|
+
value: "Fla",
|
|
29
|
+
description: "Coffee without froth made with espresso and hot steamed milk",
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
label: "Mocha",
|
|
33
|
+
value: "Moc",
|
|
34
|
+
description: "A mixture of coffee and chocolate",
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
label: "Macchiato",
|
|
38
|
+
value: "Mac",
|
|
39
|
+
description: "Espresso coffee with a dash of frothy steamed milk",
|
|
40
|
+
icon: "<svg aria-labelledby=\"warning-title\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"#000000\"><g id=\"warning\"><path id=\"Vector\" d=\"M4.47 20.5037H19.53C21.07 20.5037 22.03 18.8337 21.26 17.5037L13.73 4.49375C12.96 3.16375 11.04 3.16375 10.27 4.49375L2.74 17.5037C1.97 18.8337 2.93 20.5037 4.47 20.5037ZM12 13.5037C11.45 13.5037 11 13.0537 11 12.5037V10.5037C11 9.95375 11.45 9.50375 12 9.50375C12.55 9.50375 13 9.95375 13 10.5037V12.5037C13 13.0537 12.55 13.5037 12 13.5037ZM13 17.5037H11V15.5037H13V17.5037Z\" /></g></svg>",
|
|
41
|
+
},
|
|
42
|
+
];
|
|
43
|
+
var IcSelectMultiSinglePage = function (_a) {
|
|
44
|
+
var theme = _a.theme;
|
|
45
|
+
return (React.createElement(IcTheme, { id: "theme-wrapper", theme: theme },
|
|
46
|
+
React.createElement("div", { style: { padding: "var(--ic-space-md)" } },
|
|
47
|
+
React.createElement(IcTypography, { variant: "subtitle-small" },
|
|
48
|
+
React.createElement("h1", null, "Select Multi Page")),
|
|
49
|
+
React.createElement(IcSelect, { label: "What is your favourite coffee?", required: true, options: options, multiple: true, showClearButton: true, helperText: "Select one or more options from the list", onIcChange: function (ev) { return console.log("icChange: ".concat(ev.detail.value)); }, onIcBlur: function () { return console.log("Select blurred"); }, onIcFocus: function () { return console.log("Select focused"); }, onIcInput: function (ev) { return console.log("icInput: ".concat(ev.detail.value)); }, onIcOptionSelect: function (ev) {
|
|
50
|
+
return console.log("icOptionSelect: ".concat(ev.detail.value));
|
|
51
|
+
}, onIcOptionDeselect: function (ev) {
|
|
52
|
+
return console.log("icOptionDeselect: ".concat(ev.detail.value));
|
|
53
|
+
}, onIcOpen: function () { return console.log("select dropdown opened"); }, onIcClose: function () { return console.log("select dropdown closed"); }, onIcClear: function () { return console.log("clear all clicked"); } }))));
|
|
54
|
+
};
|
|
55
|
+
export default IcSelectMultiSinglePage;
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
// IcSelectMultiVariantsPage displays multiple variants of multi-select for performance testing of the IcSelect component.
|
|
13
|
+
import React from "react";
|
|
14
|
+
import { IcSelect, IcTheme, IcTypography } from "../../../../../components";
|
|
15
|
+
var options = [
|
|
16
|
+
{ label: "Cappuccino", value: "Cap" },
|
|
17
|
+
{ label: "Latte", value: "Lat" },
|
|
18
|
+
{ label: "Americano", value: "Ame" },
|
|
19
|
+
{ label: "Filter", value: "Fil" },
|
|
20
|
+
{ label: "Flat white", value: "Fla" },
|
|
21
|
+
{ label: "Mocha", value: "Moc" },
|
|
22
|
+
{ label: "Macchiato", value: "Mac" },
|
|
23
|
+
{ label: "Café au lait", value: "Caf" },
|
|
24
|
+
{ label: "Espresso", value: "Esp" },
|
|
25
|
+
{ label: "Cortado", value: "Cor" },
|
|
26
|
+
{ label: "Ristretto", value: "Ris" },
|
|
27
|
+
{ label: "Latte macchiato", value: "Lam" },
|
|
28
|
+
];
|
|
29
|
+
var groupedOptions = [
|
|
30
|
+
{
|
|
31
|
+
label: "Fancy",
|
|
32
|
+
children: [
|
|
33
|
+
{ label: "Cappuccino", value: "Cap" },
|
|
34
|
+
{ label: "Flat white", value: "Flat" },
|
|
35
|
+
{ label: "Macchiato", value: "Mac" },
|
|
36
|
+
],
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
label: "Boring",
|
|
40
|
+
children: [
|
|
41
|
+
{ label: "Filter", value: "Fil" },
|
|
42
|
+
{ label: "Latte", value: "Lat" },
|
|
43
|
+
{ label: "Americano", value: "Ame" },
|
|
44
|
+
],
|
|
45
|
+
},
|
|
46
|
+
];
|
|
47
|
+
var optionsWithRecommended = [
|
|
48
|
+
{ label: "Cappuccino", value: "Cappuccino" },
|
|
49
|
+
{ label: "Flat white", value: "Flat white", recommended: true },
|
|
50
|
+
{ label: "Latte", value: "Latte" },
|
|
51
|
+
{ label: "Americano", value: "Americano", recommended: true },
|
|
52
|
+
{ label: "Filter", value: "Fil" },
|
|
53
|
+
];
|
|
54
|
+
var optionsWithCustomElements = [
|
|
55
|
+
{
|
|
56
|
+
label: "Cappuccino",
|
|
57
|
+
value: "Cap",
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
label: "Latte",
|
|
61
|
+
value: "Lat",
|
|
62
|
+
element: {
|
|
63
|
+
component: "<ic-status-tag label=\"Neutral status\"></ic-status-tag>",
|
|
64
|
+
ariaLabel: "Neutral status tag",
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
label: "Americano",
|
|
69
|
+
value: "Ame",
|
|
70
|
+
icon: "<svg aria-labelledby=\"warning-title\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"#000000\"><g id=\"warning\"><path id=\"Vector\" d=\"M4.47 20.5037H19.53C21.07 20.5037 22.03 18.8337 21.26 17.5037L13.73 4.49375C12.96 3.16375 11.04 3.16375 10.27 4.49375L2.74 17.5037C1.97 18.8337 2.93 20.5037 4.47 20.5037ZM12 13.5037C11.45 13.5037 11 13.0537 11 12.5037V10.5037C11 9.95375 11.45 9.50375 12 9.50375C12.55 9.50375 13 9.95375 13 10.5037V12.5037C13 13.0537 12.55 13.5037 12 13.5037ZM13 17.5037H11V15.5037H13V17.5037Z\" /></g></svg>",
|
|
71
|
+
},
|
|
72
|
+
];
|
|
73
|
+
var defaultSelectEvents = {
|
|
74
|
+
onIcChange: function (ev) { return console.log("icChange: ".concat(ev.detail.value)); },
|
|
75
|
+
onIcBlur: function () { return console.log("Select blurred"); },
|
|
76
|
+
onIcFocus: function () { return console.log("Select focused"); },
|
|
77
|
+
onIcInput: function (ev) { return console.log("icInput: ".concat(ev.detail.value)); },
|
|
78
|
+
onIcOptionSelect: function (ev) {
|
|
79
|
+
return console.log("icOptionSelect: ".concat(ev.detail.value));
|
|
80
|
+
},
|
|
81
|
+
onIcOptionDeselect: function (ev) {
|
|
82
|
+
return console.log("icOptionDeselect: ".concat(ev.detail.value));
|
|
83
|
+
},
|
|
84
|
+
onIcOpen: function () { return console.log("select dropdown opened"); },
|
|
85
|
+
onIcClose: function () { return console.log("select dropdown closed"); },
|
|
86
|
+
onIcClear: function () { return console.log("clear all clicked"); },
|
|
87
|
+
};
|
|
88
|
+
var IcSelectMultiVariantsPage = function (_a) {
|
|
89
|
+
var theme = _a.theme;
|
|
90
|
+
return (React.createElement(IcTheme, { id: "theme-wrapper", theme: theme },
|
|
91
|
+
React.createElement(IcTypography, { variant: "subtitle-small", style: { padding: "var(--ic-space-md)" } },
|
|
92
|
+
React.createElement("h1", null, "Select Multi Variants Page")),
|
|
93
|
+
React.createElement("div", { style: {
|
|
94
|
+
display: "flex",
|
|
95
|
+
flexWrap: "wrap",
|
|
96
|
+
gap: "1rem",
|
|
97
|
+
margin: "1rem",
|
|
98
|
+
width: "fit-content",
|
|
99
|
+
padding: "10px",
|
|
100
|
+
} },
|
|
101
|
+
React.createElement(IcSelect, __assign({ label: "What is your favourite coffee?", options: options, multiple: true, value: ["Cap"], showClearButton: true, helperText: "Select one or more options from the list" }, defaultSelectEvents)),
|
|
102
|
+
React.createElement(IcSelect, __assign({ label: "What is your favourite coffee?", options: groupedOptions, multiple: true, showClearButton: true, helperText: "Select one or more options from the list" }, defaultSelectEvents)),
|
|
103
|
+
React.createElement(IcSelect, __assign({ label: "What is your favourite coffee?", options: optionsWithRecommended, multiple: true, showClearButton: true, helperText: "Select one or more options from the list" }, defaultSelectEvents)),
|
|
104
|
+
React.createElement(IcSelect, __assign({ label: "What is your favourite coffee?", disabled: true, options: options, multiple: true, helperText: "Select one or more options from the list" }, defaultSelectEvents)),
|
|
105
|
+
React.createElement(IcSelect, __assign({ label: "What is your favourite coffee?", readonly: true, options: options, multiple: true, value: ["Cap", "Fla", "Moc"], helperText: "Select one or more options from the list" }, defaultSelectEvents)),
|
|
106
|
+
React.createElement(IcSelect, __assign({ label: "What is your favourite coffee?", placeholder: "Placeholder goes here", options: options, multiple: true, helperText: "Select one or more options from the list" }, defaultSelectEvents)),
|
|
107
|
+
React.createElement(IcSelect, __assign({ label: "What is your favourite coffee?", options: optionsWithCustomElements, multiple: true, helperText: "Select one or more options from the list" }, defaultSelectEvents)),
|
|
108
|
+
React.createElement(IcSelect, __assign({ label: "What is your favourite coffee?", options: options, multiple: true, size: "small", helperText: "Select one or more options from the list" }, defaultSelectEvents)),
|
|
109
|
+
React.createElement(IcSelect, __assign({ label: "What is your favourite coffee?", options: options, multiple: true, size: "large", helperText: "Select one or more options from the list" }, defaultSelectEvents)),
|
|
110
|
+
React.createElement(IcSelect, __assign({ label: "What is your favourite coffee?", fullWidth: true, options: options, multiple: true, helperText: "Select one or more options from the list" }, defaultSelectEvents)),
|
|
111
|
+
React.createElement(IcSelect, __assign({ label: "What is your favourite coffee?", validationStatus: "success", validationText: "Coffee available", options: options, multiple: true }, defaultSelectEvents)),
|
|
112
|
+
React.createElement(IcSelect, __assign({ label: "What is your favourite coffee?", validationStatus: "warning", validationText: "Only a few left", options: options, multiple: true }, defaultSelectEvents)),
|
|
113
|
+
React.createElement(IcSelect, __assign({ label: "What is your favourite coffee?", validationStatus: "error", validationText: "Coffee unavailable", options: options, multiple: true }, defaultSelectEvents)))));
|
|
114
|
+
};
|
|
115
|
+
export default IcSelectMultiVariantsPage;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
// IcSelectSearchableMultiplePage displays multiple searchable select components for performance testing of the IcSelect component.
|
|
13
|
+
import React from "react";
|
|
14
|
+
import { IcSelect, IcTheme, IcTypography } from "../../../../../components";
|
|
15
|
+
var options = [
|
|
16
|
+
{ label: "Cappuccino", value: "Cap" },
|
|
17
|
+
{ label: "Latte", value: "Lat" },
|
|
18
|
+
{ label: "Americano", value: "Ame" },
|
|
19
|
+
{ label: "Filter", value: "Fil" },
|
|
20
|
+
{ label: "Flat white", value: "Fla" },
|
|
21
|
+
{ label: "Mocha", value: "Moc" },
|
|
22
|
+
{ label: "Macchiato", value: "Mac" },
|
|
23
|
+
{ label: "Café au lait", value: "Caf" },
|
|
24
|
+
{ label: "Espresso", value: "Esp" },
|
|
25
|
+
{ label: "Cortado", value: "Cor" },
|
|
26
|
+
{ label: "Ristretto", value: "Ris" },
|
|
27
|
+
{ label: "Latte macchiato", value: "Lam" },
|
|
28
|
+
];
|
|
29
|
+
var selectEvents = {
|
|
30
|
+
onIcChange: function (ev) { return console.log("icChange: ".concat(ev.detail.value)); },
|
|
31
|
+
onIcBlur: function () { return console.log("Select blurred"); },
|
|
32
|
+
onIcFocus: function () { return console.log("Select focused"); },
|
|
33
|
+
onIcInput: function (ev) { return console.log("icInput: ".concat(ev.detail.value)); },
|
|
34
|
+
onIcOptionSelect: function (ev) {
|
|
35
|
+
return console.log("icOptionSelect: ".concat(ev.detail.value));
|
|
36
|
+
},
|
|
37
|
+
onIcOptionDeselect: function (ev) {
|
|
38
|
+
return console.log("icOptionDeselect: ".concat(ev.detail.value));
|
|
39
|
+
},
|
|
40
|
+
onIcOpen: function () { return console.log("select dropdown opened"); },
|
|
41
|
+
onIcClose: function () { return console.log("select dropdown closed"); },
|
|
42
|
+
onIcClear: function () { return console.log("clear all clicked"); },
|
|
43
|
+
};
|
|
44
|
+
var IcSelectSearchableMultiplePage = function (_a) {
|
|
45
|
+
var theme = _a.theme;
|
|
46
|
+
return (React.createElement(IcTheme, { id: "theme-wrapper", theme: theme },
|
|
47
|
+
React.createElement(IcTypography, { variant: "subtitle-small", style: { padding: "var(--ic-space-md)" } },
|
|
48
|
+
React.createElement("h1", null, "Select Searchable Multiple Page")),
|
|
49
|
+
React.createElement("div", { style: {
|
|
50
|
+
display: "flex",
|
|
51
|
+
flexWrap: "wrap",
|
|
52
|
+
gap: "1rem",
|
|
53
|
+
margin: "1rem",
|
|
54
|
+
width: "fit-content",
|
|
55
|
+
padding: "10px",
|
|
56
|
+
} }, Array.from({ length: 20 }, function (_, i) { return (React.createElement(IcSelect, __assign({ key: i, label: "What is your favourite coffee?", options: options, searchable: true, showClearButton: true, helperText: "Select one option from the list" }, selectEvents))); }))));
|
|
57
|
+
};
|
|
58
|
+
export default IcSelectSearchableMultiplePage;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
// IcSelectSearchableSinglePage displays a single searchable select component for performance testing of the IcSelect component.
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { IcSelect, IcTheme, IcTypography } from "../../../../../components";
|
|
4
|
+
var options = [
|
|
5
|
+
{
|
|
6
|
+
label: "Cappuccino",
|
|
7
|
+
value: "Cap",
|
|
8
|
+
description: "Coffee frothed up with pressurised steam",
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
label: "Latte",
|
|
12
|
+
value: "Lat",
|
|
13
|
+
description: "A milkier coffee than a cappuccino",
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
label: "Americano",
|
|
17
|
+
value: "Ame",
|
|
18
|
+
description: "Espresso coffee diluted with hot water",
|
|
19
|
+
disabled: true,
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
label: "Filter",
|
|
23
|
+
value: "Fil",
|
|
24
|
+
description: "Coffee filtered using paper or a mesh",
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
label: "Flat white",
|
|
28
|
+
value: "Fla",
|
|
29
|
+
description: "Coffee without froth made with espresso and hot steamed milk",
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
label: "Mocha",
|
|
33
|
+
value: "Moc",
|
|
34
|
+
description: "A mixture of coffee and chocolate",
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
label: "Macchiato",
|
|
38
|
+
value: "Mac",
|
|
39
|
+
description: "Espresso coffee with a dash of frothy steamed milk",
|
|
40
|
+
icon: "<svg aria-labelledby=\"warning-title\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"#000000\"><g id=\"warning\"><path id=\"Vector\" d=\"M4.47 20.5037H19.53C21.07 20.5037 22.03 18.8337 21.26 17.5037L13.73 4.49375C12.96 3.16375 11.04 3.16375 10.27 4.49375L2.74 17.5037C1.97 18.8337 2.93 20.5037 4.47 20.5037ZM12 13.5037C11.45 13.5037 11 13.0537 11 12.5037V10.5037C11 9.95375 11.45 9.50375 12 9.50375C12.55 9.50375 13 9.95375 13 10.5037V12.5037C13 13.0537 12.55 13.5037 12 13.5037ZM13 17.5037H11V15.5037H13V17.5037Z\" /></g></svg>",
|
|
41
|
+
},
|
|
42
|
+
];
|
|
43
|
+
var IcSearchableSelectSinglePage = function (_a) {
|
|
44
|
+
var theme = _a.theme;
|
|
45
|
+
return (React.createElement(IcTheme, { id: "theme-wrapper", theme: theme },
|
|
46
|
+
React.createElement("div", { style: { padding: "var(--ic-space-md)" } },
|
|
47
|
+
React.createElement(IcTypography, { variant: "subtitle-small" },
|
|
48
|
+
React.createElement("h1", null, "Select Searchable Page")),
|
|
49
|
+
React.createElement(IcSelect, { label: "What is your favourite coffee?", searchable: true, includeDescriptionsInSearch: true, required: true, options: options, showClearButton: true, helperText: "Select one option from the list", onIcChange: function (ev) { return console.log("icChange: ".concat(ev.detail.value)); }, onIcBlur: function () { return console.log("Select blurred"); }, onIcFocus: function () { return console.log("Select focused"); }, onIcInput: function (ev) { return console.log("icInput: ".concat(ev.detail.value)); }, onIcOptionSelect: function (ev) {
|
|
50
|
+
return console.log("icOptionSelect: ".concat(ev.detail.value));
|
|
51
|
+
}, onIcOptionDeselect: function (ev) {
|
|
52
|
+
return console.log("icOptionDeselect: ".concat(ev.detail.value));
|
|
53
|
+
}, onIcOpen: function () { return console.log("select dropdown opened"); }, onIcClose: function () { return console.log("select dropdown closed"); }, onIcClear: function () { return console.log("clear all clicked"); } }))));
|
|
54
|
+
};
|
|
55
|
+
export default IcSearchableSelectSinglePage;
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
// IcSelectSearchableVariantsPage displays various searchable select components for performance testing of the IcSelect component.
|
|
13
|
+
import React from "react";
|
|
14
|
+
import { IcSelect, IcTheme, IcTypography } from "../../../../../components";
|
|
15
|
+
var options = [
|
|
16
|
+
{ label: "Cappuccino", value: "Cap" },
|
|
17
|
+
{ label: "Latte", value: "Lat" },
|
|
18
|
+
{ label: "Americano", value: "Ame" },
|
|
19
|
+
{ label: "Filter", value: "Fil" },
|
|
20
|
+
{ label: "Flat white", value: "Fla" },
|
|
21
|
+
{ label: "Mocha", value: "Moc" },
|
|
22
|
+
{ label: "Macchiato", value: "Mac" },
|
|
23
|
+
{ label: "Café au lait", value: "Caf" },
|
|
24
|
+
{ label: "Espresso", value: "Esp" },
|
|
25
|
+
{ label: "Cortado", value: "Cor" },
|
|
26
|
+
{ label: "Ristretto", value: "Ris" },
|
|
27
|
+
{ label: "Latte macchiato", value: "Lam" },
|
|
28
|
+
];
|
|
29
|
+
var groupedOptions = [
|
|
30
|
+
{
|
|
31
|
+
label: "Fancy",
|
|
32
|
+
children: [
|
|
33
|
+
{ label: "Cappuccino", value: "Cap" },
|
|
34
|
+
{ label: "Flat white", value: "Flat" },
|
|
35
|
+
{ label: "Macchiato", value: "Mac" },
|
|
36
|
+
],
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
label: "Boring",
|
|
40
|
+
children: [
|
|
41
|
+
{ label: "Filter", value: "Fil" },
|
|
42
|
+
{ label: "Latte", value: "Lat" },
|
|
43
|
+
{ label: "Americano", value: "Ame" },
|
|
44
|
+
],
|
|
45
|
+
},
|
|
46
|
+
];
|
|
47
|
+
var optionsWithRecommended = [
|
|
48
|
+
{ label: "Cappuccino", value: "Cappuccino" },
|
|
49
|
+
{ label: "Flat white", value: "Flat white", recommended: true },
|
|
50
|
+
{ label: "Latte", value: "Latte" },
|
|
51
|
+
{ label: "Americano", value: "Americano", recommended: true },
|
|
52
|
+
{ label: "Filter", value: "Fil" },
|
|
53
|
+
];
|
|
54
|
+
var optionsWithCustomElements = [
|
|
55
|
+
{
|
|
56
|
+
label: "Cappuccino",
|
|
57
|
+
value: "Cap",
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
label: "Latte",
|
|
61
|
+
value: "Lat",
|
|
62
|
+
element: {
|
|
63
|
+
component: "<ic-status-tag label=\"Neutral status\"></ic-status-tag>",
|
|
64
|
+
ariaLabel: "Neutral status tag",
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
label: "Americano",
|
|
69
|
+
value: "Ame",
|
|
70
|
+
icon: "<svg aria-labelledby=\"warning-title\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"#000000\"><g id=\"warning\"><path id=\"Vector\" d=\"M4.47 20.5037H19.53C21.07 20.5037 22.03 18.8337 21.26 17.5037L13.73 4.49375C12.96 3.16375 11.04 3.16375 10.27 4.49375L2.74 17.5037C1.97 18.8337 2.93 20.5037 4.47 20.5037ZM12 13.5037C11.45 13.5037 11 13.0537 11 12.5037V10.5037C11 9.95375 11.45 9.50375 12 9.50375C12.55 9.50375 13 9.95375 13 10.5037V12.5037C13 13.0537 12.55 13.5037 12 13.5037ZM13 17.5037H11V15.5037H13V17.5037Z\" /></g></svg>",
|
|
71
|
+
},
|
|
72
|
+
];
|
|
73
|
+
var defaultSelectEvents = {
|
|
74
|
+
onIcChange: function (ev) { return console.log("icChange: ".concat(ev.detail.value)); },
|
|
75
|
+
onIcBlur: function () { return console.log("Select blurred"); },
|
|
76
|
+
onIcFocus: function () { return console.log("Select focused"); },
|
|
77
|
+
onIcInput: function (ev) { return console.log("icInput: ".concat(ev.detail.value)); },
|
|
78
|
+
onIcOptionSelect: function (ev) {
|
|
79
|
+
return console.log("icOptionSelect: ".concat(ev.detail.value));
|
|
80
|
+
},
|
|
81
|
+
onIcOptionDeselect: function (ev) {
|
|
82
|
+
return console.log("icOptionDeselect: ".concat(ev.detail.value));
|
|
83
|
+
},
|
|
84
|
+
onIcOpen: function () { return console.log("select dropdown opened"); },
|
|
85
|
+
onIcClose: function () { return console.log("select dropdown closed"); },
|
|
86
|
+
onIcClear: function () { return console.log("clear all clicked"); },
|
|
87
|
+
};
|
|
88
|
+
var IcSelectSearchableVariantsPage = function (_a) {
|
|
89
|
+
var theme = _a.theme;
|
|
90
|
+
return (React.createElement(IcTheme, { id: "theme-wrapper", theme: theme },
|
|
91
|
+
React.createElement(IcTypography, { variant: "subtitle-small", style: { padding: "var(--ic-space-md)" } },
|
|
92
|
+
React.createElement("h1", null, "Select Searchable Variants Page")),
|
|
93
|
+
React.createElement("div", { style: {
|
|
94
|
+
display: "flex",
|
|
95
|
+
flexWrap: "wrap",
|
|
96
|
+
gap: "1rem",
|
|
97
|
+
margin: "1rem",
|
|
98
|
+
width: "fit-content",
|
|
99
|
+
padding: "10px",
|
|
100
|
+
} },
|
|
101
|
+
React.createElement(IcSelect, __assign({ label: "What is your favourite coffee?", options: options, searchable: true, value: "Cap", showClearButton: true, helperText: "Select one option from the list" }, defaultSelectEvents)),
|
|
102
|
+
React.createElement(IcSelect, __assign({ label: "What is your favourite coffee?", options: groupedOptions, includeGroupTitlesInSearch: true, searchable: true, showClearButton: true, helperText: "Select one option from the list" }, defaultSelectEvents)),
|
|
103
|
+
React.createElement(IcSelect, __assign({ label: "What is your favourite coffee?", options: optionsWithRecommended, searchable: true, showClearButton: true, helperText: "Select one option from the list" }, defaultSelectEvents)),
|
|
104
|
+
React.createElement(IcSelect, { label: "What is your favourite coffee?", disabled: true, options: options, searchable: true, helperText: "Select one option from the list" }),
|
|
105
|
+
React.createElement(IcSelect, { label: "What is your favourite coffee?", readonly: true, options: options, searchable: true, value: "Cap", helperText: "Select one option from the list" }),
|
|
106
|
+
React.createElement(IcSelect, __assign({ label: "What is your favourite coffee?", placeholder: "Placeholder goes here", options: options, searchable: true, helperText: "Select one option from the list" }, defaultSelectEvents)),
|
|
107
|
+
React.createElement(IcSelect, __assign({ label: "What is your favourite coffee?", options: optionsWithCustomElements, searchable: true, helperText: "Select one option from the list" }, defaultSelectEvents)),
|
|
108
|
+
React.createElement(IcSelect, __assign({ label: "What is your favourite coffee?", options: options, searchable: true, size: "small", helperText: "Select one option from the list" }, defaultSelectEvents)),
|
|
109
|
+
React.createElement(IcSelect, __assign({ label: "What is your favourite coffee?", options: options, searchable: true, size: "large", helperText: "Select one option from the list" }, defaultSelectEvents)),
|
|
110
|
+
React.createElement(IcSelect, __assign({ label: "What is your favourite coffee?", fullWidth: true, options: options, searchable: true, helperText: "Select one option from the list" }, defaultSelectEvents)),
|
|
111
|
+
React.createElement(IcSelect, __assign({ label: "What is your favourite coffee?", validationStatus: "success", validationText: "Coffee available", options: options, searchable: true }, defaultSelectEvents)),
|
|
112
|
+
React.createElement(IcSelect, __assign({ label: "What is your favourite coffee?", validationStatus: "warning", validationText: "Only a few left", options: options, searchable: true }, defaultSelectEvents)),
|
|
113
|
+
React.createElement(IcSelect, __assign({ label: "What is your favourite coffee?", validationStatus: "error", validationText: "Coffee unavailable", options: options, searchable: true }, defaultSelectEvents)))));
|
|
114
|
+
};
|
|
115
|
+
export default IcSelectSearchableVariantsPage;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
// IcSelectMultiplePage displays multiple select components for performance testing of the IcSelect component.
|
|
13
|
+
import React from "react";
|
|
14
|
+
import { IcSelect, IcTheme, IcTypography } from "../../../../../components";
|
|
15
|
+
var options = [
|
|
16
|
+
{ label: "Cappuccino", value: "Cap" },
|
|
17
|
+
{ label: "Latte", value: "Lat" },
|
|
18
|
+
{ label: "Americano", value: "Ame" },
|
|
19
|
+
{ label: "Filter", value: "Fil" },
|
|
20
|
+
{ label: "Flat white", value: "Fla" },
|
|
21
|
+
{ label: "Mocha", value: "Moc" },
|
|
22
|
+
{ label: "Macchiato", value: "Mac" },
|
|
23
|
+
{ label: "Café au lait", value: "Caf" },
|
|
24
|
+
{ label: "Espresso", value: "Esp" },
|
|
25
|
+
{ label: "Cortado", value: "Cor" },
|
|
26
|
+
{ label: "Ristretto", value: "Ris" },
|
|
27
|
+
{ label: "Latte macchiato", value: "Lam" },
|
|
28
|
+
];
|
|
29
|
+
var selectEvents = {
|
|
30
|
+
onIcChange: function (ev) { return console.log("icChange: ".concat(ev.detail.value)); },
|
|
31
|
+
onIcBlur: function () { return console.log("Select blurred"); },
|
|
32
|
+
onIcFocus: function () { return console.log("Select focused"); },
|
|
33
|
+
onIcInput: function (ev) { return console.log("icInput: ".concat(ev.detail.value)); },
|
|
34
|
+
onIcOptionSelect: function (ev) {
|
|
35
|
+
return console.log("icOptionSelect: ".concat(ev.detail.value));
|
|
36
|
+
},
|
|
37
|
+
onIcOptionDeselect: function (ev) {
|
|
38
|
+
return console.log("icOptionDeselect: ".concat(ev.detail.value));
|
|
39
|
+
},
|
|
40
|
+
onIcOpen: function () { return console.log("select dropdown opened"); },
|
|
41
|
+
onIcClose: function () { return console.log("select dropdown closed"); },
|
|
42
|
+
onIcClear: function () { return console.log("clear all clicked"); },
|
|
43
|
+
};
|
|
44
|
+
var IcSelectMultiplePage = function (_a) {
|
|
45
|
+
var theme = _a.theme;
|
|
46
|
+
return (React.createElement(IcTheme, { id: "theme-wrapper", theme: theme },
|
|
47
|
+
React.createElement(IcTypography, { variant: "subtitle-small", style: { padding: "var(--ic-space-md)" } },
|
|
48
|
+
React.createElement("h1", null, "Select Multiple Page")),
|
|
49
|
+
React.createElement("div", { style: {
|
|
50
|
+
display: "flex",
|
|
51
|
+
flexWrap: "wrap",
|
|
52
|
+
gap: "1rem",
|
|
53
|
+
margin: "1rem",
|
|
54
|
+
width: "fit-content",
|
|
55
|
+
padding: "10px",
|
|
56
|
+
} }, Array.from({ length: 20 }, function (_, i) { return (React.createElement(IcSelect, __assign({ key: i, label: "What is your favourite coffee?", options: options, showClearButton: true, helperText: "Select one option from the list" }, selectEvents))); }))));
|
|
57
|
+
};
|
|
58
|
+
export default IcSelectMultiplePage;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
// IcSelectSinglePage displays a single select component with various options for performance testing of the IcSelect component.
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { IcSelect, IcTheme, IcTypography } from "../../../../../components";
|
|
4
|
+
var options = [
|
|
5
|
+
{
|
|
6
|
+
label: "Cappuccino",
|
|
7
|
+
value: "Cap",
|
|
8
|
+
description: "Coffee frothed up with pressurised steam",
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
label: "Latte",
|
|
12
|
+
value: "Lat",
|
|
13
|
+
description: "A milkier coffee than a cappuccino",
|
|
14
|
+
disabled: true,
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
label: "Americano",
|
|
18
|
+
value: "Ame",
|
|
19
|
+
description: "Espresso coffee diluted with hot water",
|
|
20
|
+
icon: "<svg aria-labelledby=\"warning-title\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"#000000\"><g id=\"warning\"><path id=\"Vector\" d=\"M4.47 20.5037H19.53C21.07 20.5037 22.03 18.8337 21.26 17.5037L13.73 4.49375C12.96 3.16375 11.04 3.16375 10.27 4.49375L2.74 17.5037C1.97 18.8337 2.93 20.5037 4.47 20.5037ZM12 13.5037C11.45 13.5037 11 13.0537 11 12.5037V10.5037C11 9.95375 11.45 9.50375 12 9.50375C12.55 9.50375 13 9.95375 13 10.5037V12.5037C13 13.0537 12.55 13.5037 12 13.5037ZM13 17.5037H11V15.5037H13V17.5037Z\" /></g></svg>",
|
|
21
|
+
},
|
|
22
|
+
];
|
|
23
|
+
var IcSelectSinglePage = function (_a) {
|
|
24
|
+
var theme = _a.theme;
|
|
25
|
+
return (React.createElement(IcTheme, { id: "theme-wrapper", theme: theme },
|
|
26
|
+
React.createElement("div", { style: { padding: "var(--ic-space-md)" } },
|
|
27
|
+
React.createElement(IcTypography, { variant: "subtitle-small" },
|
|
28
|
+
React.createElement("h1", null, "Select Page")),
|
|
29
|
+
React.createElement(IcSelect, { label: "What is your favourite coffee?", required: true, options: options, showClearButton: true, helperText: "Select one option from the list", onIcChange: function (ev) { return console.log("icChange: ".concat(ev.detail.value)); }, onIcBlur: function () { return console.log("Select blurred"); }, onIcFocus: function () { return console.log("Select focused"); }, onIcInput: function (ev) { return console.log("icInput: ".concat(ev.detail.value)); }, onIcOptionSelect: function (ev) {
|
|
30
|
+
return console.log("icOptionSelect: ".concat(ev.detail.value));
|
|
31
|
+
}, onIcOptionDeselect: function (ev) {
|
|
32
|
+
return console.log("icOptionDeselect: ".concat(ev.detail.value));
|
|
33
|
+
}, onIcOpen: function () { return console.log("select dropdown opened"); }, onIcClose: function () { return console.log("select dropdown closed"); }, onIcClear: function () { return console.log("clear all clicked"); } }))));
|
|
34
|
+
};
|
|
35
|
+
export default IcSelectSinglePage;
|