@arc-ui/components 11.24.2 → 11.26.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/Button/Button.cjs.js +1 -1
- package/dist/Button/Button.esm.js +1 -1
- package/dist/DatePicker/DatePicker.cjs.js +1276 -22
- package/dist/DatePicker/DatePicker.esm.js +1245 -10
- package/dist/InformationCard/InformationCard.cjs.js +1 -1
- package/dist/InformationCard/InformationCard.esm.js +1 -1
- package/dist/Modal/Modal.cjs.js +438 -225
- package/dist/Modal/Modal.esm.js +420 -225
- package/dist/PaginationSimple/PaginationSimple.cjs.js +23 -2
- package/dist/PaginationSimple/PaginationSimple.esm.js +23 -2
- package/dist/Select/Select.cjs.js +1514 -1065
- package/dist/Select/Select.esm.js +1496 -1066
- package/dist/SiteHeader/SiteHeader.cjs.js +2 -2
- package/dist/SiteHeader/SiteHeader.esm.js +2 -2
- package/dist/SiteHeaderV2/SiteHeaderV2.cjs.js +2 -2
- package/dist/SiteHeaderV2/SiteHeaderV2.esm.js +2 -2
- package/dist/Tabs/Tabs.cjs.js +4 -6
- package/dist/Tabs/Tabs.esm.js +4 -6
- package/dist/TextArea/TextArea.cjs.js +10 -13
- package/dist/TextArea/TextArea.esm.js +10 -13
- package/dist/Toast/Toast.cjs.js +4 -6
- package/dist/Toast/Toast.esm.js +4 -6
- package/dist/UniversalHeader/UniversalHeader.cjs.js +2 -2
- package/dist/UniversalHeader/UniversalHeader.esm.js +2 -2
- package/dist/_shared/cjs/{Button-6ba21d3b.js → Button-5b28f0ce.js} +3 -3
- package/dist/_shared/cjs/{SiteHeader.rehydrator-9d8f3dad.js → SiteHeader.rehydrator-8fa9d174.js} +1 -1
- package/dist/_shared/cjs/{SiteHeaderV2-ce1c8737.js → SiteHeaderV2-ca2f13a8.js} +1 -1
- package/dist/_shared/cjs/{Tabs-bc9fac46.js → Tabs-89455281.js} +19 -15
- package/dist/_shared/cjs/{Toast-26207fef.js → Toast-c760c89d.js} +32 -14
- package/dist/_shared/cjs/{UniversalHeader-b8389447.js → UniversalHeader-73e154eb.js} +6 -2
- package/dist/_shared/cjs/component-4979b2e7.js +409 -0
- package/dist/_shared/cjs/{index-77ab5c6a.js → floating-ui.react-dom-08b8b87c.js} +12 -284
- package/dist/_shared/cjs/index-1efbba95.js +1252 -0
- package/dist/_shared/cjs/{index-74004a9c.js → index-4edec793.js} +1 -1
- package/dist/_shared/cjs/{index-dd1d18ea.js → index-7641213c.js} +127 -2
- package/dist/_shared/cjs/{index-9f99d686.js → index-af744fa9.js} +1 -1
- package/dist/_shared/cjs/{index-6eb396a3.js → index-fb0cad18.js} +1 -1
- package/dist/_shared/esm/{Button-a7d134c6.js → Button-5b48b7ce.js} +3 -3
- package/dist/_shared/esm/{SiteHeader.rehydrator-2ec02ee7.js → SiteHeader.rehydrator-8f3c5d6e.js} +1 -1
- package/dist/_shared/esm/{SiteHeaderV2-a7c1b1cb.js → SiteHeaderV2-cb081752.js} +1 -1
- package/dist/_shared/esm/{Tabs-9485cab6.js → Tabs-959e885d.js} +10 -6
- package/dist/_shared/esm/{Toast-fcbfc194.js → Toast-a590067d.js} +25 -7
- package/dist/_shared/esm/{UniversalHeader-80c7313f.js → UniversalHeader-96bfbacc.js} +6 -2
- package/dist/_shared/esm/component-d7b471ff.js +382 -0
- package/dist/_shared/esm/{index-b84a20c6.js → floating-ui.react-dom-1bb71aae.js} +4 -281
- package/dist/_shared/esm/{index-7b531fa7.js → index-0ae23b06.js} +126 -2
- package/dist/_shared/esm/index-307f1bbc.js +1212 -0
- package/dist/_shared/esm/{index-044da8d0.js → index-9e54cc7d.js} +1 -1
- package/dist/_shared/esm/{index-efa9be1a.js → index-af7b6e55.js} +1 -1
- package/dist/_shared/esm/{index-2cfab9f2.js → index-ebe72f34.js} +1 -1
- package/dist/index.es.js +3608 -2938
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +3591 -2921
- package/dist/index.js.map +1 -1
- package/dist/styles.css +2 -2
- package/dist/types/components/Button/Button.d.ts +12 -0
- package/dist/types/components/PaginationSimple/PaginationSimple.d.ts +28 -0
- package/dist/types/components/UniversalHeader/UniversalHeader.d.ts +4 -0
- package/package.json +3 -3
- package/dist/_shared/cjs/Combination-9974f2e2.js +0 -1330
- package/dist/_shared/cjs/index-a31e64a9.js +0 -27
- package/dist/_shared/cjs/index-d38f1bd0.js +0 -131
- package/dist/_shared/cjs/index-dcfdd5da.js +0 -11
- package/dist/_shared/esm/Combination-e9f7e64e.js +0 -1301
- package/dist/_shared/esm/index-25a5b393.js +0 -25
- package/dist/_shared/esm/index-a624de47.js +0 -9
- package/dist/_shared/esm/index-ca72c9d5.js +0 -129
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var React = require('react');
|
|
4
4
|
var _extends = require('./extends-8c5e4b48.js');
|
|
5
|
-
var
|
|
5
|
+
var ReactDOM = require('react-dom');
|
|
6
6
|
|
|
7
7
|
function $e42e1063c40fb3ef$export$b9ecd428b558ff10(originalEventHandler, ourEventHandler, { checkForDefaultPrevented: checkForDefaultPrevented = true } = {}) {
|
|
8
8
|
return function handleEvent(event) {
|
|
@@ -284,7 +284,7 @@ const $8927f6f2acc4f386$var$NODES = [
|
|
|
284
284
|
* this utility with them. This is because it's possible for those handlers to be called implicitly during render
|
|
285
285
|
* e.g. when focus is within a component as it is unmounted, or when managing focus on mount.
|
|
286
286
|
*/ function $8927f6f2acc4f386$export$6d1a0317bde7de7f(target, event) {
|
|
287
|
-
if (target)
|
|
287
|
+
if (target) ReactDOM.flushSync(()=>target.dispatchEvent(event)
|
|
288
288
|
);
|
|
289
289
|
}
|
|
290
290
|
|
|
@@ -311,6 +311,130 @@ const $8927f6f2acc4f386$var$NODES = [
|
|
|
311
311
|
* See: https://reactjs.org/docs/hooks-reference.html#uselayouteffect
|
|
312
312
|
*/ const $9f79659886946c16$export$e5c5a5f917a5871c = Boolean(globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) ? React.useLayoutEffect : ()=>{};
|
|
313
313
|
|
|
314
|
+
function $fe963b355347cc68$export$3e6543de14f8614f(initialState, machine) {
|
|
315
|
+
return React.useReducer((state, event)=>{
|
|
316
|
+
const nextState = machine[state][event];
|
|
317
|
+
return nextState !== null && nextState !== void 0 ? nextState : state;
|
|
318
|
+
}, initialState);
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
|
|
322
|
+
const $921a889cee6df7e8$export$99c2b779aa4e8b8b = (props)=>{
|
|
323
|
+
const { present: present , children: children } = props;
|
|
324
|
+
const presence = $921a889cee6df7e8$var$usePresence(present);
|
|
325
|
+
const child = typeof children === 'function' ? children({
|
|
326
|
+
present: presence.isPresent
|
|
327
|
+
}) : React.Children.only(children);
|
|
328
|
+
const ref = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(presence.ref, child.ref);
|
|
329
|
+
const forceMount = typeof children === 'function';
|
|
330
|
+
return forceMount || presence.isPresent ? /*#__PURE__*/ React.cloneElement(child, {
|
|
331
|
+
ref: ref
|
|
332
|
+
}) : null;
|
|
333
|
+
};
|
|
334
|
+
$921a889cee6df7e8$export$99c2b779aa4e8b8b.displayName = 'Presence';
|
|
335
|
+
/* -------------------------------------------------------------------------------------------------
|
|
336
|
+
* usePresence
|
|
337
|
+
* -----------------------------------------------------------------------------------------------*/ function $921a889cee6df7e8$var$usePresence(present) {
|
|
338
|
+
const [node1, setNode] = React.useState();
|
|
339
|
+
const stylesRef = React.useRef({});
|
|
340
|
+
const prevPresentRef = React.useRef(present);
|
|
341
|
+
const prevAnimationNameRef = React.useRef('none');
|
|
342
|
+
const initialState = present ? 'mounted' : 'unmounted';
|
|
343
|
+
const [state, send] = $fe963b355347cc68$export$3e6543de14f8614f(initialState, {
|
|
344
|
+
mounted: {
|
|
345
|
+
UNMOUNT: 'unmounted',
|
|
346
|
+
ANIMATION_OUT: 'unmountSuspended'
|
|
347
|
+
},
|
|
348
|
+
unmountSuspended: {
|
|
349
|
+
MOUNT: 'mounted',
|
|
350
|
+
ANIMATION_END: 'unmounted'
|
|
351
|
+
},
|
|
352
|
+
unmounted: {
|
|
353
|
+
MOUNT: 'mounted'
|
|
354
|
+
}
|
|
355
|
+
});
|
|
356
|
+
React.useEffect(()=>{
|
|
357
|
+
const currentAnimationName = $921a889cee6df7e8$var$getAnimationName(stylesRef.current);
|
|
358
|
+
prevAnimationNameRef.current = state === 'mounted' ? currentAnimationName : 'none';
|
|
359
|
+
}, [
|
|
360
|
+
state
|
|
361
|
+
]);
|
|
362
|
+
$9f79659886946c16$export$e5c5a5f917a5871c(()=>{
|
|
363
|
+
const styles = stylesRef.current;
|
|
364
|
+
const wasPresent = prevPresentRef.current;
|
|
365
|
+
const hasPresentChanged = wasPresent !== present;
|
|
366
|
+
if (hasPresentChanged) {
|
|
367
|
+
const prevAnimationName = prevAnimationNameRef.current;
|
|
368
|
+
const currentAnimationName = $921a889cee6df7e8$var$getAnimationName(styles);
|
|
369
|
+
if (present) send('MOUNT');
|
|
370
|
+
else if (currentAnimationName === 'none' || (styles === null || styles === void 0 ? void 0 : styles.display) === 'none') // If there is no exit animation or the element is hidden, animations won't run
|
|
371
|
+
// so we unmount instantly
|
|
372
|
+
send('UNMOUNT');
|
|
373
|
+
else {
|
|
374
|
+
/**
|
|
375
|
+
* When `present` changes to `false`, we check changes to animation-name to
|
|
376
|
+
* determine whether an animation has started. We chose this approach (reading
|
|
377
|
+
* computed styles) because there is no `animationrun` event and `animationstart`
|
|
378
|
+
* fires after `animation-delay` has expired which would be too late.
|
|
379
|
+
*/ const isAnimating = prevAnimationName !== currentAnimationName;
|
|
380
|
+
if (wasPresent && isAnimating) send('ANIMATION_OUT');
|
|
381
|
+
else send('UNMOUNT');
|
|
382
|
+
}
|
|
383
|
+
prevPresentRef.current = present;
|
|
384
|
+
}
|
|
385
|
+
}, [
|
|
386
|
+
present,
|
|
387
|
+
send
|
|
388
|
+
]);
|
|
389
|
+
$9f79659886946c16$export$e5c5a5f917a5871c(()=>{
|
|
390
|
+
if (node1) {
|
|
391
|
+
/**
|
|
392
|
+
* Triggering an ANIMATION_OUT during an ANIMATION_IN will fire an `animationcancel`
|
|
393
|
+
* event for ANIMATION_IN after we have entered `unmountSuspended` state. So, we
|
|
394
|
+
* make sure we only trigger ANIMATION_END for the currently active animation.
|
|
395
|
+
*/ const handleAnimationEnd = (event)=>{
|
|
396
|
+
const currentAnimationName = $921a889cee6df7e8$var$getAnimationName(stylesRef.current);
|
|
397
|
+
const isCurrentAnimation = currentAnimationName.includes(event.animationName);
|
|
398
|
+
if (event.target === node1 && isCurrentAnimation) // With React 18 concurrency this update is applied
|
|
399
|
+
// a frame after the animation ends, creating a flash of visible content.
|
|
400
|
+
// By manually flushing we ensure they sync within a frame, removing the flash.
|
|
401
|
+
ReactDOM.flushSync(()=>send('ANIMATION_END')
|
|
402
|
+
);
|
|
403
|
+
};
|
|
404
|
+
const handleAnimationStart = (event)=>{
|
|
405
|
+
if (event.target === node1) // if animation occurred, store its name as the previous animation.
|
|
406
|
+
prevAnimationNameRef.current = $921a889cee6df7e8$var$getAnimationName(stylesRef.current);
|
|
407
|
+
};
|
|
408
|
+
node1.addEventListener('animationstart', handleAnimationStart);
|
|
409
|
+
node1.addEventListener('animationcancel', handleAnimationEnd);
|
|
410
|
+
node1.addEventListener('animationend', handleAnimationEnd);
|
|
411
|
+
return ()=>{
|
|
412
|
+
node1.removeEventListener('animationstart', handleAnimationStart);
|
|
413
|
+
node1.removeEventListener('animationcancel', handleAnimationEnd);
|
|
414
|
+
node1.removeEventListener('animationend', handleAnimationEnd);
|
|
415
|
+
};
|
|
416
|
+
} else // Transition to the unmounted state if the node is removed prematurely.
|
|
417
|
+
// We avoid doing so during cleanup as the node may change but still exist.
|
|
418
|
+
send('ANIMATION_END');
|
|
419
|
+
}, [
|
|
420
|
+
node1,
|
|
421
|
+
send
|
|
422
|
+
]);
|
|
423
|
+
return {
|
|
424
|
+
isPresent: [
|
|
425
|
+
'mounted',
|
|
426
|
+
'unmountSuspended'
|
|
427
|
+
].includes(state),
|
|
428
|
+
ref: React.useCallback((node)=>{
|
|
429
|
+
if (node) stylesRef.current = getComputedStyle(node);
|
|
430
|
+
setNode(node);
|
|
431
|
+
}, [])
|
|
432
|
+
};
|
|
433
|
+
}
|
|
434
|
+
/* -----------------------------------------------------------------------------------------------*/ function $921a889cee6df7e8$var$getAnimationName(styles) {
|
|
435
|
+
return (styles === null || styles === void 0 ? void 0 : styles.animationName) || 'none';
|
|
436
|
+
}
|
|
437
|
+
|
|
314
438
|
function $71cd76cc60e0454e$export$6f32135080cb4c3({ prop: prop , defaultProp: defaultProp , onChange: onChange = ()=>{} }) {
|
|
315
439
|
const [uncontrolledProp, setUncontrolledProp] = $71cd76cc60e0454e$var$useUncontrolledState({
|
|
316
440
|
defaultProp: defaultProp,
|
|
@@ -359,6 +483,7 @@ exports.$6ed0406888f73fc4$export$c7b2cbe3552a0d05 = $6ed0406888f73fc4$export$c7b
|
|
|
359
483
|
exports.$71cd76cc60e0454e$export$6f32135080cb4c3 = $71cd76cc60e0454e$export$6f32135080cb4c3;
|
|
360
484
|
exports.$8927f6f2acc4f386$export$250ffa63cdc0d034 = $8927f6f2acc4f386$export$250ffa63cdc0d034;
|
|
361
485
|
exports.$8927f6f2acc4f386$export$6d1a0317bde7de7f = $8927f6f2acc4f386$export$6d1a0317bde7de7f;
|
|
486
|
+
exports.$921a889cee6df7e8$export$99c2b779aa4e8b8b = $921a889cee6df7e8$export$99c2b779aa4e8b8b;
|
|
362
487
|
exports.$9f79659886946c16$export$e5c5a5f917a5871c = $9f79659886946c16$export$e5c5a5f917a5871c;
|
|
363
488
|
exports.$b1b2314f5f9a1d84$export$25bec8c6f54ee79a = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a;
|
|
364
489
|
exports.$c512c27ab02ef895$export$50c7b4e9d9f19c1 = $c512c27ab02ef895$export$50c7b4e9d9f19c1;
|
|
@@ -12,7 +12,7 @@ import { C as Context } from './Surface-0ca6817d.js';
|
|
|
12
12
|
*/
|
|
13
13
|
var Button = forwardRef(function (_a, ref) {
|
|
14
14
|
var _b;
|
|
15
|
-
var ariaLabel = _a.ariaLabel, _c = _a.fill, fill = _c === void 0 ? "solid" : _c, href = _a.href, icon = _a.icon, _d = _a.iconPosition, iconPosition = _d === void 0 ? "afterText" : _d, id = _a.id, _e = _a.isDisabled, isDisabled = _e === void 0 ? false : _e, _f = _a.isDisplayBlock, isDisplayBlock = _f === void 0 ? false : _f, _g = _a.isFullWidth, isFullWidth = _g === void 0 ? false : _g, label = _a.label, onClick = _a.onClick, rel = _a.rel, _h = _a.size, size = _h === void 0 ? "m" : _h, supportingText = _a.supportingText, target = _a.target, type = _a.type, form = _a.form, props = __rest(_a, ["ariaLabel", "fill", "href", "icon", "iconPosition", "id", "isDisabled", "isDisplayBlock", "isFullWidth", "label", "onClick", "rel", "size", "supportingText", "target", "type", "form"]);
|
|
15
|
+
var ariaLabel = _a.ariaLabel, ariaControls = _a.ariaControls, ariaExpanded = _a.ariaExpanded, ariaHasPopup = _a.ariaHasPopup, _c = _a.fill, fill = _c === void 0 ? "solid" : _c, href = _a.href, icon = _a.icon, _d = _a.iconPosition, iconPosition = _d === void 0 ? "afterText" : _d, id = _a.id, _e = _a.isDisabled, isDisabled = _e === void 0 ? false : _e, _f = _a.isDisplayBlock, isDisplayBlock = _f === void 0 ? false : _f, _g = _a.isFullWidth, isFullWidth = _g === void 0 ? false : _g, label = _a.label, onClick = _a.onClick, rel = _a.rel, _h = _a.size, size = _h === void 0 ? "m" : _h, supportingText = _a.supportingText, target = _a.target, type = _a.type, form = _a.form, props = __rest(_a, ["ariaLabel", "ariaControls", "ariaExpanded", "ariaHasPopup", "fill", "href", "icon", "iconPosition", "id", "isDisabled", "isDisplayBlock", "isFullWidth", "label", "onClick", "rel", "size", "supportingText", "target", "type", "form"]);
|
|
16
16
|
var surface = useContext(Context).surface;
|
|
17
17
|
var buttonClasses = classNames((_b = {
|
|
18
18
|
"arc-Button": true,
|
|
@@ -33,12 +33,12 @@ var Button = forwardRef(function (_a, ref) {
|
|
|
33
33
|
React__default.createElement("span", { className: "arc-Button-supportingText" }, supportingText))) : (React__default.createElement("span", { className: "arc-Button-text" }, label));
|
|
34
34
|
var buttonIcon = icon || fill === "flat" ? (React__default.createElement(ButtonIcon, { icon: icon, isChevron: !icon && fill === "flat", isBeforeText: iconPosition === "beforeText" })) : null;
|
|
35
35
|
if (href && !isDisabled) {
|
|
36
|
-
return (React__default.createElement("a", __assign({}, commonProps, { "aria-label": ariaLabel, className: buttonClasses, href: href, rel: rel, target: target }),
|
|
36
|
+
return (React__default.createElement("a", __assign({}, commonProps, { "aria-label": ariaLabel, "aria-haspopup": ariaHasPopup, "aria-controls": ariaControls, "aria-expanded": ariaExpanded, className: buttonClasses, href: href, rel: rel, target: target }),
|
|
37
37
|
React__default.createElement("span", { className: "arc-Button-inner" },
|
|
38
38
|
buttonText,
|
|
39
39
|
buttonIcon)));
|
|
40
40
|
}
|
|
41
|
-
return (React__default.createElement("button", __assign({}, commonProps, { "aria-label": ariaLabel, className: buttonClasses, disabled: isDisabled, type: type, form: form }),
|
|
41
|
+
return (React__default.createElement("button", __assign({}, commonProps, { "aria-label": ariaLabel, "aria-haspopup": ariaHasPopup, "aria-controls": ariaControls, "aria-expanded": ariaExpanded, className: buttonClasses, disabled: isDisabled, type: type, form: form }),
|
|
42
42
|
React__default.createElement("span", { className: "arc-Button-inner" },
|
|
43
43
|
buttonText,
|
|
44
44
|
buttonIcon)));
|
package/dist/_shared/esm/{SiteHeader.rehydrator-2ec02ee7.js → SiteHeader.rehydrator-8f3c5d6e.js}
RENAMED
|
@@ -7,7 +7,7 @@ import { h as handleLinkClick } from './handle-link-click-f64f55a2.js';
|
|
|
7
7
|
import { a as BtIconChevronRight2Px, B as BtIconChevronLeft2Px } from './BtIconChevronRight2Px.esm-75e92636.js';
|
|
8
8
|
import { S as Surface } from './Surface-0ca6817d.js';
|
|
9
9
|
import { B as BrandLogo } from './BrandLogo-1af78f76.js';
|
|
10
|
-
import { B as Button } from './Button-
|
|
10
|
+
import { B as Button } from './Button-5b48b7ce.js';
|
|
11
11
|
import { s as suffixModifier } from './suffix-modifier-3d548e45.js';
|
|
12
12
|
import { T as Text } from './Text-14f586ac.js';
|
|
13
13
|
|
|
@@ -8,7 +8,7 @@ import { h as handleLinkClick } from './handle-link-click-f64f55a2.js';
|
|
|
8
8
|
import { B as BtIconChevronRightMid } from './BtIconChevronRightMid.esm-32268f1a.js';
|
|
9
9
|
import { C as ConditionalWrapper } from './ConditionalWrapper-59be8f35.js';
|
|
10
10
|
import { B as BtIconChevronLeft2Px, a as BtIconChevronRight2Px } from './BtIconChevronRight2Px.esm-75e92636.js';
|
|
11
|
-
import { B as Button } from './Button-
|
|
11
|
+
import { B as Button } from './Button-5b48b7ce.js';
|
|
12
12
|
import { s as suffixModifier } from './suffix-modifier-3d548e45.js';
|
|
13
13
|
import { T as Text } from './Text-14f586ac.js';
|
|
14
14
|
import { I as Icon } from './Icon-15799695.js';
|
|
@@ -1,16 +1,20 @@
|
|
|
1
1
|
import { _ as __rest, a as __assign, f as filterDataAttrs } from './filter-data-attrs-ea8f4ed4.js';
|
|
2
|
-
import React__default, { forwardRef, createElement, useRef, useState, useEffect, useCallback
|
|
2
|
+
import React__default, { useContext, createContext, forwardRef, createElement, useRef, useState, useEffect, useCallback } from 'react';
|
|
3
3
|
import { _ as _extends } from './extends-8cc61aad.js';
|
|
4
|
-
import {
|
|
5
|
-
import { $ as $e02a7d9cb1dc128c$export$c74125a8e3af6bb2 } from './index-
|
|
6
|
-
import { $ as $1746a345f3d73bb7$export$f680877a34711e37 } from './index-
|
|
7
|
-
import { $ as $f631663db3294ace$export$b39126d51d94e6f3 } from './index-a624de47.js';
|
|
8
|
-
import { $ as $921a889cee6df7e8$export$99c2b779aa4e8b8b } from './index-ca72c9d5.js';
|
|
4
|
+
import { f as $c512c27ab02ef895$export$50c7b4e9d9f19c1, $ as $6ed0406888f73fc4$export$c7b2cbe3552a0d05, g as $71cd76cc60e0454e$export$6f32135080cb4c3, c as $b1b2314f5f9a1d84$export$25bec8c6f54ee79a, a as $8927f6f2acc4f386$export$250ffa63cdc0d034, b as $e42e1063c40fb3ef$export$b9ecd428b558ff10, h as $921a889cee6df7e8$export$99c2b779aa4e8b8b } from './index-0ae23b06.js';
|
|
5
|
+
import { $ as $e02a7d9cb1dc128c$export$c74125a8e3af6bb2 } from './index-9e54cc7d.js';
|
|
6
|
+
import { $ as $1746a345f3d73bb7$export$f680877a34711e37 } from './index-af7b6e55.js';
|
|
9
7
|
import { I as Icon } from './Icon-15799695.js';
|
|
10
8
|
import { C as Context } from './Surface-0ca6817d.js';
|
|
11
9
|
import { c as classNames } from './index-2e73c2e9.js';
|
|
12
10
|
import { B as BtIconArrowRightFill } from './BtIconArrowRightFill.esm-99019d1a.js';
|
|
13
11
|
|
|
12
|
+
const $f631663db3294ace$var$DirectionContext = /*#__PURE__*/ createContext(undefined);
|
|
13
|
+
/* -----------------------------------------------------------------------------------------------*/ function $f631663db3294ace$export$b39126d51d94e6f3(localDir) {
|
|
14
|
+
const globalDir = useContext($f631663db3294ace$var$DirectionContext);
|
|
15
|
+
return localDir || globalDir || 'ltr';
|
|
16
|
+
}
|
|
17
|
+
|
|
14
18
|
const $d7bdfb9eb0fdf311$var$ENTRY_FOCUS = 'rovingFocusGroup.onEntryFocus';
|
|
15
19
|
const $d7bdfb9eb0fdf311$var$EVENT_OPTIONS = {
|
|
16
20
|
bubbles: false,
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import { _ as __rest, a as __assign, f as filterDataAttrs } from './filter-data-attrs-ea8f4ed4.js';
|
|
2
2
|
import React__default, { forwardRef, useContext, useState, useEffect, createElement, useRef, createContext, useCallback, useMemo, Fragment } from 'react';
|
|
3
3
|
import { _ as _extends } from './extends-8cc61aad.js';
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import { $ as $e02a7d9cb1dc128c$export$c74125a8e3af6bb2 } from './index-
|
|
7
|
-
import { $ as $addc16e1bbe58fd0$export$3a72a57244d6e765 } from './index-
|
|
8
|
-
import { $ as $921a889cee6df7e8$export$99c2b779aa4e8b8b } from './index-ca72c9d5.js';
|
|
9
|
-
import { $ as $ea1ef594cf570d83$export$439d29a4e110a164 } from './index-25a5b393.js';
|
|
4
|
+
import ReactDOM__default, { createPortal } from 'react-dom';
|
|
5
|
+
import { $ as $6ed0406888f73fc4$export$c7b2cbe3552a0d05, a as $8927f6f2acc4f386$export$250ffa63cdc0d034, b as $e42e1063c40fb3ef$export$b9ecd428b558ff10, c as $b1b2314f5f9a1d84$export$25bec8c6f54ee79a, d as $8927f6f2acc4f386$export$6d1a0317bde7de7f, f as $c512c27ab02ef895$export$50c7b4e9d9f19c1, e as $9f79659886946c16$export$e5c5a5f917a5871c, g as $71cd76cc60e0454e$export$6f32135080cb4c3, h as $921a889cee6df7e8$export$99c2b779aa4e8b8b } from './index-0ae23b06.js';
|
|
6
|
+
import { $ as $e02a7d9cb1dc128c$export$c74125a8e3af6bb2 } from './index-9e54cc7d.js';
|
|
7
|
+
import { $ as $addc16e1bbe58fd0$export$3a72a57244d6e765 } from './index-ebe72f34.js';
|
|
10
8
|
import { c as classNames } from './index-2e73c2e9.js';
|
|
11
9
|
import { B as BtIconCrossAlt2Px } from './BtIconCrossAlt2Px.esm-7165ab1a.js';
|
|
12
10
|
import { B as BtIconNotification, a as BtIconAlertTriangle, b as BtIconTick } from './BtIconTick.esm-e265098f.js';
|
|
@@ -265,11 +263,31 @@ const $5cb92bef7577960e$export$aecb2ddcb55c95be = $5cb92bef7577960e$export$4d5eb
|
|
|
265
263
|
const $f1701beae083dbae$export$602eac185826482c = /*#__PURE__*/ forwardRef((props, forwardedRef)=>{
|
|
266
264
|
var _globalThis$document;
|
|
267
265
|
const { container: container = globalThis === null || globalThis === void 0 ? void 0 : (_globalThis$document = globalThis.document) === null || _globalThis$document === void 0 ? void 0 : _globalThis$document.body , ...portalProps } = props;
|
|
268
|
-
return container ? /*#__PURE__*/
|
|
266
|
+
return container ? /*#__PURE__*/ ReactDOM__default.createPortal(/*#__PURE__*/ createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({}, portalProps, {
|
|
269
267
|
ref: forwardedRef
|
|
270
268
|
})), container) : null;
|
|
271
269
|
});
|
|
272
270
|
|
|
271
|
+
const $ea1ef594cf570d83$export$439d29a4e110a164 = /*#__PURE__*/ forwardRef((props, forwardedRef)=>{
|
|
272
|
+
return /*#__PURE__*/ createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.span, _extends({}, props, {
|
|
273
|
+
ref: forwardedRef,
|
|
274
|
+
style: {
|
|
275
|
+
// See: https://github.com/twbs/bootstrap/blob/master/scss/mixins/_screen-reader.scss
|
|
276
|
+
position: 'absolute',
|
|
277
|
+
border: 0,
|
|
278
|
+
width: 1,
|
|
279
|
+
height: 1,
|
|
280
|
+
padding: 0,
|
|
281
|
+
margin: -1,
|
|
282
|
+
overflow: 'hidden',
|
|
283
|
+
clip: 'rect(0, 0, 0, 0)',
|
|
284
|
+
whiteSpace: 'nowrap',
|
|
285
|
+
wordWrap: 'normal',
|
|
286
|
+
...props.style
|
|
287
|
+
}
|
|
288
|
+
}));
|
|
289
|
+
});
|
|
290
|
+
|
|
273
291
|
/* -------------------------------------------------------------------------------------------------
|
|
274
292
|
* ToastProvider
|
|
275
293
|
* -----------------------------------------------------------------------------------------------*/ const $054eb8030ebde76e$var$PROVIDER_NAME = 'ToastProvider';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { _ as __rest, a as __assign, f as filterDataAttrs } from './filter-data-attrs-ea8f4ed4.js';
|
|
2
2
|
import React__default, { useEffect } from 'react';
|
|
3
|
+
import { c as classNames } from './index-2e73c2e9.js';
|
|
3
4
|
import { S as Surface } from './Surface-0ca6817d.js';
|
|
4
5
|
|
|
5
6
|
/**
|
|
@@ -21,9 +22,12 @@ var UniversalHeader = function (_a) {
|
|
|
21
22
|
ContentSlot && (React__default.createElement("li", { className: "arc-UniversalHeader-contentSlot" }, ContentSlot))))));
|
|
22
23
|
};
|
|
23
24
|
var UniversalHeaderItem = function (_a) {
|
|
24
|
-
var children = _a.children, href = _a.href, props = __rest(_a, ["children", "href"]);
|
|
25
|
+
var children = _a.children, href = _a.href, _b = _a.isActive, isActive = _b === void 0 ? false : _b, props = __rest(_a, ["children", "href", "isActive"]);
|
|
25
26
|
return (React__default.createElement("li", __assign({}, filterDataAttrs(props)),
|
|
26
|
-
React__default.createElement("a", { className:
|
|
27
|
+
React__default.createElement("a", { className: classNames({
|
|
28
|
+
"arc-UniversalHeader-link": true,
|
|
29
|
+
"arc-UniversalHeader-link--isActive": isActive
|
|
30
|
+
}), href: href }, children)));
|
|
27
31
|
};
|
|
28
32
|
UniversalHeader.Item = UniversalHeaderItem;
|
|
29
33
|
|