@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,18 @@
|
|
|
1
|
+
// IcHeroPage displays a hero for the purpose of performance testing of the IcHero component.
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { IcHero, IcButton, IcTextField, IcLink, IcCardVertical, IcSearchBar, IcTheme, IcTypography, } from "../../../components";
|
|
4
|
+
var IcHeroPage = function (_a) {
|
|
5
|
+
var theme = _a.theme;
|
|
6
|
+
return (React.createElement(IcTheme, { id: "theme-wrapper", theme: theme },
|
|
7
|
+
React.createElement(IcTypography, { variant: "subtitle-small", style: { padding: "var(--ic-space-md)" } },
|
|
8
|
+
React.createElement("h1", null, "Hero Page")),
|
|
9
|
+
React.createElement(IcHero, { heading: "Hero heading", subheading: "Hero description. This is a Hero component, it should be used as a page heading.", secondaryHeading: "Secondary Heading", secondarySubheading: "This is a secondary description.", aligned: "center" },
|
|
10
|
+
React.createElement("div", { slot: "interaction", style: { display: "flex" } },
|
|
11
|
+
React.createElement(IcTextField, { placeholder: "Filter display", label: "Filter display", "hide-label": true }),
|
|
12
|
+
React.createElement(IcButton, { variant: "primary", style: { marginLeft: "var(--ic-space-md)" } }, "Filter")),
|
|
13
|
+
React.createElement(IcButton, { variant: "secondary", slot: "interaction" }, "See all"),
|
|
14
|
+
React.createElement(IcSearchBar, { slot: "interaction", label: "Label", hideLabel: true }),
|
|
15
|
+
React.createElement(IcLink, { href: "https://google.com", slot: "interaction", style: { marginTop: "var(--ic-space-sm)" } }, "Help"),
|
|
16
|
+
React.createElement(IcCardVertical, { heading: "Latest announcement", message: "This is some example text that can be included in the card copy.", slot: "secondary" }))));
|
|
17
|
+
};
|
|
18
|
+
export default IcHeroPage;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// IcPageHeaderPage displays a page header for the purpose of performance testing of the IcPageHeader component.
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { IcPageHeader, IcStatusTag, IcBreadcrumbGroup, IcBreadcrumb, IcButton, IcTextField, IcNavigationItem, IcTheme, IcTypography, } from "../../../components";
|
|
4
|
+
import { SlottedSVG } from "../../../react-component-lib/slottedSVG";
|
|
5
|
+
var IcPageHeaderPage = function (_a) {
|
|
6
|
+
var theme = _a.theme;
|
|
7
|
+
return (React.createElement(IcTheme, { id: "theme-wrapper", theme: theme },
|
|
8
|
+
React.createElement(IcTypography, { variant: "subtitle-small", style: { padding: "var(--ic-space-md)" } },
|
|
9
|
+
React.createElement("h1", null, "Page Header Page")),
|
|
10
|
+
React.createElement(IcPageHeader, { heading: "Page header", subheading: "This is a simple page header component and this is the text. This page header is only sticky for viewport widths of 992px and above..", stickyDesktopOnly: true, aligned: "full-width" },
|
|
11
|
+
React.createElement(IcStatusTag, { slot: "heading-adornment", label: "Beta" }),
|
|
12
|
+
React.createElement(IcBreadcrumbGroup, { slot: "breadcrumbs" },
|
|
13
|
+
React.createElement(IcBreadcrumb, { pageTitle: "Breadcrumb 1", href: "/breadcrumb-1" }),
|
|
14
|
+
React.createElement(IcBreadcrumb, { current: true, pageTitle: "Breadcrumb 2", href: "/breadcrumb-2" })),
|
|
15
|
+
React.createElement(IcButton, { slot: "actions", variant: "primary" },
|
|
16
|
+
"Create coffee",
|
|
17
|
+
React.createElement(SlottedSVG, { slot: "left-icon", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
18
|
+
React.createElement("path", { d: "M19 13H13V19H11V13H5V11H11V5H13V11H19V13Z", fill: "currentColor" }))),
|
|
19
|
+
React.createElement(IcButton, { slot: "actions", variant: "secondary" }, "Filter coffee"),
|
|
20
|
+
React.createElement(IcTextField, { slot: "input", placeholder: "Enter your input", label: "Input", hideLabel: true }),
|
|
21
|
+
React.createElement(IcNavigationItem, { slot: "tabs", label: "All recipes", href: "/", selected: true }),
|
|
22
|
+
React.createElement(IcNavigationItem, { slot: "tabs", label: "Favourites", href: "/" }))));
|
|
23
|
+
};
|
|
24
|
+
export default IcPageHeaderPage;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
2
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
3
|
+
if (ar || !(i in from)) {
|
|
4
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
5
|
+
ar[i] = from[i];
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
9
|
+
};
|
|
10
|
+
// IcPopoverMenuMultiplePage displays multiple popover menus for the purpose of performance testing of the IcPopoverMenu component.
|
|
11
|
+
import React, { useState } from "react";
|
|
12
|
+
import { IcButton, IcMenuGroup, IcMenuItem, IcPopoverMenu, IcTheme, IcTypography, } from "../../../../components";
|
|
13
|
+
var NUM_POPOVERS = 15;
|
|
14
|
+
var IcPopoverMenuMultiplePage = function (_a) {
|
|
15
|
+
var theme = _a.theme;
|
|
16
|
+
var _b = useState(__spreadArray([
|
|
17
|
+
true
|
|
18
|
+
], Array(NUM_POPOVERS - 1).fill(false), true)), popoverOpen = _b[0], setPopoverOpen = _b[1];
|
|
19
|
+
var handlePopoverToggled = function (idx) {
|
|
20
|
+
setPopoverOpen(function (prev) { return prev.map(function (open, i) { return (i === idx ? !open : open); }); });
|
|
21
|
+
};
|
|
22
|
+
var handlePopoverClosed = function (idx) {
|
|
23
|
+
setPopoverOpen(function (prev) { return prev.map(function (open, i) { return (i === idx ? false : open); }); });
|
|
24
|
+
};
|
|
25
|
+
return (React.createElement(IcTheme, { id: "theme-wrapper", theme: theme },
|
|
26
|
+
React.createElement(IcTypography, { variant: "subtitle-small", style: { padding: "var(--ic-space-md)" } },
|
|
27
|
+
React.createElement("h1", null, "Popover Menu Multiple Page")),
|
|
28
|
+
React.createElement("div", { style: {
|
|
29
|
+
display: "flex",
|
|
30
|
+
flexWrap: "wrap",
|
|
31
|
+
gap: "1rem",
|
|
32
|
+
margin: "1rem",
|
|
33
|
+
width: "fit-content",
|
|
34
|
+
padding: "10px",
|
|
35
|
+
marginTop: "540px",
|
|
36
|
+
} }, Array.from({ length: NUM_POPOVERS }).map(function (_, idx) { return (React.createElement("div", { key: idx },
|
|
37
|
+
React.createElement(IcButton, { title: "Show/hide popover ".concat(idx + 1), id: "button-".concat(idx), onClick: function () { return handlePopoverToggled(idx); }, "aria-expanded": popoverOpen[idx] },
|
|
38
|
+
"Show/hide popover ",
|
|
39
|
+
idx + 1),
|
|
40
|
+
React.createElement(IcPopoverMenu, { anchor: "button-".concat(idx), "aria-label": "popover-".concat(idx), open: popoverOpen[idx], onIcPopoverClosed: function (event) {
|
|
41
|
+
handlePopoverClosed(idx);
|
|
42
|
+
console.log("Popover menu closed: ", event);
|
|
43
|
+
} },
|
|
44
|
+
React.createElement(IcMenuGroup, { label: "Edit options" },
|
|
45
|
+
React.createElement(IcMenuItem, { label: "Copy", disabled: true }),
|
|
46
|
+
React.createElement(IcMenuItem, { label: "Paste", keyboardShortcutLabel: "Cmd + V" })),
|
|
47
|
+
React.createElement(IcMenuGroup, null,
|
|
48
|
+
React.createElement(IcMenuItem, { label: "Format" }),
|
|
49
|
+
React.createElement(IcMenuItem, { label: "Help" }))))); }))));
|
|
50
|
+
};
|
|
51
|
+
export default IcPopoverMenuMultiplePage;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
2
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
3
|
+
if (ar || !(i in from)) {
|
|
4
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
5
|
+
ar[i] = from[i];
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
9
|
+
};
|
|
10
|
+
// IcPopoverMenuNotRenderedPage displays multiple popover menus that are only rendered when open for the purpose of performance testing of the IcPopoverMenu component.
|
|
11
|
+
import React, { useState } from "react";
|
|
12
|
+
import { IcButton, IcMenuGroup, IcMenuItem, IcPopoverMenu, IcTheme, IcTypography, } from "../../../../components";
|
|
13
|
+
var NUM_POPOVERS = 15;
|
|
14
|
+
var IcPopoverMenuNotRenderedPage = function (_a) {
|
|
15
|
+
var theme = _a.theme;
|
|
16
|
+
var _b = useState(__spreadArray([
|
|
17
|
+
true
|
|
18
|
+
], Array(NUM_POPOVERS - 1).fill(false), true)), popoverOpen = _b[0], setPopoverOpen = _b[1];
|
|
19
|
+
var handlePopoverToggled = function (idx) {
|
|
20
|
+
setPopoverOpen(function (prev) { return prev.map(function (open, i) { return (i === idx ? !open : open); }); });
|
|
21
|
+
};
|
|
22
|
+
var handlePopoverClosed = function (idx) {
|
|
23
|
+
setPopoverOpen(function (prev) { return prev.map(function (open, i) { return (i === idx ? false : open); }); });
|
|
24
|
+
};
|
|
25
|
+
return (React.createElement(IcTheme, { id: "theme-wrapper", theme: theme },
|
|
26
|
+
React.createElement(IcTypography, { variant: "subtitle-small", style: { padding: "var(--ic-space-md)" } },
|
|
27
|
+
React.createElement("h1", null, "Popover Menu Multiple Not Rendered Page")),
|
|
28
|
+
React.createElement("div", { style: {
|
|
29
|
+
display: "flex",
|
|
30
|
+
flexWrap: "wrap",
|
|
31
|
+
gap: "1rem",
|
|
32
|
+
margin: "1rem",
|
|
33
|
+
width: "fit-content",
|
|
34
|
+
padding: "10px",
|
|
35
|
+
marginTop: "540px",
|
|
36
|
+
} }, Array.from({ length: NUM_POPOVERS }).map(function (_, idx) { return (React.createElement("div", { key: idx },
|
|
37
|
+
React.createElement(IcButton, { title: "Show/hide popover ".concat(idx + 1), id: "button-".concat(idx), onClick: function () { return handlePopoverToggled(idx); }, "aria-expanded": popoverOpen[idx] },
|
|
38
|
+
"Show/hide popover ",
|
|
39
|
+
idx + 1),
|
|
40
|
+
popoverOpen[idx] && (React.createElement(IcPopoverMenu, { anchor: "button-".concat(idx), "aria-label": "popover-".concat(idx), open: popoverOpen[idx], onIcPopoverClosed: function (event) {
|
|
41
|
+
handlePopoverClosed(idx);
|
|
42
|
+
console.log("Popover menu closed: ", event);
|
|
43
|
+
} },
|
|
44
|
+
React.createElement(IcMenuGroup, { label: "Edit options" },
|
|
45
|
+
React.createElement(IcMenuItem, { label: "Copy", disabled: true }),
|
|
46
|
+
React.createElement(IcMenuItem, { label: "Paste", keyboardShortcutLabel: "Cmd + V" })),
|
|
47
|
+
React.createElement(IcMenuGroup, null,
|
|
48
|
+
React.createElement(IcMenuItem, { label: "Format" }),
|
|
49
|
+
React.createElement(IcMenuItem, { label: "Help" })))))); }))));
|
|
50
|
+
};
|
|
51
|
+
export default IcPopoverMenuNotRenderedPage;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
// IcPopoverMenuSinglePage displays a popover menu for the purpose of performance testing of the IcPopoverMenu component.
|
|
2
|
+
import React, { useState } from "react";
|
|
3
|
+
import { IcPopoverMenu, IcMenuItem, IcMenuGroup, IcButton, IcTheme, IcTypography, } from "../../../../components";
|
|
4
|
+
import { SlottedSVG } from "../../../../react-component-lib/slottedSVG";
|
|
5
|
+
var IcPopoverMenuSinglePage = function (_a) {
|
|
6
|
+
var theme = _a.theme;
|
|
7
|
+
var _b = useState(true), popoverOpen = _b[0], setPopoverOpen = _b[1];
|
|
8
|
+
var handlePopoverToggled = function () { return setPopoverOpen(function (value) { return !value; }); };
|
|
9
|
+
var handlePopoverClosed = function () { return setPopoverOpen(false); };
|
|
10
|
+
return (React.createElement(IcTheme, { id: "theme-wrapper", theme: theme },
|
|
11
|
+
React.createElement("div", { style: { padding: "var(--ic-space-md)" } },
|
|
12
|
+
React.createElement(IcTypography, { variant: "subtitle-small" },
|
|
13
|
+
React.createElement("h1", null, "Popover Menu Page")),
|
|
14
|
+
React.createElement(IcButton, { id: "button-1", onClick: handlePopoverToggled, "aria-expanded": popoverOpen }, "Show/Hide popover"),
|
|
15
|
+
React.createElement(IcPopoverMenu, { anchor: "button-1", "aria-label": "popover", open: popoverOpen, onIcPopoverClosed: function (event) {
|
|
16
|
+
handlePopoverClosed();
|
|
17
|
+
console.log("Popover menu closed: ", event);
|
|
18
|
+
} },
|
|
19
|
+
React.createElement(IcMenuItem, { label: "Copy code", disabled: true }),
|
|
20
|
+
React.createElement(IcMenuGroup, { label: "View" },
|
|
21
|
+
React.createElement(IcMenuItem, { label: "Zoom in", keyboardShortcutLabel: "Cmd+" }),
|
|
22
|
+
React.createElement(IcMenuItem, { label: "Zoom out", keyboardShortcutLabel: "Cmd-" })),
|
|
23
|
+
React.createElement(IcMenuItem, { label: "Actions", submenuTriggerFor: "abc" })),
|
|
24
|
+
React.createElement(IcPopoverMenu, { submenuId: "abc" },
|
|
25
|
+
React.createElement(IcMenuItem, { label: "Edit" }),
|
|
26
|
+
React.createElement(IcMenuItem, { label: "Find", submenuTriggerFor: "abc123" }),
|
|
27
|
+
React.createElement(IcMenuItem, { label: "Delete", variant: "destructive" })),
|
|
28
|
+
React.createElement(IcPopoverMenu, { submenuId: "abc123" },
|
|
29
|
+
React.createElement(IcMenuItem, { label: "Search the web", description: "This will search the web to find the thing you are looking for." }),
|
|
30
|
+
React.createElement(IcMenuItem, { label: "Find..." }),
|
|
31
|
+
React.createElement(IcMenuItem, { label: "Find icons" },
|
|
32
|
+
React.createElement(SlottedSVG, { slot: "icon", xmlns: "http://www.w3.org/2000/svg", height: "24px", viewBox: "0 0 24 24", width: "24px" },
|
|
33
|
+
React.createElement("path", { d: "M0 0h24v24H0V0z", fill: "none" }),
|
|
34
|
+
React.createElement("path", { d: "M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z" }))),
|
|
35
|
+
React.createElement(IcMenuItem, { label: "Show found results", variant: "toggle", onIcToggleChecked: function (event) { return console.log(event.detail.checked); } })))));
|
|
36
|
+
};
|
|
37
|
+
export default IcPopoverMenuSinglePage;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
// IcRadioMultiplePage displays multiple radio groups for the purpose of performance testing of the IcRadio component.
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { IcRadioGroup, IcRadioOption, IcTheme, IcTypography, } from "../../../../components";
|
|
4
|
+
var handleRadioGroupChange = function (index) { return function (ev) {
|
|
5
|
+
console.log("Group ".concat(index, ":"), ev.detail.value);
|
|
6
|
+
}; };
|
|
7
|
+
var handleRadioOptionCheck = function (index) { return function (ev) {
|
|
8
|
+
console.log("Group ".concat(index, ": Radio option selected: "), ev.detail.value);
|
|
9
|
+
}; };
|
|
10
|
+
var RadioGroup = function (_a) {
|
|
11
|
+
var index = _a.index;
|
|
12
|
+
return (React.createElement(IcRadioGroup, { name: "radio-group-".concat(index), label: "Add a free purchase with any hot drink (Group ".concat(index, ")"), helperText: "Helper text for group ".concat(index), required: true, onIcChange: handleRadioGroupChange(index) },
|
|
13
|
+
React.createElement(IcRadioOption, { value: "crisps", label: "Crisps (Group ".concat(index, ")"), onIcCheck: handleRadioOptionCheck(index) }),
|
|
14
|
+
React.createElement(IcRadioOption, { value: "cookie", label: "Deluxe chocolate chip cookie (Group ".concat(index, ")"), onIcCheck: handleRadioOptionCheck(index) }),
|
|
15
|
+
React.createElement(IcRadioOption, { value: "fruit", label: "Banana (Group ".concat(index, ")"), onIcCheck: handleRadioOptionCheck(index) }),
|
|
16
|
+
React.createElement(IcRadioOption, { value: "No item", label: "No thanks, just my coffee (Group ".concat(index, ")"), selected: true, onIcCheck: handleRadioOptionCheck(index) })));
|
|
17
|
+
};
|
|
18
|
+
var IcRadioMultiplePage = function (_a) {
|
|
19
|
+
var theme = _a.theme;
|
|
20
|
+
return (React.createElement(IcTheme, { id: "theme-wrapper", theme: theme },
|
|
21
|
+
React.createElement(IcTypography, { variant: "subtitle-small", style: { padding: "var(--ic-space-md)" } },
|
|
22
|
+
React.createElement("h1", null, "Radio Multiple Page")),
|
|
23
|
+
React.createElement("div", { style: {
|
|
24
|
+
display: "flex",
|
|
25
|
+
flexWrap: "wrap",
|
|
26
|
+
gap: "1rem",
|
|
27
|
+
margin: "1rem",
|
|
28
|
+
width: "fit-content",
|
|
29
|
+
padding: "10px",
|
|
30
|
+
} }, Array.from({ length: 20 }, function (_, i) { return (React.createElement(RadioGroup, { key: i, index: i + 1 })); }))));
|
|
31
|
+
};
|
|
32
|
+
export default IcRadioMultiplePage;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// IcRadioSinglePage displays a single radio group with multiple options for the purpose of performance testing of the IcRadio component.
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { IcRadioGroup, IcRadioOption, IcTheme, IcTypography, } from "../../../../components";
|
|
4
|
+
var IcRadioSinglePage = function (_a) {
|
|
5
|
+
var theme = _a.theme;
|
|
6
|
+
var handleRadioGroupChange = function (ev) {
|
|
7
|
+
console.log(ev.detail.value);
|
|
8
|
+
};
|
|
9
|
+
var handleRadioOptionCheck = function (ev) {
|
|
10
|
+
console.log("Radio option selected: ", ev.detail.value);
|
|
11
|
+
};
|
|
12
|
+
return (React.createElement(IcTheme, { id: "theme-wrapper", theme: theme },
|
|
13
|
+
React.createElement("div", { style: { padding: "var(--ic-space-md)" } },
|
|
14
|
+
React.createElement(IcTypography, { variant: "subtitle-small" },
|
|
15
|
+
React.createElement("h1", null, "Radio Page")),
|
|
16
|
+
React.createElement(IcRadioGroup, { name: "radio-group-1", label: "Add a free purchase with any hot drink", helperText: "Helper text", required: true, onIcChange: handleRadioGroupChange },
|
|
17
|
+
React.createElement(IcRadioOption, { value: "crisps", label: "Crisps", onIcCheck: handleRadioOptionCheck }),
|
|
18
|
+
React.createElement(IcRadioOption, { value: "cookie", label: "Deluxe chocolate chip cookie (sold out)", disabled: true }),
|
|
19
|
+
React.createElement(IcRadioOption, { value: "fruit", label: "Banana", onIcCheck: handleRadioOptionCheck }),
|
|
20
|
+
React.createElement(IcRadioOption, { value: "No item", label: "No thanks, just my coffee", selected: true, onIcCheck: handleRadioOptionCheck })))));
|
|
21
|
+
};
|
|
22
|
+
export default IcRadioSinglePage;
|
|
@@ -0,0 +1,84 @@
|
|
|
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
|
+
// IcRadioVariantsPage displays multiple radio groups with various configurations for the purpose of performance testing of the IcRadio component.
|
|
13
|
+
import React, { useEffect, useState } from "react";
|
|
14
|
+
import { IcRadioGroup, IcRadioOption, IcTextField, IcTheme, IcTypography, } from "../../../../components";
|
|
15
|
+
var radioOptions = [
|
|
16
|
+
{ value: "crisps", label: "Crisps" },
|
|
17
|
+
{
|
|
18
|
+
value: "cookie",
|
|
19
|
+
label: "Deluxe chocolate chip cookie (sold out)",
|
|
20
|
+
disabled: true,
|
|
21
|
+
},
|
|
22
|
+
{ value: "fruit", label: "Banana" },
|
|
23
|
+
{ value: "No item", label: "No thanks, just my coffee", selected: true },
|
|
24
|
+
];
|
|
25
|
+
var baseRadioGroupProps = {
|
|
26
|
+
label: "Add a free purchase with any hot drink",
|
|
27
|
+
helperText: "Options may be limited",
|
|
28
|
+
};
|
|
29
|
+
var handleRadioGroupChange = function (ev) {
|
|
30
|
+
console.log(ev.detail.value);
|
|
31
|
+
};
|
|
32
|
+
var handleRadioGroupSelectedOption = function (ev) {
|
|
33
|
+
console.log(ev.detail.selectedOption);
|
|
34
|
+
};
|
|
35
|
+
var handleRadioOptionCheck = function (ev) {
|
|
36
|
+
console.log("Radio option selected: ", ev.detail.value);
|
|
37
|
+
};
|
|
38
|
+
var renderRadioOptions = function (groupName) {
|
|
39
|
+
return radioOptions.map(function (option) { return (React.createElement(IcRadioOption, { key: "".concat(option.value, "-").concat(groupName), value: option.value, label: "".concat(option.label, " (").concat(groupName, ")"), disabled: option.disabled, selected: option.selected, onIcCheck: handleRadioOptionCheck })); });
|
|
40
|
+
};
|
|
41
|
+
var RadioOptionsDynamic = function () {
|
|
42
|
+
var _a = useState([]), dynamicOptions = _a[0], setDynamicOptions = _a[1];
|
|
43
|
+
useEffect(function () {
|
|
44
|
+
setTimeout(function () {
|
|
45
|
+
setDynamicOptions([
|
|
46
|
+
{ label: "Item 1", value: "Item 1" },
|
|
47
|
+
{ label: "Item 2", value: "Item 2" },
|
|
48
|
+
{ label: "Item 3", value: "Item 3" },
|
|
49
|
+
{ label: "Item 4", value: "Item 4" },
|
|
50
|
+
]);
|
|
51
|
+
}, 3000);
|
|
52
|
+
}, []);
|
|
53
|
+
return (React.createElement(IcRadioGroup, { label: "What is your favourite coffee?", name: "radio-group-8" }, dynamicOptions.map(function (option) { return (React.createElement(IcRadioOption, { key: option.value, value: option.value, label: option.label, onIcCheck: handleRadioOptionCheck })); })));
|
|
54
|
+
};
|
|
55
|
+
var ConditionalRadioGroup = function (_a) {
|
|
56
|
+
var label = _a.label, additionalFieldDisplay = _a.additionalFieldDisplay, name = _a.name;
|
|
57
|
+
return (React.createElement(IcRadioGroup, { label: label, name: name, onIcChange: handleRadioGroupSelectedOption },
|
|
58
|
+
React.createElement(IcRadioOption, { value: "valueName1", label: "Option with no additional field", onIcCheck: handleRadioOptionCheck }),
|
|
59
|
+
React.createElement(IcRadioOption, { value: "valueName2", label: "Option with text field as conditional slotted additional field", additionalFieldDisplay: additionalFieldDisplay, onIcCheck: handleRadioOptionCheck },
|
|
60
|
+
React.createElement(IcTextField, { validationStatus: "error", validationText: "Now it has really gone to (coffee) pot", slot: "additional-field", placeholder: "Placeholder", label: "What's your favourite type of coffee?" }))));
|
|
61
|
+
};
|
|
62
|
+
var IcRadioVariantsPage = function (_a) {
|
|
63
|
+
var theme = _a.theme;
|
|
64
|
+
return (React.createElement(IcTheme, { id: "theme-wrapper", theme: theme },
|
|
65
|
+
React.createElement(IcTypography, { variant: "subtitle-small", style: { padding: "var(--ic-space-md)" } },
|
|
66
|
+
React.createElement("h1", null, "Radio Variants Page")),
|
|
67
|
+
React.createElement("div", { style: {
|
|
68
|
+
display: "flex",
|
|
69
|
+
flexWrap: "wrap",
|
|
70
|
+
gap: "1rem",
|
|
71
|
+
margin: "1rem",
|
|
72
|
+
width: "fit-content",
|
|
73
|
+
padding: "10px",
|
|
74
|
+
} },
|
|
75
|
+
React.createElement(IcRadioGroup, __assign({}, baseRadioGroupProps, { name: "radio-group-1", required: true, onIcChange: handleRadioGroupChange }), renderRadioOptions("radio-group-1")),
|
|
76
|
+
React.createElement(IcRadioGroup, __assign({}, baseRadioGroupProps, { name: "radio-group-2", disabled: true }), renderRadioOptions("radio-group-2")),
|
|
77
|
+
React.createElement(IcRadioGroup, __assign({}, baseRadioGroupProps, { name: "radio-group-3", size: "small", onIcChange: handleRadioGroupChange }), renderRadioOptions("radio-group-3")),
|
|
78
|
+
React.createElement(IcRadioGroup, __assign({}, baseRadioGroupProps, { name: "radio-group-4", required: true, validationStatus: "error", validationText: "Please select an option", onIcChange: handleRadioGroupChange }), renderRadioOptions("radio-group-4")),
|
|
79
|
+
React.createElement(IcRadioGroup, __assign({}, baseRadioGroupProps, { name: "radio-group-5", validationStatus: "success", validationText: "You have selected your item", onIcChange: handleRadioGroupChange }), renderRadioOptions("radio-group-5")),
|
|
80
|
+
React.createElement(ConditionalRadioGroup, { label: "Conditional dynamic", additionalFieldDisplay: "dynamic", name: "radio-group-6" }),
|
|
81
|
+
React.createElement(ConditionalRadioGroup, { label: "Conditional static", additionalFieldDisplay: "static", name: "radio-group-7" }),
|
|
82
|
+
React.createElement(RadioOptionsDynamic, null))));
|
|
83
|
+
};
|
|
84
|
+
export default IcRadioVariantsPage;
|
|
@@ -0,0 +1,49 @@
|
|
|
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
|
+
// IcSearchBarMultiplePage displays multiple search bars for the purpose of performance testing of the IcSearchBar component.
|
|
13
|
+
import React from "react";
|
|
14
|
+
import { IcSearchBar, IcTheme, IcTypography } from "../../../../components";
|
|
15
|
+
var options = [
|
|
16
|
+
{ label: "Espresso", value: "espresso" },
|
|
17
|
+
{ label: "Double Espresso", value: "doubleespresso" },
|
|
18
|
+
{ label: "Flat White", value: "flatwhite" },
|
|
19
|
+
{ label: "Cappuccino", value: "cappuccino" },
|
|
20
|
+
{ label: "Americano", value: "americano" },
|
|
21
|
+
{ label: "Mocha", value: "mocha" },
|
|
22
|
+
];
|
|
23
|
+
var searchBarEvents = {
|
|
24
|
+
onIcChange: function (ev) { return console.log("Value changed: ", ev.detail.value); },
|
|
25
|
+
onIcClear: function () { return console.log("Value cleared"); },
|
|
26
|
+
onIcInput: function (ev) { return console.log("icInput: ", ev.detail.value); },
|
|
27
|
+
onIcOptionSelect: function (ev) {
|
|
28
|
+
return console.log("Option selected: ", ev.detail.value);
|
|
29
|
+
},
|
|
30
|
+
onIcSearchBarBlur: function () { return console.log("Search bar blurred"); },
|
|
31
|
+
onIcSearchBarFocus: function () { return console.log("Search bar focused"); },
|
|
32
|
+
onIcSubmitSearch: function () { return console.log("Search submitted"); },
|
|
33
|
+
onIcMenuChange: function (ev) { return console.log("Menu opened/closed: ", ev.detail); },
|
|
34
|
+
};
|
|
35
|
+
var IcSearchBarMultiplePage = function (_a) {
|
|
36
|
+
var theme = _a.theme;
|
|
37
|
+
return (React.createElement(IcTheme, { id: "theme-wrapper", theme: theme },
|
|
38
|
+
React.createElement(IcTypography, { variant: "subtitle-small", style: { padding: "var(--ic-space-md)" } },
|
|
39
|
+
React.createElement("h1", null, "Search Bar Multiple Page")),
|
|
40
|
+
React.createElement("div", { style: {
|
|
41
|
+
display: "flex",
|
|
42
|
+
flexWrap: "wrap",
|
|
43
|
+
gap: "1rem",
|
|
44
|
+
margin: "1rem",
|
|
45
|
+
width: "fit-content",
|
|
46
|
+
padding: "10px",
|
|
47
|
+
} }, Array.from({ length: 20 }, function (_, i) { return (React.createElement(IcSearchBar, __assign({ key: i, label: "What is your favourite coffee?", helperText: "Search for your favourite coffee", emptyOptionListText: "There's nothing here", options: options, charactersUntilSuggestion: 3, required: true }, searchBarEvents))); }))));
|
|
48
|
+
};
|
|
49
|
+
export default IcSearchBarMultiplePage;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// IcSearchBarSinglePage displays a single search bar for the purpose of performance testing of the IcSearchBar component.
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { IcSearchBar, IcTheme, IcTypography } from "../../../../components";
|
|
4
|
+
var IcSearchBarSinglePage = function (_a) {
|
|
5
|
+
var theme = _a.theme;
|
|
6
|
+
return (React.createElement(IcTheme, { id: "theme-wrapper", theme: theme },
|
|
7
|
+
React.createElement("div", { style: { padding: "var(--ic-space-md)" } },
|
|
8
|
+
React.createElement(IcTypography, { variant: "subtitle-small" },
|
|
9
|
+
React.createElement("h1", null, "Search Bar Page")),
|
|
10
|
+
React.createElement(IcSearchBar, { label: "What is your favourite coffee?", helperText: "Search for your favourite coffee", emptyOptionListText: "There's nothing here", charactersUntilSuggestion: 3, assistiveHintText: "You can use up and down arrows to navigate the options when they are available, and press enter to select an option.", options: [
|
|
11
|
+
{ label: "Espresso", value: "espresso" },
|
|
12
|
+
{ label: "Double Espresso", value: "doubleespresso" },
|
|
13
|
+
{ label: "Flat White", value: "flatwhite" },
|
|
14
|
+
{ label: "Cappuccino", value: "cappuccino" },
|
|
15
|
+
{ label: "Americano", value: "americano" },
|
|
16
|
+
{ label: "Mocha", value: "mocha" },
|
|
17
|
+
], onIcChange: function (ev) { return console.log("Value changed: ", ev.detail.value); }, onIcClear: function () { return console.log("Value cleared"); }, onIcInput: function (ev) { return console.log("icInput: ", ev.detail.value); }, onIcOptionSelect: function (ev) {
|
|
18
|
+
return console.log("Option selected: ", ev.detail.value);
|
|
19
|
+
}, onIcSearchBarBlur: function () { return console.log("Search bar blurred"); }, onIcSearchBarFocus: function () { return console.log("Search bar focused"); }, onIcSubmitSearch: function () { return console.log("Search submitted"); }, onIcMenuChange: function (ev) {
|
|
20
|
+
return console.log("Menu opened/closed: ", ev.detail);
|
|
21
|
+
} }))));
|
|
22
|
+
};
|
|
23
|
+
export default IcSearchBarSinglePage;
|
|
@@ -0,0 +1,63 @@
|
|
|
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
|
+
// IcSearchBarVariantsPage displays various configurations of the IcSearchBar component for performance testing purposes.
|
|
13
|
+
import React from "react";
|
|
14
|
+
import { IcSearchBar, IcTheme, IcTypography } from "../../../../components";
|
|
15
|
+
var options = [
|
|
16
|
+
{ label: "Espresso", value: "espresso" },
|
|
17
|
+
{ label: "Double Espresso", value: "doubleespresso" },
|
|
18
|
+
{ label: "Flat White", value: "flatwhite" },
|
|
19
|
+
{ label: "Cappuccino", value: "cappuccino" },
|
|
20
|
+
{ label: "Americano", value: "americano" },
|
|
21
|
+
{ label: "Mocha", value: "mocha" },
|
|
22
|
+
];
|
|
23
|
+
var defaultSearchBarProps = {
|
|
24
|
+
label: "What is your favourite coffee?",
|
|
25
|
+
helperText: "Search for your favourite coffee",
|
|
26
|
+
emptyOptionListText: "There's nothing here",
|
|
27
|
+
options: options,
|
|
28
|
+
};
|
|
29
|
+
var defaultSearchBarEvents = {
|
|
30
|
+
onIcChange: function (ev) { return console.log("Value changed: ", ev.detail.value); },
|
|
31
|
+
onIcClear: function () { return console.log("Value cleared"); },
|
|
32
|
+
onIcInput: function (ev) { return console.log("icInput: ", ev.detail.value); },
|
|
33
|
+
onIcOptionSelect: function (ev) {
|
|
34
|
+
return console.log("Option selected: ", ev.detail.value);
|
|
35
|
+
},
|
|
36
|
+
onIcSearchBarBlur: function () { return console.log("Search bar blurred"); },
|
|
37
|
+
onIcSearchBarFocus: function () { return console.log("Search bar focused"); },
|
|
38
|
+
onIcSubmitSearch: function () { return console.log("Search submitted"); },
|
|
39
|
+
onIcMenuChange: function (ev) { return console.log("Menu opened/closed: ", ev.detail); },
|
|
40
|
+
};
|
|
41
|
+
var IcSearchBarVariantsPage = function (_a) {
|
|
42
|
+
var theme = _a.theme;
|
|
43
|
+
return (React.createElement(IcTheme, { id: "theme-wrapper", theme: theme },
|
|
44
|
+
React.createElement(IcTypography, { variant: "subtitle-small", style: { padding: "var(--ic-space-md)" } },
|
|
45
|
+
React.createElement("h1", null, "Search Bar Variants Page")),
|
|
46
|
+
React.createElement("div", { style: {
|
|
47
|
+
display: "flex",
|
|
48
|
+
flexWrap: "wrap",
|
|
49
|
+
gap: "1rem",
|
|
50
|
+
margin: "1rem",
|
|
51
|
+
width: "fit-content",
|
|
52
|
+
padding: "10px",
|
|
53
|
+
} },
|
|
54
|
+
React.createElement(IcSearchBar, __assign({}, defaultSearchBarProps, { charactersUntilSuggestion: 3, assistiveHintText: "You can use up and down arrows to navigate the options when they are available, and press enter to select an option.", required: true }, defaultSearchBarEvents)),
|
|
55
|
+
React.createElement(IcSearchBar, __assign({}, defaultSearchBarProps, { placeholder: "Small search bar", size: "small" }, defaultSearchBarEvents)),
|
|
56
|
+
React.createElement(IcSearchBar, __assign({}, defaultSearchBarProps, { fullWidth: true }, defaultSearchBarEvents)),
|
|
57
|
+
React.createElement(IcSearchBar, __assign({}, defaultSearchBarProps, { disabled: true })),
|
|
58
|
+
React.createElement(IcSearchBar, __assign({}, defaultSearchBarProps, { readonly: true })),
|
|
59
|
+
React.createElement(IcSearchBar, __assign({}, defaultSearchBarProps, { disableAutoFiltering: true }, defaultSearchBarEvents)),
|
|
60
|
+
React.createElement(IcSearchBar, __assign({}, defaultSearchBarProps, { focusOnLoad: true }, defaultSearchBarEvents)),
|
|
61
|
+
React.createElement(IcSearchBar, __assign({}, defaultSearchBarProps, { searchMode: "query" }, defaultSearchBarEvents)))));
|
|
62
|
+
};
|
|
63
|
+
export default IcSearchBarVariantsPage;
|
|
@@ -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
|
+
// IcSelectMultiMultiplePage displays multiple multi-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 IcSelectMultiMultiplePage = 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 Multi 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, multiple: true, showClearButton: true, helperText: "Select one or more options from the list" }, selectEvents))); }))));
|
|
57
|
+
};
|
|
58
|
+
export default IcSelectMultiMultiplePage;
|