@ukic/react 3.5.0 → 3.7.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/README.md +2 -1
- package/dist/core/core.css +38 -24
- 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
|
+
// IcButtonMultiplePage displays multiple buttons with events for the purpose of performance testing of the IcButton component.
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { IcButton, IcTheme, IcTypography } from "../../../../components";
|
|
4
|
+
var IcButtonEventsPage = function (_a) {
|
|
5
|
+
var theme = _a.theme;
|
|
6
|
+
var handleClick = function () { return console.log("Button clicked"); };
|
|
7
|
+
var handleFocus = function () { return console.log("Button gained focus"); };
|
|
8
|
+
var handleBlur = function () { return console.log("Button lost focus"); };
|
|
9
|
+
var buttons = Array.from({ length: 100 }, function (_, index) { return (React.createElement(IcButton, { key: index, style: { padding: "var(--ic-space-xs)" }, onClick: handleClick, onIcFocus: handleFocus, onIcBlur: handleBlur },
|
|
10
|
+
"Button ",
|
|
11
|
+
index + 1)); });
|
|
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, "Button With Event Listeners Page")),
|
|
16
|
+
buttons)));
|
|
17
|
+
};
|
|
18
|
+
export default IcButtonEventsPage;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
// IcCheckboxBasicMultiplePage displays multiple basic checkbox groups for the purpose of performance testing of the IcCheckbox component.
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { IcCheckbox, IcCheckboxGroup, IcTheme, IcTypography, } from "../../../../components";
|
|
4
|
+
var COLOURS = [
|
|
5
|
+
{ value: "black", label: "Black" },
|
|
6
|
+
{ value: "grey", label: "Grey" },
|
|
7
|
+
{ value: "blue", label: "Blue" },
|
|
8
|
+
{ value: "navy", label: "Navy" },
|
|
9
|
+
{ value: "purple", label: "Purple" },
|
|
10
|
+
{ value: "pink", label: "Pink" },
|
|
11
|
+
{ value: "orange", label: "Orange" },
|
|
12
|
+
{ value: "red", label: "Red" },
|
|
13
|
+
{ value: "green", label: "Green" },
|
|
14
|
+
{ value: "yellow", label: "Yellow" },
|
|
15
|
+
{ value: "cream", label: "Cream" },
|
|
16
|
+
{ value: "white", label: "White" },
|
|
17
|
+
{ value: "brown", label: "Brown" },
|
|
18
|
+
{ value: "silver", label: "Silver" },
|
|
19
|
+
{ value: "gold", label: "Gold" },
|
|
20
|
+
{ value: "multi", label: "Multi" },
|
|
21
|
+
];
|
|
22
|
+
var handleCheckboxGroupChange = function (ev) {
|
|
23
|
+
console.log("onIcChange", ev.detail.value);
|
|
24
|
+
};
|
|
25
|
+
var handleCheckboxCheck = function (ev) {
|
|
26
|
+
console.log("onIcCheck", ev);
|
|
27
|
+
};
|
|
28
|
+
var Checkbox = function () { return (React.createElement(IcCheckboxGroup, { label: "Select a colour or colours", name: "default", onIcChange: handleCheckboxGroupChange }, COLOURS.map(function (colour) { return (React.createElement(IcCheckbox, { key: colour.value, value: colour.value, label: colour.label, onIcCheck: handleCheckboxCheck })); }))); };
|
|
29
|
+
var IcCheckboxBasicMultiplePage = function (_a) {
|
|
30
|
+
var theme = _a.theme;
|
|
31
|
+
var checkboxes = Array.from({ length: 10 }, function (_, index) { return (React.createElement(Checkbox, { key: index })); });
|
|
32
|
+
return (React.createElement(IcTheme, { id: "theme-wrapper", theme: theme },
|
|
33
|
+
React.createElement(IcTypography, { variant: "subtitle-small", style: { padding: "var(--ic-space-md)" } },
|
|
34
|
+
React.createElement("h1", null, "Checkbox Basic Multiple Page")),
|
|
35
|
+
React.createElement("div", { style: {
|
|
36
|
+
display: "flex",
|
|
37
|
+
flexWrap: "wrap",
|
|
38
|
+
gap: "1rem",
|
|
39
|
+
margin: "1rem",
|
|
40
|
+
width: "fit-content",
|
|
41
|
+
padding: "10px",
|
|
42
|
+
} }, checkboxes)));
|
|
43
|
+
};
|
|
44
|
+
export default IcCheckboxBasicMultiplePage;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
// IcCheckboxMultiplePage displays multiple checkbox groups for the purpose of performance testing of the IcCheckbox component.
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { IcCheckbox, IcCheckboxGroup, IcTextField, IcTheme, IcTypography, } from "../../../../components";
|
|
4
|
+
var handleCheckboxGroupChange = function (ev) {
|
|
5
|
+
console.log("onIcChange", ev.detail.value);
|
|
6
|
+
};
|
|
7
|
+
var handleCheckboxCheck = function (ev) {
|
|
8
|
+
console.log("onIcCheck", ev);
|
|
9
|
+
};
|
|
10
|
+
var Checkbox = function () { return (React.createElement(IcCheckboxGroup, { label: "Select your extras", name: "default", onIcChange: handleCheckboxGroupChange },
|
|
11
|
+
React.createElement(IcCheckbox, { value: "extra", label: "Extra shot (50p)", onIcCheck: handleCheckboxCheck }),
|
|
12
|
+
React.createElement(IcCheckbox, { value: "Soya milk", label: "Soya milk", checked: true }),
|
|
13
|
+
React.createElement(IcCheckbox, { value: "keep cup", label: "Takeaway cup", disabled: true }),
|
|
14
|
+
React.createElement(IcCheckbox, { value: "other", label: "Other" },
|
|
15
|
+
React.createElement(IcTextField, { slot: "additional-field", label: "Please let us know..." })),
|
|
16
|
+
React.createElement(IcCheckbox, { additionalFieldDisplay: "dynamic", value: "other", label: "Other" },
|
|
17
|
+
React.createElement(IcTextField, { slot: "additional-field", label: "Please let us know..." })))); };
|
|
18
|
+
var IcCheckboxMultiplePage = function (_a) {
|
|
19
|
+
var theme = _a.theme;
|
|
20
|
+
var checkboxes = Array.from({ length: 20 }, function (_, index) { return (React.createElement(Checkbox, { key: index })); });
|
|
21
|
+
return (React.createElement(IcTheme, { id: "theme-wrapper", theme: theme },
|
|
22
|
+
React.createElement(IcTypography, { variant: "subtitle-small", style: { padding: "var(--ic-space-md)" } },
|
|
23
|
+
React.createElement("h1", null, "Checkbox Multiple Page")),
|
|
24
|
+
React.createElement("div", { style: {
|
|
25
|
+
display: "flex",
|
|
26
|
+
flexWrap: "wrap",
|
|
27
|
+
gap: "1rem",
|
|
28
|
+
margin: "1rem",
|
|
29
|
+
width: "fit-content",
|
|
30
|
+
padding: "10px",
|
|
31
|
+
} }, checkboxes)));
|
|
32
|
+
};
|
|
33
|
+
export default IcCheckboxMultiplePage;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// IcCheckboxSinglePage displays a single checkbox group for the purpose of performance testing of the IcCheckbox component.
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { IcCheckbox, IcCheckboxGroup, IcTextField, IcTheme, IcTypography, } from "../../../../components";
|
|
4
|
+
var IcCheckboxSinglePage = function (_a) {
|
|
5
|
+
var theme = _a.theme;
|
|
6
|
+
var handleCheckboxGroupChange = function (ev) {
|
|
7
|
+
console.log("onIcChange", ev.detail.value);
|
|
8
|
+
};
|
|
9
|
+
var handleCheckboxCheck = function (ev) {
|
|
10
|
+
console.log("onIcCheck", ev);
|
|
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, "Checkbox Page")),
|
|
16
|
+
React.createElement(IcCheckboxGroup, { label: "Select your extras", name: "default", onIcChange: handleCheckboxGroupChange },
|
|
17
|
+
React.createElement(IcCheckbox, { value: "extra", label: "Extra shot (50p)", onIcCheck: handleCheckboxCheck }),
|
|
18
|
+
React.createElement(IcCheckbox, { value: "Soya milk", label: "Soya milk", checked: true }),
|
|
19
|
+
React.createElement(IcCheckbox, { value: "keep cup", label: "Takeaway cup", disabled: true }),
|
|
20
|
+
React.createElement(IcCheckbox, { value: "other", label: "Other" },
|
|
21
|
+
React.createElement(IcTextField, { slot: "additional-field", label: "Please let us know..." })),
|
|
22
|
+
React.createElement(IcCheckbox, { additionalFieldDisplay: "dynamic", value: "other", label: "Other" },
|
|
23
|
+
React.createElement(IcTextField, { slot: "additional-field", label: "Please let us know..." }))))));
|
|
24
|
+
};
|
|
25
|
+
export default IcCheckboxSinglePage;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// IcDialogAllOpenPage displays multiple dialogs that are all open on page render for the purpose of performance testing of the IcDialog component.
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { IcDialog, IcTypography, IcTheme } from "../../../../components";
|
|
4
|
+
var IcDialogAllOpenPage = function (_a) {
|
|
5
|
+
var theme = _a.theme;
|
|
6
|
+
var dialogs = Array.from({ length: 20 }, function (_, index) { return (React.createElement(IcDialog, { key: index, open: true, label: "Default dialog ".concat(index + 1), heading: "This is default dialog ".concat(index + 1) },
|
|
7
|
+
React.createElement(IcTypography, null,
|
|
8
|
+
"This is default dialog ",
|
|
9
|
+
index + 1,
|
|
10
|
+
". It is used to display information to the user."))); });
|
|
11
|
+
return (React.createElement(IcTheme, { id: "theme-wrapper", theme: theme },
|
|
12
|
+
React.createElement(IcTypography, { variant: "subtitle-small", style: { padding: "var(--ic-space-md)" } },
|
|
13
|
+
React.createElement("h1", null, "Dialog All Open Page")),
|
|
14
|
+
dialogs));
|
|
15
|
+
};
|
|
16
|
+
export default IcDialogAllOpenPage;
|
|
@@ -0,0 +1,146 @@
|
|
|
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
|
+
// IcDialogMultiplePage displays multiple dialogs for the purpose of performance testing of the IcDialog component.
|
|
13
|
+
import React from "react";
|
|
14
|
+
import { IcButton, IcDialog, IcTypography, IcTheme, } from "../../../../components";
|
|
15
|
+
var DialogLauncher = function (_a) {
|
|
16
|
+
var id = _a.id, heading = _a.heading, label = _a.label, size = _a.size, content = _a.content, buttonText = _a.buttonText, _b = _a.closeOnBackdropClick, closeOnBackdropClick = _b === void 0 ? true : _b, _c = _a.open, open = _c === void 0 ? false : _c, _d = _a.destructive, destructive = _d === void 0 ? false : _d, _e = _a.disableWidthConstraint, disableWidthConstraint = _e === void 0 ? false : _e, _f = _a.disableHeightConstraint, disableHeightConstraint = _f === void 0 ? false : _f, _g = _a.hideCloseButton, hideCloseButton = _g === void 0 ? false : _g, onOpened = _a.onOpened, onConfirmed = _a.onConfirmed, onCancelled = _a.onCancelled, onClosed = _a.onClosed;
|
|
17
|
+
var showDialog = function () {
|
|
18
|
+
var dialog = document.querySelector("#".concat(id));
|
|
19
|
+
if (dialog) {
|
|
20
|
+
dialog.open = true;
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
return (React.createElement(React.Fragment, null,
|
|
24
|
+
React.createElement(IcButton, { onClick: showDialog }, buttonText),
|
|
25
|
+
React.createElement(IcDialog, { id: id, heading: heading, label: label, size: size, closeOnBackdropClick: closeOnBackdropClick, open: open, destructive: destructive, disableWidthConstraint: disableWidthConstraint, disableHeightConstraint: disableHeightConstraint, hideCloseButton: hideCloseButton, onIcDialogOpened: onOpened, onIcDialogConfirmed: onConfirmed, onIcDialogCancelled: onCancelled, onIcDialogClosed: onClosed },
|
|
26
|
+
React.createElement(IcTypography, null, content))));
|
|
27
|
+
};
|
|
28
|
+
var dialogs = [
|
|
29
|
+
{
|
|
30
|
+
id: "auto-opening-dialog",
|
|
31
|
+
heading: "This dialog opens automatically using the open prop",
|
|
32
|
+
label: "Auto opening dialog",
|
|
33
|
+
buttonText: "Launch auto opening dialog",
|
|
34
|
+
content: "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",
|
|
35
|
+
open: true,
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
id: "small-dialog",
|
|
39
|
+
heading: "This is a small dialog",
|
|
40
|
+
label: "Small",
|
|
41
|
+
size: "small",
|
|
42
|
+
buttonText: "Launch small dialog",
|
|
43
|
+
content: "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
id: "medium-dialog",
|
|
47
|
+
heading: "This is a medium dialog",
|
|
48
|
+
label: "Medium",
|
|
49
|
+
size: "medium",
|
|
50
|
+
buttonText: "Launch medium dialog",
|
|
51
|
+
content: "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
id: "large-dialog",
|
|
55
|
+
heading: "This is a large dialog",
|
|
56
|
+
label: "Large",
|
|
57
|
+
size: "large",
|
|
58
|
+
buttonText: "Launch large dialog",
|
|
59
|
+
content: "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
id: "scrollable-dialog",
|
|
63
|
+
heading: "This dialog has overflowing content",
|
|
64
|
+
label: "Scrollable",
|
|
65
|
+
buttonText: "Launch scrollable dialog",
|
|
66
|
+
content: (React.createElement(React.Fragment, null,
|
|
67
|
+
"What is Lorem Ipsum?",
|
|
68
|
+
React.createElement("br", null),
|
|
69
|
+
React.createElement("br", null),
|
|
70
|
+
"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.",
|
|
71
|
+
React.createElement("br", null),
|
|
72
|
+
React.createElement("br", null),
|
|
73
|
+
"Why do we use it?",
|
|
74
|
+
React.createElement("br", null),
|
|
75
|
+
React.createElement("br", null),
|
|
76
|
+
"It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, content here', making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for 'lorem ipsum' will uncover many web sites still in their infancy. Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like).")),
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
id: "background-close-prevented-dialog",
|
|
80
|
+
heading: "This dialog can't be closed by clicking the background",
|
|
81
|
+
label: "Background close prevented",
|
|
82
|
+
buttonText: "Launch background close prevented dialog",
|
|
83
|
+
content: "You are about to add 'Americano' to your basket. Are you sure you want to continue?",
|
|
84
|
+
closeOnBackdropClick: false,
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
id: "default-dialog",
|
|
88
|
+
heading: "This is a default dialog",
|
|
89
|
+
label: "Default dialog",
|
|
90
|
+
buttonText: "Launch default dialog",
|
|
91
|
+
content: "Dialog content goes here.",
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
id: "destructive-dialog",
|
|
95
|
+
heading: "This is a destructive dialog",
|
|
96
|
+
label: "Destructive dialog",
|
|
97
|
+
buttonText: "Launch destructive dialog",
|
|
98
|
+
content: "Dialog content goes here.",
|
|
99
|
+
destructive: true,
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
id: "height-width-constraint-disabled-dialog",
|
|
103
|
+
heading: "This is a dialog where the height and width constraints are disabled",
|
|
104
|
+
label: "Height/width dialog",
|
|
105
|
+
buttonText: "Launch height/width constraint disabled dialog",
|
|
106
|
+
content: (React.createElement(React.Fragment, null,
|
|
107
|
+
"What is Lorem Ipsum?",
|
|
108
|
+
React.createElement("br", null),
|
|
109
|
+
React.createElement("br", null),
|
|
110
|
+
"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.",
|
|
111
|
+
React.createElement("br", null),
|
|
112
|
+
React.createElement("br", null),
|
|
113
|
+
"Why do we use it?",
|
|
114
|
+
React.createElement("br", null),
|
|
115
|
+
React.createElement("br", null),
|
|
116
|
+
"It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, content here', making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for 'lorem ipsum' will uncover many web sites still in their infancy. Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like).")),
|
|
117
|
+
disableWidthConstraint: true,
|
|
118
|
+
disableHeightConstraint: true,
|
|
119
|
+
size: "large",
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
id: "no-close-button-dialog",
|
|
123
|
+
heading: "This is a dialog with close button hidden",
|
|
124
|
+
label: "No close button dialog",
|
|
125
|
+
buttonText: "Launch no close button dialog",
|
|
126
|
+
content: "Dialog content goes here.",
|
|
127
|
+
hideCloseButton: true,
|
|
128
|
+
},
|
|
129
|
+
];
|
|
130
|
+
var IcDialogMultiplePage = function (_a) {
|
|
131
|
+
var theme = _a.theme;
|
|
132
|
+
var handleDialogOpened = function () { return console.log("Dialog opened"); };
|
|
133
|
+
var handleDialogClosed = function () { return console.log("Dialog closed"); };
|
|
134
|
+
var handleDialogCancelled = function () { return console.log("Dialog cancelled"); };
|
|
135
|
+
var handleDialogConfirmed = function () { return console.log("Dialog confirmed"); };
|
|
136
|
+
return (React.createElement(IcTheme, { id: "theme-wrapper", theme: theme },
|
|
137
|
+
React.createElement(IcTypography, { variant: "subtitle-small", style: { padding: "var(--ic-space-md)" } },
|
|
138
|
+
React.createElement("h1", null, "Dialog Multiple Page")),
|
|
139
|
+
React.createElement("div", { style: {
|
|
140
|
+
display: "flex",
|
|
141
|
+
flexDirection: "column",
|
|
142
|
+
gap: "1rem",
|
|
143
|
+
padding: "var(--ic-space-md)",
|
|
144
|
+
} }, dialogs.map(function (dialog) { return (React.createElement(DialogLauncher, __assign({ key: dialog.id }, dialog, { onOpened: handleDialogOpened, onConfirmed: handleDialogConfirmed, onCancelled: handleDialogCancelled, onClosed: handleDialogClosed }))); }))));
|
|
145
|
+
};
|
|
146
|
+
export default IcDialogMultiplePage;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
// IcDialogSinglePage displays a single dialog for the purpose of performance testing of the IcDialog component.
|
|
2
|
+
import React, { useState } from "react";
|
|
3
|
+
import { IcButton, IcDialog, IcTypography, IcTheme, } from "../../../../components";
|
|
4
|
+
var IcDialogSinglePage = function (_a) {
|
|
5
|
+
var theme = _a.theme;
|
|
6
|
+
var _b = useState(true), openDialog = _b[0], setOpenDialog = _b[1];
|
|
7
|
+
var handleDialogOpen = function () {
|
|
8
|
+
console.log("Dialog opened");
|
|
9
|
+
setOpenDialog(true);
|
|
10
|
+
};
|
|
11
|
+
var handleDialogClose = function () {
|
|
12
|
+
console.log("Dialog closed");
|
|
13
|
+
setOpenDialog(false);
|
|
14
|
+
};
|
|
15
|
+
var handleDialogConfirmed = function () {
|
|
16
|
+
console.log("Dialog confirmed");
|
|
17
|
+
setOpenDialog(false);
|
|
18
|
+
};
|
|
19
|
+
return (React.createElement(IcTheme, { id: "theme-wrapper", theme: theme },
|
|
20
|
+
React.createElement("div", { style: { padding: "var(--ic-space-md)" } },
|
|
21
|
+
React.createElement(IcTypography, { variant: "subtitle-small" },
|
|
22
|
+
React.createElement("h1", null, "Dialog Page")),
|
|
23
|
+
React.createElement(IcButton, { variant: "primary", onClick: handleDialogOpen }, "Launch auto opening dialog"),
|
|
24
|
+
React.createElement(IcDialog, { id: "auto-opening-dialog", heading: "This dialog opens automatically using the open prop", label: "Auto opening dialog", open: openDialog, onIcDialogClosed: handleDialogClose, onIcDialogConfirmed: handleDialogConfirmed },
|
|
25
|
+
React.createElement(IcTypography, null, "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.")))));
|
|
26
|
+
};
|
|
27
|
+
export default IcDialogSinglePage;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
// IcDialogSlottedContentPage displays a single dialog with slotted content for the purpose of performance testing of the IcDialog component.
|
|
2
|
+
import React, { useState } from "react";
|
|
3
|
+
import { IcButton, IcDialog, IcTypography, IcAlert, IcLink, IcTheme, } from "../../../../components";
|
|
4
|
+
var IcDialogSlottedContentPage = function (_a) {
|
|
5
|
+
var theme = _a.theme;
|
|
6
|
+
var _b = useState(true), openDialog = _b[0], setOpenDialog = _b[1];
|
|
7
|
+
var handleDialogOpen = function () {
|
|
8
|
+
console.log("Dialog opened");
|
|
9
|
+
setOpenDialog(true);
|
|
10
|
+
};
|
|
11
|
+
var handleDialogClose = function () {
|
|
12
|
+
console.log("Dialog closed");
|
|
13
|
+
setOpenDialog(false);
|
|
14
|
+
};
|
|
15
|
+
var handleAddToBasket = function () {
|
|
16
|
+
console.log("Added to basket");
|
|
17
|
+
setOpenDialog(false);
|
|
18
|
+
};
|
|
19
|
+
return (React.createElement(IcTheme, { id: "theme-wrapper", theme: theme },
|
|
20
|
+
React.createElement("div", { style: { padding: "var(--ic-space-md)" } },
|
|
21
|
+
React.createElement(IcTypography, { variant: "subtitle-small" },
|
|
22
|
+
React.createElement("h1", null, "Dialog With Slotted Content Page")),
|
|
23
|
+
React.createElement(IcButton, { variant: "primary", onClick: handleDialogOpen }, "Launch dialog"),
|
|
24
|
+
React.createElement(IcDialog, { id: "auto-opening-dialog", disableWidthConstraint: true, hideDefaultControls: true, size: "large", open: openDialog, onIcDialogClosed: handleDialogClose },
|
|
25
|
+
React.createElement(IcTypography, { slot: "heading", variant: "h4" }, "This is a slotted heading"),
|
|
26
|
+
React.createElement(IcTypography, { slot: "label", variant: "label" }, "Slotted label"),
|
|
27
|
+
React.createElement(IcAlert, { variant: "info", heading: "Info", message: "This alert is for displaying information", slot: "alert" },
|
|
28
|
+
React.createElement(IcTypography, { slot: "message" },
|
|
29
|
+
"This is some text and",
|
|
30
|
+
" ",
|
|
31
|
+
React.createElement(IcLink, { href: "/" }, "this is an inline link"),
|
|
32
|
+
" within the text."),
|
|
33
|
+
React.createElement(IcButton, { slot: "action", variant: "secondary" }, "Button")),
|
|
34
|
+
React.createElement(IcTypography, null, "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."),
|
|
35
|
+
React.createElement(IcButton, { slot: "dialog-controls", variant: "secondary", onClick: handleDialogClose }, "Go back"),
|
|
36
|
+
React.createElement(IcButton, { slot: "dialog-controls", onClick: handleAddToBasket }, "Add to basket")))));
|
|
37
|
+
};
|
|
38
|
+
export default IcDialogSlottedContentPage;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
// IcFooterPage displays a footer for the purpose of performance testing of the IcFooter component.
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { IcFooter, IcFooterLink, IcClassificationBanner, IcTheme, IcTypography, } from "../../../components";
|
|
4
|
+
var IcFooterPage = 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, "Footer Page")),
|
|
9
|
+
React.createElement(React.Fragment, null,
|
|
10
|
+
React.createElement(IcClassificationBanner, { classification: "official" }),
|
|
11
|
+
React.createElement(IcFooter, { description: "The ICDS is maintained by the Design Practice Team. If you've got a question or want to feedback, please get in touch.", caption: "All content is available under the Open Government Licence v3.0, except source code and code examples which are available under the MIT Licence.", style: { position: "fixed", bottom: "0", left: "0", right: "0" } },
|
|
12
|
+
React.createElement(IcFooterLink, { slot: "link", href: "/" }, "Get Started"),
|
|
13
|
+
React.createElement(IcFooterLink, { slot: "link", href: "/" }, "Accessibility"),
|
|
14
|
+
React.createElement(IcFooterLink, { slot: "link", href: "/" }, "Styles"),
|
|
15
|
+
React.createElement(IcFooterLink, { slot: "link", href: "/" }, "Components"),
|
|
16
|
+
React.createElement(IcFooterLink, { slot: "link", href: "/" }, "Patterns"),
|
|
17
|
+
React.createElement(IcFooterLink, { slot: "link", href: "/" }, "Design toolkit"),
|
|
18
|
+
React.createElement("div", { slot: "logo", role: "list", style: {
|
|
19
|
+
display: "flex",
|
|
20
|
+
gap: "var(--ic-space-lg)",
|
|
21
|
+
} },
|
|
22
|
+
React.createElement(IcFooterLink, { href: "/" },
|
|
23
|
+
React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", height: "48px", viewBox: "0 0 24 24", width: "48px", fill: "#FFFFFF" },
|
|
24
|
+
React.createElement("title", null, "Footer logo link 1"),
|
|
25
|
+
React.createElement("path", { d: "M0 0h24v24H0V0z", fill: "none" }),
|
|
26
|
+
React.createElement("path", { d: "M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-4.86 8.86l-3 3.87L9 13.14 6 17h12l-3.86-5.14z" }))),
|
|
27
|
+
React.createElement(IcFooterLink, { href: "/" },
|
|
28
|
+
React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", height: "48px", viewBox: "0 0 24 24", width: "48px", fill: "#FFFFFF" },
|
|
29
|
+
React.createElement("title", null, "Footer logo link 2"),
|
|
30
|
+
React.createElement("path", { d: "M0 0h24v24H0V0z", fill: "none" }),
|
|
31
|
+
React.createElement("path", { d: "M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-4.86 8.86l-3 3.87L9 13.14 6 17h12l-3.86-5.14z" }))),
|
|
32
|
+
React.createElement(IcFooterLink, { href: "/" },
|
|
33
|
+
React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", height: "48px", viewBox: "0 0 24 24", width: "48px", fill: "#FFFFFF" },
|
|
34
|
+
React.createElement("title", null, "Footer logo link 3"),
|
|
35
|
+
React.createElement("path", { d: "M0 0h24v24H0V0z", fill: "none" }),
|
|
36
|
+
React.createElement("path", { d: "M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-4.86 8.86l-3 3.87L9 13.14 6 17h12l-3.86-5.14z" }))))))));
|
|
37
|
+
};
|
|
38
|
+
export default IcFooterPage;
|
|
@@ -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;
|