braid-design-system 32.1.1 → 32.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. package/CHANGELOG.md +125 -0
  2. package/codemod/dist/wrapper.js +102 -104
  3. package/dist/ToastContext.chunk.cjs +21 -21
  4. package/dist/ToastContext.chunk.mjs +41 -41
  5. package/dist/Toggle.chunk.cjs +19 -29
  6. package/dist/Toggle.chunk.mjs +24 -34
  7. package/dist/reset.d.ts +190 -91
  8. package/dist/side-effects/lib/themes/baseTokens/apac.cjs +7 -8
  9. package/dist/side-effects/lib/themes/baseTokens/apac.mjs +6 -8
  10. package/dist/side-effects/lib/themes/makeRuntimeTokens.cjs +3 -9
  11. package/dist/side-effects/lib/themes/makeRuntimeTokens.mjs +3 -8
  12. package/dist/side-effects/lib/themes/tokenType.cjs +15 -0
  13. package/dist/side-effects/lib/themes/tokenType.mjs +16 -0
  14. package/dist/styles/lib/components/Button/Button.css.cjs +24 -23
  15. package/dist/styles/lib/components/Button/Button.css.mjs +25 -24
  16. package/dist/styles/lib/components/TooltipRenderer/TooltipRenderer.css.cjs +1 -5
  17. package/dist/styles/lib/components/TooltipRenderer/TooltipRenderer.css.mjs +1 -5
  18. package/dist/styles/lib/components/private/Keyline/Keyline.css.cjs +4 -0
  19. package/dist/styles/lib/components/private/Keyline/Keyline.css.mjs +5 -1
  20. package/dist/styles/lib/css/negativeMargin/negativeMargin.css.cjs +4 -9
  21. package/dist/styles/lib/css/negativeMargin/negativeMargin.css.mjs +1 -6
  22. package/dist/styles/lib/css/typography.css.cjs +1 -16
  23. package/dist/styles/lib/css/typography.css.mjs +1 -16
  24. package/dist/styles/lib/themes/docs/tokens.cjs +8 -8
  25. package/dist/styles/lib/themes/docs/tokens.mjs +6 -8
  26. package/dist/styles/lib/themes/makeVanillaTheme.cjs +22 -9
  27. package/dist/styles/lib/themes/makeVanillaTheme.mjs +22 -9
  28. package/dist/styles/lib/themes/wireframe/tokens.cjs +25 -29
  29. package/dist/styles/lib/themes/wireframe/tokens.mjs +23 -29
  30. package/package.json +3 -2
  31. package/dist/styles/lib/components/Badge/Badge.css.cjs +0 -27
  32. package/dist/styles/lib/components/Badge/Badge.css.mjs +0 -28
@@ -8,12 +8,12 @@ import dedent from "dedent";
8
8
  import { base } from "./styles/lib/css/reset/reset.css.mjs";
9
9
  import { atoms } from "./styles/lib/css/atoms/atoms.mjs";
10
10
  import { mapColorModeValue, sprinkles, mapResponsiveValue, normalizeResponsiveValue } from "./styles/lib/css/atoms/sprinkles.css.mjs";
11
- import { lightModeTone, darkModeTone, lightModeNeutralOverride, darkModeNeutralOverride, fontFamily, fontWeight, tone, styles as styles$1, textSizeUntrimmed, touchableText } from "./styles/lib/css/typography.css.mjs";
11
+ import { lightModeTone, darkModeTone, lightModeNeutralOverride, darkModeNeutralOverride, fontFamily, fontWeight, tone, textSizeTrimmed, textSizeUntrimmed } from "./styles/lib/css/typography.css.mjs";
12
12
  import assert from "assert";
13
13
  import { isFragment } from "react-is";
14
14
  import { base as base$1, strong, regular, lightModeWeight, darkModeWeight } from "./styles/lib/components/Divider/Divider.css.mjs";
15
15
  import { hiddenOnPrint } from "./styles/lib/components/Hidden/Hidden.css.mjs";
16
- import { preventCollapsePseudo, styles } from "./styles/lib/css/negativeMargin/negativeMargin.css.mjs";
16
+ import { preventCollapsePseudo, top, right, bottom, left } from "./styles/lib/css/negativeMargin/negativeMargin.css.mjs";
17
17
  import { column, width, columnContent } from "./styles/lib/components/Column/Column.css.mjs";
18
18
  import { marginAuto } from "./styles/lib/components/ContentBlock/ContentBlock.css.mjs";
19
19
  import { truncate } from "./styles/lib/components/private/Truncate/Truncate.css.mjs";
@@ -23,12 +23,12 @@ import { weakLink, regularLinkLightMode, regularLinkDarkMode, base as base$2, vi
23
23
  import { lineHeightContainer } from "./styles/lib/css/lineHeightContainer.css.mjs";
24
24
  import { size, inlineCrop, inline, alignY, cropToTextSize, blockWidths } from "./styles/lib/hooks/useIcon/icon.css.mjs";
25
25
  import { hideFocusRingsClassName } from "./styles/lib/components/private/hideFocusRings/hideFocusRings.css.mjs";
26
- import { focusOverlay, hoverOverlay, invertedBackgroundsLightMode, invertedBackgroundsDarkMode, forceActive, activeOverlay, constants, root, standard, small, bleedVerticallyToCapHeight, loadingDot } from "./styles/lib/components/Button/Button.css.mjs";
26
+ import { focusOverlay, hoverOverlay, invertedBackgroundsLightMode, invertedBackgroundsDarkMode, forceActive, activeOverlay, padToMinHeight, root, standard, small, bleedVerticallyToCapHeight, loadingDot } from "./styles/lib/components/Button/Button.css.mjs";
27
27
  import { usePopperTooltip } from "react-popper-tooltip";
28
28
  import isMobile from "is-mobile";
29
- import { verticalOffsetBeforeEntrance, translateZ0, background, maxWidth, padding as padding$1, arrow } from "./styles/lib/components/TooltipRenderer/TooltipRenderer.css.mjs";
29
+ import { verticalOffsetBeforeEntrance, translateZ0, background, maxWidth, arrow } from "./styles/lib/components/TooltipRenderer/TooltipRenderer.css.mjs";
30
30
  import { button } from "./styles/lib/components/ButtonIcon/ButtonIcon.css.mjs";
31
- import { noRadiusOnRight, largestWidth, tone as tone$1, lightMode, darkMode } from "./styles/lib/components/private/Keyline/Keyline.css.mjs";
31
+ import { noRadiusOnRight, largestWidth, width as width$1, tone as tone$1, lightMode, darkMode } from "./styles/lib/components/private/Keyline/Keyline.css.mjs";
32
32
  import { toast } from "./styles/lib/components/useToast/Toast.css.mjs";
33
33
  const TextContext = createContext(null);
34
34
  const BraidPortal = ({ children, container }) => {
@@ -455,14 +455,20 @@ const resolveResponsiveProp = (value, mobileAtoms, tabletAtoms, desktopAtoms, wi
455
455
  const wideAtom = wideAtoms[wide];
456
456
  return clsx(mobileAtom, tabletAtom, desktopAtom, wideAtom);
457
457
  };
458
+ const directionStyles = {
459
+ top,
460
+ right,
461
+ bottom,
462
+ left
463
+ };
458
464
  const negativeMargin = (direction, space) => space ? clsx([
459
465
  direction === "top" || direction === "bottom" ? preventCollapsePseudo[direction] : void 0,
460
466
  resolveResponsiveProp(
461
467
  space,
462
- styles[direction].mobile,
463
- styles[direction].tablet,
464
- styles[direction].desktop,
465
- styles[direction].wide
468
+ directionStyles[direction].mobile,
469
+ directionStyles[direction].tablet,
470
+ directionStyles[direction].desktop,
471
+ directionStyles[direction].wide
466
472
  )
467
473
  ]) : null;
468
474
  const alignToDisplay = {
@@ -631,7 +637,7 @@ function textStyles({
631
637
  fontFamily,
632
638
  fontWeight[weight],
633
639
  tone[tone$12],
634
- styles$1[baseline ? "textSizeTrimmed" : "textSizeUntrimmed"][size2]
640
+ (baseline ? textSizeTrimmed : textSizeUntrimmed)[size2]
635
641
  ];
636
642
  }
637
643
  const Truncate = ({ children }) => /* @__PURE__ */ jsx(Box, { component: "span", className: truncate, children });
@@ -875,7 +881,7 @@ const Columns = ({
875
881
  const Column = ({
876
882
  children,
877
883
  data,
878
- width: width$1,
884
+ width: width$12,
879
885
  ...restProps
880
886
  }) => {
881
887
  const {
@@ -895,11 +901,11 @@ const Column = ({
895
901
  component,
896
902
  display: component === "span" ? "block" : void 0,
897
903
  minWidth: 0,
898
- width: width$1 !== "content" ? "full" : void 0,
899
- flexShrink: width$1 === "content" ? 0 : void 0,
904
+ width: width$12 !== "content" ? "full" : void 0,
905
+ flexShrink: width$12 === "content" ? 0 : void 0,
900
906
  className: [
901
907
  column,
902
- width$1 !== "content" ? width[width$1] : null
908
+ width$12 !== "content" ? width[width$12] : null
903
909
  ],
904
910
  ...buildDataAttributes({ data, validateRestProps: restProps }),
905
911
  children: /* @__PURE__ */ jsx(
@@ -1188,8 +1194,8 @@ const Keyline = ({ tone: tone2, borderRadius: borderRadius2 }) => {
1188
1194
  component: "span",
1189
1195
  height: "full",
1190
1196
  display: "inlineBlock",
1191
- paddingLeft: "xxsmall",
1192
1197
  className: [
1198
+ width$1,
1193
1199
  tone$1[tone2],
1194
1200
  lightMode[backgroundLightness.lightMode],
1195
1201
  darkMode[backgroundLightness.darkMode]
@@ -1203,7 +1209,7 @@ const boxShadowForVariant = {
1203
1209
  default: "borderField",
1204
1210
  disabled: "borderNeutralLight",
1205
1211
  focus: "outlineFocus",
1206
- hover: "borderFormAccent",
1212
+ formAccent: "borderFormAccent",
1207
1213
  critical: "borderCritical"
1208
1214
  };
1209
1215
  const FieldOverlay = ({ variant, ...restProps }) => /* @__PURE__ */ jsx(
@@ -1241,10 +1247,10 @@ const Bleed = ({
1241
1247
  space,
1242
1248
  horizontal,
1243
1249
  vertical,
1244
- top,
1245
- bottom,
1246
- left,
1247
- right,
1250
+ top: top2,
1251
+ bottom: bottom2,
1252
+ left: left2,
1253
+ right: right2,
1248
1254
  children,
1249
1255
  component = "div",
1250
1256
  data,
@@ -1255,10 +1261,10 @@ const Bleed = ({
1255
1261
  component,
1256
1262
  display: component === "span" ? "block" : void 0,
1257
1263
  className: [
1258
- negativeMargin("top", top || vertical || space),
1259
- negativeMargin("bottom", bottom || vertical || space),
1260
- negativeMargin("left", left || horizontal || space),
1261
- negativeMargin("right", right || horizontal || space)
1264
+ negativeMargin("top", top2 || vertical || space),
1265
+ negativeMargin("bottom", bottom2 || vertical || space),
1266
+ negativeMargin("left", left2 || horizontal || space),
1267
+ negativeMargin("right", right2 || horizontal || space)
1262
1268
  ],
1263
1269
  ...buildDataAttributes({ data, validateRestProps: restProps }),
1264
1270
  children: /* @__PURE__ */ jsx(
@@ -1406,7 +1412,7 @@ const ButtonLoader = () => /* @__PURE__ */ jsxs(Box, { "aria-hidden": true, comp
1406
1412
  /* @__PURE__ */ jsx(Box, { component: "span", className: loadingDot, children: "." })
1407
1413
  ] });
1408
1414
  const transparentPaddingX = "small";
1409
- const buttonRadius = "large";
1415
+ const buttonRadius = "standard";
1410
1416
  const ButtonOverlays = ({
1411
1417
  variant = "solid",
1412
1418
  tone: tone2,
@@ -1473,7 +1479,6 @@ const ButtonText = ({
1473
1479
  iconPosition = "leading",
1474
1480
  variant = "solid",
1475
1481
  tone: tone2,
1476
- labelSpacing = true,
1477
1482
  bleed
1478
1483
  }) => {
1479
1484
  const lightness = useBackgroundLightness();
@@ -1496,9 +1501,8 @@ const ButtonText = ({
1496
1501
  flexWrap: "wrap",
1497
1502
  overflow: "hidden",
1498
1503
  pointerEvents: "none",
1499
- paddingX: labelSpacing ? labelPaddingX : void 0,
1500
- paddingY: labelSpacing && size2 === "small" ? constants.smallButtonPaddingSize : void 0,
1501
- className: labelSpacing && size2 === "standard" ? touchableText.standard : void 0,
1504
+ paddingX: labelPaddingX,
1505
+ className: padToMinHeight,
1502
1506
  background: tone2 === "neutral" && variant !== "solid" ? {
1503
1507
  lightMode: lightness.lightMode === "light" ? "customLight" : "customDark",
1504
1508
  darkMode: lightness.darkMode === "light" ? "customLight" : "customDark"
@@ -1508,8 +1512,8 @@ const ButtonText = ({
1508
1512
  {
1509
1513
  tone: stylesForVariant.textTone,
1510
1514
  weight: "medium",
1515
+ align: "center",
1511
1516
  size: size2,
1512
- baseline: false,
1513
1517
  children: [
1514
1518
  icon && iconPosition === "leading" ? /* @__PURE__ */ jsx(
1515
1519
  AvoidWidowIcon,
@@ -1676,7 +1680,7 @@ const TooltipTextDefaultsProvider = ({
1676
1680
  }
1677
1681
  );
1678
1682
  };
1679
- const borderRadius$1 = "xlarge";
1683
+ const borderRadius$1 = "large";
1680
1684
  const TooltipContent = ({
1681
1685
  children,
1682
1686
  opacity,
@@ -1695,12 +1699,8 @@ const TooltipContent = ({
1695
1699
  boxShadow: "large",
1696
1700
  background: "customDark",
1697
1701
  borderRadius: borderRadius$1,
1698
- className: [
1699
- background,
1700
- maxWidth,
1701
- translateZ0,
1702
- padding$1
1703
- ],
1702
+ padding: "small",
1703
+ className: [background, maxWidth, translateZ0],
1704
1704
  children: /* @__PURE__ */ jsxs(TooltipTextDefaultsProvider, { children: [
1705
1705
  /* @__PURE__ */ jsx(Box, { position: "relative", zIndex: 1, children }),
1706
1706
  /* @__PURE__ */ jsx(
@@ -2141,7 +2141,7 @@ const toneToIcon = {
2141
2141
  positive: IconPositive
2142
2142
  };
2143
2143
  const toastDuration = 1e4;
2144
- const borderRadius = "xlarge";
2144
+ const borderRadius = "large";
2145
2145
  const Action = ({ label, onClick, removeToast }) => {
2146
2146
  const handleClick = useCallback(() => {
2147
2147
  removeToast();
@@ -2300,15 +2300,15 @@ const useFlipList = () => {
2300
2300
  Array.from(refs.entries()).forEach(([id, element]) => {
2301
2301
  if (element) {
2302
2302
  const prevTop = positions.get(id);
2303
- const { top, height } = element.getBoundingClientRect();
2304
- if (typeof prevTop === "number" && prevTop !== top) {
2303
+ const { top: top2, height } = element.getBoundingClientRect();
2304
+ if (typeof prevTop === "number" && prevTop !== top2) {
2305
2305
  animations.push({
2306
2306
  element,
2307
2307
  transition: entranceTransition,
2308
2308
  transforms: [
2309
2309
  {
2310
2310
  property: "transform",
2311
- from: `translateY(${prevTop - top}px)`
2311
+ from: `translateY(${prevTop - top2}px)`
2312
2312
  }
2313
2313
  ]
2314
2314
  });
@@ -20,12 +20,11 @@ const styles_lib_css_typography_css_cjs = require("./styles/lib/css/typography.c
20
20
  const reactRemoveScroll = require("react-remove-scroll");
21
21
  const styles_lib_components_Autosuggest_Autosuggest_css_cjs = require("./styles/lib/components/Autosuggest/Autosuggest.css.cjs");
22
22
  const matchHighlights = require("autosuggest-highlight/match/index.js");
23
- const styles_lib_css_lineHeightContainer_css_cjs = require("./styles/lib/css/lineHeightContainer.css.cjs");
24
- const styles_lib_components_Badge_Badge_css_cjs = require("./styles/lib/components/Badge/Badge.css.cjs");
25
23
  const clsx = require("clsx");
26
24
  const FocusLock = require("react-focus-lock");
27
25
  const styles_lib_components_private_Modal_ModalExternalGutter_cjs = require("./styles/lib/components/private/Modal/ModalExternalGutter.cjs");
28
26
  const styles_lib_components_private_Modal_Modal_css_cjs = require("./styles/lib/components/private/Modal/Modal.css.cjs");
27
+ const styles_lib_css_lineHeightContainer_css_cjs = require("./styles/lib/css/lineHeightContainer.css.cjs");
29
28
  const styles_lib_components_List_List_css_cjs = require("./styles/lib/components/List/List.css.cjs");
30
29
  const styles_lib_components_Loader_Loader_css_cjs = require("./styles/lib/components/Loader/Loader.css.cjs");
31
30
  const styles_lib_components_MenuItem_useMenuItem_css_cjs = require("./styles/lib/components/MenuItem/useMenuItem.css.cjs");
@@ -2557,7 +2556,7 @@ const Field = ({
2557
2556
  }
2558
2557
  ),
2559
2558
  /* @__PURE__ */ jsxRuntime.jsx(ToastContext.FieldOverlay, { variant: "focus", className: styles_lib_components_private_Field_Field_css_cjs.focusOverlay }),
2560
- /* @__PURE__ */ jsxRuntime.jsx(ToastContext.FieldOverlay, { variant: "hover", className: styles_lib_components_private_Field_Field_css_cjs.hoverOverlay })
2559
+ /* @__PURE__ */ jsxRuntime.jsx(ToastContext.FieldOverlay, { variant: "formAccent", className: styles_lib_components_private_Field_Field_css_cjs.hoverOverlay })
2561
2560
  ] });
2562
2561
  const fieldPadding = "small";
2563
2562
  return /* @__PURE__ */ jsxRuntime.jsxs(ToastContext.Stack, { space: "xsmall", children: [
@@ -3034,7 +3033,6 @@ function GroupHeading({ children }) {
3034
3033
  ToastContext.Box,
3035
3034
  {
3036
3035
  paddingX: "small",
3037
- borderRadius: "standard",
3038
3036
  className: [
3039
3037
  styles_lib_components_Autosuggest_Autosuggest_css_cjs.groupHeading,
3040
3038
  styles_lib_css_typography_css_cjs.touchableText.xsmall,
@@ -3598,6 +3596,7 @@ const lightModeBackgroundForTone = {
3598
3596
  neutral: "neutralLight",
3599
3597
  caution: "cautionLight"
3600
3598
  };
3599
+ const verticalPadding = "xxsmall";
3601
3600
  const Badge = React.forwardRef(
3602
3601
  ({
3603
3602
  tone = "info",
@@ -3621,16 +3620,12 @@ const Badge = React.forwardRef(
3621
3620
  ),
3622
3621
  "Badge may only contain strings or numbers"
3623
3622
  );
3624
- return /* @__PURE__ */ jsxRuntime.jsx(
3623
+ const content = /* @__PURE__ */ jsxRuntime.jsx(
3625
3624
  ToastContext.Box,
3626
3625
  {
3627
3626
  component: "span",
3628
3627
  display: "flex",
3629
3628
  cursor: "default",
3630
- className: [
3631
- styles_lib_css_lineHeightContainer_css_cjs.lineHeightContainer[styles_lib_components_Badge_Badge_css_cjs.constants.textSize],
3632
- bleedY ? styles_lib_components_Badge_Badge_css_cjs.bleedY : null
3633
- ],
3634
3629
  ...ToastContext.buildDataAttributes({ data, validateRestProps: restProps }),
3635
3630
  children: /* @__PURE__ */ jsxRuntime.jsx(
3636
3631
  ToastContext.Box,
@@ -3642,23 +3637,16 @@ const Badge = React.forwardRef(
3642
3637
  "aria-describedby": ariaDescribedBy,
3643
3638
  title: title ?? (!ariaDescribedBy ? children : void 0),
3644
3639
  background: weight === "strong" ? tone : lightModeBackgroundForTone[tone],
3640
+ paddingY: verticalPadding,
3645
3641
  paddingX: "xsmall",
3646
- borderRadius: "large",
3642
+ borderRadius: "standard",
3647
3643
  overflow: "hidden",
3648
- children: /* @__PURE__ */ jsxRuntime.jsx(
3649
- ToastContext.Text,
3650
- {
3651
- size: styles_lib_components_Badge_Badge_css_cjs.constants.textSize,
3652
- weight: "medium",
3653
- truncate: true,
3654
- baseline: false,
3655
- children
3656
- }
3657
- )
3644
+ children: /* @__PURE__ */ jsxRuntime.jsx(ToastContext.Text, { size: "xsmall", weight: "medium", truncate: true, children })
3658
3645
  }
3659
3646
  )
3660
3647
  }
3661
3648
  );
3649
+ return bleedY ? /* @__PURE__ */ jsxRuntime.jsx(ToastContext.Bleed, { component: "span", vertical: verticalPadding, children: content }) : content;
3662
3650
  }
3663
3651
  );
3664
3652
  Badge.displayName = "Badge";
@@ -3769,7 +3757,7 @@ const validCardComponents = [
3769
3757
  "main",
3770
3758
  "section"
3771
3759
  ];
3772
- const borderRadius$2 = "xlarge";
3760
+ const borderRadius$2 = "large";
3773
3761
  const Card = ({
3774
3762
  children,
3775
3763
  component = "div",
@@ -3897,6 +3885,7 @@ const StyledInput = React.forwardRef(
3897
3885
  const accentBackground = disabled ? "neutralLight" : "formAccent";
3898
3886
  const isMixed = isCheckbox && checked === "mixed";
3899
3887
  const fieldBackground = disabled ? { lightMode: "neutralSoft", darkMode: "neutral" } : { lightMode: "surface" };
3888
+ const defaultBorder = checked ? "formAccent" : "default";
3900
3889
  React.useEffect(() => {
3901
3890
  if (ref && typeof ref === "object" && ref.current && isCheckbox) {
3902
3891
  ref.current.indeterminate = isMixed;
@@ -3953,7 +3942,7 @@ const StyledInput = React.forwardRef(
3953
3942
  /* @__PURE__ */ jsxRuntime.jsx(
3954
3943
  ToastContext.FieldOverlay,
3955
3944
  {
3956
- variant: disabled ? "disabled" : "default",
3945
+ variant: disabled ? "disabled" : defaultBorder,
3957
3946
  borderRadius: fieldBorderRadius,
3958
3947
  visible: tone !== "critical" || disabled
3959
3948
  }
@@ -3987,7 +3976,7 @@ const StyledInput = React.forwardRef(
3987
3976
  /* @__PURE__ */ jsxRuntime.jsx(
3988
3977
  ToastContext.FieldOverlay,
3989
3978
  {
3990
- variant: "hover",
3979
+ variant: "formAccent",
3991
3980
  borderRadius: fieldBorderRadius,
3992
3981
  className: styles_lib_components_private_InlineField_InlineField_css_cjs.hoverOverlay,
3993
3982
  children: /* @__PURE__ */ jsxRuntime.jsx(Indicator, { type, hover: true, checked: true })
@@ -4228,7 +4217,7 @@ const Heading = ({
4228
4217
  ) });
4229
4218
  const modalPadding = ["gutter", "large"];
4230
4219
  const ModalContentHeader = React.forwardRef(
4231
- ({ title, headingLevel, description, descriptionId, center }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(ToastContext.Stack, { space: "medium", children: [
4220
+ ({ title, headingLevel, description, descriptionId, center }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(ToastContext.Stack, { space: "small", children: [
4232
4221
  /* @__PURE__ */ jsxRuntime.jsx(Heading, { level: headingLevel, align: center ? "center" : void 0, children: /* @__PURE__ */ jsxRuntime.jsxs(
4233
4222
  ToastContext.Box,
4234
4223
  {
@@ -5216,6 +5205,7 @@ function Menu({
5216
5205
  transition: "fast",
5217
5206
  right: align === "right" ? 0 : void 0,
5218
5207
  opacity: !open ? 0 : void 0,
5208
+ overflow: "hidden",
5219
5209
  className: [
5220
5210
  !open && styles_lib_components_MenuRenderer_MenuRenderer_css_cjs.menuIsClosed,
5221
5211
  width !== "content" && styles_lib_components_MenuRenderer_MenuRenderer_css_cjs.width[width],
@@ -5848,7 +5838,7 @@ const paginate = ({
5848
5838
  }
5849
5839
  return Array.from(Array(pageCount).keys()).map((p) => p + minPage);
5850
5840
  };
5851
- const borderRadius = "large";
5841
+ const borderRadius = "standard";
5852
5842
  const PageNav = ({
5853
5843
  label,
5854
5844
  direction
@@ -7522,7 +7512,7 @@ const Highlight = ({ children }) => /* @__PURE__ */ jsxRuntime.jsx(
7522
7512
  ToastContext.Box,
7523
7513
  {
7524
7514
  component: "mark",
7525
- borderRadius: "standard",
7515
+ borderRadius: "small",
7526
7516
  background: { lightMode: "criticalLight", darkMode: "critical" },
7527
7517
  className: styles_lib_components_Textarea_Highlight_Highlight_css_cjs.root,
7528
7518
  children
@@ -8005,7 +7995,7 @@ const Toggle = React.forwardRef(
8005
7995
  {
8006
7996
  position: "absolute",
8007
7997
  background: "surface",
8008
- boxShadow: "borderField",
7998
+ boxShadow: on ? "borderFormAccent" : "borderField",
8009
7999
  transition: "fast",
8010
8000
  display: "flex",
8011
8001
  alignItems: "center",
@@ -8025,9 +8015,9 @@ const Toggle = React.forwardRef(
8025
8015
  /* @__PURE__ */ jsxRuntime.jsx(
8026
8016
  ToastContext.FieldOverlay,
8027
8017
  {
8028
- variant: "hover",
8018
+ variant: "formAccent",
8029
8019
  borderRadius: "full",
8030
- className: styles_lib_components_Toggle_Toggle_css_cjs.hoverOverlay
8020
+ className: !on ? styles_lib_components_Toggle_Toggle_css_cjs.hoverOverlay : void 0
8031
8021
  }
8032
8022
  )
8033
8023
  ]
@@ -1,4 +1,4 @@
1
- import { useThemeName, useResponsiveValue, Stack, Box, buildDataAttributes, Divider, useIcon, virtualTouchable, Columns, Column, Inline, Text, Overlay, ActionsContext, useBackground, iconContainerSize, IconClear, Keyline, IconPositive, IconCritical, TextContext, HeadingContext, textStyles, FieldOverlay, ButtonIcon, useColoredBoxClasses, BackgroundProvider, ButtonContainer, useButtonStyles, ButtonOverlays, ButtonText, resolveResponsiveRangeProps, optimizeResponsiveArray, Typography, Bleed, BraidPortal, TextLinkButton, AvoidWidowIcon, useDefaultTextProps, flattenChildren, DefaultTextPropsProvider, iconSize, Hidden, useSpace, negativeMargin, resolveResponsiveProp, useBackgroundLightness } from "./ToastContext.chunk.mjs";
1
+ import { useThemeName, useResponsiveValue, Stack, Box, buildDataAttributes, Divider, useIcon, virtualTouchable, Columns, Column, Inline, Text, Overlay, ActionsContext, useBackground, iconContainerSize, IconClear, Keyline, IconPositive, IconCritical, TextContext, HeadingContext, textStyles, FieldOverlay, ButtonIcon, Bleed, useColoredBoxClasses, BackgroundProvider, ButtonContainer, useButtonStyles, ButtonOverlays, ButtonText, resolveResponsiveRangeProps, optimizeResponsiveArray, Typography, BraidPortal, TextLinkButton, AvoidWidowIcon, useDefaultTextProps, flattenChildren, DefaultTextPropsProvider, iconSize, Hidden, useSpace, negativeMargin, resolveResponsiveProp, useBackgroundLightness } from "./ToastContext.chunk.mjs";
2
2
  import { useBraidTheme, useLinkComponent } from "./side-effects/lib/components/BraidProvider/BraidProvider.mjs";
3
3
  import { jsx, jsxs, Fragment as Fragment$1 } from "react/jsx-runtime";
4
4
  import assert from "assert";
@@ -19,12 +19,11 @@ import { fontWeight, tone, touchableText, fontFamily, headingWeight, heading } f
19
19
  import { RemoveScroll } from "react-remove-scroll";
20
20
  import { backdrop, backdropVisible, menu, groupHeading } from "./styles/lib/components/Autosuggest/Autosuggest.css.mjs";
21
21
  import matchHighlights from "autosuggest-highlight/match/index.js";
22
- import { lineHeightContainer } from "./styles/lib/css/lineHeightContainer.css.mjs";
23
- import { constants, bleedY } from "./styles/lib/components/Badge/Badge.css.mjs";
24
22
  import clsx from "clsx";
25
23
  import FocusLock from "react-focus-lock";
26
24
  import { externalGutter } from "./styles/lib/components/private/Modal/ModalExternalGutter.mjs";
27
25
  import { headingRoot, headingFocus, pointerEventsAll, maxSize, closeIconOffset, resetStackingContext, backdrop as backdrop$1, horiztontalTransition, modalContainer, entrance, exit, fixedStackingContext } from "./styles/lib/components/private/Modal/Modal.css.mjs";
26
+ import { lineHeightContainer } from "./styles/lib/css/lineHeightContainer.css.mjs";
28
27
  import { currentColor, size, minCharacterWidth, trimGutter } from "./styles/lib/components/List/List.css.mjs";
29
28
  import { rootSize, delay, size as size$1, currentColor as currentColor$1, circle } from "./styles/lib/components/Loader/Loader.css.mjs";
30
29
  import { menuItem } from "./styles/lib/components/MenuItem/useMenuItem.css.mjs";
@@ -2549,7 +2548,7 @@ const Field = ({
2549
2548
  }
2550
2549
  ),
2551
2550
  /* @__PURE__ */ jsx(FieldOverlay, { variant: "focus", className: focusOverlay }),
2552
- /* @__PURE__ */ jsx(FieldOverlay, { variant: "hover", className: hoverOverlay })
2551
+ /* @__PURE__ */ jsx(FieldOverlay, { variant: "formAccent", className: hoverOverlay })
2553
2552
  ] });
2554
2553
  const fieldPadding = "small";
2555
2554
  return /* @__PURE__ */ jsxs(Stack, { space: "xsmall", children: [
@@ -3026,7 +3025,6 @@ function GroupHeading({ children: children2 }) {
3026
3025
  Box,
3027
3026
  {
3028
3027
  paddingX: "small",
3029
- borderRadius: "standard",
3030
3028
  className: [
3031
3029
  groupHeading,
3032
3030
  touchableText.xsmall,
@@ -3590,11 +3588,12 @@ const lightModeBackgroundForTone = {
3590
3588
  neutral: "neutralLight",
3591
3589
  caution: "cautionLight"
3592
3590
  };
3591
+ const verticalPadding = "xxsmall";
3593
3592
  const Badge = forwardRef(
3594
3593
  ({
3595
3594
  tone: tone2 = "info",
3596
3595
  weight = "regular",
3597
- bleedY: bleedY$1 = false,
3596
+ bleedY = false,
3598
3597
  title,
3599
3598
  children: children2,
3600
3599
  id,
@@ -3613,16 +3612,12 @@ const Badge = forwardRef(
3613
3612
  ),
3614
3613
  "Badge may only contain strings or numbers"
3615
3614
  );
3616
- return /* @__PURE__ */ jsx(
3615
+ const content = /* @__PURE__ */ jsx(
3617
3616
  Box,
3618
3617
  {
3619
3618
  component: "span",
3620
3619
  display: "flex",
3621
3620
  cursor: "default",
3622
- className: [
3623
- lineHeightContainer[constants.textSize],
3624
- bleedY$1 ? bleedY : null
3625
- ],
3626
3621
  ...buildDataAttributes({ data, validateRestProps: restProps }),
3627
3622
  children: /* @__PURE__ */ jsx(
3628
3623
  Box,
@@ -3634,23 +3629,16 @@ const Badge = forwardRef(
3634
3629
  "aria-describedby": ariaDescribedBy,
3635
3630
  title: title ?? (!ariaDescribedBy ? children2 : void 0),
3636
3631
  background: weight === "strong" ? tone2 : lightModeBackgroundForTone[tone2],
3632
+ paddingY: verticalPadding,
3637
3633
  paddingX: "xsmall",
3638
- borderRadius: "large",
3634
+ borderRadius: "standard",
3639
3635
  overflow: "hidden",
3640
- children: /* @__PURE__ */ jsx(
3641
- Text,
3642
- {
3643
- size: constants.textSize,
3644
- weight: "medium",
3645
- truncate: true,
3646
- baseline: false,
3647
- children: children2
3648
- }
3649
- )
3636
+ children: /* @__PURE__ */ jsx(Text, { size: "xsmall", weight: "medium", truncate: true, children: children2 })
3650
3637
  }
3651
3638
  )
3652
3639
  }
3653
3640
  );
3641
+ return bleedY ? /* @__PURE__ */ jsx(Bleed, { component: "span", vertical: verticalPadding, children: content }) : content;
3654
3642
  }
3655
3643
  );
3656
3644
  Badge.displayName = "Badge";
@@ -3693,7 +3681,7 @@ const ButtonLink = forwardRef(
3693
3681
  size: size2,
3694
3682
  tone: tone2,
3695
3683
  variant,
3696
- bleedY: bleedY2,
3684
+ bleedY,
3697
3685
  bleed,
3698
3686
  icon: icon2,
3699
3687
  iconPosition,
@@ -3703,7 +3691,7 @@ const ButtonLink = forwardRef(
3703
3691
  }, ref) => {
3704
3692
  const LinkComponent = useLinkComponent(ref);
3705
3693
  if (process.env.NODE_ENV !== "production") {
3706
- if (typeof bleedY2 !== "undefined") {
3694
+ if (typeof bleedY !== "undefined") {
3707
3695
  console.warn(
3708
3696
  dedent`
3709
3697
  The "bleedY" prop has been deprecated and will be removed in a future version. Use "bleed" instead.
@@ -3729,7 +3717,7 @@ const ButtonLink = forwardRef(
3729
3717
  variant,
3730
3718
  tone: tone2,
3731
3719
  size: size2,
3732
- bleed: bleed || bleedY2,
3720
+ bleed: bleed || bleedY,
3733
3721
  loading
3734
3722
  }),
3735
3723
  children: [
@@ -3761,7 +3749,7 @@ const validCardComponents = [
3761
3749
  "main",
3762
3750
  "section"
3763
3751
  ];
3764
- const borderRadius$2 = "xlarge";
3752
+ const borderRadius$2 = "large";
3765
3753
  const Card = ({
3766
3754
  children: children2,
3767
3755
  component = "div",
@@ -3889,6 +3877,7 @@ const StyledInput = forwardRef(
3889
3877
  const accentBackground = disabled ? "neutralLight" : "formAccent";
3890
3878
  const isMixed$1 = isCheckbox && checked === "mixed";
3891
3879
  const fieldBackground = disabled ? { lightMode: "neutralSoft", darkMode: "neutral" } : { lightMode: "surface" };
3880
+ const defaultBorder = checked ? "formAccent" : "default";
3892
3881
  useEffect(() => {
3893
3882
  if (ref && typeof ref === "object" && ref.current && isCheckbox) {
3894
3883
  ref.current.indeterminate = isMixed$1;
@@ -3945,7 +3934,7 @@ const StyledInput = forwardRef(
3945
3934
  /* @__PURE__ */ jsx(
3946
3935
  FieldOverlay,
3947
3936
  {
3948
- variant: disabled ? "disabled" : "default",
3937
+ variant: disabled ? "disabled" : defaultBorder,
3949
3938
  borderRadius: fieldBorderRadius,
3950
3939
  visible: tone2 !== "critical" || disabled
3951
3940
  }
@@ -3979,7 +3968,7 @@ const StyledInput = forwardRef(
3979
3968
  /* @__PURE__ */ jsx(
3980
3969
  FieldOverlay,
3981
3970
  {
3982
- variant: "hover",
3971
+ variant: "formAccent",
3983
3972
  borderRadius: fieldBorderRadius,
3984
3973
  className: hoverOverlay$1,
3985
3974
  children: /* @__PURE__ */ jsx(Indicator, { type, hover: true, checked: true })
@@ -4220,7 +4209,7 @@ const Heading = ({
4220
4209
  ) });
4221
4210
  const modalPadding = ["gutter", "large"];
4222
4211
  const ModalContentHeader = forwardRef(
4223
- ({ title, headingLevel, description, descriptionId, center }, ref) => /* @__PURE__ */ jsxs(Stack, { space: "medium", children: [
4212
+ ({ title, headingLevel, description, descriptionId, center }, ref) => /* @__PURE__ */ jsxs(Stack, { space: "small", children: [
4224
4213
  /* @__PURE__ */ jsx(Heading, { level: headingLevel, align: center ? "center" : void 0, children: /* @__PURE__ */ jsxs(
4225
4214
  Box,
4226
4215
  {
@@ -5208,6 +5197,7 @@ function Menu({
5208
5197
  transition: "fast",
5209
5198
  right: align === "right" ? 0 : void 0,
5210
5199
  opacity: !open ? 0 : void 0,
5200
+ overflow: "hidden",
5211
5201
  className: [
5212
5202
  !open && menuIsClosed,
5213
5203
  width$1 !== "content" && width[width$1],
@@ -5840,7 +5830,7 @@ const paginate = ({
5840
5830
  }
5841
5831
  return Array.from(Array(pageCount).keys()).map((p) => p + minPage);
5842
5832
  };
5843
- const borderRadius = "large";
5833
+ const borderRadius = "standard";
5844
5834
  const PageNav = ({
5845
5835
  label: label2,
5846
5836
  direction
@@ -7514,7 +7504,7 @@ const Highlight = ({ children: children2 }) => /* @__PURE__ */ jsx(
7514
7504
  Box,
7515
7505
  {
7516
7506
  component: "mark",
7517
- borderRadius: "standard",
7507
+ borderRadius: "small",
7518
7508
  background: { lightMode: "criticalLight", darkMode: "critical" },
7519
7509
  className: root$5,
7520
7510
  children: children2
@@ -7997,7 +7987,7 @@ const Toggle = forwardRef(
7997
7987
  {
7998
7988
  position: "absolute",
7999
7989
  background: "surface",
8000
- boxShadow: "borderField",
7990
+ boxShadow: on ? "borderFormAccent" : "borderField",
8001
7991
  transition: "fast",
8002
7992
  display: "flex",
8003
7993
  alignItems: "center",
@@ -8017,9 +8007,9 @@ const Toggle = forwardRef(
8017
8007
  /* @__PURE__ */ jsx(
8018
8008
  FieldOverlay,
8019
8009
  {
8020
- variant: "hover",
8010
+ variant: "formAccent",
8021
8011
  borderRadius: "full",
8022
- className: hoverOverlay$2
8012
+ className: !on ? hoverOverlay$2 : void 0
8023
8013
  }
8024
8014
  )
8025
8015
  ]