@raspberrypifoundation/design-system-react 1.1.9 → 1.1.11

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.
@@ -1,26 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var React = require('react');
4
- require('react-dom');
5
-
6
- function _interopNamespaceDefault(e) {
7
- var n = Object.create(null);
8
- if (e) {
9
- Object.keys(e).forEach(function (k) {
10
- if (k !== 'default') {
11
- var d = Object.getOwnPropertyDescriptor(e, k);
12
- Object.defineProperty(n, k, d.get ? d : {
13
- enumerable: true,
14
- get: function () { return e[k]; }
15
- });
16
- }
17
- });
18
- }
19
- n.default = e;
20
- return Object.freeze(n);
21
- }
22
-
23
- var React__namespace = /*#__PURE__*/_interopNamespaceDefault(React);
4
+ var reactRouterDom = require('react-router-dom');
24
5
 
25
6
  function getDefaultExportFromCjs (x) {
26
7
  return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
@@ -1191,1316 +1172,25 @@ Accordion.defaultProps = {
1191
1172
  id: "accordion"
1192
1173
  };
1193
1174
 
1194
- /**
1195
- * @remix-run/router v1.16.1
1196
- *
1197
- * Copyright (c) Remix Software Inc.
1198
- *
1199
- * This source code is licensed under the MIT license found in the
1200
- * LICENSE.md file in the root directory of this source tree.
1201
- *
1202
- * @license MIT
1203
- */
1204
- function _extends$2() {
1205
- _extends$2 = Object.assign ? Object.assign.bind() : function (target) {
1206
- for (var i = 1; i < arguments.length; i++) {
1207
- var source = arguments[i];
1208
- for (var key in source) {
1209
- if (Object.prototype.hasOwnProperty.call(source, key)) {
1210
- target[key] = source[key];
1211
- }
1212
- }
1213
- }
1214
- return target;
1215
- };
1216
- return _extends$2.apply(this, arguments);
1217
- }
1218
-
1219
- ////////////////////////////////////////////////////////////////////////////////
1220
- //#region Types and Constants
1221
- ////////////////////////////////////////////////////////////////////////////////
1222
- /**
1223
- * Actions represent the type of change to a location value.
1224
- */
1225
- var Action;
1226
- (function (Action) {
1227
- /**
1228
- * A POP indicates a change to an arbitrary index in the history stack, such
1229
- * as a back or forward navigation. It does not describe the direction of the
1230
- * navigation, only that the current index changed.
1231
- *
1232
- * Note: This is the default action for newly created history objects.
1233
- */
1234
- Action["Pop"] = "POP";
1235
- /**
1236
- * A PUSH indicates a new entry being added to the history stack, such as when
1237
- * a link is clicked and a new page loads. When this happens, all subsequent
1238
- * entries in the stack are lost.
1239
- */
1240
- Action["Push"] = "PUSH";
1241
- /**
1242
- * A REPLACE indicates the entry at the current index in the history stack
1243
- * being replaced by a new one.
1244
- */
1245
- Action["Replace"] = "REPLACE";
1246
- })(Action || (Action = {}));
1247
- function invariant(value, message) {
1248
- if (value === false || value === null || typeof value === "undefined") {
1249
- throw new Error(message);
1250
- }
1251
- }
1252
- function warning(cond, message) {
1253
- if (!cond) {
1254
- // eslint-disable-next-line no-console
1255
- if (typeof console !== "undefined") console.warn(message);
1256
- try {
1257
- // Welcome to debugging history!
1258
- //
1259
- // This error is thrown as a convenience, so you can more easily
1260
- // find the source for a warning that appears in the console by
1261
- // enabling "pause on exceptions" in your JavaScript debugger.
1262
- throw new Error(message);
1263
- // eslint-disable-next-line no-empty
1264
- } catch (e) {}
1265
- }
1266
- }
1267
- /**
1268
- * Creates a string URL path from the given pathname, search, and hash components.
1269
- */
1270
- function createPath(_ref) {
1271
- let {
1272
- pathname = "/",
1273
- search = "",
1274
- hash = ""
1275
- } = _ref;
1276
- if (search && search !== "?") pathname += search.charAt(0) === "?" ? search : "?" + search;
1277
- if (hash && hash !== "#") pathname += hash.charAt(0) === "#" ? hash : "#" + hash;
1278
- return pathname;
1279
- }
1280
- /**
1281
- * Parses a string URL path into its separate pathname, search, and hash components.
1282
- */
1283
- function parsePath(path) {
1284
- let parsedPath = {};
1285
- if (path) {
1286
- let hashIndex = path.indexOf("#");
1287
- if (hashIndex >= 0) {
1288
- parsedPath.hash = path.substr(hashIndex);
1289
- path = path.substr(0, hashIndex);
1290
- }
1291
- let searchIndex = path.indexOf("?");
1292
- if (searchIndex >= 0) {
1293
- parsedPath.search = path.substr(searchIndex);
1294
- path = path.substr(0, searchIndex);
1295
- }
1296
- if (path) {
1297
- parsedPath.pathname = path;
1298
- }
1299
- }
1300
- return parsedPath;
1301
- }
1302
- //#endregion
1303
-
1304
- var ResultType;
1305
- (function (ResultType) {
1306
- ResultType["data"] = "data";
1307
- ResultType["deferred"] = "deferred";
1308
- ResultType["redirect"] = "redirect";
1309
- ResultType["error"] = "error";
1310
- })(ResultType || (ResultType = {}));
1311
- /**
1312
- * Performs pattern matching on a URL pathname and returns information about
1313
- * the match.
1314
- *
1315
- * @see https://reactrouter.com/utils/match-path
1316
- */
1317
- function matchPath(pattern, pathname) {
1318
- if (typeof pattern === "string") {
1319
- pattern = {
1320
- path: pattern,
1321
- caseSensitive: false,
1322
- end: true
1323
- };
1324
- }
1325
- let [matcher, compiledParams] = compilePath(pattern.path, pattern.caseSensitive, pattern.end);
1326
- let match = pathname.match(matcher);
1327
- if (!match) return null;
1328
- let matchedPathname = match[0];
1329
- let pathnameBase = matchedPathname.replace(/(.)\/+$/, "$1");
1330
- let captureGroups = match.slice(1);
1331
- let params = compiledParams.reduce((memo, _ref, index) => {
1332
- let {
1333
- paramName,
1334
- isOptional
1335
- } = _ref;
1336
- // We need to compute the pathnameBase here using the raw splat value
1337
- // instead of using params["*"] later because it will be decoded then
1338
- if (paramName === "*") {
1339
- let splatValue = captureGroups[index] || "";
1340
- pathnameBase = matchedPathname.slice(0, matchedPathname.length - splatValue.length).replace(/(.)\/+$/, "$1");
1341
- }
1342
- const value = captureGroups[index];
1343
- if (isOptional && !value) {
1344
- memo[paramName] = undefined;
1345
- } else {
1346
- memo[paramName] = (value || "").replace(/%2F/g, "/");
1347
- }
1348
- return memo;
1349
- }, {});
1350
- return {
1351
- params,
1352
- pathname: matchedPathname,
1353
- pathnameBase,
1354
- pattern
1355
- };
1356
- }
1357
- function compilePath(path, caseSensitive, end) {
1358
- if (caseSensitive === void 0) {
1359
- caseSensitive = false;
1360
- }
1361
- if (end === void 0) {
1362
- end = true;
1363
- }
1364
- warning(path === "*" || !path.endsWith("*") || path.endsWith("/*"), "Route path \"" + path + "\" will be treated as if it were " + ("\"" + path.replace(/\*$/, "/*") + "\" because the `*` character must ") + "always follow a `/` in the pattern. To get rid of this warning, " + ("please change the route path to \"" + path.replace(/\*$/, "/*") + "\"."));
1365
- let params = [];
1366
- let regexpSource = "^" + path.replace(/\/*\*?$/, "") // Ignore trailing / and /*, we'll handle it below
1367
- .replace(/^\/*/, "/") // Make sure it has a leading /
1368
- .replace(/[\\.*+^${}|()[\]]/g, "\\$&") // Escape special regex chars
1369
- .replace(/\/:([\w-]+)(\?)?/g, (_, paramName, isOptional) => {
1370
- params.push({
1371
- paramName,
1372
- isOptional: isOptional != null
1373
- });
1374
- return isOptional ? "/?([^\\/]+)?" : "/([^\\/]+)";
1375
- });
1376
- if (path.endsWith("*")) {
1377
- params.push({
1378
- paramName: "*"
1379
- });
1380
- regexpSource += path === "*" || path === "/*" ? "(.*)$" // Already matched the initial /, just match the rest
1381
- : "(?:\\/(.+)|\\/*)$"; // Don't include the / in params["*"]
1382
- } else if (end) {
1383
- // When matching to the end, ignore trailing slashes
1384
- regexpSource += "\\/*$";
1385
- } else if (path !== "" && path !== "/") {
1386
- // If our path is non-empty and contains anything beyond an initial slash,
1387
- // then we have _some_ form of path in our regex, so we should expect to
1388
- // match only if we find the end of this path segment. Look for an optional
1389
- // non-captured trailing slash (to match a portion of the URL) or the end
1390
- // of the path (if we've matched to the end). We used to do this with a
1391
- // word boundary but that gives false positives on routes like
1392
- // /user-preferences since `-` counts as a word boundary.
1393
- regexpSource += "(?:(?=\\/|$))";
1394
- } else ;
1395
- let matcher = new RegExp(regexpSource, caseSensitive ? undefined : "i");
1396
- return [matcher, params];
1397
- }
1398
- /**
1399
- * @private
1400
- */
1401
- function stripBasename(pathname, basename) {
1402
- if (basename === "/") return pathname;
1403
- if (!pathname.toLowerCase().startsWith(basename.toLowerCase())) {
1404
- return null;
1405
- }
1406
- // We want to leave trailing slash behavior in the user's control, so if they
1407
- // specify a basename with a trailing slash, we should support it
1408
- let startIndex = basename.endsWith("/") ? basename.length - 1 : basename.length;
1409
- let nextChar = pathname.charAt(startIndex);
1410
- if (nextChar && nextChar !== "/") {
1411
- // pathname does not start with basename/
1412
- return null;
1413
- }
1414
- return pathname.slice(startIndex) || "/";
1415
- }
1416
- /**
1417
- * Returns a resolved path object relative to the given pathname.
1418
- *
1419
- * @see https://reactrouter.com/utils/resolve-path
1420
- */
1421
- function resolvePath(to, fromPathname) {
1422
- if (fromPathname === void 0) {
1423
- fromPathname = "/";
1424
- }
1425
- let {
1426
- pathname: toPathname,
1427
- search = "",
1428
- hash = ""
1429
- } = typeof to === "string" ? parsePath(to) : to;
1430
- let pathname = toPathname ? toPathname.startsWith("/") ? toPathname : resolvePathname(toPathname, fromPathname) : fromPathname;
1431
- return {
1432
- pathname,
1433
- search: normalizeSearch(search),
1434
- hash: normalizeHash(hash)
1435
- };
1436
- }
1437
- function resolvePathname(relativePath, fromPathname) {
1438
- let segments = fromPathname.replace(/\/+$/, "").split("/");
1439
- let relativeSegments = relativePath.split("/");
1440
- relativeSegments.forEach(segment => {
1441
- if (segment === "..") {
1442
- // Keep the root "" segment so the pathname starts at /
1443
- if (segments.length > 1) segments.pop();
1444
- } else if (segment !== ".") {
1445
- segments.push(segment);
1446
- }
1447
- });
1448
- return segments.length > 1 ? segments.join("/") : "/";
1449
- }
1450
- function getInvalidPathError(char, field, dest, path) {
1451
- return "Cannot include a '" + char + "' character in a manually specified " + ("`to." + field + "` field [" + JSON.stringify(path) + "]. Please separate it out to the ") + ("`to." + dest + "` field. Alternatively you may provide the full path as ") + "a string in <Link to=\"...\"> and the router will parse it for you.";
1452
- }
1453
- /**
1454
- * @private
1455
- *
1456
- * When processing relative navigation we want to ignore ancestor routes that
1457
- * do not contribute to the path, such that index/pathless layout routes don't
1458
- * interfere.
1459
- *
1460
- * For example, when moving a route element into an index route and/or a
1461
- * pathless layout route, relative link behavior contained within should stay
1462
- * the same. Both of the following examples should link back to the root:
1463
- *
1464
- * <Route path="/">
1465
- * <Route path="accounts" element={<Link to=".."}>
1466
- * </Route>
1467
- *
1468
- * <Route path="/">
1469
- * <Route path="accounts">
1470
- * <Route element={<AccountsLayout />}> // <-- Does not contribute
1471
- * <Route index element={<Link to=".."} /> // <-- Does not contribute
1472
- * </Route
1473
- * </Route>
1474
- * </Route>
1475
- */
1476
- function getPathContributingMatches(matches) {
1477
- return matches.filter((match, index) => index === 0 || match.route.path && match.route.path.length > 0);
1478
- }
1479
- // Return the array of pathnames for the current route matches - used to
1480
- // generate the routePathnames input for resolveTo()
1481
- function getResolveToMatches(matches, v7_relativeSplatPath) {
1482
- let pathMatches = getPathContributingMatches(matches);
1483
- // When v7_relativeSplatPath is enabled, use the full pathname for the leaf
1484
- // match so we include splat values for "." links. See:
1485
- // https://github.com/remix-run/react-router/issues/11052#issuecomment-1836589329
1486
- if (v7_relativeSplatPath) {
1487
- return pathMatches.map((match, idx) => idx === matches.length - 1 ? match.pathname : match.pathnameBase);
1488
- }
1489
- return pathMatches.map(match => match.pathnameBase);
1490
- }
1491
- /**
1492
- * @private
1493
- */
1494
- function resolveTo(toArg, routePathnames, locationPathname, isPathRelative) {
1495
- if (isPathRelative === void 0) {
1496
- isPathRelative = false;
1497
- }
1498
- let to;
1499
- if (typeof toArg === "string") {
1500
- to = parsePath(toArg);
1501
- } else {
1502
- to = _extends$2({}, toArg);
1503
- invariant(!to.pathname || !to.pathname.includes("?"), getInvalidPathError("?", "pathname", "search", to));
1504
- invariant(!to.pathname || !to.pathname.includes("#"), getInvalidPathError("#", "pathname", "hash", to));
1505
- invariant(!to.search || !to.search.includes("#"), getInvalidPathError("#", "search", "hash", to));
1506
- }
1507
- let isEmptyPath = toArg === "" || to.pathname === "";
1508
- let toPathname = isEmptyPath ? "/" : to.pathname;
1509
- let from;
1510
- // Routing is relative to the current pathname if explicitly requested.
1511
- //
1512
- // If a pathname is explicitly provided in `to`, it should be relative to the
1513
- // route context. This is explained in `Note on `<Link to>` values` in our
1514
- // migration guide from v5 as a means of disambiguation between `to` values
1515
- // that begin with `/` and those that do not. However, this is problematic for
1516
- // `to` values that do not provide a pathname. `to` can simply be a search or
1517
- // hash string, in which case we should assume that the navigation is relative
1518
- // to the current location's pathname and *not* the route pathname.
1519
- if (toPathname == null) {
1520
- from = locationPathname;
1521
- } else {
1522
- let routePathnameIndex = routePathnames.length - 1;
1523
- // With relative="route" (the default), each leading .. segment means
1524
- // "go up one route" instead of "go up one URL segment". This is a key
1525
- // difference from how <a href> works and a major reason we call this a
1526
- // "to" value instead of a "href".
1527
- if (!isPathRelative && toPathname.startsWith("..")) {
1528
- let toSegments = toPathname.split("/");
1529
- while (toSegments[0] === "..") {
1530
- toSegments.shift();
1531
- routePathnameIndex -= 1;
1532
- }
1533
- to.pathname = toSegments.join("/");
1534
- }
1535
- from = routePathnameIndex >= 0 ? routePathnames[routePathnameIndex] : "/";
1536
- }
1537
- let path = resolvePath(to, from);
1538
- // Ensure the pathname has a trailing slash if the original "to" had one
1539
- let hasExplicitTrailingSlash = toPathname && toPathname !== "/" && toPathname.endsWith("/");
1540
- // Or if this was a link to the current path which has a trailing slash
1541
- let hasCurrentTrailingSlash = (isEmptyPath || toPathname === ".") && locationPathname.endsWith("/");
1542
- if (!path.pathname.endsWith("/") && (hasExplicitTrailingSlash || hasCurrentTrailingSlash)) {
1543
- path.pathname += "/";
1544
- }
1545
- return path;
1546
- }
1547
- /**
1548
- * @private
1549
- */
1550
- const joinPaths = paths => paths.join("/").replace(/\/\/+/g, "/");
1551
- /**
1552
- * @private
1553
- */
1554
- const normalizeSearch = search => !search || search === "?" ? "" : search.startsWith("?") ? search : "?" + search;
1555
- /**
1556
- * @private
1557
- */
1558
- const normalizeHash = hash => !hash || hash === "#" ? "" : hash.startsWith("#") ? hash : "#" + hash;
1559
-
1560
- const validMutationMethodsArr = ["post", "put", "patch", "delete"];
1561
- new Set(validMutationMethodsArr);
1562
- const validRequestMethodsArr = ["get", ...validMutationMethodsArr];
1563
- new Set(validRequestMethodsArr);
1564
-
1565
- /**
1566
- * React Router v6.23.1
1567
- *
1568
- * Copyright (c) Remix Software Inc.
1569
- *
1570
- * This source code is licensed under the MIT license found in the
1571
- * LICENSE.md file in the root directory of this source tree.
1572
- *
1573
- * @license MIT
1574
- */
1575
-
1576
- function _extends$1() {
1577
- _extends$1 = Object.assign ? Object.assign.bind() : function (target) {
1578
- for (var i = 1; i < arguments.length; i++) {
1579
- var source = arguments[i];
1580
- for (var key in source) {
1581
- if (Object.prototype.hasOwnProperty.call(source, key)) {
1582
- target[key] = source[key];
1583
- }
1584
- }
1585
- }
1586
- return target;
1587
- };
1588
- return _extends$1.apply(this, arguments);
1589
- }
1590
-
1591
- // Create react-specific types from the agnostic types in @remix-run/router to
1592
- // export from react-router
1593
- const DataRouterContext = /*#__PURE__*/React__namespace.createContext(null);
1594
- {
1595
- DataRouterContext.displayName = "DataRouter";
1596
- }
1597
- const DataRouterStateContext = /*#__PURE__*/React__namespace.createContext(null);
1598
- {
1599
- DataRouterStateContext.displayName = "DataRouterState";
1600
- }
1601
- const AwaitContext = /*#__PURE__*/React__namespace.createContext(null);
1602
- {
1603
- AwaitContext.displayName = "Await";
1604
- }
1605
-
1606
- /**
1607
- * A Navigator is a "location changer"; it's how you get to different locations.
1608
- *
1609
- * Every history instance conforms to the Navigator interface, but the
1610
- * distinction is useful primarily when it comes to the low-level `<Router>` API
1611
- * where both the location and a navigator must be provided separately in order
1612
- * to avoid "tearing" that may occur in a suspense-enabled app if the action
1613
- * and/or location were to be read directly from the history instance.
1614
- */
1615
-
1616
- const NavigationContext = /*#__PURE__*/React__namespace.createContext(null);
1617
- {
1618
- NavigationContext.displayName = "Navigation";
1619
- }
1620
- const LocationContext = /*#__PURE__*/React__namespace.createContext(null);
1621
- {
1622
- LocationContext.displayName = "Location";
1623
- }
1624
- const RouteContext = /*#__PURE__*/React__namespace.createContext({
1625
- outlet: null,
1626
- matches: [],
1627
- isDataRoute: false
1628
- });
1629
- {
1630
- RouteContext.displayName = "Route";
1631
- }
1632
- const RouteErrorContext = /*#__PURE__*/React__namespace.createContext(null);
1633
- {
1634
- RouteErrorContext.displayName = "RouteError";
1635
- }
1636
-
1637
- /**
1638
- * Returns the full href for the given "to" value. This is useful for building
1639
- * custom links that are also accessible and preserve right-click behavior.
1640
- *
1641
- * @see https://reactrouter.com/hooks/use-href
1642
- */
1643
- function useHref(to, _temp) {
1644
- let {
1645
- relative
1646
- } = _temp === void 0 ? {} : _temp;
1647
- !useInRouterContext() ? invariant(false, // TODO: This error is probably because they somehow have 2 versions of the
1648
- // router loaded. We can help them understand how to avoid that.
1649
- "useHref() may be used only in the context of a <Router> component.") : void 0;
1650
- let {
1651
- basename,
1652
- navigator
1653
- } = React__namespace.useContext(NavigationContext);
1654
- let {
1655
- hash,
1656
- pathname,
1657
- search
1658
- } = useResolvedPath(to, {
1659
- relative
1660
- });
1661
- let joinedPathname = pathname;
1662
-
1663
- // If we're operating within a basename, prepend it to the pathname prior
1664
- // to creating the href. If this is a root navigation, then just use the raw
1665
- // basename which allows the basename to have full control over the presence
1666
- // of a trailing slash on root links
1667
- if (basename !== "/") {
1668
- joinedPathname = pathname === "/" ? basename : joinPaths([basename, pathname]);
1669
- }
1670
- return navigator.createHref({
1671
- pathname: joinedPathname,
1672
- search,
1673
- hash
1674
- });
1675
- }
1676
-
1677
- /**
1678
- * Returns true if this component is a descendant of a `<Router>`.
1679
- *
1680
- * @see https://reactrouter.com/hooks/use-in-router-context
1681
- */
1682
- function useInRouterContext() {
1683
- return React__namespace.useContext(LocationContext) != null;
1684
- }
1685
-
1686
- /**
1687
- * Returns the current location object, which represents the current URL in web
1688
- * browsers.
1689
- *
1690
- * Note: If you're using this it may mean you're doing some of your own
1691
- * "routing" in your app, and we'd like to know what your use case is. We may
1692
- * be able to provide something higher-level to better suit your needs.
1693
- *
1694
- * @see https://reactrouter.com/hooks/use-location
1695
- */
1696
- function useLocation() {
1697
- !useInRouterContext() ? invariant(false, // TODO: This error is probably because they somehow have 2 versions of the
1698
- // router loaded. We can help them understand how to avoid that.
1699
- "useLocation() may be used only in the context of a <Router> component.") : void 0;
1700
- return React__namespace.useContext(LocationContext).location;
1701
- }
1702
-
1703
- /**
1704
- * The interface for the navigate() function returned from useNavigate().
1705
- */
1706
-
1707
- const navigateEffectWarning = "You should call navigate() in a React.useEffect(), not when " + "your component is first rendered.";
1708
-
1709
- // Mute warnings for calls to useNavigate in SSR environments
1710
- function useIsomorphicLayoutEffect(cb) {
1711
- let isStatic = React__namespace.useContext(NavigationContext).static;
1712
- if (!isStatic) {
1713
- // We should be able to get rid of this once react 18.3 is released
1714
- // See: https://github.com/facebook/react/pull/26395
1715
- // eslint-disable-next-line react-hooks/rules-of-hooks
1716
- React__namespace.useLayoutEffect(cb);
1717
- }
1718
- }
1719
-
1720
- /**
1721
- * Returns an imperative method for changing the location. Used by `<Link>`s, but
1722
- * may also be used by other elements to change the location.
1723
- *
1724
- * @see https://reactrouter.com/hooks/use-navigate
1725
- */
1726
- function useNavigate() {
1727
- let {
1728
- isDataRoute
1729
- } = React__namespace.useContext(RouteContext);
1730
- // Conditional usage is OK here because the usage of a data router is static
1731
- // eslint-disable-next-line react-hooks/rules-of-hooks
1732
- return isDataRoute ? useNavigateStable() : useNavigateUnstable();
1733
- }
1734
- function useNavigateUnstable() {
1735
- !useInRouterContext() ? invariant(false, // TODO: This error is probably because they somehow have 2 versions of the
1736
- // router loaded. We can help them understand how to avoid that.
1737
- "useNavigate() may be used only in the context of a <Router> component.") : void 0;
1738
- let dataRouterContext = React__namespace.useContext(DataRouterContext);
1739
- let {
1740
- basename,
1741
- future,
1742
- navigator
1743
- } = React__namespace.useContext(NavigationContext);
1744
- let {
1745
- matches
1746
- } = React__namespace.useContext(RouteContext);
1747
- let {
1748
- pathname: locationPathname
1749
- } = useLocation();
1750
- let routePathnamesJson = JSON.stringify(getResolveToMatches(matches, future.v7_relativeSplatPath));
1751
- let activeRef = React__namespace.useRef(false);
1752
- useIsomorphicLayoutEffect(() => {
1753
- activeRef.current = true;
1754
- });
1755
- let navigate = React__namespace.useCallback(function (to, options) {
1756
- if (options === void 0) {
1757
- options = {};
1758
- }
1759
- warning(activeRef.current, navigateEffectWarning) ;
1760
-
1761
- // Short circuit here since if this happens on first render the navigate
1762
- // is useless because we haven't wired up our history listener yet
1763
- if (!activeRef.current) return;
1764
- if (typeof to === "number") {
1765
- navigator.go(to);
1766
- return;
1767
- }
1768
- let path = resolveTo(to, JSON.parse(routePathnamesJson), locationPathname, options.relative === "path");
1769
-
1770
- // If we're operating within a basename, prepend it to the pathname prior
1771
- // to handing off to history (but only if we're not in a data router,
1772
- // otherwise it'll prepend the basename inside of the router).
1773
- // If this is a root navigation, then we navigate to the raw basename
1774
- // which allows the basename to have full control over the presence of a
1775
- // trailing slash on root links
1776
- if (dataRouterContext == null && basename !== "/") {
1777
- path.pathname = path.pathname === "/" ? basename : joinPaths([basename, path.pathname]);
1778
- }
1779
- (!!options.replace ? navigator.replace : navigator.push)(path, options.state, options);
1780
- }, [basename, navigator, routePathnamesJson, locationPathname, dataRouterContext]);
1781
- return navigate;
1782
- }
1783
-
1784
- /**
1785
- * Resolves the pathname of the given `to` value against the current location.
1786
- *
1787
- * @see https://reactrouter.com/hooks/use-resolved-path
1788
- */
1789
- function useResolvedPath(to, _temp2) {
1790
- let {
1791
- relative
1792
- } = _temp2 === void 0 ? {} : _temp2;
1793
- let {
1794
- future
1795
- } = React__namespace.useContext(NavigationContext);
1796
- let {
1797
- matches
1798
- } = React__namespace.useContext(RouteContext);
1799
- let {
1800
- pathname: locationPathname
1801
- } = useLocation();
1802
- let routePathnamesJson = JSON.stringify(getResolveToMatches(matches, future.v7_relativeSplatPath));
1803
- return React__namespace.useMemo(() => resolveTo(to, JSON.parse(routePathnamesJson), locationPathname, relative === "path"), [to, routePathnamesJson, locationPathname, relative]);
1804
- }
1805
- var DataRouterHook$1 = /*#__PURE__*/function (DataRouterHook) {
1806
- DataRouterHook["UseBlocker"] = "useBlocker";
1807
- DataRouterHook["UseRevalidator"] = "useRevalidator";
1808
- DataRouterHook["UseNavigateStable"] = "useNavigate";
1809
- return DataRouterHook;
1810
- }(DataRouterHook$1 || {});
1811
- var DataRouterStateHook$1 = /*#__PURE__*/function (DataRouterStateHook) {
1812
- DataRouterStateHook["UseBlocker"] = "useBlocker";
1813
- DataRouterStateHook["UseLoaderData"] = "useLoaderData";
1814
- DataRouterStateHook["UseActionData"] = "useActionData";
1815
- DataRouterStateHook["UseRouteError"] = "useRouteError";
1816
- DataRouterStateHook["UseNavigation"] = "useNavigation";
1817
- DataRouterStateHook["UseRouteLoaderData"] = "useRouteLoaderData";
1818
- DataRouterStateHook["UseMatches"] = "useMatches";
1819
- DataRouterStateHook["UseRevalidator"] = "useRevalidator";
1820
- DataRouterStateHook["UseNavigateStable"] = "useNavigate";
1821
- DataRouterStateHook["UseRouteId"] = "useRouteId";
1822
- return DataRouterStateHook;
1823
- }(DataRouterStateHook$1 || {});
1824
- function getDataRouterConsoleError$1(hookName) {
1825
- return hookName + " must be used within a data router. See https://reactrouter.com/routers/picking-a-router.";
1826
- }
1827
- function useDataRouterContext$1(hookName) {
1828
- let ctx = React__namespace.useContext(DataRouterContext);
1829
- !ctx ? invariant(false, getDataRouterConsoleError$1(hookName)) : void 0;
1830
- return ctx;
1831
- }
1832
- function useRouteContext(hookName) {
1833
- let route = React__namespace.useContext(RouteContext);
1834
- !route ? invariant(false, getDataRouterConsoleError$1(hookName)) : void 0;
1835
- return route;
1836
- }
1837
-
1838
- // Internal version with hookName-aware debugging
1839
- function useCurrentRouteId(hookName) {
1840
- let route = useRouteContext(hookName);
1841
- let thisRoute = route.matches[route.matches.length - 1];
1842
- !thisRoute.route.id ? invariant(false, hookName + " can only be used on routes that contain a unique \"id\"") : void 0;
1843
- return thisRoute.route.id;
1844
- }
1845
-
1846
- /**
1847
- * Returns the ID for the nearest contextual route
1848
- */
1849
- function useRouteId() {
1850
- return useCurrentRouteId(DataRouterStateHook$1.UseRouteId);
1851
- }
1852
-
1853
- /**
1854
- * Stable version of useNavigate that is used when we are in the context of
1855
- * a RouterProvider.
1856
- */
1857
- function useNavigateStable() {
1858
- let {
1859
- router
1860
- } = useDataRouterContext$1(DataRouterHook$1.UseNavigateStable);
1861
- let id = useCurrentRouteId(DataRouterStateHook$1.UseNavigateStable);
1862
- let activeRef = React__namespace.useRef(false);
1863
- useIsomorphicLayoutEffect(() => {
1864
- activeRef.current = true;
1865
- });
1866
- let navigate = React__namespace.useCallback(function (to, options) {
1867
- if (options === void 0) {
1868
- options = {};
1869
- }
1870
- warning(activeRef.current, navigateEffectWarning) ;
1871
-
1872
- // Short circuit here since if this happens on first render the navigate
1873
- // is useless because we haven't wired up our router subscriber yet
1874
- if (!activeRef.current) return;
1875
- if (typeof to === "number") {
1876
- router.navigate(to);
1877
- } else {
1878
- router.navigate(to, _extends$1({
1879
- fromRouteId: id
1880
- }, options));
1881
- }
1882
- }, [router, id]);
1883
- return navigate;
1884
- }
1885
- new Promise(() => {});
1886
-
1887
- /**
1888
- * React Router DOM v6.23.1
1889
- *
1890
- * Copyright (c) Remix Software Inc.
1891
- *
1892
- * This source code is licensed under the MIT license found in the
1893
- * LICENSE.md file in the root directory of this source tree.
1894
- *
1895
- * @license MIT
1896
- */
1897
-
1898
- function _extends() {
1899
- _extends = Object.assign ? Object.assign.bind() : function (target) {
1900
- for (var i = 1; i < arguments.length; i++) {
1901
- var source = arguments[i];
1902
- for (var key in source) {
1903
- if (Object.prototype.hasOwnProperty.call(source, key)) {
1904
- target[key] = source[key];
1905
- }
1906
- }
1907
- }
1908
- return target;
1909
- };
1910
- return _extends.apply(this, arguments);
1911
- }
1912
- function _objectWithoutPropertiesLoose(source, excluded) {
1913
- if (source == null) return {};
1914
- var target = {};
1915
- var sourceKeys = Object.keys(source);
1916
- var key, i;
1917
- for (i = 0; i < sourceKeys.length; i++) {
1918
- key = sourceKeys[i];
1919
- if (excluded.indexOf(key) >= 0) continue;
1920
- target[key] = source[key];
1921
- }
1922
- return target;
1923
- }
1924
-
1925
- const defaultMethod = "get";
1926
- const defaultEncType = "application/x-www-form-urlencoded";
1927
- function isHtmlElement(object) {
1928
- return object != null && typeof object.tagName === "string";
1929
- }
1930
- function isButtonElement(object) {
1931
- return isHtmlElement(object) && object.tagName.toLowerCase() === "button";
1932
- }
1933
- function isFormElement(object) {
1934
- return isHtmlElement(object) && object.tagName.toLowerCase() === "form";
1935
- }
1936
- function isInputElement(object) {
1937
- return isHtmlElement(object) && object.tagName.toLowerCase() === "input";
1938
- }
1939
- function isModifiedEvent(event) {
1940
- return !!(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey);
1941
- }
1942
- function shouldProcessLinkClick(event, target) {
1943
- return event.button === 0 && (
1944
- // Ignore everything but left clicks
1945
- !target || target === "_self") &&
1946
- // Let browser handle "target=_blank" etc.
1947
- !isModifiedEvent(event) // Ignore clicks with modifier keys
1948
- ;
1949
- }
1950
- // One-time check for submitter support
1951
- let _formDataSupportsSubmitter = null;
1952
- function isFormDataSubmitterSupported() {
1953
- if (_formDataSupportsSubmitter === null) {
1954
- try {
1955
- new FormData(document.createElement("form"),
1956
- // @ts-expect-error if FormData supports the submitter parameter, this will throw
1957
- 0);
1958
- _formDataSupportsSubmitter = false;
1959
- } catch (e) {
1960
- _formDataSupportsSubmitter = true;
1961
- }
1962
- }
1963
- return _formDataSupportsSubmitter;
1964
- }
1965
- const supportedFormEncTypes = new Set(["application/x-www-form-urlencoded", "multipart/form-data", "text/plain"]);
1966
- function getFormEncType(encType) {
1967
- if (encType != null && !supportedFormEncTypes.has(encType)) {
1968
- warning(false, "\"" + encType + "\" is not a valid `encType` for `<Form>`/`<fetcher.Form>` " + ("and will default to \"" + defaultEncType + "\"")) ;
1969
- return null;
1970
- }
1971
- return encType;
1972
- }
1973
- function getFormSubmissionInfo(target, basename) {
1974
- let method;
1975
- let action;
1976
- let encType;
1977
- let formData;
1978
- let body;
1979
- if (isFormElement(target)) {
1980
- // When grabbing the action from the element, it will have had the basename
1981
- // prefixed to ensure non-JS scenarios work, so strip it since we'll
1982
- // re-prefix in the router
1983
- let attr = target.getAttribute("action");
1984
- action = attr ? stripBasename(attr, basename) : null;
1985
- method = target.getAttribute("method") || defaultMethod;
1986
- encType = getFormEncType(target.getAttribute("enctype")) || defaultEncType;
1987
- formData = new FormData(target);
1988
- } else if (isButtonElement(target) || isInputElement(target) && (target.type === "submit" || target.type === "image")) {
1989
- let form = target.form;
1990
- if (form == null) {
1991
- throw new Error("Cannot submit a <button> or <input type=\"submit\"> without a <form>");
1992
- }
1993
- // <button>/<input type="submit"> may override attributes of <form>
1994
- // When grabbing the action from the element, it will have had the basename
1995
- // prefixed to ensure non-JS scenarios work, so strip it since we'll
1996
- // re-prefix in the router
1997
- let attr = target.getAttribute("formaction") || form.getAttribute("action");
1998
- action = attr ? stripBasename(attr, basename) : null;
1999
- method = target.getAttribute("formmethod") || form.getAttribute("method") || defaultMethod;
2000
- encType = getFormEncType(target.getAttribute("formenctype")) || getFormEncType(form.getAttribute("enctype")) || defaultEncType;
2001
- // Build a FormData object populated from a form and submitter
2002
- formData = new FormData(form, target);
2003
- // If this browser doesn't support the `FormData(el, submitter)` format,
2004
- // then tack on the submitter value at the end. This is a lightweight
2005
- // solution that is not 100% spec compliant. For complete support in older
2006
- // browsers, consider using the `formdata-submitter-polyfill` package
2007
- if (!isFormDataSubmitterSupported()) {
2008
- let {
2009
- name,
2010
- type,
2011
- value
2012
- } = target;
2013
- if (type === "image") {
2014
- let prefix = name ? name + "." : "";
2015
- formData.append(prefix + "x", "0");
2016
- formData.append(prefix + "y", "0");
2017
- } else if (name) {
2018
- formData.append(name, value);
2019
- }
2020
- }
2021
- } else if (isHtmlElement(target)) {
2022
- throw new Error("Cannot submit element that is not <form>, <button>, or " + "<input type=\"submit|image\">");
2023
- } else {
2024
- method = defaultMethod;
2025
- action = null;
2026
- encType = defaultEncType;
2027
- body = target;
2028
- }
2029
- // Send body for <Form encType="text/plain" so we encode it into text
2030
- if (formData && encType === "text/plain") {
2031
- body = formData;
2032
- formData = undefined;
2033
- }
2034
- return {
2035
- action,
2036
- method: method.toLowerCase(),
2037
- encType,
2038
- formData,
2039
- body
2040
- };
2041
- }
2042
-
2043
- const _excluded = ["onClick", "relative", "reloadDocument", "replace", "state", "target", "to", "preventScrollReset", "unstable_viewTransition"],
2044
- _excluded2 = ["aria-current", "caseSensitive", "className", "end", "style", "to", "unstable_viewTransition", "children"],
2045
- _excluded3 = ["fetcherKey", "navigate", "reloadDocument", "replace", "state", "method", "action", "onSubmit", "relative", "preventScrollReset", "unstable_viewTransition"];
2046
- // HEY YOU! DON'T TOUCH THIS VARIABLE!
2047
- //
2048
- // It is replaced with the proper version at build time via a babel plugin in
2049
- // the rollup config.
2050
- //
2051
- // Export a global property onto the window for React Router detection by the
2052
- // Core Web Vitals Technology Report. This way they can configure the `wappalyzer`
2053
- // to detect and properly classify live websites as being built with React Router:
2054
- // https://github.com/HTTPArchive/wappalyzer/blob/main/src/technologies/r.json
2055
- const REACT_ROUTER_VERSION = "6";
2056
- try {
2057
- window.__reactRouterVersion = REACT_ROUTER_VERSION;
2058
- } catch (e) {
2059
- // no-op
2060
- }
2061
- const ViewTransitionContext = /*#__PURE__*/React__namespace.createContext({
2062
- isTransitioning: false
2063
- });
2064
- {
2065
- ViewTransitionContext.displayName = "ViewTransition";
2066
- }
2067
- const FetchersContext = /*#__PURE__*/React__namespace.createContext(new Map());
2068
- {
2069
- FetchersContext.displayName = "Fetchers";
2070
- }
2071
- const isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined";
2072
- const ABSOLUTE_URL_REGEX = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;
2073
- /**
2074
- * The public API for rendering a history-aware `<a>`.
2075
- */
2076
- const Link = /*#__PURE__*/React__namespace.forwardRef(function LinkWithRef(_ref7, ref) {
2077
- let {
2078
- onClick,
2079
- relative,
2080
- reloadDocument,
2081
- replace,
2082
- state,
2083
- target,
2084
- to,
2085
- preventScrollReset,
2086
- unstable_viewTransition
2087
- } = _ref7,
2088
- rest = _objectWithoutPropertiesLoose(_ref7, _excluded);
2089
- let {
2090
- basename
2091
- } = React__namespace.useContext(NavigationContext);
2092
- // Rendered into <a href> for absolute URLs
2093
- let absoluteHref;
2094
- let isExternal = false;
2095
- if (typeof to === "string" && ABSOLUTE_URL_REGEX.test(to)) {
2096
- // Render the absolute href server- and client-side
2097
- absoluteHref = to;
2098
- // Only check for external origins client-side
2099
- if (isBrowser) {
2100
- try {
2101
- let currentUrl = new URL(window.location.href);
2102
- let targetUrl = to.startsWith("//") ? new URL(currentUrl.protocol + to) : new URL(to);
2103
- let path = stripBasename(targetUrl.pathname, basename);
2104
- if (targetUrl.origin === currentUrl.origin && path != null) {
2105
- // Strip the protocol/origin/basename for same-origin absolute URLs
2106
- to = path + targetUrl.search + targetUrl.hash;
2107
- } else {
2108
- isExternal = true;
2109
- }
2110
- } catch (e) {
2111
- // We can't do external URL detection without a valid URL
2112
- warning(false, "<Link to=\"" + to + "\"> contains an invalid URL which will probably break " + "when clicked - please update to a valid URL path.") ;
2113
- }
2114
- }
2115
- }
2116
- // Rendered into <a href> for relative URLs
2117
- let href = useHref(to, {
2118
- relative
2119
- });
2120
- let internalOnClick = useLinkClickHandler(to, {
2121
- replace,
2122
- state,
2123
- target,
2124
- preventScrollReset,
2125
- relative,
2126
- unstable_viewTransition
2127
- });
2128
- function handleClick(event) {
2129
- if (onClick) onClick(event);
2130
- if (!event.defaultPrevented) {
2131
- internalOnClick(event);
2132
- }
2133
- }
2134
- return (
2135
- /*#__PURE__*/
2136
- // eslint-disable-next-line jsx-a11y/anchor-has-content
2137
- React__namespace.createElement("a", _extends({}, rest, {
2138
- href: absoluteHref || href,
2139
- onClick: isExternal || reloadDocument ? onClick : handleClick,
2140
- ref: ref,
2141
- target: target
2142
- }))
2143
- );
2144
- });
2145
- {
2146
- Link.displayName = "Link";
2147
- }
2148
- /**
2149
- * A `<Link>` wrapper that knows if it's "active" or not.
2150
- */
2151
- const NavLink = /*#__PURE__*/React__namespace.forwardRef(function NavLinkWithRef(_ref8, ref) {
2152
- let {
2153
- "aria-current": ariaCurrentProp = "page",
2154
- caseSensitive = false,
2155
- className: classNameProp = "",
2156
- end = false,
2157
- style: styleProp,
2158
- to,
2159
- unstable_viewTransition,
2160
- children
2161
- } = _ref8,
2162
- rest = _objectWithoutPropertiesLoose(_ref8, _excluded2);
2163
- let path = useResolvedPath(to, {
2164
- relative: rest.relative
2165
- });
2166
- let location = useLocation();
2167
- let routerState = React__namespace.useContext(DataRouterStateContext);
2168
- let {
2169
- navigator,
2170
- basename
2171
- } = React__namespace.useContext(NavigationContext);
2172
- let isTransitioning = routerState != null &&
2173
- // Conditional usage is OK here because the usage of a data router is static
2174
- // eslint-disable-next-line react-hooks/rules-of-hooks
2175
- useViewTransitionState(path) && unstable_viewTransition === true;
2176
- let toPathname = navigator.encodeLocation ? navigator.encodeLocation(path).pathname : path.pathname;
2177
- let locationPathname = location.pathname;
2178
- let nextLocationPathname = routerState && routerState.navigation && routerState.navigation.location ? routerState.navigation.location.pathname : null;
2179
- if (!caseSensitive) {
2180
- locationPathname = locationPathname.toLowerCase();
2181
- nextLocationPathname = nextLocationPathname ? nextLocationPathname.toLowerCase() : null;
2182
- toPathname = toPathname.toLowerCase();
2183
- }
2184
- if (nextLocationPathname && basename) {
2185
- nextLocationPathname = stripBasename(nextLocationPathname, basename) || nextLocationPathname;
2186
- }
2187
- // If the `to` has a trailing slash, look at that exact spot. Otherwise,
2188
- // we're looking for a slash _after_ what's in `to`. For example:
2189
- //
2190
- // <NavLink to="/users"> and <NavLink to="/users/">
2191
- // both want to look for a / at index 6 to match URL `/users/matt`
2192
- const endSlashPosition = toPathname !== "/" && toPathname.endsWith("/") ? toPathname.length - 1 : toPathname.length;
2193
- let isActive = locationPathname === toPathname || !end && locationPathname.startsWith(toPathname) && locationPathname.charAt(endSlashPosition) === "/";
2194
- let isPending = nextLocationPathname != null && (nextLocationPathname === toPathname || !end && nextLocationPathname.startsWith(toPathname) && nextLocationPathname.charAt(toPathname.length) === "/");
2195
- let renderProps = {
2196
- isActive,
2197
- isPending,
2198
- isTransitioning
2199
- };
2200
- let ariaCurrent = isActive ? ariaCurrentProp : undefined;
2201
- let className;
2202
- if (typeof classNameProp === "function") {
2203
- className = classNameProp(renderProps);
2204
- } else {
2205
- // If the className prop is not a function, we use a default `active`
2206
- // class for <NavLink />s that are active. In v5 `active` was the default
2207
- // value for `activeClassName`, but we are removing that API and can still
2208
- // use the old default behavior for a cleaner upgrade path and keep the
2209
- // simple styling rules working as they currently do.
2210
- className = [classNameProp, isActive ? "active" : null, isPending ? "pending" : null, isTransitioning ? "transitioning" : null].filter(Boolean).join(" ");
2211
- }
2212
- let style = typeof styleProp === "function" ? styleProp(renderProps) : styleProp;
2213
- return /*#__PURE__*/React__namespace.createElement(Link, _extends({}, rest, {
2214
- "aria-current": ariaCurrent,
2215
- className: className,
2216
- ref: ref,
2217
- style: style,
2218
- to: to,
2219
- unstable_viewTransition: unstable_viewTransition
2220
- }), typeof children === "function" ? children(renderProps) : children);
2221
- });
2222
- {
2223
- NavLink.displayName = "NavLink";
2224
- }
2225
- /**
2226
- * A `@remix-run/router`-aware `<form>`. It behaves like a normal form except
2227
- * that the interaction with the server is with `fetch` instead of new document
2228
- * requests, allowing components to add nicer UX to the page as the form is
2229
- * submitted and returns with data.
2230
- */
2231
- const Form = /*#__PURE__*/React__namespace.forwardRef((_ref9, forwardedRef) => {
2232
- let {
2233
- fetcherKey,
2234
- navigate,
2235
- reloadDocument,
2236
- replace,
2237
- state,
2238
- method = defaultMethod,
2239
- action,
2240
- onSubmit,
2241
- relative,
2242
- preventScrollReset,
2243
- unstable_viewTransition
2244
- } = _ref9,
2245
- props = _objectWithoutPropertiesLoose(_ref9, _excluded3);
2246
- let submit = useSubmit();
2247
- let formAction = useFormAction(action, {
2248
- relative
2249
- });
2250
- let formMethod = method.toLowerCase() === "get" ? "get" : "post";
2251
- let submitHandler = event => {
2252
- onSubmit && onSubmit(event);
2253
- if (event.defaultPrevented) return;
2254
- event.preventDefault();
2255
- let submitter = event.nativeEvent.submitter;
2256
- let submitMethod = (submitter == null ? void 0 : submitter.getAttribute("formmethod")) || method;
2257
- submit(submitter || event.currentTarget, {
2258
- fetcherKey,
2259
- method: submitMethod,
2260
- navigate,
2261
- replace,
2262
- state,
2263
- relative,
2264
- preventScrollReset,
2265
- unstable_viewTransition
2266
- });
2267
- };
2268
- return /*#__PURE__*/React__namespace.createElement("form", _extends({
2269
- ref: forwardedRef,
2270
- method: formMethod,
2271
- action: formAction,
2272
- onSubmit: reloadDocument ? onSubmit : submitHandler
2273
- }, props));
2274
- });
2275
- {
2276
- Form.displayName = "Form";
2277
- }
2278
- //#endregion
2279
- ////////////////////////////////////////////////////////////////////////////////
2280
- //#region Hooks
2281
- ////////////////////////////////////////////////////////////////////////////////
2282
- var DataRouterHook;
2283
- (function (DataRouterHook) {
2284
- DataRouterHook["UseScrollRestoration"] = "useScrollRestoration";
2285
- DataRouterHook["UseSubmit"] = "useSubmit";
2286
- DataRouterHook["UseSubmitFetcher"] = "useSubmitFetcher";
2287
- DataRouterHook["UseFetcher"] = "useFetcher";
2288
- DataRouterHook["useViewTransitionState"] = "useViewTransitionState";
2289
- })(DataRouterHook || (DataRouterHook = {}));
2290
- var DataRouterStateHook;
2291
- (function (DataRouterStateHook) {
2292
- DataRouterStateHook["UseFetcher"] = "useFetcher";
2293
- DataRouterStateHook["UseFetchers"] = "useFetchers";
2294
- DataRouterStateHook["UseScrollRestoration"] = "useScrollRestoration";
2295
- })(DataRouterStateHook || (DataRouterStateHook = {}));
2296
- // Internal hooks
2297
- function getDataRouterConsoleError(hookName) {
2298
- return hookName + " must be used within a data router. See https://reactrouter.com/routers/picking-a-router.";
2299
- }
2300
- function useDataRouterContext(hookName) {
2301
- let ctx = React__namespace.useContext(DataRouterContext);
2302
- !ctx ? invariant(false, getDataRouterConsoleError(hookName)) : void 0;
2303
- return ctx;
2304
- }
2305
- // External hooks
2306
- /**
2307
- * Handles the click behavior for router `<Link>` components. This is useful if
2308
- * you need to create custom `<Link>` components with the same click behavior we
2309
- * use in our exported `<Link>`.
2310
- */
2311
- function useLinkClickHandler(to, _temp) {
2312
- let {
2313
- target,
2314
- replace: replaceProp,
2315
- state,
2316
- preventScrollReset,
2317
- relative,
2318
- unstable_viewTransition
2319
- } = _temp === void 0 ? {} : _temp;
2320
- let navigate = useNavigate();
2321
- let location = useLocation();
2322
- let path = useResolvedPath(to, {
2323
- relative
2324
- });
2325
- return React__namespace.useCallback(event => {
2326
- if (shouldProcessLinkClick(event, target)) {
2327
- event.preventDefault();
2328
- // If the URL hasn't changed, a regular <a> will do a replace instead of
2329
- // a push, so do the same here unless the replace prop is explicitly set
2330
- let replace = replaceProp !== undefined ? replaceProp : createPath(location) === createPath(path);
2331
- navigate(to, {
2332
- replace,
2333
- state,
2334
- preventScrollReset,
2335
- relative,
2336
- unstable_viewTransition
2337
- });
2338
- }
2339
- }, [location, navigate, path, replaceProp, state, target, to, preventScrollReset, relative, unstable_viewTransition]);
2340
- }
2341
- function validateClientSideSubmission() {
2342
- if (typeof document === "undefined") {
2343
- throw new Error("You are calling submit during the server render. " + "Try calling submit within a `useEffect` or callback instead.");
2344
- }
2345
- }
2346
- let fetcherId = 0;
2347
- let getUniqueFetcherId = () => "__" + String(++fetcherId) + "__";
2348
- /**
2349
- * Returns a function that may be used to programmatically submit a form (or
2350
- * some arbitrary data) to the server.
2351
- */
2352
- function useSubmit() {
2353
- let {
2354
- router
2355
- } = useDataRouterContext(DataRouterHook.UseSubmit);
2356
- let {
2357
- basename
2358
- } = React__namespace.useContext(NavigationContext);
2359
- let currentRouteId = useRouteId();
2360
- return React__namespace.useCallback(function (target, options) {
2361
- if (options === void 0) {
2362
- options = {};
2363
- }
2364
- validateClientSideSubmission();
2365
- let {
2366
- action,
2367
- method,
2368
- encType,
2369
- formData,
2370
- body
2371
- } = getFormSubmissionInfo(target, basename);
2372
- if (options.navigate === false) {
2373
- let key = options.fetcherKey || getUniqueFetcherId();
2374
- router.fetch(key, currentRouteId, options.action || action, {
2375
- preventScrollReset: options.preventScrollReset,
2376
- formData,
2377
- body,
2378
- formMethod: options.method || method,
2379
- formEncType: options.encType || encType,
2380
- unstable_flushSync: options.unstable_flushSync
2381
- });
2382
- } else {
2383
- router.navigate(options.action || action, {
2384
- preventScrollReset: options.preventScrollReset,
2385
- formData,
2386
- body,
2387
- formMethod: options.method || method,
2388
- formEncType: options.encType || encType,
2389
- replace: options.replace,
2390
- state: options.state,
2391
- fromRouteId: currentRouteId,
2392
- unstable_flushSync: options.unstable_flushSync,
2393
- unstable_viewTransition: options.unstable_viewTransition
2394
- });
2395
- }
2396
- }, [router, basename, currentRouteId]);
2397
- }
2398
- // v7: Eventually we should deprecate this entirely in favor of using the
2399
- // router method directly?
2400
- function useFormAction(action, _temp2) {
2401
- let {
2402
- relative
2403
- } = _temp2 === void 0 ? {} : _temp2;
2404
- let {
2405
- basename
2406
- } = React__namespace.useContext(NavigationContext);
2407
- let routeContext = React__namespace.useContext(RouteContext);
2408
- !routeContext ? invariant(false, "useFormAction must be used inside a RouteContext") : void 0;
2409
- let [match] = routeContext.matches.slice(-1);
2410
- // Shallow clone path so we can modify it below, otherwise we modify the
2411
- // object referenced by useMemo inside useResolvedPath
2412
- let path = _extends({}, useResolvedPath(action ? action : ".", {
2413
- relative
2414
- }));
2415
- // If no action was specified, browsers will persist current search params
2416
- // when determining the path, so match that behavior
2417
- // https://github.com/remix-run/remix/issues/927
2418
- let location = useLocation();
2419
- if (action == null) {
2420
- // Safe to write to this directly here since if action was undefined, we
2421
- // would have called useResolvedPath(".") which will never include a search
2422
- path.search = location.search;
2423
- // When grabbing search params from the URL, remove any included ?index param
2424
- // since it might not apply to our contextual route. We add it back based
2425
- // on match.route.index below
2426
- let params = new URLSearchParams(path.search);
2427
- if (params.has("index") && params.get("index") === "") {
2428
- params.delete("index");
2429
- path.search = params.toString() ? "?" + params.toString() : "";
2430
- }
2431
- }
2432
- if ((!action || action === ".") && match.route.index) {
2433
- path.search = path.search ? path.search.replace(/^\?/, "?index&") : "?index";
2434
- }
2435
- // If we're operating within a basename, prepend it to the pathname prior
2436
- // to creating the form action. If this is a root navigation, then just use
2437
- // the raw basename which allows the basename to have full control over the
2438
- // presence of a trailing slash on root actions
2439
- if (basename !== "/") {
2440
- path.pathname = path.pathname === "/" ? basename : joinPaths([basename, path.pathname]);
2441
- }
2442
- return createPath(path);
2443
- }
2444
- /**
2445
- * Return a boolean indicating if there is an active view transition to the
2446
- * given href. You can use this value to render CSS classes or viewTransitionName
2447
- * styles onto your elements
2448
- *
2449
- * @param href The destination href
2450
- * @param [opts.relative] Relative routing type ("route" | "path")
2451
- */
2452
- function useViewTransitionState(to, opts) {
2453
- if (opts === void 0) {
2454
- opts = {};
2455
- }
2456
- let vtContext = React__namespace.useContext(ViewTransitionContext);
2457
- !(vtContext != null) ? invariant(false, "`unstable_useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. " + "Did you accidentally import `RouterProvider` from `react-router`?") : void 0;
2458
- let {
2459
- basename
2460
- } = useDataRouterContext(DataRouterHook.useViewTransitionState);
2461
- let path = useResolvedPath(to, {
2462
- relative: opts.relative
2463
- });
2464
- if (!vtContext.isTransitioning) {
2465
- return false;
2466
- }
2467
- let currentPath = stripBasename(vtContext.currentLocation.pathname, basename) || vtContext.currentLocation.pathname;
2468
- let nextPath = stripBasename(vtContext.nextLocation.pathname, basename) || vtContext.nextLocation.pathname;
2469
- // Transition is active if we're going to or coming from the indicated
2470
- // destination. This ensures that other PUSH navigations that reverse
2471
- // an indicated transition apply. I.e., on the list view you have:
2472
- //
2473
- // <NavLink to="/details/1" unstable_viewTransition>
2474
- //
2475
- // If you click the breadcrumb back to the list view:
2476
- //
2477
- // <NavLink to="/list" unstable_viewTransition>
2478
- //
2479
- // We should apply the transition because it's indicated as active going
2480
- // from /list -> /details/1 and therefore should be active on the reverse
2481
- // (even though this isn't strictly a POP reverse)
2482
- return matchPath(path.pathname, nextPath) != null || matchPath(path.pathname, currentPath) != null;
2483
- }
2484
-
2485
1175
  var css_248z$5 = ":root, :host {\n --rpf-brand-black: hsla(60, 4%, 11%, 1);\n --rpf-brand-leaf: hsla(123, 43%, 48%, 1);\n --rpf-brand-raspberry: hsla(342, 71%, 47%, 1);\n --rpf-raspberry-50: hsla(338, 57%, 97%, 1);\n --rpf-raspberry-100: hsla(342, 62%, 96%, 1);\n --rpf-raspberry-200: hsla(344, 73%, 93%, 1);\n --rpf-raspberry-400: hsla(341, 63%, 84%, 1);\n --rpf-raspberry-500: hsla(343, 62%, 68%, 1);\n --rpf-raspberry-600: hsla(343, 64%, 58%, 1);\n --rpf-raspberry-800: hsla(342, 71%, 47%, 1);\n --rpf-raspberry-900: hsla(340, 78%, 36%, 1);\n}\n\n:root, :host {\n --rpf-red-100: hsla(4, 89%, 96%, 1);\n --rpf-red-200: hsla(1, 87%, 91%, 1);\n --rpf-red-400: hsla(1, 87%, 82%, 1);\n --rpf-red-600: hsla(1, 87%, 72%, 1);\n --rpf-red-800: hsla(1, 87%, 63%, 1);\n --rpf-red-900: hsla(1, 52%, 50%, 1);\n --rpf-green-100: hsla(125, 41%, 95%, 1);\n --rpf-green-200: hsla(122, 39%, 87%, 1);\n --rpf-green-400: hsla(123, 40%, 74%, 1);\n --rpf-green-600: hsla(123, 40%, 61%, 1);\n --rpf-green-800: hsla(123, 43%, 48%, 1);\n --rpf-green-900: hsla(123, 43%, 34%, 1);\n --rpf-teal-100: hsla(176, 55%, 94%, 1);\n --rpf-teal-200: hsla(174, 55%, 85%, 1);\n --rpf-teal-400: hsla(174, 55%, 70%, 1);\n --rpf-teal-600: hsla(174, 56%, 56%, 1);\n --rpf-teal-800: hsla(174, 81%, 41%, 1);\n --rpf-teal-900: hsla(174, 81%, 27%, 1);\n --rpf-orange-100: hsla(31, 100%, 95%, 1);\n --rpf-orange-200: hsla(32, 100%, 88%, 1);\n --rpf-orange-400: hsla(31, 100%, 77%, 1);\n --rpf-orange-600: hsla(31, 99%, 65%, 1);\n --rpf-orange-800: hsla(31, 99%, 54%, 1);\n --rpf-orange-900: hsla(31, 85%, 35%, 1);\n --rpf-yellow-100: hsla(51, 100%, 95%, 1);\n --rpf-yellow-200: hsla(52, 100%, 87%, 1);\n --rpf-yellow-400: hsla(51, 100%, 75%, 1);\n --rpf-yellow-600: hsla(52, 100%, 63%, 1);\n --rpf-yellow-800: hsla(52, 100%, 50%, 1);\n --rpf-yellow-900: hsla(52, 100%, 26%, 1);\n --rpf-purple-100: hsla(282, 36%, 95%, 1);\n --rpf-purple-200: hsla(279, 38%, 87%, 1);\n --rpf-purple-400: hsla(279, 38%, 73%, 1);\n --rpf-purple-600: hsla(279, 37%, 60%, 1);\n --rpf-purple-800: hsla(279, 43%, 47%, 1);\n --rpf-purple-900: hsla(280, 43%, 37%, 1);\n --rpf-navy-100: hsla(235, 38%, 94%, 1);\n --rpf-navy-200: hsla(234, 38%, 84%, 1);\n --rpf-navy-400: hsla(235, 38%, 69%, 1);\n --rpf-navy-600: hsla(235, 38%, 53%, 1);\n --rpf-navy-800: hsla(235, 63%, 37%, 1);\n --rpf-navy-900: hsla(234, 63%, 30%, 1);\n --rpf-blue-100: hsla(203, 86%, 95%, 1);\n --rpf-blue-200: hsla(204, 88%, 87%, 1);\n --rpf-blue-400: hsla(204, 88%, 74%, 1);\n --rpf-blue-600: hsla(204, 89%, 60%, 1);\n --rpf-blue-800: hsla(204, 100%, 47%, 1);\n --rpf-blue-900: hsla(204, 99%, 37%, 1);\n}\n\n:root, :host {\n --rpf-white: hsla(0, 0%, 100%, 1);\n --rpf-off-white: hsla(225, 25%, 97%, 1);\n --rpf-grey-50: hsla(210, 8%, 95%, 1);\n --rpf-grey-100: hsla(228, 10%, 90%, 1);\n --rpf-grey-150: hsla(223, 9%, 85%, 1);\n --rpf-grey-200: hsla(228, 10%, 80%, 1);\n --rpf-grey-300: hsla(229, 9%, 75%, 1);\n --rpf-grey-400: hsla(229, 8%, 61%, 1);\n --rpf-grey-500: hsla(229, 9%, 42%, 1);\n --rpf-grey-600: hsla(228, 9%, 32%, 1);\n --rpf-grey-700: hsla(228, 9%, 22%, 1);\n --rpf-grey-800: hsla(232, 9%, 18%, 1);\n --rpf-grey-850: hsla(228, 9%, 15%, 1);\n --rpf-grey-900: hsla(228, 9%, 10%, 1);\n --rpf-grey-950: hsla(228, 8%, 5%, 1);\n --rpf-black: hsla(0, 0%, 0%, 1);\n}\n\n:root, :host {\n --rpf-alert-error-highlight: hsla(0, 88%, 99%, 1);\n --rpf-alert-error: hsla(0, 88%, 33%, 1);\n --rpf-alert-information-highlight: hsla(225, 64%, 99%, 1);\n --rpf-alert-information: hsla(225, 64%, 33%, 1);\n --rpf-alert-success-highlight: hsla(136, 90%, 99%, 1);\n --rpf-alert-success: hsla(136, 90%, 20%, 1);\n --rpf-alert-warning-highlight: hsla(26, 70%, 99%, 1);\n --rpf-alert-warning: hsla(26, 70%, 29%, 1);\n}\n\n:root, :host {\n --font-size-0-5: 0.5rem;\n --font-size-0-75: 0.75rem;\n --font-size-1: 1rem;\n --font-size-1-5: 1.25rem;\n --font-size-2: 1.5rem;\n --font-size-3: 2rem;\n --font-size-4: 2.5rem;\n --font-size-5: 3rem;\n --font-size-6: 3.5rem;\n --font-size-7: 4rem;\n --font-size-8: 4.5rem;\n --font-size-9: 5rem;\n}\n\n:root, :host {\n --font-weight-regular: 400;\n --font-weight-bold: 700;\n}\n\n:root, :host {\n --border-radius: var(--space-1);\n --border-width-sm: 1px;\n --border-width-md: 2px;\n --border-width-lg: 3px;\n --alert-border-width: var(--border-width-md);\n --fieldset-border-width: var(--border-width-md);\n --input-border-width: var(--border-width-md);\n}\n\n:root, :host {\n --space-0-125: 0.0625rem;\n --space-0-25: 0.125rem;\n --space-0-5: 0.25rem;\n --space-1: 0.5rem;\n --space-1-5: 0.75rem;\n --space-2: 1rem;\n --space-3: 1.5rem;\n --space-4: 2rem;\n --space-5: 2.5rem;\n --space-6: 3rem;\n --space-7: 3.5rem;\n --space-8: 4rem;\n --space-9: 4.5rem;\n --space-10: 5rem;\n}\n\n.rpf-button {\n --rpf-button-background-color: var(--rpf-navy-800);\n --rpf-button-background-color-hover: var(--rpf-navy-900);\n --rpf-button-background-color-active: var(--rpf-navy-600);\n --rpf-button-background-color-disabled: var(--rpf-grey-600);\n --rpf-button-text-color: var(--rpf-white);\n --rpf-button-border-radius: var(--border-radius);\n --rpf-button-lg-height: 48px;\n --rpf-button-sm-height: 32px;\n /* 44px min-height to meet WCAG AAA target size requirements */\n --rpf-button-min-target-size: 44px;\n all: unset;\n align-items: center;\n box-sizing: border-box;\n color: var(--rpf-button-text-color);\n /*\n * We've decided to follow the masses on this and have a pointer on buttons.\n * Google, Facebook, Twitter, Mozilla, and Microsoft amongst many others have a pointer on buttons.\n */\n cursor: pointer;\n display: flex;\n font-size: var(--font-size-1-5);\n font-weight: var(--font-weight-bold);\n gap: var(--space-1);\n min-block-size: var(--rpf-button-lg-height);\n padding: var(--space-1) var(--space-2);\n position: relative;\n text-align: center;\n text-decoration: none;\n /* Fixes a rendering error that sometimes occurs due to negative z-index */\n transform: scale(1);\n inline-size: fit-content;\n /* A bit of a hack to allow for separate visual and target heights */\n}\n.rpf-button::before {\n background-color: var(--rpf-button-background-color);\n border-color: var(--rpf-button-background-color);\n border-radius: var(--rpf-button-border-radius);\n border-style: solid;\n border-width: 2px;\n content: \"\";\n display: block;\n inset: 0;\n position: absolute;\n /* To ensure it renders under its siblings */\n z-index: -1;\n}\n.rpf-button:hover::before {\n background-color: var(--rpf-button-background-color-hover);\n border-color: var(--rpf-button-background-color-hover);\n}\n.rpf-button:active::before {\n background-color: var(--rpf-button-background-color-active);\n border-color: var(--rpf-button-background-color-active);\n}\n.rpf-button:focus-visible::before {\n outline: 2px solid var(--rpf-button-background-color);\n outline-offset: 3px;\n}\n.rpf-button:disabled, .rpf-button--disabled {\n cursor: default;\n}\n.rpf-button:disabled::before, .rpf-button:disabled:hover::before, .rpf-button--disabled::before, .rpf-button--disabled:hover::before {\n border-color: var(--rpf-button-background-color-disabled);\n background-color: var(--rpf-button-background-color-disabled);\n}\n.rpf-button--secondary {\n color: var(--rpf-button-background-color);\n}\n.rpf-button--secondary::before {\n background-color: var(--rpf-button-text-color);\n}\n.rpf-button--secondary:hover {\n color: var(--rpf-button-background-color-hover);\n}\n.rpf-button--secondary:hover::before {\n background-color: var(--rpf-button-text-color);\n border-color: var(--rpf-button-background-color-hover);\n}\n.rpf-button--secondary:active {\n color: var(--rpf-button-background-color-active);\n}\n.rpf-button--secondary:active::before {\n background-color: var(--rpf-button-text-color);\n border-color: var(--rpf-button-background-color-active);\n}\n.rpf-button--secondary:disabled, .rpf-button--secondary.rpf-button--disabled {\n color: var(--rpf-button-background-color-disabled);\n}\n.rpf-button--secondary:disabled:hover::before, .rpf-button--secondary:disabled:before, .rpf-button--secondary.rpf-button--disabled:hover::before, .rpf-button--secondary.rpf-button--disabled:before {\n background-color: var(--rpf-button-text-color);\n border-color: var(--rpf-button-background-color-disabled);\n}\n.rpf-button--tertiary {\n color: var(--rpf-button-background-color);\n}\n.rpf-button--tertiary::before {\n background-color: transparent;\n border-color: transparent;\n}\n.rpf-button--tertiary:hover {\n color: var(--rpf-button-background-color-hover);\n}\n.rpf-button--tertiary:hover::before {\n background-color: transparent;\n border-color: transparent;\n}\n.rpf-button--tertiary:active {\n color: var(--rpf-button-background-color-active);\n}\n.rpf-button--tertiary:active::before {\n background-color: transparent;\n}\n.rpf-button--tertiary:disabled, .rpf-button--tertiary.rpf-button--disabled {\n color: var(--rpf-button-background-color-disabled);\n}\n.rpf-button--tertiary:disabled::before, .rpf-button--tertiary:disabled:hover::before, .rpf-button--tertiary.rpf-button--disabled::before, .rpf-button--tertiary.rpf-button--disabled:hover::before {\n background-color: transparent;\n border-color: transparent;\n}\n.rpf-button--danger {\n --rpf-button-background-color: var(--rpf-alert-error);\n --rpf-button-background-color-hover: var(--rpf-alert-error);\n --rpf-button-background-color-active: var(--rpf-red-900);\n}\n.rpf-button--icon-only {\n block-size: var(--rpf-button-lg-height);\n line-height: var(--rpf-button-lg-height);\n padding: 0;\n text-align: center;\n inline-size: var(--rpf-button-lg-height);\n}\n.rpf-button--icon-only .rpf-button__icon {\n margin: 0 auto;\n}\n.rpf-button--sm {\n font-size: var(--font-size-1);\n min-block-size: var(--rpf-button-min-target-size);\n padding: var(--space-1) var(--space-1);\n /* To account for 32px visual height and 44px target height */\n}\n.rpf-button--sm::before {\n inset: calc((var(--rpf-button-min-target-size) - var(--rpf-button-sm-height)) / 2) 0;\n}\n.rpf-button--sm.rpf-button--icon-only {\n block-size: var(--rpf-button-min-target-size);\n line-height: var(--rpf-button-min-target-size);\n padding: 0;\n inline-size: var(--rpf-button-min-target-size);\n}\n.rpf-button--sm.rpf-button--icon-only::before {\n inset: calc((var(--rpf-button-min-target-size) - var(--rpf-button-sm-height)) / 2);\n}\n.rpf-button--sm .material-symbols-sharp {\n font-size: 20px;\n font-variation-settings: \"OPSZ\" 20;\n}\n.rpf-button--full-width {\n justify-content: center;\n inline-size: 100%;\n}\n";
2486
1176
  styleInject(css_248z$5);
2487
1177
 
2488
1178
  /* eslint-disable complexity */
2489
1179
  const Button = ({
2490
1180
  text,
2491
- type,
2492
- variant,
2493
- size,
2494
- icon,
2495
- iconOnly,
2496
- iconPosition,
2497
- fullWidth,
2498
- disabled,
2499
1181
  href,
2500
1182
  title,
2501
1183
  className,
2502
- onClick,
2503
- "aria-label": ariaLabel
1184
+ ariaLabel = "",
1185
+ type = "primary",
1186
+ variant = "",
1187
+ size = "default",
1188
+ icon = "",
1189
+ iconOnly = false,
1190
+ iconPosition = "left",
1191
+ fullWidth = false,
1192
+ disabled = false,
1193
+ onClick = () => {}
2504
1194
  }) => {
2505
1195
  const iconButton = icon && iconOnly;
2506
1196
  const classes = classNames(
@@ -2530,7 +1220,7 @@ const Button = ({
2530
1220
  }, text);
2531
1221
  const content = /*#__PURE__*/React.createElement(React.Fragment, null, renderIcon("left"), renderText(), renderIcon("right"));
2532
1222
  if (href) {
2533
- return /*#__PURE__*/React.createElement(Link, {
1223
+ return /*#__PURE__*/React.createElement(reactRouterDom.Link, {
2534
1224
  className: classes,
2535
1225
  "aria-label": ariaLabel,
2536
1226
  to: href,
@@ -2554,25 +1244,13 @@ Button.propTypes = {
2554
1244
  onClick: PropTypes.func,
2555
1245
  text: PropTypes.string,
2556
1246
  iconOnly: PropTypes.bool,
2557
- "aria-label": PropTypes.string,
1247
+ ariaLabel: PropTypes.string,
2558
1248
  title: PropTypes.string,
2559
1249
  iconPosition: PropTypes.oneOf(["left", "right"]),
2560
1250
  size: PropTypes.oneOf(["default", "small"]) // added size prop
2561
1251
  };
2562
- Button.defaultProps = {
2563
- type: "primary",
2564
- variant: "",
2565
- size: "default",
2566
- icon: "",
2567
- iconOnly: false,
2568
- iconPosition: "left",
2569
- fullWidth: false,
2570
- disabled: false,
2571
- onClick: () => {},
2572
- "aria-label": ""
2573
- };
2574
1252
 
2575
- var css_248z$4 = ":root, :host {\n --rpf-alert-error-highlight: hsla(0, 88%, 99%, 1);\n --rpf-alert-error: hsla(0, 88%, 33%, 1);\n --rpf-alert-information-highlight: hsla(225, 64%, 99%, 1);\n --rpf-alert-information: hsla(225, 64%, 33%, 1);\n --rpf-alert-success-highlight: hsla(136, 90%, 99%, 1);\n --rpf-alert-success: hsla(136, 90%, 20%, 1);\n --rpf-alert-warning-highlight: hsla(26, 70%, 99%, 1);\n --rpf-alert-warning: hsla(26, 70%, 29%, 1);\n}\n\n:root, :host {\n --rpf-white: hsla(0, 0%, 100%, 1);\n --rpf-off-white: hsla(225, 25%, 97%, 1);\n --rpf-grey-50: hsla(210, 8%, 95%, 1);\n --rpf-grey-100: hsla(228, 10%, 90%, 1);\n --rpf-grey-150: hsla(223, 9%, 85%, 1);\n --rpf-grey-200: hsla(228, 10%, 80%, 1);\n --rpf-grey-300: hsla(229, 9%, 75%, 1);\n --rpf-grey-400: hsla(229, 8%, 61%, 1);\n --rpf-grey-500: hsla(229, 9%, 42%, 1);\n --rpf-grey-600: hsla(228, 9%, 32%, 1);\n --rpf-grey-700: hsla(228, 9%, 22%, 1);\n --rpf-grey-800: hsla(232, 9%, 18%, 1);\n --rpf-grey-850: hsla(228, 9%, 15%, 1);\n --rpf-grey-900: hsla(228, 9%, 10%, 1);\n --rpf-grey-950: hsla(228, 8%, 5%, 1);\n --rpf-black: hsla(0, 0%, 0%, 1);\n}\n\n:root, :host {\n --rpf-text-primary: hsla(0, 0%, 13%, 1);\n --rpf-text-primary-darkmode: var(--rpf-white);\n --rpf-text-secondary: hsla(200, 9%, 33%, 1);\n --rpf-text-secondary-darkmode: hsla(0, 0%, 80%, 1);\n}\n\n:root, :host {\n --font-size-0-5: 0.5rem;\n --font-size-0-75: 0.75rem;\n --font-size-1: 1rem;\n --font-size-1-5: 1.25rem;\n --font-size-2: 1.5rem;\n --font-size-3: 2rem;\n --font-size-4: 2.5rem;\n --font-size-5: 3rem;\n --font-size-6: 3.5rem;\n --font-size-7: 4rem;\n --font-size-8: 4.5rem;\n --font-size-9: 5rem;\n}\n\n:root, :host {\n --font-weight-regular: 400;\n --font-weight-bold: 700;\n}\n\n:root, :host {\n --border-radius: var(--space-1);\n --border-width-sm: 1px;\n --border-width-md: 2px;\n --border-width-lg: 3px;\n --alert-border-width: var(--border-width-md);\n --fieldset-border-width: var(--border-width-md);\n --input-border-width: var(--border-width-md);\n}\n\n:root, :host {\n --space-0-125: 0.0625rem;\n --space-0-25: 0.125rem;\n --space-0-5: 0.25rem;\n --space-1: 0.5rem;\n --space-1-5: 0.75rem;\n --space-2: 1rem;\n --space-3: 1.5rem;\n --space-4: 2rem;\n --space-5: 2.5rem;\n --space-6: 3rem;\n --space-7: 3.5rem;\n --space-8: 4rem;\n --space-9: 4.5rem;\n --space-10: 5rem;\n}\n\n:root, :host {\n --font-size-0-5: 0.5rem;\n --font-size-0-75: 0.75rem;\n --font-size-1: 1rem;\n --font-size-1-5: 1.25rem;\n --font-size-2: 1.5rem;\n --font-size-3: 2rem;\n --font-size-4: 2.5rem;\n --font-size-5: 3rem;\n --font-size-6: 3.5rem;\n --font-size-7: 4rem;\n --font-size-8: 4.5rem;\n --font-size-9: 5rem;\n}\n\n:root, :host {\n --font-weight-regular: 400;\n --font-weight-bold: 700;\n}\n\n:root, :host {\n --line-height-0-75: 0.75rem;\n --line-height-1: 1rem;\n --line-height-1-5: 1.5rem;\n --line-height-2: 2rem;\n --line-height-2-5: 2.5rem;\n --line-height-3: 3rem;\n --line-height-3-5: 3.5rem;\n --line-height-4: 4rem;\n --line-height-4-5: 4.5rem;\n --line-height-5: 5rem;\n --line-height-5-5: 5.5rem;\n --line-height-6: 6rem;\n --line-height-6-5: 6.5rem;\n}\n\n:root {\n --rpf-alert-background-color: var(--rpf-alert-information-highlight);\n --rpf-alert-color: var(--rpf-alert-information);\n}\n\n.rpf-alert {\n align-items: center;\n background-color: var(--rpf-alert-background-color);\n border-color: var(--rpf-alert-color);\n border-radius: var(--border-radius);\n border-style: solid;\n border-width: var(--alert-border-width);\n color: var(--rpf-text-primary);\n display: flex;\n gap: var(--space-2);\n margin-block-end: var(--space-2);\n padding-block: var(--space-2);\n padding-inline: var(--space-2);\n text-align: center;\n}\n.rpf-alert__icon {\n align-self: flex-start;\n color: var(--rpf-alert-color);\n font-size: var(--font-size-2);\n}\n.rpf-alert__body {\n font-size: var(--font-size-1);\n font-weight: var(--font-weight-regular);\n line-height: var(--line-height-1-5);\n display: flex;\n flex-direction: column;\n text-align: start;\n}\n.rpf-alert__title {\n font-weight: var(--font-weight-bold);\n margin: 0;\n}\n.rpf-alert__actions {\n display: flex;\n flex-direction: row;\n gap: var(--space-2);\n}\n.rpf-alert__close {\n align-self: flex-start;\n background: none;\n border: none;\n color: inherit;\n cursor: pointer;\n font-size: var(--font-size-2);\n margin-inline-start: auto;\n}\n.rpf-alert--hidden {\n display: none;\n}\n.rpf-alert--error {\n --rpf-alert-background-color: var(--rpf-alert-error-highlight);\n --rpf-alert-color: var(--rpf-alert-error);\n}\n.rpf-alert--error .rpf-alert__icon::after {\n content: \"error_outline\";\n}\n.rpf-alert--information .rpf-alert__icon::after {\n content: \"info\";\n}\n.rpf-alert--warning {\n --rpf-alert-background-color: var(--rpf-alert-warning-highlight);\n --rpf-alert-color: var(--rpf-alert-warning);\n}\n.rpf-alert--warning .rpf-alert__icon::after {\n content: \"warning_amber\";\n}\n.rpf-alert--success {\n --rpf-alert-background-color: var(--rpf-alert-success-highlight);\n --rpf-alert-color: var(--rpf-alert-success);\n}\n.rpf-alert--success .rpf-alert__icon::after {\n content: \"check_circle\";\n}\n\n:root, :host {\n --rpf-brand-black: hsla(60, 4%, 11%, 1);\n --rpf-brand-leaf: hsla(123, 43%, 48%, 1);\n --rpf-brand-raspberry: hsla(342, 71%, 47%, 1);\n --rpf-raspberry-50: hsla(338, 57%, 97%, 1);\n --rpf-raspberry-100: hsla(342, 62%, 96%, 1);\n --rpf-raspberry-200: hsla(344, 73%, 93%, 1);\n --rpf-raspberry-400: hsla(341, 63%, 84%, 1);\n --rpf-raspberry-500: hsla(343, 62%, 68%, 1);\n --rpf-raspberry-600: hsla(343, 64%, 58%, 1);\n --rpf-raspberry-800: hsla(342, 71%, 47%, 1);\n --rpf-raspberry-900: hsla(340, 78%, 36%, 1);\n}\n\n:root, :host {\n --rpf-red-100: hsla(4, 89%, 96%, 1);\n --rpf-red-200: hsla(1, 87%, 91%, 1);\n --rpf-red-400: hsla(1, 87%, 82%, 1);\n --rpf-red-600: hsla(1, 87%, 72%, 1);\n --rpf-red-800: hsla(1, 87%, 63%, 1);\n --rpf-red-900: hsla(1, 52%, 50%, 1);\n --rpf-green-100: hsla(125, 41%, 95%, 1);\n --rpf-green-200: hsla(122, 39%, 87%, 1);\n --rpf-green-400: hsla(123, 40%, 74%, 1);\n --rpf-green-600: hsla(123, 40%, 61%, 1);\n --rpf-green-800: hsla(123, 43%, 48%, 1);\n --rpf-green-900: hsla(123, 43%, 34%, 1);\n --rpf-teal-100: hsla(176, 55%, 94%, 1);\n --rpf-teal-200: hsla(174, 55%, 85%, 1);\n --rpf-teal-400: hsla(174, 55%, 70%, 1);\n --rpf-teal-600: hsla(174, 56%, 56%, 1);\n --rpf-teal-800: hsla(174, 81%, 41%, 1);\n --rpf-teal-900: hsla(174, 81%, 27%, 1);\n --rpf-orange-100: hsla(31, 100%, 95%, 1);\n --rpf-orange-200: hsla(32, 100%, 88%, 1);\n --rpf-orange-400: hsla(31, 100%, 77%, 1);\n --rpf-orange-600: hsla(31, 99%, 65%, 1);\n --rpf-orange-800: hsla(31, 99%, 54%, 1);\n --rpf-orange-900: hsla(31, 85%, 35%, 1);\n --rpf-yellow-100: hsla(51, 100%, 95%, 1);\n --rpf-yellow-200: hsla(52, 100%, 87%, 1);\n --rpf-yellow-400: hsla(51, 100%, 75%, 1);\n --rpf-yellow-600: hsla(52, 100%, 63%, 1);\n --rpf-yellow-800: hsla(52, 100%, 50%, 1);\n --rpf-yellow-900: hsla(52, 100%, 26%, 1);\n --rpf-purple-100: hsla(282, 36%, 95%, 1);\n --rpf-purple-200: hsla(279, 38%, 87%, 1);\n --rpf-purple-400: hsla(279, 38%, 73%, 1);\n --rpf-purple-600: hsla(279, 37%, 60%, 1);\n --rpf-purple-800: hsla(279, 43%, 47%, 1);\n --rpf-purple-900: hsla(280, 43%, 37%, 1);\n --rpf-navy-100: hsla(235, 38%, 94%, 1);\n --rpf-navy-200: hsla(234, 38%, 84%, 1);\n --rpf-navy-400: hsla(235, 38%, 69%, 1);\n --rpf-navy-600: hsla(235, 38%, 53%, 1);\n --rpf-navy-800: hsla(235, 63%, 37%, 1);\n --rpf-navy-900: hsla(234, 63%, 30%, 1);\n --rpf-blue-100: hsla(203, 86%, 95%, 1);\n --rpf-blue-200: hsla(204, 88%, 87%, 1);\n --rpf-blue-400: hsla(204, 88%, 74%, 1);\n --rpf-blue-600: hsla(204, 89%, 60%, 1);\n --rpf-blue-800: hsla(204, 100%, 47%, 1);\n --rpf-blue-900: hsla(204, 99%, 37%, 1);\n}\n\n.rpf-button {\n --rpf-button-background-color: var(--rpf-navy-800);\n --rpf-button-background-color-hover: var(--rpf-navy-900);\n --rpf-button-background-color-active: var(--rpf-navy-600);\n --rpf-button-background-color-disabled: var(--rpf-grey-600);\n --rpf-button-text-color: var(--rpf-white);\n --rpf-button-border-radius: var(--border-radius);\n --rpf-button-lg-height: 48px;\n --rpf-button-sm-height: 32px;\n /* 44px min-height to meet WCAG AAA target size requirements */\n --rpf-button-min-target-size: 44px;\n all: unset;\n align-items: center;\n box-sizing: border-box;\n color: var(--rpf-button-text-color);\n /*\n * We've decided to follow the masses on this and have a pointer on buttons.\n * Google, Facebook, Twitter, Mozilla, and Microsoft amongst many others have a pointer on buttons.\n */\n cursor: pointer;\n display: flex;\n font-size: var(--font-size-1-5);\n font-weight: var(--font-weight-bold);\n gap: var(--space-1);\n min-block-size: var(--rpf-button-lg-height);\n padding: var(--space-1) var(--space-2);\n position: relative;\n text-align: center;\n text-decoration: none;\n /* Fixes a rendering error that sometimes occurs due to negative z-index */\n transform: scale(1);\n inline-size: fit-content;\n /* A bit of a hack to allow for separate visual and target heights */\n}\n.rpf-button::before {\n background-color: var(--rpf-button-background-color);\n border-color: var(--rpf-button-background-color);\n border-radius: var(--rpf-button-border-radius);\n border-style: solid;\n border-width: 2px;\n content: \"\";\n display: block;\n inset: 0;\n position: absolute;\n /* To ensure it renders under its siblings */\n z-index: -1;\n}\n.rpf-button:hover::before {\n background-color: var(--rpf-button-background-color-hover);\n border-color: var(--rpf-button-background-color-hover);\n}\n.rpf-button:active::before {\n background-color: var(--rpf-button-background-color-active);\n border-color: var(--rpf-button-background-color-active);\n}\n.rpf-button:focus-visible::before {\n outline: 2px solid var(--rpf-button-background-color);\n outline-offset: 3px;\n}\n.rpf-button:disabled, .rpf-button--disabled {\n cursor: default;\n}\n.rpf-button:disabled::before, .rpf-button:disabled:hover::before, .rpf-button--disabled::before, .rpf-button--disabled:hover::before {\n border-color: var(--rpf-button-background-color-disabled);\n background-color: var(--rpf-button-background-color-disabled);\n}\n.rpf-button--secondary {\n color: var(--rpf-button-background-color);\n}\n.rpf-button--secondary::before {\n background-color: var(--rpf-button-text-color);\n}\n.rpf-button--secondary:hover {\n color: var(--rpf-button-background-color-hover);\n}\n.rpf-button--secondary:hover::before {\n background-color: var(--rpf-button-text-color);\n border-color: var(--rpf-button-background-color-hover);\n}\n.rpf-button--secondary:active {\n color: var(--rpf-button-background-color-active);\n}\n.rpf-button--secondary:active::before {\n background-color: var(--rpf-button-text-color);\n border-color: var(--rpf-button-background-color-active);\n}\n.rpf-button--secondary:disabled, .rpf-button--secondary.rpf-button--disabled {\n color: var(--rpf-button-background-color-disabled);\n}\n.rpf-button--secondary:disabled:hover::before, .rpf-button--secondary:disabled:before, .rpf-button--secondary.rpf-button--disabled:hover::before, .rpf-button--secondary.rpf-button--disabled:before {\n background-color: var(--rpf-button-text-color);\n border-color: var(--rpf-button-background-color-disabled);\n}\n.rpf-button--tertiary {\n color: var(--rpf-button-background-color);\n}\n.rpf-button--tertiary::before {\n background-color: transparent;\n border-color: transparent;\n}\n.rpf-button--tertiary:hover {\n color: var(--rpf-button-background-color-hover);\n}\n.rpf-button--tertiary:hover::before {\n background-color: transparent;\n border-color: transparent;\n}\n.rpf-button--tertiary:active {\n color: var(--rpf-button-background-color-active);\n}\n.rpf-button--tertiary:active::before {\n background-color: transparent;\n}\n.rpf-button--tertiary:disabled, .rpf-button--tertiary.rpf-button--disabled {\n color: var(--rpf-button-background-color-disabled);\n}\n.rpf-button--tertiary:disabled::before, .rpf-button--tertiary:disabled:hover::before, .rpf-button--tertiary.rpf-button--disabled::before, .rpf-button--tertiary.rpf-button--disabled:hover::before {\n background-color: transparent;\n border-color: transparent;\n}\n.rpf-button--danger {\n --rpf-button-background-color: var(--rpf-alert-error);\n --rpf-button-background-color-hover: var(--rpf-alert-error);\n --rpf-button-background-color-active: var(--rpf-red-900);\n}\n.rpf-button--icon-only {\n block-size: var(--rpf-button-lg-height);\n line-height: var(--rpf-button-lg-height);\n padding: 0;\n text-align: center;\n inline-size: var(--rpf-button-lg-height);\n}\n.rpf-button--icon-only .rpf-button__icon {\n margin: 0 auto;\n}\n.rpf-button--sm {\n font-size: var(--font-size-1);\n min-block-size: var(--rpf-button-min-target-size);\n padding: var(--space-1) var(--space-1);\n /* To account for 32px visual height and 44px target height */\n}\n.rpf-button--sm::before {\n inset: calc((var(--rpf-button-min-target-size) - var(--rpf-button-sm-height)) / 2) 0;\n}\n.rpf-button--sm.rpf-button--icon-only {\n block-size: var(--rpf-button-min-target-size);\n line-height: var(--rpf-button-min-target-size);\n padding: 0;\n inline-size: var(--rpf-button-min-target-size);\n}\n.rpf-button--sm.rpf-button--icon-only::before {\n inset: calc((var(--rpf-button-min-target-size) - var(--rpf-button-sm-height)) / 2);\n}\n.rpf-button--sm .material-symbols-sharp {\n font-size: 20px;\n font-variation-settings: \"OPSZ\" 20;\n}\n.rpf-button--full-width {\n justify-content: center;\n inline-size: 100%;\n}\n";
1253
+ var css_248z$4 = ":root, :host {\n --rpf-alert-error-highlight: hsla(0, 88%, 99%, 1);\n --rpf-alert-error: hsla(0, 88%, 33%, 1);\n --rpf-alert-information-highlight: hsla(225, 64%, 99%, 1);\n --rpf-alert-information: hsla(225, 64%, 33%, 1);\n --rpf-alert-success-highlight: hsla(136, 90%, 99%, 1);\n --rpf-alert-success: hsla(136, 90%, 20%, 1);\n --rpf-alert-warning-highlight: hsla(26, 70%, 99%, 1);\n --rpf-alert-warning: hsla(26, 70%, 29%, 1);\n}\n\n:root, :host {\n --rpf-white: hsla(0, 0%, 100%, 1);\n --rpf-off-white: hsla(225, 25%, 97%, 1);\n --rpf-grey-50: hsla(210, 8%, 95%, 1);\n --rpf-grey-100: hsla(228, 10%, 90%, 1);\n --rpf-grey-150: hsla(223, 9%, 85%, 1);\n --rpf-grey-200: hsla(228, 10%, 80%, 1);\n --rpf-grey-300: hsla(229, 9%, 75%, 1);\n --rpf-grey-400: hsla(229, 8%, 61%, 1);\n --rpf-grey-500: hsla(229, 9%, 42%, 1);\n --rpf-grey-600: hsla(228, 9%, 32%, 1);\n --rpf-grey-700: hsla(228, 9%, 22%, 1);\n --rpf-grey-800: hsla(232, 9%, 18%, 1);\n --rpf-grey-850: hsla(228, 9%, 15%, 1);\n --rpf-grey-900: hsla(228, 9%, 10%, 1);\n --rpf-grey-950: hsla(228, 8%, 5%, 1);\n --rpf-black: hsla(0, 0%, 0%, 1);\n}\n\n:root, :host {\n --rpf-text-primary: hsla(0, 0%, 13%, 1);\n --rpf-text-primary-darkmode: var(--rpf-white);\n --rpf-text-secondary: hsla(200, 9%, 33%, 1);\n --rpf-text-secondary-darkmode: hsla(0, 0%, 80%, 1);\n}\n\n:root, :host {\n --font-size-0-5: 0.5rem;\n --font-size-0-75: 0.75rem;\n --font-size-1: 1rem;\n --font-size-1-5: 1.25rem;\n --font-size-2: 1.5rem;\n --font-size-3: 2rem;\n --font-size-4: 2.5rem;\n --font-size-5: 3rem;\n --font-size-6: 3.5rem;\n --font-size-7: 4rem;\n --font-size-8: 4.5rem;\n --font-size-9: 5rem;\n}\n\n:root, :host {\n --font-weight-regular: 400;\n --font-weight-bold: 700;\n}\n\n:root, :host {\n --border-radius: var(--space-1);\n --border-width-sm: 1px;\n --border-width-md: 2px;\n --border-width-lg: 3px;\n --alert-border-width: var(--border-width-md);\n --fieldset-border-width: var(--border-width-md);\n --input-border-width: var(--border-width-md);\n}\n\n:root, :host {\n --space-0-125: 0.0625rem;\n --space-0-25: 0.125rem;\n --space-0-5: 0.25rem;\n --space-1: 0.5rem;\n --space-1-5: 0.75rem;\n --space-2: 1rem;\n --space-3: 1.5rem;\n --space-4: 2rem;\n --space-5: 2.5rem;\n --space-6: 3rem;\n --space-7: 3.5rem;\n --space-8: 4rem;\n --space-9: 4.5rem;\n --space-10: 5rem;\n}\n\n:root, :host {\n --font-size-0-5: 0.5rem;\n --font-size-0-75: 0.75rem;\n --font-size-1: 1rem;\n --font-size-1-5: 1.25rem;\n --font-size-2: 1.5rem;\n --font-size-3: 2rem;\n --font-size-4: 2.5rem;\n --font-size-5: 3rem;\n --font-size-6: 3.5rem;\n --font-size-7: 4rem;\n --font-size-8: 4.5rem;\n --font-size-9: 5rem;\n}\n\n:root, :host {\n --font-weight-regular: 400;\n --font-weight-bold: 700;\n}\n\n:root, :host {\n --line-height-0-75: 0.75rem;\n --line-height-1: 1rem;\n --line-height-1-5: 1.5rem;\n --line-height-2: 2rem;\n --line-height-2-5: 2.5rem;\n --line-height-3: 3rem;\n --line-height-3-5: 3.5rem;\n --line-height-4: 4rem;\n --line-height-4-5: 4.5rem;\n --line-height-5: 5rem;\n --line-height-5-5: 5.5rem;\n --line-height-6: 6rem;\n --line-height-6-5: 6.5rem;\n}\n\n:root {\n --rpf-alert-background-color: var(--rpf-alert-information-highlight);\n --rpf-alert-color: var(--rpf-alert-information);\n}\n\n.rpf-alert {\n align-items: center;\n background-color: var(--rpf-alert-background-color);\n border-color: var(--rpf-alert-color);\n border-radius: var(--border-radius);\n border-style: solid;\n border-width: var(--alert-border-width);\n color: var(--rpf-text-primary);\n display: flex;\n gap: var(--space-2);\n margin-block-end: var(--space-2);\n padding-block: var(--space-2);\n padding-inline: var(--space-2);\n text-align: center;\n}\n.rpf-alert__icon {\n align-self: flex-start;\n color: var(--rpf-alert-color);\n font-size: var(--font-size-2);\n}\n.rpf-alert__body {\n font-size: var(--font-size-1);\n font-weight: var(--font-weight-regular);\n line-height: var(--line-height-1-5);\n display: flex;\n flex-direction: column;\n text-align: start;\n}\n.rpf-alert__title {\n font-weight: var(--font-weight-bold);\n margin: 0;\n}\n.rpf-alert__actions {\n display: flex;\n flex-direction: row;\n gap: var(--space-2);\n}\n.rpf-alert__close {\n align-self: flex-start;\n background: none;\n border: none;\n color: inherit;\n cursor: pointer;\n font-size: var(--font-size-2);\n margin-inline-start: auto;\n}\n.rpf-alert--hidden {\n display: none;\n}\n.rpf-alert--error {\n --rpf-alert-background-color: var(--rpf-alert-error-highlight);\n --rpf-alert-color: var(--rpf-alert-error);\n}\n.rpf-alert--error .rpf-alert__icon::after {\n content: \"error_outline\";\n}\n.rpf-alert--information .rpf-alert__icon::after {\n content: \"info\";\n}\n.rpf-alert--warning {\n --rpf-alert-background-color: var(--rpf-alert-warning-highlight);\n --rpf-alert-color: var(--rpf-alert-warning);\n}\n.rpf-alert--warning .rpf-alert__icon::after {\n content: \"warning_amber\";\n}\n.rpf-alert--success {\n --rpf-alert-background-color: var(--rpf-alert-success-highlight);\n --rpf-alert-color: var(--rpf-alert-success);\n}\n.rpf-alert--success .rpf-alert__icon::after {\n content: \"check_circle\";\n}\n\n:root, :host {\n --rpf-brand-black: hsla(60, 4%, 11%, 1);\n --rpf-brand-leaf: hsla(123, 43%, 48%, 1);\n --rpf-brand-raspberry: hsla(342, 71%, 47%, 1);\n --rpf-raspberry-50: hsla(338, 57%, 97%, 1);\n --rpf-raspberry-100: hsla(342, 62%, 96%, 1);\n --rpf-raspberry-200: hsla(344, 73%, 93%, 1);\n --rpf-raspberry-400: hsla(341, 63%, 84%, 1);\n --rpf-raspberry-500: hsla(343, 62%, 68%, 1);\n --rpf-raspberry-600: hsla(343, 64%, 58%, 1);\n --rpf-raspberry-800: hsla(342, 71%, 47%, 1);\n --rpf-raspberry-900: hsla(340, 78%, 36%, 1);\n}\n\n:root, :host {\n --rpf-red-100: hsla(4, 89%, 96%, 1);\n --rpf-red-200: hsla(1, 87%, 91%, 1);\n --rpf-red-400: hsla(1, 87%, 82%, 1);\n --rpf-red-600: hsla(1, 87%, 72%, 1);\n --rpf-red-800: hsla(1, 87%, 63%, 1);\n --rpf-red-900: hsla(1, 52%, 50%, 1);\n --rpf-green-100: hsla(125, 41%, 95%, 1);\n --rpf-green-200: hsla(122, 39%, 87%, 1);\n --rpf-green-400: hsla(123, 40%, 74%, 1);\n --rpf-green-600: hsla(123, 40%, 61%, 1);\n --rpf-green-800: hsla(123, 43%, 48%, 1);\n --rpf-green-900: hsla(123, 43%, 34%, 1);\n --rpf-teal-100: hsla(176, 55%, 94%, 1);\n --rpf-teal-200: hsla(174, 55%, 85%, 1);\n --rpf-teal-400: hsla(174, 55%, 70%, 1);\n --rpf-teal-600: hsla(174, 56%, 56%, 1);\n --rpf-teal-800: hsla(174, 81%, 41%, 1);\n --rpf-teal-900: hsla(174, 81%, 27%, 1);\n --rpf-orange-100: hsla(31, 100%, 95%, 1);\n --rpf-orange-200: hsla(32, 100%, 88%, 1);\n --rpf-orange-400: hsla(31, 100%, 77%, 1);\n --rpf-orange-600: hsla(31, 99%, 65%, 1);\n --rpf-orange-800: hsla(31, 99%, 54%, 1);\n --rpf-orange-900: hsla(31, 85%, 35%, 1);\n --rpf-yellow-100: hsla(51, 100%, 95%, 1);\n --rpf-yellow-200: hsla(52, 100%, 87%, 1);\n --rpf-yellow-400: hsla(51, 100%, 75%, 1);\n --rpf-yellow-600: hsla(52, 100%, 63%, 1);\n --rpf-yellow-800: hsla(52, 100%, 50%, 1);\n --rpf-yellow-900: hsla(52, 100%, 26%, 1);\n --rpf-purple-100: hsla(282, 36%, 95%, 1);\n --rpf-purple-200: hsla(279, 38%, 87%, 1);\n --rpf-purple-400: hsla(279, 38%, 73%, 1);\n --rpf-purple-600: hsla(279, 37%, 60%, 1);\n --rpf-purple-800: hsla(279, 43%, 47%, 1);\n --rpf-purple-900: hsla(280, 43%, 37%, 1);\n --rpf-navy-100: hsla(235, 38%, 94%, 1);\n --rpf-navy-200: hsla(234, 38%, 84%, 1);\n --rpf-navy-400: hsla(235, 38%, 69%, 1);\n --rpf-navy-600: hsla(235, 38%, 53%, 1);\n --rpf-navy-800: hsla(235, 63%, 37%, 1);\n --rpf-navy-900: hsla(234, 63%, 30%, 1);\n --rpf-blue-100: hsla(203, 86%, 95%, 1);\n --rpf-blue-200: hsla(204, 88%, 87%, 1);\n --rpf-blue-400: hsla(204, 88%, 74%, 1);\n --rpf-blue-600: hsla(204, 89%, 60%, 1);\n --rpf-blue-800: hsla(204, 100%, 47%, 1);\n --rpf-blue-900: hsla(204, 99%, 37%, 1);\n}\n\n.rpf-button {\n --rpf-button-background-color: var(--rpf-navy-800);\n --rpf-button-background-color-hover: var(--rpf-navy-900);\n --rpf-button-background-color-active: var(--rpf-navy-600);\n --rpf-button-background-color-disabled: var(--rpf-grey-600);\n --rpf-button-text-color: var(--rpf-white);\n --rpf-button-border-radius: var(--border-radius);\n --rpf-button-lg-height: 48px;\n --rpf-button-sm-height: 32px;\n /* 44px min-height to meet WCAG AAA target size requirements */\n --rpf-button-min-target-size: 44px;\n all: unset;\n align-items: center;\n box-sizing: border-box;\n color: var(--rpf-button-text-color);\n /*\n * We've decided to follow the masses on this and have a pointer on buttons.\n * Google, Facebook, Twitter, Mozilla, and Microsoft amongst many others have a pointer on buttons.\n */\n cursor: pointer;\n display: flex;\n font-size: var(--font-size-1-5);\n font-weight: var(--font-weight-bold);\n gap: var(--space-1);\n min-block-size: var(--rpf-button-lg-height);\n padding: var(--space-1) var(--space-2);\n position: relative;\n text-align: center;\n text-decoration: none;\n /* Fixes a rendering error that sometimes occurs due to negative z-index */\n transform: scale(1);\n inline-size: fit-content;\n /* A bit of a hack to allow for separate visual and target heights */\n}\n.rpf-button::before {\n background-color: var(--rpf-button-background-color);\n border-color: var(--rpf-button-background-color);\n border-radius: var(--rpf-button-border-radius);\n border-style: solid;\n border-width: 2px;\n content: \"\";\n display: block;\n inset: 0;\n position: absolute;\n /* To ensure it renders under its siblings */\n z-index: -1;\n}\n.rpf-button:hover::before {\n background-color: var(--rpf-button-background-color-hover);\n border-color: var(--rpf-button-background-color-hover);\n}\n.rpf-button:active::before {\n background-color: var(--rpf-button-background-color-active);\n border-color: var(--rpf-button-background-color-active);\n}\n.rpf-button:focus-visible::before {\n outline: 2px solid var(--rpf-button-background-color);\n outline-offset: 3px;\n}\n.rpf-button:disabled, .rpf-button--disabled {\n cursor: default;\n}\n.rpf-button:disabled::before, .rpf-button:disabled:hover::before, .rpf-button--disabled::before, .rpf-button--disabled:hover::before {\n border-color: var(--rpf-button-background-color-disabled);\n background-color: var(--rpf-button-background-color-disabled);\n}\n.rpf-button--secondary {\n color: var(--rpf-button-background-color);\n}\n.rpf-button--secondary::before {\n background-color: var(--rpf-button-text-color);\n}\n.rpf-button--secondary:hover {\n color: var(--rpf-button-background-color-hover);\n}\n.rpf-button--secondary:hover::before {\n background-color: var(--rpf-button-text-color);\n border-color: var(--rpf-button-background-color-hover);\n}\n.rpf-button--secondary:active {\n color: var(--rpf-button-background-color-active);\n}\n.rpf-button--secondary:active::before {\n background-color: var(--rpf-button-text-color);\n border-color: var(--rpf-button-background-color-active);\n}\n.rpf-button--secondary:disabled, .rpf-button--secondary.rpf-button--disabled {\n color: var(--rpf-button-background-color-disabled);\n}\n.rpf-button--secondary:disabled:hover::before, .rpf-button--secondary:disabled:before, .rpf-button--secondary.rpf-button--disabled:hover::before, .rpf-button--secondary.rpf-button--disabled:before {\n background-color: var(--rpf-button-text-color);\n border-color: var(--rpf-button-background-color-disabled);\n}\n.rpf-button--tertiary {\n color: var(--rpf-button-background-color);\n}\n.rpf-button--tertiary::before {\n background-color: transparent;\n border-color: transparent;\n}\n.rpf-button--tertiary:hover {\n color: var(--rpf-button-background-color-hover);\n}\n.rpf-button--tertiary:hover::before {\n background-color: transparent;\n border-color: transparent;\n}\n.rpf-button--tertiary:active {\n color: var(--rpf-button-background-color-active);\n}\n.rpf-button--tertiary:active::before {\n background-color: transparent;\n}\n.rpf-button--tertiary:disabled, .rpf-button--tertiary.rpf-button--disabled {\n color: var(--rpf-button-background-color-disabled);\n}\n.rpf-button--tertiary:disabled::before, .rpf-button--tertiary:disabled:hover::before, .rpf-button--tertiary.rpf-button--disabled::before, .rpf-button--tertiary.rpf-button--disabled:hover::before {\n background-color: transparent;\n border-color: transparent;\n}\n.rpf-button--danger {\n --rpf-button-background-color: var(--rpf-alert-error);\n --rpf-button-background-color-hover: var(--rpf-alert-error);\n --rpf-button-background-color-active: var(--rpf-red-900);\n}\n.rpf-button--icon-only {\n block-size: var(--rpf-button-lg-height);\n line-height: var(--rpf-button-lg-height);\n padding: 0;\n text-align: center;\n inline-size: var(--rpf-button-lg-height);\n}\n.rpf-button--icon-only .rpf-button__icon {\n margin: 0 auto;\n}\n.rpf-button--sm {\n font-size: var(--font-size-1);\n min-block-size: var(--rpf-button-min-target-size);\n padding: var(--space-1) var(--space-1);\n /* To account for 32px visual height and 44px target height */\n}\n.rpf-button--sm::before {\n inset: calc((var(--rpf-button-min-target-size) - var(--rpf-button-sm-height)) / 2) 0;\n}\n.rpf-button--sm.rpf-button--icon-only {\n block-size: var(--rpf-button-min-target-size);\n line-height: var(--rpf-button-min-target-size);\n padding: 0;\n inline-size: var(--rpf-button-min-target-size);\n}\n.rpf-button--sm.rpf-button--icon-only::before {\n inset: calc((var(--rpf-button-min-target-size) - var(--rpf-button-sm-height)) / 2);\n}\n.rpf-button--sm .material-symbols-sharp {\n font-size: 20px;\n font-variation-settings: \"OPSZ\" 20;\n}\n.rpf-button--full-width {\n justify-content: center;\n inline-size: 100%;\n}\n\np {\n margin-block-end: 0;\n}\n\n.rpf-alert__actions .rpf-button {\n padding-inline-start: 0;\n padding-block-end: 0;\n}\n";
2576
1254
  styleInject(css_248z$4);
2577
1255
 
2578
1256
  /* eslint-disable complexity */
@@ -2592,7 +1270,7 @@ const Alert = ({
2592
1270
  }, title), /*#__PURE__*/React.createElement("p", null, text), actions && actions.length > 0 && /*#__PURE__*/React.createElement("div", {
2593
1271
  className: "rpf-alert__actions"
2594
1272
  }, actions.map(action => /*#__PURE__*/React.createElement(Button, {
2595
- key: action.label,
1273
+ key: action.key || action.label,
2596
1274
  text: action.label,
2597
1275
  size: "small",
2598
1276
  type: "tertiary",
@@ -2614,7 +1292,7 @@ styleInject(css_248z$3);
2614
1292
 
2615
1293
  /* eslint-disable complexity */
2616
1294
  const ProgressBar = ({
2617
- text,
1295
+ text = "",
2618
1296
  percent
2619
1297
  }) => /*#__PURE__*/React.createElement("div", {
2620
1298
  className: "rpf-progress-bar"
@@ -2632,22 +1310,19 @@ ProgressBar.propTypes = {
2632
1310
  text: PropTypes.string,
2633
1311
  percent: PropTypes.number.isRequired
2634
1312
  };
2635
- ProgressBar.defaultProps = {
2636
- text: ""
2637
- };
2638
1313
 
2639
1314
  var css_248z$2 = ":root, :host {\n --border-radius: var(--space-1);\n --border-width-sm: 1px;\n --border-width-md: 2px;\n --border-width-lg: 3px;\n --alert-border-width: var(--border-width-md);\n --fieldset-border-width: var(--border-width-md);\n --input-border-width: var(--border-width-md);\n}\n\n:root, :host {\n --rpf-alert-error-highlight: hsla(0, 88%, 99%, 1);\n --rpf-alert-error: hsla(0, 88%, 33%, 1);\n --rpf-alert-information-highlight: hsla(225, 64%, 99%, 1);\n --rpf-alert-information: hsla(225, 64%, 33%, 1);\n --rpf-alert-success-highlight: hsla(136, 90%, 99%, 1);\n --rpf-alert-success: hsla(136, 90%, 20%, 1);\n --rpf-alert-warning-highlight: hsla(26, 70%, 99%, 1);\n --rpf-alert-warning: hsla(26, 70%, 29%, 1);\n}\n\n:root, :host {\n --rpf-white: hsla(0, 0%, 100%, 1);\n --rpf-off-white: hsla(225, 25%, 97%, 1);\n --rpf-grey-50: hsla(210, 8%, 95%, 1);\n --rpf-grey-100: hsla(228, 10%, 90%, 1);\n --rpf-grey-150: hsla(223, 9%, 85%, 1);\n --rpf-grey-200: hsla(228, 10%, 80%, 1);\n --rpf-grey-300: hsla(229, 9%, 75%, 1);\n --rpf-grey-400: hsla(229, 8%, 61%, 1);\n --rpf-grey-500: hsla(229, 9%, 42%, 1);\n --rpf-grey-600: hsla(228, 9%, 32%, 1);\n --rpf-grey-700: hsla(228, 9%, 22%, 1);\n --rpf-grey-800: hsla(232, 9%, 18%, 1);\n --rpf-grey-850: hsla(228, 9%, 15%, 1);\n --rpf-grey-900: hsla(228, 9%, 10%, 1);\n --rpf-grey-950: hsla(228, 8%, 5%, 1);\n --rpf-black: hsla(0, 0%, 0%, 1);\n}\n\n:root, :host {\n --rpf-red-100: hsla(4, 89%, 96%, 1);\n --rpf-red-200: hsla(1, 87%, 91%, 1);\n --rpf-red-400: hsla(1, 87%, 82%, 1);\n --rpf-red-600: hsla(1, 87%, 72%, 1);\n --rpf-red-800: hsla(1, 87%, 63%, 1);\n --rpf-red-900: hsla(1, 52%, 50%, 1);\n --rpf-green-100: hsla(125, 41%, 95%, 1);\n --rpf-green-200: hsla(122, 39%, 87%, 1);\n --rpf-green-400: hsla(123, 40%, 74%, 1);\n --rpf-green-600: hsla(123, 40%, 61%, 1);\n --rpf-green-800: hsla(123, 43%, 48%, 1);\n --rpf-green-900: hsla(123, 43%, 34%, 1);\n --rpf-teal-100: hsla(176, 55%, 94%, 1);\n --rpf-teal-200: hsla(174, 55%, 85%, 1);\n --rpf-teal-400: hsla(174, 55%, 70%, 1);\n --rpf-teal-600: hsla(174, 56%, 56%, 1);\n --rpf-teal-800: hsla(174, 81%, 41%, 1);\n --rpf-teal-900: hsla(174, 81%, 27%, 1);\n --rpf-orange-100: hsla(31, 100%, 95%, 1);\n --rpf-orange-200: hsla(32, 100%, 88%, 1);\n --rpf-orange-400: hsla(31, 100%, 77%, 1);\n --rpf-orange-600: hsla(31, 99%, 65%, 1);\n --rpf-orange-800: hsla(31, 99%, 54%, 1);\n --rpf-orange-900: hsla(31, 85%, 35%, 1);\n --rpf-yellow-100: hsla(51, 100%, 95%, 1);\n --rpf-yellow-200: hsla(52, 100%, 87%, 1);\n --rpf-yellow-400: hsla(51, 100%, 75%, 1);\n --rpf-yellow-600: hsla(52, 100%, 63%, 1);\n --rpf-yellow-800: hsla(52, 100%, 50%, 1);\n --rpf-yellow-900: hsla(52, 100%, 26%, 1);\n --rpf-purple-100: hsla(282, 36%, 95%, 1);\n --rpf-purple-200: hsla(279, 38%, 87%, 1);\n --rpf-purple-400: hsla(279, 38%, 73%, 1);\n --rpf-purple-600: hsla(279, 37%, 60%, 1);\n --rpf-purple-800: hsla(279, 43%, 47%, 1);\n --rpf-purple-900: hsla(280, 43%, 37%, 1);\n --rpf-navy-100: hsla(235, 38%, 94%, 1);\n --rpf-navy-200: hsla(234, 38%, 84%, 1);\n --rpf-navy-400: hsla(235, 38%, 69%, 1);\n --rpf-navy-600: hsla(235, 38%, 53%, 1);\n --rpf-navy-800: hsla(235, 63%, 37%, 1);\n --rpf-navy-900: hsla(234, 63%, 30%, 1);\n --rpf-blue-100: hsla(203, 86%, 95%, 1);\n --rpf-blue-200: hsla(204, 88%, 87%, 1);\n --rpf-blue-400: hsla(204, 88%, 74%, 1);\n --rpf-blue-600: hsla(204, 89%, 60%, 1);\n --rpf-blue-800: hsla(204, 100%, 47%, 1);\n --rpf-blue-900: hsla(204, 99%, 37%, 1);\n}\n\n:root, :host {\n --rpf-text-primary: hsla(0, 0%, 13%, 1);\n --rpf-text-primary-darkmode: var(--rpf-white);\n --rpf-text-secondary: hsla(200, 9%, 33%, 1);\n --rpf-text-secondary-darkmode: hsla(0, 0%, 80%, 1);\n}\n\n:root, :host {\n --rpf-input-background-color: var(--rpf-white);\n --rpf-input-background-color-disabled: var(--rpf-grey-50);\n --rpf-input-background-color-readonly: var(--rpf-grey-50);\n --rpf-input-color-error: var(--rpf-alert-error);\n --rpf-input-color: var(--rpf-text-primary);\n --rpf-input-outline-color: var(--rpf-blue-800);\n}\n\n:root, :host {\n --font-size-0-5: 0.5rem;\n --font-size-0-75: 0.75rem;\n --font-size-1: 1rem;\n --font-size-1-5: 1.25rem;\n --font-size-2: 1.5rem;\n --font-size-3: 2rem;\n --font-size-4: 2.5rem;\n --font-size-5: 3rem;\n --font-size-6: 3.5rem;\n --font-size-7: 4rem;\n --font-size-8: 4.5rem;\n --font-size-9: 5rem;\n}\n\n:root, :host {\n --space-0-125: 0.0625rem;\n --space-0-25: 0.125rem;\n --space-0-5: 0.25rem;\n --space-1: 0.5rem;\n --space-1-5: 0.75rem;\n --space-2: 1rem;\n --space-3: 1.5rem;\n --space-4: 2rem;\n --space-5: 2.5rem;\n --space-6: 3rem;\n --space-7: 3.5rem;\n --space-8: 4rem;\n --space-9: 4.5rem;\n --space-10: 5rem;\n}\n\n.rpf-input-field {\n margin-block-end: var(--space-3);\n}\n\n.rpf-input {\n all: unset;\n background-color: var(--rpf-input-background-color);\n border: var(--input-border-width) solid var(--rpf-input-color);\n border-radius: var(--border-radius);\n box-sizing: border-box;\n color: var(--rpf-input-color);\n display: flex;\n font-size: var(--font-size-1);\n line-height: var(--line-height-2);\n padding-block: calc(var(--space-1) - 2px);\n padding-inline: var(--space-1-5);\n max-width: 50ch;\n min-width: 240px;\n width: 100%;\n}\n.rpf-input:focus-visible {\n outline: 3px solid var(--rpf-input-outline-color);\n}\n.rpf-input:disabled, .rpf-input--disabled {\n background-color: var(--rpf-input-background-color-disabled);\n border-color: var(--rpf-input-background-color-disabled);\n}\n.rpf-input--error {\n border-color: var(--rpf-input-color-error);\n}\n.rpf-input--full-width {\n max-width: none;\n}\n\n:root, :host {\n --font-weight-regular: 400;\n --font-weight-bold: 700;\n}\n\n:root, :host {\n --line-height-0-75: 0.75rem;\n --line-height-1: 1rem;\n --line-height-1-5: 1.5rem;\n --line-height-2: 2rem;\n --line-height-2-5: 2.5rem;\n --line-height-3: 3rem;\n --line-height-3-5: 3.5rem;\n --line-height-4: 4rem;\n --line-height-4-5: 4.5rem;\n --line-height-5: 5rem;\n --line-height-5-5: 5.5rem;\n --line-height-6: 6rem;\n --line-height-6-5: 6.5rem;\n}\n\n:root {\n --rpf-label-hint-color: var(--rpf-text-secondary);\n --rpf-label-text-color: var(--rpf-text-primary);\n --rpf-label-text-color-disabled: var(--rpf-grey-500);\n}\n\n.rpf-label {\n all: unset;\n color: var(--rpf-label-text-color);\n display: flex;\n flex-direction: column;\n font-weight: var(--font-weight-bold);\n padding-block-end: var(--space-1);\n font-size: var(--font-size-1);\n line-height: var(--line-height-1-5);\n}\n.rpf-label__hint {\n color: var(--rpf-label-hint-color);\n font-size: var(--font-size-1);\n font-weight: var(--font-weight-regular);\n}\n.rpf-label--disabled {\n color: var(--rpf-label-text-color-disabled);\n}\n.rpf-label--disabled .rpf-label__hint {\n color: var(--rpf-label-text-color-disabled);\n}\n\n.rpf-input-checkbox {\n --rpf-input-checkbox-hit-target: 44px;\n --rpf-input-checkbox-size: var(--space-3);\n align-items: center;\n border-radius: var(--space-1);\n box-sizing: border-box;\n display: flex;\n gap: var(--space-1-5);\n margin-block-end: var(--space-1);\n max-width: 50ch;\n min-height: var(--rpf-input-checkbox-hit-target);\n min-width: 240px;\n padding-block: calc((var(--rpf-input-checkbox-hit-target) - var(--rpf-input-checkbox-size)) / 2);\n padding-inline: var(--space-1);\n width: 100%;\n}\n.rpf-input-checkbox input[type=checkbox] {\n align-self: flex-start;\n appearance: none;\n background: var(--rpf-white);\n border: var(--space-0-25) solid var(--rpf-grey-850);\n border-radius: var(--space-0-5);\n flex-shrink: 0;\n height: var(--rpf-input-checkbox-size);\n margin: 0;\n width: var(--rpf-input-checkbox-size);\n}\n.rpf-input-checkbox input[type=checkbox]:checked {\n background: var(--rpf-grey-850);\n background-image: url('data:image/svg+xml;utf8,<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M7.95834 15.0003L3.20834 10.2503L4.39584 9.06283L7.95834 12.6253L15.6042 4.97949L16.7917 6.16699L7.95834 15.0003Z\" fill=\"white\"/></svg>');\n}\n.rpf-input-checkbox input[type=checkbox]:disabled {\n border-color: var(--rpf-grey-600);\n}\n.rpf-input-checkbox input[type=checkbox]:disabled:checked {\n background-color: var(--rpf-grey-600);\n}\n.rpf-input-checkbox.rpf-input--full-width {\n max-width: none;\n}\n.rpf-input-checkbox:has(> input[type=checkbox]:disabled), .rpf-input-checkbox--disabled {\n background-color: var(--rpf-input-background-color-disabled);\n color: var(--rpf-grey-400);\n}\n.rpf-input-checkbox:has(> input[type=checkbox]:focus-visible) {\n outline: 3px solid var(--rpf-input-outline-color);\n}\n.rpf-input-checkbox:has(> input[type=checkbox]:focus-visible) > input[type=checkbox]:focus-visible {\n outline: none;\n}\n\n:root {\n --rpf-message-text-color: var(--rpf-alert-error);\n}\n\n.rpf-error-message {\n all: unset;\n align-items: center;\n color: var(--rpf-message-text-color);\n display: flex;\n font-weight: var(--font-weight-bold);\n padding-block-end: var(--space-1);\n}\n.rpf-error-message__icon {\n margin-inline-end: var(--space-1);\n padding-block: var(--space-1);\n}\n";
2640
1315
  styleInject(css_248z$2);
2641
1316
 
2642
1317
  const CheckboxInput = ({
2643
- checked,
2644
- disabled,
2645
- error,
2646
1318
  id,
2647
1319
  label,
2648
1320
  name,
2649
- onChange,
2650
- value
1321
+ checked = false,
1322
+ disabled = false,
1323
+ error = "",
1324
+ onChange = () => {},
1325
+ value = ""
2651
1326
  }) => /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("label", {
2652
1327
  className: classNames("rpf-input-checkbox", {
2653
1328
  "rpf-input-checkbox--error": error
@@ -2677,21 +1352,14 @@ CheckboxInput.propTypes = {
2677
1352
  onChange: PropTypes.func,
2678
1353
  value: PropTypes.string
2679
1354
  };
2680
- CheckboxInput.defaultProps = {
2681
- checked: true,
2682
- disabled: false,
2683
- error: "",
2684
- onChange: () => {},
2685
- value: "on"
2686
- };
2687
1355
 
2688
1356
  const InputField = ({
2689
- disabled,
2690
- error,
2691
- hint,
2692
1357
  label,
2693
1358
  name,
2694
- children
1359
+ children,
1360
+ disabled = false,
1361
+ error = "",
1362
+ hint = ""
2695
1363
  }) => /*#__PURE__*/React.createElement("div", {
2696
1364
  className: "rpf-input-field"
2697
1365
  }, (label || hint) && /*#__PURE__*/React.createElement("label", {
@@ -2713,27 +1381,22 @@ InputField.propTypes = {
2713
1381
  label: PropTypes.oneOfType([PropTypes.string, PropTypes.object]).isRequired,
2714
1382
  name: PropTypes.string.isRequired
2715
1383
  };
2716
- InputField.defaultProps = {
2717
- disabled: false,
2718
- error: "",
2719
- hint: ""
2720
- };
2721
1384
 
2722
1385
  var css_248z$1 = ":root, :host {\n --rpf-alert-error-highlight: hsla(0, 88%, 99%, 1);\n --rpf-alert-error: hsla(0, 88%, 33%, 1);\n --rpf-alert-information-highlight: hsla(225, 64%, 99%, 1);\n --rpf-alert-information: hsla(225, 64%, 33%, 1);\n --rpf-alert-success-highlight: hsla(136, 90%, 99%, 1);\n --rpf-alert-success: hsla(136, 90%, 20%, 1);\n --rpf-alert-warning-highlight: hsla(26, 70%, 99%, 1);\n --rpf-alert-warning: hsla(26, 70%, 29%, 1);\n}\n\n:root, :host {\n --font-weight-regular: 400;\n --font-weight-bold: 700;\n}\n\n:root, :host {\n --space-0-125: 0.0625rem;\n --space-0-25: 0.125rem;\n --space-0-5: 0.25rem;\n --space-1: 0.5rem;\n --space-1-5: 0.75rem;\n --space-2: 1rem;\n --space-3: 1.5rem;\n --space-4: 2rem;\n --space-5: 2.5rem;\n --space-6: 3rem;\n --space-7: 3.5rem;\n --space-8: 4rem;\n --space-9: 4.5rem;\n --space-10: 5rem;\n}\n\n:root {\n --rpf-message-text-color: var(--rpf-alert-error);\n}\n\n.rpf-error-message {\n all: unset;\n align-items: center;\n color: var(--rpf-message-text-color);\n display: flex;\n font-weight: var(--font-weight-bold);\n padding-block-end: var(--space-1);\n}\n.rpf-error-message__icon {\n margin-inline-end: var(--space-1);\n padding-block: var(--space-1);\n}\n\n:root, :host {\n --rpf-white: hsla(0, 0%, 100%, 1);\n --rpf-off-white: hsla(225, 25%, 97%, 1);\n --rpf-grey-50: hsla(210, 8%, 95%, 1);\n --rpf-grey-100: hsla(228, 10%, 90%, 1);\n --rpf-grey-150: hsla(223, 9%, 85%, 1);\n --rpf-grey-200: hsla(228, 10%, 80%, 1);\n --rpf-grey-300: hsla(229, 9%, 75%, 1);\n --rpf-grey-400: hsla(229, 8%, 61%, 1);\n --rpf-grey-500: hsla(229, 9%, 42%, 1);\n --rpf-grey-600: hsla(228, 9%, 32%, 1);\n --rpf-grey-700: hsla(228, 9%, 22%, 1);\n --rpf-grey-800: hsla(232, 9%, 18%, 1);\n --rpf-grey-850: hsla(228, 9%, 15%, 1);\n --rpf-grey-900: hsla(228, 9%, 10%, 1);\n --rpf-grey-950: hsla(228, 8%, 5%, 1);\n --rpf-black: hsla(0, 0%, 0%, 1);\n}\n\n:root, :host {\n --rpf-text-primary: hsla(0, 0%, 13%, 1);\n --rpf-text-primary-darkmode: var(--rpf-white);\n --rpf-text-secondary: hsla(200, 9%, 33%, 1);\n --rpf-text-secondary-darkmode: hsla(0, 0%, 80%, 1);\n}\n\n:root, :host {\n --line-height-0-75: 0.75rem;\n --line-height-1: 1rem;\n --line-height-1-5: 1.5rem;\n --line-height-2: 2rem;\n --line-height-2-5: 2.5rem;\n --line-height-3: 3rem;\n --line-height-3-5: 3.5rem;\n --line-height-4: 4rem;\n --line-height-4-5: 4.5rem;\n --line-height-5: 5rem;\n --line-height-5-5: 5.5rem;\n --line-height-6: 6rem;\n --line-height-6-5: 6.5rem;\n}\n\n:root {\n --rpf-label-hint-color: var(--rpf-text-secondary);\n --rpf-label-text-color: var(--rpf-text-primary);\n --rpf-label-text-color-disabled: var(--rpf-grey-500);\n}\n\n.rpf-label {\n all: unset;\n color: var(--rpf-label-text-color);\n display: flex;\n flex-direction: column;\n font-weight: var(--font-weight-bold);\n padding-block-end: var(--space-1);\n font-size: var(--font-size-1);\n line-height: var(--line-height-1-5);\n}\n.rpf-label__hint {\n color: var(--rpf-label-hint-color);\n font-size: var(--font-size-1);\n font-weight: var(--font-weight-regular);\n}\n.rpf-label--disabled {\n color: var(--rpf-label-text-color-disabled);\n}\n.rpf-label--disabled .rpf-label__hint {\n color: var(--rpf-label-text-color-disabled);\n}\n\n.rpf-input.rpf-input-select {\n background-image: url(\"data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none'><path fill='%23212121' d='m12 15.375-6-6 1.4-1.4 4.6 4.6 4.6-4.6 1.4 1.4-6 6Z'/></svg>\");\n background-repeat: no-repeat;\n background-position: center right var(--space-1-5);\n}\nhtml[dir=rtl] .rpf-input.rpf-input-select {\n background-position: center left var(--space-1-5);\n}\n.rpf-input.rpf-input-select:disabled, .rpf-input.rpf-input-select--disabled {\n background-image: none;\n}\n\n:root, :host {\n --border-radius: var(--space-1);\n --border-width-sm: 1px;\n --border-width-md: 2px;\n --border-width-lg: 3px;\n --alert-border-width: var(--border-width-md);\n --fieldset-border-width: var(--border-width-md);\n --input-border-width: var(--border-width-md);\n}\n\n:root, :host {\n --rpf-red-100: hsla(4, 89%, 96%, 1);\n --rpf-red-200: hsla(1, 87%, 91%, 1);\n --rpf-red-400: hsla(1, 87%, 82%, 1);\n --rpf-red-600: hsla(1, 87%, 72%, 1);\n --rpf-red-800: hsla(1, 87%, 63%, 1);\n --rpf-red-900: hsla(1, 52%, 50%, 1);\n --rpf-green-100: hsla(125, 41%, 95%, 1);\n --rpf-green-200: hsla(122, 39%, 87%, 1);\n --rpf-green-400: hsla(123, 40%, 74%, 1);\n --rpf-green-600: hsla(123, 40%, 61%, 1);\n --rpf-green-800: hsla(123, 43%, 48%, 1);\n --rpf-green-900: hsla(123, 43%, 34%, 1);\n --rpf-teal-100: hsla(176, 55%, 94%, 1);\n --rpf-teal-200: hsla(174, 55%, 85%, 1);\n --rpf-teal-400: hsla(174, 55%, 70%, 1);\n --rpf-teal-600: hsla(174, 56%, 56%, 1);\n --rpf-teal-800: hsla(174, 81%, 41%, 1);\n --rpf-teal-900: hsla(174, 81%, 27%, 1);\n --rpf-orange-100: hsla(31, 100%, 95%, 1);\n --rpf-orange-200: hsla(32, 100%, 88%, 1);\n --rpf-orange-400: hsla(31, 100%, 77%, 1);\n --rpf-orange-600: hsla(31, 99%, 65%, 1);\n --rpf-orange-800: hsla(31, 99%, 54%, 1);\n --rpf-orange-900: hsla(31, 85%, 35%, 1);\n --rpf-yellow-100: hsla(51, 100%, 95%, 1);\n --rpf-yellow-200: hsla(52, 100%, 87%, 1);\n --rpf-yellow-400: hsla(51, 100%, 75%, 1);\n --rpf-yellow-600: hsla(52, 100%, 63%, 1);\n --rpf-yellow-800: hsla(52, 100%, 50%, 1);\n --rpf-yellow-900: hsla(52, 100%, 26%, 1);\n --rpf-purple-100: hsla(282, 36%, 95%, 1);\n --rpf-purple-200: hsla(279, 38%, 87%, 1);\n --rpf-purple-400: hsla(279, 38%, 73%, 1);\n --rpf-purple-600: hsla(279, 37%, 60%, 1);\n --rpf-purple-800: hsla(279, 43%, 47%, 1);\n --rpf-purple-900: hsla(280, 43%, 37%, 1);\n --rpf-navy-100: hsla(235, 38%, 94%, 1);\n --rpf-navy-200: hsla(234, 38%, 84%, 1);\n --rpf-navy-400: hsla(235, 38%, 69%, 1);\n --rpf-navy-600: hsla(235, 38%, 53%, 1);\n --rpf-navy-800: hsla(235, 63%, 37%, 1);\n --rpf-navy-900: hsla(234, 63%, 30%, 1);\n --rpf-blue-100: hsla(203, 86%, 95%, 1);\n --rpf-blue-200: hsla(204, 88%, 87%, 1);\n --rpf-blue-400: hsla(204, 88%, 74%, 1);\n --rpf-blue-600: hsla(204, 89%, 60%, 1);\n --rpf-blue-800: hsla(204, 100%, 47%, 1);\n --rpf-blue-900: hsla(204, 99%, 37%, 1);\n}\n\n:root, :host {\n --rpf-input-background-color: var(--rpf-white);\n --rpf-input-background-color-disabled: var(--rpf-grey-50);\n --rpf-input-background-color-readonly: var(--rpf-grey-50);\n --rpf-input-color-error: var(--rpf-alert-error);\n --rpf-input-color: var(--rpf-text-primary);\n --rpf-input-outline-color: var(--rpf-blue-800);\n}\n\n:root, :host {\n --font-size-0-5: 0.5rem;\n --font-size-0-75: 0.75rem;\n --font-size-1: 1rem;\n --font-size-1-5: 1.25rem;\n --font-size-2: 1.5rem;\n --font-size-3: 2rem;\n --font-size-4: 2.5rem;\n --font-size-5: 3rem;\n --font-size-6: 3.5rem;\n --font-size-7: 4rem;\n --font-size-8: 4.5rem;\n --font-size-9: 5rem;\n}\n\n.rpf-input-field {\n margin-block-end: var(--space-3);\n}\n\n.rpf-input {\n all: unset;\n background-color: var(--rpf-input-background-color);\n border: var(--input-border-width) solid var(--rpf-input-color);\n border-radius: var(--border-radius);\n box-sizing: border-box;\n color: var(--rpf-input-color);\n display: flex;\n font-size: var(--font-size-1);\n line-height: var(--line-height-2);\n padding-block: calc(var(--space-1) - 2px);\n padding-inline: var(--space-1-5);\n max-width: 50ch;\n min-width: 240px;\n width: 100%;\n}\n.rpf-input:focus-visible {\n outline: 3px solid var(--rpf-input-outline-color);\n}\n.rpf-input:disabled, .rpf-input--disabled {\n background-color: var(--rpf-input-background-color-disabled);\n border-color: var(--rpf-input-background-color-disabled);\n}\n.rpf-input--error {\n border-color: var(--rpf-input-color-error);\n}\n.rpf-input--full-width {\n max-width: none;\n}\n";
2723
1386
  styleInject(css_248z$1);
2724
1387
 
2725
1388
  const SelectInput = ({
2726
- disabled,
2727
- error,
2728
- fullWidth,
2729
- hint,
2730
1389
  id,
2731
1390
  label,
2732
1391
  name,
2733
- onChange,
2734
1392
  options,
2735
- placeholder,
2736
- value
1393
+ disabled = false,
1394
+ error = "",
1395
+ fullWidth = false,
1396
+ hint = "",
1397
+ onChange = () => {},
1398
+ placeholder = "",
1399
+ value = ""
2737
1400
  }) => /*#__PURE__*/React.createElement(InputField, {
2738
1401
  disabled: disabled,
2739
1402
  error: error,
@@ -2771,29 +1434,20 @@ SelectInput.propTypes = {
2771
1434
  placeholder: PropTypes.string,
2772
1435
  value: PropTypes.string
2773
1436
  };
2774
- SelectInput.defaultProps = {
2775
- disabled: false,
2776
- error: "",
2777
- fullWidth: false,
2778
- hint: "",
2779
- onChange: () => {},
2780
- placeholder: "",
2781
- value: ""
2782
- };
2783
1437
 
2784
1438
  var css_248z = ":root, :host {\n --border-radius: var(--space-1);\n --border-width-sm: 1px;\n --border-width-md: 2px;\n --border-width-lg: 3px;\n --alert-border-width: var(--border-width-md);\n --fieldset-border-width: var(--border-width-md);\n --input-border-width: var(--border-width-md);\n}\n\n:root, :host {\n --rpf-alert-error-highlight: hsla(0, 88%, 99%, 1);\n --rpf-alert-error: hsla(0, 88%, 33%, 1);\n --rpf-alert-information-highlight: hsla(225, 64%, 99%, 1);\n --rpf-alert-information: hsla(225, 64%, 33%, 1);\n --rpf-alert-success-highlight: hsla(136, 90%, 99%, 1);\n --rpf-alert-success: hsla(136, 90%, 20%, 1);\n --rpf-alert-warning-highlight: hsla(26, 70%, 99%, 1);\n --rpf-alert-warning: hsla(26, 70%, 29%, 1);\n}\n\n:root, :host {\n --rpf-white: hsla(0, 0%, 100%, 1);\n --rpf-off-white: hsla(225, 25%, 97%, 1);\n --rpf-grey-50: hsla(210, 8%, 95%, 1);\n --rpf-grey-100: hsla(228, 10%, 90%, 1);\n --rpf-grey-150: hsla(223, 9%, 85%, 1);\n --rpf-grey-200: hsla(228, 10%, 80%, 1);\n --rpf-grey-300: hsla(229, 9%, 75%, 1);\n --rpf-grey-400: hsla(229, 8%, 61%, 1);\n --rpf-grey-500: hsla(229, 9%, 42%, 1);\n --rpf-grey-600: hsla(228, 9%, 32%, 1);\n --rpf-grey-700: hsla(228, 9%, 22%, 1);\n --rpf-grey-800: hsla(232, 9%, 18%, 1);\n --rpf-grey-850: hsla(228, 9%, 15%, 1);\n --rpf-grey-900: hsla(228, 9%, 10%, 1);\n --rpf-grey-950: hsla(228, 8%, 5%, 1);\n --rpf-black: hsla(0, 0%, 0%, 1);\n}\n\n:root, :host {\n --rpf-red-100: hsla(4, 89%, 96%, 1);\n --rpf-red-200: hsla(1, 87%, 91%, 1);\n --rpf-red-400: hsla(1, 87%, 82%, 1);\n --rpf-red-600: hsla(1, 87%, 72%, 1);\n --rpf-red-800: hsla(1, 87%, 63%, 1);\n --rpf-red-900: hsla(1, 52%, 50%, 1);\n --rpf-green-100: hsla(125, 41%, 95%, 1);\n --rpf-green-200: hsla(122, 39%, 87%, 1);\n --rpf-green-400: hsla(123, 40%, 74%, 1);\n --rpf-green-600: hsla(123, 40%, 61%, 1);\n --rpf-green-800: hsla(123, 43%, 48%, 1);\n --rpf-green-900: hsla(123, 43%, 34%, 1);\n --rpf-teal-100: hsla(176, 55%, 94%, 1);\n --rpf-teal-200: hsla(174, 55%, 85%, 1);\n --rpf-teal-400: hsla(174, 55%, 70%, 1);\n --rpf-teal-600: hsla(174, 56%, 56%, 1);\n --rpf-teal-800: hsla(174, 81%, 41%, 1);\n --rpf-teal-900: hsla(174, 81%, 27%, 1);\n --rpf-orange-100: hsla(31, 100%, 95%, 1);\n --rpf-orange-200: hsla(32, 100%, 88%, 1);\n --rpf-orange-400: hsla(31, 100%, 77%, 1);\n --rpf-orange-600: hsla(31, 99%, 65%, 1);\n --rpf-orange-800: hsla(31, 99%, 54%, 1);\n --rpf-orange-900: hsla(31, 85%, 35%, 1);\n --rpf-yellow-100: hsla(51, 100%, 95%, 1);\n --rpf-yellow-200: hsla(52, 100%, 87%, 1);\n --rpf-yellow-400: hsla(51, 100%, 75%, 1);\n --rpf-yellow-600: hsla(52, 100%, 63%, 1);\n --rpf-yellow-800: hsla(52, 100%, 50%, 1);\n --rpf-yellow-900: hsla(52, 100%, 26%, 1);\n --rpf-purple-100: hsla(282, 36%, 95%, 1);\n --rpf-purple-200: hsla(279, 38%, 87%, 1);\n --rpf-purple-400: hsla(279, 38%, 73%, 1);\n --rpf-purple-600: hsla(279, 37%, 60%, 1);\n --rpf-purple-800: hsla(279, 43%, 47%, 1);\n --rpf-purple-900: hsla(280, 43%, 37%, 1);\n --rpf-navy-100: hsla(235, 38%, 94%, 1);\n --rpf-navy-200: hsla(234, 38%, 84%, 1);\n --rpf-navy-400: hsla(235, 38%, 69%, 1);\n --rpf-navy-600: hsla(235, 38%, 53%, 1);\n --rpf-navy-800: hsla(235, 63%, 37%, 1);\n --rpf-navy-900: hsla(234, 63%, 30%, 1);\n --rpf-blue-100: hsla(203, 86%, 95%, 1);\n --rpf-blue-200: hsla(204, 88%, 87%, 1);\n --rpf-blue-400: hsla(204, 88%, 74%, 1);\n --rpf-blue-600: hsla(204, 89%, 60%, 1);\n --rpf-blue-800: hsla(204, 100%, 47%, 1);\n --rpf-blue-900: hsla(204, 99%, 37%, 1);\n}\n\n:root, :host {\n --rpf-text-primary: hsla(0, 0%, 13%, 1);\n --rpf-text-primary-darkmode: var(--rpf-white);\n --rpf-text-secondary: hsla(200, 9%, 33%, 1);\n --rpf-text-secondary-darkmode: hsla(0, 0%, 80%, 1);\n}\n\n:root, :host {\n --rpf-input-background-color: var(--rpf-white);\n --rpf-input-background-color-disabled: var(--rpf-grey-50);\n --rpf-input-background-color-readonly: var(--rpf-grey-50);\n --rpf-input-color-error: var(--rpf-alert-error);\n --rpf-input-color: var(--rpf-text-primary);\n --rpf-input-outline-color: var(--rpf-blue-800);\n}\n\n:root, :host {\n --font-size-0-5: 0.5rem;\n --font-size-0-75: 0.75rem;\n --font-size-1: 1rem;\n --font-size-1-5: 1.25rem;\n --font-size-2: 1.5rem;\n --font-size-3: 2rem;\n --font-size-4: 2.5rem;\n --font-size-5: 3rem;\n --font-size-6: 3.5rem;\n --font-size-7: 4rem;\n --font-size-8: 4.5rem;\n --font-size-9: 5rem;\n}\n\n:root, :host {\n --space-0-125: 0.0625rem;\n --space-0-25: 0.125rem;\n --space-0-5: 0.25rem;\n --space-1: 0.5rem;\n --space-1-5: 0.75rem;\n --space-2: 1rem;\n --space-3: 1.5rem;\n --space-4: 2rem;\n --space-5: 2.5rem;\n --space-6: 3rem;\n --space-7: 3.5rem;\n --space-8: 4rem;\n --space-9: 4.5rem;\n --space-10: 5rem;\n}\n\n.rpf-input-field {\n margin-block-end: var(--space-3);\n}\n\n.rpf-input {\n all: unset;\n background-color: var(--rpf-input-background-color);\n border: var(--input-border-width) solid var(--rpf-input-color);\n border-radius: var(--border-radius);\n box-sizing: border-box;\n color: var(--rpf-input-color);\n display: flex;\n font-size: var(--font-size-1);\n line-height: var(--line-height-2);\n padding-block: calc(var(--space-1) - 2px);\n padding-inline: var(--space-1-5);\n max-width: 50ch;\n min-width: 240px;\n width: 100%;\n}\n.rpf-input:focus-visible {\n outline: 3px solid var(--rpf-input-outline-color);\n}\n.rpf-input:disabled, .rpf-input--disabled {\n background-color: var(--rpf-input-background-color-disabled);\n border-color: var(--rpf-input-background-color-disabled);\n}\n.rpf-input--error {\n border-color: var(--rpf-input-color-error);\n}\n.rpf-input--full-width {\n max-width: none;\n}\n\n:root, :host {\n --font-weight-regular: 400;\n --font-weight-bold: 700;\n}\n\n:root, :host {\n --line-height-0-75: 0.75rem;\n --line-height-1: 1rem;\n --line-height-1-5: 1.5rem;\n --line-height-2: 2rem;\n --line-height-2-5: 2.5rem;\n --line-height-3: 3rem;\n --line-height-3-5: 3.5rem;\n --line-height-4: 4rem;\n --line-height-4-5: 4.5rem;\n --line-height-5: 5rem;\n --line-height-5-5: 5.5rem;\n --line-height-6: 6rem;\n --line-height-6-5: 6.5rem;\n}\n\n:root {\n --rpf-label-hint-color: var(--rpf-text-secondary);\n --rpf-label-text-color: var(--rpf-text-primary);\n --rpf-label-text-color-disabled: var(--rpf-grey-500);\n}\n\n.rpf-label {\n all: unset;\n color: var(--rpf-label-text-color);\n display: flex;\n flex-direction: column;\n font-weight: var(--font-weight-bold);\n padding-block-end: var(--space-1);\n font-size: var(--font-size-1);\n line-height: var(--line-height-1-5);\n}\n.rpf-label__hint {\n color: var(--rpf-label-hint-color);\n font-size: var(--font-size-1);\n font-weight: var(--font-weight-regular);\n}\n.rpf-label--disabled {\n color: var(--rpf-label-text-color-disabled);\n}\n.rpf-label--disabled .rpf-label__hint {\n color: var(--rpf-label-text-color-disabled);\n}\n\n:root {\n --rpf-message-text-color: var(--rpf-alert-error);\n}\n\n.rpf-error-message {\n all: unset;\n align-items: center;\n color: var(--rpf-message-text-color);\n display: flex;\n font-weight: var(--font-weight-bold);\n padding-block-end: var(--space-1);\n}\n.rpf-error-message__icon {\n margin-inline-end: var(--space-1);\n padding-block: var(--space-1);\n}\n";
2785
1439
  styleInject(css_248z);
2786
1440
 
2787
1441
  const TextInput = ({
2788
- disabled,
2789
- error,
2790
- fullWidth,
2791
- hint,
2792
1442
  id,
2793
1443
  label,
2794
1444
  name,
2795
- onChange,
2796
- value
1445
+ value,
1446
+ disabled = false,
1447
+ error = "",
1448
+ fullWidth = false,
1449
+ hint = "",
1450
+ onChange = () => {}
2797
1451
  }) => /*#__PURE__*/React.createElement(InputField, {
2798
1452
  disabled: disabled,
2799
1453
  error: error,
@@ -2823,13 +1477,6 @@ TextInput.propTypes = {
2823
1477
  onChange: PropTypes.func,
2824
1478
  value: PropTypes.string.isRequired
2825
1479
  };
2826
- TextInput.defaultProps = {
2827
- disabled: false,
2828
- error: "",
2829
- fullWidth: false,
2830
- hint: "",
2831
- onChange: () => {}
2832
- };
2833
1480
 
2834
1481
  exports.Accordion = Accordion;
2835
1482
  exports.Alert = Alert;