@strapi/design-system 2.0.0-beta.6 → 2.0.0-rc.7

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.
Files changed (66) hide show
  1. package/dist/components/Accordion/Accordion.d.ts.map +1 -1
  2. package/dist/components/BaseLink/BaseLink.d.ts +2 -2
  3. package/dist/components/BaseLink/BaseLink.d.ts.map +1 -1
  4. package/dist/components/Box/Box.d.ts +1 -1
  5. package/dist/components/Box/Box.d.ts.map +1 -1
  6. package/dist/components/Breadcrumbs/Breadcrumbs.d.ts +2 -4
  7. package/dist/components/Breadcrumbs/Breadcrumbs.d.ts.map +1 -1
  8. package/dist/components/Breadcrumbs/Crumb.d.ts +2 -4
  9. package/dist/components/Breadcrumbs/Crumb.d.ts.map +1 -1
  10. package/dist/components/Breadcrumbs/CrumbLink.d.ts +2 -4
  11. package/dist/components/Breadcrumbs/CrumbLink.d.ts.map +1 -1
  12. package/dist/components/Breadcrumbs/CrumbSimpleMenu.d.ts +2 -5
  13. package/dist/components/Breadcrumbs/CrumbSimpleMenu.d.ts.map +1 -1
  14. package/dist/components/Button/Button.d.ts +3 -2
  15. package/dist/components/Button/Button.d.ts.map +1 -1
  16. package/dist/components/Button/utils.d.ts.map +1 -1
  17. package/dist/components/Card/Card.d.ts +2 -1
  18. package/dist/components/Card/Card.d.ts.map +1 -1
  19. package/dist/components/Card/CardAction.d.ts +2 -1
  20. package/dist/components/Card/CardAction.d.ts.map +1 -1
  21. package/dist/components/Card/CardCheckbox.d.ts +2 -1
  22. package/dist/components/Card/CardCheckbox.d.ts.map +1 -1
  23. package/dist/components/Dialog/Dialog.d.ts.map +1 -1
  24. package/dist/components/EmptyStateLayout/EmptyStateLayout.d.ts +2 -2
  25. package/dist/components/EmptyStateLayout/EmptyStateLayout.d.ts.map +1 -1
  26. package/dist/components/Field/Field.d.ts.map +1 -1
  27. package/dist/components/Grid/Grid.d.ts +2 -1
  28. package/dist/components/Grid/Grid.d.ts.map +1 -1
  29. package/dist/components/IconButton/IconButton.d.ts +7 -18
  30. package/dist/components/IconButton/IconButton.d.ts.map +1 -1
  31. package/dist/components/Link/Link.d.ts.map +1 -1
  32. package/dist/components/LinkButton/LinkButton.d.ts +4 -10
  33. package/dist/components/LinkButton/LinkButton.d.ts.map +1 -1
  34. package/dist/components/Modal/Modal.d.ts.map +1 -1
  35. package/dist/components/Popover/Popover.d.ts +1 -1
  36. package/dist/components/Popover/Popover.d.ts.map +1 -1
  37. package/dist/components/ProgressBar/ProgressBar.d.ts +1 -2
  38. package/dist/components/ProgressBar/ProgressBar.d.ts.map +1 -1
  39. package/dist/components/RawTable/RawCell.d.ts +1 -1
  40. package/dist/components/RawTable/RawCell.d.ts.map +1 -1
  41. package/dist/components/RawTable/RawTable.d.ts +1 -1
  42. package/dist/components/RawTable/RawTable.d.ts.map +1 -1
  43. package/dist/components/Searchbar/Searchbar.d.ts.map +1 -1
  44. package/dist/components/Select/SelectParts.d.ts.map +1 -1
  45. package/dist/components/SimpleMenu/SimpleMenu.d.ts +1 -1
  46. package/dist/components/SimpleMenu/SimpleMenu.d.ts.map +1 -1
  47. package/dist/components/Table/Cell.d.ts +2 -2
  48. package/dist/components/Table/Cell.d.ts.map +1 -1
  49. package/dist/components/Table/Table.d.ts +1 -1
  50. package/dist/components/Table/Table.d.ts.map +1 -1
  51. package/dist/components/Tag/Tag.d.ts +5 -2
  52. package/dist/components/Tag/Tag.d.ts.map +1 -1
  53. package/dist/components/TextButton/TextButton.d.ts +8 -3
  54. package/dist/components/TextButton/TextButton.d.ts.map +1 -1
  55. package/dist/components/index.d.ts +0 -1
  56. package/dist/components/index.d.ts.map +1 -1
  57. package/dist/index.js +511 -538
  58. package/dist/index.js.map +1 -1
  59. package/dist/index.mjs +511 -538
  60. package/dist/index.mjs.map +1 -1
  61. package/dist/styles/global.d.ts.map +1 -1
  62. package/package.json +7 -7
  63. package/dist/components/BaseButton/BaseButton.d.ts +0 -10
  64. package/dist/components/BaseButton/BaseButton.d.ts.map +0 -1
  65. package/dist/components/BaseButton/index.d.ts +0 -2
  66. package/dist/components/BaseButton/index.d.ts.map +0 -1
package/dist/index.mjs CHANGED
@@ -437,25 +437,38 @@ const AccordionItem = styled(RadixAccordion.Item)`
437
437
  overflow: hidden;
438
438
 
439
439
  &:first-child {
440
- border-top-left-radius: ${(props) => props.$size === "S" ? "0.3rem" : ""};
441
- border-top-right-radius: ${(props) => props.$size === "S" ? "0.3rem" : ""};
440
+ border-top-left-radius: 0.3rem;
441
+ border-top-right-radius: 0.3rem;
442
442
  }
443
443
 
444
444
  &:last-child {
445
- border-bottom-left-radius: ${(props) => props.$size === "S" ? "0.3rem" : ""};
446
- border-bottom-right-radius: ${(props) => props.$size === "S" ? "0.3rem" : ""};
445
+ border-bottom-left-radius: 0.3rem;
446
+ border-bottom-right-radius: 0.3rem;
447
447
  }
448
448
 
449
449
  & + & {
450
450
  border-top: ${(props) => props.$size === "S" ? `solid 1px ${props.theme.colors.neutral200}` : "unset"};
451
451
  }
452
452
 
453
+ &[data-state='open'] {
454
+ box-shadow: 0 0 0 2px ${(props) => props.theme.colors.primary600};
455
+ }
456
+
457
+ &:hover {
458
+ box-shadow: 0 0 0 2px ${(props) => props.theme.colors.primary600};
459
+ }
460
+
453
461
  /* This applies our desired focus effect correctly. */
454
462
  &:focus-within {
455
463
  position: relative;
456
464
  z-index: 1;
457
465
  box-shadow: 0 0 0 2px ${(props) => props.theme.colors.primary600};
458
466
  }
467
+
468
+ @media (prefers-reduced-motion: no-preference) {
469
+ transition: box-shadow ${(props) => props.theme.motion.timings["120"]}
470
+ ${(props) => props.theme.motion.easings.easeOutQuad};
471
+ }
459
472
  `;
460
473
  const Trigger$7 = React.forwardRef(
461
474
  ({ caretPosition = "left", description, icon: Icon, children, ...restProps }, forwardedRef) => {
@@ -471,10 +484,11 @@ const Trigger$7 = React.forwardRef(
471
484
  fontWeight: size === "S" ? "bold" : void 0,
472
485
  ellipsis: true,
473
486
  variant: size === "M" ? "delta" : void 0,
487
+ textAlign: "left",
474
488
  children
475
489
  }
476
490
  ),
477
- description && size === "M" ? /* @__PURE__ */ jsx(Typography, { children: description }) : null
491
+ description && size === "M" ? /* @__PURE__ */ jsx(Typography, { textAlign: "left", children: description }) : null
478
492
  ] })
479
493
  ] }),
480
494
  caretPosition === "right" ? /* @__PURE__ */ jsx(TriggerIcon, { $size: size, children: /* @__PURE__ */ jsx(CaretDown, { width: size === "S" ? "1.2rem" : "1.6rem", height: size === "S" ? "1.2rem" : "1.6rem" }) }) : null
@@ -1138,51 +1152,32 @@ const Base = styled(Flex)`
1138
1152
  `;
1139
1153
  }};
1140
1154
  `;
1141
- const BaseButton = forwardRef(
1142
- ({ disabled, children, ...props }, ref) => {
1143
- return /* @__PURE__ */ jsx(
1144
- BaseButtonWrapper,
1145
- {
1146
- ref,
1147
- "aria-disabled": disabled,
1148
- disabled,
1149
- tag: "button",
1150
- type: "button",
1151
- padding: 2,
1152
- hasRadius: true,
1153
- background: "neutral0",
1154
- borderColor: "neutral200",
1155
- cursor: "pointer",
1156
- ...props,
1157
- children
1158
- }
1159
- );
1160
- }
1161
- );
1162
- const BaseButtonWrapper = styled(Flex)`
1163
- &[aria-disabled='true'] {
1164
- pointer-events: none;
1165
- }
1166
-
1167
- ${focus}
1168
- `;
1169
- const BaseLink = forwardRef(
1170
- ({ href, rel = "noreferrer noopener", target = "_self", disabled = false, isExternal = false, ...props }, ref) => {
1155
+ const BaseLinkImpl = forwardRef(
1156
+ ({ href, disabled = false, isExternal = false, ...props }, ref) => {
1171
1157
  return /* @__PURE__ */ jsx(
1172
- Box,
1158
+ BaseLink,
1173
1159
  {
1174
1160
  tag: "a",
1175
1161
  ref,
1176
- target: isExternal ? "_blank" : target,
1177
- rel: isExternal ? rel : void 0,
1178
- href: disabled ? "#" : href,
1162
+ target: isExternal ? "_blank" : void 0,
1163
+ rel: isExternal ? "noreferrer noopener" : void 0,
1164
+ href,
1165
+ tabIndex: disabled ? -1 : void 0,
1179
1166
  "aria-disabled": disabled,
1180
- cursor: "pointer",
1167
+ pointerEvents: disabled ? "none" : void 0,
1168
+ cursor: disabled ? void 0 : "pointer",
1181
1169
  ...props
1182
1170
  }
1183
1171
  );
1184
1172
  }
1185
1173
  );
1174
+ const BaseLink = styled(Box)`
1175
+ text-decoration: none;
1176
+
1177
+ &:visited {
1178
+ color: inherit;
1179
+ }
1180
+ `;
1186
1181
  const Divider$1 = () => {
1187
1182
  return /* @__PURE__ */ jsx(Box, { "aria-hidden": true, paddingLeft: 1, paddingRight: 1, children: /* @__PURE__ */ jsx(Typography, { variant: "pi", textColor: "neutral500", children: "/" }) });
1188
1183
  };
@@ -1196,30 +1191,34 @@ const AlignedList = styled(Flex)`
1196
1191
  margin-left: ${({ theme }) => `calc(-1*${theme.spaces[2]})`};
1197
1192
  }
1198
1193
  `;
1199
- const Breadcrumbs = ({ label, children, ...props }) => {
1200
- const childrenArray = React.Children.toArray(children);
1201
- return /* @__PURE__ */ jsx(Box, { "aria-label": label, tag: "nav", ...props, children: /* @__PURE__ */ jsx(AlignedList, { tag: "ol", children: React.Children.map(childrenArray, (child, index) => {
1202
- const shouldDisplayDivider = childrenArray.length > 1 && index + 1 < childrenArray.length;
1203
- return /* @__PURE__ */ jsxs(Flex, { inline: true, tag: "li", children: [
1204
- child,
1205
- shouldDisplayDivider && /* @__PURE__ */ jsx(Divider$1, {})
1206
- ] });
1207
- }) }) });
1208
- };
1209
- Breadcrumbs.displayName = "Breadcrumbs";
1210
- const Crumb = ({ children, isCurrent = false, ...props }) => /* @__PURE__ */ jsx(Box, { paddingLeft: 2, paddingRight: 2, paddingTop: 1, paddingBottom: 1, children: /* @__PURE__ */ jsx(
1211
- Typography,
1212
- {
1213
- variant: "pi",
1214
- textColor: "neutral800",
1215
- fontWeight: isCurrent ? "bold" : "regular",
1216
- "aria-current": isCurrent,
1217
- ...props,
1218
- children
1194
+ const Breadcrumbs = React.forwardRef(
1195
+ ({ label, children, ...props }, forwardedRef) => {
1196
+ const childrenArray = React.Children.toArray(children);
1197
+ return /* @__PURE__ */ jsx(Box, { "aria-label": label, tag: "nav", ...props, ref: forwardedRef, children: /* @__PURE__ */ jsx(AlignedList, { tag: "ol", children: React.Children.map(childrenArray, (child, index) => {
1198
+ const shouldDisplayDivider = childrenArray.length > 1 && index + 1 < childrenArray.length;
1199
+ return /* @__PURE__ */ jsxs(Flex, { inline: true, tag: "li", children: [
1200
+ child,
1201
+ shouldDisplayDivider && /* @__PURE__ */ jsx(Divider$1, {})
1202
+ ] });
1203
+ }) }) });
1219
1204
  }
1220
- ) });
1205
+ );
1206
+ Breadcrumbs.displayName = "Breadcrumbs";
1207
+ const Crumb = React.forwardRef(
1208
+ ({ children, isCurrent = false, ...props }, forwardedRef) => /* @__PURE__ */ jsx(Box, { paddingLeft: 2, paddingRight: 2, paddingTop: 1, paddingBottom: 1, ref: forwardedRef, children: /* @__PURE__ */ jsx(
1209
+ Typography,
1210
+ {
1211
+ variant: "pi",
1212
+ textColor: "neutral800",
1213
+ fontWeight: isCurrent ? "bold" : "regular",
1214
+ "aria-current": isCurrent,
1215
+ ...props,
1216
+ children
1217
+ }
1218
+ ) })
1219
+ );
1221
1220
  Crumb.displayName = "Crumb";
1222
- const StyledLink = styled(BaseLink)`
1221
+ const StyledLink = styled(BaseLinkImpl)`
1223
1222
  border-radius: ${({ theme }) => theme.borderRadius};
1224
1223
  color: ${({ theme }) => theme.colors.neutral600};
1225
1224
  font-size: ${({ theme }) => theme.fontSizes[1]};
@@ -1233,9 +1232,22 @@ const StyledLink = styled(BaseLink)`
1233
1232
  color: ${({ theme }) => theme.colors.neutral700};
1234
1233
  }
1235
1234
  `;
1236
- const CrumbLink = ({ children, ...props }) => /* @__PURE__ */ jsx(StyledLink, { ...props, children });
1235
+ const CrumbLink = React.forwardRef(({ children, ...props }, forwardedRef) => /* @__PURE__ */ jsx(StyledLink, { ref: forwardedRef, ...props, children }));
1237
1236
  CrumbLink.displayName = "CrumbLink";
1238
1237
  const stripReactIdOfColon = (str) => str.replaceAll(":", "");
1238
+ function setRef(ref, value) {
1239
+ if (typeof ref === "function") {
1240
+ ref(value);
1241
+ } else if (ref !== null && ref !== void 0) {
1242
+ ref.current = value;
1243
+ }
1244
+ }
1245
+ function composeRefs(...refs) {
1246
+ return (node) => refs.forEach((ref) => setRef(ref, node));
1247
+ }
1248
+ function useComposedRefs(...refs) {
1249
+ return React.useCallback(composeRefs(...refs), refs);
1250
+ }
1239
1251
  const isSSR = () => typeof window === "undefined" || !window.navigator || /ServerSideRendering|^Deno\//.test(window.navigator.userAgent);
1240
1252
  const useIsomorphicLayoutEffect = isSSR() ? useEffect : useLayoutEffect;
1241
1253
  const useReactId = React["useId".toString()] || (() => void 0);
@@ -1285,7 +1297,7 @@ const DANGER = "danger";
1285
1297
  const SUCCESS = "success";
1286
1298
  const GHOST = "ghost";
1287
1299
  const LIGHT_VARIANTS = [SUCCESS_LIGHT, DANGER_LIGHT];
1288
- const VARIANTS$1 = [DEFAULT, TERTIARY, SECONDARY, DANGER, SUCCESS, GHOST, ...LIGHT_VARIANTS];
1300
+ const VARIANTS = [DEFAULT, TERTIARY, SECONDARY, DANGER, SUCCESS, GHOST, ...LIGHT_VARIANTS];
1289
1301
  const BUTTON_SIZES = ["S", "M", "L"];
1290
1302
  const getVariantColorName = (variant2) => {
1291
1303
  if (variant2 === SUCCESS_LIGHT || variant2 === DANGER_LIGHT) {
@@ -1294,7 +1306,7 @@ const getVariantColorName = (variant2) => {
1294
1306
  if (variant2 === TERTIARY) {
1295
1307
  return "neutral";
1296
1308
  }
1297
- if (variant2 === DEFAULT || variant2 === SECONDARY || VARIANTS$1.every((vari) => vari !== variant2)) {
1309
+ if (variant2 === DEFAULT || variant2 === SECONDARY || VARIANTS.every((vari) => vari !== variant2)) {
1298
1310
  return "primary";
1299
1311
  }
1300
1312
  return `${variant2}`;
@@ -1304,6 +1316,7 @@ const getDisabledStyle = ({ theme }) => {
1304
1316
  border: 1px solid ${theme.colors.neutral200};
1305
1317
  background: ${theme.colors.neutral150};
1306
1318
  color: ${theme.colors.neutral600};
1319
+ cursor: default;
1307
1320
  `;
1308
1321
  };
1309
1322
  const getHoverStyle = ({ theme, $variant }) => {
@@ -1390,6 +1403,8 @@ const getVariantStyle = ({ theme, $variant }) => {
1390
1403
  }
1391
1404
  default: {
1392
1405
  return css`
1406
+ border: 1px solid ${theme.colors.buttonPrimary600};
1407
+ background: ${theme.colors.buttonPrimary600};
1393
1408
  color: ${theme.colors.buttonNeutral0};
1394
1409
  `;
1395
1410
  }
@@ -1422,21 +1437,22 @@ const Button = forwardRef(
1422
1437
  disabled: isDisabled,
1423
1438
  $size: size,
1424
1439
  $variant: variant2,
1440
+ tag: "button",
1425
1441
  onClick: handleClick,
1426
- alignItems: "center",
1427
- background: "buttonPrimary600",
1428
- borderColor: "buttonPrimary600",
1442
+ hasRadius: true,
1429
1443
  gap: 2,
1430
- inline: fullWidth,
1431
- justifyContent: fullWidth ? "center" : void 0,
1444
+ inline: true,
1445
+ alignItems: "center",
1446
+ justifyContent: "center",
1447
+ width: fullWidth ? "100%" : void 0,
1432
1448
  paddingLeft: 4,
1433
1449
  paddingRight: 4,
1434
- width: fullWidth ? "100%" : void 0,
1450
+ cursor: "pointer",
1435
1451
  ...props,
1436
1452
  children: [
1437
- (startIcon || loading) && /* @__PURE__ */ jsx(Box, { "aria-hidden": true, children: loading ? /* @__PURE__ */ jsx(LoaderAnimated, {}) : startIcon }),
1453
+ (startIcon || loading) && /* @__PURE__ */ jsx(Flex, { tag: "span", "aria-hidden": true, flex: "1 0 1.2rem", children: loading ? /* @__PURE__ */ jsx(LoaderAnimated, {}) : startIcon }),
1438
1454
  /* @__PURE__ */ jsx(Typography, { variant: size === "S" ? "pi" : void 0, fontWeight: "bold", children }),
1439
- endIcon && /* @__PURE__ */ jsx(Flex, { "aria-hidden": true, children: endIcon })
1455
+ endIcon && /* @__PURE__ */ jsx(Flex, { tag: "span", "aria-hidden": true, flex: "1 0 1.2rem", children: endIcon })
1440
1456
  ]
1441
1457
  }
1442
1458
  );
@@ -1454,20 +1470,10 @@ const LoaderAnimated = styled(Loader$1)`
1454
1470
  animation: ${rotation$2} 2s infinite linear;
1455
1471
  will-change: transform;
1456
1472
  `;
1457
- const ButtonWrapper = styled(BaseButton)`
1473
+ const ButtonWrapper = styled(Flex)`
1458
1474
  height: ${({ theme, $size }) => theme.sizes.button[$size]};
1459
-
1460
- svg {
1461
- height: 1.2rem;
1462
- }
1463
-
1464
- &[aria-disabled='true'] {
1465
- ${getDisabledStyle}
1466
-
1467
- &:active {
1468
- ${getDisabledStyle}
1469
- }
1470
- }
1475
+ text-decoration: none;
1476
+ ${getVariantStyle}
1471
1477
 
1472
1478
  &:hover {
1473
1479
  ${getHoverStyle}
@@ -1477,7 +1483,9 @@ const ButtonWrapper = styled(BaseButton)`
1477
1483
  ${getActiveStyle}
1478
1484
  }
1479
1485
 
1480
- ${getVariantStyle}
1486
+ &[aria-disabled='true'] {
1487
+ ${getDisabledStyle}
1488
+ }
1481
1489
 
1482
1490
  @media (prefers-reduced-motion: no-preference) {
1483
1491
  transition:
@@ -1488,7 +1496,7 @@ const ButtonWrapper = styled(BaseButton)`
1488
1496
  `;
1489
1497
  const Link = forwardRef(
1490
1498
  ({ children, href, disabled = false, startIcon, endIcon, isExternal = false, ...props }, ref) => {
1491
- return /* @__PURE__ */ jsxs(LinkWrapper$2, { ref, href, disabled, isExternal, ...props, children: [
1499
+ return /* @__PURE__ */ jsxs(LinkWrapper$1, { ref, href, disabled, isExternal, ...props, children: [
1492
1500
  startIcon,
1493
1501
  /* @__PURE__ */ jsx(Typography, { textColor: disabled ? "neutral600" : "primary600", children }),
1494
1502
  endIcon,
@@ -1496,7 +1504,7 @@ const Link = forwardRef(
1496
1504
  ] });
1497
1505
  }
1498
1506
  );
1499
- const LinkWrapper$2 = styled(BaseLink)`
1507
+ const LinkWrapper$1 = styled(BaseLinkImpl)`
1500
1508
  display: inline-flex;
1501
1509
  align-items: center;
1502
1510
  text-decoration: none;
@@ -1512,7 +1520,9 @@ const LinkWrapper$2 = styled(BaseLink)`
1512
1520
  }
1513
1521
 
1514
1522
  &:hover {
1515
- color: ${({ theme }) => theme.colors.primary500};
1523
+ span {
1524
+ color: ${({ theme }) => theme.colors.primary500};
1525
+ }
1516
1526
  }
1517
1527
 
1518
1528
  &:active {
@@ -1691,37 +1701,41 @@ const Menu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty
1691
1701
  SubTrigger,
1692
1702
  Trigger: Trigger$6
1693
1703
  }, Symbol.toStringTag, { value: "Module" }));
1694
- const SimpleMenu = ({ children, onOpen, onClose, popoverPlacement, onReachEnd, ...props }) => {
1695
- const contentRef = React.useRef(null);
1696
- const [internalIsOpen, setInternalIsOpen] = React.useState(false);
1697
- const handleReachEnd = (entry) => {
1698
- if (onReachEnd) {
1699
- onReachEnd(entry);
1700
- }
1701
- };
1702
- const handleOpenChange = (isOpen) => {
1703
- if (isOpen && typeof onOpen === "function") {
1704
- onOpen();
1705
- } else if (!isOpen && typeof onClose === "function") {
1706
- onClose();
1707
- }
1708
- setInternalIsOpen(isOpen);
1709
- };
1710
- const generatedId = useId();
1711
- const intersectionId = `intersection-${stripReactIdOfColon(generatedId)}`;
1712
- useIntersection(contentRef, handleReachEnd, {
1713
- selectorToWatch: `#${intersectionId}`,
1714
- /**
1715
- * We need to know when the select is open because only then will viewportRef
1716
- * not be null. Because it uses a portal that (sensibly) is not mounted 24/7.
1717
- */
1718
- skipWhen: !internalIsOpen
1719
- });
1720
- return /* @__PURE__ */ jsxs(Root$7, { onOpenChange: handleOpenChange, children: [
1721
- /* @__PURE__ */ jsx(Trigger$6, { ...props, children: props.label }),
1722
- /* @__PURE__ */ jsx(Content$6, { intersectionId, popoverPlacement, children })
1723
- ] });
1724
- };
1704
+ const SimpleMenu = React.forwardRef(
1705
+ ({ children, onOpen, onClose, popoverPlacement, onReachEnd, ...props }, forwardedRef) => {
1706
+ const triggerRef = React.useRef(null);
1707
+ const composedRef = useComposedRefs(forwardedRef, triggerRef);
1708
+ const contentRef = React.useRef(null);
1709
+ const [internalIsOpen, setInternalIsOpen] = React.useState(false);
1710
+ const handleReachEnd = (entry) => {
1711
+ if (onReachEnd) {
1712
+ onReachEnd(entry);
1713
+ }
1714
+ };
1715
+ const handleOpenChange = (isOpen) => {
1716
+ if (isOpen && typeof onOpen === "function") {
1717
+ onOpen();
1718
+ } else if (!isOpen && typeof onClose === "function") {
1719
+ onClose();
1720
+ }
1721
+ setInternalIsOpen(isOpen);
1722
+ };
1723
+ const generatedId = useId();
1724
+ const intersectionId = `intersection-${stripReactIdOfColon(generatedId)}`;
1725
+ useIntersection(contentRef, handleReachEnd, {
1726
+ selectorToWatch: `#${intersectionId}`,
1727
+ /**
1728
+ * We need to know when the select is open because only then will viewportRef
1729
+ * not be null. Because it uses a portal that (sensibly) is not mounted 24/7.
1730
+ */
1731
+ skipWhen: !internalIsOpen
1732
+ });
1733
+ return /* @__PURE__ */ jsxs(Root$7, { onOpenChange: handleOpenChange, children: [
1734
+ /* @__PURE__ */ jsx(Trigger$6, { ref: composedRef, ...props, children: props.label }),
1735
+ /* @__PURE__ */ jsx(Content$6, { ref: contentRef, intersectionId, popoverPlacement, children })
1736
+ ] });
1737
+ }
1738
+ );
1725
1739
  const MenuItem = Item$3;
1726
1740
  const StyledButton = styled(SimpleMenu)`
1727
1741
  padding: ${({ theme }) => `${theme.spaces[1]} ${theme.spaces[2]}`};
@@ -1732,16 +1746,19 @@ const StyledButton = styled(SimpleMenu)`
1732
1746
  background-color: ${({ theme }) => theme.colors.neutral200};
1733
1747
  }
1734
1748
  `;
1735
- const CrumbSimpleMenu = ({ children, ...props }) => /* @__PURE__ */ jsx(StyledButton, { endIcon: null, size: "S", ...props, children });
1749
+ const CrumbSimpleMenu = React.forwardRef(
1750
+ ({ children, ...props }, forwardedRef) => /* @__PURE__ */ jsx(StyledButton, { ref: forwardedRef, endIcon: null, size: "S", ...props, children })
1751
+ );
1736
1752
  CrumbSimpleMenu.displayName = "CrumbSimpleMenu";
1737
1753
  const CardContext = React.createContext({ id: "" });
1738
1754
  const useCard = () => React.useContext(CardContext);
1739
- const Card = ({ id, ...props }) => {
1755
+ const Card = React.forwardRef(({ id, ...props }, forwardedRef) => {
1740
1756
  const generatedId = useId(id);
1741
1757
  const context = React.useMemo(() => ({ id: generatedId }), [generatedId]);
1742
1758
  return /* @__PURE__ */ jsx(CardContext.Provider, { value: context, children: /* @__PURE__ */ jsx(
1743
1759
  Box,
1744
1760
  {
1761
+ ref: forwardedRef,
1745
1762
  id,
1746
1763
  tabIndex: 0,
1747
1764
  hasRadius: true,
@@ -1755,10 +1772,10 @@ const Card = ({ id, ...props }) => {
1755
1772
  ...props
1756
1773
  }
1757
1774
  ) });
1758
- };
1759
- const CardActionImpl = ({ position, ...restProps }) => {
1760
- return /* @__PURE__ */ jsx(CardAction, { $position: position, ...restProps, direction: "row", gap: 2 });
1761
- };
1775
+ });
1776
+ const CardActionImpl = React.forwardRef(({ position, ...restProps }, forwardedRef) => {
1777
+ return /* @__PURE__ */ jsx(CardAction, { ref: forwardedRef, $position: position, ...restProps, direction: "row", gap: 2 });
1778
+ });
1762
1779
  const CardAction = styled(Flex)`
1763
1780
  position: absolute;
1764
1781
  top: ${({ theme }) => theme.spaces[3]};
@@ -1809,19 +1826,6 @@ const CardBadge = (props) => /* @__PURE__ */ jsx(CardBadgeWrapper, { children: /
1809
1826
  const CardBody = (props) => {
1810
1827
  return /* @__PURE__ */ jsx(Box, { paddingLeft: 3, paddingRight: 3, paddingTop: 2, paddingBottom: 2, children: /* @__PURE__ */ jsx(Flex, { ...props, alignItems: "flex-start" }) });
1811
1828
  };
1812
- function setRef(ref, value) {
1813
- if (typeof ref === "function") {
1814
- ref(value);
1815
- } else if (ref !== null && ref !== void 0) {
1816
- ref.current = value;
1817
- }
1818
- }
1819
- function composeRefs(...refs) {
1820
- return (node) => refs.forEach((ref) => setRef(ref, node));
1821
- }
1822
- function useComposedRefs(...refs) {
1823
- return React.useCallback(composeRefs(...refs), refs);
1824
- }
1825
1829
  const CheckIcon = ({ fill, ...props }) => {
1826
1830
  const { colors } = useTheme();
1827
1831
  return /* @__PURE__ */ jsx(
@@ -1904,10 +1908,10 @@ const CheckboxImpl = React.forwardRef(({ children, ...restProps }, forwardedRef)
1904
1908
  /* @__PURE__ */ jsx(Typography, { tag: "label", textColor: "neutral800", htmlFor: labelId, children })
1905
1909
  ] });
1906
1910
  });
1907
- const CardCheckbox = (props) => {
1911
+ const CardCheckbox = React.forwardRef((props, forwardedRef) => {
1908
1912
  const { id } = useCard();
1909
- return /* @__PURE__ */ jsx(CardActionImpl, { position: "start", children: /* @__PURE__ */ jsx(CheckboxImpl, { "aria-labelledby": `${id}-title`, ...props }) });
1910
- };
1913
+ return /* @__PURE__ */ jsx(CardActionImpl, { position: "start", children: /* @__PURE__ */ jsx(CheckboxImpl, { "aria-labelledby": `${id}-title`, ...props, ref: forwardedRef }) });
1914
+ });
1911
1915
  const BreakBox = styled(Box)`
1912
1916
  word-break: break-all;
1913
1917
  `;
@@ -2939,7 +2943,7 @@ lodash.exports;
2939
2943
  }
2940
2944
  var runInContext = function runInContext2(context) {
2941
2945
  context = context == null ? root : _.defaults(root.Object(), context, _.pick(root, contextProps));
2942
- var Array2 = context.Array, Date2 = context.Date, Error2 = context.Error, Function2 = context.Function, Math = context.Math, Object2 = context.Object, RegExp2 = context.RegExp, String2 = context.String, TypeError = context.TypeError;
2946
+ var Array2 = context.Array, Date2 = context.Date, Error2 = context.Error, Function2 = context.Function, Math2 = context.Math, Object2 = context.Object, RegExp2 = context.RegExp, String2 = context.String, TypeError = context.TypeError;
2943
2947
  var arrayProto = Array2.prototype, funcProto = Function2.prototype, objectProto = Object2.prototype;
2944
2948
  var coreJsData = context["__core-js_shared__"];
2945
2949
  var funcToString = funcProto.toString;
@@ -2965,7 +2969,7 @@ lodash.exports;
2965
2969
  }
2966
2970
  }();
2967
2971
  var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout, ctxNow = Date2 && Date2.now !== root.Date.now && Date2.now, ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout;
2968
- var nativeCeil = Math.ceil, nativeFloor = Math.floor, nativeGetSymbols = Object2.getOwnPropertySymbols, nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined$1, nativeIsFinite = context.isFinite, nativeJoin = arrayProto.join, nativeKeys = overArg(Object2.keys, Object2), nativeMax = Math.max, nativeMin = Math.min, nativeNow = Date2.now, nativeParseInt = context.parseInt, nativeRandom = Math.random, nativeReverse = arrayProto.reverse;
2972
+ var nativeCeil = Math2.ceil, nativeFloor = Math2.floor, nativeGetSymbols = Object2.getOwnPropertySymbols, nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined$1, nativeIsFinite = context.isFinite, nativeJoin = arrayProto.join, nativeKeys = overArg(Object2.keys, Object2), nativeMax = Math2.max, nativeMin = Math2.min, nativeNow = Date2.now, nativeParseInt = context.parseInt, nativeRandom = Math2.random, nativeReverse = arrayProto.reverse;
2969
2973
  var DataView = getNative(context, "DataView"), Map = getNative(context, "Map"), Promise2 = getNative(context, "Promise"), Set = getNative(context, "Set"), WeakMap = getNative(context, "WeakMap"), nativeCreate = getNative(Object2, "create");
2970
2974
  var metaMap = WeakMap && new WeakMap();
2971
2975
  var realNames = {};
@@ -4711,7 +4715,7 @@ lodash.exports;
4711
4715
  return setWrapToString(result2, func, bitmask);
4712
4716
  }
4713
4717
  function createRound(methodName) {
4714
- var func = Math[methodName];
4718
+ var func = Math2[methodName];
4715
4719
  return function(number, precision) {
4716
4720
  number = toNumber(number);
4717
4721
  precision = precision == null ? 0 : nativeMin(toInteger(precision), 292);
@@ -7857,6 +7861,9 @@ const Input$2 = React.forwardRef(
7857
7861
  justifyContent: "space-between",
7858
7862
  $hasError: hasError || hasErrorProp,
7859
7863
  $disabled: disabled,
7864
+ $size: size,
7865
+ $hasLeftAction: Boolean(startAction),
7866
+ $hasRightAction: Boolean(endAction),
7860
7867
  className,
7861
7868
  children: [
7862
7869
  startAction,
@@ -7866,8 +7873,6 @@ const Input$2 = React.forwardRef(
7866
7873
  id,
7867
7874
  name,
7868
7875
  ref,
7869
- $hasLeftAction: Boolean(startAction),
7870
- $hasRightAction: Boolean(endAction),
7871
7876
  $size: size,
7872
7877
  "aria-describedby": ariaDescription,
7873
7878
  "aria-invalid": hasError || hasErrorProp,
@@ -7902,14 +7907,10 @@ const InputElement = styled.input`
7902
7907
  switch (props.$size) {
7903
7908
  case "S":
7904
7909
  return css`
7905
- padding-inline-start: ${props.$hasLeftAction ? props.theme.spaces[3] : props.theme.spaces[4]};
7906
- padding-inline-end: ${props.$hasRightAction ? props.theme.spaces[3] : props.theme.spaces[4]};
7907
7910
  padding-block: ${props.theme.spaces[1]};
7908
7911
  `;
7909
7912
  default:
7910
7913
  return css`
7911
- padding-inline-start: ${props.$hasLeftAction ? props.theme.spaces[3] : props.theme.spaces[4]};
7912
- padding-inline-end: ${props.$hasRightAction ? props.theme.spaces[3] : props.theme.spaces[4]};
7913
7914
  padding-block: ${props.theme.spaces[2]};
7914
7915
  `;
7915
7916
  }
@@ -7936,6 +7937,21 @@ const InputWrapper = styled(Flex)`
7936
7937
  background: ${({ theme }) => theme.colors.neutral0};
7937
7938
  ${inputFocusStyle()}
7938
7939
 
7940
+ ${(props) => {
7941
+ switch (props.$size) {
7942
+ case "S":
7943
+ return css`
7944
+ padding-inline-start: ${props.$hasLeftAction ? props.theme.spaces[3] : props.theme.spaces[4]};
7945
+ padding-inline-end: ${props.$hasRightAction ? props.theme.spaces[3] : props.theme.spaces[4]};
7946
+ `;
7947
+ default:
7948
+ return css`
7949
+ padding-inline-start: ${props.$hasLeftAction ? props.theme.spaces[3] : props.theme.spaces[4]};
7950
+ padding-inline-end: ${props.$hasRightAction ? props.theme.spaces[3] : props.theme.spaces[4]};
7951
+ `;
7952
+ }
7953
+ }}
7954
+
7939
7955
  ${({ theme, $disabled }) => $disabled ? css`
7940
7956
  color: ${theme.colors.neutral600};
7941
7957
  background: ${theme.colors.neutral150};
@@ -8466,19 +8482,7 @@ const ContentImpl$1 = styled(AlertDialog.Content)`
8466
8482
  }
8467
8483
  `;
8468
8484
  const Header$1 = React.forwardRef(({ children, ...restProps }, forwardedRef) => {
8469
- return /* @__PURE__ */ jsx(AlertDialog.Title, { asChild: true, children: /* @__PURE__ */ jsx(
8470
- Title$1,
8471
- {
8472
- tag: "h2",
8473
- ref: forwardedRef,
8474
- padding: 6,
8475
- justifyContent: "center",
8476
- variant: "h2",
8477
- fontWeight: "bold",
8478
- ...restProps,
8479
- children
8480
- }
8481
- ) });
8485
+ return /* @__PURE__ */ jsx(AlertDialog.Title, { asChild: true, children: /* @__PURE__ */ jsx(Title$1, { tag: "h2", variant: "beta", ref: forwardedRef, padding: 6, fontWeight: "bold", ...restProps, children }) });
8482
8486
  });
8483
8487
  const Title$1 = styled(Typography)`
8484
8488
  display: flex;
@@ -8652,8 +8656,7 @@ ${css`
8652
8656
  img,
8653
8657
  picture,
8654
8658
  video,
8655
- canvas,
8656
- svg {
8659
+ canvas {
8657
8660
  display: block;
8658
8661
  max-width: 100%;
8659
8662
  }
@@ -8889,8 +8892,7 @@ const SelectContent = styled(Select.Content)`
8889
8892
  border: 1px solid ${({ theme }) => theme.colors.neutral150};
8890
8893
  border-radius: ${({ theme }) => theme.borderRadius};
8891
8894
  min-width: var(--radix-select-trigger-width);
8892
- /* This is from the design-system figma file. */
8893
- max-height: 15rem;
8895
+ max-height: 15.6rem;
8894
8896
  z-index: ${({ theme }) => theme.zIndices.popover};
8895
8897
 
8896
8898
  @media (prefers-reduced-motion: no-preference) {
@@ -9067,7 +9069,7 @@ const SingleSelectOption = React.forwardRef(
9067
9069
  ({ value, startIcon, children, ...restProps }, ref) => {
9068
9070
  return /* @__PURE__ */ jsxs(Item$2, { ref, value: value.toString(), ...restProps, children: [
9069
9071
  startIcon && /* @__PURE__ */ jsx(Box, { tag: "span", "aria-hidden": true, children: startIcon }),
9070
- /* @__PURE__ */ jsx(Typography, { children: /* @__PURE__ */ jsx(ItemText, { children }) })
9072
+ /* @__PURE__ */ jsx(Typography, { lineHeight: "20px", children: /* @__PURE__ */ jsx(ItemText, { children }) })
9071
9073
  ] });
9072
9074
  }
9073
9075
  );
@@ -10063,30 +10065,27 @@ const EmptyStateIconWrapper = styled(Box)`
10063
10065
  height: 8.8rem;
10064
10066
  }
10065
10067
  `;
10066
- const EmptyStateLayout = ({
10067
- icon,
10068
- content,
10069
- action,
10070
- hasRadius = true,
10071
- shadow = "tableShadow"
10072
- }) => {
10073
- return /* @__PURE__ */ jsxs(
10074
- Flex,
10075
- {
10076
- alignItems: "center",
10077
- direction: "column",
10078
- padding: 11,
10079
- background: "neutral0",
10080
- hasRadius,
10081
- shadow,
10082
- children: [
10083
- icon ? /* @__PURE__ */ jsx(EmptyStateIconWrapper, { paddingBottom: 6, "aria-hidden": true, children: icon }) : null,
10084
- /* @__PURE__ */ jsx(Box, { paddingBottom: 4, children: /* @__PURE__ */ jsx(Typography, { variant: "delta", tag: "p", textAlign: "center", textColor: "neutral600", children: content }) }),
10085
- action
10086
- ]
10087
- }
10088
- );
10089
- };
10068
+ const EmptyStateLayout = React.forwardRef(
10069
+ ({ icon, content, action, hasRadius = true, shadow = "tableShadow" }, forwardedRef) => {
10070
+ return /* @__PURE__ */ jsxs(
10071
+ Flex,
10072
+ {
10073
+ ref: forwardedRef,
10074
+ alignItems: "center",
10075
+ direction: "column",
10076
+ padding: 11,
10077
+ background: "neutral0",
10078
+ hasRadius,
10079
+ shadow,
10080
+ children: [
10081
+ icon ? /* @__PURE__ */ jsx(EmptyStateIconWrapper, { paddingBottom: 6, "aria-hidden": true, children: icon }) : null,
10082
+ /* @__PURE__ */ jsx(Box, { paddingBottom: 4, children: /* @__PURE__ */ jsx(Typography, { variant: "delta", tag: "p", textAlign: "center", textColor: "neutral600", children: content }) }),
10083
+ action
10084
+ ]
10085
+ }
10086
+ );
10087
+ }
10088
+ );
10090
10089
  const getFocusableNodes = (node, includeNegativeTabIndex) => {
10091
10090
  const nodes = [
10092
10091
  ...node.querySelectorAll(
@@ -10172,7 +10171,7 @@ const Wrapper$1 = styled(Box)`
10172
10171
  const ItemImpl = forwardRef(
10173
10172
  ({ col, s, xs, ...props }, forwardedRef) => /* @__PURE__ */ jsx(Item$1, { ref: forwardedRef, $col: col, $s: s, $xs: xs, ...props })
10174
10173
  );
10175
- const Item$1 = styled(Box)`
10174
+ const Item$1 = styled(Flex)`
10176
10175
  grid-column: span ${({ $col }) => $col ?? 1};
10177
10176
  max-width: 100%;
10178
10177
 
@@ -10189,10 +10188,6 @@ const Grid = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty
10189
10188
  Item: ItemImpl,
10190
10189
  Root: Root$3
10191
10190
  }, Symbol.toStringTag, { value: "Module" }));
10192
- const VARIANT_DEFAULT = "tertiary";
10193
- const VARIANT_SECONDARY = "secondary";
10194
- const SIZES = ["S", "M", "L"];
10195
- const VARIANTS = [VARIANT_DEFAULT, VARIANT_SECONDARY];
10196
10191
  const IconButton = forwardRef(
10197
10192
  ({
10198
10193
  label,
@@ -10200,8 +10195,8 @@ const IconButton = forwardRef(
10200
10195
  children,
10201
10196
  disabled = false,
10202
10197
  onClick,
10203
- size = SIZES[0],
10204
- variant: variant2 = VARIANTS[0],
10198
+ size = "M",
10199
+ variant: variant2 = "tertiary",
10205
10200
  withTooltip = true,
10206
10201
  ...restProps
10207
10202
  }, ref) => {
@@ -10215,7 +10210,11 @@ const IconButton = forwardRef(
10215
10210
  {
10216
10211
  "aria-disabled": disabled,
10217
10212
  background: disabled ? "neutral150" : background,
10213
+ tag: "button",
10214
+ display: "inline-flex",
10218
10215
  justifyContent: "center",
10216
+ hasRadius: true,
10217
+ cursor: "pointer",
10219
10218
  ...restProps,
10220
10219
  ref,
10221
10220
  $size: size,
@@ -10227,40 +10226,53 @@ const IconButton = forwardRef(
10227
10226
  return withTooltip ? /* @__PURE__ */ jsx(TooltipImpl, { label, children: component }) : component;
10228
10227
  }
10229
10228
  );
10230
- const IconButtonWrapper = styled(BaseButton)`
10231
- background-color: ${({ theme, $variant }) => {
10232
- if ($variant === VARIANT_SECONDARY) {
10233
- return theme.colors.primary100;
10234
- }
10235
- return void 0;
10236
- }};
10237
- border-color: ${({ theme, $variant }) => {
10238
- if ($variant === VARIANT_SECONDARY) {
10239
- return theme.colors.primary200;
10240
- }
10241
- return theme.colors.neutral200;
10242
- }};
10243
- height: ${({ theme, $size }) => theme.sizes.button[$size]};
10244
- width: ${({ theme, $size }) => theme.sizes.button[$size]};
10245
- color: ${({ theme, $variant }) => {
10246
- if ($variant === VARIANT_SECONDARY) {
10247
- return theme.colors.primary500;
10229
+ const IconButtonWrapper = styled(Flex)`
10230
+ text-decoration: none;
10231
+
10232
+ ${(props) => {
10233
+ switch (props.$size) {
10234
+ case "S": {
10235
+ return css`
10236
+ padding-block: 0.6rem;
10237
+ padding-inline: 0.6rem;
10238
+ `;
10239
+ }
10240
+ case "M": {
10241
+ return css`
10242
+ padding-block: 0.9rem;
10243
+ padding-inline: 0.9rem;
10244
+ `;
10245
+ }
10246
+ case "L": {
10247
+ return css`
10248
+ padding-block: 1.1rem;
10249
+ padding-inline: 1.1rem;
10250
+ `;
10251
+ }
10248
10252
  }
10249
- return theme.colors.neutral500;
10250
- }};
10253
+ }}
10254
+ ${getVariantStyle}
10255
+ ${(props) => props.$variant === "tertiary" ? css`
10256
+ color: ${props.theme.colors.neutral600};
10257
+ ` : ""}
10251
10258
 
10252
- &:hover,
10253
- &:focus {
10254
- color: ${({ theme, $variant }) => {
10255
- if ($variant === VARIANT_SECONDARY) {
10256
- return theme.colors.primary600;
10259
+ &:hover {
10260
+ ${getHoverStyle}
10257
10261
  }
10258
- return theme.colors.neutral600;
10259
- }};
10262
+
10263
+ &:active {
10264
+ ${getActiveStyle}
10260
10265
  }
10261
10266
 
10262
10267
  &[aria-disabled='true'] {
10263
- color: ${({ theme }) => theme.colors.neutral600};
10268
+ ${getDisabledStyle}
10269
+ }
10270
+
10271
+ @media (prefers-reduced-motion: no-preference) {
10272
+ transition:
10273
+ ${(props) => props.theme.transitions.backgroundColor},
10274
+ ${(props) => props.theme.transitions.color},
10275
+ border-color ${(props) => props.theme.motion.timings["200"]} ${(props) => props.theme.motion.easings.easeOutQuad};
10264
10276
  }
10265
10277
  `;
10266
10278
  const IconButtonGroup = styled(Flex)`
@@ -10274,25 +10286,10 @@ const IconButtonGroup = styled(Flex)`
10274
10286
 
10275
10287
  & ${IconButtonWrapper} {
10276
10288
  border-radius: 0;
10277
- color: ${({ theme }) => theme.colors.neutral700};
10278
10289
 
10279
10290
  & + ${IconButtonWrapper} {
10280
10291
  border-left: none;
10281
10292
  }
10282
-
10283
- &:hover {
10284
- background-color: ${({ theme }) => theme.colors.neutral100};
10285
- color: ${({ theme }) => theme.colors.neutral800};
10286
- }
10287
-
10288
- &:active {
10289
- background-color: ${({ theme }) => theme.colors.neutral150};
10290
- color: ${({ theme }) => theme.colors.neutral900};
10291
- }
10292
-
10293
- &[aria-disabled='true'] {
10294
- color: ${({ theme }) => theme.colors.neutral600};
10295
- }
10296
10293
  }
10297
10294
  `;
10298
10295
  const addMarks = StateEffect.define();
@@ -10472,62 +10469,19 @@ const JSONInputContainer = styled(Flex)`
10472
10469
  }
10473
10470
  `;
10474
10471
  const LinkButton = forwardRef(
10475
- ({ variant: variant2 = "default", startIcon, endIcon, disabled = false, children, size = "S", ...props }, ref) => {
10476
- const paddingX = size === "S" ? 2 : "10px";
10477
- const paddingY = 4;
10478
- return /* @__PURE__ */ jsxs(
10479
- LinkWrapper$1,
10472
+ ({ disabled, ...restProps }, ref) => {
10473
+ return /* @__PURE__ */ jsx(
10474
+ Button,
10480
10475
  {
10481
10476
  ref,
10482
- "aria-disabled": disabled,
10483
- $variant: variant2,
10484
- background: "buttonPrimary600",
10485
- borderColor: "buttonPrimary600",
10486
- hasRadius: true,
10487
- display: "inline-flex",
10488
- paddingBottom: paddingX,
10489
- paddingLeft: paddingY,
10490
- paddingRight: paddingY,
10491
- paddingTop: paddingX,
10492
- pointerEvents: disabled ? "none" : void 0,
10493
- ...props,
10494
- children: [
10495
- startIcon && /* @__PURE__ */ jsx(Flex, { "aria-hidden": true, children: startIcon }),
10496
- /* @__PURE__ */ jsx(Typography, { variant: size === "S" ? "pi" : void 0, fontWeight: "bold", children }),
10497
- endIcon && /* @__PURE__ */ jsx(Flex, { "aria-hidden": true, children: endIcon })
10498
- ]
10477
+ tag: BaseLinkImpl,
10478
+ tabIndex: disabled ? -1 : void 0,
10479
+ disabled,
10480
+ ...restProps
10499
10481
  }
10500
10482
  );
10501
10483
  }
10502
10484
  );
10503
- const LinkWrapper$1 = styled(BaseLink)`
10504
- gap: ${({ theme }) => theme.spaces[2]};
10505
-
10506
- ${focus}
10507
-
10508
- &[aria-disabled='true'] {
10509
- pointer-events: none;
10510
- }
10511
-
10512
- text-decoration: none;
10513
-
10514
- &[aria-disabled='true'] {
10515
- ${getDisabledStyle}
10516
- &:active {
10517
- ${getDisabledStyle}
10518
- }
10519
- }
10520
-
10521
- &:hover {
10522
- ${getHoverStyle}
10523
- }
10524
-
10525
- &:active {
10526
- ${getActiveStyle}
10527
- }
10528
-
10529
- ${getVariantStyle}
10530
- `;
10531
10485
  const MainWrapper = styled(Box)`
10532
10486
  // To prevent global outline on focus visible to force an outline when Main is focused
10533
10487
  &:focus-visible {
@@ -10563,6 +10517,7 @@ const SkipToContent = ({ children }) => {
10563
10517
  }
10564
10518
  );
10565
10519
  };
10520
+ const setOpacity = (hex, alpha) => `${hex}${Math.floor(alpha * 255).toString(16).padStart(2, "0")}`;
10566
10521
  const ScrollAreaImpl$1 = React.forwardRef(
10567
10522
  ({ children, viewportRef, ...restProps }, forwardedRef) => {
10568
10523
  return /* @__PURE__ */ jsxs(ScrollAreaRoot, { ref: forwardedRef, ...restProps, children: [
@@ -10622,17 +10577,13 @@ const Trigger$2 = React.forwardRef((props, forwardedRef) => {
10622
10577
  return /* @__PURE__ */ jsx(Dialog$1.Trigger, { ...props, asChild: true, ref: forwardedRef });
10623
10578
  });
10624
10579
  const Content$2 = React.forwardRef((props, forwardedRef) => {
10625
- return /* @__PURE__ */ jsxs(Dialog$1.Portal, { children: [
10626
- /* @__PURE__ */ jsx(Overlay, {}),
10627
- /* @__PURE__ */ jsx(ContentImpl, { ref: forwardedRef, ...props })
10628
- ] });
10580
+ return /* @__PURE__ */ jsx(Dialog$1.Portal, { children: /* @__PURE__ */ jsx(Overlay, { children: /* @__PURE__ */ jsx(ContentImpl, { ref: forwardedRef, ...props }) }) });
10629
10581
  });
10630
10582
  const Overlay = styled(Dialog$1.Overlay)`
10631
- background-color: ${(props) => props.theme.colors.neutral800};
10583
+ background: ${(props) => setOpacity(props.theme.colors.neutral800, 0.2)};
10632
10584
  position: fixed;
10633
10585
  inset: 0;
10634
10586
  z-index: ${(props) => props.theme.zIndices.overlay};
10635
- opacity: 0.2;
10636
10587
 
10637
10588
  @media (prefers-reduced-motion: no-preference) {
10638
10589
  animation: ${ANIMATIONS.overlayFadeIn} ${(props) => props.theme.motion.timings["200"]}
@@ -10931,7 +10882,7 @@ const NextLink = forwardRef(
10931
10882
  ] });
10932
10883
  }
10933
10884
  );
10934
- const LinkWrapper = styled(BaseLink)`
10885
+ const LinkWrapper = styled(BaseLinkImpl)`
10935
10886
  padding: ${({ theme }) => theme.spaces[3]};
10936
10887
  border-radius: ${({ theme }) => theme.borderRadius};
10937
10888
  box-shadow: ${({ $active, theme }) => $active ? theme.shadows.filterShadow : void 0};
@@ -11021,19 +10972,22 @@ const PopoverContent = styled(Popover$1.Content)`
11021
10972
  }
11022
10973
  }
11023
10974
  `;
11024
- const ScrollAreaImpl = ({ children, intersectionId, onReachEnd, ...props }) => {
11025
- const popoverRef = React.useRef(null);
11026
- const generatedIntersectionId = useId();
11027
- useIntersection(popoverRef, onReachEnd ?? (() => {
11028
- }), {
11029
- selectorToWatch: `#${stripReactIdOfColon(generatedIntersectionId)}`,
11030
- skipWhen: !intersectionId || !onReachEnd
11031
- });
11032
- return /* @__PURE__ */ jsxs(PopoverScrollArea, { ref: popoverRef, ...props, children: [
11033
- children,
11034
- intersectionId && onReachEnd && /* @__PURE__ */ jsx(Box, { id: stripReactIdOfColon(generatedIntersectionId), width: "100%", height: "1px" })
11035
- ] });
11036
- };
10975
+ const ScrollAreaImpl = React.forwardRef(
10976
+ ({ children, intersectionId, onReachEnd, ...props }, forwardedRef) => {
10977
+ const popoverRef = React.useRef(null);
10978
+ const composedRef = useComposedRefs(popoverRef, forwardedRef);
10979
+ const generatedIntersectionId = useId();
10980
+ useIntersection(popoverRef, onReachEnd ?? (() => {
10981
+ }), {
10982
+ selectorToWatch: `#${stripReactIdOfColon(generatedIntersectionId)}`,
10983
+ skipWhen: !intersectionId || !onReachEnd
10984
+ });
10985
+ return /* @__PURE__ */ jsxs(PopoverScrollArea, { ref: composedRef, ...props, children: [
10986
+ children,
10987
+ intersectionId && onReachEnd && /* @__PURE__ */ jsx(Box, { id: stripReactIdOfColon(generatedIntersectionId), width: "100%", height: "1px" })
10988
+ ] });
10989
+ }
10990
+ );
11037
10991
  const PopoverScrollArea = styled(ScrollAreaImpl$1)`
11038
10992
  height: 20rem;
11039
10993
  `;
@@ -11165,172 +11119,171 @@ const RawTableContext = React.createContext({
11165
11119
  }
11166
11120
  });
11167
11121
  const useTable = () => React.useContext(RawTableContext);
11168
- const RawTable = ({
11169
- colCount,
11170
- rowCount,
11171
- jumpStep = 3,
11172
- initialCol = 0,
11173
- initialRow = 0,
11174
- ...props
11175
- }) => {
11176
- const tableRef = React.useRef(null);
11177
- const mountedRef = React.useRef(false);
11178
- const [rowIndex, setRowIndex] = React.useState(initialRow);
11179
- const [colIndex, setColIndex] = React.useState(initialCol);
11180
- const setTableValues = React.useCallback(({ colIndex: colIndex2, rowIndex: rowIndex2 }) => {
11181
- setColIndex(colIndex2);
11182
- setRowIndex(rowIndex2);
11183
- }, []);
11184
- React.useEffect(() => {
11185
- if (mountedRef.current) {
11186
- focusFocusable(tableRef.current);
11187
- }
11188
- if (!mountedRef.current) {
11189
- mountedRef.current = true;
11190
- }
11191
- }, [colIndex, rowIndex]);
11192
- const handleKeyDown = (e) => {
11193
- switch (e.key) {
11194
- case KeyboardKeys.RIGHT: {
11195
- e.preventDefault();
11196
- setColIndex((prevColIndex) => prevColIndex < colCount - 1 ? prevColIndex + 1 : prevColIndex);
11197
- break;
11198
- }
11199
- case KeyboardKeys.LEFT: {
11200
- e.preventDefault();
11201
- setColIndex((prevColIndex) => prevColIndex > 0 ? prevColIndex - 1 : prevColIndex);
11202
- break;
11203
- }
11204
- case KeyboardKeys.UP: {
11205
- e.preventDefault();
11206
- setRowIndex((prevRowIndex) => prevRowIndex > 0 ? prevRowIndex - 1 : prevRowIndex);
11207
- break;
11122
+ const RawTable = React.forwardRef(
11123
+ ({ colCount, rowCount, jumpStep = 3, initialCol = 0, initialRow = 0, ...props }, forwardedRef) => {
11124
+ const tableRef = React.useRef(null);
11125
+ const mountedRef = React.useRef(false);
11126
+ const composedRef = useComposedRefs(tableRef, forwardedRef);
11127
+ const [rowIndex, setRowIndex] = React.useState(initialRow);
11128
+ const [colIndex, setColIndex] = React.useState(initialCol);
11129
+ const setTableValues = React.useCallback(({ colIndex: colIndex2, rowIndex: rowIndex2 }) => {
11130
+ setColIndex(colIndex2);
11131
+ setRowIndex(rowIndex2);
11132
+ }, []);
11133
+ React.useEffect(() => {
11134
+ if (mountedRef.current) {
11135
+ focusFocusable(tableRef.current);
11208
11136
  }
11209
- case KeyboardKeys.DOWN: {
11210
- e.preventDefault();
11211
- setRowIndex((prevRowIndex) => prevRowIndex < rowCount - 1 ? prevRowIndex + 1 : prevRowIndex);
11212
- break;
11137
+ if (!mountedRef.current) {
11138
+ mountedRef.current = true;
11213
11139
  }
11214
- case KeyboardKeys.HOME: {
11215
- e.preventDefault();
11216
- if (e.ctrlKey) {
11217
- setRowIndex(0);
11140
+ }, [colIndex, rowIndex]);
11141
+ const handleKeyDown = (e) => {
11142
+ switch (e.key) {
11143
+ case KeyboardKeys.RIGHT: {
11144
+ e.preventDefault();
11145
+ setColIndex((prevColIndex) => prevColIndex < colCount - 1 ? prevColIndex + 1 : prevColIndex);
11146
+ break;
11218
11147
  }
11219
- setColIndex(0);
11220
- break;
11221
- }
11222
- case KeyboardKeys.END: {
11223
- e.preventDefault();
11224
- if (e.ctrlKey) {
11225
- setRowIndex(rowCount - 1);
11148
+ case KeyboardKeys.LEFT: {
11149
+ e.preventDefault();
11150
+ setColIndex((prevColIndex) => prevColIndex > 0 ? prevColIndex - 1 : prevColIndex);
11151
+ break;
11152
+ }
11153
+ case KeyboardKeys.UP: {
11154
+ e.preventDefault();
11155
+ setRowIndex((prevRowIndex) => prevRowIndex > 0 ? prevRowIndex - 1 : prevRowIndex);
11156
+ break;
11157
+ }
11158
+ case KeyboardKeys.DOWN: {
11159
+ e.preventDefault();
11160
+ setRowIndex((prevRowIndex) => prevRowIndex < rowCount - 1 ? prevRowIndex + 1 : prevRowIndex);
11161
+ break;
11162
+ }
11163
+ case KeyboardKeys.HOME: {
11164
+ e.preventDefault();
11165
+ if (e.ctrlKey) {
11166
+ setRowIndex(0);
11167
+ }
11168
+ setColIndex(0);
11169
+ break;
11170
+ }
11171
+ case KeyboardKeys.END: {
11172
+ e.preventDefault();
11173
+ if (e.ctrlKey) {
11174
+ setRowIndex(rowCount - 1);
11175
+ }
11176
+ setColIndex(colCount - 1);
11177
+ break;
11178
+ }
11179
+ case KeyboardKeys.PAGE_DOWN: {
11180
+ e.preventDefault();
11181
+ setRowIndex((prevRowIndex) => prevRowIndex + jumpStep < rowCount ? prevRowIndex + jumpStep : rowCount - 1);
11182
+ break;
11183
+ }
11184
+ case KeyboardKeys.PAGE_UP: {
11185
+ e.preventDefault();
11186
+ setRowIndex((prevRowIndex) => prevRowIndex - jumpStep > 0 ? prevRowIndex - jumpStep : 0);
11187
+ break;
11226
11188
  }
11227
- setColIndex(colCount - 1);
11228
- break;
11229
11189
  }
11230
- case KeyboardKeys.PAGE_DOWN: {
11231
- e.preventDefault();
11232
- setRowIndex((prevRowIndex) => prevRowIndex + jumpStep < rowCount ? prevRowIndex + jumpStep : rowCount - 1);
11233
- break;
11190
+ };
11191
+ const context = React.useMemo(() => ({ rowIndex, colIndex, setTableValues }), [colIndex, rowIndex, setTableValues]);
11192
+ return /* @__PURE__ */ jsx(RawTableContext.Provider, { value: context, children: /* @__PURE__ */ jsx(
11193
+ "table",
11194
+ {
11195
+ role: "grid",
11196
+ ref: composedRef,
11197
+ "aria-rowcount": rowCount,
11198
+ "aria-colcount": colCount,
11199
+ onKeyDown: handleKeyDown,
11200
+ ...props
11234
11201
  }
11235
- case KeyboardKeys.PAGE_UP: {
11236
- e.preventDefault();
11237
- setRowIndex((prevRowIndex) => prevRowIndex - jumpStep > 0 ? prevRowIndex - jumpStep : 0);
11238
- break;
11202
+ ) });
11203
+ }
11204
+ );
11205
+ const RawTd = React.forwardRef(
11206
+ ({ coords = { col: 0, row: 0 }, tag = "td", ...props }, forwardedRef) => {
11207
+ const tdRef = React.useRef(null);
11208
+ const composedRef = useComposedRefs(forwardedRef, tdRef);
11209
+ const { rowIndex, colIndex, setTableValues } = useTable();
11210
+ const [isActive, setIsActive] = React.useState(false);
11211
+ const handleKeyDown = (e) => {
11212
+ const focusableNodes = getFocusableNodes(tdRef.current, true);
11213
+ if (focusableNodes.length === 0 || focusableNodes.length === 1 && getFocusableNodesWithKeyboardNav(focusableNodes).length === 0) {
11214
+ return;
11239
11215
  }
11240
- }
11241
- };
11242
- const context = React.useMemo(() => ({ rowIndex, colIndex, setTableValues }), [colIndex, rowIndex, setTableValues]);
11243
- return /* @__PURE__ */ jsx(RawTableContext.Provider, { value: context, children: /* @__PURE__ */ jsx(
11244
- "table",
11245
- {
11246
- role: "grid",
11247
- ref: tableRef,
11248
- "aria-rowcount": rowCount,
11249
- "aria-colcount": colCount,
11250
- onKeyDown: handleKeyDown,
11251
- ...props
11252
- }
11253
- ) });
11254
- };
11255
- const RawTd = ({ coords = { col: 0, row: 0 }, tag = "td", ...props }) => {
11256
- const tdRef = React.useRef(null);
11257
- const { rowIndex, colIndex, setTableValues } = useTable();
11258
- const [isActive, setIsActive] = React.useState(false);
11259
- const handleKeyDown = (e) => {
11260
- const focusableNodes = getFocusableNodes(tdRef.current, true);
11261
- if (focusableNodes.length === 0 || focusableNodes.length === 1 && getFocusableNodesWithKeyboardNav(focusableNodes).length === 0) {
11262
- return;
11263
- }
11264
- if (focusableNodes.length > 1 && !focusableNodes.find((node) => node.tagName !== "BUTTON")) {
11265
- e.preventDefault();
11266
- const focussedButtonIndex = focusableNodes.findIndex((node) => node === document.activeElement);
11267
- if (e.key === KeyboardKeys.RIGHT) {
11268
- const nextNode = focusableNodes[focussedButtonIndex + 1];
11269
- if (nextNode) {
11270
- e.stopPropagation();
11271
- nextNode.focus();
11272
- }
11273
- } else if (e.key === KeyboardKeys.LEFT) {
11274
- const nextNode = focusableNodes[focussedButtonIndex - 1];
11275
- if (nextNode) {
11276
- e.stopPropagation();
11277
- nextNode.focus();
11216
+ if (focusableNodes.length > 1 && !focusableNodes.find((node) => node.tagName !== "BUTTON")) {
11217
+ e.preventDefault();
11218
+ const focussedButtonIndex = focusableNodes.findIndex((node) => node === document.activeElement);
11219
+ if (e.key === KeyboardKeys.RIGHT) {
11220
+ const nextNode = focusableNodes[focussedButtonIndex + 1];
11221
+ if (nextNode) {
11222
+ e.stopPropagation();
11223
+ nextNode.focus();
11224
+ }
11225
+ } else if (e.key === KeyboardKeys.LEFT) {
11226
+ const nextNode = focusableNodes[focussedButtonIndex - 1];
11227
+ if (nextNode) {
11228
+ e.stopPropagation();
11229
+ nextNode.focus();
11230
+ }
11278
11231
  }
11279
- }
11280
- return;
11281
- }
11282
- const isEnterKey = e.key === KeyboardKeys.ENTER;
11283
- if (isEnterKey && !isActive) {
11284
- setIsActive(true);
11285
- } else if ((e.key === KeyboardKeys.ESCAPE || isEnterKey) && isActive) {
11286
- if (isEnterKey && document.activeElement?.tagName === "A") {
11287
11232
  return;
11288
11233
  }
11289
- setIsActive(false);
11290
- tdRef.current.focus();
11291
- } else if (isActive) {
11292
- e.stopPropagation();
11293
- }
11294
- };
11295
- const isFocused = rowIndex === coords.row - 1 && colIndex === coords.col - 1;
11296
- useIsomorphicLayoutEffect(() => {
11297
- const focusableNodes = getFocusableNodes(tdRef.current, true);
11298
- if (focusableNodes.length === 0 || focusableNodes.length === 1 && getFocusableNodesWithKeyboardNav(focusableNodes).length !== 0 || focusableNodes.length > 1 && Boolean(focusableNodes.find((node) => node.tagName !== "BUTTON"))) {
11299
- tdRef.current.setAttribute("tabIndex", !isActive && isFocused ? "0" : "-1");
11300
- focusableNodes.forEach((node, index) => {
11301
- node.setAttribute("tabIndex", isActive ? "0" : "-1");
11302
- if (isActive && index === 0) {
11303
- node.focus();
11234
+ const isEnterKey = e.key === KeyboardKeys.ENTER;
11235
+ if (isEnterKey && !isActive) {
11236
+ setIsActive(true);
11237
+ } else if ((e.key === KeyboardKeys.ESCAPE || isEnterKey) && isActive) {
11238
+ if (isEnterKey && document.activeElement?.tagName === "A") {
11239
+ return;
11304
11240
  }
11305
- });
11306
- } else {
11241
+ setIsActive(false);
11242
+ tdRef.current.focus();
11243
+ } else if (isActive) {
11244
+ e.stopPropagation();
11245
+ }
11246
+ };
11247
+ const isFocused = rowIndex === coords.row - 1 && colIndex === coords.col - 1;
11248
+ useIsomorphicLayoutEffect(() => {
11249
+ const focusableNodes = getFocusableNodes(tdRef.current, true);
11250
+ if (focusableNodes.length === 0 || focusableNodes.length === 1 && getFocusableNodesWithKeyboardNav(focusableNodes).length !== 0 || focusableNodes.length > 1 && Boolean(focusableNodes.find((node) => node.tagName !== "BUTTON"))) {
11251
+ tdRef.current.setAttribute("tabIndex", !isActive && isFocused ? "0" : "-1");
11252
+ focusableNodes.forEach((node, index) => {
11253
+ node.setAttribute("tabIndex", isActive ? "0" : "-1");
11254
+ if (isActive && index === 0) {
11255
+ node.focus();
11256
+ }
11257
+ });
11258
+ } else {
11259
+ focusableNodes.forEach((node) => {
11260
+ node.setAttribute("tabIndex", isFocused ? "0" : "-1");
11261
+ });
11262
+ }
11263
+ }, [isActive, isFocused]);
11264
+ const handleFocusableNodeFocus = React.useCallback(() => {
11265
+ const focusableNodes = getFocusableNodes(tdRef.current, true);
11266
+ if (focusableNodes.length >= 1 && (getFocusableNodesWithKeyboardNav(focusableNodes).length !== 0 || !focusableNodes.find((node) => node.tagName !== "BUTTON"))) {
11267
+ setIsActive(true);
11268
+ }
11269
+ setTableValues({ rowIndex: coords.row - 1, colIndex: coords.col - 1 });
11270
+ }, [coords, setTableValues]);
11271
+ useIsomorphicLayoutEffect(() => {
11272
+ const cell = tdRef.current;
11273
+ const focusableNodes = getFocusableNodes(cell, true);
11307
11274
  focusableNodes.forEach((node) => {
11308
- node.setAttribute("tabIndex", isFocused ? "0" : "-1");
11275
+ node.addEventListener("focus", handleFocusableNodeFocus);
11309
11276
  });
11310
- }
11311
- }, [isActive, isFocused]);
11312
- const handleFocusableNodeFocus = React.useCallback(() => {
11313
- const focusableNodes = getFocusableNodes(tdRef.current, true);
11314
- if (focusableNodes.length >= 1 && (getFocusableNodesWithKeyboardNav(focusableNodes).length !== 0 || !focusableNodes.find((node) => node.tagName !== "BUTTON"))) {
11315
- setIsActive(true);
11316
- }
11317
- setTableValues({ rowIndex: coords.row - 1, colIndex: coords.col - 1 });
11318
- }, [coords, setTableValues]);
11319
- useIsomorphicLayoutEffect(() => {
11320
- const cell = tdRef.current;
11321
- const focusableNodes = getFocusableNodes(cell, true);
11322
- focusableNodes.forEach((node) => {
11323
- node.addEventListener("focus", handleFocusableNodeFocus);
11324
- });
11325
- return () => {
11326
- const focusableNodes2 = getFocusableNodes(cell, true);
11327
- focusableNodes2.forEach((node) => {
11328
- node.removeEventListener("focus", handleFocusableNodeFocus);
11329
- });
11330
- };
11331
- }, [handleFocusableNodeFocus]);
11332
- return /* @__PURE__ */ jsx(Box, { role: "gridcell", tag, ref: tdRef, onKeyDown: handleKeyDown, ...props });
11333
- };
11277
+ return () => {
11278
+ const focusableNodes2 = getFocusableNodes(cell, true);
11279
+ focusableNodes2.forEach((node) => {
11280
+ node.removeEventListener("focus", handleFocusableNodeFocus);
11281
+ });
11282
+ };
11283
+ }, [handleFocusableNodeFocus]);
11284
+ return /* @__PURE__ */ jsx(Box, { role: "gridcell", tag, ref: composedRef, onKeyDown: handleKeyDown, ...props });
11285
+ }
11286
+ );
11334
11287
  const RawTh = (props) => /* @__PURE__ */ jsx(RawTd, { ...props, tag: "th" });
11335
11288
  const RawThead = ({ children, ...props }) => {
11336
11289
  const childrenClone = React.Children.toArray(children).map((child) => {
@@ -11381,14 +11334,18 @@ const SearchbarWrapper = styled.div`
11381
11334
  &:focus-within {
11382
11335
  ${SearchIcon} {
11383
11336
  fill: ${({ theme }) => theme.colors.primary600};
11384
- path {
11385
- }
11386
11337
  }
11387
11338
  }
11388
11339
  `;
11389
11340
  const SearchbarInput = styled(Input$2)`
11390
11341
  border: 1px solid transparent;
11391
11342
 
11343
+ &:hover {
11344
+ button {
11345
+ cursor: pointer;
11346
+ }
11347
+ }
11348
+
11392
11349
  ${inputFocusStyle()}
11393
11350
  `;
11394
11351
  const Searchbar = React.forwardRef(
@@ -11408,7 +11365,17 @@ const Searchbar = React.forwardRef(
11408
11365
  ref: actualRef,
11409
11366
  value,
11410
11367
  startAction: /* @__PURE__ */ jsx(SearchIcon, { "aria-hidden": true }),
11411
- endAction: isCompleting ? /* @__PURE__ */ jsx(Action$1, { label: clearLabel, onClick: handleClear, children: /* @__PURE__ */ jsx(CloseIcon, {}) }) : void 0,
11368
+ endAction: isCompleting ? /* @__PURE__ */ jsx(
11369
+ Action$1,
11370
+ {
11371
+ label: clearLabel,
11372
+ onClick: handleClear,
11373
+ onMouseDown: (e) => {
11374
+ e.preventDefault();
11375
+ },
11376
+ children: /* @__PURE__ */ jsx(CloseIcon, {})
11377
+ }
11378
+ ) : void 0,
11412
11379
  ...props
11413
11380
  }
11414
11381
  )
@@ -11416,47 +11383,60 @@ const Searchbar = React.forwardRef(
11416
11383
  }
11417
11384
  );
11418
11385
  const SearchForm = (props) => /* @__PURE__ */ jsx("form", { ...props, role: "search" });
11419
- const Tag = ({ children, icon, disabled = false, onClick, ...props }) => {
11386
+ const ButtonBox$1 = styled(Box)`
11387
+ display: inline-flex;
11388
+ border: none;
11389
+
11390
+ & > svg {
11391
+ height: 0.8rem;
11392
+ width: 0.8rem;
11393
+ }
11394
+
11395
+ & > svg path {
11396
+ fill: ${({ theme, ...p }) => p["aria-disabled"] ? theme.colors.neutral600 : theme.colors.primary600};
11397
+ }
11398
+
11399
+ &:hover {
11400
+ cursor: ${({ $iconAction }) => $iconAction ? "pointer" : "initial"};
11401
+ }
11402
+ `;
11403
+ const Tag = ({ children, icon, label, disabled = false, onClick, ...props }) => {
11420
11404
  const handleClick = (e) => {
11421
11405
  if (disabled || !onClick)
11422
11406
  return;
11423
11407
  onClick(e);
11424
11408
  };
11425
11409
  return /* @__PURE__ */ jsxs(
11426
- TagWrapper,
11410
+ Flex,
11427
11411
  {
11428
- tag: "button",
11412
+ inline: true,
11429
11413
  background: disabled ? "neutral200" : "primary100",
11430
11414
  color: disabled ? "neutral700" : "primary600",
11431
11415
  paddingLeft: 3,
11432
- paddingRight: 3,
11433
- onClick: handleClick,
11434
- "aria-disabled": disabled,
11435
- disabled,
11436
- borderWidth: "1px",
11437
- borderStyle: "solid",
11416
+ paddingRight: 1,
11438
11417
  borderColor: disabled ? "neutral300" : "primary200",
11439
11418
  hasRadius: true,
11440
11419
  height: "3.2rem",
11441
- gap: 2,
11442
11420
  ...props,
11443
11421
  children: [
11444
11422
  /* @__PURE__ */ jsx(TagText, { $disabled: disabled, variant: "pi", fontWeight: "bold", children }),
11445
- icon
11423
+ /* @__PURE__ */ jsx(
11424
+ ButtonBox$1,
11425
+ {
11426
+ tag: "button",
11427
+ disabled,
11428
+ "aria-disabled": disabled,
11429
+ "aria-label": label,
11430
+ padding: 2,
11431
+ onClick: handleClick,
11432
+ $iconAction: !!onClick,
11433
+ children: icon
11434
+ }
11435
+ )
11446
11436
  ]
11447
11437
  }
11448
11438
  );
11449
11439
  };
11450
- const TagWrapper = styled(Flex)`
11451
- & > svg {
11452
- height: 0.8rem;
11453
- width: 0.8rem;
11454
- }
11455
-
11456
- & > svg path {
11457
- fill: ${({ theme, ...p }) => p["aria-disabled"] ? theme.colors.neutral600 : theme.colors.primary600};
11458
- }
11459
- `;
11460
11440
  const TagText = styled(Typography)`
11461
11441
  color: inherit;
11462
11442
  border-right: 1px solid ${({ theme, $disabled }) => $disabled ? theme.colors.neutral300 : theme.colors.primary200};
@@ -11725,7 +11705,7 @@ const SubNavHeader = ({
11725
11705
  ] });
11726
11706
  }
11727
11707
  return /* @__PURE__ */ jsxs(Flex, { direction: "column", alignItems: "flex-start", paddingLeft: 6, paddingTop: 6, paddingBottom: 2, paddingRight: 4, children: [
11728
- /* @__PURE__ */ jsxs(Flex, { justifyContent: "space-between", alignItems: "flex-start", children: [
11708
+ /* @__PURE__ */ jsxs(Flex, { justifyContent: "space-between", alignItems: "flex-start", width: "100%", gap: 2, children: [
11729
11709
  /* @__PURE__ */ jsx(Typography, { variant: "beta", tag, children: label }),
11730
11710
  searchable && /* @__PURE__ */ jsx(IconButton, { ref: searchButtonRef, onClick: toggleSearch, label: searchLabel, children: /* @__PURE__ */ jsx(Search, {}) })
11731
11711
  ] }),
@@ -11760,7 +11740,7 @@ const CustomBullet = styled.span`
11760
11740
  background-color: ${({ theme, $active }) => $active ? theme.colors.primary600 : theme.colors.neutral600};
11761
11741
  border-radius: 50%;
11762
11742
  `;
11763
- const SubNavLinkWrapper = styled(BaseLink)`
11743
+ const SubNavLinkWrapper = styled(BaseLinkImpl)`
11764
11744
  display: flex;
11765
11745
  align-items: center;
11766
11746
  justify-content: space-between;
@@ -12166,7 +12146,7 @@ const TableBox = styled(Box)`
12166
12146
  const ScrollContainer = styled(Box)`
12167
12147
  overflow-x: auto;
12168
12148
  `;
12169
- const Table = ({ footer, ...props }) => {
12149
+ const Table = React.forwardRef(({ footer, ...props }, forwardedRef) => {
12170
12150
  const tableRef = React.useRef(null);
12171
12151
  const [overflowing, setOverflowing] = React.useState();
12172
12152
  const handleScroll = (e) => {
@@ -12189,10 +12169,10 @@ const Table = ({ footer, ...props }) => {
12189
12169
  }
12190
12170
  }, []);
12191
12171
  return /* @__PURE__ */ jsxs(TableContainer, { shadow: "tableShadow", hasRadius: true, background: "neutral0", children: [
12192
- /* @__PURE__ */ jsx(TableBox, { $overflowing: overflowing, position: "relative", children: /* @__PURE__ */ jsx(ScrollContainer, { ref: tableRef, onScroll: handleScroll, paddingLeft: 6, paddingRight: 6, children: /* @__PURE__ */ jsx(TableWrapper, { ...props }) }) }),
12172
+ /* @__PURE__ */ jsx(TableBox, { $overflowing: overflowing, position: "relative", children: /* @__PURE__ */ jsx(ScrollContainer, { ref: tableRef, onScroll: handleScroll, paddingLeft: 6, paddingRight: 6, children: /* @__PURE__ */ jsx(TableWrapper, { ref: forwardedRef, ...props }) }) }),
12193
12173
  footer
12194
12174
  ] });
12195
- };
12175
+ });
12196
12176
  const TbodyWrapper = styled(RawTbody)`
12197
12177
  & tr:last-of-type {
12198
12178
  border-bottom: none;
@@ -12233,7 +12213,6 @@ const Tr = (props) => {
12233
12213
  const CellWrapper = styled(RawTd)`
12234
12214
  vertical-align: middle;
12235
12215
  text-align: left;
12236
- color: ${({ theme }) => theme.colors.neutral600};
12237
12216
  outline-offset: -4px;
12238
12217
 
12239
12218
  /**
@@ -12243,15 +12222,15 @@ const CellWrapper = styled(RawTd)`
12243
12222
  vertical-align: sub;
12244
12223
  }
12245
12224
  `;
12246
- const Th = ({ children, action, ...props }) => {
12247
- return /* @__PURE__ */ jsx(CellWrapper, { as: RawTh, ...props, children: /* @__PURE__ */ jsxs(Flex, { children: [
12225
+ const Th = React.forwardRef(({ children, action, ...props }, forwardedRef) => {
12226
+ return /* @__PURE__ */ jsx(CellWrapper, { color: "neutral600", as: RawTh, ref: forwardedRef, ...props, children: /* @__PURE__ */ jsxs(Flex, { children: [
12248
12227
  children,
12249
12228
  action
12250
12229
  ] }) });
12251
- };
12252
- const Td = ({ children, ...props }) => {
12253
- return /* @__PURE__ */ jsx(CellWrapper, { ...props, children });
12254
- };
12230
+ });
12231
+ const Td = React.forwardRef(({ children, ...props }, forwardedRef) => {
12232
+ return /* @__PURE__ */ jsx(CellWrapper, { color: "neutral800", ref: forwardedRef, ...props, children });
12233
+ });
12255
12234
  const IconBox = styled(Box)`
12256
12235
  height: 2.4rem;
12257
12236
  width: 2.4rem;
@@ -12284,6 +12263,28 @@ const TFooter = ({ children, icon, ...props }) => {
12284
12263
  ] }) })
12285
12264
  ] });
12286
12265
  };
12266
+ const TextButton = forwardRef(
12267
+ ({ children, startIcon, endIcon, disabled = false, loading = false, ...props }, ref) => {
12268
+ const isDisabled = disabled || loading;
12269
+ return /* @__PURE__ */ jsxs(
12270
+ TextButtonWrapper,
12271
+ {
12272
+ ref,
12273
+ disabled: isDisabled,
12274
+ "aria-disabled": isDisabled,
12275
+ tag: "button",
12276
+ type: "button",
12277
+ gap: 2,
12278
+ ...props,
12279
+ children: [
12280
+ loading ? /* @__PURE__ */ jsx(LoadingWrapper, { "aria-hidden": true, children: /* @__PURE__ */ jsx(Loader$1, {}) }) : startIcon,
12281
+ /* @__PURE__ */ jsx(Typography, { variant: "pi", children }),
12282
+ endIcon
12283
+ ]
12284
+ }
12285
+ );
12286
+ }
12287
+ );
12287
12288
  const rotation = keyframes`
12288
12289
  from {
12289
12290
  transform: rotate(0deg);
@@ -12292,51 +12293,24 @@ const rotation = keyframes`
12292
12293
  transform: rotate(359deg);
12293
12294
  }
12294
12295
  `;
12295
- const LoadingWrapper = styled.div`
12296
+ const LoadingWrapper = styled.span`
12297
+ display: flex;
12296
12298
  animation: ${rotation} 2s infinite linear;
12297
12299
  will-change: transform;
12298
12300
  `;
12299
12301
  const TextButtonWrapper = styled(Flex)`
12300
12302
  border: none;
12303
+ background-color: transparent;
12304
+ color: ${(props) => props.theme.colors.primary600};
12305
+ cursor: pointer;
12301
12306
 
12302
12307
  &[aria-disabled='true'] {
12303
12308
  pointer-events: none;
12304
- svg path {
12305
- fill: ${({ theme }) => theme.colors.neutral600};
12306
- }
12307
- }
12308
-
12309
- svg path {
12310
- fill: ${({ theme }) => theme.colors.primary600};
12309
+ color: ${(props) => props.theme.colors.neutral600};
12311
12310
  }
12312
12311
 
12313
12312
  ${focus}
12314
12313
  `;
12315
- const TextButton = React.forwardRef(
12316
- ({ children, startIcon, endIcon, onClick, disabled = false, loading = false, ...props }, ref) => {
12317
- const handleClick = onClick && !disabled ? onClick : void 0;
12318
- const isDisabled = disabled || loading;
12319
- return /* @__PURE__ */ jsxs(
12320
- TextButtonWrapper,
12321
- {
12322
- ref,
12323
- "aria-disabled": isDisabled,
12324
- onClick: handleClick,
12325
- tag: "button",
12326
- type: "button",
12327
- background: "transparent",
12328
- gap: 2,
12329
- ...props,
12330
- children: [
12331
- loading ? /* @__PURE__ */ jsx(LoadingWrapper, { "aria-hidden": true, children: /* @__PURE__ */ jsx(Loader$1, {}) }) : startIcon,
12332
- /* @__PURE__ */ jsx(Typography, { variant: "pi", textColor: isDisabled ? "neutral600" : "primary600", children }),
12333
- endIcon
12334
- ]
12335
- }
12336
- );
12337
- }
12338
- );
12339
- TextButton.displayName = "TextButton";
12340
12314
  const TextInput = React.forwardRef((props, ref) => {
12341
12315
  return /* @__PURE__ */ jsx(Input$2, { ref, ...props });
12342
12316
  });
@@ -12626,8 +12600,7 @@ export {
12626
12600
  Alert,
12627
12601
  Avatar,
12628
12602
  Badge,
12629
- BaseButton,
12630
- BaseLink,
12603
+ BaseLinkImpl as BaseLink,
12631
12604
  Box,
12632
12605
  Breadcrumbs,
12633
12606
  Button,