braid-design-system 32.1.1 → 32.3.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 (38) hide show
  1. package/CHANGELOG.md +214 -0
  2. package/codemod/dist/wrapper.js +1315 -21130
  3. package/dist/ToastContext.chunk.cjs +71 -99
  4. package/dist/ToastContext.chunk.mjs +117 -145
  5. package/dist/Toggle.chunk.cjs +70 -49
  6. package/dist/Toggle.chunk.mjs +80 -59
  7. package/dist/reset.d.ts +212 -95
  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/Stepper/Stepper.css.cjs +8 -7
  17. package/dist/styles/lib/components/Stepper/Stepper.css.mjs +8 -7
  18. package/dist/styles/lib/components/Textarea/Highlight/Highlight.css.cjs +34 -3
  19. package/dist/styles/lib/components/Textarea/Highlight/Highlight.css.mjs +34 -3
  20. package/dist/styles/lib/components/TooltipRenderer/TooltipRenderer.css.cjs +1 -9
  21. package/dist/styles/lib/components/TooltipRenderer/TooltipRenderer.css.mjs +1 -9
  22. package/dist/styles/lib/components/private/Keyline/Keyline.css.cjs +4 -0
  23. package/dist/styles/lib/components/private/Keyline/Keyline.css.mjs +5 -1
  24. package/dist/styles/lib/css/atoms/atomicProperties.cjs +2 -0
  25. package/dist/styles/lib/css/atoms/atomicProperties.mjs +2 -0
  26. package/dist/styles/lib/css/negativeMargin/negativeMargin.css.cjs +4 -9
  27. package/dist/styles/lib/css/negativeMargin/negativeMargin.css.mjs +1 -6
  28. package/dist/styles/lib/css/typography.css.cjs +1 -16
  29. package/dist/styles/lib/css/typography.css.mjs +1 -16
  30. package/dist/styles/lib/themes/docs/tokens.cjs +8 -8
  31. package/dist/styles/lib/themes/docs/tokens.mjs +6 -8
  32. package/dist/styles/lib/themes/makeVanillaTheme.cjs +22 -9
  33. package/dist/styles/lib/themes/makeVanillaTheme.mjs +22 -9
  34. package/dist/styles/lib/themes/wireframe/tokens.cjs +25 -29
  35. package/dist/styles/lib/themes/wireframe/tokens.mjs +23 -29
  36. package/package.json +4 -3
  37. package/dist/styles/lib/components/Badge/Badge.css.cjs +0 -27
  38. 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,11 @@ 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, 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";
32
31
  import { toast } from "./styles/lib/components/useToast/Toast.css.mjs";
33
32
  const TextContext = createContext(null);
34
33
  const BraidPortal = ({ children, container }) => {
@@ -117,7 +116,7 @@ const BackgroundProvider = backgroundContext.Provider;
117
116
  const useBackground = () => useContext(backgroundContext);
118
117
  const useBackgroundLightness = (backgroundOverride) => {
119
118
  const backgroundFromContext = useBackground();
120
- const background2 = backgroundOverride || backgroundFromContext;
119
+ const background = backgroundOverride || backgroundFromContext;
121
120
  const { backgroundLightness } = useBraidTheme();
122
121
  const lightnessMap = {
123
122
  ...backgroundLightness,
@@ -125,16 +124,16 @@ const useBackgroundLightness = (backgroundOverride) => {
125
124
  customLight: "light"
126
125
  };
127
126
  return {
128
- lightMode: lightnessMap[background2.lightMode],
129
- darkMode: lightnessMap[background2.darkMode]
127
+ lightMode: lightnessMap[background.lightMode],
128
+ darkMode: lightnessMap[background.darkMode]
130
129
  };
131
130
  };
132
131
  const useColorContrast = () => {
133
- const background2 = useBackground();
132
+ const background = useBackground();
134
133
  const backgroundLightness = useBackgroundLightness();
135
134
  return (map) => mapColorModeValue(
136
135
  backgroundLightness,
137
- (lightness, mode) => typeof map === "function" ? map(lightness, background2[mode]) : map[lightness]
136
+ (lightness, mode) => typeof map === "function" ? map(lightness, background[mode]) : map[lightness]
138
137
  );
139
138
  };
140
139
  const adaptiveBackgrounds = {
@@ -152,6 +151,7 @@ const adaptiveBackgrounds = {
152
151
  formAccentSoftHover: "neutralHover"
153
152
  };
154
153
  const adaptiveBoxShadow = {
154
+ borderBrandAccent: "borderBrandAccentLight",
155
155
  borderBrandAccentLarge: "borderBrandAccentLightLarge",
156
156
  borderCaution: "borderCautionLight",
157
157
  borderCritical: "borderCriticalLight",
@@ -165,16 +165,16 @@ const adaptiveBoxShadow = {
165
165
  borderPositive: "borderPositiveLight",
166
166
  borderPromote: "borderPromoteLight"
167
167
  };
168
- const normaliseBackground = (background2) => ({
169
- lightMode: typeof background2 === "object" ? background2.lightMode : background2,
170
- darkMode: typeof background2 === "object" ? background2.darkMode : adaptiveBackgrounds[background2] || background2
168
+ const normaliseBackground = (background) => ({
169
+ lightMode: typeof background === "object" ? background.lightMode : background,
170
+ darkMode: typeof background === "object" ? background.darkMode : adaptiveBackgrounds[background] || background
171
171
  });
172
172
  const normalisedBoxShadow = (boxShadow) => ({
173
173
  lightMode: typeof boxShadow === "object" ? boxShadow.lightMode : boxShadow,
174
174
  darkMode: typeof boxShadow === "object" ? boxShadow.darkMode : boxShadow
175
175
  });
176
176
  const useColoredBoxClasses = ({
177
- background: background2,
177
+ background,
178
178
  boxShadow
179
179
  }) => {
180
180
  const parentLightness = useBackgroundLightness();
@@ -198,12 +198,12 @@ const useColoredBoxClasses = ({
198
198
  })
199
199
  );
200
200
  }
201
- if (background2) {
202
- const { lightMode: lightMode2, darkMode: darkMode2 } = normaliseBackground(background2);
203
- classList.push(lightModeTone[lightnessMap[lightMode2]]);
204
- classList.push(darkModeTone[lightnessMap[darkMode2]]);
205
- const lightModeTone$1 = lightMode2 === "neutral" ? darkMode2 : lightMode2;
206
- const darkModeTone$1 = darkMode2 === "neutral" ? lightMode2 : darkMode2;
201
+ if (background) {
202
+ const { lightMode, darkMode } = normaliseBackground(background);
203
+ classList.push(lightModeTone[lightnessMap[lightMode]]);
204
+ classList.push(darkModeTone[lightnessMap[darkMode]]);
205
+ const lightModeTone$1 = lightMode === "neutral" ? darkMode : lightMode;
206
+ const darkModeTone$1 = darkMode === "neutral" ? lightMode : darkMode;
207
207
  if (lightModeTone$1 && lightModeNeutralOverride[lightModeTone$1]) {
208
208
  classList.push(lightModeNeutralOverride[lightModeTone$1]);
209
209
  }
@@ -213,15 +213,15 @@ const useColoredBoxClasses = ({
213
213
  classList.push(
214
214
  atoms({
215
215
  background: {
216
- lightMode: lightMode2 === "customDark" || lightMode2 === "customLight" ? void 0 : lightMode2,
217
- darkMode: darkMode2 === "customDark" || darkMode2 === "customLight" ? void 0 : darkMode2
216
+ lightMode: lightMode === "customDark" || lightMode === "customLight" ? void 0 : lightMode,
217
+ darkMode: darkMode === "customDark" || darkMode === "customLight" ? void 0 : darkMode
218
218
  }
219
219
  })
220
220
  );
221
221
  return {
222
222
  backgroundContext: {
223
- lightMode: lightMode2 || currentBackgroundContext.lightMode,
224
- darkMode: darkMode2 || currentBackgroundContext.darkMode
223
+ lightMode: lightMode || currentBackgroundContext.lightMode,
224
+ darkMode: darkMode || currentBackgroundContext.darkMode
225
225
  },
226
226
  classList: classList.join(" ")
227
227
  };
@@ -231,9 +231,9 @@ const useColoredBoxClasses = ({
231
231
  };
232
232
  };
233
233
  const ColoredBox = forwardRef(
234
- ({ component, background: background2, boxShadow, className, ...props }, ref) => {
234
+ ({ component, background, boxShadow, className, ...props }, ref) => {
235
235
  const { backgroundContext: backgroundContext2, classList: colorClasses } = useColoredBoxClasses(
236
- { background: background2, boxShadow }
236
+ { background, boxShadow }
237
237
  );
238
238
  const element = createElement(component, {
239
239
  className: `${className}${colorClasses ? ` ${colorClasses}` : ""}`,
@@ -245,7 +245,7 @@ const ColoredBox = forwardRef(
245
245
  );
246
246
  ColoredBox.displayName = "ColoredBox";
247
247
  const Box = forwardRef(
248
- ({ component = "div", className, background: background2, boxShadow, data, ...restProps }, ref) => {
248
+ ({ component = "div", className, background, boxShadow, data, ...restProps }, ref) => {
249
249
  const atomProps = {};
250
250
  const nativeProps = {
251
251
  ...data ? (
@@ -282,11 +282,11 @@ const Box = forwardRef(
282
282
  ...atomProps
283
283
  });
284
284
  const combinedClasses = `${atomicClasses}${userClasses ? ` ${userClasses}` : ""}`;
285
- return background2 || boxShadow ? /* @__PURE__ */ jsx(
285
+ return background || boxShadow ? /* @__PURE__ */ jsx(
286
286
  ColoredBox,
287
287
  {
288
288
  component,
289
- background: background2,
289
+ background,
290
290
  boxShadow,
291
291
  className: combinedClasses,
292
292
  ref,
@@ -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 = {
@@ -624,14 +630,14 @@ const useDefaultTextProps = ({
624
630
  function textStyles({
625
631
  weight = "regular",
626
632
  size: size2 = "standard",
627
- tone: tone$12 = "neutral",
633
+ tone: tone$1 = "neutral",
628
634
  baseline
629
635
  }) {
630
636
  return [
631
637
  fontFamily,
632
638
  fontWeight[weight],
633
- tone[tone$12],
634
- styles$1[baseline ? "textSizeTrimmed" : "textSizeUntrimmed"][size2]
639
+ tone[tone$1],
640
+ (baseline ? textSizeTrimmed : textSizeUntrimmed)[size2]
635
641
  ];
636
642
  }
637
643
  const Truncate = ({ children }) => /* @__PURE__ */ jsx(Box, { component: "span", className: truncate, children });
@@ -1021,11 +1027,11 @@ const defaultVerticalCorrection = {
1021
1027
  uppercase: "none",
1022
1028
  lowercase: "none"
1023
1029
  };
1024
- const useIcon = ({ size: size2, tone: tone$12, alignY: alignY2, data, title, titleId, ...restProps }, { verticalCorrection = defaultVerticalCorrection } = {}) => {
1030
+ const useIcon = ({ size: size2, tone: tone$1, alignY: alignY2, data, title, titleId, ...restProps }, { verticalCorrection = defaultVerticalCorrection } = {}) => {
1025
1031
  const textContext = useContext(TextContext);
1026
1032
  const headingContext = useContext(HeadingContext);
1027
- const resolvedTone = tone[tone$12 || (textContext == null ? void 0 : textContext.tone) || "neutral"];
1028
- const toneClass = tone$12 || !headingContext && !(textContext == null ? void 0 : textContext.tone) ? resolvedTone : void 0;
1033
+ const resolvedTone = tone[tone$1 || (textContext == null ? void 0 : textContext.tone) || "neutral"];
1034
+ const toneClass = tone$1 || !headingContext && !(textContext == null ? void 0 : textContext.tone) ? resolvedTone : void 0;
1029
1035
  const isInline = Boolean(textContext || headingContext);
1030
1036
  const a11yProps = title ? { title, titleId, role: "img" } : { "aria-hidden": true };
1031
1037
  assert(
@@ -1140,7 +1146,7 @@ function virtualTouchable({ xAxis } = { xAxis: true }) {
1140
1146
  const Overlay = ({
1141
1147
  component,
1142
1148
  zIndex,
1143
- background: background2,
1149
+ background,
1144
1150
  borderRadius: borderRadius2,
1145
1151
  boxShadow,
1146
1152
  transition,
@@ -1155,7 +1161,7 @@ const Overlay = ({
1155
1161
  position: "absolute",
1156
1162
  zIndex,
1157
1163
  pointerEvents: "none",
1158
- background: background2,
1164
+ background,
1159
1165
  borderRadius: borderRadius2,
1160
1166
  boxShadow,
1161
1167
  transition,
@@ -1169,41 +1175,11 @@ const Overlay = ({
1169
1175
  }
1170
1176
  );
1171
1177
  const ActionsContext = createContext(null);
1172
- const Keyline = ({ tone: tone2, borderRadius: borderRadius2 }) => {
1173
- const backgroundLightness = useBackgroundLightness();
1174
- return /* @__PURE__ */ jsx(
1175
- Box,
1176
- {
1177
- component: "span",
1178
- position: "absolute",
1179
- top: 0,
1180
- bottom: 0,
1181
- left: 0,
1182
- overflow: "hidden",
1183
- borderRadius: borderRadius2,
1184
- className: [noRadiusOnRight, largestWidth],
1185
- children: /* @__PURE__ */ jsx(
1186
- Box,
1187
- {
1188
- component: "span",
1189
- height: "full",
1190
- display: "inlineBlock",
1191
- paddingLeft: "xxsmall",
1192
- className: [
1193
- tone$1[tone2],
1194
- lightMode[backgroundLightness.lightMode],
1195
- darkMode[backgroundLightness.darkMode]
1196
- ]
1197
- }
1198
- )
1199
- }
1200
- );
1201
- };
1202
1178
  const boxShadowForVariant = {
1203
1179
  default: "borderField",
1204
1180
  disabled: "borderNeutralLight",
1205
1181
  focus: "outlineFocus",
1206
- hover: "borderFormAccent",
1182
+ formAccent: "borderFormAccent",
1207
1183
  critical: "borderCritical"
1208
1184
  };
1209
1185
  const FieldOverlay = ({ variant, ...restProps }) => /* @__PURE__ */ jsx(
@@ -1241,10 +1217,10 @@ const Bleed = ({
1241
1217
  space,
1242
1218
  horizontal,
1243
1219
  vertical,
1244
- top,
1245
- bottom,
1246
- left,
1247
- right,
1220
+ top: top2,
1221
+ bottom: bottom2,
1222
+ left: left2,
1223
+ right: right2,
1248
1224
  children,
1249
1225
  component = "div",
1250
1226
  data,
@@ -1255,10 +1231,10 @@ const Bleed = ({
1255
1231
  component,
1256
1232
  display: component === "span" ? "block" : void 0,
1257
1233
  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)
1234
+ negativeMargin("top", top2 || vertical || space),
1235
+ negativeMargin("bottom", bottom2 || vertical || space),
1236
+ negativeMargin("left", left2 || horizontal || space),
1237
+ negativeMargin("right", right2 || horizontal || space)
1262
1238
  ],
1263
1239
  ...buildDataAttributes({ data, validateRestProps: restProps }),
1264
1240
  children: /* @__PURE__ */ jsx(
@@ -1375,28 +1351,28 @@ const variants = {
1375
1351
  background: void 0,
1376
1352
  backgroundHover: "formAccentSoftHover",
1377
1353
  backgroundActive: "formAccentSoftActive",
1378
- boxShadow: "borderFormAccentLarge"
1354
+ boxShadow: "borderFormAccent"
1379
1355
  },
1380
1356
  brandAccent: {
1381
1357
  textTone: "brandAccent",
1382
1358
  background: void 0,
1383
1359
  backgroundHover: "brandAccentSoftHover",
1384
1360
  backgroundActive: "brandAccentSoftActive",
1385
- boxShadow: "borderBrandAccentLarge"
1361
+ boxShadow: "borderBrandAccent"
1386
1362
  },
1387
1363
  critical: {
1388
1364
  textTone: "critical",
1389
1365
  background: void 0,
1390
1366
  backgroundHover: "criticalSoftHover",
1391
1367
  backgroundActive: "criticalSoftActive",
1392
- boxShadow: "borderCriticalLarge"
1368
+ boxShadow: "borderCritical"
1393
1369
  },
1394
1370
  neutral: {
1395
1371
  textTone: "neutral",
1396
1372
  background: void 0,
1397
1373
  backgroundHover: "neutralSoftHover",
1398
1374
  backgroundActive: "neutralSoftActive",
1399
- boxShadow: "borderNeutralLarge"
1375
+ boxShadow: "borderNeutral"
1400
1376
  }
1401
1377
  }
1402
1378
  };
@@ -1406,7 +1382,7 @@ const ButtonLoader = () => /* @__PURE__ */ jsxs(Box, { "aria-hidden": true, comp
1406
1382
  /* @__PURE__ */ jsx(Box, { component: "span", className: loadingDot, children: "." })
1407
1383
  ] });
1408
1384
  const transparentPaddingX = "small";
1409
- const buttonRadius = "large";
1385
+ const buttonRadius = "standard";
1410
1386
  const ButtonOverlays = ({
1411
1387
  variant = "solid",
1412
1388
  tone: tone2,
@@ -1473,7 +1449,6 @@ const ButtonText = ({
1473
1449
  iconPosition = "leading",
1474
1450
  variant = "solid",
1475
1451
  tone: tone2,
1476
- labelSpacing = true,
1477
1452
  bleed
1478
1453
  }) => {
1479
1454
  const lightness = useBackgroundLightness();
@@ -1496,9 +1471,8 @@ const ButtonText = ({
1496
1471
  flexWrap: "wrap",
1497
1472
  overflow: "hidden",
1498
1473
  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,
1474
+ paddingX: labelPaddingX,
1475
+ className: padToMinHeight,
1502
1476
  background: tone2 === "neutral" && variant !== "solid" ? {
1503
1477
  lightMode: lightness.lightMode === "light" ? "customLight" : "customDark",
1504
1478
  darkMode: lightness.darkMode === "light" ? "customLight" : "customDark"
@@ -1508,8 +1482,8 @@ const ButtonText = ({
1508
1482
  {
1509
1483
  tone: stylesForVariant.textTone,
1510
1484
  weight: "medium",
1485
+ align: "center",
1511
1486
  size: size2,
1512
- baseline: false,
1513
1487
  children: [
1514
1488
  icon && iconPosition === "leading" ? /* @__PURE__ */ jsx(
1515
1489
  AvoidWidowIcon,
@@ -1676,7 +1650,7 @@ const TooltipTextDefaultsProvider = ({
1676
1650
  }
1677
1651
  );
1678
1652
  };
1679
- const borderRadius$1 = "xlarge";
1653
+ const borderRadius$1 = "large";
1680
1654
  const TooltipContent = ({
1681
1655
  children,
1682
1656
  opacity,
@@ -1693,14 +1667,10 @@ const TooltipContent = ({
1693
1667
  Box,
1694
1668
  {
1695
1669
  boxShadow: "large",
1696
- background: "customDark",
1670
+ background: "neutral",
1697
1671
  borderRadius: borderRadius$1,
1698
- className: [
1699
- background,
1700
- maxWidth,
1701
- translateZ0,
1702
- padding$1
1703
- ],
1672
+ padding: "small",
1673
+ className: [maxWidth, translateZ0],
1704
1674
  children: /* @__PURE__ */ jsxs(TooltipTextDefaultsProvider, { children: [
1705
1675
  /* @__PURE__ */ jsx(Box, { position: "relative", zIndex: 1, children }),
1706
1676
  /* @__PURE__ */ jsx(
@@ -1708,7 +1678,8 @@ const TooltipContent = ({
1708
1678
  {
1709
1679
  ...arrowProps,
1710
1680
  borderRadius: borderRadius$1,
1711
- className: [arrow, background]
1681
+ background: "neutral",
1682
+ className: arrow
1712
1683
  }
1713
1684
  )
1714
1685
  ] })
@@ -2141,13 +2112,23 @@ const toneToIcon = {
2141
2112
  positive: IconPositive
2142
2113
  };
2143
2114
  const toastDuration = 1e4;
2144
- const borderRadius = "xlarge";
2115
+ const borderRadius = "large";
2145
2116
  const Action = ({ label, onClick, removeToast }) => {
2146
2117
  const handleClick = useCallback(() => {
2147
2118
  removeToast();
2148
2119
  onClick();
2149
2120
  }, [removeToast, onClick]);
2150
- return /* @__PURE__ */ jsx(Text, { baseline: false, children: /* @__PURE__ */ jsx(Box, { component: "span", paddingRight: "xsmall", "aria-hidden": true, children: /* @__PURE__ */ jsx(TextLinkButton, { onClick: handleClick, hitArea: "large", children: label }) }) });
2121
+ return /* @__PURE__ */ jsx(Text, { baseline: false, children: /* @__PURE__ */ jsx(Box, { component: "span", "aria-hidden": true, children: /* @__PURE__ */ jsx(TextLinkButton, { onClick: handleClick, hitArea: "large", children: label }) }) });
2122
+ };
2123
+ const ToastIcon = ({ tone: tone2, icon }) => {
2124
+ if (tone2 !== "neutral") {
2125
+ const Icon = toneToIcon[tone2];
2126
+ return /* @__PURE__ */ jsx(Icon, { tone: tone2 });
2127
+ }
2128
+ if (icon) {
2129
+ return cloneElement(icon, { tone: tone2 });
2130
+ }
2131
+ return null;
2151
2132
  };
2152
2133
  const Toast = React.forwardRef(
2153
2134
  ({
@@ -2179,7 +2160,6 @@ const Toast = React.forwardRef(
2179
2160
  remove();
2180
2161
  }
2181
2162
  }, [shouldRemove, remove, stopTimeout]);
2182
- const Icon = tone2 !== "neutral" ? toneToIcon[tone2] : void 0;
2183
2163
  assert(
2184
2164
  !icon || icon.props.size === void 0 && icon.props.tone === void 0,
2185
2165
  "Icons cannot set the 'size' or 'tone' prop when passed to a Toast component"
@@ -2189,11 +2169,11 @@ const Toast = React.forwardRef(
2189
2169
  `Icons cannot be customised on a Toast component using '${tone2}' tone`
2190
2170
  );
2191
2171
  const content = description ? /* @__PURE__ */ jsxs(Stack, { space: "xxsmall", children: [
2192
- /* @__PURE__ */ jsx(Text, { weight: "strong", baseline: false, children: message }),
2172
+ /* @__PURE__ */ jsx(Text, { weight: "medium", tone: tone2, baseline: false, children: message }),
2193
2173
  description ? /* @__PURE__ */ jsx(Text, { baseline: false, tone: "secondary", children: description }) : null,
2194
2174
  action ? /* @__PURE__ */ jsx(Action, { removeToast: remove, ...action }, action.label) : null
2195
2175
  ] }) : /* @__PURE__ */ jsxs(Inline, { space: "xxsmall", children: [
2196
- /* @__PURE__ */ jsx(Box, { paddingRight: "medium", children: /* @__PURE__ */ jsx(Text, { weight: "strong", baseline: false, children: message }) }),
2176
+ /* @__PURE__ */ jsx(Box, { paddingRight: "medium", children: /* @__PURE__ */ jsx(Text, { weight: "medium", tone: tone2, baseline: false, children: message }) }),
2197
2177
  action ? /* @__PURE__ */ jsx(Action, { removeToast: remove, ...action }, action.label) : null
2198
2178
  ] });
2199
2179
  return /* @__PURE__ */ jsx(
@@ -2207,50 +2187,43 @@ const Toast = React.forwardRef(
2207
2187
  onMouseLeave: startTimeout,
2208
2188
  className: vanillaTheme,
2209
2189
  ...buildDataAttributes({ data, validateRestProps: restProps }),
2210
- children: /* @__PURE__ */ jsx(Box, { boxShadow: "large", borderRadius, children: /* @__PURE__ */ jsx(ContentBlock, { width: "xsmall", children: /* @__PURE__ */ jsxs(
2190
+ children: /* @__PURE__ */ jsx(Box, { boxShadow: "large", borderRadius, children: /* @__PURE__ */ jsx(ContentBlock, { width: "xsmall", children: /* @__PURE__ */ jsx(
2211
2191
  Box,
2212
2192
  {
2213
- background: "surface",
2193
+ background: { lightMode: "surfaceDark", darkMode: "surface" },
2214
2194
  position: "relative",
2215
- boxShadow: "borderNeutralLight",
2216
2195
  borderRadius,
2217
2196
  paddingY: "medium",
2218
- paddingLeft: "medium",
2197
+ paddingX: "gutter",
2219
2198
  overflow: "hidden",
2220
2199
  className: toast,
2221
- children: [
2222
- /* @__PURE__ */ jsxs(Columns, { space: "none", children: [
2223
- /* @__PURE__ */ jsxs(Column, { width: "content", children: [
2224
- Icon ? /* @__PURE__ */ jsx(Box, { paddingRight: "small", children: /* @__PURE__ */ jsx(Icon, { tone: tone2 }) }) : null,
2225
- tone2 === "neutral" && icon ? /* @__PURE__ */ jsx(Box, { paddingRight: "small", children: cloneElement(icon, { tone: "secondary" }) }) : null
2226
- ] }),
2227
- /* @__PURE__ */ jsx(Column, { children: content }),
2228
- /* @__PURE__ */ jsx(Column, { width: "content", children: /* @__PURE__ */ jsx(
2229
- Box,
2230
- {
2231
- width: "touchable",
2232
- display: "flex",
2233
- justifyContent: "center",
2234
- alignItems: "center",
2235
- className: lineHeightContainer.standard,
2236
- "aria-hidden": true,
2237
- children: /* @__PURE__ */ jsx(
2238
- ButtonIcon,
2239
- {
2240
- id: `${dedupeKey}-clear`,
2241
- icon: /* @__PURE__ */ jsx(IconClear, {}),
2242
- tone: "secondary",
2243
- variant: "transparent",
2244
- onClick: remove,
2245
- label: closeLabel,
2246
- data: process.env.NODE_ENV !== "production" ? { testid: "clearToast" } : {}
2247
- }
2248
- )
2249
- }
2250
- ) })
2251
- ] }),
2252
- tone2 !== "neutral" ? /* @__PURE__ */ jsx(Keyline, { tone: tone2, borderRadius }) : null
2253
- ]
2200
+ children: /* @__PURE__ */ jsxs(Columns, { space: "none", children: [
2201
+ tone2 !== "neutral" || tone2 === "neutral" && icon ? /* @__PURE__ */ jsx(Column, { width: "content", children: /* @__PURE__ */ jsx(Box, { paddingRight: "small", children: /* @__PURE__ */ jsx(ToastIcon, { tone: tone2, icon }) }) }) : null,
2202
+ /* @__PURE__ */ jsx(Column, { children: content }),
2203
+ /* @__PURE__ */ jsx(Column, { width: "content", children: /* @__PURE__ */ jsx(
2204
+ Box,
2205
+ {
2206
+ width: "touchable",
2207
+ display: "flex",
2208
+ justifyContent: "flexEnd",
2209
+ alignItems: "center",
2210
+ className: lineHeightContainer.standard,
2211
+ "aria-hidden": true,
2212
+ children: /* @__PURE__ */ jsx(
2213
+ ButtonIcon,
2214
+ {
2215
+ id: `${dedupeKey}-clear`,
2216
+ icon: /* @__PURE__ */ jsx(IconClear, {}),
2217
+ tone: "secondary",
2218
+ variant: "transparent",
2219
+ onClick: remove,
2220
+ label: closeLabel,
2221
+ data: process.env.NODE_ENV !== "production" ? { testid: "clearToast" } : {}
2222
+ }
2223
+ )
2224
+ }
2225
+ ) })
2226
+ ] })
2254
2227
  }
2255
2228
  ) }) })
2256
2229
  }
@@ -2300,15 +2273,15 @@ const useFlipList = () => {
2300
2273
  Array.from(refs.entries()).forEach(([id, element]) => {
2301
2274
  if (element) {
2302
2275
  const prevTop = positions.get(id);
2303
- const { top, height } = element.getBoundingClientRect();
2304
- if (typeof prevTop === "number" && prevTop !== top) {
2276
+ const { top: top2, height } = element.getBoundingClientRect();
2277
+ if (typeof prevTop === "number" && prevTop !== top2) {
2305
2278
  animations.push({
2306
2279
  element,
2307
2280
  transition: entranceTransition,
2308
2281
  transforms: [
2309
2282
  {
2310
2283
  property: "transform",
2311
- from: `translateY(${prevTop - top}px)`
2284
+ from: `translateY(${prevTop - top2}px)`
2312
2285
  }
2313
2286
  ]
2314
2287
  });
@@ -2541,7 +2514,6 @@ export {
2541
2514
  IconPositive,
2542
2515
  IconRenderer,
2543
2516
  Inline,
2544
- Keyline,
2545
2517
  Overlay,
2546
2518
  PublicBox,
2547
2519
  Stack,