@arc-ui/components 11.21.1 → 11.23.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/Alert/Alert.cjs.js +1 -1
- package/dist/Alert/Alert.esm.js +1 -1
- package/dist/Avatar/Avatar.cjs.js +1 -1
- package/dist/Avatar/Avatar.esm.js +1 -1
- package/dist/AvatarGroup/AvatarGroup.cjs.js +2 -1
- package/dist/AvatarGroup/AvatarGroup.esm.js +2 -1
- package/dist/Badge/Badge.cjs.js +1 -1
- package/dist/Badge/Badge.esm.js +1 -1
- package/dist/Button/Button.cjs.js +1 -1
- package/dist/Button/Button.esm.js +1 -1
- package/dist/Calendar/Calendar.cjs.js +2 -2
- package/dist/Calendar/Calendar.esm.js +2 -2
- package/dist/Checkbox/Checkbox.cjs.js +4 -4
- package/dist/Checkbox/Checkbox.esm.js +4 -4
- package/dist/DatePicker/DatePicker.cjs.js +8 -5
- package/dist/DatePicker/DatePicker.esm.js +8 -5
- package/dist/Disclosure/Disclosure.cjs.js +1 -2
- package/dist/Disclosure/Disclosure.esm.js +1 -2
- package/dist/DisclosureMini/DisclosureMini.cjs.js +1 -1
- package/dist/DisclosureMini/DisclosureMini.esm.js +1 -1
- package/dist/Filter/Filter.cjs.js +2 -1
- package/dist/Filter/Filter.esm.js +2 -1
- package/dist/FormControl/FormControl.cjs.js +3 -3
- package/dist/FormControl/FormControl.esm.js +3 -3
- package/dist/Grid/Grid.cjs.js +13 -0
- package/dist/Grid/Grid.esm.js +5 -0
- package/dist/Grid/package.json +7 -0
- package/dist/Hidden/Hidden.cjs.js +24 -0
- package/dist/Hidden/Hidden.esm.js +16 -0
- package/dist/Hidden/package.json +7 -0
- package/dist/ImpactCard/ImpactCard.cjs.js +42 -0
- package/dist/ImpactCard/ImpactCard.esm.js +34 -0
- package/dist/ImpactCard/package.json +7 -0
- package/dist/InformationCard/InformationCard.cjs.js +9 -5
- package/dist/InformationCard/InformationCard.esm.js +11 -7
- package/dist/Link/Link.cjs.js +76 -0
- package/dist/Link/Link.esm.js +68 -0
- package/dist/Link/package.json +7 -0
- package/dist/MediaCard/MediaCard.cjs.js +7 -5
- package/dist/MediaCard/MediaCard.esm.js +9 -7
- package/dist/Modal/Modal.cjs.js +3 -3
- package/dist/Modal/Modal.esm.js +3 -3
- package/dist/Pagination/Pagination.cjs.js +1 -1
- package/dist/Pagination/Pagination.esm.js +1 -1
- package/dist/PaginationSimple/PaginationSimple.cjs.js +6 -10
- package/dist/PaginationSimple/PaginationSimple.esm.js +6 -10
- package/dist/ProgressBar/ProgressBar.cjs.js +8 -2
- package/dist/ProgressBar/ProgressBar.esm.js +8 -2
- package/dist/ProgressStepper/ProgressStepper.cjs.js +2 -2
- package/dist/ProgressStepper/ProgressStepper.esm.js +2 -2
- package/dist/RadioGroup/RadioGroup.cjs.js +4 -4
- package/dist/RadioGroup/RadioGroup.esm.js +4 -4
- package/dist/Select/Select.cjs.js +3 -3
- package/dist/Select/Select.esm.js +3 -3
- package/dist/SiteHeader/SiteHeader.cjs.js +2 -2
- package/dist/SiteHeader/SiteHeader.esm.js +2 -2
- package/dist/SiteHeaderV2/SiteHeaderV2.cjs.js +3 -2
- package/dist/SiteHeaderV2/SiteHeaderV2.esm.js +3 -2
- package/dist/SkipLink/SkipLink.cjs.js +1 -0
- package/dist/SkipLink/SkipLink.esm.js +1 -0
- package/dist/Switch/Switch.cjs.js +4 -4
- package/dist/Switch/Switch.esm.js +4 -4
- package/dist/Tabs/Tabs.cjs.js +1 -1
- package/dist/Tabs/Tabs.esm.js +1 -1
- package/dist/Tag/Tag.cjs.js +1 -1
- package/dist/Tag/Tag.esm.js +1 -1
- package/dist/TextArea/TextArea.cjs.js +15 -13
- package/dist/TextArea/TextArea.esm.js +15 -13
- package/dist/TextInput/TextInput.cjs.js +4 -4
- package/dist/TextInput/TextInput.esm.js +4 -4
- package/dist/Toast/Toast.cjs.js +1 -1
- package/dist/Toast/Toast.esm.js +1 -1
- package/dist/TypographyCard/TypographyCard.cjs.js +10 -7
- package/dist/TypographyCard/TypographyCard.esm.js +11 -8
- package/dist/Visible/Visible.cjs.js +24 -0
- package/dist/Visible/Visible.esm.js +16 -0
- package/dist/Visible/package.json +7 -0
- package/dist/VisuallyHidden/VisuallyHidden.cjs.js +1 -1
- package/dist/VisuallyHidden/VisuallyHidden.esm.js +1 -1
- package/dist/_shared/cjs/{Avatar-12ece0dd.js → Avatar-f1b1c129.js} +1 -0
- package/dist/_shared/cjs/{Button-84533dc8.js → Button-6ba21d3b.js} +1 -1
- package/dist/_shared/cjs/{Calendar-c6ed5f2c.js → Calendar-6ea75d05.js} +2 -1
- package/dist/_shared/cjs/{CardFooter-4a68a862.js → CardFooter-ff015d7d.js} +9 -7
- package/dist/_shared/cjs/{Checkbox-8915fcd9.js → Checkbox-0253327b.js} +2 -2
- package/dist/_shared/cjs/{DisclosureMini-d0eeb6bb.js → DisclosureMini-09c749e5.js} +1 -2
- package/dist/_shared/cjs/{Filter-1bde635c.js → Filter-f9506dfa.js} +22 -14
- package/dist/_shared/cjs/{FormControl-5f3b6ce4.js → FormControl-68258ce1.js} +2 -2
- package/dist/_shared/cjs/Grid-da776e77.js +45 -0
- package/dist/_shared/cjs/{ProgressStepper-20a61620.js → ProgressStepper-57cfef1e.js} +3 -3
- package/dist/_shared/cjs/{RadioGroup-07bb155e.js → RadioGroup-85eda600.js} +2 -2
- package/dist/_shared/cjs/{SiteHeader.rehydrator-ea49f8d5.js → SiteHeader.rehydrator-b76b0889.js} +1 -1
- package/dist/_shared/cjs/{SiteHeaderV2-b41fdb49.js → SiteHeaderV2-ce1c8737.js} +17 -16
- package/dist/_shared/cjs/{Tabs-24e6f45b.js → Tabs-bc9fac46.js} +1 -0
- package/dist/_shared/cjs/{Tag-8723b324.js → Tag-73a59171.js} +5 -5
- package/dist/_shared/cjs/{TextInput-5da70ec2.js → TextInput-8912dd41.js} +5 -5
- package/dist/_shared/cjs/{Toast-7a20d1b9.js → Toast-26207fef.js} +1 -1
- package/dist/_shared/cjs/{VisuallyHidden-e2c8b291.js → VisuallyHidden-b0de4c7b.js} +1 -1
- package/dist/_shared/esm/{Avatar-d01e2b7b.js → Avatar-320313f0.js} +1 -0
- package/dist/_shared/esm/{Button-3f294e64.js → Button-a7d134c6.js} +1 -1
- package/dist/_shared/esm/{Calendar-753ef6f1.js → Calendar-fafaca6b.js} +2 -1
- package/dist/_shared/esm/{CardFooter-a08b70ee.js → CardFooter-e13f77b0.js} +9 -7
- package/dist/_shared/esm/{Checkbox-0e051546.js → Checkbox-588619c7.js} +2 -2
- package/dist/_shared/esm/{DisclosureMini-ec17b008.js → DisclosureMini-56719716.js} +1 -2
- package/dist/_shared/esm/{Filter-58a42358.js → Filter-258ba675.js} +22 -14
- package/dist/_shared/esm/{FormControl-cc99cde0.js → FormControl-8e836656.js} +2 -2
- package/dist/_shared/esm/Grid-07dbf4bd.js +39 -0
- package/dist/_shared/esm/{ProgressStepper-74d48612.js → ProgressStepper-6c811282.js} +3 -3
- package/dist/_shared/esm/{RadioGroup-362be63f.js → RadioGroup-6c8f8454.js} +2 -2
- package/dist/_shared/esm/{SiteHeader.rehydrator-65c8cf71.js → SiteHeader.rehydrator-8ad7651b.js} +1 -1
- package/dist/_shared/esm/{SiteHeaderV2-f06ac085.js → SiteHeaderV2-a7c1b1cb.js} +17 -16
- package/dist/_shared/esm/{Tabs-a85af483.js → Tabs-9485cab6.js} +1 -0
- package/dist/_shared/esm/{Tag-664b85c8.js → Tag-cb35d57b.js} +5 -5
- package/dist/_shared/esm/{TextInput-1d1c5fd6.js → TextInput-5ffa05da.js} +5 -5
- package/dist/_shared/esm/{Toast-7a232e15.js → Toast-fcbfc194.js} +1 -1
- package/dist/_shared/esm/{VisuallyHidden-b9eebf71.js → VisuallyHidden-06692fd3.js} +1 -1
- package/dist/index.es.js +246 -89
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +250 -88
- package/dist/index.js.map +1 -1
- package/dist/styles.css +4 -4
- package/dist/types/components/Alert/Alert.d.ts +1 -1
- package/dist/types/components/Avatar/Avatar.d.ts +1 -0
- package/dist/types/components/AvatarGroup/AvatarGroup.d.ts +1 -0
- package/dist/types/components/Badge/Badge.d.ts +1 -1
- package/dist/types/components/Button/Button.d.ts +1 -1
- package/dist/types/components/Calendar/Calendar.d.ts +1 -0
- package/dist/types/components/DatePicker/DatePicker.d.ts +3 -0
- package/dist/types/components/Disclosure/Disclosure.d.ts +1 -2
- package/dist/types/components/DisclosureMini/DisclosureMini.d.ts +1 -2
- package/dist/types/components/Filter/Filter.d.ts +1 -1
- package/dist/types/components/Filter/FilterItems/FilterItems.d.ts +4 -0
- package/dist/types/components/Grid/Grid.constants.d.ts +1 -0
- package/dist/types/components/Grid/Grid.d.ts +28 -0
- package/dist/types/components/Grid/Grid.types.d.ts +8 -0
- package/dist/types/components/Grid/components/Col/Col.d.ts +9 -0
- package/dist/types/components/Grid/components/Col/index.d.ts +1 -0
- package/dist/types/components/Grid/components/Row/Row.d.ts +9 -0
- package/dist/types/components/Grid/components/Row/index.d.ts +1 -0
- package/dist/types/components/Grid/index.d.ts +2 -0
- package/dist/types/components/Hidden/Hidden.d.ts +11 -0
- package/dist/types/components/Hidden/index.d.ts +1 -0
- package/dist/types/components/ImpactCard/ImpactCard.d.ts +53 -0
- package/dist/types/components/ImpactCard/index.d.ts +1 -0
- package/dist/types/components/InformationCard/InformationCard.d.ts +5 -0
- package/dist/types/components/Link/Link.d.ts +52 -0
- package/dist/types/components/Link/index.d.ts +1 -0
- package/dist/types/components/MediaCard/MediaCard.d.ts +4 -0
- package/dist/types/components/Modal/Modal.d.ts +1 -1
- package/dist/types/components/Pagination/Pagination.d.ts +1 -1
- package/dist/types/components/PaginationSimple/PaginationSimple.d.ts +12 -4
- package/dist/types/components/ProgressBar/ProgressBar.d.ts +4 -0
- package/dist/types/components/ProgressStepper/ProgressStepper.d.ts +1 -1
- package/dist/types/components/SkipLink/SkipLink.d.ts +1 -0
- package/dist/types/components/Switch/Switch.d.ts +1 -1
- package/dist/types/components/Tabs/Tabs.d.ts +1 -0
- package/dist/types/components/Tag/Tag.d.ts +5 -1
- package/dist/types/components/TextInput/TextInput.d.ts +3 -0
- package/dist/types/components/Toast/Toast.d.ts +1 -1
- package/dist/types/components/TypographyCard/TypographyCard.d.ts +5 -0
- package/dist/types/components/Visible/Visible.d.ts +11 -0
- package/dist/types/components/Visible/index.d.ts +1 -0
- package/dist/types/components/VisuallyHidden/VisuallyHidden.d.ts +1 -1
- package/dist/types/components/index.d.ts +5 -0
- package/dist/types/private-components/CardFooter/CardFooter.d.ts +1 -1
- package/dist/types/styles.d.ts +5 -0
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -557,7 +557,7 @@ const BtIconTick = (props) =>
|
|
|
557
557
|
),
|
|
558
558
|
);
|
|
559
559
|
|
|
560
|
-
/**
|
|
560
|
+
/** Use `Alert` to inform the user of important changes or actions. */
|
|
561
561
|
var Alert = function (_a) {
|
|
562
562
|
var _b;
|
|
563
563
|
var heading = _a.heading, description = _a.description, link = _a.link, linkText = _a.linkText, linkAriaLabel = _a.linkAriaLabel, type = _a.type, _c = _a.status, status = _c === void 0 ? "general" : _c, isDismissable = _a.isDismissable, headingLevel = _a.headingLevel, onDismiss = _a.onDismiss, onLinkClick = _a.onLinkClick, icon = _a.icon, props = __rest(_a, ["heading", "description", "link", "linkText", "linkAriaLabel", "type", "status", "isDismissable", "headingLevel", "onDismiss", "onLinkClick", "icon"]);
|
|
@@ -699,7 +699,7 @@ const BtIconPlayFill = (props) =>
|
|
|
699
699
|
);
|
|
700
700
|
|
|
701
701
|
var CardFooter = function (_a) {
|
|
702
|
-
var metaText = _a.metaText, _b = _a.buttonIcon, buttonIcon = _b === void 0 ? "arrow" : _b, _c = _a.isDarkPathway, isDarkPathway = _c === void 0 ? false : _c, _d = _a.showButton, showButton = _d === void 0 ? true : _d, _e = _a.
|
|
702
|
+
var metaText = _a.metaText, _b = _a.buttonIcon, buttonIcon = _b === void 0 ? "arrow" : _b, _c = _a.isDarkPathway, isDarkPathway = _c === void 0 ? false : _c, _d = _a.showButton, showButton = _d === void 0 ? true : _d, _e = _a.isHovered, isHovered = _e === void 0 ? false : _e;
|
|
703
703
|
var icons = {
|
|
704
704
|
arrow: {
|
|
705
705
|
regular: BtIconArrowRight,
|
|
@@ -711,16 +711,18 @@ var CardFooter = function (_a) {
|
|
|
711
711
|
}
|
|
712
712
|
};
|
|
713
713
|
return (React__default.createElement("div", { className: classNames("arc-CardFooter", {
|
|
714
|
-
"arc-CardFooter--darkPathway": isDarkPathway
|
|
715
|
-
"arc-CardFooter--showFilledIcon": showFilledIcon
|
|
714
|
+
"arc-CardFooter--darkPathway": isDarkPathway
|
|
716
715
|
}) },
|
|
717
716
|
React__default.createElement("div", { className: "arc-CardFooter-metaTextContainer" }, metaText && (React__default.createElement("span", { className: "arc-CardFooter-metaText" }, metaText))),
|
|
718
717
|
showButton && (React__default.createElement("div", null,
|
|
719
718
|
React__default.createElement("div", { className: "arc-CardFooter-button" },
|
|
720
|
-
React__default.createElement("div", { className:
|
|
721
|
-
React__default.createElement(
|
|
722
|
-
|
|
723
|
-
|
|
719
|
+
React__default.createElement("div", { className: "arc-CardFooter-buttonIcon" },
|
|
720
|
+
React__default.createElement("div", { className: classNames("arc-CardFooter-buttonIconRight", {
|
|
721
|
+
"arc-CardFooter-buttonIconRight--isHovered": isHovered
|
|
722
|
+
}) },
|
|
723
|
+
React__default.createElement(Icon, { icon: icons[buttonIcon].regular, size: 40 })),
|
|
724
|
+
React__default.createElement("div", { className: "arc-CardFooter-buttonIconLeft" },
|
|
725
|
+
React__default.createElement(Icon, { icon: icons[buttonIcon].regular, size: 40 }))))))));
|
|
724
726
|
};
|
|
725
727
|
|
|
726
728
|
var ConditionalWrapper = function (_a) {
|
|
@@ -800,6 +802,7 @@ var AvatarContent = function (_a) {
|
|
|
800
802
|
return React__default.createElement(Icon, { size: iconSize[size], icon: BtIconUser });
|
|
801
803
|
};
|
|
802
804
|
|
|
805
|
+
/** Use `Avatar` to visually represent a user. */
|
|
803
806
|
var Avatar = function (_a) {
|
|
804
807
|
var img = _a.img, initials = _a.initials, href = _a.href, title = _a.title, ariaLabel = _a.ariaLabel, onClick = _a.onClick, _b = _a.size, size = _b === void 0 ? "xl" : _b, props = __rest(_a, ["img", "initials", "href", "title", "ariaLabel", "onClick", "size"]);
|
|
805
808
|
var wrapperAttrs = __assign({ className: classNames("arc-Avatar", "arc-Avatar--".concat(size), {
|
|
@@ -817,6 +820,7 @@ var getAvatars = function (avatars, max) {
|
|
|
817
820
|
: []), true);
|
|
818
821
|
};
|
|
819
822
|
|
|
823
|
+
/** Use `AvatarGroup` to visually represent a group of users. */
|
|
820
824
|
var AvatarGroup = function (_a) {
|
|
821
825
|
var title = _a.title, ariaLabel = _a.ariaLabel, href = _a.href, avatars = _a.avatars, onClick = _a.onClick, max = _a.max, _b = _a.size, size = _b === void 0 ? "xl" : _b, props = __rest(_a, ["title", "ariaLabel", "href", "avatars", "onClick", "max", "size"]);
|
|
822
826
|
var id = useId();
|
|
@@ -826,7 +830,7 @@ var AvatarGroup = function (_a) {
|
|
|
826
830
|
React__default.createElement(Avatar, __assign({ size: size }, props)))); }))));
|
|
827
831
|
};
|
|
828
832
|
|
|
829
|
-
/** Use `Badge`
|
|
833
|
+
/** Use `Badge` as a static, non-interactive way to provide short updates. */
|
|
830
834
|
var Badge = function (_a) {
|
|
831
835
|
var _b, _c;
|
|
832
836
|
var children = _a.children, _d = _a.state, state = _d === void 0 ? "default" : _d, _e = _a.size, size = _e === void 0 ? "default" : _e, _f = _a.fill, fill = _f === void 0 ? "solid" : _f, ariaLabel = _a.ariaLabel, ariaRole = _a.ariaRole, props = __rest(_a, ["children", "state", "size", "fill", "ariaLabel", "ariaRole"]);
|
|
@@ -1606,7 +1610,7 @@ const BtIconChevronRightMid = (props) =>
|
|
|
1606
1610
|
);
|
|
1607
1611
|
|
|
1608
1612
|
/**
|
|
1609
|
-
* Use `Button` to
|
|
1613
|
+
* Use `Button` to let a user complete an action like ‘Log in’ or ‘Register’.
|
|
1610
1614
|
*/
|
|
1611
1615
|
var Button = forwardRef(function (_a, ref) {
|
|
1612
1616
|
var _b;
|
|
@@ -1875,8 +1879,7 @@ const BtIconChevronDown2Px = (props) =>
|
|
|
1875
1879
|
);
|
|
1876
1880
|
|
|
1877
1881
|
/**
|
|
1878
|
-
* Use `DisclosureMini` to
|
|
1879
|
-
* an "open" state.
|
|
1882
|
+
* Use `DisclosureMini` to show and hide sections of content.
|
|
1880
1883
|
*/
|
|
1881
1884
|
var DisclosureMini = function (_a) {
|
|
1882
1885
|
var children = _a.children, summary = _a.summary, onClick = _a.onClick, id = _a.id, _b = _a.isOpen, isOpen = _b === void 0 ? false : _b, _c = _a.iconPosition, iconPosition = _c === void 0 ? "left" : _c, _d = _a.size, size = _d === void 0 ? "l" : _d, props = __rest(_a, ["children", "summary", "onClick", "id", "isOpen", "iconPosition", "size"]);
|
|
@@ -1905,7 +1908,7 @@ var DisclosureMini = function (_a) {
|
|
|
1905
1908
|
};
|
|
1906
1909
|
|
|
1907
1910
|
/**
|
|
1908
|
-
*
|
|
1911
|
+
* Use `VisuallyHidden` to provide text for screen readers that is visually hidden on screen.
|
|
1909
1912
|
*/
|
|
1910
1913
|
var VisuallyHidden = function (_a) {
|
|
1911
1914
|
var children = _a.children;
|
|
@@ -2008,7 +2011,7 @@ var Checkbox = forwardRef(function (_a, ref) {
|
|
|
2008
2011
|
React__default.createElement("label", { id: idLabel, htmlFor: id, className: classNames("arc-Checkbox-label", {
|
|
2009
2012
|
"arc-Checkbox-label--top": checkboxAlignment === "top"
|
|
2010
2013
|
}) },
|
|
2011
|
-
React__default.createElement("input", __assign({ "aria-describedby": ariaDescribedby, "aria-invalid": errorMessage ? "true" : "false", className: "arc-Checkbox-input" }, checkedProps, { disabled: isDisabled, id: id, name: name, onBlur: onBlur, onChange: onChange, ref: ref, required: isRequired, type: "checkbox", value: value }, filterDataAttrs(props))),
|
|
2014
|
+
React__default.createElement("input", __assign({ "aria-describedby": ariaDescribedby, "aria-invalid": errorMessage ? "true" : "false", "aria-checked": checked ? "true" : "false", className: "arc-Checkbox-input" }, checkedProps, { disabled: isDisabled, id: id, name: name, onBlur: onBlur, onChange: onChange, ref: ref, required: isRequired, type: "checkbox", value: value }, filterDataAttrs(props))),
|
|
2012
2015
|
React__default.createElement("span", { className: "arc-Checkbox-box" },
|
|
2013
2016
|
React__default.createElement(BtIconTickAlt2Px, null)),
|
|
2014
2017
|
React__default.createElement("span", __assign({}, (checkboxAlignment === "top" && {
|
|
@@ -2060,7 +2063,7 @@ var Columns = function (_a) {
|
|
|
2060
2063
|
var children = _a.children, _b = _a.isGutterless, isGutterless = _b === void 0 ? false : _b, props = __rest(_a, ["children", "isGutterless"]);
|
|
2061
2064
|
useEffect(function () {
|
|
2062
2065
|
React__default.Children.map(children, function (item) {
|
|
2063
|
-
if (item && item.type !== Col) {
|
|
2066
|
+
if (item && item.type !== Col$1) {
|
|
2064
2067
|
throw new Error("Illegal child passed to <Columns />. Ensure to only use <Columns.Col />.");
|
|
2065
2068
|
}
|
|
2066
2069
|
});
|
|
@@ -2071,7 +2074,7 @@ var Columns = function (_a) {
|
|
|
2071
2074
|
}) }, filterDataAttrs(props)),
|
|
2072
2075
|
React__default.createElement("div", { className: "arc-Columns-inner" }, children)));
|
|
2073
2076
|
};
|
|
2074
|
-
var Col = function (_a) {
|
|
2077
|
+
var Col$1 = function (_a) {
|
|
2075
2078
|
var _b;
|
|
2076
2079
|
var align = _a.align, children = _a.children, _c = _a.isDebugVisible, isDebugVisible = _c === void 0 ? false : _c, offset = _a.offset, offsetS = _a.offsetS, offsetM = _a.offsetM, offsetL = _a.offsetL, offsetXL = _a.offsetXL, span = _a.span, spanS = _a.spanS, spanM = _a.spanM, spanL = _a.spanL, spanXL = _a.spanXL, props = __rest(_a, ["align", "children", "isDebugVisible", "offset", "offsetS", "offsetM", "offsetL", "offsetXL", "span", "spanS", "spanM", "spanL", "spanXL"]);
|
|
2077
2080
|
return (React__default.createElement("div", __assign({ className: classNames((_b = {},
|
|
@@ -2095,7 +2098,7 @@ var Col = function (_a) {
|
|
|
2095
2098
|
_b["arc-Columns-col--debugVisible"] = isDebugVisible,
|
|
2096
2099
|
_b)) }, filterDataAttrs(props)), children));
|
|
2097
2100
|
};
|
|
2098
|
-
Columns.Col = Col;
|
|
2101
|
+
Columns.Col = Col$1;
|
|
2099
2102
|
|
|
2100
2103
|
/**
|
|
2101
2104
|
#### Deprecation Notice
|
|
@@ -2119,8 +2122,7 @@ var Curve = function (_a) {
|
|
|
2119
2122
|
};
|
|
2120
2123
|
|
|
2121
2124
|
/**
|
|
2122
|
-
* Use `Disclosure` to
|
|
2123
|
-
* an "open" state.
|
|
2125
|
+
* Use `Disclosure` to show and hide sections of content.
|
|
2124
2126
|
*/
|
|
2125
2127
|
var Disclosure = function (_a) {
|
|
2126
2128
|
var children = _a.children, headingLevel = _a.headingLevel, _b = _a.indentDetails, indentDetails = _b === void 0 ? false : _b, _c = _a.isOpen, isOpen = _c === void 0 ? false : _c, summary = _a.summary, props = __rest(_a, ["children", "headingLevel", "indentDetails", "isOpen", "summary"]);
|
|
@@ -2166,8 +2168,11 @@ var FilterControl = function (_a) {
|
|
|
2166
2168
|
return (React__default.createElement("button", { className: classNames("arc-FilterControl", {
|
|
2167
2169
|
"arc-FilterControl--onDarkSurface": surface === "dark",
|
|
2168
2170
|
"arc-FilterControl--selected": selected
|
|
2169
|
-
}), onClick: onClickHandler, tabIndex: 0 },
|
|
2170
|
-
React__default.createElement("div", { className: "arc-FilterControl-text" },
|
|
2171
|
+
}), onClick: onClickHandler, tabIndex: 0, "aria-pressed": selected },
|
|
2172
|
+
React__default.createElement("div", { className: "arc-FilterControl-text" },
|
|
2173
|
+
React__default.createElement(VisuallyHidden, null, "Filter by"),
|
|
2174
|
+
" ",
|
|
2175
|
+
children)));
|
|
2171
2176
|
};
|
|
2172
2177
|
|
|
2173
2178
|
var FilterControls = function (_a) {
|
|
@@ -2184,19 +2189,23 @@ var FilterItem = function (_a) {
|
|
|
2184
2189
|
};
|
|
2185
2190
|
|
|
2186
2191
|
var FilterItems = function (_a) {
|
|
2187
|
-
var children = _a.children, _b = _a.displayType, displayType = _b === void 0 ? "grid" : _b, props = __rest(_a, ["children", "displayType"]);
|
|
2188
|
-
return (React__default.createElement("div",
|
|
2189
|
-
|
|
2190
|
-
"
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2192
|
+
var children = _a.children, error = _a.error, _b = _a.displayType, displayType = _b === void 0 ? "grid" : _b, props = __rest(_a, ["children", "error", "displayType"]);
|
|
2193
|
+
return React__default.Children.toArray(children).length > 0 ? (React__default.createElement("div", null,
|
|
2194
|
+
React__default.createElement("div", { className: "arc-FilterItems-offscreen", "aria-live": "assertive" }, React__default.Children.toArray(children).length > 0
|
|
2195
|
+
? "".concat(React__default.Children.toArray(children).length, " records listed.")
|
|
2196
|
+
: null),
|
|
2197
|
+
React__default.createElement("div", __assign({ className: classNames("arc-FilterItems", {
|
|
2198
|
+
"arc-FilterItems--list": displayType === "list",
|
|
2199
|
+
"arc-FilterItems--grid": displayType === "grid"
|
|
2200
|
+
}) }, filterDataAttrs(props)), displayType === "list"
|
|
2201
|
+
? React__default.Children.toArray(children).map(function (child, index, array) { return (React__default.createElement(React__default.Fragment, { key: index },
|
|
2202
|
+
child,
|
|
2203
|
+
index !== array.length - 1 && (React__default.createElement(React__default.Fragment, null,
|
|
2204
|
+
React__default.createElement("div", { className: "arc-FilterItems-separator", "data-testid": "arc-FilterItems-separator" }))))); })
|
|
2205
|
+
: children))) : (React__default.createElement("div", { "aria-live": "assertive" }, error));
|
|
2197
2206
|
};
|
|
2198
2207
|
|
|
2199
|
-
/**
|
|
2208
|
+
/** Use `Filter` to filter and categorise page content. */
|
|
2200
2209
|
var Filter = function (_a) {
|
|
2201
2210
|
var children = _a.children, onChange = _a.onChange, displayType = _a.displayType, controlsAlignment = _a.controlsAlignment, _b = _a.logicType, logicType = _b === void 0 ? "OR" : _b, error = _a.error, props = __rest(_a, ["children", "onChange", "displayType", "controlsAlignment", "logicType", "error"]);
|
|
2202
2211
|
var _c = useState([]), selectedControls = _c[0], setSelectedControls = _c[1];
|
|
@@ -2253,13 +2262,46 @@ var Filter = function (_a) {
|
|
|
2253
2262
|
React__default.createElement(FilterControls, { controlsAlignment: controlsAlignment }, controls &&
|
|
2254
2263
|
React__default.isValidElement(controls) &&
|
|
2255
2264
|
React__default.Children.map(controls.props.children, function (control, index) { return (React__default.createElement(FilterControl, { key: index, onClick: function () { return handleControlClick(control.props.children); }, isSelected: control.props.isSelected }, control.props.children)); })),
|
|
2256
|
-
|
|
2265
|
+
React__default.createElement(FilterItems, { displayType: displayType, error: error }, filteredItems.map(function (item) { return item.props.children; }))));
|
|
2257
2266
|
};
|
|
2258
2267
|
Filter.Controls = FilterControls;
|
|
2259
2268
|
Filter.Control = FilterControl;
|
|
2260
2269
|
Filter.Items = FilterItems;
|
|
2261
2270
|
Filter.Item = FilterItem;
|
|
2262
2271
|
|
|
2272
|
+
var BREAKPOINTS = ["xs", "s", "m", "l", "xl"];
|
|
2273
|
+
|
|
2274
|
+
var Col = function (props) {
|
|
2275
|
+
return (React__default.createElement("div", __assign({ className: classNames("arc-Grid-col", BREAKPOINTS.reduce(function (acc, bp) {
|
|
2276
|
+
var _a;
|
|
2277
|
+
var _b, _c;
|
|
2278
|
+
var sizeValue = props === null || props === void 0 ? void 0 : props[bp];
|
|
2279
|
+
var orderValue = (_b = props.order) === null || _b === void 0 ? void 0 : _b[bp];
|
|
2280
|
+
var offsetValue = (_c = props.offset) === null || _c === void 0 ? void 0 : _c[bp];
|
|
2281
|
+
return __assign(__assign({}, acc), (_a = {}, _a["arc-Grid-col--".concat(bp).concat(sizeValue)] = sizeValue !== undefined, _a["arc-Grid-order--".concat(bp).concat(orderValue)] = orderValue !== undefined, _a["arc-Grid-offset--".concat(bp).concat(offsetValue)] = offsetValue !== undefined, _a));
|
|
2282
|
+
}, {})) }, filterDataAttrs(props)), props.children));
|
|
2283
|
+
};
|
|
2284
|
+
|
|
2285
|
+
var Row = function (_a) {
|
|
2286
|
+
var _b = _a.direction, direction = _b === void 0 ? "row" : _b, _c = _a.align, align = _c === void 0 ? "normal" : _c, _d = _a.justify, justify = _d === void 0 ? "normal" : _d, children = _a.children, props = __rest(_a, ["direction", "align", "justify", "children"]);
|
|
2287
|
+
return (React__default.createElement("div", __assign({ className: classNames("arc-Grid-row", "".concat(suffixModifier("arc-Grid-row--direction", direction)), "".concat(suffixModifier("arc-Grid-row--justify", justify)), "".concat(suffixModifier("arc-Grid-row--align", align))) }, filterDataAttrs(props)), children));
|
|
2288
|
+
};
|
|
2289
|
+
|
|
2290
|
+
/**
|
|
2291
|
+
* Use `Grid` to compose layouts on a 12-column grid.
|
|
2292
|
+
*/
|
|
2293
|
+
var Grid = function (_a) {
|
|
2294
|
+
var children = _a.children, isFluid = _a.isFluid, isDebugVisible = _a.isDebugVisible, isGutterless = _a.isGutterless, props = __rest(_a, ["children", "isFluid", "isDebugVisible", "isGutterless"]);
|
|
2295
|
+
return (React__default.createElement("div", __assign({ className: classNames("arc-Grid", {
|
|
2296
|
+
"arc-Grid--fluid": isFluid,
|
|
2297
|
+
"arc-Grid--debugVisible": isDebugVisible,
|
|
2298
|
+
"arc-Grid--gutterless": isGutterless
|
|
2299
|
+
}) }, filterDataAttrs(props)),
|
|
2300
|
+
React__default.createElement("div", { className: "arc-Grid-inner" }, children)));
|
|
2301
|
+
};
|
|
2302
|
+
Grid.Row = Row;
|
|
2303
|
+
Grid.Col = Col;
|
|
2304
|
+
|
|
2263
2305
|
/**
|
|
2264
2306
|
* Use `Group` to arrange flexible items in a row.
|
|
2265
2307
|
*/
|
|
@@ -2295,6 +2337,17 @@ var GroupItem = function (_a) {
|
|
|
2295
2337
|
};
|
|
2296
2338
|
Group.Item = GroupItem;
|
|
2297
2339
|
|
|
2340
|
+
var Hidden = function (_a) {
|
|
2341
|
+
var children = _a.children, xs = _a.xs, s = _a.s, m = _a.m, l = _a.l, xl = _a.xl, props = __rest(_a, ["children", "xs", "s", "m", "l", "xl"]);
|
|
2342
|
+
return (React__default.createElement("div", __assign({ className: classNames({
|
|
2343
|
+
"arc-Hidden--xs": xs,
|
|
2344
|
+
"arc-Hidden--s": s,
|
|
2345
|
+
"arc-Hidden--m": m,
|
|
2346
|
+
"arc-Hidden--l": l,
|
|
2347
|
+
"arc-Hidden--xl": xl
|
|
2348
|
+
}) }, filterDataAttrs(props)), children));
|
|
2349
|
+
};
|
|
2350
|
+
|
|
2298
2351
|
/**
|
|
2299
2352
|
* Do not edit directly
|
|
2300
2353
|
* Generated file
|
|
@@ -2342,10 +2395,10 @@ const BtIconCrossFill = (props) =>
|
|
|
2342
2395
|
);
|
|
2343
2396
|
|
|
2344
2397
|
/**
|
|
2345
|
-
*
|
|
2398
|
+
* Use `Tag` to promote features and manage filtering.
|
|
2346
2399
|
*/
|
|
2347
2400
|
var Tag = function (_a) {
|
|
2348
|
-
var children = _a.children, isRemovable = _a.isRemovable, link = _a.link, icon = _a.icon, onClick = _a.onClick, onRemove = _a.onRemove, props = __rest(_a, ["children", "isRemovable", "link", "icon", "onClick", "onRemove"]);
|
|
2401
|
+
var children = _a.children, isRemovable = _a.isRemovable, link = _a.link, icon = _a.icon, onClick = _a.onClick, onRemove = _a.onRemove, title = _a.title, props = __rest(_a, ["children", "isRemovable", "link", "icon", "onClick", "onRemove", "title"]);
|
|
2349
2402
|
var surface = useContext(Context$5).surface;
|
|
2350
2403
|
var _b = useState(false), isRemoved = _b[0], setIsRemoved = _b[1];
|
|
2351
2404
|
var onRemoveHandler = function () {
|
|
@@ -2362,13 +2415,13 @@ var Tag = function (_a) {
|
|
|
2362
2415
|
link ? (React__default.createElement("a", { className: "arc-Tag-content", href: link, tabIndex: 0 },
|
|
2363
2416
|
icon && (React__default.createElement("span", { className: "arc-Tag-icon" },
|
|
2364
2417
|
React__default.createElement(Icon, { "data-testid": "arc-Tag-icon", icon: icon, size: 16 }))),
|
|
2365
|
-
React__default.createElement("div", { className: "arc-Tag-label" }, children))) : (React__default.createElement(React__default.Fragment, null, onClick ? (React__default.createElement("button", { className: "arc-Tag-content", onClick: onClick, "data-testid": "arc-Tag-content" },
|
|
2418
|
+
React__default.createElement("div", { className: "arc-Tag-label", title: title }, children))) : (React__default.createElement(React__default.Fragment, null, onClick ? (React__default.createElement("button", { className: "arc-Tag-content", onClick: onClick, "data-testid": "arc-Tag-content" },
|
|
2366
2419
|
icon && (React__default.createElement("span", { className: "arc-Tag-icon" },
|
|
2367
2420
|
React__default.createElement(Icon, { "data-testid": "arc-Tag-icon", icon: icon, size: 16 }))),
|
|
2368
|
-
React__default.createElement("div", { className: "arc-Tag-label" }, children))) : (React__default.createElement("div", { className: "arc-Tag-content", "data-testid": "arc-Tag-content" },
|
|
2421
|
+
React__default.createElement("div", { className: "arc-Tag-label", title: title }, children))) : (React__default.createElement("div", { className: "arc-Tag-content", "data-testid": "arc-Tag-content" },
|
|
2369
2422
|
icon && (React__default.createElement("span", { className: "arc-Tag-icon" },
|
|
2370
2423
|
React__default.createElement(Icon, { "data-testid": "arc-Tag-icon", icon: icon, size: 16 }))),
|
|
2371
|
-
React__default.createElement("div", { className: "arc-Tag-label" }, children))))),
|
|
2424
|
+
React__default.createElement("div", { className: "arc-Tag-label", title: title }, children))))),
|
|
2372
2425
|
isRemovable && (React__default.createElement("button", { className: "arc-Tag-icon arc-Tag-icon--removable", onClick: onRemoveHandler, "data-testid": "arc-Tag-icon-removable", "aria-live": "polite", "aria-roledescription": "remove tag" },
|
|
2373
2426
|
React__default.createElement(Icon, { icon: BtIconCross, color: "brand", size: 20 }),
|
|
2374
2427
|
React__default.createElement(Icon, { icon: BtIconCrossFill, color: "brand", size: 20 })))));
|
|
@@ -2392,8 +2445,10 @@ var VerticalSpace = function (_a) {
|
|
|
2392
2445
|
_b)) }, filterDataAttrs(props))));
|
|
2393
2446
|
};
|
|
2394
2447
|
|
|
2448
|
+
/** Use `InformationCard` for flexibility and the ability to focus and highlight product specific content. */
|
|
2395
2449
|
var InformationCard = function (_a) {
|
|
2396
|
-
var cardUrl = _a.cardUrl, onClick = _a.onClick, heading = _a.heading, text = _a.text, label = _a.label, footerLogo = _a.footerLogo, button = _a.button, image = _a.image, tags = _a.tags, icon = _a.icon, _b = _a.headingLevel, headingLevel = _b === void 0 ? "2" : _b, props = __rest(_a, ["cardUrl", "onClick", "heading", "text", "label", "footerLogo", "button", "image", "tags", "icon", "headingLevel"]);
|
|
2450
|
+
var cardUrl = _a.cardUrl, onClick = _a.onClick, heading = _a.heading, text = _a.text, label = _a.label, footerLogo = _a.footerLogo, button = _a.button, image = _a.image, tags = _a.tags, icon = _a.icon, minHeight = _a.minHeight, _b = _a.headingLevel, headingLevel = _b === void 0 ? "2" : _b, props = __rest(_a, ["cardUrl", "onClick", "heading", "text", "label", "footerLogo", "button", "image", "tags", "icon", "minHeight", "headingLevel"]);
|
|
2451
|
+
var surface = useContext(Context$5).surface;
|
|
2397
2452
|
var isMinWidthArcBreakpointS = useMediaQuery("(min-width: ".concat(ArcBreakpointS, "px)"));
|
|
2398
2453
|
var isMinWidthArcBreakpointM = useMediaQuery("(min-width: ".concat(ArcBreakpointM, "px)"));
|
|
2399
2454
|
var _c = useState(false), showHoverState = _c[0], setShowHoverState = _c[1];
|
|
@@ -2401,8 +2456,10 @@ var InformationCard = function (_a) {
|
|
|
2401
2456
|
var assetSpacing = isMinWidthArcBreakpointM ? "24" : "20";
|
|
2402
2457
|
var containerSpacing = isMinWidthArcBreakpointS ? "32" : "24";
|
|
2403
2458
|
var handleShowHoverState = function (show) { return function () { return setShowHoverState(show); }; };
|
|
2404
|
-
return (React__default.createElement("div", __assign({ className: classNames("arc-InformationCard", {
|
|
2405
|
-
"arc-InformationCard--
|
|
2459
|
+
return (React__default.createElement("div", __assign({ style: { minHeight: minHeight }, className: classNames("arc-InformationCard", {
|
|
2460
|
+
"arc-InformationCard--isALink": cardUrl,
|
|
2461
|
+
"arc-InformationCard--outlined": cardUrl && showHoverState,
|
|
2462
|
+
"arc-InformationCard--onDarkSurface": surface === "dark"
|
|
2406
2463
|
}) }, filterDataAttrs(props)),
|
|
2407
2464
|
React__default.createElement(Surface, { growVertically: true, padding: containerSpacing, background: "white" },
|
|
2408
2465
|
React__default.createElement("div", null,
|
|
@@ -2435,6 +2492,28 @@ var InformationCard = function (_a) {
|
|
|
2435
2492
|
React__default.createElement(Image, __assign({}, footerLogo))))))));
|
|
2436
2493
|
};
|
|
2437
2494
|
|
|
2495
|
+
/** Use `ImpactCard` for important content that needs additional hierarchy and prominence. */
|
|
2496
|
+
var ImpactCard = function (_a) {
|
|
2497
|
+
var url = _a.url, onClick = _a.onClick, heading = _a.heading, img = _a.img, label = _a.label, minHeight = _a.minHeight, _b = _a.linkData, linkData = _b === void 0 ? {} : _b, _c = _a.pathway, pathway = _c === void 0 ? "light" : _c, _d = _a.headingLevel, headingLevel = _d === void 0 ? "2" : _d, _e = _a.buttonIcon, buttonIcon = _e === void 0 ? "arrow" : _e, props = __rest(_a, ["url", "onClick", "heading", "img", "label", "minHeight", "linkData", "pathway", "headingLevel", "buttonIcon"]);
|
|
2498
|
+
var _f = useState(false), showHoverState = _f[0], setShowHoverState = _f[1];
|
|
2499
|
+
var surface = useContext(Context$5).surface;
|
|
2500
|
+
var handleShowHoverState = function (show) { return function () { return setShowHoverState(show); }; };
|
|
2501
|
+
var isDarkPathway = pathway === "dark";
|
|
2502
|
+
return (React__default.createElement("div", __assign({ style: { minHeight: minHeight }, className: classNames("arc-ImpactCard", {
|
|
2503
|
+
"arc-ImpactCard--darkPathway": isDarkPathway,
|
|
2504
|
+
"arc-ImpactCard--outlined": url && showHoverState,
|
|
2505
|
+
"arc-ImpactCard--isHovered": showHoverState,
|
|
2506
|
+
"arc-ImpactCard--onDarkSurface": surface === "dark"
|
|
2507
|
+
}) }, filterDataAttrs(props)),
|
|
2508
|
+
React__default.createElement("div", { className: "arc-ImpactCard-backgroundImageContainer" },
|
|
2509
|
+
React__default.createElement(Image, __assign({ fit: "cover", alt: "" }, img))),
|
|
2510
|
+
React__default.createElement("div", { className: "arc-ImpactCard-contentContainer" },
|
|
2511
|
+
label && (React__default.createElement("div", { className: "arc-ImpactCard-labelContainer" },
|
|
2512
|
+
React__default.createElement(CardLabel, { isDarkPathway: isDarkPathway, color: "supporting", isBold: true, text: label }))),
|
|
2513
|
+
React__default.createElement(CardHeading, { heading: heading, headingLevel: headingLevel, linkData: linkData, href: url, onClick: onClick, onMouseEnter: handleShowHoverState(true), onMouseLeave: handleShowHoverState(false), onFocus: handleShowHoverState(true), onBlur: handleShowHoverState(false) })),
|
|
2514
|
+
React__default.createElement(CardFooter, { buttonIcon: buttonIcon, showButton: true, isDarkPathway: isDarkPathway, isHovered: showHoverState })));
|
|
2515
|
+
};
|
|
2516
|
+
|
|
2438
2517
|
/**
|
|
2439
2518
|
* Use `Markup` to display HTML-formatted text.
|
|
2440
2519
|
*/
|
|
@@ -2452,14 +2531,16 @@ var Markup = function (_a) {
|
|
|
2452
2531
|
* Use `MediaCard` to contain content and an image about a single subject.
|
|
2453
2532
|
*/
|
|
2454
2533
|
var MediaCard = function (_a) {
|
|
2455
|
-
var img = _a.img, url = _a.url, onClick = _a.onClick, heading = _a.heading, label = _a.label, text = _a.text, metaText = _a.metaText, _b = _a.buttonIcon, buttonIcon = _b === void 0 ? "arrow" : _b, _c = _a.isContained, isContained = _c === void 0 ? true : _c, _d = _a.headingLevel, headingLevel = _d === void 0 ? "2" : _d, props = __rest(_a, ["img", "url", "onClick", "heading", "label", "text", "metaText", "buttonIcon", "isContained", "headingLevel"]);
|
|
2534
|
+
var img = _a.img, url = _a.url, onClick = _a.onClick, heading = _a.heading, label = _a.label, text = _a.text, metaText = _a.metaText, minHeight = _a.minHeight, _b = _a.buttonIcon, buttonIcon = _b === void 0 ? "arrow" : _b, _c = _a.isContained, isContained = _c === void 0 ? true : _c, _d = _a.headingLevel, headingLevel = _d === void 0 ? "2" : _d, props = __rest(_a, ["img", "url", "onClick", "heading", "label", "text", "metaText", "minHeight", "buttonIcon", "isContained", "headingLevel"]);
|
|
2535
|
+
var surface = useContext(Context$5).surface;
|
|
2456
2536
|
var _e = useState(false), showHoverState = _e[0], setShowHoverState = _e[1];
|
|
2457
2537
|
var isMinWidthArcBreakpointS = useMediaQuery("(min-width: ".concat(ArcBreakpointS, "px)"));
|
|
2458
2538
|
var headingSpacing = isMinWidthArcBreakpointS ? "16" : "8";
|
|
2459
2539
|
var handleShowHoverState = function (show) { return function () { return setShowHoverState(show); }; };
|
|
2460
|
-
return (React__default.createElement("div", __assign({ className: classNames("arc-MediaCard", {
|
|
2540
|
+
return (React__default.createElement("div", __assign({ style: { minHeight: minHeight }, className: classNames("arc-MediaCard", {
|
|
2461
2541
|
"arc-MediaCard--outlined": url && isContained && showHoverState,
|
|
2462
|
-
"arc-MediaCard--contained": isContained
|
|
2542
|
+
"arc-MediaCard--contained": isContained,
|
|
2543
|
+
"arc-MediaCard--onDarkSurface": surface === "dark"
|
|
2463
2544
|
}) }, filterDataAttrs(props)),
|
|
2464
2545
|
React__default.createElement(ConditionalWrapper, { condition: isContained, wrapper: function (children) { return (React__default.createElement(Surface, { growVertically: true, background: "white" }, children)); } },
|
|
2465
2546
|
React__default.createElement("div", { className: "arc-MediaCard-imgContainer" },
|
|
@@ -2473,7 +2554,7 @@ var MediaCard = function (_a) {
|
|
|
2473
2554
|
React__default.createElement(VerticalSpace, { size: headingSpacing }),
|
|
2474
2555
|
React__default.createElement(Text, null, text),
|
|
2475
2556
|
(url || metaText) && React__default.createElement(VerticalSpace, { size: "24" })))),
|
|
2476
|
-
React__default.createElement(CardFooter, {
|
|
2557
|
+
React__default.createElement(CardFooter, { buttonIcon: buttonIcon, metaText: metaText, showButton: Boolean(url), isHovered: showHoverState })))));
|
|
2477
2558
|
};
|
|
2478
2559
|
|
|
2479
2560
|
function _extends() {
|
|
@@ -35378,7 +35459,7 @@ const $5d3850c4d0b4e6c7$export$7c6e2c02157bb7d2 = $5d3850c4d0b4e6c7$export$b6d95
|
|
|
35378
35459
|
const $5d3850c4d0b4e6c7$export$f99233281efd08a0 = $5d3850c4d0b4e6c7$export$16f7638e4a34b909;
|
|
35379
35460
|
const $5d3850c4d0b4e6c7$export$393edc798c47379d = $5d3850c4d0b4e6c7$export$94e94c2ec2c954d5;
|
|
35380
35461
|
|
|
35381
|
-
/** Use `Modal` to
|
|
35462
|
+
/** Use `Modal` to display information that needs immediate action from a user. */
|
|
35382
35463
|
var Modal = function (_a) {
|
|
35383
35464
|
var title = _a.title, description = _a.description, ariaDescribedBy = _a.ariaDescribedBy, isOpen = _a.isOpen, actions = _a.actions, onRequestClose = _a.onRequestClose, children = _a.children, _b = _a.role, role = _b === void 0 ? "dialog" : _b, _c = _a.shouldReturnFocus, shouldReturnFocus = _c === void 0 ? true : _c, _d = _a.isContentScrollable, isContentScrollable = _d === void 0 ? false : _d, _e = _a.size, size = _e === void 0 ? "l" : _e, props = __rest(_a, ["title", "description", "ariaDescribedBy", "isOpen", "actions", "onRequestClose", "children", "role", "shouldReturnFocus", "isContentScrollable", "size"]);
|
|
35384
35465
|
var arcRootElement = useContext(ArcRootElementContext);
|
|
@@ -35403,7 +35484,7 @@ var Modal = function (_a) {
|
|
|
35403
35484
|
return (React__default.createElement($5d3850c4d0b4e6c7$export$be92b6f5f03c0fe9, { open: isOpen },
|
|
35404
35485
|
React__default.createElement($5d3850c4d0b4e6c7$export$602eac185826482c, { container: arcRootElement || undefined },
|
|
35405
35486
|
React__default.createElement($5d3850c4d0b4e6c7$export$c6fdb837b070b4ff, { className: "arc-Modal-overlay" },
|
|
35406
|
-
React__default.createElement($5d3850c4d0b4e6c7$export$7c6e2c02157bb7d2, __assign({}, ariaProps, { role: role, onOpenAutoFocus: setTriggerElement, onCloseAutoFocus: focusTriggerElement, onEscapeKeyDown: closeModal, onInteractOutside: closeModal, className: classNames("arc-Modal-dialog", "arc-Modal-dialog--".concat(size), {
|
|
35487
|
+
React__default.createElement($5d3850c4d0b4e6c7$export$7c6e2c02157bb7d2, __assign({}, ariaProps, { role: role, onOpenAutoFocus: setTriggerElement, onCloseAutoFocus: focusTriggerElement, onEscapeKeyDown: closeModal, onInteractOutside: closeModal, "aria-modal": "true", className: classNames("arc-Modal-dialog", "arc-Modal-dialog--".concat(size), {
|
|
35407
35488
|
"arc-Modal-dialog--maxHeightWindow": isContentScrollable
|
|
35408
35489
|
}) }, filterDataAttrs(props)),
|
|
35409
35490
|
React__default.createElement("div", { className: "arc-Modal-section" },
|
|
@@ -35461,7 +35542,7 @@ var usePagination = function (pageCount, selectedPage) {
|
|
|
35461
35542
|
};
|
|
35462
35543
|
|
|
35463
35544
|
/**
|
|
35464
|
-
* Use `Pagination` to navigate multiple pages.
|
|
35545
|
+
* Use `Pagination` to navigate through multiple pages of content.
|
|
35465
35546
|
*/
|
|
35466
35547
|
var Pagination = function (_a) {
|
|
35467
35548
|
var pageCount = _a.pageCount, onPageChange = _a.onPageChange, _b = _a.defaultSelectedPage, defaultSelectedPage = _b === void 0 ? 1 : _b, props = __rest(_a, ["pageCount", "onPageChange", "defaultSelectedPage"]);
|
|
@@ -35494,10 +35575,10 @@ var Pagination = function (_a) {
|
|
|
35494
35575
|
};
|
|
35495
35576
|
|
|
35496
35577
|
/**
|
|
35497
|
-
* Use `PaginationSimple` to navigate multiple pages.
|
|
35578
|
+
* Use `PaginationSimple` to navigate through multiple pages of content.
|
|
35498
35579
|
*/
|
|
35499
35580
|
var PaginationSimple = function (_a) {
|
|
35500
|
-
var hidePrev = _a.hidePrev, hideNext = _a.hideNext, onPrevPage = _a.onPrevPage, onNextPage = _a.onNextPage, isFluid = _a.isFluid, props = __rest(_a, ["hidePrev", "hideNext", "onPrevPage", "onNextPage", "isFluid"]);
|
|
35581
|
+
var hidePrev = _a.hidePrev, hideNext = _a.hideNext, prevHref = _a.prevHref, nextHref = _a.nextHref, onPrevPage = _a.onPrevPage, onNextPage = _a.onNextPage, isFluid = _a.isFluid, props = __rest(_a, ["hidePrev", "hideNext", "prevHref", "nextHref", "onPrevPage", "onNextPage", "isFluid"]);
|
|
35501
35582
|
var surface = useContext(Context$5).surface;
|
|
35502
35583
|
return (React__default.createElement("nav", __assign({ className: classNames("arc-PaginationSimple", {
|
|
35503
35584
|
"arc-PaginationSimple--onDarkSurface": surface === "dark",
|
|
@@ -35506,20 +35587,16 @@ var PaginationSimple = function (_a) {
|
|
|
35506
35587
|
}) }, filterDataAttrs(props)),
|
|
35507
35588
|
React__default.createElement("ul", { className: "arc-PaginationSimple-list" },
|
|
35508
35589
|
React__default.createElement("li", { className: "arc-PaginationSimple-listItem" },
|
|
35509
|
-
React__default.createElement("
|
|
35590
|
+
React__default.createElement("a", { tabIndex: 0, href: prevHref, role: !prevHref ? "button" : undefined, className: classNames("arc-PaginationSimple-navigationButton", {
|
|
35510
35591
|
"arc-PaginationSimple-navigationButton--hidden": hidePrev
|
|
35511
|
-
}), onClick:
|
|
35512
|
-
onPrevPage();
|
|
35513
|
-
} },
|
|
35592
|
+
}), onClick: onPrevPage },
|
|
35514
35593
|
React__default.createElement("div", { className: "arc-PaginationSimple-iconContainer arc-PaginationSimple-iconContainer--left" },
|
|
35515
35594
|
React__default.createElement(Icon, { color: "brand", size: 32, icon: BtIconChevronLeftMid })),
|
|
35516
35595
|
React__default.createElement("span", { className: "arc-PaginationSimple-prevText" }, "Prev"))),
|
|
35517
35596
|
React__default.createElement("li", { className: "arc-PaginationSimple-listItem" },
|
|
35518
|
-
React__default.createElement("
|
|
35597
|
+
React__default.createElement("a", { tabIndex: 0, href: nextHref, role: !nextHref ? "button" : undefined, className: classNames("arc-PaginationSimple-navigationButton", {
|
|
35519
35598
|
"arc-PaginationSimple-navigationButton--hidden": hideNext
|
|
35520
|
-
}), onClick:
|
|
35521
|
-
onNextPage();
|
|
35522
|
-
} },
|
|
35599
|
+
}), onClick: onNextPage },
|
|
35523
35600
|
React__default.createElement("span", { className: "arc-PaginationSimple-nextText" }, "Next"),
|
|
35524
35601
|
React__default.createElement("div", { className: "arc-PaginationSimple-iconContainer arc-PaginationSimple-iconContainer--right" },
|
|
35525
35602
|
React__default.createElement(Icon, { color: "brand", size: 32, icon: BtIconChevronRightMid })))))));
|
|
@@ -35598,10 +35675,16 @@ var getProgressBarProps = function (isIndeterminate, progressValue, ariaLabel) {
|
|
|
35598
35675
|
return isIndeterminate ? indeterminateProps : determinateProps;
|
|
35599
35676
|
};
|
|
35600
35677
|
|
|
35678
|
+
/**
|
|
35679
|
+
* Use `ProgressBar` to show the progress of a specific task within a page.
|
|
35680
|
+
*/
|
|
35601
35681
|
var ProgressBar = function (_a) {
|
|
35602
35682
|
var _b = _a.state, state = _b === void 0 ? "loading" : _b, _c = _a.value, value = _c === void 0 ? 0 : _c, _d = _a.isIndeterminate, isIndeterminate = _d === void 0 ? false : _d, headline = _a.headline, ariaLabel = _a.ariaLabel, action = _a.action, title = _a.title, description = _a.description, displayValue = _a.displayValue, props = __rest(_a, ["state", "value", "isIndeterminate", "headline", "ariaLabel", "action", "title", "description", "displayValue"]);
|
|
35603
35683
|
var surface = useContext(Context$5).surface;
|
|
35604
35684
|
var progressValue = Math.min(100, Math.max(0, value));
|
|
35685
|
+
var autoFocusRef = function (canFocus) { return function (el) {
|
|
35686
|
+
canFocus && el && el.focus();
|
|
35687
|
+
}; };
|
|
35605
35688
|
return (React__default.createElement("div", __assign({ "data-testid": "progress", className: classNames("arc-ProgressBar", "arc-ProgressBar--".concat(state), {
|
|
35606
35689
|
"arc-ProgressBar--onDarkSurface": surface === "dark"
|
|
35607
35690
|
}) }, filterDataAttrs(props)),
|
|
@@ -35615,11 +35698,11 @@ var ProgressBar = function (_a) {
|
|
|
35615
35698
|
React__default.createElement("div", { className: "arc-ProgressBar-container" },
|
|
35616
35699
|
React__default.createElement("div", { className: "arc-ProgressBar-outerBar" },
|
|
35617
35700
|
React__default.createElement("div", __assign({}, getProgressBarProps(isIndeterminate, progressValue, ariaLabel)))),
|
|
35618
|
-
description && (React__default.createElement("div", { className: "arc-ProgressBar-description" },
|
|
35701
|
+
description && (React__default.createElement("div", { className: "arc-ProgressBar-description", role: "status" },
|
|
35619
35702
|
React__default.createElement(Text, { tone: state !== "error" ? "supporting" : "default" }, description))),
|
|
35620
35703
|
action && (React__default.createElement(React__default.Fragment, null,
|
|
35621
35704
|
React__default.createElement(VerticalSpace, { size: "8" }),
|
|
35622
|
-
React__default.createElement("button", { className: "arc-ProgressBar-actionButton", onClick: action.action },
|
|
35705
|
+
React__default.createElement("button", { ref: autoFocusRef(action.autofocusOnMount), className: "arc-ProgressBar-actionButton", onClick: action.action },
|
|
35623
35706
|
React__default.createElement("div", { className: "arc-ProgressBar-actionContainer" },
|
|
35624
35707
|
React__default.createElement(Text, null, action.text),
|
|
35625
35708
|
action.icon && (React__default.createElement("div", { className: "arc-ProgressBar-actionIcon" },
|
|
@@ -35691,13 +35774,13 @@ var ProgressStepperItem = function (_a) {
|
|
|
35691
35774
|
status !== "todo" && (React__default.createElement(VisuallyHidden, null,
|
|
35692
35775
|
capitaliseFirstLetter(status),
|
|
35693
35776
|
":")),
|
|
35694
|
-
titleHref ? (React__default.createElement("a", { href: titleHref, "aria-label": ariaLabel, className: classNames("arc-ProgressStepperItem-title", "arc-ProgressStepperItem-title--link"), onClick: onClickHandler }, title)) : (React__default.createElement("div", { className: "arc-ProgressStepperItem-title" }, title)),
|
|
35777
|
+
titleHref || onClick ? (React__default.createElement("a", { role: !titleHref && onClick ? "button" : undefined, href: titleHref, "aria-label": ariaLabel, className: classNames("arc-ProgressStepperItem-title", "arc-ProgressStepperItem-title--link"), onClick: onClickHandler }, title)) : (React__default.createElement("div", { className: "arc-ProgressStepperItem-title" }, title)),
|
|
35695
35778
|
React__default.createElement("div", { className: "arc-ProgressStepperItem-subTitle" }, subTitle),
|
|
35696
35779
|
stepContent && !isStepContentHidden && direction === "vertical" && (React__default.createElement(React__default.Fragment, null,
|
|
35697
35780
|
React__default.createElement("div", { className: "arc-ProgressStepperItem-nodeItem" }, stepContent))))));
|
|
35698
35781
|
};
|
|
35699
35782
|
|
|
35700
|
-
/** Use `ProgressStepper` to
|
|
35783
|
+
/** Use `ProgressStepper` to provide an overview of a series of steps in a digital journey. */
|
|
35701
35784
|
var ProgressStepper = function (_a) {
|
|
35702
35785
|
var children = _a.children, size = _a.size, isFluid = _a.isFluid, direction = _a.direction, isExpandable = _a.isExpandable, props = __rest(_a, ["children", "size", "isFluid", "direction", "isExpandable"]);
|
|
35703
35786
|
var items = React__default.Children.toArray(children);
|
|
@@ -35738,7 +35821,7 @@ var RadioButton = forwardRef(function (_a, ref) {
|
|
|
35738
35821
|
React__default.createElement("label", { className: classNames("arc-RadioButton-label", {
|
|
35739
35822
|
"arc-RadioButton-label--alignTop": radioButtonAlignment === "top"
|
|
35740
35823
|
}), htmlFor: id, id: idLabel },
|
|
35741
|
-
React__default.createElement("input", { className: "arc-RadioButton-input", checked: typeof changeEvent !== "function" ? undefined : checked, defaultChecked: typeof changeEvent !== "function" ? checked : undefined, disabled: isDisabled || groupDisabled, id: id, name: name, onBlur: blurEvent, onChange: changeEvent, ref: ref, type: "radio", value: value }),
|
|
35824
|
+
React__default.createElement("input", { className: "arc-RadioButton-input", checked: typeof changeEvent !== "function" ? undefined : checked, defaultChecked: typeof changeEvent !== "function" ? checked : undefined, disabled: isDisabled || groupDisabled, id: id, name: name, onBlur: blurEvent, onChange: changeEvent, ref: ref, type: "radio", value: value, "aria-checked": checked }),
|
|
35742
35825
|
React__default.createElement("span", { className: classNames({
|
|
35743
35826
|
"arc-RadioButton-label--marginTop": radioButtonAlignment === "top"
|
|
35744
35827
|
}) },
|
|
@@ -40044,17 +40127,14 @@ var ItemGroup = function (_a) {
|
|
|
40044
40127
|
}
|
|
40045
40128
|
});
|
|
40046
40129
|
}, [children]);
|
|
40047
|
-
var ElementType = "div";
|
|
40048
|
-
if (title) {
|
|
40049
|
-
ElementType = "details";
|
|
40050
|
-
}
|
|
40130
|
+
var ElementType = title ? "details" : "div";
|
|
40051
40131
|
return (React__default.createElement("li", { className: "arc-SiteHeaderV2ItemGroup" },
|
|
40052
40132
|
React__default.createElement(ElementType, __assign({ className: "arc-SiteHeaderV2ItemGroup-details", open: Boolean(title && isMinWidthArcBreakpointL) }, filterDataAttrs(props)),
|
|
40053
40133
|
title ? (React__default.createElement(React__default.Fragment, null,
|
|
40054
|
-
React__default.createElement("summary", { className: "arc-SiteHeaderV2ItemGroup-summary" }, href ? (React__default.createElement("div", { className: "arc-SiteHeaderV2ItemGroup-heading" },
|
|
40055
|
-
React__default.createElement("a", { onClick: handleLinkClick({
|
|
40056
|
-
|
|
40057
|
-
|
|
40134
|
+
React__default.createElement("summary", { tabIndex: isMinWidthArcBreakpointL ? -1 : 0, className: "arc-SiteHeaderV2ItemGroup-summary" }, href ? (React__default.createElement("div", { className: "arc-SiteHeaderV2ItemGroup-heading" },
|
|
40135
|
+
React__default.createElement(ConditionalWrapper, { condition: isMinWidthArcBreakpointL, wrapper: function (children) { return (React__default.createElement("a", { onClick: handleLinkClick({
|
|
40136
|
+
handler: onClick
|
|
40137
|
+
}), className: "arc-SiteHeaderV2ItemGroup-title", href: href }, children)); }, fallback: function (children) { return (React__default.createElement("div", { className: "arc-SiteHeaderV2ItemGroup-title" }, children)); } }, title),
|
|
40058
40138
|
React__default.createElement("span", { className: "arc-SiteHeaderV2ItemGroup-titleIcon" },
|
|
40059
40139
|
React__default.createElement(BtIconChevronRightMid, null)))) : (React__default.createElement("div", { className: "arc-SiteHeaderV2ItemGroup-title" }, title))),
|
|
40060
40140
|
React__default.createElement("span", { className: "arc-SiteHeaderV2ItemGroup-subtitle" }, subtitle))) : null,
|
|
@@ -40099,16 +40179,16 @@ var Panel = function (_a) {
|
|
|
40099
40179
|
// Where appropriate, close the Panel when clicking outside of it,
|
|
40100
40180
|
// by listening to clicks on the entire document and acting accordingly.
|
|
40101
40181
|
var handleClick = function (e) {
|
|
40102
|
-
var _a, _b;
|
|
40103
|
-
menubarRef === null || menubarRef === void 0 ? void 0 : menubarRef.current.classList.add("noFocus");
|
|
40182
|
+
var _a, _b, _c, _d;
|
|
40183
|
+
(_b = (_a = menubarRef === null || menubarRef === void 0 ? void 0 : menubarRef.current) === null || _a === void 0 ? void 0 : _a.classList) === null || _b === void 0 ? void 0 : _b.add("noFocus");
|
|
40104
40184
|
// Don't close the Panel…
|
|
40105
40185
|
if (
|
|
40106
40186
|
// The click is inside the current SubNavItem.
|
|
40107
|
-
((
|
|
40187
|
+
((_c = subNavItemRef === null || subNavItemRef === void 0 ? void 0 : subNavItemRef.current) === null || _c === void 0 ? void 0 : _c.contains(e.target)) ||
|
|
40108
40188
|
// The click is inside the current NavItem
|
|
40109
40189
|
// and the Panel is not inside a SubNavItem.
|
|
40110
40190
|
// and the target is not a link
|
|
40111
|
-
(((
|
|
40191
|
+
(((_d = navItemRef === null || navItemRef === void 0 ? void 0 : navItemRef.current) === null || _d === void 0 ? void 0 : _d.contains(e.target)) &&
|
|
40112
40192
|
!subNavItemRef &&
|
|
40113
40193
|
!e.target.getAttribute("href")) ||
|
|
40114
40194
|
// The Panel is inside a SubNavItem
|
|
@@ -40144,7 +40224,8 @@ var Panel = function (_a) {
|
|
|
40144
40224
|
]);
|
|
40145
40225
|
useEffect(function () {
|
|
40146
40226
|
var handleClick = function (e) {
|
|
40147
|
-
|
|
40227
|
+
var _a, _b;
|
|
40228
|
+
(_b = (_a = menubarRef === null || menubarRef === void 0 ? void 0 : menubarRef.current) === null || _a === void 0 ? void 0 : _a.classList) === null || _b === void 0 ? void 0 : _b.add("noFocus");
|
|
40148
40229
|
// Close the Panel…
|
|
40149
40230
|
if (e.target.classList.contains("arc-SiteHeaderV2NavItem-link--itemHasChildren-closeFirstPanel")) {
|
|
40150
40231
|
setOpenPanelOnFirstClick(false);
|
|
@@ -40163,6 +40244,7 @@ var Panel = function (_a) {
|
|
|
40163
40244
|
}, [navItemRef, setOpenPanelOnFirstClick, menubarRef]);
|
|
40164
40245
|
useEffect(function () {
|
|
40165
40246
|
var handleKeydown = function (e) {
|
|
40247
|
+
var _a, _b;
|
|
40166
40248
|
// Check the viewport width at time of press
|
|
40167
40249
|
var isMinWidthArcBreakpointL = window.matchMedia("(min-width: ".concat(ArcBreakpointL, "px)")).matches;
|
|
40168
40250
|
if (e.key === "Escape" || e.keyCode === 27) {
|
|
@@ -40174,7 +40256,7 @@ var Panel = function (_a) {
|
|
|
40174
40256
|
return setOpen(false);
|
|
40175
40257
|
}
|
|
40176
40258
|
if (e.key === "Tab") {
|
|
40177
|
-
menubarRef === null || menubarRef === void 0 ? void 0 : menubarRef.current.classList.remove("noFocus");
|
|
40259
|
+
(_b = (_a = menubarRef === null || menubarRef === void 0 ? void 0 : menubarRef.current) === null || _a === void 0 ? void 0 : _a.classList) === null || _b === void 0 ? void 0 : _b.remove("noFocus");
|
|
40178
40260
|
}
|
|
40179
40261
|
};
|
|
40180
40262
|
window.addEventListener("keydown", handleKeydown);
|
|
@@ -40594,7 +40676,8 @@ var SiteHeaderV2 = function (_a) {
|
|
|
40594
40676
|
};
|
|
40595
40677
|
}, [setMenuOpen]);
|
|
40596
40678
|
useEffect(function () {
|
|
40597
|
-
|
|
40679
|
+
var _a, _b;
|
|
40680
|
+
(_b = (_a = menubarRef === null || menubarRef === void 0 ? void 0 : menubarRef.current) === null || _a === void 0 ? void 0 : _a.classList) === null || _b === void 0 ? void 0 : _b.add("noFocus");
|
|
40598
40681
|
}, []);
|
|
40599
40682
|
useEffect(function () {
|
|
40600
40683
|
var handleClick = function (e) {
|
|
@@ -41142,7 +41225,7 @@ function $6be4966fd9bbc698$var$getState(checked) {
|
|
|
41142
41225
|
const $6be4966fd9bbc698$export$be92b6f5f03c0fe9 = $6be4966fd9bbc698$export$b5d5cf8927ab7262;
|
|
41143
41226
|
const $6be4966fd9bbc698$export$6521433ed15a34db = $6be4966fd9bbc698$export$4d07bf653ea69106;
|
|
41144
41227
|
|
|
41145
|
-
/** Use `Switch` to toggle between
|
|
41228
|
+
/** Use `Switch` to allow users to immediately toggle between two states. */
|
|
41146
41229
|
var Switch = function (_a) {
|
|
41147
41230
|
var defaultChecked = _a.defaultChecked, onCheckedChange = _a.onCheckedChange, label = _a.label, name = _a.name, onBlur = _a.onBlur, value = _a.value, _b = _a.isDisabled, isDisabled = _b === void 0 ? false : _b, errorMessage = _a.errorMessage, id = _a.id, _c = _a.labelSize, labelSize = _c === void 0 ? "s" : _c, statusText = _a.statusText, _d = _a.hideLabel, hideLabel = _d === void 0 ? false : _d, props = __rest(_a, ["defaultChecked", "onCheckedChange", "label", "name", "onBlur", "value", "isDisabled", "errorMessage", "id", "labelSize", "statusText", "hideLabel"]);
|
|
41148
41231
|
var surface = useContext(Context$5).surface;
|
|
@@ -41622,6 +41705,7 @@ var TabsList = function (_a) {
|
|
|
41622
41705
|
React__default.createElement(Icon, { icon: BtIconArrowRightFill, size: 40, color: "brand" })))));
|
|
41623
41706
|
};
|
|
41624
41707
|
|
|
41708
|
+
/** Use `Tabs` to allow users to navigate between different sections of relevant content. */
|
|
41625
41709
|
var Tabs = function (_a) {
|
|
41626
41710
|
var children = _a.children, defaultValue = _a.defaultValue, onValueChange = _a.onValueChange, activationMode = _a.activationMode, props = __rest(_a, ["children", "defaultValue", "onValueChange", "activationMode"]);
|
|
41627
41711
|
return (React__default.createElement($69cb30bb0017df05$export$be92b6f5f03c0fe9, __assign({ className: "arc-Tabs-root", defaultValue: defaultValue, onValueChange: onValueChange, activationMode: activationMode }, filterDataAttrs(props)), children));
|
|
@@ -41670,9 +41754,6 @@ var TextArea = forwardRef(function (_a, ref) {
|
|
|
41670
41754
|
}), defaultValue: typeof value !== "undefined" ? undefined : defaultValue, disabled: isDisabled, value: value, readOnly: isReadOnly, maxLength: maxLength, name: name, onChange: handleOnChange, onBlur: onBlur, ref: getTextAreaRef, style: { width: width }, "aria-describedby": "".concat(id, "-helper") })));
|
|
41671
41755
|
});
|
|
41672
41756
|
|
|
41673
|
-
/**
|
|
41674
|
-
* Use `TextInput` to allow custom user text entry with a keyboard.
|
|
41675
|
-
*/
|
|
41676
41757
|
var TextInputComponent = forwardRef(function (_a, ref) {
|
|
41677
41758
|
var _b;
|
|
41678
41759
|
var _c = _a.defaultValue, defaultValue = _c === void 0 ? "" : _c, errorMessage = _a.errorMessage, helper = _a.helper, hideLabel = _a.hideLabel, id = _a.id, inputMode = _a.inputMode, _d = _a.isDisabled, isDisabled = _d === void 0 ? false : _d, _e = _a.isReadOnly, isReadOnly = _e === void 0 ? false : _e, _f = _a.isRequired, isRequired = _f === void 0 ? false : _f, label = _a.label, _g = _a.labelSize, labelSize = _g === void 0 ? "l" : _g, maxLength = _a.maxLength, minLength = _a.minLength, name = _a.name, onBlur = _a.onBlur, onChange = _a.onChange, placeholder = _a.placeholder, onClickDisclosure = _a.onClickDisclosure, pattern = _a.pattern, _h = _a.type, type = _h === void 0 ? "text" : _h, _j = _a.showPassword, showPassword = _j === void 0 ? false : _j, value = _a.value, disclosureTitle = _a.disclosureTitle, disclosureText = _a.disclosureText, _k = _a.inputSize, inputSize = _k === void 0 ? "m" : _k, iconButton = _a.iconButton, prefix = _a.prefix, suffix = _a.suffix, _l = _a.inputAlignment, inputAlignment = _l === void 0 ? "left" : _l, width = _a.width, props = __rest(_a, ["defaultValue", "errorMessage", "helper", "hideLabel", "id", "inputMode", "isDisabled", "isReadOnly", "isRequired", "label", "labelSize", "maxLength", "minLength", "name", "onBlur", "onChange", "placeholder", "onClickDisclosure", "pattern", "type", "showPassword", "value", "disclosureTitle", "disclosureText", "inputSize", "iconButton", "prefix", "suffix", "inputAlignment", "width"]);
|
|
@@ -41727,6 +41808,9 @@ var TextInputComponent = forwardRef(function (_a, ref) {
|
|
|
41727
41808
|
? "Your password is shown"
|
|
41728
41809
|
: "Your password is hidden")))))))));
|
|
41729
41810
|
});
|
|
41811
|
+
/**
|
|
41812
|
+
* Use `TextInput` to allow users to enter short form text.
|
|
41813
|
+
*/
|
|
41730
41814
|
var TextInput = forwardRef(function (props, ref) { return React__default.createElement(TextInputComponent, __assign({ ref: ref }, props)); });
|
|
41731
41815
|
forwardRef(function (props, ref) { return React__default.createElement(TextInputComponent, __assign({ ref: ref }, props)); });
|
|
41732
41816
|
|
|
@@ -42668,7 +42752,7 @@ var ToastNotification = function (_a) {
|
|
|
42668
42752
|
React__default.createElement(Icon, { icon: BtIconCrossAlt2Px, size: 24 }))))));
|
|
42669
42753
|
};
|
|
42670
42754
|
|
|
42671
|
-
/** Use `Toast` to display temporary messages at the bottom of the
|
|
42755
|
+
/** Use `Toast` to display temporary messages at the bottom of the screen. */
|
|
42672
42756
|
var Toast = function (_a) {
|
|
42673
42757
|
var children = _a.children, _b = _a.colorScheme, colorScheme = _b === void 0 ? "default" : _b, props = __rest(_a, ["children", "colorScheme"]);
|
|
42674
42758
|
return (React__default.createElement($054eb8030ebde76e$export$2881499e37b75b9a, { swipeDirection: "right", duration: 6000 },
|
|
@@ -42683,21 +42767,24 @@ var Truncate = function (_a) {
|
|
|
42683
42767
|
return (React__default.createElement("div", __assign({ className: "arc-Truncate", style: { maxWidth: "".concat(maxWidth, "%") }, title: title }, filterDataAttrs(props)), children));
|
|
42684
42768
|
};
|
|
42685
42769
|
|
|
42770
|
+
/** Use `TypographyCard` for content that benefits from larger and energetic typography. */
|
|
42686
42771
|
var TypographyCard = function (_a) {
|
|
42687
|
-
var url = _a.url, onClick = _a.onClick, heading = _a.heading, metaText = _a.metaText, label = _a.label, _b = _a.linkData, linkData = _b === void 0 ? {} : _b, _c = _a.pathway, pathway = _c === void 0 ? "light" : _c, _d = _a.buttonIcon, buttonIcon = _d === void 0 ? "arrow" : _d, _e = _a.headingLevel, headingLevel = _e === void 0 ? "2" : _e, props = __rest(_a, ["url", "onClick", "heading", "metaText", "label", "linkData", "pathway", "buttonIcon", "headingLevel"]);
|
|
42772
|
+
var url = _a.url, onClick = _a.onClick, heading = _a.heading, metaText = _a.metaText, label = _a.label, minHeight = _a.minHeight, _b = _a.linkData, linkData = _b === void 0 ? {} : _b, _c = _a.pathway, pathway = _c === void 0 ? "light" : _c, _d = _a.buttonIcon, buttonIcon = _d === void 0 ? "arrow" : _d, _e = _a.headingLevel, headingLevel = _e === void 0 ? "2" : _e, props = __rest(_a, ["url", "onClick", "heading", "metaText", "label", "minHeight", "linkData", "pathway", "buttonIcon", "headingLevel"]);
|
|
42773
|
+
var surface = useContext(Context$5).surface;
|
|
42688
42774
|
var _f = useState(false), showHoverState = _f[0], setShowHoverState = _f[1];
|
|
42689
42775
|
var handleShowHoverState = function (show) { return function () { return setShowHoverState(show); }; };
|
|
42690
42776
|
var isDarkPathway = pathway === "dark";
|
|
42691
|
-
return (React__default.createElement("div", __assign({ className: classNames("arc-TypographyCard", {
|
|
42777
|
+
return (React__default.createElement("div", __assign({ style: { minHeight: minHeight }, className: classNames("arc-TypographyCard", {
|
|
42692
42778
|
"arc-TypographyCard--outlined": showHoverState,
|
|
42693
42779
|
"arc-TypographyCard--darkPathway": isDarkPathway,
|
|
42694
|
-
"arc-TypographyCard--lightPathway": !isDarkPathway
|
|
42780
|
+
"arc-TypographyCard--lightPathway": !isDarkPathway,
|
|
42781
|
+
"arc-TypographyCard--onDarkSurface": surface === "dark"
|
|
42695
42782
|
}) }, filterDataAttrs(props)),
|
|
42696
42783
|
React__default.createElement("div", { className: "arc-TypographyCard-contentContainer" },
|
|
42697
42784
|
label && (React__default.createElement("div", { className: "arc-TypographyCard-labelContainer" },
|
|
42698
|
-
React__default.createElement(CardLabel, { isDarkPathway: isDarkPathway, isBold:
|
|
42785
|
+
React__default.createElement(CardLabel, { isDarkPathway: isDarkPathway, isBold: true, text: label }))),
|
|
42699
42786
|
React__default.createElement(CardHeading, { size: "m", linkData: linkData, heading: heading, headingLevel: headingLevel, href: url, onClick: onClick, isDarkPathway: isDarkPathway, onMouseEnter: handleShowHoverState(true), onMouseLeave: handleShowHoverState(false), onFocus: handleShowHoverState(true), onBlur: handleShowHoverState(false) })),
|
|
42700
|
-
React__default.createElement(CardFooter, { showButton: true, isDarkPathway: isDarkPathway,
|
|
42787
|
+
React__default.createElement(CardFooter, { showButton: true, isDarkPathway: isDarkPathway, buttonIcon: buttonIcon, metaText: metaText, isHovered: showHoverState })));
|
|
42701
42788
|
};
|
|
42702
42789
|
|
|
42703
42790
|
/**
|
|
@@ -42725,5 +42812,75 @@ var UniversalHeaderItem = function (_a) {
|
|
|
42725
42812
|
};
|
|
42726
42813
|
UniversalHeader.Item = UniversalHeaderItem;
|
|
42727
42814
|
|
|
42728
|
-
|
|
42815
|
+
var Visible = function (_a) {
|
|
42816
|
+
var children = _a.children, xs = _a.xs, s = _a.s, m = _a.m, l = _a.l, xl = _a.xl, props = __rest(_a, ["children", "xs", "s", "m", "l", "xl"]);
|
|
42817
|
+
return (React__default.createElement("div", __assign({ className: classNames("arc-Visible", {
|
|
42818
|
+
"arc-Visible--xs": xs,
|
|
42819
|
+
"arc-Visible--s": s,
|
|
42820
|
+
"arc-Visible--m": m,
|
|
42821
|
+
"arc-Visible--l": l,
|
|
42822
|
+
"arc-Visible--xl": xl
|
|
42823
|
+
}) }, filterDataAttrs(props)), children));
|
|
42824
|
+
};
|
|
42825
|
+
|
|
42826
|
+
const BtIconNewWindow = (props) =>
|
|
42827
|
+
/*#__PURE__*/ React__default.createElement(
|
|
42828
|
+
"svg",
|
|
42829
|
+
Object.assign(
|
|
42830
|
+
{
|
|
42831
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
42832
|
+
viewBox: "0 0 32 32",
|
|
42833
|
+
},
|
|
42834
|
+
props,
|
|
42835
|
+
),
|
|
42836
|
+
/*#__PURE__*/ React__default.createElement("defs", null),
|
|
42837
|
+
/*#__PURE__*/ React__default.createElement("path", {
|
|
42838
|
+
d: "M24.70166,7.01794a.49968.49968,0,0,0-.19092-.03845H17.50586a.5.5,0,0,0,0,1h5.79785l-8.15918,8.15918a.49995.49995,0,1,0,.707.707l8.15918-8.15918v5.77393a.5.5,0,1,0,1,0v-6.981a.50171.50171,0,0,0-.30908-.46155Z",
|
|
42839
|
+
fill: "currentColor",
|
|
42840
|
+
}),
|
|
42841
|
+
/*#__PURE__*/ React__default.createElement("path", {
|
|
42842
|
+
d: "M26.85156,3.99072H5.18359A1.20156,1.20156,0,0,0,3.9834,5.19141V26.89062a1.10362,1.10362,0,0,0,1.10254,1.103H26.85156a1.17979,1.17979,0,0,0,1.17871-1.17871V5.16943A1.17979,1.17979,0,0,0,26.85156,3.99072Zm.17871,22.82422a.17891.17891,0,0,1-.17871.17871H5.08594a.10419.10419,0,0,1-.10254-.103V5.19141a.20069.20069,0,0,1,.20019-.20069h21.668a.17888.17888,0,0,1,.17871.17871Z",
|
|
42843
|
+
fill: "currentColor",
|
|
42844
|
+
}),
|
|
42845
|
+
);
|
|
42846
|
+
|
|
42847
|
+
/**
|
|
42848
|
+
* Use `Link` to direct users to a new page or piece of information.
|
|
42849
|
+
*/
|
|
42850
|
+
var Link = function (_a) {
|
|
42851
|
+
var id = _a.id, href = _a.href, title = _a.title, rel = _a.rel, target = _a.target, children = _a.children, onClick = _a.onClick, screenReaderText = _a.screenReaderText, _b = _a.isButton, isButton = _b === void 0 ? false : _b, _c = _a.isImplied, isImplied = _c === void 0 ? false : _c, _d = _a.size, size = _d === void 0 ? "m" : _d, props = __rest(_a, ["id", "href", "title", "rel", "target", "children", "onClick", "screenReaderText", "isButton", "isImplied", "size"]);
|
|
42852
|
+
var surface = useContext(Context$5).surface;
|
|
42853
|
+
var isExternalLink = target === "_blank";
|
|
42854
|
+
var textArray = children.split(" ");
|
|
42855
|
+
var firstText = textArray.slice(0, -1).join(" ");
|
|
42856
|
+
var lastWord = textArray[textArray.length - 1];
|
|
42857
|
+
var commonProps = {
|
|
42858
|
+
id: id,
|
|
42859
|
+
onClick: onClick,
|
|
42860
|
+
className: classNames("arc-Link", "arc-Link--".concat(size), {
|
|
42861
|
+
"arc-Link--onDarkSurface": surface === "dark",
|
|
42862
|
+
"arc-Link--onLightSurface": surface !== "dark",
|
|
42863
|
+
"arc-Link--isImplied": isImplied
|
|
42864
|
+
})
|
|
42865
|
+
};
|
|
42866
|
+
var elementProps = {
|
|
42867
|
+
a: __assign(__assign({}, commonProps), { href: href, title: title, target: target, rel: rel }),
|
|
42868
|
+
button: __assign({}, commonProps),
|
|
42869
|
+
span: __assign({}, commonProps)
|
|
42870
|
+
};
|
|
42871
|
+
var LinkElement = isButton ? "button" : href ? "a" : "span";
|
|
42872
|
+
return (React__default.createElement(LinkElement, __assign({}, elementProps[LinkElement], filterDataAttrs(props)),
|
|
42873
|
+
React__default.createElement("div", { className: "arc-Link-wrapper" },
|
|
42874
|
+
React__default.createElement(VisuallyHidden, null,
|
|
42875
|
+
screenReaderText || children,
|
|
42876
|
+
isExternalLink && " (Opens in new window)"),
|
|
42877
|
+
React__default.createElement("span", { "aria-hidden": true, className: "arc-Link-text" },
|
|
42878
|
+
firstText,
|
|
42879
|
+
"\u00A0"),
|
|
42880
|
+
React__default.createElement("span", { className: "arc-Link-iconWrapper" },
|
|
42881
|
+
React__default.createElement("span", { "aria-hidden": true, className: "arc-Link-text" }, lastWord),
|
|
42882
|
+
isExternalLink && (React__default.createElement(Icon, { isPresentationIcon: true, icon: BtIconNewWindow, size: size === "s" ? 20 : 24 }))))));
|
|
42883
|
+
};
|
|
42884
|
+
|
|
42885
|
+
export { Alert, Align, Avatar, AvatarGroup, Badge, Base, Box, BrandLogo, Breadcrumbs, Button, Card, Checkbox, Clock, Clock_rehydrator as ClockRehydrator, Columns, Curve, Disclosure, DisclosureMini, Elevation, Filter, FormControl, Grid, Group, Heading, Hidden, Icon, Image, ImpactCard, InformationCard, Link, Markup, MediaCard, Modal, Pagination, PaginationSimple, Poster, ProgressBar, ProgressStepper, RadioGroup, Rule, ScrollToTop, Section, Select, SiteFooter, SiteFooter_rehydrator as SiteFooterRehydrator, SiteHeader, SiteHeaderRehydrator, SiteHeaderV2, Surface, Context$5 as SurfaceContext, Switch, Tabs, Tag, Text, TextArea, TextInput, Toast, Truncate, TypographyCard, UniversalHeader, VerticalSpace, Visible, VisuallyHidden };
|
|
42729
42886
|
//# sourceMappingURL=index.es.js.map
|