@bcgov/design-system-react-components 0.0.3 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +32 -11
- package/dist/cjs/index.cjs +271 -328
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/cjs/types/components/Header/Header.d.ts +11 -0
- package/dist/cjs/types/components/Header/index.d.ts +2 -0
- package/dist/cjs/types/components/Select/Select.d.ts +9 -3
- package/dist/cjs/types/components/Tag/Tag.d.ts +1 -1
- package/dist/cjs/types/components/index.d.ts +1 -1
- package/dist/esm/index.js +270 -328
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/components/Header/Header.d.ts +11 -0
- package/dist/esm/types/components/Header/index.d.ts +2 -0
- package/dist/esm/types/components/Select/Select.d.ts +9 -3
- package/dist/esm/types/components/Tag/Tag.d.ts +1 -1
- package/dist/esm/types/components/index.d.ts +1 -1
- package/dist/index.d.ts +21 -19
- package/package.json +19 -19
package/dist/cjs/index.cjs
CHANGED
|
@@ -545,7 +545,7 @@ function $8ae05eaa5c114e9c$export$7f54fc3180508a52(fn) {
|
|
|
545
545
|
// @ts-ignore
|
|
546
546
|
return ($dGqE5$react.useCallback)((...args)=>{
|
|
547
547
|
const f = ref.current;
|
|
548
|
-
return f(...args);
|
|
548
|
+
return f === null || f === void 0 ? void 0 : f(...args);
|
|
549
549
|
}, []);
|
|
550
550
|
}
|
|
551
551
|
|
|
@@ -556,6 +556,7 @@ function $1dbecbe27a04f9af$export$14d238f342723f25(defaultValue) {
|
|
|
556
556
|
// Store the function in a ref so we can always access the current version
|
|
557
557
|
// which has the proper `value` in scope.
|
|
558
558
|
let nextRef = ($8ae05eaa5c114e9c$export$7f54fc3180508a52)(()=>{
|
|
559
|
+
if (!effect.current) return;
|
|
559
560
|
// Run the generator to the next yield.
|
|
560
561
|
let newValue = effect.current.next();
|
|
561
562
|
// If the generator is done, reset the effect.
|
|
@@ -798,7 +799,7 @@ function $7215afc6de606d6b$var$supportsPreventScroll() {
|
|
|
798
799
|
if ($7215afc6de606d6b$var$supportsPreventScrollCached == null) {
|
|
799
800
|
$7215afc6de606d6b$var$supportsPreventScrollCached = false;
|
|
800
801
|
try {
|
|
801
|
-
|
|
802
|
+
let focusElem = document.createElement("div");
|
|
802
803
|
focusElem.focus({
|
|
803
804
|
get preventScroll () {
|
|
804
805
|
$7215afc6de606d6b$var$supportsPreventScrollCached = true;
|
|
@@ -812,9 +813,9 @@ function $7215afc6de606d6b$var$supportsPreventScroll() {
|
|
|
812
813
|
return $7215afc6de606d6b$var$supportsPreventScrollCached;
|
|
813
814
|
}
|
|
814
815
|
function $7215afc6de606d6b$var$getScrollableElements(element) {
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
816
|
+
let parent = element.parentNode;
|
|
817
|
+
let scrollableElements = [];
|
|
818
|
+
let rootScrollingElement = document.scrollingElement || document.documentElement;
|
|
818
819
|
while(parent instanceof HTMLElement && parent !== rootScrollingElement){
|
|
819
820
|
if (parent.offsetHeight < parent.scrollHeight || parent.offsetWidth < parent.scrollWidth) scrollableElements.push({
|
|
820
821
|
element: parent,
|
|
@@ -991,7 +992,11 @@ let $bbed8b41f857bcc0$var$transitionsByElement = new Map();
|
|
|
991
992
|
let $bbed8b41f857bcc0$var$transitionCallbacks = new Set();
|
|
992
993
|
function $bbed8b41f857bcc0$var$setupGlobalEvents() {
|
|
993
994
|
if (typeof window === "undefined") return;
|
|
995
|
+
function isTransitionEvent(event) {
|
|
996
|
+
return "propertyName" in event;
|
|
997
|
+
}
|
|
994
998
|
let onTransitionStart = (e)=>{
|
|
999
|
+
if (!isTransitionEvent(e) || !e.target) return;
|
|
995
1000
|
// Add the transitioning property to the list for this element.
|
|
996
1001
|
let transitions = $bbed8b41f857bcc0$var$transitionsByElement.get(e.target);
|
|
997
1002
|
if (!transitions) {
|
|
@@ -1000,11 +1005,14 @@ function $bbed8b41f857bcc0$var$setupGlobalEvents() {
|
|
|
1000
1005
|
// The transitioncancel event must be registered on the element itself, rather than as a global
|
|
1001
1006
|
// event. This enables us to handle when the node is deleted from the document while it is transitioning.
|
|
1002
1007
|
// In that case, the cancel event would have nowhere to bubble to so we need to handle it directly.
|
|
1003
|
-
e.target.addEventListener("transitioncancel", onTransitionEnd
|
|
1008
|
+
e.target.addEventListener("transitioncancel", onTransitionEnd, {
|
|
1009
|
+
once: true
|
|
1010
|
+
});
|
|
1004
1011
|
}
|
|
1005
1012
|
transitions.add(e.propertyName);
|
|
1006
1013
|
};
|
|
1007
1014
|
let onTransitionEnd = (e)=>{
|
|
1015
|
+
if (!isTransitionEvent(e) || !e.target) return;
|
|
1008
1016
|
// Remove property from list of transitioning properties.
|
|
1009
1017
|
let properties = $bbed8b41f857bcc0$var$transitionsByElement.get(e.target);
|
|
1010
1018
|
if (!properties) return;
|
|
@@ -1139,7 +1147,7 @@ function $313b98861ee5dd6c$export$d6875122194c7b44(props, defaultLabel) {
|
|
|
1139
1147
|
* governing permissions and limitations under the License.
|
|
1140
1148
|
*/
|
|
1141
1149
|
function $df56164dff5785e2$export$4338b53315abf666(forwardedRef) {
|
|
1142
|
-
const objRef = ($dGqE5$react.useRef)();
|
|
1150
|
+
const objRef = ($dGqE5$react.useRef)(null);
|
|
1143
1151
|
return ($dGqE5$react.useMemo)(()=>({
|
|
1144
1152
|
get current () {
|
|
1145
1153
|
return objRef.current;
|
|
@@ -1232,7 +1240,7 @@ function $e7801be82b4b2a53$export$4debdb1a3f0fa79e(context, ref) {
|
|
|
1232
1240
|
if (context && context.ref && ref) {
|
|
1233
1241
|
context.ref.current = ref.current;
|
|
1234
1242
|
return ()=>{
|
|
1235
|
-
context.ref.current = null;
|
|
1243
|
+
if (context.ref) context.ref.current = null;
|
|
1236
1244
|
};
|
|
1237
1245
|
}
|
|
1238
1246
|
});
|
|
@@ -1250,9 +1258,10 @@ function $e7801be82b4b2a53$export$4debdb1a3f0fa79e(context, ref) {
|
|
|
1250
1258
|
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
1251
1259
|
* governing permissions and limitations under the License.
|
|
1252
1260
|
*/ function $62d8ded9296f3872$export$cfa2225e87938781(node, checkForOverflow) {
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1261
|
+
let scrollableNode = node;
|
|
1262
|
+
if ($62d8ded9296f3872$export$2bb74740c4e19def(scrollableNode, checkForOverflow)) scrollableNode = scrollableNode.parentElement;
|
|
1263
|
+
while(scrollableNode && !$62d8ded9296f3872$export$2bb74740c4e19def(scrollableNode, checkForOverflow))scrollableNode = scrollableNode.parentElement;
|
|
1264
|
+
return scrollableNode || document.scrollingElement || document.documentElement;
|
|
1256
1265
|
}
|
|
1257
1266
|
function $62d8ded9296f3872$export$2bb74740c4e19def(node, checkForOverflow) {
|
|
1258
1267
|
let style = window.getComputedStyle(node);
|
|
@@ -1277,7 +1286,7 @@ function $62d8ded9296f3872$export$2bb74740c4e19def(node, checkForOverflow) {
|
|
|
1277
1286
|
let $ef06256079686ba0$var$descriptionId = 0;
|
|
1278
1287
|
const $ef06256079686ba0$var$descriptionNodes = new Map();
|
|
1279
1288
|
function $ef06256079686ba0$export$f8aeda7b10753fa1(description) {
|
|
1280
|
-
let [id, setId] = ($dGqE5$react.useState)(
|
|
1289
|
+
let [id, setId] = ($dGqE5$react.useState)();
|
|
1281
1290
|
($f0a04ccd8dbdd83b$export$e5c5a5f917a5871c)(()=>{
|
|
1282
1291
|
if (!description) return;
|
|
1283
1292
|
let desc = $ef06256079686ba0$var$descriptionNodes.get(description);
|
|
@@ -1297,7 +1306,7 @@ function $ef06256079686ba0$export$f8aeda7b10753fa1(description) {
|
|
|
1297
1306
|
} else setId(desc.element.id);
|
|
1298
1307
|
desc.refCount++;
|
|
1299
1308
|
return ()=>{
|
|
1300
|
-
if (--desc.refCount === 0) {
|
|
1309
|
+
if (desc && --desc.refCount === 0) {
|
|
1301
1310
|
desc.element.remove();
|
|
1302
1311
|
$ef06256079686ba0$var$descriptionNodes.delete(description);
|
|
1303
1312
|
}
|
|
@@ -1328,7 +1337,7 @@ function $e9faafb641e167db$export$90fc3a17d93f704c(ref, event, handler, options)
|
|
|
1328
1337
|
let handleEvent = ($8ae05eaa5c114e9c$export$7f54fc3180508a52)(handler);
|
|
1329
1338
|
let isDisabled = handler == null;
|
|
1330
1339
|
($dGqE5$react.useEffect)(()=>{
|
|
1331
|
-
if (isDisabled) return;
|
|
1340
|
+
if (isDisabled || !ref.current) return;
|
|
1332
1341
|
let element = ref.current;
|
|
1333
1342
|
element.addEventListener(event, handleEvent, options);
|
|
1334
1343
|
return ()=>{
|
|
@@ -1582,6 +1591,7 @@ function _class_private_field_set(receiver, privateMap, value) {
|
|
|
1582
1591
|
|
|
1583
1592
|
|
|
1584
1593
|
|
|
1594
|
+
|
|
1585
1595
|
/*
|
|
1586
1596
|
* Copyright 2020 Adobe. All rights reserved.
|
|
1587
1597
|
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
@@ -1649,7 +1659,6 @@ function $14c0b72509d70225$export$b0d6fa1ab32e3295(target) {
|
|
|
1649
1659
|
}
|
|
1650
1660
|
|
|
1651
1661
|
|
|
1652
|
-
|
|
1653
1662
|
/*
|
|
1654
1663
|
* Copyright 2020 Adobe. All rights reserved.
|
|
1655
1664
|
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
@@ -1800,8 +1809,13 @@ function $f6c31cce2adf654f$export$45712eceda6fad21(props) {
|
|
|
1800
1809
|
state.isPressed = true;
|
|
1801
1810
|
shouldStopPropagation = triggerPressStart(e, "keyboard");
|
|
1802
1811
|
// Focus may move before the key up event, so register the event on the document
|
|
1803
|
-
// instead of the same element where the key down event occurred.
|
|
1804
|
-
|
|
1812
|
+
// instead of the same element where the key down event occurred. Make it capturing so that it will trigger
|
|
1813
|
+
// before stopPropagation from useKeyboard on a child element may happen and thus we can still call triggerPress for the parent element.
|
|
1814
|
+
let originalTarget = e.currentTarget;
|
|
1815
|
+
let pressUp = (e)=>{
|
|
1816
|
+
if ($f6c31cce2adf654f$var$isValidKeyboardEvent(e, originalTarget) && !e.repeat && originalTarget.contains(e.target) && state.target) triggerPressUp($f6c31cce2adf654f$var$createEvent(state.target, e), "keyboard");
|
|
1817
|
+
};
|
|
1818
|
+
addGlobalListener(($431fbd86ca7dc216$export$b204af158042fbac)(e.currentTarget), "keyup", ($ff5963eb1fccf552$export$e08e3b67e392101e)(pressUp, onKeyUp), true);
|
|
1805
1819
|
}
|
|
1806
1820
|
if (shouldStopPropagation) e.stopPropagation();
|
|
1807
1821
|
// Keep track of the keydown events that occur while the Meta (e.g. Command) key is held.
|
|
@@ -1814,9 +1828,6 @@ function $f6c31cce2adf654f$export$45712eceda6fad21(props) {
|
|
|
1814
1828
|
if (e.metaKey && ($c87311424ea30a05$export$9ac100e40613ea10)()) (_state_metaKeyEvents = state.metaKeyEvents) === null || _state_metaKeyEvents === void 0 ? void 0 : _state_metaKeyEvents.set(e.key, e.nativeEvent);
|
|
1815
1829
|
} else if (e.key === "Meta") state.metaKeyEvents = new Map();
|
|
1816
1830
|
},
|
|
1817
|
-
onKeyUp (e) {
|
|
1818
|
-
if ($f6c31cce2adf654f$var$isValidKeyboardEvent(e.nativeEvent, e.currentTarget) && !e.repeat && e.currentTarget.contains(e.target) && state.target) triggerPressUp($f6c31cce2adf654f$var$createEvent(state.target, e), "keyboard");
|
|
1819
|
-
},
|
|
1820
1831
|
onClick (e) {
|
|
1821
1832
|
if (e && !e.currentTarget.contains(e.target)) return;
|
|
1822
1833
|
if (e && e.button === 0 && !state.isTriggeringEvent && !($ea8dcbcb9ea1b556$export$95185d699e05d4d7).isOpening) {
|
|
@@ -1844,9 +1855,8 @@ function $f6c31cce2adf654f$export$45712eceda6fad21(props) {
|
|
|
1844
1855
|
var _state_metaKeyEvents1;
|
|
1845
1856
|
if ($f6c31cce2adf654f$var$shouldPreventDefaultKeyboard(e.target, e.key)) e.preventDefault();
|
|
1846
1857
|
let target = e.target;
|
|
1847
|
-
|
|
1858
|
+
triggerPressEnd($f6c31cce2adf654f$var$createEvent(state.target, e), "keyboard", state.target.contains(target));
|
|
1848
1859
|
removeAllGlobalListeners();
|
|
1849
|
-
if (shouldStopPropagation) e.stopPropagation();
|
|
1850
1860
|
// If a link was triggered with a key other than Enter, open the URL ourselves.
|
|
1851
1861
|
// This means the link has a role override, and the default browser behavior
|
|
1852
1862
|
// only applies when using the Enter key.
|
|
@@ -2389,7 +2399,7 @@ function $a1ea59d68270f0dd$export$f8168d8dd8fd66e6(props) {
|
|
|
2389
2399
|
|
|
2390
2400
|
let $507fabe10e71c6fb$var$currentModality = null;
|
|
2391
2401
|
let $507fabe10e71c6fb$var$changeHandlers = new Set();
|
|
2392
|
-
let $507fabe10e71c6fb$
|
|
2402
|
+
let $507fabe10e71c6fb$export$d90243b58daecda7 = new Map(); // We use a map here to support setting event listeners across multiple document objects.
|
|
2393
2403
|
let $507fabe10e71c6fb$var$hasEventBeforeFocus = false;
|
|
2394
2404
|
let $507fabe10e71c6fb$var$hasBlurredWindowRecently = false;
|
|
2395
2405
|
// Only Tab or Esc keys will make focus visible on text input elements
|
|
@@ -2448,39 +2458,82 @@ function $507fabe10e71c6fb$var$handleWindowBlur() {
|
|
|
2448
2458
|
}
|
|
2449
2459
|
/**
|
|
2450
2460
|
* Setup global event listeners to control when keyboard focus style should be visible.
|
|
2451
|
-
*/ function $507fabe10e71c6fb$var$setupGlobalFocusEvents() {
|
|
2452
|
-
if (typeof window === "undefined" || $507fabe10e71c6fb$
|
|
2461
|
+
*/ function $507fabe10e71c6fb$var$setupGlobalFocusEvents(element) {
|
|
2462
|
+
if (typeof window === "undefined" || $507fabe10e71c6fb$export$d90243b58daecda7.get(($431fbd86ca7dc216$export$f21a1ffae260145a)(element))) return;
|
|
2463
|
+
const windowObject = ($431fbd86ca7dc216$export$f21a1ffae260145a)(element);
|
|
2464
|
+
const documentObject = ($431fbd86ca7dc216$export$b204af158042fbac)(element);
|
|
2453
2465
|
// Programmatic focus() calls shouldn't affect the current input modality.
|
|
2454
2466
|
// However, we need to detect other cases when a focus event occurs without
|
|
2455
2467
|
// a preceding user event (e.g. screen reader focus). Overriding the focus
|
|
2456
2468
|
// method on HTMLElement.prototype is a bit hacky, but works.
|
|
2457
|
-
let focus = HTMLElement.prototype.focus;
|
|
2458
|
-
HTMLElement.prototype.focus = function() {
|
|
2469
|
+
let focus = windowObject.HTMLElement.prototype.focus;
|
|
2470
|
+
windowObject.HTMLElement.prototype.focus = function() {
|
|
2459
2471
|
$507fabe10e71c6fb$var$hasEventBeforeFocus = true;
|
|
2460
2472
|
focus.apply(this, arguments);
|
|
2461
2473
|
};
|
|
2462
|
-
|
|
2463
|
-
|
|
2464
|
-
|
|
2474
|
+
documentObject.addEventListener("keydown", $507fabe10e71c6fb$var$handleKeyboardEvent, true);
|
|
2475
|
+
documentObject.addEventListener("keyup", $507fabe10e71c6fb$var$handleKeyboardEvent, true);
|
|
2476
|
+
documentObject.addEventListener("click", $507fabe10e71c6fb$var$handleClickEvent, true);
|
|
2465
2477
|
// Register focus events on the window so they are sure to happen
|
|
2466
2478
|
// before React's event listeners (registered on the document).
|
|
2467
|
-
|
|
2468
|
-
|
|
2479
|
+
windowObject.addEventListener("focus", $507fabe10e71c6fb$var$handleFocusEvent, true);
|
|
2480
|
+
windowObject.addEventListener("blur", $507fabe10e71c6fb$var$handleWindowBlur, false);
|
|
2469
2481
|
if (typeof PointerEvent !== "undefined") {
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
|
|
2482
|
+
documentObject.addEventListener("pointerdown", $507fabe10e71c6fb$var$handlePointerEvent, true);
|
|
2483
|
+
documentObject.addEventListener("pointermove", $507fabe10e71c6fb$var$handlePointerEvent, true);
|
|
2484
|
+
documentObject.addEventListener("pointerup", $507fabe10e71c6fb$var$handlePointerEvent, true);
|
|
2473
2485
|
} else {
|
|
2474
|
-
|
|
2475
|
-
|
|
2476
|
-
|
|
2477
|
-
}
|
|
2478
|
-
|
|
2486
|
+
documentObject.addEventListener("mousedown", $507fabe10e71c6fb$var$handlePointerEvent, true);
|
|
2487
|
+
documentObject.addEventListener("mousemove", $507fabe10e71c6fb$var$handlePointerEvent, true);
|
|
2488
|
+
documentObject.addEventListener("mouseup", $507fabe10e71c6fb$var$handlePointerEvent, true);
|
|
2489
|
+
}
|
|
2490
|
+
// Add unmount handler
|
|
2491
|
+
windowObject.addEventListener("beforeunload", ()=>{
|
|
2492
|
+
$507fabe10e71c6fb$var$tearDownWindowFocusTracking(element);
|
|
2493
|
+
}, {
|
|
2494
|
+
once: true
|
|
2495
|
+
});
|
|
2496
|
+
$507fabe10e71c6fb$export$d90243b58daecda7.set(windowObject, {
|
|
2497
|
+
focus: focus
|
|
2498
|
+
});
|
|
2479
2499
|
}
|
|
2480
|
-
|
|
2481
|
-
|
|
2482
|
-
|
|
2500
|
+
const $507fabe10e71c6fb$var$tearDownWindowFocusTracking = (element, loadListener)=>{
|
|
2501
|
+
const windowObject = ($431fbd86ca7dc216$export$f21a1ffae260145a)(element);
|
|
2502
|
+
const documentObject = ($431fbd86ca7dc216$export$b204af158042fbac)(element);
|
|
2503
|
+
if (loadListener) documentObject.removeEventListener("DOMContentLoaded", loadListener);
|
|
2504
|
+
if (!$507fabe10e71c6fb$export$d90243b58daecda7.has(windowObject)) return;
|
|
2505
|
+
windowObject.HTMLElement.prototype.focus = $507fabe10e71c6fb$export$d90243b58daecda7.get(windowObject).focus;
|
|
2506
|
+
documentObject.removeEventListener("keydown", $507fabe10e71c6fb$var$handleKeyboardEvent, true);
|
|
2507
|
+
documentObject.removeEventListener("keyup", $507fabe10e71c6fb$var$handleKeyboardEvent, true);
|
|
2508
|
+
documentObject.removeEventListener("click", $507fabe10e71c6fb$var$handleClickEvent, true);
|
|
2509
|
+
windowObject.removeEventListener("focus", $507fabe10e71c6fb$var$handleFocusEvent, true);
|
|
2510
|
+
windowObject.removeEventListener("blur", $507fabe10e71c6fb$var$handleWindowBlur, false);
|
|
2511
|
+
if (typeof PointerEvent !== "undefined") {
|
|
2512
|
+
documentObject.removeEventListener("pointerdown", $507fabe10e71c6fb$var$handlePointerEvent, true);
|
|
2513
|
+
documentObject.removeEventListener("pointermove", $507fabe10e71c6fb$var$handlePointerEvent, true);
|
|
2514
|
+
documentObject.removeEventListener("pointerup", $507fabe10e71c6fb$var$handlePointerEvent, true);
|
|
2515
|
+
} else {
|
|
2516
|
+
documentObject.removeEventListener("mousedown", $507fabe10e71c6fb$var$handlePointerEvent, true);
|
|
2517
|
+
documentObject.removeEventListener("mousemove", $507fabe10e71c6fb$var$handlePointerEvent, true);
|
|
2518
|
+
documentObject.removeEventListener("mouseup", $507fabe10e71c6fb$var$handlePointerEvent, true);
|
|
2519
|
+
}
|
|
2520
|
+
$507fabe10e71c6fb$export$d90243b58daecda7.delete(windowObject);
|
|
2521
|
+
};
|
|
2522
|
+
function $507fabe10e71c6fb$export$2f1888112f558a7d(element) {
|
|
2523
|
+
const documentObject = ($431fbd86ca7dc216$export$b204af158042fbac)(element);
|
|
2524
|
+
let loadListener;
|
|
2525
|
+
if (documentObject.readyState !== "loading") $507fabe10e71c6fb$var$setupGlobalFocusEvents(element);
|
|
2526
|
+
else {
|
|
2527
|
+
loadListener = ()=>{
|
|
2528
|
+
$507fabe10e71c6fb$var$setupGlobalFocusEvents(element);
|
|
2529
|
+
};
|
|
2530
|
+
documentObject.addEventListener("DOMContentLoaded", loadListener);
|
|
2531
|
+
}
|
|
2532
|
+
return ()=>$507fabe10e71c6fb$var$tearDownWindowFocusTracking(element, loadListener);
|
|
2483
2533
|
}
|
|
2534
|
+
// Server-side rendering does not have the document object defined
|
|
2535
|
+
// eslint-disable-next-line no-restricted-globals
|
|
2536
|
+
if (typeof document !== "undefined") $507fabe10e71c6fb$export$2f1888112f558a7d();
|
|
2484
2537
|
function $507fabe10e71c6fb$export$b9b3dfddab17db27() {
|
|
2485
2538
|
return $507fabe10e71c6fb$var$currentModality !== "pointer";
|
|
2486
2539
|
}
|
|
@@ -2521,8 +2574,12 @@ const $507fabe10e71c6fb$var$nonTextInputTypes = new Set([
|
|
|
2521
2574
|
* focus visible style can be properly set.
|
|
2522
2575
|
*/ function $507fabe10e71c6fb$var$isKeyboardFocusEvent(isTextInput, modality, e) {
|
|
2523
2576
|
var _e_target;
|
|
2524
|
-
|
|
2525
|
-
|
|
2577
|
+
const IHTMLInputElement = typeof window !== "undefined" ? ($431fbd86ca7dc216$export$f21a1ffae260145a)(e === null || e === void 0 ? void 0 : e.target).HTMLInputElement : HTMLInputElement;
|
|
2578
|
+
const IHTMLTextAreaElement = typeof window !== "undefined" ? ($431fbd86ca7dc216$export$f21a1ffae260145a)(e === null || e === void 0 ? void 0 : e.target).HTMLTextAreaElement : HTMLTextAreaElement;
|
|
2579
|
+
const IHTMLElement = typeof window !== "undefined" ? ($431fbd86ca7dc216$export$f21a1ffae260145a)(e === null || e === void 0 ? void 0 : e.target).HTMLElement : HTMLElement;
|
|
2580
|
+
const IKeyboardEvent = typeof window !== "undefined" ? ($431fbd86ca7dc216$export$f21a1ffae260145a)(e === null || e === void 0 ? void 0 : e.target).KeyboardEvent : KeyboardEvent;
|
|
2581
|
+
isTextInput = isTextInput || (e === null || e === void 0 ? void 0 : e.target) instanceof IHTMLInputElement && !$507fabe10e71c6fb$var$nonTextInputTypes.has(e === null || e === void 0 ? void 0 : (_e_target = e.target) === null || _e_target === void 0 ? void 0 : _e_target.type) || (e === null || e === void 0 ? void 0 : e.target) instanceof IHTMLTextAreaElement || (e === null || e === void 0 ? void 0 : e.target) instanceof IHTMLElement && (e === null || e === void 0 ? void 0 : e.target.isContentEditable);
|
|
2582
|
+
return !(isTextInput && modality === "keyboard" && e instanceof IKeyboardEvent && !$507fabe10e71c6fb$var$FOCUS_VISIBLE_INPUT_KEYS[e.key]);
|
|
2526
2583
|
}
|
|
2527
2584
|
function $507fabe10e71c6fb$export$ec71b4b83ac08ec3(fn, deps, opts) {
|
|
2528
2585
|
$507fabe10e71c6fb$var$setupGlobalFocusEvents();
|
|
@@ -4971,6 +5028,7 @@ let $edcf132a9284368a$var$visualViewport = typeof document !== "undefined" && wi
|
|
|
4971
5028
|
function $edcf132a9284368a$var$getContainerDimensions(containerNode) {
|
|
4972
5029
|
let width = 0, height = 0, totalWidth = 0, totalHeight = 0, top = 0, left = 0;
|
|
4973
5030
|
let scroll = {};
|
|
5031
|
+
let isPinchZoomedIn = ($edcf132a9284368a$var$visualViewport === null || $edcf132a9284368a$var$visualViewport === void 0 ? void 0 : $edcf132a9284368a$var$visualViewport.scale) > 1;
|
|
4974
5032
|
if (containerNode.tagName === "BODY") {
|
|
4975
5033
|
let documentElement = document.documentElement;
|
|
4976
5034
|
totalWidth = documentElement.clientWidth;
|
|
@@ -4981,6 +5039,13 @@ function $edcf132a9284368a$var$getContainerDimensions(containerNode) {
|
|
|
4981
5039
|
height = (_visualViewport_height = $edcf132a9284368a$var$visualViewport === null || $edcf132a9284368a$var$visualViewport === void 0 ? void 0 : $edcf132a9284368a$var$visualViewport.height) !== null && _visualViewport_height !== void 0 ? _visualViewport_height : totalHeight;
|
|
4982
5040
|
scroll.top = documentElement.scrollTop || containerNode.scrollTop;
|
|
4983
5041
|
scroll.left = documentElement.scrollLeft || containerNode.scrollLeft;
|
|
5042
|
+
// The goal of the below is to get a top/left value that represents the top/left of the visual viewport with
|
|
5043
|
+
// respect to the layout viewport origin. This combined with the scrollTop/scrollLeft will allow us to calculate
|
|
5044
|
+
// coordinates/values with respect to the visual viewport or with respect to the layout viewport.
|
|
5045
|
+
if ($edcf132a9284368a$var$visualViewport) {
|
|
5046
|
+
top = $edcf132a9284368a$var$visualViewport.offsetTop;
|
|
5047
|
+
left = $edcf132a9284368a$var$visualViewport.offsetLeft;
|
|
5048
|
+
}
|
|
4984
5049
|
} else {
|
|
4985
5050
|
({ width: width, height: height, top: top, left: left } = $edcf132a9284368a$var$getOffset(containerNode));
|
|
4986
5051
|
scroll.top = containerNode.scrollTop;
|
|
@@ -4988,6 +5053,16 @@ function $edcf132a9284368a$var$getContainerDimensions(containerNode) {
|
|
|
4988
5053
|
totalWidth = width;
|
|
4989
5054
|
totalHeight = height;
|
|
4990
5055
|
}
|
|
5056
|
+
if (($c87311424ea30a05$export$78551043582a6a98)() && (containerNode.tagName === "BODY" || containerNode.tagName === "HTML") && isPinchZoomedIn) {
|
|
5057
|
+
// Safari will report a non-zero scrollTop/Left for the non-scrolling body/HTML element when pinch zoomed in unlike other browsers.
|
|
5058
|
+
// Set to zero for parity calculations so we get consistent positioning of overlays across all browsers.
|
|
5059
|
+
// Also switch to visualViewport.pageTop/pageLeft so that we still accomodate for scroll positioning for body/HTML elements that are actually scrollable
|
|
5060
|
+
// before pinch zoom happens
|
|
5061
|
+
scroll.top = 0;
|
|
5062
|
+
scroll.left = 0;
|
|
5063
|
+
top = $edcf132a9284368a$var$visualViewport.pageTop;
|
|
5064
|
+
left = $edcf132a9284368a$var$visualViewport.pageLeft;
|
|
5065
|
+
}
|
|
4991
5066
|
return {
|
|
4992
5067
|
width: width,
|
|
4993
5068
|
height: height,
|
|
@@ -5006,6 +5081,7 @@ function $edcf132a9284368a$var$getScroll(node) {
|
|
|
5006
5081
|
height: node.scrollHeight
|
|
5007
5082
|
};
|
|
5008
5083
|
}
|
|
5084
|
+
// Determines the amount of space required when moving the overlay to ensure it remains in the boundary
|
|
5009
5085
|
function $edcf132a9284368a$var$getDelta(axis, offset, size, // The dimensions of the boundary element that the popover is
|
|
5010
5086
|
// positioned within (most of the time this is the <body>).
|
|
5011
5087
|
boundaryDimensions, // The dimensions of the containing block element that the popover is
|
|
@@ -5013,13 +5089,20 @@ boundaryDimensions, // The dimensions of the containing block element that the p
|
|
|
5013
5089
|
// Usually this is the same as the boundary element, but if the popover
|
|
5014
5090
|
// is portaled somewhere other than the body and has an ancestor with
|
|
5015
5091
|
// position: relative/absolute, it will be different.
|
|
5016
|
-
containerDimensions, padding) {
|
|
5092
|
+
containerDimensions, padding, containerOffsetWithBoundary) {
|
|
5017
5093
|
let containerScroll = containerDimensions.scroll[axis];
|
|
5018
|
-
|
|
5019
|
-
let
|
|
5020
|
-
|
|
5021
|
-
|
|
5022
|
-
|
|
5094
|
+
// The height/width of the boundary. Matches the axis along which we are adjusting the overlay position
|
|
5095
|
+
let boundarySize = boundaryDimensions[$edcf132a9284368a$var$AXIS_SIZE[axis]];
|
|
5096
|
+
// Calculate the edges of the boundary (accomodating for the boundary padding) and the edges of the overlay.
|
|
5097
|
+
// Note that these values are with respect to the visual viewport (aka 0,0 is the top left of the viewport)
|
|
5098
|
+
let boundaryStartEdge = boundaryDimensions.scroll[$edcf132a9284368a$var$AXIS[axis]] + padding;
|
|
5099
|
+
let boundaryEndEdge = boundarySize + boundaryDimensions.scroll[$edcf132a9284368a$var$AXIS[axis]] - padding;
|
|
5100
|
+
let startEdgeOffset = offset - containerScroll + containerOffsetWithBoundary[axis] - boundaryDimensions[$edcf132a9284368a$var$AXIS[axis]];
|
|
5101
|
+
let endEdgeOffset = offset - containerScroll + size + containerOffsetWithBoundary[axis] - boundaryDimensions[$edcf132a9284368a$var$AXIS[axis]];
|
|
5102
|
+
// If any of the overlay edges falls outside of the boundary, shift the overlay the required amount to align one of the overlay's
|
|
5103
|
+
// edges with the closest boundary edge.
|
|
5104
|
+
if (startEdgeOffset < boundaryStartEdge) return boundaryStartEdge - startEdgeOffset;
|
|
5105
|
+
else if (endEdgeOffset > boundaryEndEdge) return Math.max(boundaryEndEdge - endEdgeOffset, boundaryStartEdge - startEdgeOffset);
|
|
5023
5106
|
else return 0;
|
|
5024
5107
|
}
|
|
5025
5108
|
function $edcf132a9284368a$var$getMargins(node) {
|
|
@@ -5063,7 +5146,6 @@ function $edcf132a9284368a$var$computePosition(childOffset, boundaryDimensions,
|
|
|
5063
5146
|
/* else {
|
|
5064
5147
|
the overlay top should match the button top
|
|
5065
5148
|
} */
|
|
5066
|
-
// add the crossOffset from props
|
|
5067
5149
|
position[crossAxis] += crossOffset;
|
|
5068
5150
|
// overlay top overlapping arrow with button bottom
|
|
5069
5151
|
const minPosition = childOffset[crossAxis] - overlaySize[crossSize] + arrowSize + arrowBoundaryOffset;
|
|
@@ -5081,14 +5163,20 @@ function $edcf132a9284368a$var$computePosition(childOffset, boundaryDimensions,
|
|
|
5081
5163
|
} else position[axis] = Math.floor(childOffset[axis] + childOffset[size] + offset);
|
|
5082
5164
|
return position;
|
|
5083
5165
|
}
|
|
5084
|
-
function $edcf132a9284368a$var$getMaxHeight(position, boundaryDimensions, containerOffsetWithBoundary,
|
|
5085
|
-
|
|
5086
|
-
|
|
5087
|
-
|
|
5088
|
-
|
|
5166
|
+
function $edcf132a9284368a$var$getMaxHeight(position, boundaryDimensions, containerOffsetWithBoundary, isContainerPositioned, margins, padding, overlayHeight, heightGrowthDirection) {
|
|
5167
|
+
const containerHeight = isContainerPositioned ? containerOffsetWithBoundary.height : boundaryDimensions[$edcf132a9284368a$var$TOTAL_SIZE.height];
|
|
5168
|
+
// For cases where position is set via "bottom" instead of "top", we need to calculate the true overlay top with respect to the boundary. Reverse calculate this with the same method
|
|
5169
|
+
// used in computePosition.
|
|
5170
|
+
let overlayTop = position.top != null ? containerOffsetWithBoundary.top + position.top : containerOffsetWithBoundary.top + (containerHeight - position.bottom - overlayHeight);
|
|
5171
|
+
let maxHeight = heightGrowthDirection !== "top" ? // We want the distance between the top of the overlay to the bottom of the boundary
|
|
5172
|
+
Math.max(0, boundaryDimensions.height + boundaryDimensions.top + boundaryDimensions.scroll.top // this is the bottom of the boundary
|
|
5173
|
+
- overlayTop // this is the top of the overlay
|
|
5174
|
+
- (margins.top + margins.bottom + padding // save additional space for margin and padding
|
|
5175
|
+
)) : Math.max(0, overlayTop + overlayHeight // this is the bottom of the overlay
|
|
5089
5176
|
- (boundaryDimensions.top + boundaryDimensions.scroll.top // this is the top of the boundary
|
|
5090
5177
|
) - (margins.top + margins.bottom + padding // save additional space for margin and padding
|
|
5091
5178
|
));
|
|
5179
|
+
return Math.min(boundaryDimensions.height - padding * 2, maxHeight);
|
|
5092
5180
|
}
|
|
5093
5181
|
function $edcf132a9284368a$var$getAvailableSpace(boundaryDimensions, containerOffsetWithBoundary, childOffset, margins, padding, placementInfo) {
|
|
5094
5182
|
let { placement: placement, axis: axis, size: size } = placementInfo;
|
|
@@ -5113,13 +5201,22 @@ function $edcf132a9284368a$export$6839422d1f33cee9(placementInput, childOffset,
|
|
|
5113
5201
|
normalizedOffset = offset;
|
|
5114
5202
|
}
|
|
5115
5203
|
}
|
|
5116
|
-
|
|
5204
|
+
// Determine the direction the height of the overlay can grow so that we can choose how to calculate the max height
|
|
5205
|
+
let heightGrowthDirection = "bottom";
|
|
5206
|
+
if (placementInfo.axis === "top") {
|
|
5207
|
+
if (placementInfo.placement === "top") heightGrowthDirection = "top";
|
|
5208
|
+
else if (placementInfo.placement === "bottom") heightGrowthDirection = "bottom";
|
|
5209
|
+
} else if (placementInfo.crossAxis === "top") {
|
|
5210
|
+
if (placementInfo.crossPlacement === "top") heightGrowthDirection = "bottom";
|
|
5211
|
+
else if (placementInfo.crossPlacement === "bottom") heightGrowthDirection = "top";
|
|
5212
|
+
}
|
|
5213
|
+
let delta = $edcf132a9284368a$var$getDelta(crossAxis, position[crossAxis], overlaySize[crossSize], boundaryDimensions, containerDimensions, padding, containerOffsetWithBoundary);
|
|
5117
5214
|
position[crossAxis] += delta;
|
|
5118
|
-
let maxHeight = $edcf132a9284368a$var$getMaxHeight(position, boundaryDimensions, containerOffsetWithBoundary,
|
|
5215
|
+
let maxHeight = $edcf132a9284368a$var$getMaxHeight(position, boundaryDimensions, containerOffsetWithBoundary, isContainerPositioned, margins, padding, overlaySize.height, heightGrowthDirection);
|
|
5119
5216
|
if (userSetMaxHeight && userSetMaxHeight < maxHeight) maxHeight = userSetMaxHeight;
|
|
5120
5217
|
overlaySize.height = Math.min(overlaySize.height, maxHeight);
|
|
5121
5218
|
position = $edcf132a9284368a$var$computePosition(childOffset, boundaryDimensions, overlaySize, placementInfo, normalizedOffset, crossOffset, containerOffsetWithBoundary, isContainerPositioned, arrowSize, arrowBoundaryOffset);
|
|
5122
|
-
delta = $edcf132a9284368a$var$getDelta(crossAxis, position[crossAxis], overlaySize[crossSize], boundaryDimensions, containerDimensions, padding);
|
|
5219
|
+
delta = $edcf132a9284368a$var$getDelta(crossAxis, position[crossAxis], overlaySize[crossSize], boundaryDimensions, containerDimensions, padding, containerOffsetWithBoundary);
|
|
5123
5220
|
position[crossAxis] += delta;
|
|
5124
5221
|
let arrowPosition = {};
|
|
5125
5222
|
// All values are transformed so that 0 is at the top/left of the overlay depending on the orientation
|
|
@@ -5161,7 +5258,14 @@ function $edcf132a9284368a$export$b3ceb0cbf1056d98(opts) {
|
|
|
5161
5258
|
let scrollSize = $edcf132a9284368a$var$getScroll(scrollNode);
|
|
5162
5259
|
let boundaryDimensions = $edcf132a9284368a$var$getContainerDimensions(boundaryElement);
|
|
5163
5260
|
let containerDimensions = $edcf132a9284368a$var$getContainerDimensions(container);
|
|
5261
|
+
// If the container is the HTML element wrapping the body element, the retrieved scrollTop/scrollLeft will be equal to the
|
|
5262
|
+
// body element's scroll. Set the container's scroll values to 0 since the overlay's edge position value in getDelta don't then need to be further offset
|
|
5263
|
+
// by the container scroll since they are essentially the same containing element and thus in the same coordinate system
|
|
5164
5264
|
let containerOffsetWithBoundary = boundaryElement.tagName === "BODY" ? $edcf132a9284368a$var$getOffset(container) : $edcf132a9284368a$var$getPosition(container, boundaryElement);
|
|
5265
|
+
if (container.tagName === "HTML" && boundaryElement.tagName === "BODY") {
|
|
5266
|
+
containerDimensions.scroll.top = 0;
|
|
5267
|
+
containerDimensions.scroll.left = 0;
|
|
5268
|
+
}
|
|
5165
5269
|
return $edcf132a9284368a$export$6839422d1f33cee9(placement, childOffset, overlaySize, scrollSize, margins, padding, shouldFlip, boundaryDimensions, containerDimensions, containerOffsetWithBoundary, offset, crossOffset, isContainerPositioned, maxHeight, arrowSize, arrowBoundaryOffset);
|
|
5166
5270
|
}
|
|
5167
5271
|
function $edcf132a9284368a$var$getOffset(node) {
|
|
@@ -5297,8 +5401,21 @@ function $2a41e45df1593e64$export$d39e1813b3bdd0e1(props) {
|
|
|
5297
5401
|
arrowBoundaryOffset,
|
|
5298
5402
|
arrowSize
|
|
5299
5403
|
];
|
|
5404
|
+
// Note, the position freezing breaks if body sizes itself dynamicly with the visual viewport but that might
|
|
5405
|
+
// just be a non-realistic use case
|
|
5406
|
+
// Upon opening a overlay, record the current visual viewport scale so we can freeze the overlay styles
|
|
5407
|
+
let lastScale = ($dGqE5$react.useRef)($2a41e45df1593e64$var$visualViewport === null || $2a41e45df1593e64$var$visualViewport === void 0 ? void 0 : $2a41e45df1593e64$var$visualViewport.scale);
|
|
5408
|
+
($dGqE5$react.useEffect)(()=>{
|
|
5409
|
+
if (isOpen) lastScale.current = $2a41e45df1593e64$var$visualViewport === null || $2a41e45df1593e64$var$visualViewport === void 0 ? void 0 : $2a41e45df1593e64$var$visualViewport.scale;
|
|
5410
|
+
}, [
|
|
5411
|
+
isOpen
|
|
5412
|
+
]);
|
|
5300
5413
|
let updatePosition = ($dGqE5$react.useCallback)(()=>{
|
|
5301
5414
|
if (shouldUpdatePosition === false || !isOpen || !overlayRef.current || !targetRef.current || !scrollRef.current || !boundaryElement) return;
|
|
5415
|
+
if (($2a41e45df1593e64$var$visualViewport === null || $2a41e45df1593e64$var$visualViewport === void 0 ? void 0 : $2a41e45df1593e64$var$visualViewport.scale) !== lastScale.current) return;
|
|
5416
|
+
// Always reset the overlay's previous max height if not defined by the user so that we can compensate for
|
|
5417
|
+
// RAC collections populating after a second render and properly set a correct max height + positioning when it populates.
|
|
5418
|
+
if (!maxHeight && overlayRef.current) overlayRef.current.style.maxHeight = "none";
|
|
5302
5419
|
let position = ($edcf132a9284368a$export$b3ceb0cbf1056d98)({
|
|
5303
5420
|
placement: $2a41e45df1593e64$var$translateRTL(placement, direction),
|
|
5304
5421
|
overlayNode: overlayRef.current,
|
|
@@ -5344,11 +5461,16 @@ function $2a41e45df1593e64$export$d39e1813b3bdd0e1(props) {
|
|
|
5344
5461
|
}, 500);
|
|
5345
5462
|
updatePosition();
|
|
5346
5463
|
};
|
|
5464
|
+
// Only reposition the overlay if a scroll event happens immediately as a result of resize (aka the virtual keyboard has appears)
|
|
5465
|
+
// We don't want to reposition the overlay if the user has pinch zoomed in and is scrolling the viewport around.
|
|
5466
|
+
let onScroll = ()=>{
|
|
5467
|
+
if (isResizing.current) onResize();
|
|
5468
|
+
};
|
|
5347
5469
|
$2a41e45df1593e64$var$visualViewport === null || $2a41e45df1593e64$var$visualViewport === void 0 ? void 0 : $2a41e45df1593e64$var$visualViewport.addEventListener("resize", onResize);
|
|
5348
|
-
$2a41e45df1593e64$var$visualViewport === null || $2a41e45df1593e64$var$visualViewport === void 0 ? void 0 : $2a41e45df1593e64$var$visualViewport.addEventListener("scroll",
|
|
5470
|
+
$2a41e45df1593e64$var$visualViewport === null || $2a41e45df1593e64$var$visualViewport === void 0 ? void 0 : $2a41e45df1593e64$var$visualViewport.addEventListener("scroll", onScroll);
|
|
5349
5471
|
return ()=>{
|
|
5350
5472
|
$2a41e45df1593e64$var$visualViewport === null || $2a41e45df1593e64$var$visualViewport === void 0 ? void 0 : $2a41e45df1593e64$var$visualViewport.removeEventListener("resize", onResize);
|
|
5351
|
-
$2a41e45df1593e64$var$visualViewport === null || $2a41e45df1593e64$var$visualViewport === void 0 ? void 0 : $2a41e45df1593e64$var$visualViewport.removeEventListener("scroll",
|
|
5473
|
+
$2a41e45df1593e64$var$visualViewport === null || $2a41e45df1593e64$var$visualViewport === void 0 ? void 0 : $2a41e45df1593e64$var$visualViewport.removeEventListener("scroll", onScroll);
|
|
5352
5474
|
};
|
|
5353
5475
|
}, [
|
|
5354
5476
|
updatePosition
|
|
@@ -6415,7 +6537,8 @@ function $ae20dd8cbca75726$export$d6daf82dcd84e87c(options) {
|
|
|
6415
6537
|
let element = scrollRef.current.querySelector(`[data-key="${CSS.escape(manager.focusedKey.toString())}"]`);
|
|
6416
6538
|
if (element && (modality === "keyboard" || autoFocusRef.current)) {
|
|
6417
6539
|
if (!isVirtualized) ($2f04cbc44ee30ce0$export$53a0910f038337bd)(scrollRef.current, element);
|
|
6418
|
-
(
|
|
6540
|
+
// Avoid scroll in iOS VO, since it may cause overlay to close (i.e. RAC submenu)
|
|
6541
|
+
if (modality !== "virtual") ($2f04cbc44ee30ce0$export$c826860796309d1b)(element, {
|
|
6419
6542
|
containingElement: ref.current
|
|
6420
6543
|
});
|
|
6421
6544
|
}
|
|
@@ -6744,7 +6867,7 @@ class $2a25aae57d74318e$export$a05409b8bb224a5a {
|
|
|
6744
6867
|
let key = this.collection.getFirstKey();
|
|
6745
6868
|
while(key != null){
|
|
6746
6869
|
let item = this.collection.getItem(key);
|
|
6747
|
-
if (item.type === "item" && !this.disabledKeys.has(key)) return key;
|
|
6870
|
+
if ((item === null || item === void 0 ? void 0 : item.type) === "item" && !this.disabledKeys.has(key)) return key;
|
|
6748
6871
|
key = this.collection.getKeyAfter(key);
|
|
6749
6872
|
}
|
|
6750
6873
|
return null;
|
|
@@ -7761,120 +7884,6 @@ function $168583247155ddda$export$dc9c12ed27dd1b49(props, state, ref) {
|
|
|
7761
7884
|
};
|
|
7762
7885
|
}
|
|
7763
7886
|
|
|
7764
|
-
/*
|
|
7765
|
-
* Copyright 2020 Adobe. All rights reserved.
|
|
7766
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
7767
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
7768
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
7769
|
-
*
|
|
7770
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
7771
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
7772
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
7773
|
-
* governing permissions and limitations under the License.
|
|
7774
|
-
*/ /*
|
|
7775
|
-
* Copyright 2020 Adobe. All rights reserved.
|
|
7776
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
7777
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
7778
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
7779
|
-
*
|
|
7780
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
7781
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
7782
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
7783
|
-
* governing permissions and limitations under the License.
|
|
7784
|
-
*/
|
|
7785
|
-
|
|
7786
|
-
|
|
7787
|
-
|
|
7788
|
-
|
|
7789
|
-
|
|
7790
|
-
|
|
7791
|
-
function $2d73ec29415bd339$export$712718f7aec83d5(props, ref) {
|
|
7792
|
-
let { inputElementType: inputElementType = "input", isDisabled: isDisabled = false, isRequired: isRequired = false, isReadOnly: isReadOnly = false, type: type = "text", validationBehavior: validationBehavior = "aria" } = props;
|
|
7793
|
-
let [value, setValue] = ($458b0a5536c1a7cf$export$40bfa8c7b0832715)(props.value, props.defaultValue || "", props.onChange);
|
|
7794
|
-
let { focusableProps: focusableProps } = ($e6afbd83fe6ebbd2$export$4c014de7c8940b4c)(props, ref);
|
|
7795
|
-
let validationState = ($e5be200c675c3b3a$export$fc1a364ae1f3ff10)({
|
|
7796
|
-
...props,
|
|
7797
|
-
value: value
|
|
7798
|
-
});
|
|
7799
|
-
let { isInvalid: isInvalid, validationErrors: validationErrors, validationDetails: validationDetails } = validationState.displayValidation;
|
|
7800
|
-
let { labelProps: labelProps, fieldProps: fieldProps, descriptionProps: descriptionProps, errorMessageProps: errorMessageProps } = ($2baaea4c71418dea$export$294aa081a6c6f55d)({
|
|
7801
|
-
...props,
|
|
7802
|
-
isInvalid: isInvalid,
|
|
7803
|
-
errorMessage: props.errorMessage || validationErrors
|
|
7804
|
-
});
|
|
7805
|
-
let domProps = ($65484d02dcb7eb3e$export$457c3d6518dd4c6f)(props, {
|
|
7806
|
-
labelable: true
|
|
7807
|
-
});
|
|
7808
|
-
const inputOnlyProps = {
|
|
7809
|
-
type: type,
|
|
7810
|
-
pattern: props.pattern
|
|
7811
|
-
};
|
|
7812
|
-
($99facab73266f662$export$5add1d006293d136)(ref, value, setValue);
|
|
7813
|
-
($e93e671b31057976$export$b8473d3665f3a75a)(props, validationState, ref);
|
|
7814
|
-
($dGqE5$react.useEffect)(()=>{
|
|
7815
|
-
// This works around a React/Chrome bug that prevents textarea elements from validating when controlled.
|
|
7816
|
-
// We prevent React from updating defaultValue (i.e. children) of textarea when `value` changes,
|
|
7817
|
-
// which causes Chrome to skip validation. Only updating `value` is ok in our case since our
|
|
7818
|
-
// textareas are always controlled. React is planning on removing this synchronization in a
|
|
7819
|
-
// future major version.
|
|
7820
|
-
// https://github.com/facebook/react/issues/19474
|
|
7821
|
-
// https://github.com/facebook/react/issues/11896
|
|
7822
|
-
if (ref.current instanceof ($431fbd86ca7dc216$export$f21a1ffae260145a)(ref.current).HTMLTextAreaElement) {
|
|
7823
|
-
let input = ref.current;
|
|
7824
|
-
Object.defineProperty(input, "defaultValue", {
|
|
7825
|
-
get: ()=>input.value,
|
|
7826
|
-
set: ()=>{},
|
|
7827
|
-
configurable: true
|
|
7828
|
-
});
|
|
7829
|
-
}
|
|
7830
|
-
}, [
|
|
7831
|
-
ref
|
|
7832
|
-
]);
|
|
7833
|
-
return {
|
|
7834
|
-
labelProps: labelProps,
|
|
7835
|
-
inputProps: ($3ef42575df84b30b$export$9d1611c77c2fe928)(domProps, inputElementType === "input" && inputOnlyProps, {
|
|
7836
|
-
disabled: isDisabled,
|
|
7837
|
-
readOnly: isReadOnly,
|
|
7838
|
-
required: isRequired && validationBehavior === "native",
|
|
7839
|
-
"aria-required": isRequired && validationBehavior === "aria" || undefined,
|
|
7840
|
-
"aria-invalid": isInvalid || undefined,
|
|
7841
|
-
"aria-errormessage": props["aria-errormessage"],
|
|
7842
|
-
"aria-activedescendant": props["aria-activedescendant"],
|
|
7843
|
-
"aria-autocomplete": props["aria-autocomplete"],
|
|
7844
|
-
"aria-haspopup": props["aria-haspopup"],
|
|
7845
|
-
value: value,
|
|
7846
|
-
onChange: (e)=>setValue(e.target.value),
|
|
7847
|
-
autoComplete: props.autoComplete,
|
|
7848
|
-
autoCapitalize: props.autoCapitalize,
|
|
7849
|
-
maxLength: props.maxLength,
|
|
7850
|
-
minLength: props.minLength,
|
|
7851
|
-
name: props.name,
|
|
7852
|
-
placeholder: props.placeholder,
|
|
7853
|
-
inputMode: props.inputMode,
|
|
7854
|
-
// Clipboard events
|
|
7855
|
-
onCopy: props.onCopy,
|
|
7856
|
-
onCut: props.onCut,
|
|
7857
|
-
onPaste: props.onPaste,
|
|
7858
|
-
// Composition events
|
|
7859
|
-
onCompositionEnd: props.onCompositionEnd,
|
|
7860
|
-
onCompositionStart: props.onCompositionStart,
|
|
7861
|
-
onCompositionUpdate: props.onCompositionUpdate,
|
|
7862
|
-
// Selection events
|
|
7863
|
-
onSelect: props.onSelect,
|
|
7864
|
-
// Input events
|
|
7865
|
-
onBeforeInput: props.onBeforeInput,
|
|
7866
|
-
onInput: props.onInput,
|
|
7867
|
-
...focusableProps,
|
|
7868
|
-
...fieldProps
|
|
7869
|
-
}),
|
|
7870
|
-
descriptionProps: descriptionProps,
|
|
7871
|
-
errorMessageProps: errorMessageProps,
|
|
7872
|
-
isInvalid: isInvalid,
|
|
7873
|
-
validationErrors: validationErrors,
|
|
7874
|
-
validationDetails: validationDetails
|
|
7875
|
-
};
|
|
7876
|
-
}
|
|
7877
|
-
|
|
7878
7887
|
var $682989befd4f478d$exports = {};
|
|
7879
7888
|
$682989befd4f478d$exports = {
|
|
7880
7889
|
"deselectedItem": (args)=>`${args.item} \u{63A}\u{64A}\u{631} \u{627}\u{644}\u{645}\u{62D}\u{62F}\u{62F}`,
|
|
@@ -9392,7 +9401,7 @@ function $d7323bca8d074eeb$export$4f8b5cda58b7e8ff(props, state, ref) {
|
|
|
9392
9401
|
// If the last tag is removed, focus the container.
|
|
9393
9402
|
let prevCount = ($dGqE5$react.useRef)(state.collection.size);
|
|
9394
9403
|
($dGqE5$react.useEffect)(()=>{
|
|
9395
|
-
if (prevCount.current > 0 && state.collection.size === 0 && isFocusWithin) ref.current.focus();
|
|
9404
|
+
if (ref.current && prevCount.current > 0 && state.collection.size === 0 && isFocusWithin) ref.current.focus();
|
|
9396
9405
|
prevCount.current = state.collection.size;
|
|
9397
9406
|
}, [
|
|
9398
9407
|
state.collection.size,
|
|
@@ -9504,18 +9513,19 @@ function $fc6126c82a4601f1$export$3f568fff7dff2f03(props, state, ref) {
|
|
|
9504
9513
|
}, state, ref);
|
|
9505
9514
|
// We want the group to handle keyboard navigation between tags.
|
|
9506
9515
|
delete rowProps.onKeyDownCapture;
|
|
9507
|
-
|
|
9516
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
9517
|
+
let { descriptionProps: _, ...stateWithoutDescription } = states;
|
|
9508
9518
|
let onKeyDown = (e)=>{
|
|
9509
9519
|
if (e.key === "Delete" || e.key === "Backspace") {
|
|
9510
9520
|
e.preventDefault();
|
|
9511
|
-
if (state.selectionManager.isSelected(item.key)) onRemove(new Set(state.selectionManager.selectedKeys));
|
|
9512
|
-
else onRemove(new Set([
|
|
9521
|
+
if (state.selectionManager.isSelected(item.key)) onRemove === null || onRemove === void 0 ? void 0 : onRemove(new Set(state.selectionManager.selectedKeys));
|
|
9522
|
+
else onRemove === null || onRemove === void 0 ? void 0 : onRemove(new Set([
|
|
9513
9523
|
item.key
|
|
9514
9524
|
]));
|
|
9515
9525
|
}
|
|
9516
9526
|
};
|
|
9517
9527
|
let modality = ($507fabe10e71c6fb$export$98e20ec92f614cfe)();
|
|
9518
|
-
if (modality === "virtual" && typeof window !== "undefined" && "ontouchstart" in window) modality = "
|
|
9528
|
+
if (modality === "virtual" && typeof window !== "undefined" && "ontouchstart" in window) modality = "pointer";
|
|
9519
9529
|
let description = onRemove && (modality === "keyboard" || modality === "virtual") ? stringFormatter.format("removeDescription") : "";
|
|
9520
9530
|
let descProps = ($ef06256079686ba0$export$f8aeda7b10753fa1)(description);
|
|
9521
9531
|
let isFocused = item.key === state.selectionManager.focusedKey;
|
|
@@ -9541,7 +9551,7 @@ function $fc6126c82a4601f1$export$3f568fff7dff2f03(props, state, ref) {
|
|
|
9541
9551
|
"aria-errormessage": props["aria-errormessage"],
|
|
9542
9552
|
"aria-label": props["aria-label"]
|
|
9543
9553
|
}),
|
|
9544
|
-
...
|
|
9554
|
+
...stateWithoutDescription,
|
|
9545
9555
|
allowsRemoving: !!onRemove
|
|
9546
9556
|
};
|
|
9547
9557
|
}
|
|
@@ -10575,7 +10585,10 @@ function $parcel$interopDefault(a) {
|
|
|
10575
10585
|
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
10576
10586
|
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
10577
10587
|
* governing permissions and limitations under the License.
|
|
10578
|
-
*/
|
|
10588
|
+
*/ // Mark as a client only package. This will cause a build time error if you try
|
|
10589
|
+
// to import it from a React Server Component in a framework like Next.js.
|
|
10590
|
+
|
|
10591
|
+
/*
|
|
10579
10592
|
* Copyright 2022 Adobe. All rights reserved.
|
|
10580
10593
|
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
10581
10594
|
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
@@ -10985,7 +10998,7 @@ class $7135fc7d473fd974$export$b34a105447964f9f extends $7135fc7d473fd974$var$Ba
|
|
|
10985
10998
|
updateCollection() {
|
|
10986
10999
|
for (let element of this.dirtyNodes)if (element instanceof $7135fc7d473fd974$export$dc064fe9e59310fd && element.isConnected) element.updateNode();
|
|
10987
11000
|
this.dirtyNodes.clear();
|
|
10988
|
-
if (this.mutatedNodes.size) {
|
|
11001
|
+
if (this.mutatedNodes.size || this.collectionMutated) {
|
|
10989
11002
|
var _this_firstChild, _this_lastChild;
|
|
10990
11003
|
let collection = this.getMutableCollection();
|
|
10991
11004
|
for (let element of this.mutatedNodes)if (element.isConnected) collection.addNode(element.node);
|
|
@@ -11033,6 +11046,7 @@ class $7135fc7d473fd974$export$b34a105447964f9f extends $7135fc7d473fd974$var$Ba
|
|
|
11033
11046
|
function $7135fc7d473fd974$export$727c8fc270210f13(props) {
|
|
11034
11047
|
let { children: children, items: items, idScope: idScope, addIdAndValue: addIdAndValue, dependencies: dependencies = [] } = props;
|
|
11035
11048
|
// Invalidate the cache whenever the parent value changes.
|
|
11049
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
11036
11050
|
let cache = ($dGqE5$react.useMemo)(()=>new WeakMap(), dependencies);
|
|
11037
11051
|
return ($dGqE5$react.useMemo)(()=>{
|
|
11038
11052
|
if (items && typeof children === "function") {
|
|
@@ -11582,22 +11596,6 @@ function $01b77f81d0f07f68$var$Label(props, ref) {
|
|
|
11582
11596
|
});
|
|
11583
11597
|
}
|
|
11584
11598
|
const $01b77f81d0f07f68$export$b04be29aa201d4f5 = /*#__PURE__*/ ($64fa3d84918910a7$export$86427a43e3e48ebb)($01b77f81d0f07f68$var$Label);
|
|
11585
|
-
|
|
11586
|
-
|
|
11587
|
-
/*
|
|
11588
|
-
* Copyright 2022 Adobe. All rights reserved.
|
|
11589
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
11590
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
11591
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
11592
|
-
*
|
|
11593
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
11594
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
11595
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
11596
|
-
* governing permissions and limitations under the License.
|
|
11597
|
-
*/
|
|
11598
|
-
|
|
11599
|
-
|
|
11600
|
-
const $3985021b0ad6602f$export$37fb8590cf2c088c = /*#__PURE__*/ ($dGqE5$react.createContext)({});
|
|
11601
11599
|
const $d8f176866e6dc039$export$f55761759794cf55 = /*#__PURE__*/ ($dGqE5$react.createContext)(null);
|
|
11602
11600
|
function $d8f176866e6dc039$var$DropIndicator(props, ref) {
|
|
11603
11601
|
let { render: render } = ($dGqE5$react.useContext)($d8f176866e6dc039$export$f55761759794cf55);
|
|
@@ -11940,11 +11938,13 @@ function $eed445e0843c11d0$var$ListBoxItem(props, ref) {
|
|
|
11940
11938
|
* A ListBoxItem represents an individual option in a ListBox.
|
|
11941
11939
|
*/ const $eed445e0843c11d0$export$a11e76429ed99b4 = /*#__PURE__*/ ($dGqE5$react.forwardRef)($eed445e0843c11d0$var$ListBoxItem);
|
|
11942
11940
|
function $eed445e0843c11d0$var$Option({ item: item }) {
|
|
11941
|
+
var _item_props;
|
|
11943
11942
|
let ref = ($df56164dff5785e2$export$4338b53315abf666)(item.props.ref);
|
|
11944
11943
|
let state = ($dGqE5$react.useContext)($eed445e0843c11d0$export$7c5906fe4f1f2af2);
|
|
11945
11944
|
let { dragAndDropHooks: dragAndDropHooks, dragState: dragState, dropState: dropState } = ($dGqE5$react.useContext)(($d8f176866e6dc039$export$d188a835a7bc5783));
|
|
11946
11945
|
let { optionProps: optionProps, labelProps: labelProps, descriptionProps: descriptionProps, ...states } = ($293f70390ea03370$export$497855f14858aa34)({
|
|
11947
|
-
key: item.key
|
|
11946
|
+
key: item.key,
|
|
11947
|
+
"aria-label": (_item_props = item.props) === null || _item_props === void 0 ? void 0 : _item_props["aria-label"]
|
|
11948
11948
|
}, state, ref);
|
|
11949
11949
|
let { hoverProps: hoverProps, isHovered: isHovered } = ($6179b936705e76d3$export$ae780daf29e6d456)({
|
|
11950
11950
|
isDisabled: !states.allowsSelection && !states.hasAction
|
|
@@ -12161,6 +12161,7 @@ function $07b14b47974efb58$var$PopoverInner({ state: state, isExiting: isExiting
|
|
|
12161
12161
|
isExiting: isExiting,
|
|
12162
12162
|
portalContainer: UNSTABLE_portalContainer
|
|
12163
12163
|
}, !props.isNonModal && state.isOpen && /*#__PURE__*/ ($dGqE5$react).createElement("div", {
|
|
12164
|
+
"data-testid": "underlay",
|
|
12164
12165
|
...underlayProps,
|
|
12165
12166
|
style: {
|
|
12166
12167
|
position: "fixed",
|
|
@@ -12723,163 +12724,105 @@ function $eaf9e70818b436db$var$TagItem({ item: item }) {
|
|
|
12723
12724
|
}, renderProps.children)));
|
|
12724
12725
|
}
|
|
12725
12726
|
|
|
12726
|
-
|
|
12727
|
-
|
|
12728
|
-
|
|
12729
|
-
|
|
12730
|
-
|
|
12731
|
-
const $216918bed6669f72$export$2dc6166a7e65358c = /*#__PURE__*/ ($dGqE5$react.createContext)({});
|
|
12732
|
-
|
|
12733
|
-
|
|
12734
|
-
/*
|
|
12735
|
-
* Copyright 2022 Adobe. All rights reserved.
|
|
12736
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
12737
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
12738
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
12739
|
-
*
|
|
12740
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
12741
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
12742
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
12743
|
-
* governing permissions and limitations under the License.
|
|
12744
|
-
*/
|
|
12745
|
-
|
|
12746
|
-
|
|
12747
|
-
|
|
12748
|
-
|
|
12749
|
-
|
|
12750
|
-
|
|
12751
|
-
|
|
12752
|
-
|
|
12753
|
-
const $bcdf0525bf22703d$export$2129e27b3ef0d483 = /*#__PURE__*/ ($dGqE5$react.createContext)(null);
|
|
12754
|
-
function $bcdf0525bf22703d$var$TextField(props, ref) {
|
|
12755
|
-
[props, ref] = ($64fa3d84918910a7$export$29f1550f4b0d4415)(props, ref, $bcdf0525bf22703d$export$2129e27b3ef0d483);
|
|
12756
|
-
let inputRef = ($dGqE5$react.useRef)(null);
|
|
12757
|
-
let [labelRef, label] = ($64fa3d84918910a7$export$9d4c57ee4c6ffdd8)();
|
|
12758
|
-
let [inputElementType, setInputElementType] = ($dGqE5$react.useState)("input");
|
|
12759
|
-
var _props_validationBehavior;
|
|
12760
|
-
let { labelProps: labelProps, inputProps: inputProps, descriptionProps: descriptionProps, errorMessageProps: errorMessageProps, ...validation } = ($2d73ec29415bd339$export$712718f7aec83d5)({
|
|
12761
|
-
...($64fa3d84918910a7$export$ef03459518577ad4)(props),
|
|
12762
|
-
inputElementType: inputElementType,
|
|
12763
|
-
label: label,
|
|
12764
|
-
validationBehavior: (_props_validationBehavior = props.validationBehavior) !== null && _props_validationBehavior !== void 0 ? _props_validationBehavior : "native"
|
|
12765
|
-
}, inputRef);
|
|
12766
|
-
// Intercept setting the input ref so we can determine what kind of element we have.
|
|
12767
|
-
// useTextField uses this to determine what props to include.
|
|
12768
|
-
let inputOrTextAreaRef = ($dGqE5$react.useCallback)((el)=>{
|
|
12769
|
-
inputRef.current = el;
|
|
12770
|
-
if (el) setInputElementType(el instanceof HTMLTextAreaElement ? "textarea" : "input");
|
|
12771
|
-
}, []);
|
|
12772
|
-
let renderProps = ($64fa3d84918910a7$export$4d86445c2cf5e3)({
|
|
12773
|
-
...props,
|
|
12774
|
-
values: {
|
|
12775
|
-
isDisabled: props.isDisabled || false,
|
|
12776
|
-
isInvalid: validation.isInvalid
|
|
12777
|
-
},
|
|
12778
|
-
defaultClassName: "react-aria-TextField"
|
|
12779
|
-
});
|
|
12780
|
-
return /*#__PURE__*/ ($dGqE5$react).createElement("div", {
|
|
12781
|
-
...($65484d02dcb7eb3e$export$457c3d6518dd4c6f)(props),
|
|
12782
|
-
...renderProps,
|
|
12783
|
-
ref: ref,
|
|
12784
|
-
slot: props.slot || undefined,
|
|
12785
|
-
"data-disabled": props.isDisabled || undefined,
|
|
12786
|
-
"data-invalid": validation.isInvalid || undefined
|
|
12787
|
-
}, /*#__PURE__*/ ($dGqE5$react).createElement(($64fa3d84918910a7$export$2881499e37b75b9a), {
|
|
12788
|
-
values: [
|
|
12789
|
-
[
|
|
12790
|
-
($01b77f81d0f07f68$export$75b6ee27786ba447),
|
|
12791
|
-
{
|
|
12792
|
-
...labelProps,
|
|
12793
|
-
ref: labelRef
|
|
12794
|
-
}
|
|
12795
|
-
],
|
|
12796
|
-
[
|
|
12797
|
-
($3985021b0ad6602f$export$37fb8590cf2c088c),
|
|
12798
|
-
{
|
|
12799
|
-
...inputProps,
|
|
12800
|
-
ref: inputOrTextAreaRef
|
|
12801
|
-
}
|
|
12802
|
-
],
|
|
12803
|
-
[
|
|
12804
|
-
($216918bed6669f72$export$2dc6166a7e65358c),
|
|
12805
|
-
{
|
|
12806
|
-
...inputProps,
|
|
12807
|
-
ref: inputOrTextAreaRef
|
|
12808
|
-
}
|
|
12809
|
-
],
|
|
12810
|
-
[
|
|
12811
|
-
($514c0188e459b4c0$export$9afb8bc826b033ea),
|
|
12812
|
-
{
|
|
12813
|
-
slots: {
|
|
12814
|
-
description: descriptionProps,
|
|
12815
|
-
errorMessage: errorMessageProps
|
|
12816
|
-
}
|
|
12817
|
-
}
|
|
12818
|
-
],
|
|
12819
|
-
[
|
|
12820
|
-
($ee014567cb39d3f0$export$ff05c3ac10437e03),
|
|
12821
|
-
validation
|
|
12822
|
-
]
|
|
12823
|
-
]
|
|
12824
|
-
}, renderProps.children));
|
|
12825
|
-
}
|
|
12826
|
-
/**
|
|
12827
|
-
* A text field allows a user to enter a plain text value with a keyboard.
|
|
12828
|
-
*/ ($dGqE5$react.forwardRef)($bcdf0525bf22703d$var$TextField);
|
|
12829
|
-
|
|
12830
|
-
var css_248z$5 = ".react-aria-Button {\n border: none;\n border-radius: var(--layout-border-radius-medium, 4px);\n cursor: pointer;\n display: inline-flex;\n align-items: center;\n gap: var(--layout-padding-small);\n font: var(--typography-regular-body);\n padding-left: 16px;\n padding-right: 16px;\n}\n.react-aria-Button[data-disabled] {\n cursor: not-allowed;\n}\n.react-aria-Button[data-focused] {\n outline: 2px solid var(--surface-primary-active);\n}\n\n/* Icon button */\n.react-aria-Button.icon {\n align-items: center;\n justify-content: space-around;\n}\n\n/* Sizes */\n.react-aria-Button.small {\n min-height: 32px;\n}\n.react-aria-Button.small.icon {\n padding: unset;\n height: 32px;\n width: 32px;\n}\n.react-aria-Button.medium {\n min-height: 40px;\n}\n.react-aria-Button.medium.icon {\n padding: unset;\n height: 40px;\n width: 40px;\n}\n\n/* Variant - Primary */\n.react-aria-Button.primary {\n background: var(--surface-primary-default);\n color: var(--typography-color-primary-invert);\n}\n.react-aria-Button.primary.danger {\n background-color: var(--surface-danger-default);\n}\n.react-aria-Button.primary[data-disabled] {\n background-color: var(--surface-primary-disabled);\n color: var(--typography-color-disabled);\n}\n.react-aria-Button.primary[data-hovered] {\n background-color: var(--surface-primary-hover);\n}\n.react-aria-Button.primary.danger[data-hovered] {\n background-color: var(--surface-danger-hover);\n}\n\n/* Variant - Secondary */\n.react-aria-Button.secondary {\n background-color: var(--surface-secondary-default);\n border: 1px solid var(--surface-border-dark);\n color: var(--typography-color-primary);\n}\n.react-aria-Button.secondary.danger {\n border-color: var(--surface-support-border-color-danger);\n color: var(--surface-danger-default);\n}\n.react-aria-Button.secondary[data-disabled] {\n background-color: var(--surface-primary-disabled);\n border-color: var(--surface-border-light);\n color: var(--typography-color-disabled);\n}\n.react-aria-Button.secondary[data-hovered] {\n background-color: var(--surface-secondary-hover);\n}\n.react-aria-Button.secondary.danger[data-hovered] {\n background-color: var(--surface-support-surface-color-danger);\n}\n\n/* Variant - Tertiary */\n.react-aria-Button.tertiary {\n background-color: var(--surface-tertiary-default);\n color: var(--typography-color-primary);\n}\n.react-aria-Button.tertiary.danger {\n color: var(--surface-danger-default);\n}\n.react-aria-Button.tertiary[data-disabled] {\n background-color: var(--surface-tertiary-default);\n color: var(--typography-color-disabled);\n}\n.react-aria-Button.tertiary[data-hovered] {\n background-color: var(--surface-tertiary-hover);\n}\n.react-aria-Button.tertiary.danger[data-hovered] {\n background-color: var(--surface-support-surface-color-danger);\n}\n\n/* Variant - Link */\n.react-aria-Button.link {\n background-color: var(--surface-tertiary-default);\n color: var(--typography-color-link);\n text-decoration: underline;\n text-underline-offset: 0.3em;\n}\n.react-aria-Button.link.danger {\n color: var(--surface-danger-default);\n}\n.react-aria-Button.link[data-disabled] {\n color: var(--typography-color-disabled);\n}\n";
|
|
12727
|
+
var css_248z$5 = ".bcds-react-aria-Button {\n border: none;\n border-radius: var(--layout-border-radius-medium, 4px);\n cursor: pointer;\n display: inline-flex;\n align-items: center;\n gap: var(--layout-padding-small);\n font: var(--typography-regular-body);\n padding-left: 16px;\n padding-right: 16px;\n}\n.bcds-react-aria-Button[data-disabled] {\n cursor: not-allowed;\n}\n.bcds-react-aria-Button[data-focused] {\n outline: 2px solid var(--surface-primary-active);\n}\n\n/* Icon button */\n.bcds-react-aria-Button.icon {\n align-items: center;\n justify-content: space-around;\n}\n\n/* Sizes */\n.bcds-react-aria-Button.small {\n min-height: 32px;\n}\n.bcds-react-aria-Button.small.icon {\n padding: unset;\n height: 32px;\n width: 32px;\n min-width: 32px;\n}\n.bcds-react-aria-Button.medium {\n min-height: 40px;\n}\n.bcds-react-aria-Button.medium.icon {\n padding: unset;\n height: 40px;\n width: 40px;\n min-width: 40px;\n}\n\n/* Variant - Primary */\n.bcds-react-aria-Button.primary {\n background: var(--surface-primary-default);\n color: var(--typography-color-primary-invert);\n}\n.bcds-react-aria-Button.primary.danger {\n background-color: var(--surface-danger-default);\n}\n.bcds-react-aria-Button.primary[data-disabled] {\n background-color: var(--surface-primary-disabled);\n color: var(--typography-color-disabled);\n}\n.bcds-react-aria-Button.primary[data-hovered] {\n background-color: var(--surface-primary-hover);\n}\n.bcds-react-aria-Button.primary.danger[data-hovered] {\n background-color: var(--surface-danger-hover);\n}\n\n/* Variant - Secondary */\n.bcds-react-aria-Button.secondary {\n background-color: var(--surface-secondary-default);\n border: 1px solid var(--surface-border-dark);\n color: var(--typography-color-primary);\n}\n.bcds-react-aria-Button.secondary.danger {\n border-color: var(--surface-support-border-color-danger);\n color: var(--surface-danger-default);\n}\n.bcds-react-aria-Button.secondary[data-disabled] {\n background-color: var(--surface-primary-disabled);\n border-color: var(--surface-border-light);\n color: var(--typography-color-disabled);\n}\n.bcds-react-aria-Button.secondary[data-hovered] {\n background-color: var(--surface-secondary-hover);\n}\n.bcds-react-aria-Button.secondary.danger[data-hovered] {\n background-color: var(--surface-support-surface-color-danger);\n}\n\n/* Variant - Tertiary */\n.bcds-react-aria-Button.tertiary {\n background-color: var(--surface-tertiary-default);\n color: var(--typography-color-primary);\n}\n.bcds-react-aria-Button.tertiary.danger {\n color: var(--surface-danger-default);\n}\n.bcds-react-aria-Button.tertiary[data-disabled] {\n background-color: var(--surface-tertiary-default);\n color: var(--typography-color-disabled);\n}\n.bcds-react-aria-Button.tertiary[data-hovered] {\n background-color: var(--surface-tertiary-hover);\n}\n.bcds-react-aria-Button.tertiary.danger[data-hovered] {\n background-color: var(--surface-support-surface-color-danger);\n}\n\n/* Variant - Link */\n.bcds-react-aria-Button.link {\n background-color: var(--surface-tertiary-default);\n color: var(--typography-color-link);\n text-decoration: underline;\n text-underline-offset: 0.3em;\n}\n.bcds-react-aria-Button.link.danger {\n color: var(--surface-danger-default);\n}\n.bcds-react-aria-Button.link[data-disabled] {\n color: var(--typography-color-disabled);\n}\n";
|
|
12831
12728
|
styleInject(css_248z$5);
|
|
12832
12729
|
|
|
12833
12730
|
function Button({ size = "medium", variant = "primary", danger = false, isIconButton = false, ...props }) {
|
|
12834
|
-
return (jsxRuntime.jsx($d2b4bc8c273e7be6$export$353f5b6fc5456de1, { className: `react-aria-Button ${size} ${variant} ${danger ? "danger" : ""} ${isIconButton ? "icon" : ""}`, ...props }));
|
|
12731
|
+
return (jsxRuntime.jsx($d2b4bc8c273e7be6$export$353f5b6fc5456de1, { className: `bcds-react-aria-Button ${size} ${variant} ${danger ? "danger" : ""} ${isIconButton ? "icon" : ""}`, ...props }));
|
|
12835
12732
|
}
|
|
12836
12733
|
|
|
12837
|
-
var css_248z$4 = ".
|
|
12734
|
+
var css_248z$4 = ".bcds-header {\n box-sizing: border-box;\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-around;\n background-color: var(--surface-background-white);\n border-bottom-color: var(--surface-border-light);\n border-bottom-style: solid;\n border-bottom-width: var(--layout-border-width-small);\n min-height: 65px;\n padding: var(--layout-padding-none) var(--layout-padding-medium);\n width: 100%;\n}\n\n.bcds-header > .bcds-header--container {\n flex-grow: 1;\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: var(--layout-padding-medium);\n max-width: 1100px;\n}\n\n.bcds-header > .bcds-header--container > .bcds-header--title {\n flex-grow: 1;\n font: var(--typography-bold-h4);\n color: var(--typography-color-primary);\n}\n\n.bcds-header > .bcds-header--container > ul.bcds-header--skiplinks {\n list-style: none;\n margin: 0;\n padding: 0;\n position: absolute;\n}\n\n.bcds-header > .bcds-header--container > ul.bcds-header--skiplinks li a,\n.bcds-header > .bcds-header--container > ul.bcds-header--skiplinks li button {\n background-color: var(--surface-background-white);\n box-sizing: border-box;\n color: var(--typography-color-link);\n font: var(--typography-regular-body);\n margin-top: -17.5px; /* Center the link visually in a single line header */\n padding: var(--layout-padding-xsmall) var(--layout-padding-medium);\n position: absolute;\n margin-left: -100000px;\n}\n\n.bcds-header > .bcds-header--container > ul.bcds-header--skiplinks li a:focus,\n.bcds-header\n > .bcds-header--container\n > ul.bcds-header--skiplinks\n li\n button:focus {\n margin-left: 0; /* Line up left edge with left edge of logo image */\n text-wrap: nowrap;\n}\n\n.bcds-header > .bcds-header--container > .bcds-header--line {\n background-color: var(--surface-border-light);\n width: 1px;\n height: 32px;\n}\n\n.bcds-header > .bcds-header--container svg#bcgov-logo {\n min-width: 129px;\n width: 129px;\n}\n";
|
|
12838
12735
|
styleInject(css_248z$4);
|
|
12839
12736
|
|
|
12737
|
+
// This logo is available as a plain SVG at src/assets/BCID_H_rgb_pos.svg
|
|
12738
|
+
function SvgBcLogo() {
|
|
12739
|
+
return (jsxRuntime.jsxs("svg", { id: "bcgov-logo", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 847.65 327.01", children: [jsxRuntime.jsx("path", { d: "M109.59,226.32c44.7,0,106.54,25.17,151.41,25.17,32.02,0,63.26-8.54,81.04-21.13,1.24-7.39,1.9-14.97,1.9-22.72,0-75.13-60.91-136.04-136.04-136.04s-136.04,60.91-136.04,136.04c0,7.65.64,15.15,1.86,22.46,4.9-.91,21.57-3.79,35.87-3.79Z", style: { fill: "#fff", strokeWidth: "0px" } }), jsxRuntime.jsxs("g", { children: [jsxRuntime.jsxs("g", { children: [jsxRuntime.jsx("rect", { x: "415.4", y: "252.98", width: "314.66", height: "3.82", style: { fill: "#e3a82b", strokeWidth: "0px" } }), jsxRuntime.jsx("path", { d: "M423.47,116.64c0-6.39-.45-8.08-4.76-8.43l-3-.21c-.49-.39-.35-2.12.1-2.16,5.17-.46,11.69-.69,20.6-.69,6.04,0,11.79.43,16.1,2.42,4.12,1.81,7.28,5.26,7.28,10.79,0,6.22-4.03,9.41-9.77,11.83,0,.86.77,1.12,1.82,1.29,5.17.86,12.84,5.18,12.84,14.42,0,10.01-8.24,16.75-25.49,16.75-2.78,0-7.47-.26-11.5-.26s-7.47.17-11.02.26c-.57-.26-.77-1.64-.19-2.16l1.73-.26c5.08-.78,5.27-1.73,5.27-10.79v-32.8ZM431.32,128.12c0,2.42.1,2.59,4.98,2.42,9.77-.35,15.04-2.94,15.04-11.05s-7-11.65-14.28-11.65c-2.11,0-3.55.17-4.41.52-.96.26-1.34.69-1.34,2.24v17.52ZM431.32,148.14c0,3.11.19,7.51,2.01,9.41,1.82,1.98,4.7,2.42,7.57,2.42,8.53,0,15.04-3.45,15.04-12.08,0-6.82-3.83-14.76-19.07-14.76-5.17,0-5.56.52-5.56,2.24v12.77Z", style: { fill: "#234075", strokeWidth: "0px" } }), jsxRuntime.jsx("path", { d: "M531.26,125.14c0-7.82-.16-9.07-4.99-9.44l-2.05-.15c-.49-.29-.33-1.62.16-1.84,4.09.15,6.87.22,10.31.22s6.06-.07,10.15-.22c.49.22.65,1.55.16,1.84l-2.04.15c-4.83.37-4.99,1.62-4.99,9.44v26.25c0,7.82.16,8.85,4.99,9.36l2.04.22c.49.29.33,1.62-.16,1.84-4.09-.15-6.87-.22-10.15-.22-3.44,0-6.22.07-10.31.22-.49-.22-.66-1.4-.16-1.84l2.05-.22c4.83-.52,4.99-1.55,4.99-9.36v-26.25Z", style: { fill: "#234075", strokeWidth: "0px" } }), jsxRuntime.jsx("path", { d: "M576.66,151.53c0,7.74.15,8.85,4.6,9.22l2.45.22c.46.29.31,1.62-.15,1.84-4.37-.15-6.98-.22-10.05-.22s-5.75.07-10.66.22c-.46-.22-.62-1.47,0-1.84l2.76-.22c4.37-.37,4.75-1.48,4.75-9.22v-32.96c0-2.28,0-2.36-2.3-2.36h-4.22c-3.3,0-7.51.15-9.43,1.84-1.84,1.62-2.61,3.24-3.45,5.09-.62.44-1.69.07-1.99-.52,1.22-3.32,2.38-8.04,2.91-10.98.23-.15,1.23-.22,1.46,0,.46,2.36,2.99,2.29,6.52,2.29h31.05c4.14,0,4.83-.15,5.98-2.06.38-.15,1.23-.07,1.38.22-.84,3.02-1.38,9-1.15,11.21-.31.59-1.61.59-1.99.15-.23-1.84-.77-4.57-1.92-5.38-1.76-1.25-4.68-1.84-8.89-1.84h-5.44c-2.3,0-2.22.07-2.22,2.51v32.81Z", style: { fill: "#234075", strokeWidth: "0px" } }), jsxRuntime.jsx("path", { d: "M609.53,125.14c0-7.82-.16-9.07-4.99-9.44l-2.05-.15c-.49-.29-.33-1.62.16-1.84,4.09.15,6.87.22,10.31.22s6.05-.07,10.15-.22c.49.22.66,1.55.17,1.84l-2.05.15c-4.83.37-4.99,1.62-4.99,9.44v26.25c0,7.82.16,8.85,4.99,9.36l2.05.22c.49.29.33,1.62-.17,1.84-4.09-.15-6.87-.22-10.15-.22-3.44,0-6.22.07-10.31.22-.49-.22-.65-1.4-.16-1.84l2.05-.22c4.83-.52,4.99-1.55,4.99-9.36v-26.25Z", style: { fill: "#234075", strokeWidth: "0px" } }), jsxRuntime.jsx("path", { d: "M646.2,163.57c-7.31,0-11.92-1.92-13.57-2.73-1.04-1.62-2.18-6.86-2.35-10.32.44-.52,1.74-.66,2.09-.22,1.31,3.76,4.87,10.98,14.96,10.98,7.31,0,10.87-4.05,10.87-8.48,0-3.24-.78-6.86-7.13-10.32l-8.26-4.57c-4.35-2.43-9.4-6.64-9.4-12.68,0-7,6.44-12.68,17.75-12.68,2.7,0,5.83.44,8.09.96,1.13.29,2.35.44,3.04.44.78,1.77,1.57,5.9,1.57,9-.35.44-1.74.66-2.18.22-1.13-3.54-3.48-8.33-11.83-8.33s-10.35,4.79-10.35,8.18c0,4.28,4.18,7.38,7.39,9.07l6.96,3.69c5.48,2.88,10.88,7.15,10.88,14.16,0,8.11-7.22,13.64-18.53,13.64Z", style: { fill: "#234075", strokeWidth: "0px" } }), jsxRuntime.jsx("path", { d: "M689.99,138.78c-3.81,0-3.96.15-3.96,2.36v10.4c0,7.74.4,8.77,4.84,9.22l2.3.22c.48.29.32,1.62-.16,1.84-4.28-.15-6.98-.22-10.08-.22-3.41,0-6.11.15-9.2.22-.47-.22-.63-1.4-.16-1.84l1.35-.22c4.45-.74,4.6-1.48,4.6-9.22v-26.54c0-7.74-.55-8.99-4.68-9.29l-2.06-.15c-.48-.29-.32-1.62.16-1.84,3.89.07,6.58.22,10,.22,3.1,0,5.79-.07,9.2-.22.48.22.63,1.55.16,1.84l-1.51.15c-4.6.44-4.76,1.55-4.76,9.29v8.48c0,2.28.16,2.36,3.96,2.36h22.69c3.81,0,3.97-.07,3.97-2.36v-8.48c0-7.74-.16-8.85-4.84-9.29l-1.51-.15c-.48-.29-.32-1.62.16-1.84,3.65.15,6.35.22,9.6.22s5.79-.07,9.36-.22c.48.22.63,1.55.16,1.84l-1.66.15c-4.6.44-4.76,1.55-4.76,9.29v26.54c0,7.74.16,8.7,4.76,9.22l1.9.22c.47.29.32,1.62-.16,1.84-3.81-.15-6.51-.22-9.6-.22-3.25,0-6.11.07-9.6.22-.48-.22-.63-1.4-.16-1.84l1.51-.22c4.84-.74,4.84-1.48,4.84-9.22v-10.4c0-2.21-.16-2.36-3.97-2.36h-22.69Z", style: { fill: "#234075", strokeWidth: "0px" } }), jsxRuntime.jsx("path", { d: "M378.06,179.01c6.52-5.07,14.83-7.57,24.12-7.57,4.82,0,11.61.98,15.81,2.14,1.07.27,1.7.45,2.5.36.09,2.05.54,7.65,1.25,13.09-.45.62-1.79.71-2.41.18-1.34-6.05-5.36-13-18.31-13-13.67,0-25.28,8.64-25.28,27.06s11.88,29.02,26.53,29.02c11.52,0,16.62-7.48,18.67-12.73.63-.44,1.97-.27,2.32.36-.62,4.63-2.95,10.5-4.29,12.2-1.07.18-2.14.53-3.13.89-1.97.71-8.4,2.05-14.11,2.05-8.04,0-15.72-1.6-22.24-5.96-7.15-4.9-12.69-12.99-12.69-24.48,0-9.88,4.47-18.34,11.26-23.59Z", style: { fill: "#234075", strokeWidth: "0px" } }), jsxRuntime.jsx("path", { d: "M426.92,207.81c0-14.75,11.61-26.03,27.56-26.03,17.88,0,26.86,12.31,26.86,25.29,0,14.89-11.92,25.73-26.86,25.73-17.19,0-27.56-11.72-27.56-25ZM473.6,209.35c0-12.17-5.65-25.29-20.44-25.29-8.05,0-18.5,5.24-18.5,21.38,0,10.91,5.57,25.07,20.82,25.07,9.29,0,18.12-6.64,18.12-21.16Z", style: { fill: "#234075", strokeWidth: "0px" } }), jsxRuntime.jsx("path", { d: "M568.68,201.47c0-4.57-.16-13.05-1.49-15.26-.55-.89-1.95-1.4-3.91-1.55l-1.95-.15c-.47-.52-.31-1.47.15-1.77,2.97.15,5.86.22,8.91.22,3.28,0,5.39-.08,8.21-.22.62.37.55,1.33.16,1.77l-1.88.15c-1.95.15-3.44.81-3.91,1.77-1.09,2.43-1.09,10.91-1.09,15.04v8.33c0,6.42-1.1,13.2-5.47,17.62-3.36,3.47-9.14,5.38-14.93,5.38-5.39,0-10.79-.96-14.62-4.05-4.14-3.24-6.1-8.63-6.1-17.4v-17.4c0-7.67-.16-8.92-4.69-9.29l-1.96-.15c-.47-.29-.31-1.55.15-1.77,3.91.15,6.57.22,9.69.22s5.78-.08,9.61-.22c.47.22.63,1.47.16,1.77l-1.88.15c-4.53.37-4.69,1.62-4.69,9.29v15.93c0,11.87,3.91,19.69,15.87,19.69,11.33,0,15.63-8.41,15.63-19.61v-8.48Z", style: { fill: "#234075", strokeWidth: "0px" } }), jsxRuntime.jsx("path", { d: "M659.52,192.26c0-5.51-.35-6.93-4.23-7.22l-2.77-.27c-.31-.28-.48-1.78.09-1.82,4.67-.35,10.54-.59,18.57-.59,5.44,0,10.62.37,14.51,2.08,3.71,1.57,6.56,4.54,6.56,9.31,0,5.36-3.63,8.12-8.81,10.2,0,.75.69.97,1.64,1.12,4.67.74,11.58,4.47,11.58,12.44,0,8.64-7.43,14.45-22.98,14.45-2.5,0-6.74-.22-10.37-.22s-6.74.15-9.93.22c-.52-.22-.69-1.41-.17-1.86l1.55-.22c4.58-.67,4.75-1.49,4.75-9.31v-28.3ZM666.6,202.16c0,2.09.09,2.24,4.49,2.09,8.81-.3,13.56-2.53,13.56-9.53s-6.3-10.05-12.87-10.05c-1.9,0-3.2.15-3.97.45-.87.22-1.21.59-1.21,1.94v15.12ZM666.6,219.44c0,2.68.17,6.48,1.81,8.12,1.64,1.71,4.23,2.08,6.82,2.08,7.69,0,13.56-2.98,13.56-10.43,0-5.88-3.45-12.73-17.19-12.73-4.67,0-5.01.44-5.01,1.94v11.02Z", style: { fill: "#234075", strokeWidth: "0px" } }), jsxRuntime.jsx("path", { d: "M518.75,160.97l-2.05-.18c-.41-.04-.78-.1-1.13-.15-2.99-.53-4.19-3.2-5.6-5.67l-7.08-12.32c-1.22-2.05-2.53-4.82-5.33-5.21,7.25-.87,13.81-5.06,13.81-12.24,0-8.3-8.21-12.01-16.52-12.01-4.98,0-9.52.13-14.59.13-2.79,0-6.12-.13-8.92-.13-1.55,0-1.57.32-1.57,1.18,0,1.28.54.92,2.19,1.02,5.9.33,5.68,1.43,5.68,6.49v32.31c0,4.62.4,6-4.46,6.44,0,0-.74.08-1.17.12l-2.06.21c-.49.44-.33,1.62.16,1.84,1.09-.04,3.03-.12,3.03-.12,2.69-.08,5.38-.28,8.06-.28s5.29.21,7.95.29h0c.94.03,1.94.07,3.03.1.49-.22.66-1.4.16-1.84l-2.07-.2c-.42-.05-1.15-.11-1.15-.11-4.9-.33-4.6-1.71-4.6-6.46v-12.17c0-.71-.09-2.61.44-3.16.44-.48,1.22-.4,1.92-.4,6.64,0,6.55.63,9.7,6.16l8.56,15.4c.7,1.19,1.22,2.69,2.97,2.69h7.44c.94.03,1.92.06,3.01.1.49-.22.65-1.4.16-1.84ZM488.92,136.74c-1.49,0-4.46.55-4.46-1.42v-14.14c0-5.53.18-6.32,6.82-6.32,7.78,0,12.58,3.95,12.58,11.22,0,3.16-1.14,6.08-4.02,8.06-3.32,2.29-6.9,2.61-10.92,2.61Z", style: { fill: "#234075", strokeWidth: "0px" } }), jsxRuntime.jsxs("g", { children: [jsxRuntime.jsx("path", { d: "M490.53,194.2c0-7.74-.16-8.92-5.27-9.29l-2.03-.15c-.49-.3-.32-1.62.16-1.84,4.54.15,7.3.22,10.54.22s5.92-.07,9.98-.22c.49.22.65,1.55.16,1.84l-1.95.15c-4.78.37-4.95,1.55-4.95,9.29v25.66c0,4.64.24,6.56,1.7,7.96.89.81,2.43,1.7,8.84,1.7,6.89,0,8.6-.3,9.9-.96,1.62-.89,3.73-3.54,5.35-7.3.49-.37,2.03-.07,2.03.44,0,.81-2.27,8.33-3.41,10.32-4.13-.15-11.84-.22-20.2-.22h-7.46c-3.41,0-6,.07-10.54.22-.49-.22-.65-1.4-.16-1.84l2.43-.22c4.7-.44,4.87-1.48,4.87-9.22v-26.54Z", style: { fill: "#234075", strokeWidth: "0px" } }), jsxRuntime.jsx("path", { d: "M707.79,194.34c0-7.81-.16-9.07-4.86-9.44l-1.99-.15c-.48-.3-.32-1.62.16-1.84,3.98.15,6.69.22,10.03.22s5.89-.07,9.87-.22c.48.22.64,1.55.16,1.84l-1.99.15c-4.7.37-4.86,1.62-4.86,9.44v26.25c0,7.82.16,8.85,4.86,9.36l1.99.22c.48.3.32,1.62-.16,1.84-3.98-.15-6.69-.22-9.87-.22-3.35,0-6.05.07-10.03.22-.48-.22-.64-1.4-.16-1.84l1.99-.22c4.7-.52,4.86-1.55,4.86-9.36v-26.25Z", style: { fill: "#234075", strokeWidth: "0px" } }), jsxRuntime.jsx("path", { d: "M644.16,229.94c-.41-.04-1.17-.1-1.17-.1-.84-.08-1.59-.2-2.19-.86-1.03-1.1-.95-4.23-.95-5.48v-32.31c0-1.41-.34-4.46.69-5.56.52-.58,1.59-.67,2.55-.73h0c.58-.05.6-.05,1.11-.07l2.05-.15c.49-.3.33-1.62-.16-1.84-1.09.04-2.09.02-3.03.05h0s-8.7,0-8.7,0c-.95,0-1.81,0-2.32,1.02l-17.73,36.92-15.66-35.67c-.52-1.25-.6-2.27-2.24-2.27h-9.05c-.94-.03-1.98-.02-3.08-.06-.49.22-.66,1.55-.16,1.84l2.05.15c.42.03,1.19.09,1.19.09,3.4.22,3.61.98,3.3,4.55l-2.67,34.65c-.23,3.48-.42,5.32-4.07,5.66,0,0-.77.1-1.19.14l-2.04.22c-.49.44-.33,1.62.16,1.84,1.08-.04,3-.1,3-.1,1.85-.09,3.73-.25,5.61-.25,2.03,0,4.06.19,6.1.27h0c.94.03,1.94.07,3.03.1.49-.22.66-1.4.16-1.84l-2.04-.22c-.54-.04-1.14-.1-1.14-.1-5.26-.36-5.14-4.07-4.81-8.62l2.5-32.23h.6l16.95,39.66c.17.55.43,1.49,1.29,1.49.78,0,1.03-.86,1.29-1.41l19.1-40.68h.6v35.44c0,1.41.17,4.3-1.29,5.4-.76.57-3.25.91-3.25.91-.34.05-.7.1-1.11.15l-2.04.22c-.49.44-.33,1.62.16,1.84,1.08-.04,2.99-.1,2.99-.1,2.77-.08,5.59-.28,8.41-.28,2.03,0,6,.19,6,.19.95.03,2.02.13,3.12.17.49-.22.66-1.4.16-1.84l-2.05-.22Z", style: { fill: "#234075", strokeWidth: "0px" } }), jsxRuntime.jsx("path", { d: "M777.13,230.14l-.28-.22c-.41-.04-.77-.09-1.11-.15-3.19-.71-4.43-4.55-5.61-7.29l-16.41-38.83c-.16-.47-.49-1.47-1.14-1.47-.89,0-1.14,1.08-1.38,1.7l-15.68,38.76c-.57,1.47-2.03,5.03-3.09,6.11-.81.83-1.86.99-2.99,1.1,0,0-.88.08-1.31.13l-1.93.2c-.49.44-.33,1.62.16,1.84,1.09-.04,3.03-.11,3.03-.11,2.14-.03,4.29-.3,6.44-.3,1.81,0,3.61.19,5.41.27,0,0,1.94.07,3.03.11.49-.22.65-1.4.16-1.84l-2.05-.22c-.41-.04-1.11-.11-1.11-.11-1.89-.21-4.24-.55-4.24-2.62,0-1.39.65-3.02,1.14-4.25l2.44-5.8c1.22-2.78.73-3.1,3.98-3.1h11.05c3.9,0,3.33,0,5.04,3.95l2.6,5.88c.41,1.01,1.14,2.71,1.14,3.79,0,1.94-2.12,2.07-4.11,2.24,0,0-.66.06-1.23.1l-1.97.14c-.49.44-.33,1.62.17,1.84,1.09-.04,3.03-.12,3.03-.12,2.31-.08,4.64-.26,6.87-.26,2.85,0,5.69.19,8.54.27h0c.93.03.14.06,1.22.1.49-.22.65-1.4.16-1.84ZM755.64,211.89h-9.57c-.33,0-3,.31-3-.47,0-.24.17-.7.25-.94l5.75-14.23c.17-.39.75-2.35,1.41-2.35.5,0,1.17,2.03,1.33,2.35l5.66,13.29c0,.16.58,1.41.58,1.72,0,.86-1.91.62-2.41.62Z", style: { fill: "#234075", strokeWidth: "0px" } })] }), jsxRuntime.jsx("rect", { width: "847.65", height: "327.01", style: { fill: "none", strokeWidth: "0px" } })] }), jsxRuntime.jsxs("g", { children: [jsxRuntime.jsx("polygon", { points: "295.89 176.17 301.27 178.4 313.19 170.08 295.89 176.17", style: { fill: "#e3a82b", strokeWidth: "0px" } }), jsxRuntime.jsx("path", { d: "M95.46,166.88l-14.14-4.97.71-1.73,15.92,5.31.07-.04,2.1-1.19.84-.53-17.36-7.39.73-1.82,38.75,15.67,1.28-.53-38.44-18.73.86-1.76,40.73,18.96.56-.29-39.49-22.4.81-1.68,57.03,31.03c.47-.86,1.44-2.44,1.95-3.28-21.68-20.39-42.61-35.69-42.61-35.69,0,0,21.52,14.41,48.07,27.81.88-1.09,1.6-1.97,2.53-3.01l-48.65-42.83,1.31-1.34,39.27,33.47-36.38-36.43,1.36-1.41,40.84,39.47-38.02-42.2,1.45-1.31,35.14,37.63-32.07-40.41,1.38-1.26,41.11,50.03c1.06-.92,1.95-1.61,3.06-2.46-12.44-26.91-26.02-48.8-26.02-48.8,0,0,14.46,21.28,33.96,43.56,1.19-.67,2.4-1.31,3.63-1.92l-.21-.13-28.81-57.5,1.71-.75,23.87,45.74-20.08-47.41,1.79-.8,23.08,51.9-19.45-53.37,1.84-.67,18.49,48.05-14.6-49.49,1.75-.65,19.22,61.38-.04.16.05-.02c1.28-.43,2.58-.81,3.89-1.16-1.46-29.48-5.82-54.7-5.82-54.7,0,0,5.4,25,15.08,52.87,1.35-.17,2.71-.31,4.07-.4l-.04-.06h.17l-.1-.14-5.17-64.11,1.87-.06,5,51.35-.86-51.48,1.96-.07,1.96,56.77,1.96-56.77,1.96.07-.86,51.48,5-51.35,1.87.06-5.17,64.11-.1.14h.03v.02s.07,0,.07,0c1.34.08,2.66.22,3.98.38,9.67-27.84,15.06-52.8,15.06-52.8,0,0-4.35,25.14-5.82,54.57,1.32.35,2.63.73,3.91,1.15l19.15-61.16,1.76.65-14.6,49.48,18.49-48.05,1.84.67-19.45,53.37,23.08-51.9,1.79.8-20.08,47.41,23.87-45.74,1.71.75-28.71,57.3.05.02c1.18.58,2.34,1.19,3.49,1.83,19.42-22.21,33.79-43.37,33.79-43.37,0,0-13.49,21.74-25.89,48.52,1.11.84,2.19,1.7,3.24,2.6l40.63-49.49,1.39,1.26-32.08,40.41,35.14-37.63,1.45,1.31-38.02,42.2,40.84-39.47,1.36,1.41-36.38,36.43,39.27-33.47,1.31,1.34-48.06,42.35.03.03c.84.94,1.65,1.9,2.44,2.88,26.39-13.34,47.71-27.62,47.71-27.62,0,0-20.72,15.16-42.29,35.4.59.99,1.55,2.67,2.09,3.69l56.22-30.61.81,1.69-44.88,25.45,46.68-21.72.86,1.76-43.48,21.19.83.29,44.24-17.89.74,1.82-41.12,17.49.77.32,27.4-9.13,4.13-2.88,1.37,1.05,9.02-3.01.71,1.73-7.8,2.75,11.27,8.6,3.61,2.01c-14.49-60.58-68.98-105.62-134-105.62s-121.42,46.63-134.73,108.82c.17-.08.34-.16.51-.24l1.65-.75,1.01-.47,19.01-10.66Z", style: { fill: "#e3a82b", strokeWidth: "0px" } })] }), jsxRuntime.jsx("path", { d: "M72.5,233.02s20.32-4.06,37.29-4.06c44.7,0,106.54,25.17,151.41,25.17,32.91,0,65.02-9.03,82.51-22.19,1.37-7.79,2.08-15.8,2.08-23.98,0-11.08-1.32-21.85-3.79-32.17l-18.7-10.43-21.95,15.39-14.76-5.75c-5,2.53-35.83,23.15-35.83,23.15l-11.84-8.57-12.7-2.51-16.93-12.33-19.42,13.33s-21.67,12.58-22.41,12.58-26.14-20.13-26.14-20.13l-11.7-12.33c-1.99,1.26-9.95,4.91-9.95,4.91l-.41.11-7.7-2.38-9.35-4.96-28.41,12.88c-.17.08-.34.16-.51.24-2,9.34-3.06,19.03-3.06,28.96,0,8.56.79,16.93,2.28,25.06Z", style: { fill: "#234075", strokeWidth: "0px" } })] })] }));
|
|
12740
|
+
}
|
|
12741
|
+
function Header({ children, logoLinkElement, logoImage = jsxRuntime.jsx(SvgBcLogo, {}), skipLinks, title = "", titleElement = "span", }) {
|
|
12742
|
+
function getLogo() {
|
|
12743
|
+
if (!logoLinkElement)
|
|
12744
|
+
return (jsxRuntime.jsx("a", { href: "/", title: "Government of British Columbia", children: logoImage }));
|
|
12745
|
+
return $dGqE5$react.cloneElement(logoLinkElement, { children: logoImage });
|
|
12746
|
+
}
|
|
12747
|
+
function getTitle() {
|
|
12748
|
+
switch (titleElement) {
|
|
12749
|
+
case "h1":
|
|
12750
|
+
return jsxRuntime.jsx("h1", { className: "bcds-header--title", children: title });
|
|
12751
|
+
case "h2":
|
|
12752
|
+
return jsxRuntime.jsx("h2", { className: "bcds-header--title", children: title });
|
|
12753
|
+
case "h3":
|
|
12754
|
+
return jsxRuntime.jsx("h3", { className: "bcds-header--title", children: title });
|
|
12755
|
+
case "h4":
|
|
12756
|
+
return jsxRuntime.jsx("h4", { className: "bcds-header--title", children: title });
|
|
12757
|
+
case "h5":
|
|
12758
|
+
return jsxRuntime.jsx("h5", { className: "bcds-header--title", children: title });
|
|
12759
|
+
case "h6":
|
|
12760
|
+
return jsxRuntime.jsx("h6", { className: "bcds-header--title", children: title });
|
|
12761
|
+
case "p":
|
|
12762
|
+
return jsxRuntime.jsx("p", { className: "bcds-header--title", children: title });
|
|
12763
|
+
default:
|
|
12764
|
+
return jsxRuntime.jsx("span", { className: "bcds-header--title", children: title });
|
|
12765
|
+
}
|
|
12766
|
+
}
|
|
12767
|
+
return (jsxRuntime.jsx("header", { className: "bcds-header", children: jsxRuntime.jsxs("div", { className: "bcds-header--container", children: [getLogo(), skipLinks && (jsxRuntime.jsx("ul", { className: "bcds-header--skiplinks", children: skipLinks.map((link, index) => {
|
|
12768
|
+
return jsxRuntime.jsx("li", { children: link }, `skiplink-${index}`);
|
|
12769
|
+
}) })), title && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("div", { className: "bcds-header--line" }), getTitle()] })), children] }) }));
|
|
12770
|
+
}
|
|
12771
|
+
|
|
12772
|
+
var css_248z$3 = ".bcds-react-aria-Select {\n display: inline-flex;\n flex-direction: column;\n gap: var(--layout-margin-xsmall);\n /* Hacks for `stretch`: https://caniuse.com/mdn-css_properties_max-width_stretch */\n max-width: -moz-available;\n max-width: -webkit-fill-available;\n}\n\n/* Label above select input */\n.bcds-react-aria-Select--Label {\n font: var(--typography-regular-label);\n}\n.bcds-react-aria-Select[data-disabled] > .bcds-react-aria-Select--Label {\n color: var(--typography-color-disabled);\n}\n\n/* \"(optional)\" text after Label*/\n.bcds-react-aria-Select--Label > .optional {\n color: var(--typography-color-disabled);\n}\n\n/* Select input equivalent */\n.bcds-react-aria-Select--Button {\n background-color: var(--surface-secondary-default);\n border: 1px solid var(--surface-border-light);\n border-radius: var(--surface-border-radius-medium);\n cursor: pointer;\n display: flex;\n justify-content: space-between;\n gap: var(--layout-margin-small);\n align-items: center;\n padding: 0 12px;\n}\n.bcds-react-aria-Select--Button.invalid {\n border-color: var(--surface-support-border-color-danger);\n}\n.bcds-react-aria-Select[data-invalid] > .bcds-react-aria-Select--Button {\n border-color: var(--surface-support-border-color-danger);\n}\n.bcds-react-aria-Select--Button[data-disabled] {\n background-color: var(--surface-secondary-disabled);\n cursor: not-allowed;\n}\n.bcds-react-aria-Select--Button[data-hovered] {\n border-color: var(--surface-border-dark);\n}\n.bcds-react-aria-Select--Button[data-focused] {\n border-color: var(--surface-primary-active);\n outline: none;\n}\n.bcds-react-aria-Select--Button[data-pressed] {\n border-color: var(--surface-primary-active);\n}\n.bcds-react-aria-Select--Button.medium {\n height: 40px;\n}\n.bcds-react-aria-Select--Button.small {\n height: 32px;\n}\n.bcds-react-aria-Select--Button > .bcds-react-aria-SelectValue {\n font: var(--typography-regular-body);\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n min-width: 0;\n}\n.bcds-react-aria-Select--Button > svg {\n flex-shrink: 0;\n}\n\n/* Dropdown menu panel */\n.bcds-react-aria-Select--Popover {\n background-color: var(--surface-secondary-default);\n border: 1px solid var(--surface-border-light);\n border-radius: var(--surface-border-radius-medium);\n box-shadow: var(--surface-shadow-medium);\n box-sizing: border-box;\n overflow-y: auto;\n padding: var(--layout-margin-hair) var(--layout-margin-xsmall);\n width: var(--trigger-width);\n}\n.bcds-react-aria-Select--ListBox[data-focused] {\n outline: none;\n}\n.bcds-react-aria-Select--ListBox > .bcds-react-aria-Section:not(:first-child) {\n border-top: 1px solid var(--surface-border-light);\n margin-top: 1px;\n padding-top: 2px;\n}\n\n/* Header label within Section of multi-section Select */\n.bcds-react-aria-Select--Header {\n color: var(--typography-color-secondary);\n font: var(--typography-regular-label);\n padding: var(--layout-margin-hair) var(--layout-margin-small);\n}\n\n/* ListBox option item */\n.bcds-react-aria-Select--ListBoxItem {\n border-radius: var(--layout-margin-xsmall);\n cursor: pointer;\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: var(--layout-margin-small);\n padding: 6.5px var(--layout-padding-small);\n}\n.bcds-react-aria-Select--ListBoxItem[data-focused],\n.bcds-react-aria-Select--ListBoxItem[data-hovered] {\n background-color: var(--surface-secondary-hover);\n outline: none;\n}\n.bcds-react-aria-Select--ListBoxItem-icon {\n display: flex;\n align-items: center;\n justify-content: space-around;\n /* This `min-width` rule can cause horizontal overflow on very narrow Select\n instances, but if we leave it out, the icons will shrink instead. */\n min-width: 20px;\n}\n.bcds-react-aria-Select--ListBoxItem-Text-container {\n color: var(--typography-color-primary);\n display: flex;\n flex-direction: column;\n flex-grow: 1;\n}\n.bcds-react-aria-Select--ListBoxItem-Text-label {\n font: var(--typography-regular-body);\n}\n.bcds-react-aria-Select--ListBoxItem.destructive {\n color: var(--surface-danger-default);\n}\n.bcds-react-aria-Select--ListBoxItem.destructive\n .bcds-react-aria-Select--ListBoxItem-Text-label {\n color: var(--surface-danger-default);\n}\n.bcds-react-aria-Select--ListBoxItem-Text-description {\n font: var(--typography-regular-label);\n color: var(--typography-color-secondary);\n}\n";
|
|
12773
|
+
styleInject(css_248z$3);
|
|
12774
|
+
|
|
12840
12775
|
function ChevronDown() {
|
|
12841
12776
|
return (jsxRuntime.jsx("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: jsxRuntime.jsx("path", { d: "M15.7882 9.15569L10.4858 14.236C10.3192 14.3748 10.1527 14.4303 10.0139 14.4303C9.84731 14.4303 9.68074 14.3748 9.54194 14.2637L4.21182 9.15569C3.9342 8.90584 3.9342 8.46167 4.18405 8.21182C4.4339 7.9342 4.87808 7.9342 5.12793 8.18405L10.0139 12.8479L14.872 8.18405C15.1219 7.9342 15.5661 7.9342 15.8159 8.21182C16.0658 8.46167 16.0658 8.90584 15.7882 9.15569Z", fill: "currentColor" }) }));
|
|
12842
12777
|
}
|
|
12843
12778
|
function ChevronUp() {
|
|
12844
12779
|
return (jsxRuntime.jsx("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: jsxRuntime.jsx("path", { d: "M4.21231 13.3146L9.52695 8.2226C9.6939 8.08348 9.86086 8 10.0278 8C10.1948 8 10.3339 8.05565 10.473 8.16695L15.7876 13.259C16.066 13.5372 16.066 13.9546 15.8155 14.2051C15.5651 14.4833 15.1477 14.4833 14.8694 14.2329L10.0278 9.61387L5.13054 14.2885C4.88011 14.539 4.43491 14.539 4.18448 14.2607C3.93405 13.9825 3.93405 13.5651 4.21231 13.3146Z", fill: "currentColor" }) }));
|
|
12845
12780
|
}
|
|
12846
|
-
|
|
12847
|
-
|
|
12781
|
+
/** Select displays a collapsible list of options and allows a user to select one of them. */
|
|
12782
|
+
function Select({ items, sections, label, placeholder, size = "medium", ...props }) {
|
|
12783
|
+
return (jsxRuntime.jsx($82d7e5349645de74$export$ef9b1a59e592288f, { ...props, children: ({ isOpen, isRequired, isInvalid }) => (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [label && (jsxRuntime.jsxs($01b77f81d0f07f68$export$b04be29aa201d4f5, { className: "bcds-react-aria-Select--Label", children: [label, !isRequired && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [" ", jsxRuntime.jsx("span", { className: "optional", children: "(optional)" })] }))] })), jsxRuntime.jsxs($d2b4bc8c273e7be6$export$353f5b6fc5456de1, { className: `bcds-react-aria-Select--Button ${size === "medium" ? "medium" : "small"} ${isInvalid && "invalid"}`, children: [jsxRuntime.jsx($82d7e5349645de74$export$e288731fd71264f0, { className: "bcds-react-aria-SelectValue", children: (value) => {
|
|
12784
|
+
if (value.selectedText)
|
|
12785
|
+
return value.selectedText;
|
|
12786
|
+
if (placeholder)
|
|
12787
|
+
return placeholder;
|
|
12788
|
+
return "Select an item";
|
|
12789
|
+
} }), isOpen ? jsxRuntime.jsx(ChevronUp, {}) : jsxRuntime.jsx(ChevronDown, {})] }), jsxRuntime.jsx($07b14b47974efb58$export$5b6b19405a83ff9d, { className: "bcds-react-aria-Select--Popover", offset: 4, children: jsxRuntime.jsx($eed445e0843c11d0$export$41f133550aa26f48, { className: "bcds-react-aria-Select--ListBox",
|
|
12790
|
+
// This ternary statement is used to mock the data for `sections`
|
|
12791
|
+
// if a flat list of `items` was passed instead. This allows us to
|
|
12792
|
+
// use one component to support both flat and sectioned lists of
|
|
12793
|
+
// items. If this causes problems, maybe in the future we break
|
|
12794
|
+
// this into separate components or add additional logic to
|
|
12795
|
+
// support different markup within the same component.
|
|
12796
|
+
items: sections
|
|
12848
12797
|
? sections
|
|
12849
|
-
: [{ id: "
|
|
12850
|
-
}
|
|
12851
|
-
|
|
12852
|
-
var css_248z$3 = "/* ListBox option item */\n.react-aria-Select--ListBoxItem {\n border-radius: var(--layout-margin-xsmall);\n cursor: pointer;\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: var(--layout-margin-small);\n padding: 6.5px var(--layout-padding-small);\n}\n.react-aria-Select--ListBoxItem[data-hovered] {\n background-color: var(--surface-secondary-hover);\n outline: none;\n}\n.react-aria-Select--ListBoxItem-Text-container {\n color: var(--typography-color-primary);\n display: flex;\n flex-direction: column;\n flex-grow: 1;\n}\n.react-aria-Select--ListBoxItem-Text-label {\n font: var(--typography-regular-body);\n}\n.react-aria-Select--ListBoxItem.destructive\n .react-aria-Select--ListBoxItem-Text-label {\n color: var(--surface-danger-default);\n}\n.react-aria-Select--ListBoxItem-Text-description {\n font: var(--typography-regular-label);\n color: var(--typography-color-secondary);\n}\n";
|
|
12853
|
-
styleInject(css_248z$3);
|
|
12854
|
-
|
|
12855
|
-
function SelectItem({ description, id, iconLeft, iconRight, isDestructive, label, }) {
|
|
12856
|
-
return (jsxRuntime.jsxs($eed445e0843c11d0$export$a11e76429ed99b4, { id: id ? id : label, className: `react-aria-Select--ListBoxItem ${isDestructive ? "destructive" : ""}`, textValue: label, children: [iconLeft, jsxRuntime.jsxs("div", { className: "react-aria-Select--ListBoxItem-Text-container", children: [jsxRuntime.jsx($514c0188e459b4c0$export$5f1af8db9871e1d6, { slot: "label", className: "react-aria-Select--ListBoxItem-Text-label", children: label }), description && (jsxRuntime.jsx($514c0188e459b4c0$export$5f1af8db9871e1d6, { slot: "description", className: "react-aria-Select--ListBoxItem-Text-description", children: description }))] }), iconRight] }));
|
|
12798
|
+
: [{ id: "section", header: "", items: items ? items : [] }], children: (section) => (jsxRuntime.jsxs($7135fc7d473fd974$export$6e2c8f0811a474ce, { id: section.id, className: "bcds-react-aria-Section", children: [section?.header && (jsxRuntime.jsx($72a5793c14baf454$export$8b251419efc915eb, { className: "bcds-react-aria-Select--Header", children: section.header })), jsxRuntime.jsx($7135fc7d473fd974$export$fb8073518f34e6ec, { items: section.items, children: (item) => (jsxRuntime.jsxs($eed445e0843c11d0$export$a11e76429ed99b4, { id: item?.id ? item.id : item.label, className: `bcds-react-aria-Select--ListBoxItem ${item?.isDestructive ? "destructive" : ""}`, textValue: item.label, children: [item?.iconLeft && (jsxRuntime.jsx("div", { className: "bcds-react-aria-Select--ListBoxItem-icon", children: item.iconLeft })), jsxRuntime.jsxs("div", { className: "bcds-react-aria-Select--ListBoxItem-Text-container", children: [jsxRuntime.jsx($514c0188e459b4c0$export$5f1af8db9871e1d6, { slot: "label", className: "bcds-react-aria-Select--ListBoxItem-Text-label", children: item.label }), item.description && (jsxRuntime.jsx($514c0188e459b4c0$export$5f1af8db9871e1d6, { slot: "description", className: "bcds-react-aria-Select--ListBoxItem-Text-description", children: item.description }))] }), item?.iconRight && (jsxRuntime.jsx("div", { className: "bcds-react-aria-Select--ListBoxItem-icon", children: item.iconRight }))] })) })] })) }) })] })) }));
|
|
12857
12799
|
}
|
|
12858
12800
|
|
|
12859
|
-
var css_248z$2 = ".react-aria-Tag {\n color: var(--typography-color-primary, #2d2d2d);\n cursor: pointer;\n border-radius: var(--layout-margin-hair, 2px);\n border: 1px solid;\n box-sizing: content-box;\n font: var(--typography-regular-label, 400 0.875rem/1.313rem \"BC Sans\");\n padding: 2px 8px;\n width: fit-content;\n}\n.react-aria-
|
|
12801
|
+
var css_248z$2 = ".bcds-react-aria-Tag {\n color: var(--typography-color-primary, #2d2d2d);\n cursor: pointer;\n border-radius: var(--layout-margin-hair, 2px);\n border: 1px solid;\n box-sizing: content-box;\n font: var(--typography-regular-label, 400 0.875rem/1.313rem \"BC Sans\");\n padding: 2px 8px;\n width: fit-content;\n}\n.bcds-react-aria-Tag--contents {\n display: flex;\n align-items: center;\n gap: 8px;\n}\n.bcds-react-aria-Tag--contents .react-aria-Button {\n background: none;\n border: none;\n color: var(--typography-color-primary, #2d2d2d);\n cursor: pointer;\n display: flex;\n margin: 0;\n padding: 0;\n}\n\n/* Tag colors */\n.bcds-react-aria-Tag.bc-blue {\n background-color: var(--surface-color-primary-default, #013366);\n border-color: var(--surface-color-primary-hover, #1e5189);\n color: var(--typography-color-primary-invert, #ffffff);\n}\n.bcds-react-aria-Tag.bc-blue\n .bcds-react-aria-Tag--contents\n > .react-aria-Button {\n color: var(--typography-color-primary-invert, #ffffff);\n}\n.bcds-react-aria-Tag.bc-gold {\n background-color: var(--surface-color-brand-gold-60, #f8ba47);\n border-color: var(--surface-color-primary-hover, #1e5189);\n}\n.bcds-react-aria-Tag.blue {\n background-color: var(--surface-support-surface-color-info, #f7f9fc);\n border-color: var(--surface-support-border-color-info, #053662);\n}\n.bcds-react-aria-Tag.dark {\n border-color: var(--surface-primary-hover, #1e5189);\n background: var(--surface-brand-gray-110, #252423);\n color: var(--typography-color-primary-invert, #ffffff);\n}\n.bcds-react-aria-Tag.dark .bcds-react-aria-Tag--contents > .react-aria-Button {\n color: var(--typography-color-primary-invert, #ffffff);\n}\n.bcds-react-aria-Tag.gray,\n.bcds-react-aria-Tag.grey {\n background-color: var(--surface-brand-gray-20, #f3f2f1);\n border-color: var(--surface-border-dark, #353433);\n}\n.bcds-react-aria-Tag.green {\n background-color: var(--surface-support-surface-color-success, #f6fff8);\n border-color: var(--surface-support-border-color-success, #42814a);\n}\n.bcds-react-aria-Tag.red {\n background-color: var(--surface-support-surface-color-danger, #f4e1e2);\n border-color: var(--surface-support-border-color-danger, #ce3e39);\n}\n.bcds-react-aria-Tag.yellow {\n background-color: var(--surface-support-surface-color-warning, #fef1d8);\n border-color: var(--surface-support-border-color-warning, #f8bb47);\n}\n\n/* Selected */\n.bcds-react-aria-Tag[data-selected] {\n border: 2px solid var(--surface-primary-active, #2e5dd7);\n padding: 1px 7px;\n}\n\n/* Focused */\n.bcds-react-aria-Tag[data-focused] {\n outline: 4px solid #3b99fc;\n outline-offset: 1px;\n}\n\n/* Disabled */\n.bcds-react-aria-Tag[data-disabled] {\n background-color: var(--surface-primary-disabled, #edebe9);\n border-color: var(--surface-border-light, #d8d8d8);\n color: var(--typography-color-disabled, #9f9d9c);\n cursor: not-allowed;\n}\n";
|
|
12860
12802
|
styleInject(css_248z$2);
|
|
12861
12803
|
|
|
12862
|
-
function Tag({
|
|
12863
|
-
return (jsxRuntime.jsx($eaf9e70818b436db$export$3288d34c523a1192, { className:
|
|
12804
|
+
function Tag({ color = "blue", icon, id, textValue }) {
|
|
12805
|
+
return (jsxRuntime.jsx($eaf9e70818b436db$export$3288d34c523a1192, { className: `bcds-react-aria-Tag ${color}`, id: id, textValue: textValue, children: ({ allowsRemoving, isDisabled }) => (jsxRuntime.jsxs("div", { className: "bcds-react-aria-Tag--contents", children: [icon, textValue, !isDisabled && allowsRemoving && (jsxRuntime.jsx($d2b4bc8c273e7be6$export$353f5b6fc5456de1, { "aria-label": `Remove ${textValue}`, slot: "remove", children: jsxRuntime.jsx("svg", { width: "14", height: "15", viewBox: "0 0 14 15", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: jsxRuntime.jsx("g", { id: "Icons / Close", children: jsxRuntime.jsx("path", { id: "Vector", d: "M12.6004 3.03239L11.4684 1.90039L7.00039 6.36839L2.53239 1.90039L1.40039 3.03239L5.86839 7.50039L1.40039 11.9684L2.53239 13.1004L7.00039 8.63239L11.4684 13.1004L12.6004 11.9684L8.13239 7.50039L12.6004 3.03239Z", fill: "currentColor" }) }) }) }))] })) }));
|
|
12864
12806
|
}
|
|
12865
12807
|
|
|
12866
|
-
var css_248z$1 = ".react-aria-TagGroup {\n color: var(--typography-color-primary, #2d2d2d);\n font: var(--typography-regular-label, 400 0.875rem/1.313rem \"BC Sans\");\n}\n\n.react-aria-TagGroup--Label,\n.react-aria-TagGroup--Text-description,\n.react-aria-TagGroup--Text-error {\n display: block;\n margin: var(--layout-margin-small) var(--layout-margin-none);\n}\n\n.react-aria-TagGroup--Text-error {\n color: var(--surface-danger-default, #ce3e39);\n}\n";
|
|
12808
|
+
var css_248z$1 = ".bcds-react-aria-TagGroup {\n color: var(--typography-color-primary, #2d2d2d);\n font: var(--typography-regular-label, 400 0.875rem/1.313rem \"BC Sans\");\n}\n\n.bcds-react-aria-TagGroup--Label,\n.bcds-react-aria-TagGroup--Text-description,\n.bcds-react-aria-TagGroup--Text-error {\n display: block;\n margin: var(--layout-margin-small) var(--layout-margin-none);\n}\n\n.bcds-react-aria-TagGroup--Text-error {\n color: var(--surface-danger-default, #ce3e39);\n}\n";
|
|
12867
12809
|
styleInject(css_248z$1);
|
|
12868
12810
|
|
|
12869
12811
|
function TagGroup({ children, label, description, errorMessage, ...props }) {
|
|
12870
|
-
return (jsxRuntime.jsxs($eaf9e70818b436db$export$67ea30858aaf75e3, { ...props, children: [label && jsxRuntime.jsx($01b77f81d0f07f68$export$b04be29aa201d4f5, { className: "react-aria-TagGroup--Label", children: label }), children, description && (jsxRuntime.jsx($514c0188e459b4c0$export$5f1af8db9871e1d6, { slot: "description", className: "react-aria-TagGroup--Text-description", children: description })), errorMessage && (jsxRuntime.jsx($514c0188e459b4c0$export$5f1af8db9871e1d6, { slot: "errorMessage", className: "react-aria-TagGroup--Text-error", children: errorMessage }))] }));
|
|
12812
|
+
return (jsxRuntime.jsxs($eaf9e70818b436db$export$67ea30858aaf75e3, { className: "bcds-react-aria-TagGroup", ...props, children: [label && (jsxRuntime.jsx($01b77f81d0f07f68$export$b04be29aa201d4f5, { className: "bcds-react-aria-TagGroup--Label", children: label })), children, description && (jsxRuntime.jsx($514c0188e459b4c0$export$5f1af8db9871e1d6, { slot: "description", className: "bcds-react-aria-TagGroup--Text-description", children: description })), errorMessage && (jsxRuntime.jsx($514c0188e459b4c0$export$5f1af8db9871e1d6, { slot: "errorMessage", className: "bcds-react-aria-TagGroup--Text-error", children: errorMessage }))] }));
|
|
12871
12813
|
}
|
|
12872
12814
|
|
|
12873
|
-
var css_248z = ".react-aria-TagList {\n display: flex;\n flex-wrap: wrap;\n gap: var(--layout-padding-small);\n width: fit-content;\n}\n\n.react-aria-TagList.horizontal {\n flex-direction: row;\n}\n\n.react-aria-TagList.vertical {\n flex-direction: column;\n}\n";
|
|
12815
|
+
var css_248z = ".bcds-react-aria-TagList {\n display: flex;\n flex-wrap: wrap;\n gap: var(--layout-padding-small);\n width: fit-content;\n}\n\n.bcds-react-aria-TagList.horizontal {\n flex-direction: row;\n}\n\n.bcds-react-aria-TagList.vertical {\n flex-direction: column;\n}\n";
|
|
12874
12816
|
styleInject(css_248z);
|
|
12875
12817
|
|
|
12876
12818
|
function TagList({ items, orientation = "horizontal", renderEmptyState, ...props }) {
|
|
12877
|
-
return (jsxRuntime.jsx($eaf9e70818b436db$export$f9fef0f55402315b, { className: `react-aria-TagList ${orientation}`, ...props, renderEmptyState: renderEmptyState, items: items, children: (item) => $dGqE5$react.createElement(Tag, { ...item, key: item.id }) }));
|
|
12819
|
+
return (jsxRuntime.jsx($eaf9e70818b436db$export$f9fef0f55402315b, { className: `bcds-react-aria-TagList ${orientation}`, ...props, renderEmptyState: renderEmptyState, items: items, children: (item) => $dGqE5$react.createElement(Tag, { ...item, key: item.id }) }));
|
|
12878
12820
|
}
|
|
12879
12821
|
|
|
12880
12822
|
exports.Button = Button;
|
|
12823
|
+
exports.Header = Header;
|
|
12881
12824
|
exports.Select = Select;
|
|
12882
|
-
exports.
|
|
12825
|
+
exports.SvgBcLogo = SvgBcLogo;
|
|
12883
12826
|
exports.Tag = Tag;
|
|
12884
12827
|
exports.TagGroup = TagGroup;
|
|
12885
12828
|
exports.TagList = TagList;
|