@arc-ui/components 11.19.0 → 11.21.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/Avatar/Avatar.cjs.js +18 -0
- package/dist/Avatar/Avatar.esm.js +10 -0
- package/dist/Avatar/package.json +7 -0
- package/dist/AvatarGroup/AvatarGroup.cjs.js +37 -0
- package/dist/AvatarGroup/AvatarGroup.esm.js +29 -0
- package/dist/AvatarGroup/package.json +7 -0
- package/dist/Checkbox/Checkbox.cjs.js +2 -2
- package/dist/Checkbox/Checkbox.esm.js +2 -2
- package/dist/DatePicker/DatePicker.cjs.js +2 -2
- package/dist/DatePicker/DatePicker.esm.js +2 -2
- package/dist/FormControl/FormControl.cjs.js +1 -1
- package/dist/FormControl/FormControl.esm.js +1 -1
- package/dist/InformationCard/InformationCard.cjs.js +4 -4
- package/dist/InformationCard/InformationCard.esm.js +1 -1
- package/dist/MediaCard/MediaCard.cjs.js +6 -10
- package/dist/MediaCard/MediaCard.esm.js +3 -7
- package/dist/ProgressStepper/ProgressStepper.cjs.js +1 -3
- package/dist/ProgressStepper/ProgressStepper.esm.js +1 -3
- package/dist/RadioGroup/RadioGroup.cjs.js +2 -2
- package/dist/RadioGroup/RadioGroup.esm.js +2 -2
- package/dist/Rule/Rule.cjs.js +11 -7
- package/dist/Rule/Rule.esm.js +11 -7
- package/dist/ScrollToTop/ScrollToTop.cjs.js +1 -1
- package/dist/ScrollToTop/ScrollToTop.esm.js +1 -1
- package/dist/Select/Select.cjs.js +8 -6
- package/dist/Select/Select.esm.js +8 -6
- package/dist/SiteHeaderV2/SiteHeaderV2.cjs.js +1 -1
- package/dist/SiteHeaderV2/SiteHeaderV2.esm.js +1 -1
- package/dist/SkipLink/SkipLink.cjs.js +23 -0
- package/dist/SkipLink/SkipLink.esm.js +15 -0
- package/dist/SkipLink/package.json +7 -0
- package/dist/Switch/Switch.cjs.js +1 -1
- package/dist/Switch/Switch.esm.js +1 -1
- package/dist/TextArea/TextArea.cjs.js +7 -8
- package/dist/TextArea/TextArea.esm.js +7 -8
- package/dist/TextInput/TextInput.cjs.js +2 -2
- package/dist/TextInput/TextInput.esm.js +2 -2
- package/dist/TypographyCard/TypographyCard.cjs.js +4 -4
- package/dist/TypographyCard/TypographyCard.esm.js +2 -2
- package/dist/_shared/cjs/Avatar-12ece0dd.js +65 -0
- package/dist/_shared/cjs/{CardFooter-f6cba651.js → CardFooter-4a68a862.js} +2 -2
- package/dist/_shared/cjs/{Checkbox-4d4b432f.js → Checkbox-8915fcd9.js} +1 -1
- package/dist/_shared/cjs/ConditionalWrapper-be3b2625.js +14 -0
- package/dist/_shared/cjs/{FormControl-b26ad353.js → FormControl-5f3b6ce4.js} +9 -4
- package/dist/_shared/cjs/ProgressStepper-20a61620.js +100 -0
- package/dist/_shared/cjs/{RadioGroup-60845bb3.js → RadioGroup-07bb155e.js} +3 -2
- package/dist/_shared/cjs/{SiteHeaderV2-8c8f3f5c.js → SiteHeaderV2-301c765c.js} +9 -25
- package/dist/_shared/cjs/{TextInput-acbd8eda.js → TextInput-5da70ec2.js} +1 -1
- package/dist/_shared/esm/Avatar-d01e2b7b.js +59 -0
- package/dist/_shared/esm/{CardFooter-55ae9a37.js → CardFooter-a08b70ee.js} +1 -1
- package/dist/_shared/esm/{Checkbox-720b074d.js → Checkbox-0e051546.js} +1 -1
- package/dist/_shared/esm/ConditionalWrapper-59be8f35.js +8 -0
- package/dist/_shared/esm/{FormControl-f0b8fe91.js → FormControl-cc99cde0.js} +9 -4
- package/dist/_shared/esm/ProgressStepper-74d48612.js +94 -0
- package/dist/_shared/esm/{RadioGroup-d42dba3a.js → RadioGroup-362be63f.js} +3 -2
- package/dist/_shared/esm/{SiteHeaderV2-6d0ff35b.js → SiteHeaderV2-0096e25b.js} +9 -25
- package/dist/_shared/esm/{TextInput-ddf4cc7a.js → TextInput-1d1c5fd6.js} +1 -1
- package/dist/index.es.js +317 -294
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +317 -292
- package/dist/index.js.map +1 -1
- package/dist/styles.css +4 -4
- package/dist/types/components/Avatar/Avatar.d.ts +13 -0
- package/dist/types/components/Avatar/components/AvatarContent/AvatarContent.d.ts +9 -0
- package/dist/types/components/Avatar/index.d.ts +1 -0
- package/dist/types/components/Avatar/types/avatar-icon-size.d.ts +1 -0
- package/dist/types/components/Avatar/types/avatar-image.d.ts +2 -0
- package/dist/types/components/Avatar/types/avatar-size.d.ts +1 -0
- package/dist/types/components/Avatar/types/avatar-text-size.d.ts +2 -0
- package/dist/types/components/AvatarGroup/AvatarGroup.d.ts +13 -0
- package/dist/types/components/AvatarGroup/index.d.ts +1 -0
- package/dist/types/components/AvatarGroup/types/group-avatar.d.ts +2 -0
- package/dist/types/components/AvatarGroup/utils/get-avatars.d.ts +2 -0
- package/dist/types/components/ProgressStepper/ProgressStepper.d.ts +1 -1
- package/dist/types/components/ProgressStepper/ProgressStepperItem/ProgressStepperItem.d.ts +3 -7
- package/dist/types/components/ProgressStepper/ProgressStepperItem/icons/Complete.d.ts +2 -0
- package/dist/types/components/ProgressStepper/ProgressStepperItem/icons/Current.d.ts +2 -0
- package/dist/types/components/ProgressStepper/ProgressStepperItem/icons/Error.d.ts +2 -0
- package/dist/types/components/ProgressStepper/ProgressStepperItem/icons/Todo.d.ts +2 -0
- package/dist/types/components/ProgressStepper/ProgressStepperItem/icons/Warning.d.ts +2 -0
- package/dist/types/components/Rule/Rule.d.ts +2 -1
- package/dist/types/components/Select/Select.d.ts +4 -0
- package/dist/types/components/SkipLink/SkipLink.d.ts +11 -0
- package/dist/types/components/SkipLink/SkipLinkItem/SkipLinkItem.d.ts +16 -0
- package/dist/types/components/SkipLink/index.d.ts +1 -0
- package/dist/types/components/index.d.ts +2 -0
- package/dist/types/private-components/ConditionalWrapper/ConditionalWrapper.d.ts +1 -0
- package/dist/types/styles.d.ts +3 -0
- package/package.json +2 -2
- package/dist/_shared/cjs/ProgressStepper-3af8a210.js +0 -141
- package/dist/_shared/esm/ProgressStepper-d4c5b6d9.js +0 -135
- package/dist/_shared/cjs/{CardLabel-768abf20.js → BtIconArrowRight.esm-50d96943.js} +20 -20
- package/dist/_shared/esm/{CardLabel-d6d71407.js → BtIconArrowRight.esm-9b181878.js} +20 -20
package/dist/index.js
CHANGED
|
@@ -625,6 +625,233 @@ var Alert = function (_a) {
|
|
|
625
625
|
React__default["default"].createElement(Icon, { icon: BtIconCrossAlt2Px, size: 24 }))))));
|
|
626
626
|
};
|
|
627
627
|
|
|
628
|
+
var CardHeading = function (_a) {
|
|
629
|
+
var onClick = _a.onClick, onMouseEnter = _a.onMouseEnter, onMouseLeave = _a.onMouseLeave, onBlur = _a.onBlur, onFocus = _a.onFocus, href = _a.href, heading = _a.heading, _b = _a.size, size = _b === void 0 ? "s" : _b, _c = _a.isDarkPathway, isDarkPathway = _c === void 0 ? false : _c, _d = _a.linkData, linkData = _d === void 0 ? {} : _d, _e = _a.headingLevel, headingLevel = _e === void 0 ? "2" : _e;
|
|
630
|
+
var HeadingElement = "h".concat(headingLevel);
|
|
631
|
+
return (React__default["default"].createElement(HeadingElement, { className: classNames("arc-CardHeading", "arc-CardHeading--".concat(size), {
|
|
632
|
+
"arc-CardHeading--darkPathway": isDarkPathway
|
|
633
|
+
}) }, href ? (React__default["default"].createElement("a", __assign({ className: "arc-CardHeading-link", href: href, onClick: onClick, onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave, onFocus: onFocus, onBlur: onBlur }, filterDataAttrs(linkData)), heading)) : (heading)));
|
|
634
|
+
};
|
|
635
|
+
|
|
636
|
+
var CardLabel = function (_a) {
|
|
637
|
+
var _b;
|
|
638
|
+
var text = _a.text, _c = _a.color, color = _c === void 0 ? "muted" : _c, _d = _a.isBold, isBold = _d === void 0 ? true : _d, _e = _a.isDarkPathway, isDarkPathway = _e === void 0 ? false : _e;
|
|
639
|
+
return (React__default["default"].createElement(React__default["default"].Fragment, null,
|
|
640
|
+
React__default["default"].createElement("span", { className: classNames("arc-CardLabel", (_b = {},
|
|
641
|
+
_b[suffixModifier("arc-CardLabel--color", color)] = !isDarkPathway,
|
|
642
|
+
_b["arc-CardLabel--bold"] = isBold,
|
|
643
|
+
_b["arc-CardLabel--darkPathway"] = isDarkPathway,
|
|
644
|
+
_b)) }, text)));
|
|
645
|
+
};
|
|
646
|
+
|
|
647
|
+
const BtIconArrowRight = (props) =>
|
|
648
|
+
/*#__PURE__*/ React__default["default"].createElement(
|
|
649
|
+
"svg",
|
|
650
|
+
Object.assign(
|
|
651
|
+
{
|
|
652
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
653
|
+
viewBox: "0 0 32 32",
|
|
654
|
+
},
|
|
655
|
+
props,
|
|
656
|
+
),
|
|
657
|
+
/*#__PURE__*/ React__default["default"].createElement("defs", null),
|
|
658
|
+
/*#__PURE__*/ React__default["default"].createElement("path", {
|
|
659
|
+
d: "M16,2A14,14,0,1,0,30,16,14,14,0,0,0,16,2Zm0,27A13,13,0,1,1,29,16,13.01474,13.01474,0,0,1,16,29Z",
|
|
660
|
+
fill: "currentColor",
|
|
661
|
+
}),
|
|
662
|
+
/*#__PURE__*/ React__default["default"].createElement("path", {
|
|
663
|
+
d: "M18.14648,11.64648a.49983.49983,0,0,0,0,.707L21.293,15.5H9.5a.5.5,0,0,0,0,1H21.293l-3.14649,3.14648a.5.5,0,1,0,.707.707L23.207,16l-4.35351-4.35352A.49983.49983,0,0,0,18.14648,11.64648Z",
|
|
664
|
+
fill: "currentColor",
|
|
665
|
+
}),
|
|
666
|
+
);
|
|
667
|
+
|
|
668
|
+
const BtIconPlay = (props) =>
|
|
669
|
+
/*#__PURE__*/ React__default["default"].createElement(
|
|
670
|
+
"svg",
|
|
671
|
+
Object.assign(
|
|
672
|
+
{
|
|
673
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
674
|
+
viewBox: "0 0 32 32",
|
|
675
|
+
},
|
|
676
|
+
props,
|
|
677
|
+
),
|
|
678
|
+
/*#__PURE__*/ React__default["default"].createElement("defs", null),
|
|
679
|
+
/*#__PURE__*/ React__default["default"].createElement("path", {
|
|
680
|
+
d: "M16,2A14,14,0,1,0,30,16,14,14,0,0,0,16,2Zm0,27A13,13,0,1,1,29,16,13.01474,13.01474,0,0,1,16,29Z",
|
|
681
|
+
fill: "currentColor",
|
|
682
|
+
}),
|
|
683
|
+
/*#__PURE__*/ React__default["default"].createElement("path", {
|
|
684
|
+
d: "M20.83887,15.03955,13.66113,10.896A1.107,1.107,0,0,0,12,11.85449v8.2876a1.10534,1.10534,0,0,0,1.66113.95947L20.83887,16.957a1.10688,1.10688,0,0,0,0-1.91748Zm-.5,1.05176-7.17774,4.14453a.10437.10437,0,0,1-.10742-.00049A.10314.10314,0,0,1,13,20.14209v-8.2876a.10229.10229,0,0,1,.05371-.09277.10284.10284,0,0,1,.10742,0l7.17774,4.14307a.10421.10421,0,0,1,.05371.09375A.10285.10285,0,0,1,20.33887,16.09131Z",
|
|
685
|
+
fill: "currentColor",
|
|
686
|
+
}),
|
|
687
|
+
);
|
|
688
|
+
|
|
689
|
+
const BtIconArrowRightFill = (props) =>
|
|
690
|
+
/*#__PURE__*/ React__default["default"].createElement(
|
|
691
|
+
"svg",
|
|
692
|
+
Object.assign(
|
|
693
|
+
{
|
|
694
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
695
|
+
viewBox: "0 0 32 32",
|
|
696
|
+
},
|
|
697
|
+
props,
|
|
698
|
+
),
|
|
699
|
+
/*#__PURE__*/ React__default["default"].createElement("defs", null),
|
|
700
|
+
/*#__PURE__*/ React__default["default"].createElement("path", {
|
|
701
|
+
d: "M2,16A14,14,0,1,0,16,2,14,14,0,0,0,2,16Zm16.85352-4.35352L23.207,16l-4.35351,4.35352a.5.5,0,0,1-.707-.707L21.293,16.5H9.5a.5.5,0,0,1,0-1H21.293l-3.14649-3.14648a.5.5,0,0,1,.707-.707Z",
|
|
702
|
+
fill: "currentColor",
|
|
703
|
+
}),
|
|
704
|
+
);
|
|
705
|
+
|
|
706
|
+
const BtIconPlayFill = (props) =>
|
|
707
|
+
/*#__PURE__*/ React__default["default"].createElement(
|
|
708
|
+
"svg",
|
|
709
|
+
Object.assign(
|
|
710
|
+
{
|
|
711
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
712
|
+
viewBox: "0 0 32 32",
|
|
713
|
+
},
|
|
714
|
+
props,
|
|
715
|
+
),
|
|
716
|
+
/*#__PURE__*/ React__default["default"].createElement("defs", null),
|
|
717
|
+
/*#__PURE__*/ React__default["default"].createElement("path", {
|
|
718
|
+
d: "M13.16113,11.76172a.10284.10284,0,0,0-.10742,0A.10229.10229,0,0,0,13,11.85449v8.2876a.10314.10314,0,0,0,.05371.09326.10451.10451,0,0,0,.10742.00049l7.17774-4.14453a.10285.10285,0,0,0,.05371-.09277.10421.10421,0,0,0-.05371-.09375Z",
|
|
719
|
+
fill: "currentColor",
|
|
720
|
+
}),
|
|
721
|
+
/*#__PURE__*/ React__default["default"].createElement("path", {
|
|
722
|
+
d: "M16,2A14,14,0,1,0,30,16,14,14,0,0,0,16,2Zm4.83887,14.957-7.17774,4.14453A1.10791,1.10791,0,0,1,12,20.14209v-8.2876a1.107,1.107,0,0,1,1.66113-.95849l7.17774,4.14355a1.10688,1.10688,0,0,1,0,1.91748Z",
|
|
723
|
+
fill: "currentColor",
|
|
724
|
+
}),
|
|
725
|
+
);
|
|
726
|
+
|
|
727
|
+
var CardFooter = function (_a) {
|
|
728
|
+
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.showFilledIcon, showFilledIcon = _e === void 0 ? false : _e;
|
|
729
|
+
var icons = {
|
|
730
|
+
arrow: {
|
|
731
|
+
regular: BtIconArrowRight,
|
|
732
|
+
filled: BtIconArrowRightFill
|
|
733
|
+
},
|
|
734
|
+
play: {
|
|
735
|
+
regular: BtIconPlay,
|
|
736
|
+
filled: BtIconPlayFill
|
|
737
|
+
}
|
|
738
|
+
};
|
|
739
|
+
return (React__default["default"].createElement("div", { className: classNames("arc-CardFooter", {
|
|
740
|
+
"arc-CardFooter--darkPathway": isDarkPathway,
|
|
741
|
+
"arc-CardFooter--showFilledIcon": showFilledIcon
|
|
742
|
+
}) },
|
|
743
|
+
React__default["default"].createElement("div", { className: "arc-CardFooter-metaTextContainer" }, metaText && (React__default["default"].createElement("span", { className: "arc-CardFooter-metaText" }, metaText))),
|
|
744
|
+
showButton && (React__default["default"].createElement("div", null,
|
|
745
|
+
React__default["default"].createElement("div", { className: "arc-CardFooter-button" },
|
|
746
|
+
React__default["default"].createElement("div", { className: classNames("arc-CardFooter-buttonIcon", "arc-CardFooter-buttonIcon--regular") },
|
|
747
|
+
React__default["default"].createElement(Icon, { icon: icons[buttonIcon].regular, size: 40 })),
|
|
748
|
+
React__default["default"].createElement("div", { className: "arc-CardFooter-buttonIcon arc-CardFooter-buttonIcon--filled" },
|
|
749
|
+
React__default["default"].createElement(Icon, { icon: icons[buttonIcon].filled, size: 40 })))))));
|
|
750
|
+
};
|
|
751
|
+
|
|
752
|
+
var ConditionalWrapper = function (_a) {
|
|
753
|
+
var condition = _a.condition, wrapper = _a.wrapper, fallback = _a.fallback, children = _a.children;
|
|
754
|
+
return (React__default["default"].createElement(React__default["default"].Fragment, null, condition ? wrapper(children) : fallback ? fallback(children) : children));
|
|
755
|
+
};
|
|
756
|
+
|
|
757
|
+
const BtIconUser = (props) =>
|
|
758
|
+
/*#__PURE__*/ React__default["default"].createElement(
|
|
759
|
+
"svg",
|
|
760
|
+
Object.assign(
|
|
761
|
+
{
|
|
762
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
763
|
+
viewBox: "0 0 32 32",
|
|
764
|
+
},
|
|
765
|
+
props,
|
|
766
|
+
),
|
|
767
|
+
/*#__PURE__*/ React__default["default"].createElement("defs", null),
|
|
768
|
+
/*#__PURE__*/ React__default["default"].createElement("path", {
|
|
769
|
+
d: "M20.87579,16.014a6.99843,6.99843,0,1,0-9.75378.00091C6.725,17.77887,4,21.452,4,25.66113V27a1.001,1.001,0,0,0,1,1H27a1.001,1.001,0,0,0,1-1V25.66113C28,21.45129,25.27423,17.77765,20.87579,16.014ZM10,11a5.998,5.998,0,1,1,6,6A6.0068,6.0068,0,0,1,10,11ZM27,27H5V25.66113c0-4.61181,3.46484-7.57324,6.707-8.80761l.29492-.11206a6.97581,6.97581,0,0,0,7.99457-.00062l.29645.11268C23.53516,18.08789,27,21.04932,27,25.66113Z",
|
|
770
|
+
fill: "currentColor",
|
|
771
|
+
}),
|
|
772
|
+
);
|
|
773
|
+
|
|
774
|
+
/**
|
|
775
|
+
* Use `Image` to render a single image, or set of images, with support for
|
|
776
|
+
* image fitting and art direction.
|
|
777
|
+
*/
|
|
778
|
+
var Image = function (_a) {
|
|
779
|
+
var _b;
|
|
780
|
+
var alt = _a.alt, _c = _a.anchor, anchor = _c === void 0 ? "C" : _c, children = _a.children, fillColor = _a.fillColor, fit = _a.fit, height = _a.height, loading = _a.loading, overlay = _a.overlay, sizes = _a.sizes, src = _a.src, srcSet = _a.srcSet, width = _a.width, props = __rest(_a, ["alt", "anchor", "children", "fillColor", "fit", "height", "loading", "overlay", "sizes", "src", "srcSet", "width"]);
|
|
781
|
+
React.useEffect(function () {
|
|
782
|
+
React__default["default"].Children.map(children, function (item) {
|
|
783
|
+
if (item && item.type !== ImageSource) {
|
|
784
|
+
throw new Error("Illegal child passed to <Image />. Ensure to only use <Image.Source />.");
|
|
785
|
+
}
|
|
786
|
+
});
|
|
787
|
+
}, [children]);
|
|
788
|
+
var img = (React__default["default"].createElement("img", { className: "arc-Image-img", alt: alt, height: fit === "cover" ? undefined : height, loading: loading, sizes: children ? undefined : sizes, src: src, srcSet: children ? undefined : srcSet, width: fit === "cover" ? undefined : width }));
|
|
789
|
+
return (React__default["default"].createElement("div", __assign({ className: classNames((_b = {
|
|
790
|
+
"arc-Image": true,
|
|
791
|
+
"arc-Image--cover": fit === "cover"
|
|
792
|
+
},
|
|
793
|
+
_b["arc-Image--anchor".concat(anchor)] = fit === "cover",
|
|
794
|
+
_b[suffixModifier("arc-Image--overlay", overlay || "")] = overlay,
|
|
795
|
+
_b)), style: __assign(__assign(__assign({}, (fillColor && { backgroundColor: fillColor })), (fit === "cover" && height ? { height: "".concat(height, "px") } : null)), (fit === "cover" && width ? { width: "".concat(width, "px") } : null)) }, filterDataAttrs(props)), children ? (React__default["default"].createElement("picture", null,
|
|
796
|
+
children,
|
|
797
|
+
" ",
|
|
798
|
+
img)) : (React__default["default"].createElement(React__default["default"].Fragment, null, img))));
|
|
799
|
+
};
|
|
800
|
+
var ImageSource = function (_a) {
|
|
801
|
+
var height = _a.height, media = _a.media, srcSet = _a.srcSet, sizes = _a.sizes, type = _a.type; _a.width; var props = __rest(_a, ["height", "media", "srcSet", "sizes", "type", "width"]);
|
|
802
|
+
return (React__default["default"].createElement("source", __assign({ height: height, media: media, sizes: sizes, srcSet: srcSet, type: type }, filterDataAttrs(props))));
|
|
803
|
+
};
|
|
804
|
+
Image.Source = ImageSource;
|
|
805
|
+
|
|
806
|
+
var AvatarContent = function (_a) {
|
|
807
|
+
var img = _a.img, initials = _a.initials, _b = _a.size, size = _b === void 0 ? "xl" : _b;
|
|
808
|
+
var textSize = {
|
|
809
|
+
s: "xxxs",
|
|
810
|
+
m: "xxs",
|
|
811
|
+
l: "xs",
|
|
812
|
+
xl: "s"
|
|
813
|
+
};
|
|
814
|
+
var iconSize = {
|
|
815
|
+
s: 16,
|
|
816
|
+
m: 24,
|
|
817
|
+
l: 32,
|
|
818
|
+
xl: 40
|
|
819
|
+
};
|
|
820
|
+
if (img) {
|
|
821
|
+
return React__default["default"].createElement(Image, __assign({ fit: "cover" }, img));
|
|
822
|
+
}
|
|
823
|
+
if (initials) {
|
|
824
|
+
return (React__default["default"].createElement(Heading, { size: textSize[size] }, initials.substring(0, 3).toUpperCase()));
|
|
825
|
+
}
|
|
826
|
+
return React__default["default"].createElement(Icon, { size: iconSize[size], icon: BtIconUser });
|
|
827
|
+
};
|
|
828
|
+
|
|
829
|
+
var Avatar = function (_a) {
|
|
830
|
+
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"]);
|
|
831
|
+
var wrapperAttrs = __assign({ className: classNames("arc-Avatar", "arc-Avatar--".concat(size), {
|
|
832
|
+
"arc-Avatar--img": Boolean(img)
|
|
833
|
+
}) }, filterDataAttrs(props));
|
|
834
|
+
return (React__default["default"].createElement(ConditionalWrapper, { condition: Boolean(href), wrapper: function (children) { return (React__default["default"].createElement("a", __assign({ href: href, "aria-label": ariaLabel, onClick: onClick, title: title }, wrapperAttrs), children)); }, fallback: function (children) { return React__default["default"].createElement("div", __assign({}, wrapperAttrs), children); } },
|
|
835
|
+
React__default["default"].createElement(AvatarContent, { size: size, img: img, initials: initials })));
|
|
836
|
+
};
|
|
837
|
+
|
|
838
|
+
var getAvatars = function (avatars, max) {
|
|
839
|
+
var maxAvatars = avatars.slice(0, max);
|
|
840
|
+
var hasHiddenAvatars = maxAvatars.length < avatars.length;
|
|
841
|
+
return __spreadArray(__spreadArray([], maxAvatars, true), (hasHiddenAvatars && max
|
|
842
|
+
? [{ initials: "+".concat(avatars.length - max) }]
|
|
843
|
+
: []), true);
|
|
844
|
+
};
|
|
845
|
+
|
|
846
|
+
var AvatarGroup = function (_a) {
|
|
847
|
+
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"]);
|
|
848
|
+
var id = React.useId();
|
|
849
|
+
var wrapperAttrs = __assign({ className: "arc-AvatarGroup" }, filterDataAttrs(props));
|
|
850
|
+
return (React__default["default"].createElement(ConditionalWrapper, { condition: Boolean(href), wrapper: function (children) { return (React__default["default"].createElement("a", __assign({ href: href, "aria-label": ariaLabel, onClick: onClick, title: title }, wrapperAttrs), children)); }, fallback: function (children) { return React__default["default"].createElement("div", __assign({}, wrapperAttrs), children); } },
|
|
851
|
+
React__default["default"].createElement("div", { className: "arc-AvatarGroup-avatarContainer" }, getAvatars(avatars, max).map(function (props, i) { return (React__default["default"].createElement("div", { key: "".concat(id, "-avatar-").concat(i), className: classNames("arc-AvatarGroup-avatar", "arc-AvatarGroup-avatar--".concat(size)) },
|
|
852
|
+
React__default["default"].createElement(Avatar, __assign({ size: size }, props)))); }))));
|
|
853
|
+
};
|
|
854
|
+
|
|
628
855
|
/** Use `Badge` component to visually display a small amount of information, such as notification counts or status indicators. */
|
|
629
856
|
var Badge = function (_a) {
|
|
630
857
|
var _b, _c;
|
|
@@ -1445,38 +1672,6 @@ var ButtonIcon = function (_a) {
|
|
|
1445
1672
|
return (React__default["default"].createElement("span", { className: "arc-Button-icon" }, isChevron ? (React__default["default"].createElement(Icon, { icon: isBeforeText ? BtIconChevronLeftMid : BtIconChevronRightMid })) : (React__default["default"].createElement(Icon, { icon: icon }))));
|
|
1446
1673
|
};
|
|
1447
1674
|
|
|
1448
|
-
/**
|
|
1449
|
-
* Use `Image` to render a single image, or set of images, with support for
|
|
1450
|
-
* image fitting and art direction.
|
|
1451
|
-
*/
|
|
1452
|
-
var Image = function (_a) {
|
|
1453
|
-
var _b;
|
|
1454
|
-
var alt = _a.alt, _c = _a.anchor, anchor = _c === void 0 ? "C" : _c, children = _a.children, fillColor = _a.fillColor, fit = _a.fit, height = _a.height, loading = _a.loading, overlay = _a.overlay, sizes = _a.sizes, src = _a.src, srcSet = _a.srcSet, width = _a.width, props = __rest(_a, ["alt", "anchor", "children", "fillColor", "fit", "height", "loading", "overlay", "sizes", "src", "srcSet", "width"]);
|
|
1455
|
-
React.useEffect(function () {
|
|
1456
|
-
React__default["default"].Children.map(children, function (item) {
|
|
1457
|
-
if (item && item.type !== ImageSource) {
|
|
1458
|
-
throw new Error("Illegal child passed to <Image />. Ensure to only use <Image.Source />.");
|
|
1459
|
-
}
|
|
1460
|
-
});
|
|
1461
|
-
}, [children]);
|
|
1462
|
-
var img = (React__default["default"].createElement("img", { className: "arc-Image-img", alt: alt, height: fit === "cover" ? undefined : height, loading: loading, sizes: children ? undefined : sizes, src: src, srcSet: children ? undefined : srcSet, width: fit === "cover" ? undefined : width }));
|
|
1463
|
-
return (React__default["default"].createElement("div", __assign({ className: classNames((_b = {
|
|
1464
|
-
"arc-Image": true,
|
|
1465
|
-
"arc-Image--cover": fit === "cover"
|
|
1466
|
-
},
|
|
1467
|
-
_b["arc-Image--anchor".concat(anchor)] = fit === "cover",
|
|
1468
|
-
_b[suffixModifier("arc-Image--overlay", overlay || "")] = overlay,
|
|
1469
|
-
_b)), style: __assign(__assign(__assign({}, (fillColor && { backgroundColor: fillColor })), (fit === "cover" && height ? { height: "".concat(height, "px") } : null)), (fit === "cover" && width ? { width: "".concat(width, "px") } : null)) }, filterDataAttrs(props)), children ? (React__default["default"].createElement("picture", null,
|
|
1470
|
-
children,
|
|
1471
|
-
" ",
|
|
1472
|
-
img)) : (React__default["default"].createElement(React__default["default"].Fragment, null, img))));
|
|
1473
|
-
};
|
|
1474
|
-
var ImageSource = function (_a) {
|
|
1475
|
-
var height = _a.height, media = _a.media, srcSet = _a.srcSet, sizes = _a.sizes, type = _a.type; _a.width; var props = __rest(_a, ["height", "media", "srcSet", "sizes", "type", "width"]);
|
|
1476
|
-
return (React__default["default"].createElement("source", __assign({ height: height, media: media, sizes: sizes, srcSet: srcSet, type: type }, filterDataAttrs(props))));
|
|
1477
|
-
};
|
|
1478
|
-
Image.Source = ImageSource;
|
|
1479
|
-
|
|
1480
1675
|
/**
|
|
1481
1676
|
* Optionally define ariaDescribedBy if errorMessage or helper exist.
|
|
1482
1677
|
*/
|
|
@@ -1784,11 +1979,16 @@ var FormControl = function (_a) {
|
|
|
1784
1979
|
"arc-FormControl--smallLabel": labelSize === "s",
|
|
1785
1980
|
"arc-FormControl--onDarkSurface": surface === "dark"
|
|
1786
1981
|
}), id: id }, elementProps, filterDataAttrs(props)),
|
|
1787
|
-
|
|
1982
|
+
hideLabel === true ? (React__default["default"].createElement(VisuallyHidden, null,
|
|
1983
|
+
React__default["default"].createElement(LabelType, __assign({ className: classNames("arc-FormControl-label", {
|
|
1984
|
+
"arc-FormControl-label--withHelperUnderLabel": helperUnderLabel && helper
|
|
1985
|
+
}) }, labelProps),
|
|
1986
|
+
label,
|
|
1987
|
+
requirementStatus === "optional" && (React__default["default"].createElement("span", { className: "arc-FormControl-labelOptional" }, "(optional)"))))) : (React__default["default"].createElement(LabelType, __assign({ className: classNames("arc-FormControl-label", {
|
|
1988
|
+
"arc-FormControl-label--withHelperUnderLabel": helperUnderLabel && helper
|
|
1989
|
+
}) }, labelProps),
|
|
1788
1990
|
label,
|
|
1789
|
-
requirementStatus === "optional" && (React__default["default"].createElement("span", { className: "arc-FormControl-labelOptional" }, "(optional)"))))
|
|
1790
|
-
label,
|
|
1791
|
-
requirementStatus === "optional" && (React__default["default"].createElement("span", { className: "arc-FormControl-labelOptional" }, "(optional)"))))),
|
|
1991
|
+
requirementStatus === "optional" && (React__default["default"].createElement("span", { className: "arc-FormControl-labelOptional" }, "(optional)")))),
|
|
1792
1992
|
helperUnderLabel && (React__default["default"].createElement(React__default["default"].Fragment, null, helper && (React__default["default"].createElement("div", { className: "arc-FormControl-helper arc-FormControl-helper--underLabel", id: idHelper }, helper)))),
|
|
1793
1993
|
children,
|
|
1794
1994
|
React__default["default"].createElement("div", { className: classNames("arc-FormControl-info", {
|
|
@@ -2129,27 +2329,6 @@ var ArcBreakpointS = 636;
|
|
|
2129
2329
|
var ArcBreakpointM = 768;
|
|
2130
2330
|
var ArcBreakpointL = 1024;
|
|
2131
2331
|
|
|
2132
|
-
const BtIconArrowRight = (props) =>
|
|
2133
|
-
/*#__PURE__*/ React__default["default"].createElement(
|
|
2134
|
-
"svg",
|
|
2135
|
-
Object.assign(
|
|
2136
|
-
{
|
|
2137
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
2138
|
-
viewBox: "0 0 32 32",
|
|
2139
|
-
},
|
|
2140
|
-
props,
|
|
2141
|
-
),
|
|
2142
|
-
/*#__PURE__*/ React__default["default"].createElement("defs", null),
|
|
2143
|
-
/*#__PURE__*/ React__default["default"].createElement("path", {
|
|
2144
|
-
d: "M16,2A14,14,0,1,0,30,16,14,14,0,0,0,16,2Zm0,27A13,13,0,1,1,29,16,13.01474,13.01474,0,0,1,16,29Z",
|
|
2145
|
-
fill: "currentColor",
|
|
2146
|
-
}),
|
|
2147
|
-
/*#__PURE__*/ React__default["default"].createElement("path", {
|
|
2148
|
-
d: "M18.14648,11.64648a.49983.49983,0,0,0,0,.707L21.293,15.5H9.5a.5.5,0,0,0,0,1H21.293l-3.14649,3.14648a.5.5,0,1,0,.707.707L23.207,16l-4.35351-4.35352A.49983.49983,0,0,0,18.14648,11.64648Z",
|
|
2149
|
-
fill: "currentColor",
|
|
2150
|
-
}),
|
|
2151
|
-
);
|
|
2152
|
-
|
|
2153
2332
|
const BtIconCross = (props) =>
|
|
2154
2333
|
/*#__PURE__*/ React__default["default"].createElement(
|
|
2155
2334
|
"svg",
|
|
@@ -2239,114 +2418,6 @@ var VerticalSpace = function (_a) {
|
|
|
2239
2418
|
_b)) }, filterDataAttrs(props))));
|
|
2240
2419
|
};
|
|
2241
2420
|
|
|
2242
|
-
var CardHeading = function (_a) {
|
|
2243
|
-
var onClick = _a.onClick, onMouseEnter = _a.onMouseEnter, onMouseLeave = _a.onMouseLeave, onBlur = _a.onBlur, onFocus = _a.onFocus, href = _a.href, heading = _a.heading, _b = _a.size, size = _b === void 0 ? "s" : _b, _c = _a.isDarkPathway, isDarkPathway = _c === void 0 ? false : _c, _d = _a.linkData, linkData = _d === void 0 ? {} : _d, _e = _a.headingLevel, headingLevel = _e === void 0 ? "2" : _e;
|
|
2244
|
-
var HeadingElement = "h".concat(headingLevel);
|
|
2245
|
-
return (React__default["default"].createElement(HeadingElement, { className: classNames("arc-CardHeading", "arc-CardHeading--".concat(size), {
|
|
2246
|
-
"arc-CardHeading--darkPathway": isDarkPathway
|
|
2247
|
-
}) }, href ? (React__default["default"].createElement("a", __assign({ className: "arc-CardHeading-link", href: href, onClick: onClick, onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave, onFocus: onFocus, onBlur: onBlur }, filterDataAttrs(linkData)), heading)) : (heading)));
|
|
2248
|
-
};
|
|
2249
|
-
|
|
2250
|
-
var CardLabel = function (_a) {
|
|
2251
|
-
var _b;
|
|
2252
|
-
var text = _a.text, _c = _a.color, color = _c === void 0 ? "muted" : _c, _d = _a.isBold, isBold = _d === void 0 ? true : _d, _e = _a.isDarkPathway, isDarkPathway = _e === void 0 ? false : _e;
|
|
2253
|
-
return (React__default["default"].createElement(React__default["default"].Fragment, null,
|
|
2254
|
-
React__default["default"].createElement("span", { className: classNames("arc-CardLabel", (_b = {},
|
|
2255
|
-
_b[suffixModifier("arc-CardLabel--color", color)] = !isDarkPathway,
|
|
2256
|
-
_b["arc-CardLabel--bold"] = isBold,
|
|
2257
|
-
_b["arc-CardLabel--darkPathway"] = isDarkPathway,
|
|
2258
|
-
_b)) }, text)));
|
|
2259
|
-
};
|
|
2260
|
-
|
|
2261
|
-
const BtIconPlay = (props) =>
|
|
2262
|
-
/*#__PURE__*/ React__default["default"].createElement(
|
|
2263
|
-
"svg",
|
|
2264
|
-
Object.assign(
|
|
2265
|
-
{
|
|
2266
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
2267
|
-
viewBox: "0 0 32 32",
|
|
2268
|
-
},
|
|
2269
|
-
props,
|
|
2270
|
-
),
|
|
2271
|
-
/*#__PURE__*/ React__default["default"].createElement("defs", null),
|
|
2272
|
-
/*#__PURE__*/ React__default["default"].createElement("path", {
|
|
2273
|
-
d: "M16,2A14,14,0,1,0,30,16,14,14,0,0,0,16,2Zm0,27A13,13,0,1,1,29,16,13.01474,13.01474,0,0,1,16,29Z",
|
|
2274
|
-
fill: "currentColor",
|
|
2275
|
-
}),
|
|
2276
|
-
/*#__PURE__*/ React__default["default"].createElement("path", {
|
|
2277
|
-
d: "M20.83887,15.03955,13.66113,10.896A1.107,1.107,0,0,0,12,11.85449v8.2876a1.10534,1.10534,0,0,0,1.66113.95947L20.83887,16.957a1.10688,1.10688,0,0,0,0-1.91748Zm-.5,1.05176-7.17774,4.14453a.10437.10437,0,0,1-.10742-.00049A.10314.10314,0,0,1,13,20.14209v-8.2876a.10229.10229,0,0,1,.05371-.09277.10284.10284,0,0,1,.10742,0l7.17774,4.14307a.10421.10421,0,0,1,.05371.09375A.10285.10285,0,0,1,20.33887,16.09131Z",
|
|
2278
|
-
fill: "currentColor",
|
|
2279
|
-
}),
|
|
2280
|
-
);
|
|
2281
|
-
|
|
2282
|
-
const BtIconArrowRightFill = (props) =>
|
|
2283
|
-
/*#__PURE__*/ React__default["default"].createElement(
|
|
2284
|
-
"svg",
|
|
2285
|
-
Object.assign(
|
|
2286
|
-
{
|
|
2287
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
2288
|
-
viewBox: "0 0 32 32",
|
|
2289
|
-
},
|
|
2290
|
-
props,
|
|
2291
|
-
),
|
|
2292
|
-
/*#__PURE__*/ React__default["default"].createElement("defs", null),
|
|
2293
|
-
/*#__PURE__*/ React__default["default"].createElement("path", {
|
|
2294
|
-
d: "M2,16A14,14,0,1,0,16,2,14,14,0,0,0,2,16Zm16.85352-4.35352L23.207,16l-4.35351,4.35352a.5.5,0,0,1-.707-.707L21.293,16.5H9.5a.5.5,0,0,1,0-1H21.293l-3.14649-3.14648a.5.5,0,0,1,.707-.707Z",
|
|
2295
|
-
fill: "currentColor",
|
|
2296
|
-
}),
|
|
2297
|
-
);
|
|
2298
|
-
|
|
2299
|
-
const BtIconPlayFill = (props) =>
|
|
2300
|
-
/*#__PURE__*/ React__default["default"].createElement(
|
|
2301
|
-
"svg",
|
|
2302
|
-
Object.assign(
|
|
2303
|
-
{
|
|
2304
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
2305
|
-
viewBox: "0 0 32 32",
|
|
2306
|
-
},
|
|
2307
|
-
props,
|
|
2308
|
-
),
|
|
2309
|
-
/*#__PURE__*/ React__default["default"].createElement("defs", null),
|
|
2310
|
-
/*#__PURE__*/ React__default["default"].createElement("path", {
|
|
2311
|
-
d: "M13.16113,11.76172a.10284.10284,0,0,0-.10742,0A.10229.10229,0,0,0,13,11.85449v8.2876a.10314.10314,0,0,0,.05371.09326.10451.10451,0,0,0,.10742.00049l7.17774-4.14453a.10285.10285,0,0,0,.05371-.09277.10421.10421,0,0,0-.05371-.09375Z",
|
|
2312
|
-
fill: "currentColor",
|
|
2313
|
-
}),
|
|
2314
|
-
/*#__PURE__*/ React__default["default"].createElement("path", {
|
|
2315
|
-
d: "M16,2A14,14,0,1,0,30,16,14,14,0,0,0,16,2Zm4.83887,14.957-7.17774,4.14453A1.10791,1.10791,0,0,1,12,20.14209v-8.2876a1.107,1.107,0,0,1,1.66113-.95849l7.17774,4.14355a1.10688,1.10688,0,0,1,0,1.91748Z",
|
|
2316
|
-
fill: "currentColor",
|
|
2317
|
-
}),
|
|
2318
|
-
);
|
|
2319
|
-
|
|
2320
|
-
var CardFooter = function (_a) {
|
|
2321
|
-
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.showFilledIcon, showFilledIcon = _e === void 0 ? false : _e;
|
|
2322
|
-
var icons = {
|
|
2323
|
-
arrow: {
|
|
2324
|
-
regular: BtIconArrowRight,
|
|
2325
|
-
filled: BtIconArrowRightFill
|
|
2326
|
-
},
|
|
2327
|
-
play: {
|
|
2328
|
-
regular: BtIconPlay,
|
|
2329
|
-
filled: BtIconPlayFill
|
|
2330
|
-
}
|
|
2331
|
-
};
|
|
2332
|
-
return (React__default["default"].createElement("div", { className: classNames("arc-CardFooter", {
|
|
2333
|
-
"arc-CardFooter--darkPathway": isDarkPathway,
|
|
2334
|
-
"arc-CardFooter--showFilledIcon": showFilledIcon
|
|
2335
|
-
}) },
|
|
2336
|
-
React__default["default"].createElement("div", { className: "arc-CardFooter-metaTextContainer" }, metaText && (React__default["default"].createElement("span", { className: "arc-CardFooter-metaText" }, metaText))),
|
|
2337
|
-
showButton && (React__default["default"].createElement("div", null,
|
|
2338
|
-
React__default["default"].createElement("div", { className: "arc-CardFooter-button" },
|
|
2339
|
-
React__default["default"].createElement("div", { className: classNames("arc-CardFooter-buttonIcon", "arc-CardFooter-buttonIcon--regular") },
|
|
2340
|
-
React__default["default"].createElement(Icon, { icon: icons[buttonIcon].regular, size: 40 })),
|
|
2341
|
-
React__default["default"].createElement("div", { className: "arc-CardFooter-buttonIcon arc-CardFooter-buttonIcon--filled" },
|
|
2342
|
-
React__default["default"].createElement(Icon, { icon: icons[buttonIcon].filled, size: 40 })))))));
|
|
2343
|
-
};
|
|
2344
|
-
|
|
2345
|
-
var ConditionalWrapper = function (_a) {
|
|
2346
|
-
var condition = _a.condition, wrapper = _a.wrapper, children = _a.children;
|
|
2347
|
-
return (React__default["default"].createElement(React__default["default"].Fragment, null, condition ? wrapper(children) : children));
|
|
2348
|
-
};
|
|
2349
|
-
|
|
2350
2421
|
var InformationCard = function (_a) {
|
|
2351
2422
|
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"]);
|
|
2352
2423
|
var isMinWidthArcBreakpointS = useMediaQuery("(min-width: ".concat(ArcBreakpointS, "px)"));
|
|
@@ -35581,68 +35652,48 @@ var ProgressBar = function (_a) {
|
|
|
35581
35652
|
React__default["default"].createElement(Icon, { icon: PROGRESS_BAR_ICON_MAP[action.icon], size: 24 }))))))))));
|
|
35582
35653
|
};
|
|
35583
35654
|
|
|
35584
|
-
|
|
35585
|
-
|
|
35586
|
-
|
|
35587
|
-
|
|
35588
|
-
|
|
35589
|
-
|
|
35590
|
-
|
|
35591
|
-
|
|
35592
|
-
|
|
35593
|
-
),
|
|
35594
|
-
|
|
35595
|
-
|
|
35596
|
-
|
|
35597
|
-
|
|
35598
|
-
|
|
35599
|
-
|
|
35600
|
-
|
|
35601
|
-
|
|
35602
|
-
|
|
35603
|
-
|
|
35604
|
-
|
|
35605
|
-
|
|
35606
|
-
|
|
35607
|
-
|
|
35608
|
-
|
|
35609
|
-
|
|
35610
|
-
|
|
35611
|
-
|
|
35612
|
-
|
|
35613
|
-
|
|
35614
|
-
|
|
35615
|
-
|
|
35616
|
-
);
|
|
35617
|
-
|
|
35618
|
-
const BtIconCircle = (props) =>
|
|
35619
|
-
/*#__PURE__*/ React__default["default"].createElement(
|
|
35620
|
-
"svg",
|
|
35621
|
-
Object.assign(
|
|
35622
|
-
{
|
|
35623
|
-
viewBox: "0 0 32 32",
|
|
35624
|
-
fill: "none",
|
|
35625
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
35626
|
-
},
|
|
35627
|
-
props,
|
|
35628
|
-
),
|
|
35629
|
-
/*#__PURE__*/ React__default["default"].createElement("path", {
|
|
35630
|
-
fillRule: "evenodd",
|
|
35631
|
-
clipRule: "evenodd",
|
|
35632
|
-
d: "M9 16C9 19.87 12.13 23 16 23C19.87 23 23 19.87 23 16C23 12.13 19.87 9 16 9C12.13 9 9 12.13 9 16ZM16 7C11.03 7 7 11.03 7 16C7 20.97 11.03 25 16 25C20.97 25 25 20.97 25 16C25 11.03 20.97 7 16 7Z",
|
|
35633
|
-
fill: "currentColor",
|
|
35634
|
-
}),
|
|
35635
|
-
);
|
|
35636
|
-
|
|
35655
|
+
var Error$1 = function () { return (React__default["default"].createElement("svg", { fill: "none", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" },
|
|
35656
|
+
React__default["default"].createElement("g", { "clip-path": "url(#a)" },
|
|
35657
|
+
React__default["default"].createElement("path", { d: "m13.06 12 2.845-2.845a.75.75 0 0 0-1.06-1.06L12 10.94 9.155 8.095a.75.75 0 0 0-1.06 1.06L10.939 12l-2.844 2.845a.75.75 0 1 0 1.06 1.06L12 13.061l2.845 2.844a.75.75 0 0 0 1.06-1.06L13.06 12Z", fill: "currentColor" })),
|
|
35658
|
+
React__default["default"].createElement("rect", { x: ".667", y: ".667", width: "22.667", height: "22.667", rx: "11.333", stroke: "currentColor", "stroke-width": "1.333" }),
|
|
35659
|
+
React__default["default"].createElement("defs", null,
|
|
35660
|
+
React__default["default"].createElement("clipPath", { id: "a" },
|
|
35661
|
+
React__default["default"].createElement("rect", { width: "24", height: "24", rx: "12" }))))); };
|
|
35662
|
+
|
|
35663
|
+
var Warning = function () { return (React__default["default"].createElement("svg", { fill: "none", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" },
|
|
35664
|
+
React__default["default"].createElement("rect", { x: ".667", y: ".667", width: "22.667", height: "22.667", rx: "11.333", stroke: "currentColor", "stroke-width": "1.333" }),
|
|
35665
|
+
React__default["default"].createElement("path", { d: "M12 15.747a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Zm.004-1.487a.375.375 0 0 0 .375-.375l.001-6.757a.375.375 0 1 0-.75 0l-.001 6.757a.375.375 0 0 0 .375.375Z", fill: "currentColor", stroke: "currentColor", "stroke-width": ".3" }))); };
|
|
35666
|
+
|
|
35667
|
+
var Complete = function () { return (React__default["default"].createElement("svg", { fill: "none", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" },
|
|
35668
|
+
React__default["default"].createElement("g", { "clip-path": "url(#a)" },
|
|
35669
|
+
React__default["default"].createElement("path", { d: "m10.125 16.435-3.53-3.53a.75.75 0 0 1 0-1.06.768.768 0 0 1 1.06 0l2.47 2.47 6.22-6.22a.75.75 0 1 1 1.06 1.06l-7.28 7.28Z", fill: "currentColor" })),
|
|
35670
|
+
React__default["default"].createElement("rect", { x: ".667", y: ".667", width: "22.667", height: "22.667", rx: "11.333", stroke: "currentColor", "stroke-width": "1.333" }),
|
|
35671
|
+
React__default["default"].createElement("defs", null,
|
|
35672
|
+
React__default["default"].createElement("clipPath", { id: "a" },
|
|
35673
|
+
React__default["default"].createElement("rect", { width: "24", height: "24", rx: "12" }))))); };
|
|
35674
|
+
|
|
35675
|
+
var Current = function () { return (React__default["default"].createElement("svg", { viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
35676
|
+
React__default["default"].createElement("rect", { x: "0.666667", y: "0.666667", width: "22.6667", height: "22.6667", rx: "11.3333", stroke: "url(#paint0_linear_1_1050)", "stroke-width": "1.33333" }),
|
|
35677
|
+
React__default["default"].createElement("circle", { cx: "12", cy: "12", r: "7", fill: "currentColor" }),
|
|
35678
|
+
React__default["default"].createElement("defs", null,
|
|
35679
|
+
React__default["default"].createElement("linearGradient", { id: "paint0_linear_1_1050", x1: "36.6036", y1: "-4.31391e-07", x2: "-12.6036", y2: "24", gradientUnits: "userSpaceOnUse" },
|
|
35680
|
+
React__default["default"].createElement("stop", { "stop-color": "#F200F5" }),
|
|
35681
|
+
React__default["default"].createElement("stop", { offset: "1", "stop-color": "#1EC8E6" }))))); };
|
|
35682
|
+
|
|
35683
|
+
var Todo = function () { return (React__default["default"].createElement("svg", { fill: "none", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" },
|
|
35684
|
+
React__default["default"].createElement("rect", { x: ".667", y: ".667", width: "22.667", height: "22.667", rx: "11.333", stroke: "currentColor", "stroke-width": "1.333" }))); };
|
|
35685
|
+
|
|
35686
|
+
// export current step as an icon
|
|
35637
35687
|
var ProgressStepperItem = function (_a) {
|
|
35638
|
-
var _b
|
|
35639
|
-
var title = _a.title, titleHref = _a.titleHref, subTitle = _a.subTitle,
|
|
35688
|
+
var _b;
|
|
35689
|
+
var title = _a.title, titleHref = _a.titleHref, subTitle = _a.subTitle, _c = _a.direction, direction = _c === void 0 ? "horizontal" : _c, _d = _a.status, status = _d === void 0 ? "todo" : _d, _e = _a.size, size = _e === void 0 ? "large" : _e, isFluid = _a.isFluid, ariaLabel = _a.ariaLabel, onClick = _a.onClick, previousStep = _a.previousStep, stepContent = _a.stepContent, isStepContentHidden = _a.isStepContentHidden, props = __rest(_a, ["title", "titleHref", "subTitle", "direction", "status", "size", "isFluid", "ariaLabel", "onClick", "previousStep", "stepContent", "isStepContentHidden"]);
|
|
35640
35690
|
var surface = React.useContext(Context$5).surface;
|
|
35641
35691
|
var statusIcons = {
|
|
35642
|
-
|
|
35643
|
-
|
|
35644
|
-
|
|
35645
|
-
|
|
35692
|
+
todo: Todo,
|
|
35693
|
+
completed: Complete,
|
|
35694
|
+
current: Current,
|
|
35695
|
+
warning: Warning,
|
|
35696
|
+
error: Error$1
|
|
35646
35697
|
};
|
|
35647
35698
|
var onClickHandler = function (event) {
|
|
35648
35699
|
event.preventDefault();
|
|
@@ -35651,37 +35702,25 @@ var ProgressStepperItem = function (_a) {
|
|
|
35651
35702
|
var capitaliseFirstLetter = function (word) {
|
|
35652
35703
|
return word.charAt(0).toUpperCase() + word.slice(1);
|
|
35653
35704
|
};
|
|
35654
|
-
return (React__default["default"].createElement("div", __assign({ className: classNames("arc-ProgressStepperItem", (_b = {
|
|
35705
|
+
return (React__default["default"].createElement("div", __assign({ className: classNames("arc-ProgressStepperItem", "arc-ProgressStepperItem--".concat(status), "arc-ProgressStepperItem--".concat(size), (_b = {
|
|
35655
35706
|
"arc-ProgressStepperItem--vertical": direction === "vertical",
|
|
35656
|
-
"arc-ProgressStepperItem--isFluid": isFluid,
|
|
35707
|
+
"arc-ProgressStepperItem--isFluid": isFluid && direction !== "vertical",
|
|
35657
35708
|
"arc-ProgressStepperItem--onDarkSurface": surface === "dark",
|
|
35658
35709
|
"arc-ProgressStepperItem--previousStepCompleted": previousStep === "completed"
|
|
35659
35710
|
},
|
|
35660
|
-
_b["arc-ProgressStepperItem--"
|
|
35711
|
+
_b["arc-ProgressStepperItem--hasInteractiveStatus"] = status !== "todo",
|
|
35661
35712
|
_b)) }, filterDataAttrs(props)),
|
|
35662
|
-
React__default["default"].createElement("div", { className:
|
|
35663
|
-
|
|
35664
|
-
|
|
35665
|
-
React__default["default"].createElement("div", { className: "arc-ProgressStepperItem-iconSectionTrailBefore" }),
|
|
35666
|
-
React__default["default"].createElement("div", { className: classNames("arc-ProgressStepperItem-iconWrapper", (_d = {},
|
|
35667
|
-
_d["arc-ProgressStepperItem-iconWrapper--".concat(status)] = status !== "todo",
|
|
35668
|
-
_d)), "data-testid": "arc-ProgressStepperItem-iconWrapper" }, statusIcons[status] === undefined ? (React__default["default"].createElement("div", { style: {
|
|
35669
|
-
width: size === "small" ? "16px" : "32px",
|
|
35670
|
-
height: size === "small" ? "16px" : "32px"
|
|
35671
|
-
} })) : (React__default["default"].createElement(Icon, { size: size === "small" ? 16 : 32, icon: statusIcons[status] }))),
|
|
35672
|
-
React__default["default"].createElement("div", { className: "arc-ProgressStepperItem-iconSectionTrailAfter" })),
|
|
35713
|
+
React__default["default"].createElement("div", { className: "arc-ProgressStepperItem-iconSection" },
|
|
35714
|
+
React__default["default"].createElement("div", { className: "arc-ProgressStepperItem-iconWrapper", "data-testid": "arc-ProgressStepperItem-iconWrapper" },
|
|
35715
|
+
React__default["default"].createElement(Icon, { size: size === "small" ? 16 : 24, icon: statusIcons[status] }))),
|
|
35673
35716
|
React__default["default"].createElement("div", { className: "arc-ProgressStepperItem-textSection" },
|
|
35674
35717
|
status !== "todo" && (React__default["default"].createElement(VisuallyHidden, null,
|
|
35675
35718
|
capitaliseFirstLetter(status),
|
|
35676
35719
|
":")),
|
|
35677
|
-
titleHref ? (React__default["default"].createElement("a", { href: titleHref, "aria-label": ariaLabel, className: "arc-ProgressStepperItem-title", onClick: onClickHandler }, title)) : (React__default["default"].createElement("div", { className: "arc-ProgressStepperItem-title" }, title)),
|
|
35720
|
+
titleHref ? (React__default["default"].createElement("a", { href: titleHref, "aria-label": ariaLabel, className: classNames("arc-ProgressStepperItem-title", "arc-ProgressStepperItem-title--link"), onClick: onClickHandler }, title)) : (React__default["default"].createElement("div", { className: "arc-ProgressStepperItem-title" }, title)),
|
|
35678
35721
|
React__default["default"].createElement("div", { className: "arc-ProgressStepperItem-subTitle" }, subTitle),
|
|
35679
|
-
|
|
35680
|
-
React__default["default"].createElement("div", { className: "arc-ProgressStepperItem-nodeItem" },
|
|
35681
|
-
React__default["default"].createElement("div", { className: "arc-ProgressStepperItem-keyline" }),
|
|
35682
|
-
stepContent && !isStepContentHidden && (React__default["default"].createElement(React__default["default"].Fragment, null,
|
|
35683
|
-
React__default["default"].createElement(VerticalSpace, { size: "8" }),
|
|
35684
|
-
stepContent))))))));
|
|
35722
|
+
stepContent && !isStepContentHidden && direction === "vertical" && (React__default["default"].createElement(React__default["default"].Fragment, null,
|
|
35723
|
+
React__default["default"].createElement("div", { className: "arc-ProgressStepperItem-nodeItem" }, stepContent))))));
|
|
35685
35724
|
};
|
|
35686
35725
|
|
|
35687
35726
|
/** Use `ProgressStepper` to illustrate the progress of a specific task within a page, by displaying a step-by-step progress through the user journey. This is commonly used in multi-step processes or wizards. */
|
|
@@ -35694,15 +35733,8 @@ var ProgressStepper = function (_a) {
|
|
|
35694
35733
|
};
|
|
35695
35734
|
return (React__default["default"].createElement("div", __assign({ className: classNames("arc-ProgressStepper", {
|
|
35696
35735
|
"arc-ProgressStepper--vertical": direction === "vertical"
|
|
35697
|
-
}) }, filterDataAttrs(props)), items.map(function (item, index) {
|
|
35698
|
-
|
|
35699
|
-
? "first"
|
|
35700
|
-
: index === React__default["default"].Children.count(children) - 1
|
|
35701
|
-
? "last"
|
|
35702
|
-
: undefined;
|
|
35703
|
-
return (React__default["default"].createElement(React__default["default"].Fragment, { key: "StepperItem-".concat(index) },
|
|
35704
|
-
React__default["default"].createElement(ProgressStepperItem, __assign({ title: item.props.title, titleHref: item.props.titleHref, subTitle: item.props.subTitle, status: item.props.status, stepContent: item.props.stepContent, isStepContentHidden: item.props.isStepContentHidden, onClick: item.props.onClick, isFluid: isFluid, direction: direction, isExpandable: isExpandable, size: size, position: currentPosition, previousStep: getStepStatus(items[index - 1]) }, filterDataAttrs(item.props)))));
|
|
35705
|
-
})));
|
|
35736
|
+
}) }, filterDataAttrs(props)), items.map(function (item, index) { return (React__default["default"].createElement(React__default["default"].Fragment, { key: "StepperItem-".concat(index) },
|
|
35737
|
+
React__default["default"].createElement(ProgressStepperItem, __assign({ title: item.props.title, titleHref: item.props.titleHref, subTitle: item.props.subTitle, status: item.props.status, stepContent: item.props.stepContent, isStepContentHidden: item.props.isStepContentHidden, onClick: item.props.onClick, isFluid: isFluid, direction: direction, isExpandable: isExpandable, size: size, previousStep: getStepStatus(items[index - 1]) }, filterDataAttrs(item.props))))); })));
|
|
35706
35738
|
};
|
|
35707
35739
|
ProgressStepper.Item = ProgressStepperItem;
|
|
35708
35740
|
|
|
@@ -35762,19 +35794,24 @@ var RadioGroup = function (_a) {
|
|
|
35762
35794
|
size: size
|
|
35763
35795
|
} },
|
|
35764
35796
|
React__default["default"].createElement("div", __assign({ className: "arc-RadioGroup" }, filterDataAttrs(props)),
|
|
35765
|
-
React__default["default"].createElement(FormControl, { elementType: "fieldset", label: label, labelSize: labelSize, helper: helper, id: id, requirementStatus: "not-applicable", helperUnderLabel: true },
|
|
35797
|
+
React__default["default"].createElement(FormControl, { elementType: "fieldset", label: label, labelSize: labelSize, helper: helper, id: id, requirementStatus: "not-applicable", helperUnderLabel: true },
|
|
35798
|
+
React__default["default"].createElement("span", { className: "arc-RadioGroup-radioButtonContainer" }, children)))));
|
|
35766
35799
|
};
|
|
35767
35800
|
RadioGroup.RadioButton = RadioButton;
|
|
35768
35801
|
|
|
35769
35802
|
/**
|
|
35770
|
-
* Use `Rule` to display a horizontal rule.
|
|
35803
|
+
* Use `Rule` to display a horizontal or vertical rule.
|
|
35771
35804
|
*/
|
|
35772
|
-
var Rule = function (props) {
|
|
35805
|
+
var Rule = function (_a, props) {
|
|
35806
|
+
var _b;
|
|
35807
|
+
var _c = _a.orientation, orientation = _c === void 0 ? "horizontal" : _c;
|
|
35773
35808
|
var surface = React.useContext(Context$5).surface;
|
|
35774
|
-
return (React__default["default"].createElement("hr", __assign({ className: classNames({
|
|
35775
|
-
|
|
35776
|
-
|
|
35777
|
-
|
|
35809
|
+
return (React__default["default"].createElement("hr", __assign({ className: classNames((_b = {
|
|
35810
|
+
"arc-Rule": true
|
|
35811
|
+
},
|
|
35812
|
+
_b["arc-Rule--".concat(orientation)] = true,
|
|
35813
|
+
_b["arc-Rule--onDarkSurface"] = surface === "dark",
|
|
35814
|
+
_b)) }, filterDataAttrs(props))));
|
|
35778
35815
|
};
|
|
35779
35816
|
|
|
35780
35817
|
const BtIconArrowAltUp = (props) =>
|
|
@@ -35820,7 +35857,7 @@ var ScrollToTop = function (_a) {
|
|
|
35820
35857
|
"arc-ScrollToTop--visible": appear === "always" || (appear === "afterScroll" && hasScrolled)
|
|
35821
35858
|
}) }, filterDataAttrs(props)),
|
|
35822
35859
|
React__default["default"].createElement("div", { className: "arc-ScrollToTop-textWrapper" },
|
|
35823
|
-
React__default["default"].createElement("span", { className: "arc-ScrollToTop-text" }, "
|
|
35860
|
+
React__default["default"].createElement("span", { className: "arc-ScrollToTop-text" }, "Back to top")),
|
|
35824
35861
|
React__default["default"].createElement("span", { className: "arc-ScrollToTop-iconContainer" },
|
|
35825
35862
|
React__default["default"].createElement(Icon, { icon: BtIconArrowAltUp, size: 44 }))));
|
|
35826
35863
|
};
|
|
@@ -39234,14 +39271,16 @@ const BtIconChevronUp2Px = (props) =>
|
|
|
39234
39271
|
/** Use `Select` to choose from a dropdown list of options. */
|
|
39235
39272
|
var Select = function (_a) {
|
|
39236
39273
|
var _b;
|
|
39237
|
-
var isRequired = _a.isRequired, isDisabled = _a.isDisabled, placeholder = _a.placeholder, label = _a.label, _c = _a.ariaLabel, ariaLabel = _c === void 0 ? label : _c, options = _a.options, onOpenChange = _a.onOpenChange, isDefaultOpen = _a.isDefaultOpen, defaultValue = _a.defaultValue, errorMessage = _a.errorMessage, labelSize = _a.labelSize, helper = _a.helper, hideLabel = _a.hideLabel, name = _a.name, width = _a.width, isFluid = _a.isFluid, onBlur = _a.onBlur, onChange = _a.onChange, disclosureTitle = _a.disclosureTitle, disclosureText = _a.disclosureText, onClickDisclosure = _a.onClickDisclosure, _d = _a.selectSize, selectSize = _d === void 0 ? "m" : _d, props = __rest(_a, ["isRequired", "isDisabled", "placeholder", "label", "ariaLabel", "options", "onOpenChange", "isDefaultOpen", "defaultValue", "errorMessage", "labelSize", "helper", "hideLabel", "name", "width", "isFluid", "onBlur", "onChange", "disclosureTitle", "disclosureText", "onClickDisclosure", "selectSize"]);
|
|
39274
|
+
var isRequired = _a.isRequired, isDisabled = _a.isDisabled, placeholder = _a.placeholder, label = _a.label, value = _a.value, _c = _a.ariaLabel, ariaLabel = _c === void 0 ? label : _c, options = _a.options, onOpenChange = _a.onOpenChange, isDefaultOpen = _a.isDefaultOpen, defaultValue = _a.defaultValue, errorMessage = _a.errorMessage, labelSize = _a.labelSize, helper = _a.helper, hideLabel = _a.hideLabel, name = _a.name, width = _a.width, isFluid = _a.isFluid, onBlur = _a.onBlur, onChange = _a.onChange, disclosureTitle = _a.disclosureTitle, disclosureText = _a.disclosureText, onClickDisclosure = _a.onClickDisclosure, _d = _a.selectSize, selectSize = _d === void 0 ? "m" : _d, props = __rest(_a, ["isRequired", "isDisabled", "placeholder", "label", "value", "ariaLabel", "options", "onOpenChange", "isDefaultOpen", "defaultValue", "errorMessage", "labelSize", "helper", "hideLabel", "name", "width", "isFluid", "onBlur", "onChange", "disclosureTitle", "disclosureText", "onClickDisclosure", "selectSize"]);
|
|
39238
39275
|
var id = React.useId();
|
|
39239
39276
|
var arcRootElement = React.useContext(ArcRootElementContext);
|
|
39240
39277
|
var surface = React.useContext(Context$5).surface;
|
|
39241
|
-
var _e = React.useState(defaultValue),
|
|
39278
|
+
var _e = React.useState(defaultValue), uncontrolledValue = _e[0], setUncontrolledValue = _e[1];
|
|
39279
|
+
var isControlled = typeof value !== "undefined";
|
|
39280
|
+
var selectValue = isControlled ? value : uncontrolledValue;
|
|
39242
39281
|
var onValueChange = function (value) {
|
|
39243
39282
|
onChange && onChange(value);
|
|
39244
|
-
|
|
39283
|
+
setUncontrolledValue(value);
|
|
39245
39284
|
};
|
|
39246
39285
|
var getSelectedValueName = function (value) {
|
|
39247
39286
|
var _a;
|
|
@@ -39258,7 +39297,7 @@ var Select = function (_a) {
|
|
|
39258
39297
|
}
|
|
39259
39298
|
};
|
|
39260
39299
|
return (React__default["default"].createElement(FormControl, { errorMessage: errorMessage, helper: helper, htmlFor: id, label: label, hideLabel: hideLabel, labelSize: labelSize, requirementStatus: isRequired ? "required" : "optional", isDisabled: isDisabled, disclosureText: disclosureText, disclosureTitle: disclosureTitle, onClickDisclosure: onClickDisclosure },
|
|
39261
|
-
React__default["default"].createElement($cc7e05a45900e73f$export$be92b6f5f03c0fe9, { name: name, required: isRequired, disabled: isDisabled, defaultOpen: isDefaultOpen, value:
|
|
39300
|
+
React__default["default"].createElement($cc7e05a45900e73f$export$be92b6f5f03c0fe9, { name: name, required: isRequired, disabled: isDisabled, defaultOpen: isDefaultOpen, value: selectValue, onOpenChange: onOpenChange, onValueChange: function (value) { return onValueChange(value); } },
|
|
39262
39301
|
React__default["default"].createElement("div", { className: "arc-Select-wrapper" },
|
|
39263
39302
|
React__default["default"].createElement($cc7e05a45900e73f$export$41fb9f06171c75f4, __assign({ id: id, name: name, onBlur: onBlur, "aria-label": ariaLabel, style: { width: width }, className: classNames("arc-Select-trigger", (_b = {
|
|
39264
39303
|
"arc-Select-trigger--constrained": !isFluid,
|
|
@@ -39267,7 +39306,7 @@ var Select = function (_a) {
|
|
|
39267
39306
|
},
|
|
39268
39307
|
_b["arc-Select-trigger--size".concat(selectSize && selectSize.toUpperCase())] = selectSize && selectSize !== "m",
|
|
39269
39308
|
_b)) }, filterDataAttrs(props)),
|
|
39270
|
-
React__default["default"].createElement($cc7e05a45900e73f$export$4c8d1a57a761ef94, { className: "arc-Select-triggerText", placeholder: placeholder, "aria-label": getSelectedValueName(
|
|
39309
|
+
React__default["default"].createElement($cc7e05a45900e73f$export$4c8d1a57a761ef94, { className: "arc-Select-triggerText", placeholder: placeholder, "aria-label": getSelectedValueName(uncontrolledValue) }),
|
|
39271
39310
|
React__default["default"].createElement($cc7e05a45900e73f$export$f04a61298a47a40f, { className: "arc-Select-triggerIcon" },
|
|
39272
39311
|
React__default["default"].createElement(Icon, { icon: BtIconChevronDown2Px, size: getIconSize(selectSize) }))),
|
|
39273
39312
|
React__default["default"].createElement($cc7e05a45900e73f$export$602eac185826482c, { container: arcRootElement || undefined },
|
|
@@ -40016,9 +40055,9 @@ var Item = function (_a) {
|
|
|
40016
40055
|
_b["arc-SiteHeaderV2Item--emphasised"] = true,
|
|
40017
40056
|
_b)) }, filterDataAttrs(props)),
|
|
40018
40057
|
React__default["default"].createElement("a", { onClick: handleLinkClick({ handler: onClick }), className: "arc-SiteHeaderV2Item-link", href: href },
|
|
40058
|
+
children,
|
|
40019
40059
|
React__default["default"].createElement("span", { className: "arc-SiteHeaderV2Item-linkIcon" },
|
|
40020
|
-
React__default["default"].createElement(BtIconChevronRightMid, null))
|
|
40021
|
-
children)));
|
|
40060
|
+
React__default["default"].createElement(BtIconChevronRightMid, null)))));
|
|
40022
40061
|
};
|
|
40023
40062
|
|
|
40024
40063
|
var ItemGroup = function (_a) {
|
|
@@ -40120,6 +40159,7 @@ var Panel = function (_a) {
|
|
|
40120
40159
|
}
|
|
40121
40160
|
// Close the panel.
|
|
40122
40161
|
setOpen(false);
|
|
40162
|
+
setOpenPanelOnFirstClick(false);
|
|
40123
40163
|
};
|
|
40124
40164
|
document.addEventListener("click", handleClick);
|
|
40125
40165
|
return function () {
|
|
@@ -40297,32 +40337,15 @@ var HorizontalPanel = function (_a) {
|
|
|
40297
40337
|
// Where appropriate, close the Panel when clicking outside of it,
|
|
40298
40338
|
// by listening to clicks on the entire document and acting accordingly.
|
|
40299
40339
|
var handleClick = function (e) {
|
|
40300
|
-
var _a
|
|
40301
|
-
//
|
|
40340
|
+
var _a;
|
|
40341
|
+
// Close the Horizontal Panel…
|
|
40302
40342
|
if (
|
|
40303
|
-
// The click is inside the current
|
|
40304
|
-
((_a =
|
|
40305
|
-
|
|
40306
|
-
|
|
40307
|
-
// and the target is not a link
|
|
40308
|
-
(((_b = navItemRef === null || navItemRef === void 0 ? void 0 : navItemRef.current) === null || _b === void 0 ? void 0 : _b.contains(e.target)) &&
|
|
40309
|
-
!subNavItemRef &&
|
|
40310
|
-
!e.target.getAttribute("href")) ||
|
|
40311
|
-
// The Panel is inside a SubNavItem
|
|
40312
|
-
// and the click is not on a SubNavItem-link.
|
|
40313
|
-
// This ensures that one SubNavItem Panel per NavItem always remains open.
|
|
40314
|
-
(subNavItemRef &&
|
|
40315
|
-
!e.target.classList.contains(subNavLink) &&
|
|
40316
|
-
!e.target.classList.contains("".concat(subNavLink, "Title")) &&
|
|
40317
|
-
!e.target.classList.contains("".concat(subNavLink, "SubTitle"))) ||
|
|
40318
|
-
// Panel is inside a SubNavItem
|
|
40319
|
-
// and the click is not inside the Panel's NavItem parent.
|
|
40320
|
-
// This prevents SubNavItem Panels in sibling NavItems from being closed.
|
|
40321
|
-
(subNavItemRef && !(navItemRef === null || navItemRef === void 0 ? void 0 : navItemRef.current.contains(e.target)))) {
|
|
40343
|
+
// The click is not inside the current NavItem
|
|
40344
|
+
!((_a = navItemRef === null || navItemRef === void 0 ? void 0 : navItemRef.current) === null || _a === void 0 ? void 0 : _a.contains(e.target)) ||
|
|
40345
|
+
e.target.classList.contains("arc-SiteHeaderV2HorizontalPanel--open")) {
|
|
40346
|
+
setOpen(false);
|
|
40322
40347
|
return;
|
|
40323
40348
|
}
|
|
40324
|
-
// Close the panel.
|
|
40325
|
-
setOpen(false);
|
|
40326
40349
|
};
|
|
40327
40350
|
document.addEventListener("click", handleClick);
|
|
40328
40351
|
return function () {
|
|
@@ -42720,6 +42743,8 @@ UniversalHeader.Item = UniversalHeaderItem;
|
|
|
42720
42743
|
|
|
42721
42744
|
exports.Alert = Alert;
|
|
42722
42745
|
exports.Align = Align;
|
|
42746
|
+
exports.Avatar = Avatar;
|
|
42747
|
+
exports.AvatarGroup = AvatarGroup;
|
|
42723
42748
|
exports.Badge = Badge;
|
|
42724
42749
|
exports.Base = Base;
|
|
42725
42750
|
exports.Box = Box;
|