@arc-ui/components 12.0.0 → 12.1.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/lib/Alert/styles.css +1 -1
- package/lib/Align/styles.css +1 -1
- package/lib/AppButton/styles.css +1 -1
- package/lib/Avatar/styles.css +1 -1
- package/lib/AvatarGroup/styles.css +1 -1
- package/lib/Badge/styles.css +1 -1
- package/lib/Box/styles.css +1 -1
- package/lib/BrandLogo/styles.css +1 -1
- package/lib/Breadcrumbs/Breadcrumbs.cjs +1 -1
- package/lib/Breadcrumbs/Breadcrumbs.mjs +1 -1
- package/lib/Breadcrumbs/styles.css +1 -1
- package/lib/Button/styles.css +1 -1
- package/lib/ButtonGroup/styles.css +1 -1
- package/lib/ButtonV2/styles.css +1 -1
- package/lib/Calendar/Calendar.cjs +3 -3
- package/lib/Calendar/Calendar.mjs +3 -3
- package/lib/Calendar/styles.css +1 -1
- package/lib/CardFooter/styles.css +1 -1
- package/lib/CardHeading/styles.css +1 -1
- package/lib/Carousel/Carousel.cjs +348 -8
- package/lib/Carousel/Carousel.mjs +348 -8
- package/lib/Carousel/styles.css +1 -1
- package/lib/Checkbox/styles.css +1 -1
- package/lib/CheckboxIcon/styles.css +1 -1
- package/lib/Columns/styles.css +1 -1
- package/lib/ComboBox/styles.css +1 -1
- package/lib/ContentSwitcher/ContentSwitcher.cjs +1 -1
- package/lib/ContentSwitcher/ContentSwitcher.mjs +1 -1
- package/lib/ContentSwitcher/styles.css +1 -1
- package/lib/ContentSwitcherDropdown/styles.css +1 -1
- package/lib/DatePicker/DatePicker.cjs +4 -4
- package/lib/DatePicker/DatePicker.mjs +4 -4
- package/lib/DatePicker/styles.css +1 -1
- package/lib/Disclosure/styles.css +1 -1
- package/lib/DisclosureMini/styles.css +1 -1
- package/lib/Download/styles.css +1 -1
- package/lib/Drawer/styles.css +1 -1
- package/lib/Elevation/styles.css +1 -1
- package/lib/Filter/styles.css +1 -1
- package/lib/FormControl/styles.css +1 -1
- package/lib/GhostedHeroBanner/styles.css +1 -1
- package/lib/GradientPageBackground/GradientPageBackground.cjs +3 -3
- package/lib/GradientPageBackground/GradientPageBackground.mjs +3 -3
- package/lib/GradientPageBackground/styles.css +1 -1
- package/lib/Grid/styles.css +1 -1
- package/lib/Group/styles.css +1 -1
- package/lib/Heading/styles.css +1 -1
- package/lib/HeroBanner/styles.css +1 -1
- package/lib/HeroButton/styles.css +1 -1
- package/lib/Hidden/styles.css +1 -1
- package/lib/HorizontalCard/styles.css +1 -1
- package/lib/Icon/styles.css +1 -1
- package/lib/Image/styles.css +1 -1
- package/lib/ImpactCard/styles.css +1 -1
- package/lib/InformationCard/InformationCard.cjs +3 -3
- package/lib/InformationCard/InformationCard.mjs +3 -3
- package/lib/InformationCard/styles.css +1 -1
- package/lib/Link/styles.css +1 -1
- package/lib/Markup/styles.css +1 -1
- package/lib/MediaCard/styles.css +1 -1
- package/lib/Menu/styles.css +1 -1
- package/lib/Modal/styles.css +1 -1
- package/lib/NavigationHeader/NavigationHeader.cjs +23 -35
- package/lib/NavigationHeader/NavigationHeader.mjs +23 -35
- package/lib/NavigationHeader/styles.css +1 -1
- package/lib/Pagination/styles.css +1 -1
- package/lib/PaginationSimple/styles.css +1 -1
- package/lib/Popover/styles.css +1 -1
- package/lib/Poster/styles.css +1 -1
- package/lib/ProgressBar/styles.css +1 -1
- package/lib/ProgressStepper/ProgressStepper.cjs +2 -2
- package/lib/ProgressStepper/ProgressStepper.mjs +2 -2
- package/lib/ProgressStepper/styles.css +1 -1
- package/lib/ProgressStepperOverflow/ProgressStepperOverflow.cjs +76 -121
- package/lib/ProgressStepperOverflow/ProgressStepperOverflow.mjs +77 -123
- package/lib/ProgressStepperOverflow/styles.css +1 -1
- package/lib/RadioCardGroup/RadioCardGroup.cjs +6 -2
- package/lib/RadioCardGroup/RadioCardGroup.mjs +5 -1
- package/lib/RadioCardGroup/styles.css +1 -1
- package/lib/RadioGroup/styles.css +1 -1
- package/lib/Rule/styles.css +1 -1
- package/lib/ScrollToTop/styles.css +1 -1
- package/lib/Section/styles.css +1 -1
- package/lib/Select/styles.css +1 -1
- package/lib/SemanticHeading/styles.css +1 -1
- package/lib/SiteFooter/styles.css +1 -1
- package/lib/SiteFooterV2/styles.css +1 -1
- package/lib/SiteHeaderV2/SiteHeaderV2.cjs +5 -4
- package/lib/SiteHeaderV2/SiteHeaderV2.mjs +5 -4
- package/lib/SiteHeaderV2/styles.css +1 -1
- package/lib/Skeleton/styles.css +1 -1
- package/lib/SkipLink/styles.css +1 -1
- package/lib/Spinner/styles.css +1 -1
- package/lib/Surface/styles.css +1 -1
- package/lib/Switch/styles.css +1 -1
- package/lib/TabbedBanner/TabbedBanner.cjs +1 -1
- package/lib/TabbedBanner/TabbedBanner.mjs +1 -1
- package/lib/TabbedBanner/styles.css +1 -1
- package/lib/Tabs/styles.css +1 -1
- package/lib/Tag/styles.css +1 -1
- package/lib/TemplateBanner/styles.css +1 -1
- package/lib/Text/styles.css +1 -1
- package/lib/TextArea/styles.css +1 -1
- package/lib/TextInput/styles.css +1 -1
- package/lib/Theme/Theme.cjs +1 -1
- package/lib/Theme/Theme.mjs +1 -1
- package/lib/Theme/styles.css +1 -1
- package/lib/ThemeIcon/styles.css +1 -1
- package/lib/ThumbnailSignpost/styles.css +1 -1
- package/lib/Toast/styles.css +1 -1
- package/lib/Tooltip/styles.css +1 -1
- package/lib/Truncate/styles.css +1 -1
- package/lib/TypographyCard/styles.css +1 -1
- package/lib/UniversalHeader/styles.css +1 -1
- package/lib/VerticalSpace/styles.css +1 -1
- package/lib/VideoPlayer/styles.css +1 -1
- package/lib/Visible/styles.css +1 -1
- package/lib/VisuallyHidden/styles.css +1 -1
- package/lib/_shared/cjs/{Calendar-BvPNEvfm.cjs → Calendar-D_jZ0cgf.cjs} +2 -2
- package/lib/_shared/cjs/{ContentSwitcherList-BgAW2IhJ.cjs → ContentSwitcherList-DgychllS.cjs} +8 -8
- package/lib/_shared/cjs/{ProgressStepper-DTZQabiV.cjs → ProgressStepper-mTgKZYEl.cjs} +21 -20
- package/lib/_shared/cjs/{arc-breakpoints-Cl4-g1TC.cjs → arc-breakpoints-DFPoWNR4.cjs} +1 -1
- package/lib/_shared/cjs/{index.es-Dbvw_3_e.cjs → index.es-B2ZfX2D7.cjs} +1 -1
- package/lib/_shared/cjs/{use-media-query-DqZqShGX.cjs → use-media-query-BJV2IbHi.cjs} +4 -4
- package/lib/_shared/esm/{Calendar-DzsQqJlh.mjs → Calendar-wG6UVDgO.mjs} +2 -2
- package/lib/_shared/esm/{ContentSwitcherList-i4m4nAzP.mjs → ContentSwitcherList-CWZcMblg.mjs} +8 -8
- package/lib/_shared/esm/{ProgressStepper-CujHLQsm.mjs → ProgressStepper-DxZrJR0q.mjs} +22 -21
- package/lib/_shared/esm/{arc-breakpoints-Br78xe-f.mjs → arc-breakpoints-TEKN0W5t.mjs} +1 -1
- package/lib/_shared/esm/{index.es-f0R-yhhl.mjs → index.es-Co1d96HB.mjs} +2 -2
- package/lib/_shared/esm/{use-media-query-BmsMeo2M.mjs → use-media-query-l6Sou0dd.mjs} +4 -4
- package/lib/index.cjs +487 -200
- package/lib/index.cjs.map +1 -1
- package/lib/index.d.cts +207 -163
- package/lib/index.d.mts +207 -163
- package/lib/index.js.map +1 -1
- package/lib/index.mjs +488 -202
- package/lib/index.mjs.map +1 -1
- package/lib/styles.css +2 -2
- package/lib/use-media-query/use-media-query.cjs +1 -1
- package/lib/use-media-query/use-media-query.mjs +1 -1
- package/package.json +8 -6
- package/lib/_shared/cjs/capitalise-first-letter-CdhexpSx.cjs +0 -8
- package/lib/_shared/esm/capitalise-first-letter-Cubg2CS1.mjs +0 -6
package/lib/index.cjs
CHANGED
|
@@ -1664,7 +1664,7 @@ var Breadcrumbs = function (_a) {
|
|
|
1664
1664
|
window.removeEventListener("resize", handleResize);
|
|
1665
1665
|
handleResize.cancel();
|
|
1666
1666
|
};
|
|
1667
|
-
}, []);
|
|
1667
|
+
}, [children]);
|
|
1668
1668
|
var items = React.Children.toArray(children);
|
|
1669
1669
|
return (React.createElement("nav", __assign({ "aria-label": "Breadcrumbs", className: classNames({
|
|
1670
1670
|
"arc-Breadcrumbs": true,
|
|
@@ -2023,7 +2023,7 @@ function startOfMonth(dirtyDate) {
|
|
|
2023
2023
|
|
|
2024
2024
|
/**
|
|
2025
2025
|
* Do not edit directly
|
|
2026
|
-
* Generated on
|
|
2026
|
+
* Generated on Fri, 05 Dec 2025 13:50:26 GMT
|
|
2027
2027
|
*/
|
|
2028
2028
|
var ArcSizeBreakpointsXs = "320px";
|
|
2029
2029
|
var ArcSizeBreakpointsS = "636px";
|
|
@@ -2191,11 +2191,11 @@ var useMediaQuery = function (mediaQuery) {
|
|
|
2191
2191
|
return window.matchMedia(query).matches;
|
|
2192
2192
|
};
|
|
2193
2193
|
var _a = React.useState(false), matches = _a[0], setMatches = _a[1];
|
|
2194
|
-
// Handles the change event of the media query.
|
|
2195
|
-
var handleChange = function () {
|
|
2196
|
-
setMatches(getMatches(mediaQuery));
|
|
2197
|
-
};
|
|
2198
2194
|
React.useEffect(function () {
|
|
2195
|
+
// Handles the change event of the media query.
|
|
2196
|
+
var handleChange = function () {
|
|
2197
|
+
setMatches(getMatches(mediaQuery));
|
|
2198
|
+
};
|
|
2199
2199
|
var matchMedia = window.matchMedia(mediaQuery);
|
|
2200
2200
|
// Triggered at the first client-side load and if query changes
|
|
2201
2201
|
handleChange();
|
|
@@ -2807,9 +2807,9 @@ function subDays(dirtyDate, dirtyAmount) {
|
|
|
2807
2807
|
return addDays(dirtyDate, -amount);
|
|
2808
2808
|
}
|
|
2809
2809
|
|
|
2810
|
-
var defaultOptions$
|
|
2810
|
+
var defaultOptions$3 = {};
|
|
2811
2811
|
function getDefaultOptions() {
|
|
2812
|
-
return defaultOptions$
|
|
2812
|
+
return defaultOptions$3;
|
|
2813
2813
|
}
|
|
2814
2814
|
|
|
2815
2815
|
/**
|
|
@@ -6095,6 +6095,131 @@ var Calendar = function (_a) {
|
|
|
6095
6095
|
onCancelClick && (React.createElement(CalendarFooter, { onCancelClick: onCancelButtonClick }))))));
|
|
6096
6096
|
};
|
|
6097
6097
|
|
|
6098
|
+
const defaultOptions$2 = {
|
|
6099
|
+
active: true,
|
|
6100
|
+
breakpoints: {},
|
|
6101
|
+
snapped: 'is-snapped',
|
|
6102
|
+
inView: 'is-in-view',
|
|
6103
|
+
draggable: 'is-draggable',
|
|
6104
|
+
dragging: 'is-dragging',
|
|
6105
|
+
loop: 'is-loop'
|
|
6106
|
+
};
|
|
6107
|
+
|
|
6108
|
+
function normalizeClassNames(classNames) {
|
|
6109
|
+
const normalized = Array.isArray(classNames) ? classNames : [classNames];
|
|
6110
|
+
return normalized.filter(Boolean);
|
|
6111
|
+
}
|
|
6112
|
+
function removeClass(node, classNames) {
|
|
6113
|
+
if (!node || !classNames.length) return;
|
|
6114
|
+
node.classList.remove(...classNames);
|
|
6115
|
+
}
|
|
6116
|
+
function addClass(node, classNames) {
|
|
6117
|
+
if (!node || !classNames.length) return;
|
|
6118
|
+
node.classList.add(...classNames);
|
|
6119
|
+
}
|
|
6120
|
+
|
|
6121
|
+
function ClassNames(userOptions = {}) {
|
|
6122
|
+
let options;
|
|
6123
|
+
let emblaApi;
|
|
6124
|
+
let root;
|
|
6125
|
+
let slides;
|
|
6126
|
+
let snappedIndexes = [];
|
|
6127
|
+
let inViewIndexes = [];
|
|
6128
|
+
const selectedEvents = ['select'];
|
|
6129
|
+
const draggingEvents = ['pointerDown', 'pointerUp'];
|
|
6130
|
+
const inViewEvents = ['slidesInView'];
|
|
6131
|
+
const classNames = {
|
|
6132
|
+
snapped: [],
|
|
6133
|
+
inView: [],
|
|
6134
|
+
draggable: [],
|
|
6135
|
+
dragging: [],
|
|
6136
|
+
loop: []
|
|
6137
|
+
};
|
|
6138
|
+
function init(emblaApiInstance, optionsHandler) {
|
|
6139
|
+
emblaApi = emblaApiInstance;
|
|
6140
|
+
const {
|
|
6141
|
+
mergeOptions,
|
|
6142
|
+
optionsAtMedia
|
|
6143
|
+
} = optionsHandler;
|
|
6144
|
+
const optionsBase = mergeOptions(defaultOptions$2, ClassNames.globalOptions);
|
|
6145
|
+
const allOptions = mergeOptions(optionsBase, userOptions);
|
|
6146
|
+
options = optionsAtMedia(allOptions);
|
|
6147
|
+
root = emblaApi.rootNode();
|
|
6148
|
+
slides = emblaApi.slideNodes();
|
|
6149
|
+
const {
|
|
6150
|
+
watchDrag,
|
|
6151
|
+
loop
|
|
6152
|
+
} = emblaApi.internalEngine().options;
|
|
6153
|
+
const isDraggable = !!watchDrag;
|
|
6154
|
+
if (options.loop && loop) {
|
|
6155
|
+
classNames.loop = normalizeClassNames(options.loop);
|
|
6156
|
+
addClass(root, classNames.loop);
|
|
6157
|
+
}
|
|
6158
|
+
if (options.draggable && isDraggable) {
|
|
6159
|
+
classNames.draggable = normalizeClassNames(options.draggable);
|
|
6160
|
+
addClass(root, classNames.draggable);
|
|
6161
|
+
}
|
|
6162
|
+
if (options.dragging) {
|
|
6163
|
+
classNames.dragging = normalizeClassNames(options.dragging);
|
|
6164
|
+
draggingEvents.forEach(evt => emblaApi.on(evt, toggleDraggingClass));
|
|
6165
|
+
}
|
|
6166
|
+
if (options.snapped) {
|
|
6167
|
+
classNames.snapped = normalizeClassNames(options.snapped);
|
|
6168
|
+
selectedEvents.forEach(evt => emblaApi.on(evt, toggleSnappedClasses));
|
|
6169
|
+
toggleSnappedClasses();
|
|
6170
|
+
}
|
|
6171
|
+
if (options.inView) {
|
|
6172
|
+
classNames.inView = normalizeClassNames(options.inView);
|
|
6173
|
+
inViewEvents.forEach(evt => emblaApi.on(evt, toggleInViewClasses));
|
|
6174
|
+
toggleInViewClasses();
|
|
6175
|
+
}
|
|
6176
|
+
}
|
|
6177
|
+
function destroy() {
|
|
6178
|
+
draggingEvents.forEach(evt => emblaApi.off(evt, toggleDraggingClass));
|
|
6179
|
+
selectedEvents.forEach(evt => emblaApi.off(evt, toggleSnappedClasses));
|
|
6180
|
+
inViewEvents.forEach(evt => emblaApi.off(evt, toggleInViewClasses));
|
|
6181
|
+
removeClass(root, classNames.loop);
|
|
6182
|
+
removeClass(root, classNames.draggable);
|
|
6183
|
+
removeClass(root, classNames.dragging);
|
|
6184
|
+
toggleSlideClasses([], snappedIndexes, classNames.snapped);
|
|
6185
|
+
toggleSlideClasses([], inViewIndexes, classNames.inView);
|
|
6186
|
+
Object.keys(classNames).forEach(classNameKey => {
|
|
6187
|
+
const key = classNameKey;
|
|
6188
|
+
classNames[key] = [];
|
|
6189
|
+
});
|
|
6190
|
+
}
|
|
6191
|
+
function toggleDraggingClass(_, evt) {
|
|
6192
|
+
const toggleClass = evt === 'pointerDown' ? addClass : removeClass;
|
|
6193
|
+
toggleClass(root, classNames.dragging);
|
|
6194
|
+
}
|
|
6195
|
+
function toggleSlideClasses(addClassIndexes = [], removeClassIndexes = [], classNames) {
|
|
6196
|
+
const removeClassSlides = removeClassIndexes.map(index => slides[index]);
|
|
6197
|
+
const addClassSlides = addClassIndexes.map(index => slides[index]);
|
|
6198
|
+
removeClassSlides.forEach(slide => removeClass(slide, classNames));
|
|
6199
|
+
addClassSlides.forEach(slide => addClass(slide, classNames));
|
|
6200
|
+
return addClassIndexes;
|
|
6201
|
+
}
|
|
6202
|
+
function toggleSnappedClasses() {
|
|
6203
|
+
const {
|
|
6204
|
+
slideRegistry
|
|
6205
|
+
} = emblaApi.internalEngine();
|
|
6206
|
+
const newSnappedIndexes = slideRegistry[emblaApi.selectedScrollSnap()];
|
|
6207
|
+
snappedIndexes = toggleSlideClasses(newSnappedIndexes, snappedIndexes, classNames.snapped);
|
|
6208
|
+
}
|
|
6209
|
+
function toggleInViewClasses() {
|
|
6210
|
+
const newInViewIndexes = emblaApi.slidesInView();
|
|
6211
|
+
inViewIndexes = toggleSlideClasses(newInViewIndexes, inViewIndexes, classNames.inView);
|
|
6212
|
+
}
|
|
6213
|
+
const self = {
|
|
6214
|
+
name: 'classNames',
|
|
6215
|
+
options: userOptions,
|
|
6216
|
+
init,
|
|
6217
|
+
destroy
|
|
6218
|
+
};
|
|
6219
|
+
return self;
|
|
6220
|
+
}
|
|
6221
|
+
ClassNames.globalOptions = undefined;
|
|
6222
|
+
|
|
6098
6223
|
function isObject$1(subject) {
|
|
6099
6224
|
return Object.prototype.toString.call(subject) === '[object Object]';
|
|
6100
6225
|
}
|
|
@@ -7546,7 +7671,7 @@ function EventHandler() {
|
|
|
7546
7671
|
return self;
|
|
7547
7672
|
}
|
|
7548
7673
|
|
|
7549
|
-
const defaultOptions = {
|
|
7674
|
+
const defaultOptions$1 = {
|
|
7550
7675
|
align: 'center',
|
|
7551
7676
|
axis: 'x',
|
|
7552
7677
|
container: null,
|
|
@@ -7630,7 +7755,7 @@ function EmblaCarousel(root, userOptions, userPlugins) {
|
|
|
7630
7755
|
const reInit = reActivate;
|
|
7631
7756
|
let destroyed = false;
|
|
7632
7757
|
let engine;
|
|
7633
|
-
let optionsBase = mergeOptions(defaultOptions, EmblaCarousel.globalOptions);
|
|
7758
|
+
let optionsBase = mergeOptions(defaultOptions$1, EmblaCarousel.globalOptions);
|
|
7634
7759
|
let options = mergeOptions(optionsBase);
|
|
7635
7760
|
let pluginList = [];
|
|
7636
7761
|
let pluginApis;
|
|
@@ -7821,6 +7946,199 @@ function useEmblaCarousel(options = {}, plugins = []) {
|
|
|
7821
7946
|
}
|
|
7822
7947
|
useEmblaCarousel.globalOptions = undefined;
|
|
7823
7948
|
|
|
7949
|
+
const defaultOptions = {
|
|
7950
|
+
active: true,
|
|
7951
|
+
breakpoints: {},
|
|
7952
|
+
delay: 4000,
|
|
7953
|
+
jump: false,
|
|
7954
|
+
playOnInit: true,
|
|
7955
|
+
stopOnFocusIn: true,
|
|
7956
|
+
stopOnInteraction: true,
|
|
7957
|
+
stopOnMouseEnter: false,
|
|
7958
|
+
stopOnLastSnap: false,
|
|
7959
|
+
rootNode: null
|
|
7960
|
+
};
|
|
7961
|
+
|
|
7962
|
+
function normalizeDelay(emblaApi, delay) {
|
|
7963
|
+
const scrollSnaps = emblaApi.scrollSnapList();
|
|
7964
|
+
if (typeof delay === 'number') {
|
|
7965
|
+
return scrollSnaps.map(() => delay);
|
|
7966
|
+
}
|
|
7967
|
+
return delay(scrollSnaps, emblaApi);
|
|
7968
|
+
}
|
|
7969
|
+
function getAutoplayRootNode(emblaApi, rootNode) {
|
|
7970
|
+
const emblaRootNode = emblaApi.rootNode();
|
|
7971
|
+
return rootNode && rootNode(emblaRootNode) || emblaRootNode;
|
|
7972
|
+
}
|
|
7973
|
+
|
|
7974
|
+
function Autoplay(userOptions = {}) {
|
|
7975
|
+
let options;
|
|
7976
|
+
let emblaApi;
|
|
7977
|
+
let destroyed;
|
|
7978
|
+
let delay;
|
|
7979
|
+
let timerStartTime = null;
|
|
7980
|
+
let timerId = 0;
|
|
7981
|
+
let autoplayActive = false;
|
|
7982
|
+
let mouseIsOver = false;
|
|
7983
|
+
let playOnDocumentVisible = false;
|
|
7984
|
+
let jump = false;
|
|
7985
|
+
function init(emblaApiInstance, optionsHandler) {
|
|
7986
|
+
emblaApi = emblaApiInstance;
|
|
7987
|
+
const {
|
|
7988
|
+
mergeOptions,
|
|
7989
|
+
optionsAtMedia
|
|
7990
|
+
} = optionsHandler;
|
|
7991
|
+
const optionsBase = mergeOptions(defaultOptions, Autoplay.globalOptions);
|
|
7992
|
+
const allOptions = mergeOptions(optionsBase, userOptions);
|
|
7993
|
+
options = optionsAtMedia(allOptions);
|
|
7994
|
+
if (emblaApi.scrollSnapList().length <= 1) return;
|
|
7995
|
+
jump = options.jump;
|
|
7996
|
+
destroyed = false;
|
|
7997
|
+
delay = normalizeDelay(emblaApi, options.delay);
|
|
7998
|
+
const {
|
|
7999
|
+
eventStore,
|
|
8000
|
+
ownerDocument
|
|
8001
|
+
} = emblaApi.internalEngine();
|
|
8002
|
+
const isDraggable = !!emblaApi.internalEngine().options.watchDrag;
|
|
8003
|
+
const root = getAutoplayRootNode(emblaApi, options.rootNode);
|
|
8004
|
+
eventStore.add(ownerDocument, 'visibilitychange', visibilityChange);
|
|
8005
|
+
if (isDraggable) {
|
|
8006
|
+
emblaApi.on('pointerDown', pointerDown);
|
|
8007
|
+
}
|
|
8008
|
+
if (isDraggable && !options.stopOnInteraction) {
|
|
8009
|
+
emblaApi.on('pointerUp', pointerUp);
|
|
8010
|
+
}
|
|
8011
|
+
if (options.stopOnMouseEnter) {
|
|
8012
|
+
eventStore.add(root, 'mouseenter', mouseEnter);
|
|
8013
|
+
}
|
|
8014
|
+
if (options.stopOnMouseEnter && !options.stopOnInteraction) {
|
|
8015
|
+
eventStore.add(root, 'mouseleave', mouseLeave);
|
|
8016
|
+
}
|
|
8017
|
+
if (options.stopOnFocusIn) {
|
|
8018
|
+
emblaApi.on('slideFocusStart', stopAutoplay);
|
|
8019
|
+
}
|
|
8020
|
+
if (options.stopOnFocusIn && !options.stopOnInteraction) {
|
|
8021
|
+
eventStore.add(emblaApi.containerNode(), 'focusout', startAutoplay);
|
|
8022
|
+
}
|
|
8023
|
+
if (options.playOnInit) startAutoplay();
|
|
8024
|
+
}
|
|
8025
|
+
function destroy() {
|
|
8026
|
+
emblaApi.off('pointerDown', pointerDown).off('pointerUp', pointerUp).off('slideFocusStart', stopAutoplay);
|
|
8027
|
+
stopAutoplay();
|
|
8028
|
+
destroyed = true;
|
|
8029
|
+
autoplayActive = false;
|
|
8030
|
+
}
|
|
8031
|
+
function setTimer() {
|
|
8032
|
+
const {
|
|
8033
|
+
ownerWindow
|
|
8034
|
+
} = emblaApi.internalEngine();
|
|
8035
|
+
ownerWindow.clearTimeout(timerId);
|
|
8036
|
+
timerId = ownerWindow.setTimeout(next, delay[emblaApi.selectedScrollSnap()]);
|
|
8037
|
+
timerStartTime = new Date().getTime();
|
|
8038
|
+
emblaApi.emit('autoplay:timerset');
|
|
8039
|
+
}
|
|
8040
|
+
function clearTimer() {
|
|
8041
|
+
const {
|
|
8042
|
+
ownerWindow
|
|
8043
|
+
} = emblaApi.internalEngine();
|
|
8044
|
+
ownerWindow.clearTimeout(timerId);
|
|
8045
|
+
timerId = 0;
|
|
8046
|
+
timerStartTime = null;
|
|
8047
|
+
emblaApi.emit('autoplay:timerstopped');
|
|
8048
|
+
}
|
|
8049
|
+
function startAutoplay() {
|
|
8050
|
+
if (destroyed) return;
|
|
8051
|
+
if (documentIsHidden()) {
|
|
8052
|
+
playOnDocumentVisible = true;
|
|
8053
|
+
return;
|
|
8054
|
+
}
|
|
8055
|
+
if (!autoplayActive) emblaApi.emit('autoplay:play');
|
|
8056
|
+
setTimer();
|
|
8057
|
+
autoplayActive = true;
|
|
8058
|
+
}
|
|
8059
|
+
function stopAutoplay() {
|
|
8060
|
+
if (destroyed) return;
|
|
8061
|
+
if (autoplayActive) emblaApi.emit('autoplay:stop');
|
|
8062
|
+
clearTimer();
|
|
8063
|
+
autoplayActive = false;
|
|
8064
|
+
}
|
|
8065
|
+
function visibilityChange() {
|
|
8066
|
+
if (documentIsHidden()) {
|
|
8067
|
+
playOnDocumentVisible = autoplayActive;
|
|
8068
|
+
return stopAutoplay();
|
|
8069
|
+
}
|
|
8070
|
+
if (playOnDocumentVisible) startAutoplay();
|
|
8071
|
+
}
|
|
8072
|
+
function documentIsHidden() {
|
|
8073
|
+
const {
|
|
8074
|
+
ownerDocument
|
|
8075
|
+
} = emblaApi.internalEngine();
|
|
8076
|
+
return ownerDocument.visibilityState === 'hidden';
|
|
8077
|
+
}
|
|
8078
|
+
function pointerDown() {
|
|
8079
|
+
if (!mouseIsOver) stopAutoplay();
|
|
8080
|
+
}
|
|
8081
|
+
function pointerUp() {
|
|
8082
|
+
if (!mouseIsOver) startAutoplay();
|
|
8083
|
+
}
|
|
8084
|
+
function mouseEnter() {
|
|
8085
|
+
mouseIsOver = true;
|
|
8086
|
+
stopAutoplay();
|
|
8087
|
+
}
|
|
8088
|
+
function mouseLeave() {
|
|
8089
|
+
mouseIsOver = false;
|
|
8090
|
+
startAutoplay();
|
|
8091
|
+
}
|
|
8092
|
+
function play(jumpOverride) {
|
|
8093
|
+
if (typeof jumpOverride !== 'undefined') jump = jumpOverride;
|
|
8094
|
+
startAutoplay();
|
|
8095
|
+
}
|
|
8096
|
+
function stop() {
|
|
8097
|
+
if (autoplayActive) stopAutoplay();
|
|
8098
|
+
}
|
|
8099
|
+
function reset() {
|
|
8100
|
+
if (autoplayActive) startAutoplay();
|
|
8101
|
+
}
|
|
8102
|
+
function isPlaying() {
|
|
8103
|
+
return autoplayActive;
|
|
8104
|
+
}
|
|
8105
|
+
function next() {
|
|
8106
|
+
const {
|
|
8107
|
+
index
|
|
8108
|
+
} = emblaApi.internalEngine();
|
|
8109
|
+
const nextIndex = index.clone().add(1).get();
|
|
8110
|
+
const lastIndex = emblaApi.scrollSnapList().length - 1;
|
|
8111
|
+
const kill = options.stopOnLastSnap && nextIndex === lastIndex;
|
|
8112
|
+
if (emblaApi.canScrollNext()) {
|
|
8113
|
+
emblaApi.scrollNext(jump);
|
|
8114
|
+
} else {
|
|
8115
|
+
emblaApi.scrollTo(0, jump);
|
|
8116
|
+
}
|
|
8117
|
+
emblaApi.emit('autoplay:select');
|
|
8118
|
+
if (kill) return stopAutoplay();
|
|
8119
|
+
startAutoplay();
|
|
8120
|
+
}
|
|
8121
|
+
function timeUntilNext() {
|
|
8122
|
+
if (!timerStartTime) return null;
|
|
8123
|
+
const currentDelay = delay[emblaApi.selectedScrollSnap()];
|
|
8124
|
+
const timePastSinceStart = new Date().getTime() - timerStartTime;
|
|
8125
|
+
return currentDelay - timePastSinceStart;
|
|
8126
|
+
}
|
|
8127
|
+
const self = {
|
|
8128
|
+
name: 'autoplay',
|
|
8129
|
+
options: userOptions,
|
|
8130
|
+
init,
|
|
8131
|
+
destroy,
|
|
8132
|
+
play,
|
|
8133
|
+
stop,
|
|
8134
|
+
reset,
|
|
8135
|
+
isPlaying,
|
|
8136
|
+
timeUntilNext
|
|
8137
|
+
};
|
|
8138
|
+
return self;
|
|
8139
|
+
}
|
|
8140
|
+
Autoplay.globalOptions = undefined;
|
|
8141
|
+
|
|
7824
8142
|
var XS_BREAKPOINT = "(min-width: ".concat(ArcSizeBreakpointsXs, ")");
|
|
7825
8143
|
var S_BREAKPOINT = "(min-width: ".concat(ArcSizeBreakpointsS, ")");
|
|
7826
8144
|
var M_BREAKPOINT = "(min-width: ".concat(ArcSizeBreakpointsM, ")");
|
|
@@ -7895,9 +8213,29 @@ var KeyNames;
|
|
|
7895
8213
|
})(KeyNames || (KeyNames = {}));
|
|
7896
8214
|
|
|
7897
8215
|
var Carousel = function (_a) {
|
|
7898
|
-
var children = _a.children, responsive = _a.responsive, _b = _a.itemsToScroll, itemsToScroll = _b === void 0 ? 1 : _b, _c = _a.itemsPerSlide, itemsPerSlide = _c === void 0 ? 1 : _c, _d = _a.withGutter, withGutter = _d === void 0 ? true : _d, _e = _a.loop, loop = _e === void 0 ? false : _e, _f = _a.isPartialVisible, isPartialVisible = _f === void 0 ? false : _f;
|
|
8216
|
+
var children = _a.children, responsive = _a.responsive, _b = _a.itemsToScroll, itemsToScroll = _b === void 0 ? 1 : _b, _c = _a.itemsPerSlide, itemsPerSlide = _c === void 0 ? 1 : _c, _d = _a.withGutter, withGutter = _d === void 0 ? true : _d, _e = _a.loop, loop = _e === void 0 ? false : _e, _f = _a.isPartialVisible, isPartialVisible = _f === void 0 ? false : _f, autoplay = _a.autoplay, isPlaying = _a.isPlaying, fade = _a.fade;
|
|
7899
8217
|
var id = React.useId();
|
|
7900
|
-
var
|
|
8218
|
+
var autoPlayOptions = autoplay
|
|
8219
|
+
? __assign({ playOnInit: true, delay: 3000, stopOnInteraction: true, stopOnMouseEnter: false, stopOnFocusIn: true, stopOnLastSnap: false }, autoplay) : undefined;
|
|
8220
|
+
var _g = useEmblaCarousel(__assign(__assign({}, getOptions(itemsToScroll, loop, responsive)), (fade ? { inViewThreshold: 0.74 } : {})), __spreadArray(__spreadArray([], (autoPlayOptions ? [Autoplay(autoPlayOptions)] : []), true), (fade
|
|
8221
|
+
? [
|
|
8222
|
+
ClassNames({
|
|
8223
|
+
inView: "arc-Carousel-slide--isInView",
|
|
8224
|
+
}),
|
|
8225
|
+
]
|
|
8226
|
+
: []), true)), emblaRef = _g[0], emblaApi = _g[1];
|
|
8227
|
+
React.useEffect(function () {
|
|
8228
|
+
var _a;
|
|
8229
|
+
if (!emblaApi || !autoplay)
|
|
8230
|
+
return;
|
|
8231
|
+
var autoplayPlugin = (_a = emblaApi === null || emblaApi === void 0 ? void 0 : emblaApi.plugins()) === null || _a === void 0 ? void 0 : _a.autoplay;
|
|
8232
|
+
if (isPlaying) {
|
|
8233
|
+
autoplayPlugin.play();
|
|
8234
|
+
}
|
|
8235
|
+
if (isPlaying == false) {
|
|
8236
|
+
autoplayPlugin.stop();
|
|
8237
|
+
}
|
|
8238
|
+
}, [emblaApi, isPlaying, autoplay]);
|
|
7901
8239
|
var _h = React.useState(), dotButtonFocusIndex = _h[0], setCarouselDotButtonFocusIndex = _h[1];
|
|
7902
8240
|
var prevButtonRef = React.useRef(null);
|
|
7903
8241
|
var _j = React.useState(0), visibleSlideIndex = _j[0], setVisibleSlideIndex = _j[1];
|
|
@@ -7975,7 +8313,9 @@ var Carousel = function (_a) {
|
|
|
7975
8313
|
React.createElement("div", { ref: emblaRef, className: classNames("arc-Carousel-viewport", {
|
|
7976
8314
|
"arc-Carousel-viewport--gutter": withGutter,
|
|
7977
8315
|
}) },
|
|
7978
|
-
React.createElement("div", { className: "arc-Carousel-slider", role: "region", "aria-roledescription": "carousel" }, React.Children.map(children, function (child, i) { return (React.createElement("div", { onKeyDown: onSlideKeyDown, style: { flex: "0 0 ".concat(slideWidth, "%"), width: "".concat(slideWidth, "%") }, className: "arc-Carousel-slide",
|
|
8316
|
+
React.createElement("div", { className: "arc-Carousel-slider", role: "region", "aria-roledescription": "carousel" }, React.Children.map(children, function (child, i) { return (React.createElement("div", { onKeyDown: onSlideKeyDown, style: { flex: "0 0 ".concat(slideWidth, "%"), width: "".concat(slideWidth, "%") }, className: classNames("arc-Carousel-slide", {
|
|
8317
|
+
"arc-Carousel-slide--fade": fade,
|
|
8318
|
+
}), key: "".concat(id, "-option-").concat(i), role: "group", "aria-roledescription": "slide" }, child)); })))),
|
|
7979
8319
|
React.createElement("div", { className: "arc-Carousel-nav" },
|
|
7980
8320
|
React.createElement("button", { "data-testid": "previous-button", ref: prevButtonRef, className: classNames("arc-Carousel-navButton", {
|
|
7981
8321
|
"arc-Carousel-navButton--hidden": !prevButtonEnabled,
|
|
@@ -13909,13 +14249,6 @@ var ContentSwitcherList = function (_a) {
|
|
|
13909
14249
|
var _d = React.useState(0), contentSwitcherListWidth = _d[0], setContentSwitcherListWidth = _d[1];
|
|
13910
14250
|
var tabRefs = React.useRef([]);
|
|
13911
14251
|
var listRef = React.useRef(null);
|
|
13912
|
-
var checkOverflow = function () {
|
|
13913
|
-
if (listRef.current) {
|
|
13914
|
-
setRightOverflow(listRef.current.scrollLeft + listRef.current.clientWidth <
|
|
13915
|
-
listRef.current.scrollWidth - 1);
|
|
13916
|
-
setLeftOverflow(listRef.current.scrollLeft > 0);
|
|
13917
|
-
}
|
|
13918
|
-
};
|
|
13919
14252
|
var scrollTabIntoView = function (tabRef) {
|
|
13920
14253
|
if (tabRef.current && listRef.current) {
|
|
13921
14254
|
var scrollLeft = tabRef.current.offsetLeft -
|
|
@@ -13934,6 +14267,13 @@ var ContentSwitcherList = function (_a) {
|
|
|
13934
14267
|
}, 100);
|
|
13935
14268
|
React.useEffect(function () {
|
|
13936
14269
|
var list = listRef.current;
|
|
14270
|
+
var checkOverflow = function () {
|
|
14271
|
+
if (listRef.current) {
|
|
14272
|
+
setRightOverflow(listRef.current.scrollLeft + listRef.current.clientWidth <
|
|
14273
|
+
listRef.current.scrollWidth - 1);
|
|
14274
|
+
setLeftOverflow(listRef.current.scrollLeft > 0);
|
|
14275
|
+
}
|
|
14276
|
+
};
|
|
13937
14277
|
var updateLayout = function () {
|
|
13938
14278
|
checkOverflow();
|
|
13939
14279
|
handleResize();
|
|
@@ -13951,7 +14291,7 @@ var ContentSwitcherList = function (_a) {
|
|
|
13951
14291
|
window.removeEventListener("resize", updateLayout);
|
|
13952
14292
|
handleResize.cancel();
|
|
13953
14293
|
};
|
|
13954
|
-
}, [children,
|
|
14294
|
+
}, [children, handleResize]);
|
|
13955
14295
|
return (React.createElement("span", { className: classNames("arc-ContentSwitcherList-wrapper", {
|
|
13956
14296
|
"arc-ContentSwitcherList-wrapper--isInset": isInset,
|
|
13957
14297
|
}), tabIndex: -1 },
|
|
@@ -17099,7 +17439,7 @@ var DatePickerRange = function (_a) {
|
|
|
17099
17439
|
if (inputEnd.value !== undefined && inputEnd.value !== endValue) {
|
|
17100
17440
|
setEndValue(inputEnd.value);
|
|
17101
17441
|
}
|
|
17102
|
-
}, [inputStart.value, inputEnd.value]);
|
|
17442
|
+
}, [inputStart.value, inputEnd.value, endValue, startValue]);
|
|
17103
17443
|
var handleIconClick = function (_a) {
|
|
17104
17444
|
var ref = _a.ref, isDisabled = _a.isDisabled, isReadOnly = _a.isReadOnly, input = _a.input;
|
|
17105
17445
|
if (ref &&
|
|
@@ -18331,7 +18671,7 @@ var InformationCard = function (_a) {
|
|
|
18331
18671
|
window.removeEventListener("resize", checkMinHeight);
|
|
18332
18672
|
checkMinHeight.cancel();
|
|
18333
18673
|
};
|
|
18334
|
-
}, [minHeights,
|
|
18674
|
+
}, [minHeights, checkMinHeight]);
|
|
18335
18675
|
return (React.createElement("div", __assign({ style: { minHeight: minHeight ? minHeight : minimumHeight }, className: classNames("arc-InformationCard", {
|
|
18336
18676
|
"arc-InformationCard--isALink": cardUrl,
|
|
18337
18677
|
"arc-InformationCard--outlined": cardUrl && showHoverState,
|
|
@@ -20460,11 +20800,6 @@ function requireMiniSvgDataUri () {
|
|
|
20460
20800
|
var miniSvgDataUriExports = requireMiniSvgDataUri();
|
|
20461
20801
|
var svgToMiniDataURI = /*@__PURE__*/getDefaultExportFromCjs(miniSvgDataUriExports);
|
|
20462
20802
|
|
|
20463
|
-
// src/capitalise-first-letter/capitalise-first-letter.ts
|
|
20464
|
-
var capitaliseFirstLetter = (word) => {
|
|
20465
|
-
return word.charAt(0).toUpperCase() + word.slice(1);
|
|
20466
|
-
};
|
|
20467
|
-
|
|
20468
20803
|
var Error$1 = "\n <svg fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n <g clipPath=\"url(#a)\">\n <path\n 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\"\n fill=\"currentColor\"\n />\n </g>\n <defs>\n <clipPath id=\"a\">\n <rect width=\"24\" height=\"24\" rx=\"12\" />\n </clipPath>\n </defs>\n </svg>\n ";
|
|
20469
20804
|
|
|
20470
20805
|
var Warning = "\n <svg fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n <path\n 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\"\n fill=\"currentColor\"\n stroke=\"currentColor\"\n strokeWidth=\".3\"\n />\n </svg>\n";
|
|
@@ -20475,7 +20810,8 @@ var Current = "\n <svg viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w
|
|
|
20475
20810
|
|
|
20476
20811
|
var ProgressStepperItem = function (_a) {
|
|
20477
20812
|
var _b;
|
|
20478
|
-
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, invertLabelPosition = _a.invertLabelPosition, 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", "invertLabelPosition", "ariaLabel", "onClick", "previousStep", "stepContent", "isStepContentHidden"]);
|
|
20813
|
+
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, invertLabelPosition = _a.invertLabelPosition, ariaLabel = _a.ariaLabel, onClick = _a.onClick, previousStep = _a.previousStep, stepContent = _a.stepContent, isStepContentHidden = _a.isStepContentHidden, isViewing = _a.isViewing, props = __rest(_a, ["title", "titleHref", "subTitle", "direction", "status", "size", "isFluid", "invertLabelPosition", "ariaLabel", "onClick", "previousStep", "stepContent", "isStepContentHidden", "isViewing"]);
|
|
20814
|
+
var id = React.useId();
|
|
20479
20815
|
var statusIcons = {
|
|
20480
20816
|
todo: undefined,
|
|
20481
20817
|
completed: Complete,
|
|
@@ -20488,181 +20824,137 @@ var ProgressStepperItem = function (_a) {
|
|
|
20488
20824
|
onClick && onClick();
|
|
20489
20825
|
};
|
|
20490
20826
|
var statusIcon = statusIcons[status];
|
|
20491
|
-
|
|
20827
|
+
var accessibleStatusLabel = "".concat(status === "todo" ? "to do" : status).concat(isViewing ? " - currently viewing" : "");
|
|
20828
|
+
return (React.createElement("li", __assign({ "data-progress-stepper-item-id": id, className: classNames("arc-ProgressStepperItem", "arc-ProgressStepperItem--".concat(status), "arc-ProgressStepperItem--".concat(size), (_b = {
|
|
20492
20829
|
"arc-ProgressStepperItem--vertical": direction === "vertical",
|
|
20493
20830
|
"arc-ProgressStepperItem--isFluid": isFluid && direction !== "vertical",
|
|
20494
20831
|
"arc-ProgressStepperItem--previousStepCompleted": previousStep === "completed"
|
|
20495
20832
|
},
|
|
20496
|
-
_b["arc-ProgressStepperItem--hasInteractiveStatus"] = status !== "todo",
|
|
20833
|
+
_b["arc-ProgressStepperItem--hasInteractiveStatus"] = onClick || titleHref || status !== "todo",
|
|
20497
20834
|
_b["arc-ProgressStepperItem--invertLabelPosition"] = direction !== "vertical" && invertLabelPosition,
|
|
20498
20835
|
_b)) }, filterAttrs(props)),
|
|
20499
20836
|
React.createElement("div", { className: "arc-ProgressStepperItem-iconSection" },
|
|
20500
20837
|
React.createElement("div", { className: "arc-ProgressStepperItem-iconWrapper", "data-testid": "arc-ProgressStepperItem-iconWrapper" },
|
|
20501
20838
|
React.createElement("span", { className: classNames("arc-ProgressStepperItem-statusIcon", {
|
|
20502
20839
|
"arc-ProgressStepperItem-statusIcon--small": size === "small",
|
|
20503
|
-
}) },
|
|
20840
|
+
}) },
|
|
20841
|
+
status === "todo" && !isViewing ? null : isViewing ? (React.createElement("div", { className: "arc-ProgressStepperItem-statusIconInner" })) : (status !== "current" && (React.createElement(Icon$1, { icon: statusIcon && svgToMiniDataURI(statusIcon) }))),
|
|
20842
|
+
status === "current" && isViewing === undefined ? (React.createElement(Icon$1, { icon: statusIcon && svgToMiniDataURI(statusIcon) })) : null))),
|
|
20504
20843
|
React.createElement("div", { className: "arc-ProgressStepperItem-textSection" },
|
|
20505
|
-
titleHref || onClick
|
|
20506
|
-
|
|
20507
|
-
|
|
20508
|
-
|
|
20509
|
-
|
|
20510
|
-
|
|
20511
|
-
|
|
20512
|
-
":",
|
|
20513
|
-
capitaliseFirstLetter(status))) : (React.createElement(VisuallyHidden$2, null, ":To do")))),
|
|
20514
|
-
React.createElement("div", { className: "arc-ProgressStepperItem-subTitle" }, subTitle),
|
|
20844
|
+
React.createElement(ConditionalWrapper, { condition: Boolean(titleHref || onClick), wrapper: function (children) { return (React.createElement("a", { role: !titleHref && onClick ? "button" : undefined, href: titleHref, className: classNames("arc-ProgressStepperItem-title", "arc-ProgressStepperItem-title--link"), onClick: onClickHandler, "aria-label": ariaLabel ||
|
|
20845
|
+
(status !== "current"
|
|
20846
|
+
? "".concat(title, ", ").concat(accessibleStatusLabel)
|
|
20847
|
+
: undefined), "aria-current": status === "current" && "step" }, children)); }, fallback: function (children) { return (React.createElement("div", { className: "arc-ProgressStepperItem-title" },
|
|
20848
|
+
children,
|
|
20849
|
+
React.createElement(VisuallyHidden$2, null, " - ".concat(accessibleStatusLabel)))); } }, title),
|
|
20850
|
+
subTitle && (React.createElement("div", { className: "arc-ProgressStepperItem-subTitle" }, subTitle)),
|
|
20515
20851
|
stepContent && !isStepContentHidden && direction === "vertical" && (React.createElement(React.Fragment, null,
|
|
20516
20852
|
React.createElement("div", { className: "arc-ProgressStepperItem-nodeItem" }, stepContent))))));
|
|
20517
20853
|
};
|
|
20518
20854
|
|
|
20519
20855
|
/** Use `ProgressStepper` to provide an overview of a series of steps in a digital journey. */
|
|
20520
|
-
var ProgressStepper = function (_a) {
|
|
20521
|
-
var children = _a.children, size = _a.size, isFluid = _a.isFluid, direction = _a.direction, isExpandable = _a.isExpandable, invertLabelPosition = _a.invertLabelPosition,
|
|
20856
|
+
var ProgressStepper = React.forwardRef(function (_a, ref) {
|
|
20857
|
+
var children = _a.children, size = _a.size, isFluid = _a.isFluid, direction = _a.direction, isExpandable = _a.isExpandable, invertLabelPosition = _a.invertLabelPosition, currentStep = _a.currentStep, props = __rest(_a, ["children", "size", "isFluid", "direction", "isExpandable", "invertLabelPosition", "currentStep"]);
|
|
20522
20858
|
var items = React.Children.toArray(children);
|
|
20523
20859
|
var getStepStatus = function (item) {
|
|
20524
20860
|
var _a;
|
|
20525
20861
|
return (_a = item === null || item === void 0 ? void 0 : item.props) === null || _a === void 0 ? void 0 : _a.status;
|
|
20526
20862
|
};
|
|
20527
|
-
return (React.createElement("
|
|
20863
|
+
return (React.createElement("ol", __assign({ ref: ref, className: classNames("arc-ProgressStepper", {
|
|
20528
20864
|
"arc-ProgressStepper--vertical": direction === "vertical",
|
|
20529
20865
|
}) }, filterAttrs(props)), items.map(function (item, index) { return (React.createElement(React.Fragment, { key: "StepperItem-".concat(index) },
|
|
20530
|
-
React.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, invertLabelPosition: invertLabelPosition, direction: direction, isExpandable: isExpandable, size: size, previousStep: getStepStatus(items[index - 1]) }, filterAttrs(item.props))))); })));
|
|
20531
|
-
};
|
|
20866
|
+
React.createElement(ProgressStepperItem, __assign({ title: item.props.title, titleHref: item.props.titleHref, subTitle: item.props.subTitle, status: item.props.status, stepContent: item.props.stepContent, ariaLabel: item.props.ariaLabel, isStepContentHidden: item.props.isStepContentHidden, onClick: item.props.onClick, isFluid: isFluid, invertLabelPosition: invertLabelPosition, direction: direction, isExpandable: isExpandable, size: size, isViewing: currentStep !== undefined ? currentStep === index : undefined, previousStep: getStepStatus(items[index - 1]) }, filterAttrs(item.props))))); })));
|
|
20867
|
+
});
|
|
20532
20868
|
|
|
20533
20869
|
/** Use `ProgressStepperOverflow` to wrap `ProgressStepperItem`s and allow overflow behaviour. */
|
|
20534
|
-
var ProgressStepperOverflow = React.forwardRef(function (_a,
|
|
20535
|
-
var children = _a.children,
|
|
20536
|
-
|
|
20537
|
-
|
|
20538
|
-
|
|
20539
|
-
|
|
20540
|
-
|
|
20541
|
-
|
|
20542
|
-
|
|
20543
|
-
|
|
20544
|
-
isLastChildVisible: isLastChildVisible,
|
|
20545
|
-
}); });
|
|
20546
|
-
// Add Horizontal Scroll Event Listener
|
|
20870
|
+
var ProgressStepperOverflow = React.forwardRef(function (_a, ref) {
|
|
20871
|
+
var children = _a.children, size = _a.size, invertLabelPosition = _a.invertLabelPosition, _b = _a.offsetLeft, offsetLeft = _b === void 0 ? 24 : _b, props = __rest(_a, ["children", "size", "invertLabelPosition", "offsetLeft"]);
|
|
20872
|
+
return (React.createElement("div", __assign({ className: "arc-ProgressStepperOverflow", style: { paddingLeft: offsetLeft } }, filterAttrs(props)),
|
|
20873
|
+
React.createElement(ProgressStepper, { ref: ref, size: size, invertLabelPosition: invertLabelPosition, isFluid: false }, children)));
|
|
20874
|
+
});
|
|
20875
|
+
|
|
20876
|
+
var useProgressStepperOverflow = function (_a) {
|
|
20877
|
+
var _b = _a === void 0 ? {} : _a, onLoadStep = _b.onLoadStep, _c = _b.increment, increment = _c === void 0 ? 1 : _c, _d = _b.offsetLeft, offsetLeft = _d === void 0 ? 24 : _d;
|
|
20878
|
+
var stepperRef = React.useRef(null);
|
|
20879
|
+
var _e = React.useState({}), itemVisibility = _e[0], setItemVisibility = _e[1];
|
|
20547
20880
|
React.useEffect(function () {
|
|
20548
20881
|
var _a, _b;
|
|
20549
|
-
var
|
|
20550
|
-
|
|
20551
|
-
|
|
20552
|
-
|
|
20553
|
-
|
|
20554
|
-
|
|
20555
|
-
|
|
20556
|
-
|
|
20557
|
-
}
|
|
20558
|
-
|
|
20559
|
-
|
|
20560
|
-
|
|
20561
|
-
|
|
20562
|
-
(
|
|
20563
|
-
return function () {
|
|
20564
|
-
var _a;
|
|
20565
|
-
(_a = containerRef.current) === null || _a === void 0 ? void 0 : _a.removeEventListener("scroll", checkClosest);
|
|
20566
|
-
checkLastChild.cancel();
|
|
20567
|
-
};
|
|
20882
|
+
var el = (_a = stepperRef.current) === null || _a === void 0 ? void 0 : _a.parentElement;
|
|
20883
|
+
var stepperItems = Array.from(((_b = stepperRef.current) === null || _b === void 0 ? void 0 : _b.children) || []);
|
|
20884
|
+
var observer = new IntersectionObserver(function (entries) {
|
|
20885
|
+
var newEntries = entries.reduce(function (acc, entry) {
|
|
20886
|
+
var _a;
|
|
20887
|
+
var el = entry.target;
|
|
20888
|
+
return __assign(__assign({}, acc), (_a = {}, _a["".concat(el.dataset.progressStepperItemId)] = entry.intersectionRatio, _a));
|
|
20889
|
+
}, {});
|
|
20890
|
+
setItemVisibility(function (current) { return (__assign(__assign({}, current), newEntries)); });
|
|
20891
|
+
}, {
|
|
20892
|
+
root: el,
|
|
20893
|
+
threshold: [0, 0.25, 0.5, 0.75, 1],
|
|
20894
|
+
});
|
|
20895
|
+
stepperItems.forEach(function (item) { return observer.observe(item); });
|
|
20896
|
+
return function () { return observer.disconnect(); };
|
|
20568
20897
|
}, []);
|
|
20569
|
-
// Scroll to activeIndex
|
|
20570
|
-
React.useEffect(function () {
|
|
20571
|
-
scrollTo();
|
|
20572
|
-
}, [activeIndex]);
|
|
20573
|
-
// Exposing changes in activeIndex outside of component
|
|
20574
20898
|
React.useEffect(function () {
|
|
20575
|
-
onIndexChange === null || onIndexChange === void 0 ? void 0 : onIndexChange(closestScrolledIndex);
|
|
20576
|
-
isLastChildVisible();
|
|
20577
|
-
}, [closestScrolledIndex, onIndexChange, lastStepVisible]);
|
|
20578
|
-
// helper functions - start
|
|
20579
|
-
var getProgressStepper = function () { var _a; return (_a = containerRef.current) === null || _a === void 0 ? void 0 : _a.firstChild; };
|
|
20580
|
-
var getStepChildren = function () {
|
|
20581
|
-
var _a;
|
|
20582
|
-
return Array.from(((_a = getProgressStepper()) === null || _a === void 0 ? void 0 : _a.children) || []);
|
|
20583
|
-
};
|
|
20584
|
-
var getLeftRects = function (children) {
|
|
20585
|
-
var container = getProgressStepper();
|
|
20586
|
-
if (!container)
|
|
20587
|
-
return [];
|
|
20588
|
-
var parentRect = container.getBoundingClientRect();
|
|
20589
|
-
return children.map(function (child) {
|
|
20590
|
-
var childRect = child.getBoundingClientRect();
|
|
20591
|
-
return {
|
|
20592
|
-
left: childRect.left - parentRect.left,
|
|
20593
|
-
};
|
|
20594
|
-
});
|
|
20595
|
-
};
|
|
20596
|
-
var indexOfClosest = function (values) {
|
|
20597
|
-
return values.indexOf(Math.min.apply(Math, values));
|
|
20598
|
-
};
|
|
20599
|
-
// helper functions - end
|
|
20600
|
-
var isLastChildVisible = function () {
|
|
20601
|
-
var _a;
|
|
20602
|
-
var steps = getStepChildren();
|
|
20603
|
-
var lastStep = steps[steps.length - 1];
|
|
20604
|
-
var rect = lastStep.getBoundingClientRect();
|
|
20605
|
-
var containerRect = (_a = containerRef.current) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
|
|
20606
|
-
return rect.right <= containerRect.right;
|
|
20607
|
-
};
|
|
20608
|
-
// Used for onScroll function of scrolling without buttons
|
|
20609
|
-
var findClosestIndex = function () {
|
|
20610
20899
|
var _a, _b;
|
|
20611
|
-
|
|
20612
|
-
|
|
20613
|
-
|
|
20614
|
-
|
|
20615
|
-
|
|
20616
|
-
|
|
20617
|
-
});
|
|
20618
|
-
};
|
|
20619
|
-
var closestIndex = indexOfClosest(getScrollDistances(children, scrolledAmount));
|
|
20620
|
-
return closestIndex;
|
|
20621
|
-
};
|
|
20622
|
-
// Scroll active step to the far left of the page
|
|
20623
|
-
var scrollTo = function () {
|
|
20624
|
-
var _a, _b;
|
|
20625
|
-
var activeStep = (_a = getProgressStepper()) === null || _a === void 0 ? void 0 : _a.children[activeIndex];
|
|
20626
|
-
if (activeStep) {
|
|
20627
|
-
(_b = containerRef.current) === null || _b === void 0 ? void 0 : _b.scrollTo({
|
|
20628
|
-
left: activeStep.offsetLeft - offsetLeft,
|
|
20900
|
+
if (onLoadStep) {
|
|
20901
|
+
var container = (_a = stepperRef.current) === null || _a === void 0 ? void 0 : _a.parentElement;
|
|
20902
|
+
var stepperItems = Array.from(((_b = stepperRef.current) === null || _b === void 0 ? void 0 : _b.children) || []);
|
|
20903
|
+
var itemToScrollTo = stepperItems[Math.max(0, onLoadStep)];
|
|
20904
|
+
container === null || container === void 0 ? void 0 : container.scrollTo({
|
|
20905
|
+
left: itemToScrollTo.offsetLeft - offsetLeft,
|
|
20629
20906
|
behavior: "smooth",
|
|
20630
20907
|
});
|
|
20631
20908
|
}
|
|
20909
|
+
}, [onLoadStep, offsetLeft]);
|
|
20910
|
+
var _f = React.useMemo(function () {
|
|
20911
|
+
var visibilityRatios = Object.values(itemVisibility);
|
|
20912
|
+
var isFirstStepVisible = visibilityRatios[0] === 1;
|
|
20913
|
+
var isLastStepVisible = visibilityRatios[visibilityRatios.length - 1] === 1;
|
|
20914
|
+
return { isFirstStepVisible: isFirstStepVisible, isLastStepVisible: isLastStepVisible };
|
|
20915
|
+
}, [itemVisibility]), isFirstStepVisible = _f.isFirstStepVisible, isLastStepVisible = _f.isLastStepVisible;
|
|
20916
|
+
var currentIndex = Math.max(Object.values(itemVisibility).findIndex(function (value) { return value >= 0.5; }), 0);
|
|
20917
|
+
var scrollToStep = function (index) {
|
|
20918
|
+
var _a, _b;
|
|
20919
|
+
var container = (_a = stepperRef.current) === null || _a === void 0 ? void 0 : _a.parentElement;
|
|
20920
|
+
var stepperItems = Array.from(((_b = stepperRef.current) === null || _b === void 0 ? void 0 : _b.children) || []);
|
|
20921
|
+
var itemToScrollTo = stepperItems[Math.max(0, index)];
|
|
20922
|
+
container === null || container === void 0 ? void 0 : container.scrollTo({
|
|
20923
|
+
left: itemToScrollTo.offsetLeft - offsetLeft,
|
|
20924
|
+
behavior: "smooth",
|
|
20925
|
+
});
|
|
20632
20926
|
};
|
|
20633
|
-
var
|
|
20634
|
-
// Account for any manual scrolling set closest index to active index
|
|
20635
|
-
setActiveIndex(closestScrolledIndex);
|
|
20636
|
-
var newIndex = closestScrolledIndex + increment;
|
|
20637
|
-
setActiveIndex(newIndex);
|
|
20638
|
-
// If clicking backwards to include half visible step
|
|
20639
|
-
if (closestScrolledIndex + increment === activeIndex) {
|
|
20640
|
-
scrollTo();
|
|
20641
|
-
}
|
|
20642
|
-
if (closestScrolledIndex + increment < 0) {
|
|
20643
|
-
setActiveIndex(0);
|
|
20644
|
-
scrollTo();
|
|
20645
|
-
}
|
|
20646
|
-
};
|
|
20647
|
-
// Used to scroll by Parent width
|
|
20648
|
-
var handleViewScroll = function (direction) {
|
|
20927
|
+
var onViewScroll = function (direction) {
|
|
20649
20928
|
var _a;
|
|
20650
|
-
var
|
|
20651
|
-
|
|
20652
|
-
if (!stepper)
|
|
20929
|
+
var container = (_a = stepperRef.current) === null || _a === void 0 ? void 0 : _a.parentElement;
|
|
20930
|
+
if (!container)
|
|
20653
20931
|
return;
|
|
20654
|
-
|
|
20655
|
-
left: direction ? clientWidth : -clientWidth,
|
|
20932
|
+
container.scrollBy({
|
|
20933
|
+
left: direction ? container.clientWidth : -container.clientWidth,
|
|
20656
20934
|
behavior: "smooth",
|
|
20657
20935
|
});
|
|
20658
20936
|
};
|
|
20659
|
-
|
|
20660
|
-
|
|
20661
|
-
|
|
20937
|
+
var onPreviousStep = function () {
|
|
20938
|
+
var newStep = Math.max(currentIndex - increment, 0);
|
|
20939
|
+
scrollToStep(newStep);
|
|
20662
20940
|
};
|
|
20663
|
-
|
|
20664
|
-
|
|
20665
|
-
|
|
20941
|
+
var onNextStep = function () {
|
|
20942
|
+
var _a;
|
|
20943
|
+
var stepperItems = Array.from(((_a = stepperRef.current) === null || _a === void 0 ? void 0 : _a.children) || []);
|
|
20944
|
+
var newStep = Math.min(currentIndex + increment, stepperItems.length);
|
|
20945
|
+
scrollToStep(newStep);
|
|
20946
|
+
};
|
|
20947
|
+
return {
|
|
20948
|
+
stepperRef: stepperRef,
|
|
20949
|
+
onNextStep: onNextStep,
|
|
20950
|
+
onPreviousStep: onPreviousStep,
|
|
20951
|
+
onViewScroll: onViewScroll,
|
|
20952
|
+
currentIndex: currentIndex,
|
|
20953
|
+
scrollToStep: scrollToStep,
|
|
20954
|
+
isFirstStepVisible: isFirstStepVisible,
|
|
20955
|
+
isLastStepVisible: isLastStepVisible,
|
|
20956
|
+
};
|
|
20957
|
+
};
|
|
20666
20958
|
|
|
20667
20959
|
var RadioContext$1 = React.createContext({});
|
|
20668
20960
|
var Provider$3 = RadioContext$1.Provider;
|
|
@@ -20691,6 +20983,11 @@ var RadioCardGroup = function (_a) {
|
|
|
20691
20983
|
}) }, children)))));
|
|
20692
20984
|
};
|
|
20693
20985
|
|
|
20986
|
+
// src/capitalise-first-letter/capitalise-first-letter.ts
|
|
20987
|
+
var capitaliseFirstLetter = (word) => {
|
|
20988
|
+
return word.charAt(0).toUpperCase() + word.slice(1);
|
|
20989
|
+
};
|
|
20990
|
+
|
|
20694
20991
|
var RadioCard = React.forwardRef(function (_a, ref) {
|
|
20695
20992
|
var id = _a.id, icon = _a.icon, label = _a.label, support = _a.support, isDisabled = _a.isDisabled, checked = _a.checked, defaultChecked = _a.defaultChecked, changeEvent = _a.changeEvent, name = _a.name, blurEvent = _a.blurEvent, value = _a.value, children = _a.children, _b = _a.controlLocation, controlLocation = _b === void 0 ? "right" : _b, _c = _a.hideButton, hideButton = _c === void 0 ? false : _c;
|
|
20696
20993
|
var surface = React.useContext(Context$3).surface;
|
|
@@ -21150,11 +21447,12 @@ var SiteHeaderV2Item = function (_a) {
|
|
|
21150
21447
|
var SiteHeaderV2ItemGroup = function (_a) {
|
|
21151
21448
|
var children = _a.children, href = _a.href, title = _a.title, subtitle = _a.subtitle, onClick = _a.onClick, viewAllTitle = _a.viewAllTitle, props = __rest(_a, ["children", "href", "title", "subtitle", "onClick", "viewAllTitle"]);
|
|
21152
21449
|
var isMinWidthArcBreakpointL = useMediaQuery("(min-width: ".concat(ArcSizeBreakpointsL, ")"));
|
|
21153
|
-
var ElementType = title ? "details" : "div";
|
|
21450
|
+
var ElementType = title && !isMinWidthArcBreakpointL ? "details" : "div";
|
|
21451
|
+
var ElementTypeSummary = isMinWidthArcBreakpointL ? "div" : "summary";
|
|
21154
21452
|
return (React.createElement("li", { className: "arc-SiteHeaderV2ItemGroup" },
|
|
21155
21453
|
React.createElement(ElementType, __assign({ className: "arc-SiteHeaderV2ItemGroup-details", open: Boolean(title && isMinWidthArcBreakpointL) }, filterAttrs(props)),
|
|
21156
21454
|
title ? (React.createElement(React.Fragment, null,
|
|
21157
|
-
React.createElement(
|
|
21455
|
+
React.createElement(ElementTypeSummary, { tabIndex: isMinWidthArcBreakpointL ? -1 : 0, className: "arc-SiteHeaderV2ItemGroup-summary" }, href ? (React.createElement("div", { className: "arc-SiteHeaderV2ItemGroup-heading" },
|
|
21158
21456
|
React.createElement(ConditionalWrapper, { condition: isMinWidthArcBreakpointL, wrapper: function (children) { return (React.createElement("a", { onClick: handleLinkClick({
|
|
21159
21457
|
handler: onClick,
|
|
21160
21458
|
}), className: "arc-SiteHeaderV2ItemGroup-title", href: href }, children)); }, fallback: function (children) { return (React.createElement("div", { className: "arc-SiteHeaderV2ItemGroup-title" }, children)); } }, title),
|
|
@@ -22025,7 +22323,7 @@ var TextArea = React.forwardRef(function (_a, ref) {
|
|
|
22025
22323
|
var package_default = {
|
|
22026
22324
|
name: "@arc-ui/helpers",
|
|
22027
22325
|
private: true,
|
|
22028
|
-
version: "12.
|
|
22326
|
+
version: "12.1.0",
|
|
22029
22327
|
type: "module",
|
|
22030
22328
|
homepage: "https://ui.digital-ent-int.bt.com",
|
|
22031
22329
|
author: "BT Enterprise Digital UI Team <ui-digital-ent-int@bt.com>",
|
|
@@ -26401,7 +26699,7 @@ var NavigationHeaderDisclosure = function (_a) {
|
|
|
26401
26699
|
if (containerRef.current && containerRef.current.firstChild && isOpen) {
|
|
26402
26700
|
containerRef.current.firstChild.focus();
|
|
26403
26701
|
}
|
|
26404
|
-
}, [isOpen
|
|
26702
|
+
}, [isOpen]);
|
|
26405
26703
|
return (React.createElement("details", { className: classNames("arc-NavigationHeaderDisclosure", suffixModifier("arc-NavigationHeaderDisclosure--on", surface)), open: isOpen },
|
|
26406
26704
|
React.createElement("summary", { "aria-expanded": isOpen, onClick: handleOnClick, className: "arc-NavigationHeaderDisclosure-summary" },
|
|
26407
26705
|
React.createElement("span", { className: "arc-NavigationHeaderDisclosure-heading" }, heading),
|
|
@@ -26457,24 +26755,25 @@ var NavigationHeaderBurgerMenu = function (_a) {
|
|
|
26457
26755
|
};
|
|
26458
26756
|
React.useEffect(function () {
|
|
26459
26757
|
onOpenChange === null || onOpenChange === void 0 ? void 0 : onOpenChange(isOpen);
|
|
26460
|
-
}, [isOpen]);
|
|
26758
|
+
}, [isOpen, onOpenChange]);
|
|
26461
26759
|
// Close the menu if the nav or trigger is hidden
|
|
26462
26760
|
React.useEffect(function () {
|
|
26761
|
+
var trigger = triggerRef.current;
|
|
26463
26762
|
var resizeObserver = new ResizeObserver(function (entries) {
|
|
26464
26763
|
var entry = entries[0];
|
|
26465
26764
|
if (!checkElementVisibility(entry.target) && isOpen) {
|
|
26466
26765
|
setIsOpen(false);
|
|
26467
26766
|
}
|
|
26468
26767
|
});
|
|
26469
|
-
if (
|
|
26470
|
-
resizeObserver.observe(
|
|
26768
|
+
if (trigger) {
|
|
26769
|
+
resizeObserver.observe(trigger);
|
|
26471
26770
|
}
|
|
26472
26771
|
return function () {
|
|
26473
|
-
if (
|
|
26474
|
-
resizeObserver.unobserve(
|
|
26772
|
+
if (trigger) {
|
|
26773
|
+
resizeObserver.unobserve(trigger);
|
|
26475
26774
|
}
|
|
26476
26775
|
};
|
|
26477
|
-
}, [isOpen, setIsOpen
|
|
26776
|
+
}, [isOpen, setIsOpen]);
|
|
26478
26777
|
var colorScheme = React.useMemo(function () {
|
|
26479
26778
|
var colorConfig = {
|
|
26480
26779
|
light: {
|
|
@@ -26571,6 +26870,7 @@ var NavigationHeaderDropdown = function (_a) {
|
|
|
26571
26870
|
var navigationHeaderContext = React.useContext(NavigationHeaderContext);
|
|
26572
26871
|
// Close the dropdown if the nav or trigger is hidden
|
|
26573
26872
|
React.useEffect(function () {
|
|
26873
|
+
var trigger = triggerRef.current;
|
|
26574
26874
|
var resizeObserver = new ResizeObserver(function (entries) {
|
|
26575
26875
|
var entry = entries[0];
|
|
26576
26876
|
if (!checkElementVisibility(entry.target) && isOpen) {
|
|
@@ -26578,20 +26878,15 @@ var NavigationHeaderDropdown = function (_a) {
|
|
|
26578
26878
|
setIsTooltipOpen(false);
|
|
26579
26879
|
}
|
|
26580
26880
|
});
|
|
26581
|
-
if (
|
|
26582
|
-
resizeObserver.observe(
|
|
26881
|
+
if (trigger) {
|
|
26882
|
+
resizeObserver.observe(trigger);
|
|
26583
26883
|
}
|
|
26584
26884
|
return function () {
|
|
26585
|
-
if (
|
|
26586
|
-
resizeObserver.unobserve(
|
|
26885
|
+
if (trigger) {
|
|
26886
|
+
resizeObserver.unobserve(trigger);
|
|
26587
26887
|
}
|
|
26588
26888
|
};
|
|
26589
|
-
}, [
|
|
26590
|
-
isOpen,
|
|
26591
|
-
setIsOpen,
|
|
26592
|
-
navigationHeaderContext === null || navigationHeaderContext === void 0 ? void 0 : navigationHeaderContext.setIsSubMenuItemActive,
|
|
26593
|
-
triggerRef.current,
|
|
26594
|
-
]);
|
|
26889
|
+
}, [isOpen, setIsOpen, navigationHeaderContext]);
|
|
26595
26890
|
// if focus isnt going anywhere else and closed via keyboard, return focus to the trigger
|
|
26596
26891
|
var onCloseAutoFocus = function () {
|
|
26597
26892
|
var _a, _b;
|
|
@@ -26719,14 +27014,10 @@ var NavigationHeaderSubnav = function (_a) {
|
|
|
26719
27014
|
return function () {
|
|
26720
27015
|
document.removeEventListener("click", handleClickOutside);
|
|
26721
27016
|
};
|
|
26722
|
-
}, [
|
|
26723
|
-
setIsOpen,
|
|
26724
|
-
dialogRef.current,
|
|
26725
|
-
containerRef.current,
|
|
26726
|
-
navigationHeaderContext === null || navigationHeaderContext === void 0 ? void 0 : navigationHeaderContext.setIsSubMenuItemActive,
|
|
26727
|
-
]);
|
|
27017
|
+
}, [setIsOpen, navigationHeaderContext]);
|
|
26728
27018
|
// Close the subnav if the trigger is hidden and the submenu is open
|
|
26729
27019
|
React.useEffect(function () {
|
|
27020
|
+
var trigger = triggerRef.current;
|
|
26730
27021
|
var resizeObserver = new ResizeObserver(function (entries) {
|
|
26731
27022
|
var entry = entries[0];
|
|
26732
27023
|
if (!checkElementVisibility(entry.target) && isOpen) {
|
|
@@ -26734,20 +27025,15 @@ var NavigationHeaderSubnav = function (_a) {
|
|
|
26734
27025
|
navigationHeaderContext === null || navigationHeaderContext === void 0 ? void 0 : navigationHeaderContext.setIsSubMenuItemActive(false);
|
|
26735
27026
|
}
|
|
26736
27027
|
});
|
|
26737
|
-
if (
|
|
26738
|
-
resizeObserver.observe(
|
|
27028
|
+
if (trigger) {
|
|
27029
|
+
resizeObserver.observe(trigger);
|
|
26739
27030
|
}
|
|
26740
27031
|
return function () {
|
|
26741
|
-
if (
|
|
26742
|
-
resizeObserver.unobserve(
|
|
27032
|
+
if (trigger) {
|
|
27033
|
+
resizeObserver.unobserve(trigger);
|
|
26743
27034
|
}
|
|
26744
27035
|
};
|
|
26745
|
-
}, [
|
|
26746
|
-
isOpen,
|
|
26747
|
-
setIsOpen,
|
|
26748
|
-
navigationHeaderContext === null || navigationHeaderContext === void 0 ? void 0 : navigationHeaderContext.setIsSubMenuItemActive,
|
|
26749
|
-
triggerRef.current,
|
|
26750
|
-
]);
|
|
27036
|
+
}, [isOpen, setIsOpen, navigationHeaderContext]);
|
|
26751
27037
|
return (React.createElement("div", { ref: containerRef },
|
|
26752
27038
|
React.createElement(NavigationHeaderButton, { "data-sub-nav-item": true, ref: triggerRef, isActive: isOpen, "aria-label": ariaLabel, onClick: onTriggerClick }, trigger),
|
|
26753
27039
|
React.createElement(Root$1, { open: isOpen, modal: false },
|
|
@@ -28018,4 +28304,5 @@ exports.parseDateString = parseDateString;
|
|
|
28018
28304
|
exports.parseRangeString = parseRangeString;
|
|
28019
28305
|
exports.themes = themes;
|
|
28020
28306
|
exports.useMediaQuery = useMediaQuery;
|
|
28307
|
+
exports.useProgressStepperOverflow = useProgressStepperOverflow;
|
|
28021
28308
|
//# sourceMappingURL=index.cjs.map
|