@common-origin/design-system 3.1.0 → 3.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 (66) hide show
  1. package/dist/client.js +1017 -713
  2. package/dist/client.js.map +1 -1
  3. package/dist/components/atoms/Badge/Badge.d.mts +2 -2
  4. package/dist/components/atoms/Badge/Badge.d.ts +2 -2
  5. package/dist/components/atoms/Badge/Badge.mjs +15 -9
  6. package/dist/components/atoms/Box/Box.d.mts +3 -2
  7. package/dist/components/atoms/Box/Box.d.ts +3 -2
  8. package/dist/components/atoms/Button/Button.mjs +1 -1
  9. package/dist/components/atoms/Chip/shared/ChipBase.mjs +1 -1
  10. package/dist/components/atoms/IconButton/IconButton.mjs +1 -1
  11. package/dist/components/atoms/ProgressBar/ProgressBar.d.mts +1 -1
  12. package/dist/components/atoms/ProgressBar/ProgressBar.d.ts +1 -1
  13. package/dist/components/atoms/Tag/Tag.d.mts +1 -1
  14. package/dist/components/atoms/Tag/Tag.d.ts +1 -1
  15. package/dist/components/atoms/Tooltip/Tooltip.d.mts +7 -1
  16. package/dist/components/atoms/Tooltip/Tooltip.d.ts +7 -1
  17. package/dist/components/atoms/Tooltip/Tooltip.mjs +18 -8
  18. package/dist/components/molecules/ActionSheet/ActionSheet.mjs +2 -2
  19. package/dist/components/molecules/Alert/Alert.mjs +1 -1
  20. package/dist/components/molecules/Checkbox/SelectableInputBase.mjs +1 -1
  21. package/dist/components/molecules/Dropdown/Dropdown.mjs +1 -1
  22. package/dist/components/molecules/List/ListItem.mjs +3 -3
  23. package/dist/components/molecules/Menu/Menu.d.mts +8 -1
  24. package/dist/components/molecules/Menu/Menu.d.ts +8 -1
  25. package/dist/components/molecules/Menu/Menu.mjs +12 -9
  26. package/dist/components/molecules/Modal/Modal.mjs +1 -1
  27. package/dist/components/molecules/NumberInput/NumberInput.mjs +2 -1
  28. package/dist/components/molecules/PasswordField/PasswordField.mjs +3 -2
  29. package/dist/components/molecules/SearchField/SearchField.mjs +3 -3
  30. package/dist/components/molecules/Sheet/Sheet.mjs +3 -3
  31. package/dist/components/molecules/SidebarNavItem/SidebarNavItem.d.mts +3 -2
  32. package/dist/components/molecules/SidebarNavItem/SidebarNavItem.d.ts +3 -2
  33. package/dist/components/molecules/SidebarNavItem/SidebarNavItem.mjs +128 -41
  34. package/dist/components/molecules/SidebarNavItem/sidebarNavMotion.d.mts +30 -0
  35. package/dist/components/molecules/SidebarNavItem/sidebarNavMotion.d.ts +30 -0
  36. package/dist/components/molecules/SidebarNavItem/sidebarNavMotion.mjs +69 -0
  37. package/dist/components/molecules/SidebarNavItem/sidebarNavMotion.mjs.map +1 -0
  38. package/dist/components/molecules/SidebarNavSection/SidebarNavSection.mjs +57 -43
  39. package/dist/components/molecules/TabBar/TabBar.mjs +3 -3
  40. package/dist/components/molecules/WorkspaceSwitcher/WorkspaceSwitcher.mjs +3 -1
  41. package/dist/components/organisms/SidebarNav/SidebarNav.mjs +173 -62
  42. package/dist/data.js +96 -59
  43. package/dist/data.js.map +1 -1
  44. package/dist/lib/styleUtils.d.mts +4 -0
  45. package/dist/lib/styleUtils.d.ts +4 -0
  46. package/dist/lib/styleUtils.mjs +5 -1
  47. package/dist/lib/styleUtils.mjs.map +1 -1
  48. package/dist/lib/tokenAliases.mjs +1 -0
  49. package/dist/lib/tokenAliases.mjs.map +1 -1
  50. package/dist/lib/useFloatingLayer.d.mts +8 -1
  51. package/dist/lib/useFloatingLayer.d.ts +8 -1
  52. package/dist/lib/useFloatingLayer.mjs +11 -2
  53. package/dist/lib/useFloatingLayer.mjs.map +1 -1
  54. package/dist/styles/tokens.d.mts +93 -24
  55. package/dist/styles/tokens.d.ts +93 -24
  56. package/dist/styles/tokens.json +96 -59
  57. package/dist/styles/tokens.json.mjs +96 -59
  58. package/dist/styles/tokens.json.mjs.map +1 -1
  59. package/dist/tokens/index.js +96 -59
  60. package/dist/tokens/index.js.map +1 -1
  61. package/dist/tokens/index.mjs +96 -59
  62. package/dist/tokens/index.mjs.map +1 -1
  63. package/dist/tokens/styles/tokens.d.mts +93 -24
  64. package/dist/tokens/styles/tokens.d.ts +93 -24
  65. package/dist/tokens.css +1105 -74
  66. package/package.json +3 -1
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  /**
3
- * Badge variants: `default`, the near-black count, and `accent`, the blue highlight (decision 0045).
3
+ * Badge variants: `default`, the count on the strongest neutral fill, and `accent`, the blue highlight (decision 0045).
4
4
  */
5
5
  export type BadgeVariant = 'default' | 'accent';
6
6
  export interface BadgeProps {
@@ -12,7 +12,7 @@ export interface BadgeProps {
12
12
  max?: number;
13
13
  /**
14
14
  * Visual variant of the badge. A badge means new or unread items (decision 0045): `accent` is
15
- * the blue highlight, and `default` the near-black count. A badge's colour alone can't carry a
15
+ * the blue highlight, and `default` the count on the strongest neutral fill. A badge's colour alone can't carry a
16
16
  * status, so a count of items with a status uses the status pattern instead ("3 failed" with
17
17
  * StatusLabel).
18
18
  * @default 'default'
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  /**
3
- * Badge variants: `default`, the near-black count, and `accent`, the blue highlight (decision 0045).
3
+ * Badge variants: `default`, the count on the strongest neutral fill, and `accent`, the blue highlight (decision 0045).
4
4
  */
5
5
  export type BadgeVariant = 'default' | 'accent';
6
6
  export interface BadgeProps {
@@ -12,7 +12,7 @@ export interface BadgeProps {
12
12
  max?: number;
13
13
  /**
14
14
  * Visual variant of the badge. A badge means new or unread items (decision 0045): `accent` is
15
- * the blue highlight, and `default` the near-black count. A badge's colour alone can't carry a
15
+ * the blue highlight, and `default` the count on the strongest neutral fill. A badge's colour alone can't carry a
16
16
  * status, so a count of items with a status uses the status pattern instead ("3 failed" with
17
17
  * StatusLabel).
18
18
  * @default 'default'
@@ -5,7 +5,6 @@ import styled$module, { keyframes } from 'styled-components';
5
5
  const styled = styled$module.default || styled$module;
6
6
  import { reducedMotion, forcedColors, visuallyHidden } from '../../../lib/styleUtils.mjs';
7
7
  import tokens from '../../../lib/cssTokens.mjs';
8
- import { Typography } from '../Typography/Typography.mjs';
9
8
 
10
9
  var semantic = tokens.semantic;
11
10
  var color = semantic.color;
@@ -25,7 +24,10 @@ var BadgeIndicator = /*#__PURE__*/styled.span.withConfig({
25
24
  },
26
25
  displayName: "Badge__BadgeIndicator",
27
26
  componentId: "sc-tjz4pp-1"
28
- })(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n position: absolute;\n top: 0;\n right: 0;\n transform: translate(50%, -50%);\n display: ", ";\n align-items: center;\n justify-content: center;\n min-width: ", ";\n height: ", ";\n padding: ", ";\n border-radius: ", ";\n line-height: ", ";\n white-space: nowrap;\n box-shadow: 0 0 0 ", " ", ";\n animation: ", " ", " ", ";\n\n ", " {\n animation: none;\n }\n\n /* Forced colours drop fills (decision 0038): a dot is only a fill, so it keeps one in the\n text colour; a count gets an edge around its number */\n ", "\n \n ", "\n"], ["\n position: absolute;\n top: 0;\n right: 0;\n transform: translate(50%, -50%);\n display: ", ";\n align-items: center;\n justify-content: center;\n min-width: ", ";\n height: ", ";\n padding: ", ";\n border-radius: ", ";\n line-height: ", ";\n white-space: nowrap;\n box-shadow: 0 0 0 ", " ", ";\n animation: ", " ", " ", ";\n\n ", " {\n animation: none;\n }\n\n /* Forced colours drop fills (decision 0038): a dot is only a fill, so it keeps one in the\n text colour; a count gets an edge around its number */\n ", "\n \n ", "\n"])), function (props) {
27
+ })(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n position: absolute;\n top: 0;\n right: 0;\n transform: translate(50%, -50%);\n display: ", ";\n align-items: center;\n justify-content: center;\n min-width: ", ";\n height: ", ";\n padding: ", ";\n border-radius: ", ";\n line-height: ", ";\n white-space: nowrap;\n box-shadow: 0 0 0 ", " ", ";\n animation: ", " ", " ", ";\n\n ", " {\n animation: none;\n }\n\n /* Forced colours drop fills (decision 0038): a dot is only a fill, so it keeps one in the\n text colour; a count gets an edge around its number */\n ", "\n \n ", "\n"], ["\n position: absolute;\n top: 0;\n right: 0;\n transform: translate(50%, -50%);\n display: ", ";\n align-items: center;\n justify-content: center;\n min-width: ", ";\n height: ", ";\n padding: ", ";\n border-radius: ", ";\n line-height: ", ";\n white-space: nowrap;\n box-shadow: 0 0 0 ", " ", ";\n animation: ", " ", " ", ";\n\n ", " {\n animation: none;\n }\n\n /* Forced colours drop fills (decision 0038): a dot is only a fill, so it keeps one in the\n text colour; a count gets an edge around its number */\n ", "\n \n ", "\n"
28
+ // The count takes the indicator's colour, so each variant's content colour reaches it: inverse on
29
+ // the strong fill, on-fill on the accent fill (decision 0056)
30
+ ])), function (props) {
29
31
  return props.$isVisible ? 'flex' : 'none';
30
32
  }, function (props) {
31
33
  return props.$isDot ? dot.size : count.minWidth;
@@ -38,15 +40,21 @@ var BadgeIndicator = /*#__PURE__*/styled.span.withConfig({
38
40
  }, function (props) {
39
41
  switch (props.$variant) {
40
42
  case 'accent':
41
- return "\n background-color: ".concat(color.fill.accent, ";\n color: ").concat(color.text.inverse, ";\n ");
43
+ return "\n background-color: ".concat(color.fill.accent, ";\n color: ").concat(color.text['on-fill'], ";\n ");
42
44
  default:
43
45
  return "\n background-color: ".concat(color.fill.emphasis, ";\n color: ").concat(color.text.inverse, ";\n ");
44
46
  }
45
47
  });
48
+ // The count takes the indicator's colour, so each variant's content colour reaches it: inverse on
49
+ // the strong fill, on-fill on the accent fill (decision 0056)
50
+ var Count = /*#__PURE__*/styled.span.withConfig({
51
+ displayName: "Badge__Count",
52
+ componentId: "sc-tjz4pp-2"
53
+ })(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n font: ", ";\n text-transform: uppercase;\n"], ["\n font: ", ";\n text-transform: uppercase;\n"])), semantic.typography.caption);
46
54
  var ScreenReaderOnly = /*#__PURE__*/styled.span.withConfig({
47
55
  displayName: "Badge__ScreenReaderOnly",
48
- componentId: "sc-tjz4pp-2"
49
- })(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), visuallyHidden);
56
+ componentId: "sc-tjz4pp-3"
57
+ })(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), visuallyHidden);
50
58
  var Badge = function Badge(_a) {
51
59
  var children = _a.children,
52
60
  _b = _a.count,
@@ -74,9 +82,7 @@ var Badge = function Badge(_a) {
74
82
  "$isVisible": isVisible,
75
83
  role: "status",
76
84
  "aria-live": "polite",
77
- children: [!dot && jsx(Typography, {
78
- variant: "caption",
79
- color: "inverse",
85
+ children: [!dot && jsx(Count, {
80
86
  children: displayCount
81
87
  }), jsx(ScreenReaderOnly, {
82
88
  children: label
@@ -84,7 +90,7 @@ var Badge = function Badge(_a) {
84
90
  })]
85
91
  });
86
92
  };
87
- var templateObject_1, templateObject_2, templateObject_3, templateObject_4;
93
+ var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5;
88
94
 
89
95
  export { Badge };
90
96
  //# sourceMappingURL=Badge.mjs.map
@@ -47,8 +47,9 @@ export interface BoxProps {
47
47
  borderBottom?: keyof Tokens['semantic']['color']['border'];
48
48
  borderLeft?: keyof Tokens['semantic']['color']['border'];
49
49
  /**
50
- * Background colour, as a semantic token path: `surface.base` (page), `surface.raised` (cards,
51
- * sheets), `surface.scrim`, or a `color.fill.*` fill such as `color.fill.muted`.
50
+ * Background colour, as a semantic token path: `surface.base` (page), `surface.raised` (cards),
51
+ * `surface.overlay` (floating layers such as menus and dialogs), `surface.scrim`, or a
52
+ * `color.fill.*` fill such as `color.fill.muted`.
52
53
  */
53
54
  bg?: BoxBackground;
54
55
  color?: keyof Tokens['semantic']['color']['text'];
@@ -47,8 +47,9 @@ export interface BoxProps {
47
47
  borderBottom?: keyof Tokens['semantic']['color']['border'];
48
48
  borderLeft?: keyof Tokens['semantic']['color']['border'];
49
49
  /**
50
- * Background colour, as a semantic token path: `surface.base` (page), `surface.raised` (cards,
51
- * sheets), `surface.scrim`, or a `color.fill.*` fill such as `color.fill.muted`.
50
+ * Background colour, as a semantic token path: `surface.base` (page), `surface.raised` (cards),
51
+ * `surface.overlay` (floating layers such as menus and dialogs), `surface.scrim`, or a
52
+ * `color.fill.*` fill such as `color.fill.muted`.
52
53
  */
53
54
  bg?: BoxBackground;
54
55
  color?: keyof Tokens['semantic']['color']['text'];
@@ -15,7 +15,7 @@ var button = tokens.component.button,
15
15
  var inset = semantic.space.inset;
16
16
  var control = semantic.size.control;
17
17
  // Base styles shared between button and link
18
- var baseButtonStyles = "\n box-sizing: border-box;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: ".concat(tokens.semantic.space[100], ";\n height: max-content;\n cursor: pointer;\n border: none;\n text-decoration: none;\n transition: ").concat(semantic.motion.transition.feedback, ";\n white-space: nowrap;\n user-select: none;\n \n &:focus {\n outline: ").concat(button.focus.outline, ";\n outline-offset: ").concat(semantic.border.focusOffset, ";\n }\n\n &:disabled {\n cursor: not-allowed;\n }\n\n ").concat(forcedColorsEdge, "\n");
18
+ var baseButtonStyles = "\n box-sizing: border-box;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: ".concat(tokens.semantic.space[100], ";\n height: max-content;\n cursor: pointer;\n border: none;\n text-decoration: none;\n transition: ").concat(semantic.motion.transition.feedback, ";\n white-space: nowrap;\n user-select: none;\n \n /* The system ring for keyboard focus only: a click doesn't leave it behind (P2, P5) */\n &:focus-visible {\n outline: ").concat(button.focus.outline, ";\n outline-offset: ").concat(semantic.border.focusOffset, ";\n }\n\n &:disabled {\n cursor: not-allowed;\n }\n\n ").concat(forcedColorsEdge, "\n");
19
19
  // Dynamic variant styles using component tokens
20
20
  var getVariantStyles = function getVariantStyles(_a) {
21
21
  var _b;
@@ -36,7 +36,7 @@ var CloseButton = /*#__PURE__*/styled.button.withConfig({
36
36
  },
37
37
  displayName: "ChipBase__CloseButton",
38
38
  componentId: "sc-moa6zc-2"
39
- })(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n display: inline-flex;\n align-items: center;\n justify-content: center;\n margin-left: ", ";\n background: transparent;\n border: none;\n position: relative;\n width: ", ";\n height: ", ";\n padding: ", ";\n\n /* The pointer target is at least 24 \xD7 24px (WCAG 2.5.8, decision 0039): an invisible hit area\n as tall as the chip, centred on the 20px button. It stays inside the chip and its padding, so\n it can't overlap another target. */\n &::before {\n content: '';\n position: absolute;\n top: 50%;\n left: 50%;\n width: ", ";\n height: ", ";\n transform: translate(-50%, -50%);\n }\n border-radius: ", ";\n cursor: ", ";\n color: inherit;\n transition: ", ";\n \n &:hover:not(:disabled) {\n background-color: ", ";\n }\n \n &:active:not(:disabled) {\n background-color: ", ";\n }\n \n &:disabled {\n color: ", ";\n }\n \n &:focus-visible {\n outline: ", ";\n outline-offset: ", ";\n border-radius: ", ";\n }\n"], ["\n display: inline-flex;\n align-items: center;\n justify-content: center;\n margin-left: ", ";\n background: transparent;\n border: none;\n position: relative;\n width: ", ";\n height: ", ";\n padding: ", ";\n\n /* The pointer target is at least 24 \xD7 24px (WCAG 2.5.8, decision 0039): an invisible hit area\n as tall as the chip, centred on the 20px button. It stays inside the chip and its padding, so\n it can't overlap another target. */\n &::before {\n content: '';\n position: absolute;\n top: 50%;\n left: 50%;\n width: ", ";\n height: ", ";\n transform: translate(-50%, -50%);\n }\n border-radius: ", ";\n cursor: ", ";\n color: inherit;\n transition: ", ";\n \n &:hover:not(:disabled) {\n background-color: ", ";\n }\n \n &:active:not(:disabled) {\n background-color: ", ";\n }\n \n &:disabled {\n color: ", ";\n }\n \n &:focus-visible {\n outline: ", ";\n outline-offset: ", ";\n border-radius: ", ";\n }\n"])), tokens.semantic.space[200], chip.closeButton.size, chip.closeButton.size, tokens.semantic.space[0], semantic.size.label.medium, semantic.size.label.medium, tokens.semantic.radius.xs, function (props) {
39
+ })(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n display: inline-flex;\n align-items: center;\n justify-content: center;\n margin-left: ", ";\n background: transparent;\n border: none;\n position: relative;\n width: ", ";\n height: ", ";\n padding: ", ";\n\n /* The pointer target is at least 24 \xD7 24px (WCAG 2.5.8, decision 0039): an invisible hit area\n as tall as the chip, centred on the 20px button. It stays inside the chip and its padding, so\n it can't overlap another target. */\n &::before {\n content: '';\n position: absolute;\n top: 50%;\n left: 50%;\n width: ", ";\n height: ", ";\n transform: translate(-50%, -50%);\n }\n border-radius: ", ";\n cursor: ", ";\n color: inherit;\n transition: ", ";\n \n &:hover:not(:disabled) {\n background-color: ", ";\n }\n \n &:active:not(:disabled) {\n background-color: ", ";\n }\n \n &:disabled {\n color: ", ";\n }\n \n &:focus-visible {\n outline: ", ";\n outline-offset: ", ";\n border-radius: ", ";\n }\n"], ["\n display: inline-flex;\n align-items: center;\n justify-content: center;\n margin-left: ", ";\n background: transparent;\n border: none;\n position: relative;\n width: ", ";\n height: ", ";\n padding: ", ";\n\n /* The pointer target is at least 24 \xD7 24px (WCAG 2.5.8, decision 0039): an invisible hit area\n as tall as the chip, centred on the 20px button. It stays inside the chip and its padding, so\n it can't overlap another target. */\n &::before {\n content: '';\n position: absolute;\n top: 50%;\n left: 50%;\n width: ", ";\n height: ", ";\n transform: translate(-50%, -50%);\n }\n border-radius: ", ";\n cursor: ", ";\n color: inherit;\n transition: ", ";\n \n &:hover:not(:disabled) {\n background-color: ", ";\n }\n \n &:active:not(:disabled) {\n background-color: ", ";\n }\n \n &:disabled {\n color: ", ";\n }\n \n &:focus-visible {\n outline: ", ";\n outline-offset: ", ";\n border-radius: ", ";\n }\n"])), tokens.semantic.space[200], chip.closeButton.size, chip.closeButton.size, tokens.semantic.space[0], semantic.size.label.medium, semantic.size.label.medium, tokens.semantic.radius.full, function (props) {
40
40
  return props.$disabled ? 'not-allowed' : 'pointer';
41
41
  }, semantic.motion.transition.feedback, tokens.semantic.color.fill['none-hover'], tokens.semantic.color.fill['none-pressed'], tokens.semantic.color.text.disabled, chip.focus.outline, semantic.border.focusOffset, chip["default"].borderRadius);
42
42
  var templateObject_1, templateObject_2, templateObject_3;
@@ -66,7 +66,7 @@ var IconButtonStyled = /*#__PURE__*/styled.button.withConfig({
66
66
  },
67
67
  displayName: "IconButton__IconButtonStyled",
68
68
  componentId: "sc-k8b14t-0"
69
- })(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n background-color: ", ";\n color: ", ";\n border: none;\n border-radius: ", ";\n transition: ", ";\n box-sizing: border-box;\n display: flex;\n justify-content: center;\n align-items: center;\n height: max-content;\n cursor: pointer;\n position: relative;\n\n min-width: ", ";\n min-height: ", ";\n padding: ", ";\n\n &:hover:not(:disabled) {\n background-color: ", ";\n }\n\n &:active:not(:disabled) {\n background-color: ", ";\n }\n\n &:focus {\n outline: ", ";\n outline-offset: ", ";\n }\n\n &:disabled {\n background-color: ", ";\n color: ", ";\n cursor: not-allowed;\n }\n\n ", "\n"], ["\n background-color: ", ";\n color: ", ";\n border: none;\n border-radius: ", ";\n transition: ", ";\n box-sizing: border-box;\n display: flex;\n justify-content: center;\n align-items: center;\n height: max-content;\n cursor: pointer;\n position: relative;\n\n min-width: ", ";\n min-height: ", ";\n padding: ", ";\n\n &:hover:not(:disabled) {\n background-color: ", ";\n }\n\n &:active:not(:disabled) {\n background-color: ", ";\n }\n\n &:focus {\n outline: ", ";\n outline-offset: ", ";\n }\n\n &:disabled {\n background-color: ", ";\n color: ", ";\n cursor: not-allowed;\n }\n\n ", "\n"])), function (_a) {
69
+ })(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n background-color: ", ";\n color: ", ";\n border: none;\n border-radius: ", ";\n transition: ", ";\n box-sizing: border-box;\n display: flex;\n justify-content: center;\n align-items: center;\n height: max-content;\n cursor: pointer;\n position: relative;\n\n min-width: ", ";\n min-height: ", ";\n padding: ", ";\n\n &:hover:not(:disabled) {\n background-color: ", ";\n }\n\n &:active:not(:disabled) {\n background-color: ", ";\n }\n\n /* The system ring for keyboard focus only: a click doesn't leave it behind (P2, P5) */\n &:focus-visible {\n outline: ", ";\n outline-offset: ", ";\n }\n\n &:disabled {\n background-color: ", ";\n color: ", ";\n cursor: not-allowed;\n }\n\n ", "\n"], ["\n background-color: ", ";\n color: ", ";\n border: none;\n border-radius: ", ";\n transition: ", ";\n box-sizing: border-box;\n display: flex;\n justify-content: center;\n align-items: center;\n height: max-content;\n cursor: pointer;\n position: relative;\n\n min-width: ", ";\n min-height: ", ";\n padding: ", ";\n\n &:hover:not(:disabled) {\n background-color: ", ";\n }\n\n &:active:not(:disabled) {\n background-color: ", ";\n }\n\n /* The system ring for keyboard focus only: a click doesn't leave it behind (P2, P5) */\n &:focus-visible {\n outline: ", ";\n outline-offset: ", ";\n }\n\n &:disabled {\n background-color: ", ";\n color: ", ";\n cursor: not-allowed;\n }\n\n ", "\n"])), function (_a) {
70
70
  var $variant = _a.$variant;
71
71
  return colours($variant).bg;
72
72
  }, function (_a) {
@@ -4,7 +4,7 @@ export interface ProgressBarProps {
4
4
  value: number;
5
5
  /** Orientation of the progress bar */
6
6
  variant?: 'horizontal' | 'vertical';
7
- /** Fill colour: `default` is near-black (`background.emphasis`); `success` and `error` use their status colours */
7
+ /** Fill colour: `default` is the strongest neutral fill (`color.fill.emphasis`: near-black in light, near-white in dark); `success` and `error` use their status colours */
8
8
  color?: 'success' | 'error' | 'default';
9
9
  /** Height size for horizontal progress bar (default: md) */
10
10
  height?: 'sm' | 'md' | 'lg' | 'xl';
@@ -4,7 +4,7 @@ export interface ProgressBarProps {
4
4
  value: number;
5
5
  /** Orientation of the progress bar */
6
6
  variant?: 'horizontal' | 'vertical';
7
- /** Fill colour: `default` is near-black (`background.emphasis`); `success` and `error` use their status colours */
7
+ /** Fill colour: `default` is the strongest neutral fill (`color.fill.emphasis`: near-black in light, near-white in dark); `success` and `error` use their status colours */
8
8
  color?: 'success' | 'error' | 'default';
9
9
  /** Height size for horizontal progress bar (default: md) */
10
10
  height?: 'sm' | 'md' | 'lg' | 'xl';
@@ -5,7 +5,7 @@ export interface TagProps {
5
5
  */
6
6
  children: React.ReactNode;
7
7
  /**
8
- * Visual variant. Tag is neutral metadata: use `default`, or `emphasis` (near-black) to make a
8
+ * Visual variant. Tag is neutral metadata: use `default`, or `emphasis` (the strongest neutral fill) to make a
9
9
  * tag stand out. For a status, use `StatusLabel` (decision 0029).
10
10
  * @default 'default'
11
11
  */
@@ -5,7 +5,7 @@ export interface TagProps {
5
5
  */
6
6
  children: React.ReactNode;
7
7
  /**
8
- * Visual variant. Tag is neutral metadata: use `default`, or `emphasis` (near-black) to make a
8
+ * Visual variant. Tag is neutral metadata: use `default`, or `emphasis` (the strongest neutral fill) to make a
9
9
  * tag stand out. For a status, use `StatusLabel` (decision 0029).
10
10
  * @default 'default'
11
11
  */
@@ -23,6 +23,12 @@ export interface TooltipProps {
23
23
  * @default 'center'
24
24
  */
25
25
  align?: TooltipAlign;
26
+ /**
27
+ * Turns the tooltip off while keeping the trigger where it is, such as when the label it repeats
28
+ * is visible. Changing it never remounts the trigger.
29
+ * @default false
30
+ */
31
+ disabled?: boolean;
26
32
  /** One focusable element: the trigger */
27
33
  children: React.ReactElement;
28
34
  /** Test identifier for the tooltip bubble */
@@ -36,6 +42,6 @@ export interface TooltipProps {
36
42
  * blur, scroll and Escape. Doesn't open on touch.
37
43
  */
38
44
  export declare const Tooltip: {
39
- ({ text, kind, side, align, children, "data-testid": dataTestId, }: TooltipProps): import("react/jsx-runtime").JSX.Element;
45
+ ({ text, kind, side, align, disabled, children, "data-testid": dataTestId, }: TooltipProps): import("react/jsx-runtime").JSX.Element;
40
46
  displayName: string;
41
47
  };
@@ -23,6 +23,12 @@ export interface TooltipProps {
23
23
  * @default 'center'
24
24
  */
25
25
  align?: TooltipAlign;
26
+ /**
27
+ * Turns the tooltip off while keeping the trigger where it is, such as when the label it repeats
28
+ * is visible. Changing it never remounts the trigger.
29
+ * @default false
30
+ */
31
+ disabled?: boolean;
26
32
  /** One focusable element: the trigger */
27
33
  children: React.ReactElement;
28
34
  /** Test identifier for the tooltip bubble */
@@ -36,6 +42,6 @@ export interface TooltipProps {
36
42
  * blur, scroll and Escape. Doesn't open on touch.
37
43
  */
38
44
  export declare const Tooltip: {
39
- ({ text, kind, side, align, children, "data-testid": dataTestId, }: TooltipProps): import("react/jsx-runtime").JSX.Element;
45
+ ({ text, kind, side, align, disabled, children, "data-testid": dataTestId, }: TooltipProps): import("react/jsx-runtime").JSX.Element;
40
46
  displayName: string;
41
47
  };
@@ -70,6 +70,8 @@ var Tooltip = function Tooltip(_a) {
70
70
  side = _c === void 0 ? 'top' : _c,
71
71
  _d = _a.align,
72
72
  align = _d === void 0 ? 'center' : _d,
73
+ _e = _a.disabled,
74
+ disabled = _e === void 0 ? false : _e,
73
75
  children = _a.children,
74
76
  dataTestId = _a["data-testid"];
75
77
  var descriptionId = useId();
@@ -82,12 +84,20 @@ var Tooltip = function Tooltip(_a) {
82
84
  })[0];
83
85
  // Set by a press, so the focus that follows a click or tap doesn't reopen the tooltip
84
86
  var pressed = useRef(false);
85
- var _e = useState(false),
86
- isOpen = _e[0],
87
- setIsOpen = _e[1];
88
- var _f = usePresence(isOpen),
89
- isPresent = _f.isPresent,
90
- isExiting = _f.isExiting;
87
+ var _f = useState(false),
88
+ isOpen = _f[0],
89
+ setIsOpen = _f[1];
90
+ // Turned off while showing (its label became visible): close it on the same render
91
+ var _g = useState(disabled),
92
+ wasDisabled = _g[0],
93
+ setWasDisabled = _g[1];
94
+ if (wasDisabled !== disabled) {
95
+ setWasDisabled(disabled);
96
+ if (disabled) setIsOpen(false);
97
+ }
98
+ var _h = usePresence(isOpen),
99
+ isPresent = _h.isPresent,
100
+ isExiting = _h.isExiting;
91
101
  var clearTimers = function clearTimers() {
92
102
  clearTimeout(openTimer.current);
93
103
  clearTimeout(closeTimer.current);
@@ -111,7 +121,7 @@ var Tooltip = function Tooltip(_a) {
111
121
  }, [owner, close]);
112
122
  var scheduleOpen = function scheduleOpen() {
113
123
  clearTimeout(closeTimer.current);
114
- if (isOpen) return;
124
+ if (isOpen || disabled) return;
115
125
  // Moving straight from one trigger to the next (another tooltip still open) or just after one
116
126
  // closed skips the delay, so a rail feels immediate
117
127
  if (active || Date.now() - lastClosedAt < SKIP_DELAY_MS) return open();
@@ -168,7 +178,7 @@ var Tooltip = function Tooltip(_a) {
168
178
  pressed.current = false;
169
179
  return;
170
180
  }
171
- if (isKeyboardFocus(event.target)) open();
181
+ if (!disabled && isKeyboardFocus(event.target)) open();
172
182
  },
173
183
  onBlur: function onBlur() {
174
184
  // A press on an already focused trigger has no focus to skip; don't carry it over
@@ -32,7 +32,7 @@ var StyledOverlay = /*#__PURE__*/styled.div.withConfig({
32
32
  var StyledActionSheet = /*#__PURE__*/styled.div.withConfig({
33
33
  displayName: "ActionSheet__StyledActionSheet",
34
34
  componentId: "sc-regbol-1"
35
- })(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n position: fixed;\n bottom: 0;\n left: 0;\n right: 0;\n background-color: ", ";\n border-top-left-radius: ", ";\n border-top-right-radius: ", ";\n box-shadow: ", ";\n max-height: 90vh;\n overflow-y: auto;\n z-index: ", ";\n animation: ", " ", " ", "", ";\n\n ", " {\n animation: ", " ", " ", "", ";\n }\n\n"], ["\n position: fixed;\n bottom: 0;\n left: 0;\n right: 0;\n background-color: ", ";\n border-top-left-radius: ", ";\n border-top-right-radius: ", ";\n box-shadow: ", ";\n max-height: 90vh;\n overflow-y: auto;\n z-index: ", ";\n animation: ", " ", " ", "", ";\n\n ", " {\n animation: ", " ", " ", "", ";\n }\n\n"])), tokens.semantic.surface.raised, tokens.semantic.radius.lg, tokens.semantic.radius.lg, elevation.overlay, tokens.semantic.layer.modal, slideUp, motion.duration.slow, motion.easing.decelerate, function (_a) {
35
+ })(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n position: fixed;\n bottom: 0;\n left: 0;\n right: 0;\n background-color: ", ";\n border-top-left-radius: ", ";\n border-top-right-radius: ", ";\n box-shadow: ", ";\n max-height: 90vh;\n overflow-y: auto;\n z-index: ", ";\n animation: ", " ", " ", "", ";\n\n ", " {\n animation: ", " ", " ", "", ";\n }\n\n"], ["\n position: fixed;\n bottom: 0;\n left: 0;\n right: 0;\n background-color: ", ";\n border-top-left-radius: ", ";\n border-top-right-radius: ", ";\n box-shadow: ", ";\n max-height: 90vh;\n overflow-y: auto;\n z-index: ", ";\n animation: ", " ", " ", "", ";\n\n ", " {\n animation: ", " ", " ", "", ";\n }\n\n"])), tokens.semantic.surface.overlay, tokens.component.overlay.borderRadius, tokens.component.overlay.borderRadius, elevation.overlay, tokens.semantic.layer.modal, slideUp, motion.duration.slow, motion.easing.decelerate, function (_a) {
36
36
  var $isExiting = _a.$isExiting;
37
37
  return $isExiting && exitAnimation;
38
38
  }, reducedMotion, fadeIn, motion.duration.slow, motion.easing.decelerate, function (_a) {
@@ -50,7 +50,7 @@ var StyledHeaderContent = /*#__PURE__*/styled.div.withConfig({
50
50
  var StyledCloseButton = /*#__PURE__*/styled.button.withConfig({
51
51
  displayName: "ActionSheet__StyledCloseButton",
52
52
  componentId: "sc-regbol-4"
53
- })(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: center;\n padding: ", ";\n border: none;\n background: transparent;\n color: ", ";\n cursor: pointer;\n border-radius: ", ";\n transition: ", ";\n margin-left: ", ";\n \n &:hover {\n color: ", ";\n background-color: ", ";\n }\n \n &:focus-visible {\n outline: ", ";\n outline-offset: ", ";\n }\n"], ["\n display: flex;\n align-items: center;\n justify-content: center;\n padding: ", ";\n border: none;\n background: transparent;\n color: ", ";\n cursor: pointer;\n border-radius: ", ";\n transition: ", ";\n margin-left: ", ";\n \n &:hover {\n color: ", ";\n background-color: ", ";\n }\n \n &:focus-visible {\n outline: ", ";\n outline-offset: ", ";\n }\n"])), space[200], color.icon.muted, tokens.semantic.radius.sm, motion.transition.feedback, space[200], color.icon["default"], color.fill.muted, border.focus, border.focusOffset);
53
+ })(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: center;\n padding: ", ";\n border: none;\n background: transparent;\n color: ", ";\n cursor: pointer;\n border-radius: ", ";\n transition: ", ";\n margin-left: ", ";\n \n &:hover {\n color: ", ";\n background-color: ", ";\n }\n \n &:focus-visible {\n outline: ", ";\n outline-offset: ", ";\n }\n"], ["\n display: flex;\n align-items: center;\n justify-content: center;\n padding: ", ";\n border: none;\n background: transparent;\n color: ", ";\n cursor: pointer;\n border-radius: ", ";\n transition: ", ";\n margin-left: ", ";\n \n &:hover {\n color: ", ";\n background-color: ", ";\n }\n \n &:focus-visible {\n outline: ", ";\n outline-offset: ", ";\n }\n"])), space[200], color.icon.muted, tokens.semantic.radius.md, motion.transition.feedback, space[200], color.icon["default"], color.fill.muted, border.focus, border.focusOffset);
54
54
  var StyledActionsList = /*#__PURE__*/styled.ul.withConfig({
55
55
  displayName: "ActionSheet__StyledActionsList",
56
56
  componentId: "sc-regbol-5"
@@ -62,7 +62,7 @@ var StyledAlert = /*#__PURE__*/styled.div.withConfig({
62
62
  },
63
63
  displayName: "Alert__StyledAlert",
64
64
  componentId: "sc-18tq5d-0"
65
- })(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n display: flex;\n /* Items start at the top, so the icon and dismiss button line up with the first line */\n align-items: flex-start;\n gap: ", ";\n padding: ", ";\n border-radius: ", ";\n border: ", " solid;\n position: relative;\n width: 100%;\n \n /* Severity \xD7 appearance colours from Alert's component tokens (decision 0019). Borderless\n keeps a transparent border, so both appearances take the same space. */\n background-color: ", ";\n color: ", ";\n border-color: ", ";\n \n /* Responsive adjustments */\n @media (min-width: ", ") {\n padding: ", ";\n }\n\n /* The exit is chosen once, when dismissed (not by a media query), so a reduced-motion\n preference that changes mid-exit can't swap animations and flash the faded alert back.\n Reduced motion: fade only; the space closes instantly afterwards. */\n ", "\n"], ["\n display: flex;\n /* Items start at the top, so the icon and dismiss button line up with the first line */\n align-items: flex-start;\n gap: ", ";\n padding: ", ";\n border-radius: ", ";\n border: ", " solid;\n position: relative;\n width: 100%;\n \n /* Severity \xD7 appearance colours from Alert's component tokens (decision 0019). Borderless\n keeps a transparent border, so both appearances take the same space. */\n background-color: ", ";\n color: ", ";\n border-color: ", ";\n \n /* Responsive adjustments */\n @media (min-width: ", ") {\n padding: ", ";\n }\n\n /* The exit is chosen once, when dismissed (not by a media query), so a reduced-motion\n preference that changes mid-exit can't swap animations and flash the faded alert back.\n Reduced motion: fade only; the space closes instantly afterwards. */\n ", "\n"])), semantic.space[300], semantic.space[300], semantic.radius.sm, semantic.border.width.thin, function (_a) {
65
+ })(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n display: flex;\n /* Items start at the top, so the icon and dismiss button line up with the first line */\n align-items: flex-start;\n gap: ", ";\n padding: ", ";\n border-radius: ", ";\n border: ", " solid;\n position: relative;\n width: 100%;\n \n /* Severity \xD7 appearance colours from Alert's component tokens (decision 0019). Borderless\n keeps a transparent border, so both appearances take the same space. */\n background-color: ", ";\n color: ", ";\n border-color: ", ";\n \n /* Responsive adjustments */\n @media (min-width: ", ") {\n padding: ", ";\n }\n\n /* The exit is chosen once, when dismissed (not by a media query), so a reduced-motion\n preference that changes mid-exit can't swap animations and flash the faded alert back.\n Reduced motion: fade only; the space closes instantly afterwards. */\n ", "\n"], ["\n display: flex;\n /* Items start at the top, so the icon and dismiss button line up with the first line */\n align-items: flex-start;\n gap: ", ";\n padding: ", ";\n border-radius: ", ";\n border: ", " solid;\n position: relative;\n width: 100%;\n \n /* Severity \xD7 appearance colours from Alert's component tokens (decision 0019). Borderless\n keeps a transparent border, so both appearances take the same space. */\n background-color: ", ";\n color: ", ";\n border-color: ", ";\n \n /* Responsive adjustments */\n @media (min-width: ", ") {\n padding: ", ";\n }\n\n /* The exit is chosen once, when dismissed (not by a media query), so a reduced-motion\n preference that changes mid-exit can't swap animations and flash the faded alert back.\n Reduced motion: fade only; the space closes instantly afterwards. */\n ", "\n"])), semantic.space[300], semantic.space[300], semantic.radius.lg, semantic.border.width.thin, function (_a) {
66
66
  var _b = _a.$variant,
67
67
  $variant = _b === void 0 ? 'info' : _b;
68
68
  return alert.severity[$variant].background;
@@ -36,7 +36,7 @@ var StyledCheckbox = /*#__PURE__*/styled.span.withConfig({
36
36
  /**
37
37
  * Container for checkbox with proper spacing and alignment
38
38
  * 48px min-height for touch target (8px grid aligned)
39
- */])), tokens.component.checkbox.box.size, tokens.component.checkbox.box.size, tokens.component.checkbox.box.size, tokens.component.checkbox.box.size, tokens.component.input["default"].borderRadius, tokens.component.input["default"].borderWidth, function (props) {
39
+ */])), tokens.component.checkbox.box.size, tokens.component.checkbox.box.size, tokens.component.checkbox.box.size, tokens.component.checkbox.box.size, tokens.component.checkbox.box.borderRadius, tokens.component.input["default"].borderWidth, function (props) {
40
40
  return props.$checked || props.$indeterminate ? tokens.semantic.color.fill.inverse : tokens.component.input["default"].backgroundColor;
41
41
  }, function (props) {
42
42
  if (props.$state === 'error') return tokens.component.input.error.borderColor;
@@ -66,7 +66,7 @@ var DropdownMenu = /*#__PURE__*/styled.div.withConfig({
66
66
  },
67
67
  displayName: "Dropdown__DropdownMenu",
68
68
  componentId: "sc-kz07c4-3"
69
- })(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n position: absolute;\n top: 100%;\n left: 0;\n right: 0;\n z-index: ", ";\n background-color: ", ";\n /* A decorative outline: elevation separates the menu, and only the trigger is a control edge (decision 0025) */\n border: ", ";\n border-radius: ", ";\n box-shadow: ", ";\n margin-top: ", ";\n overflow: hidden;\n opacity: ", ";\n visibility: ", ";\n transform: ", ";\n transition: opacity ", " ", ",\n visibility ", " ", ",\n transform ", " ", ";\n max-height: ", ";\n overflow-y: auto;\n\n ", " {\n transform: none;\n }\n"], ["\n position: absolute;\n top: 100%;\n left: 0;\n right: 0;\n z-index: ", ";\n background-color: ", ";\n /* A decorative outline: elevation separates the menu, and only the trigger is a control edge (decision 0025) */\n border: ", ";\n border-radius: ", ";\n box-shadow: ", ";\n margin-top: ", ";\n overflow: hidden;\n opacity: ", ";\n visibility: ", ";\n transform: ", ";\n transition: opacity ", " ", ",\n visibility ", " ", ",\n transform ", " ", ";\n max-height: ", ";\n overflow-y: auto;\n\n ", " {\n transform: none;\n }\n"])), tokens.semantic.layer.dropdown, input["default"].backgroundColor, border["default"], input["default"].borderRadius, elevation.floating, space[100], function (_a) {
69
+ })(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n position: absolute;\n top: 100%;\n left: 0;\n right: 0;\n z-index: ", ";\n /* A floating layer: one step above raised content in the dark theme (issue 356) */\n background-color: ", ";\n /* A decorative outline: elevation separates the menu, and only the trigger is a control edge (decision 0025) */\n border: ", ";\n /* The panel radius Menu and SearchField share, not the control token (decision 0055) */\n border-radius: ", ";\n box-shadow: ", ";\n margin-top: ", ";\n overflow: hidden;\n opacity: ", ";\n visibility: ", ";\n transform: ", ";\n transition: opacity ", " ", ",\n visibility ", " ", ",\n transform ", " ", ";\n max-height: ", ";\n overflow-y: auto;\n\n ", " {\n transform: none;\n }\n"], ["\n position: absolute;\n top: 100%;\n left: 0;\n right: 0;\n z-index: ", ";\n /* A floating layer: one step above raised content in the dark theme (issue 356) */\n background-color: ", ";\n /* A decorative outline: elevation separates the menu, and only the trigger is a control edge (decision 0025) */\n border: ", ";\n /* The panel radius Menu and SearchField share, not the control token (decision 0055) */\n border-radius: ", ";\n box-shadow: ", ";\n margin-top: ", ";\n overflow: hidden;\n opacity: ", ";\n visibility: ", ";\n transform: ", ";\n transition: opacity ", " ", ",\n visibility ", " ", ",\n transform ", " ", ";\n max-height: ", ";\n overflow-y: auto;\n\n ", " {\n transform: none;\n }\n"])), tokens.semantic.layer.dropdown, tokens.semantic.surface.overlay, border["default"], tokens.semantic.radius.md, elevation.floating, space[100], function (_a) {
70
70
  var $isOpen = _a.$isOpen;
71
71
  return $isOpen ? 1 : 0;
72
72
  }, function (_a) {
@@ -7,7 +7,7 @@ const styled = styled$module.default || styled$module;
7
7
  import tokens from '../../../lib/cssTokens.mjs';
8
8
  import { Icon } from '../../atoms/Icon/Icon.mjs';
9
9
  import { Typography } from '../../atoms/Typography/Typography.mjs';
10
- import { interactiveRow, reducedMotion } from '../../../lib/styleUtils.mjs';
10
+ import { rowRadius, interactiveRow, reducedMotion } from '../../../lib/styleUtils.mjs';
11
11
  import { ListSpacingContext } from './ListContext.mjs';
12
12
 
13
13
  var semantic = tokens.semantic;
@@ -40,7 +40,7 @@ var StyledItemContent = /*#__PURE__*/styled.div.withConfig({
40
40
  })(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: flex;\n align-items: flex-start;\n gap: ", ";\n /* Insets, so the row's padding follows density with its height (decision 0051) */\n padding: ", ";\n border-radius: ", ";\n transition: background-color ", " ", ", color ", " ", ";\n cursor: ", ";\n \n /* The shared row states (decision 0030). Only interactive, enabled rows respond to hover and\n press; the primary text is Typography, so the row colours it through a selector */\n ", "\n \n /* Focus visible */\n &:focus-visible {\n outline: ", ";\n outline-offset: ", ";\n }\n"], ["\n display: flex;\n align-items: flex-start;\n gap: ", ";\n /* Insets, so the row's padding follows density with its height (decision 0051) */\n padding: ", ";\n border-radius: ", ";\n transition: background-color ", " ", ", color ", " ", ";\n cursor: ", ";\n \n /* The shared row states (decision 0030). Only interactive, enabled rows respond to hover and\n press; the primary text is Typography, so the row colours it through a selector */\n ", "\n \n /* Focus visible */\n &:focus-visible {\n outline: ", ";\n outline-offset: ", ";\n }\n"])), semantic.space[300], function (_a) {
41
41
  var $spacing = _a.$spacing;
42
42
  return $spacing === 'compact' ? "".concat(semantic.space.inset.sm, " ").concat(semantic.space.inset.md) : "".concat(semantic.space.inset.md, " ").concat(semantic.space.inset.lg);
43
- }, semantic.radius.sm, duration.fast, easing.decelerate, duration.fast, easing.decelerate, function (_a) {
43
+ }, rowRadius, duration.fast, easing.decelerate, duration.fast, easing.decelerate, function (_a) {
44
44
  var $interactive = _a.$interactive,
45
45
  $disabled = _a.$disabled;
46
46
  if ($disabled) return 'not-allowed';
@@ -96,7 +96,7 @@ var StyledExpandedContent = /*#__PURE__*/styled.div.withConfig({
96
96
  }, reducedMotion, duration.moderate, easing.decelerate, duration.moderate, easing.decelerate, function (_a) {
97
97
  var $expanded = _a.$expanded,
98
98
  $spacing = _a.$spacing;
99
- return $expanded && "\n padding: ".concat($spacing === 'compact' ? "".concat(semantic.space[200], " ").concat(semantic.space[300], " ").concat(semantic.space[200], " ").concat(tokens.component.listItem.expandedIndent.compact) : "".concat(semantic.space[200], " ").concat(semantic.space[400], " ").concat(semantic.space[300], " ").concat(tokens.component.listItem.expandedIndent.comfortable), ";\n background-color: ").concat(semantic.surface.raised, ";\n border-radius: ").concat(semantic.radius.sm, ";\n /* The row's own insets, so the panel lines up with the row in every density (0051) */\n margin: 0 ").concat($spacing === 'compact' ? semantic.space.inset.md : semantic.space.inset.lg, " ").concat($spacing === 'compact' ? semantic.space.inset.sm : semantic.space.inset.md, ";\n ");
99
+ return $expanded && "\n padding: ".concat($spacing === 'compact' ? "".concat(semantic.space[200], " ").concat(semantic.space[300], " ").concat(semantic.space[200], " ").concat(tokens.component.listItem.expandedIndent.compact) : "".concat(semantic.space[200], " ").concat(semantic.space[400], " ").concat(semantic.space[300], " ").concat(tokens.component.listItem.expandedIndent.comfortable), ";\n background-color: ").concat(semantic.surface.raised, ";\n border-radius: ").concat(rowRadius, ";\n /* The row's own insets, so the panel lines up with the row in every density (0051) */\n margin: 0 ").concat($spacing === 'compact' ? semantic.space.inset.md : semantic.space.inset.lg, " ").concat($spacing === 'compact' ? semantic.space.inset.sm : semantic.space.inset.md, ";\n ");
100
100
  });
101
101
  var ListItem = function ListItem(_a) {
102
102
  var primary = _a.primary,
@@ -29,6 +29,13 @@ export interface MenuProps {
29
29
  * @default 'start'
30
30
  */
31
31
  align?: MenuAlign;
32
+ /**
33
+ * Makes the menu at least as wide as its trigger, for a full-width trigger such as
34
+ * WorkspaceSwitcher's, so the two line up. It still grows with its content, up to the usual
35
+ * maximum, and never goes below the usual minimum for a small trigger.
36
+ * @default false
37
+ */
38
+ matchTriggerWidth?: boolean;
32
39
  /** Test identifier for the menu */
33
40
  'data-testid'?: string;
34
41
  }
@@ -37,7 +44,7 @@ export interface MenuProps {
37
44
  * button pattern. Not a select: for choosing a form value, use Dropdown.
38
45
  */
39
46
  export declare const Menu: {
40
- ({ trigger, children, open: openProp, defaultOpen, onOpenChange, side, align, "data-testid": dataTestId, }: MenuProps): import("react/jsx-runtime").JSX.Element;
47
+ ({ trigger, children, open: openProp, defaultOpen, onOpenChange, side, align, matchTriggerWidth, "data-testid": dataTestId, }: MenuProps): import("react/jsx-runtime").JSX.Element;
41
48
  displayName: string;
42
49
  };
43
50
  interface ItemBaseProps {
@@ -29,6 +29,13 @@ export interface MenuProps {
29
29
  * @default 'start'
30
30
  */
31
31
  align?: MenuAlign;
32
+ /**
33
+ * Makes the menu at least as wide as its trigger, for a full-width trigger such as
34
+ * WorkspaceSwitcher's, so the two line up. It still grows with its content, up to the usual
35
+ * maximum, and never goes below the usual minimum for a small trigger.
36
+ * @default false
37
+ */
38
+ matchTriggerWidth?: boolean;
32
39
  /** Test identifier for the menu */
33
40
  'data-testid'?: string;
34
41
  }
@@ -37,7 +44,7 @@ export interface MenuProps {
37
44
  * button pattern. Not a select: for choosing a form value, use Dropdown.
38
45
  */
39
46
  export declare const Menu: {
40
- ({ trigger, children, open: openProp, defaultOpen, onOpenChange, side, align, "data-testid": dataTestId, }: MenuProps): import("react/jsx-runtime").JSX.Element;
47
+ ({ trigger, children, open: openProp, defaultOpen, onOpenChange, side, align, matchTriggerWidth, "data-testid": dataTestId, }: MenuProps): import("react/jsx-runtime").JSX.Element;
41
48
  displayName: string;
42
49
  };
43
50
  interface ItemBaseProps {
@@ -8,7 +8,7 @@ import tokens from '../../../lib/cssTokens.mjs';
8
8
  import { exitAnimation, reducedMotion, forcedColorsEdge, interactiveRow } from '../../../lib/styleUtils.mjs';
9
9
  import { usePresence } from '../../../lib/usePresence.mjs';
10
10
  import { laidOutElement } from '../../../lib/floatingPosition.mjs';
11
- import { useIsomorphicLayoutEffect, useFloatingLayer } from '../../../lib/useFloatingLayer.mjs';
11
+ import { ANCHOR_WIDTH_VAR, useIsomorphicLayoutEffect, useFloatingLayer } from '../../../lib/useFloatingLayer.mjs';
12
12
  import { Icon } from '../../atoms/Icon/Icon.mjs';
13
13
 
14
14
  var semantic = tokens.semantic;
@@ -42,9 +42,9 @@ var Panel = /*#__PURE__*/styled.div.withConfig({
42
42
  },
43
43
  displayName: "Menu__Panel",
44
44
  componentId: "sc-13mple2-0"
45
- })(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n position: fixed;\n inset: auto;\n top: 0;\n left: 0;\n margin: 0;\n box-sizing: border-box;\n min-width: ", ";\n max-width: ", ";\n max-height: ", ";\n overflow-y: auto;\n padding: ", " 0;\n background-color: ", ";\n color: ", ";\n border: ", ";\n border-radius: ", ";\n box-shadow: ", ";\n animation: ", " ", " ", "\n ", ";\n\n ", " {\n animation: ", " ", " ", "\n ", ";\n }\n\n ", "\n\n &:focus {\n outline: none;\n }\n"], ["\n position: fixed;\n inset: auto;\n top: 0;\n left: 0;\n margin: 0;\n box-sizing: border-box;\n min-width: ", ";\n max-width: ", ";\n max-height: ", ";\n overflow-y: auto;\n padding: ", " 0;\n background-color: ", ";\n color: ", ";\n border: ", ";\n border-radius: ", ";\n box-shadow: ", ";\n animation: ", " ", " ", "\n ", ";\n\n ", " {\n animation: ", " ", " ", "\n ", ";\n }\n\n ", "\n\n &:focus {\n outline: none;\n }\n"
45
+ })(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n position: fixed;\n inset: auto;\n top: 0;\n left: 0;\n margin: 0;\n box-sizing: border-box;\n /* At least the trigger's width when matchTriggerWidth sets the variable, within the usual range */\n min-width: min(max(", ", var(", ", 0px)), ", ");\n max-width: ", ";\n max-height: ", ";\n overflow-y: auto;\n padding: ", " 0;\n background-color: ", ";\n color: ", ";\n border: ", ";\n border-radius: ", ";\n box-shadow: ", ";\n animation: ", " ", " ", "\n ", ";\n\n ", " {\n animation: ", " ", " ", "\n ", ";\n }\n\n ", "\n\n &:focus {\n outline: none;\n }\n"], ["\n position: fixed;\n inset: auto;\n top: 0;\n left: 0;\n margin: 0;\n box-sizing: border-box;\n /* At least the trigger's width when matchTriggerWidth sets the variable, within the usual range */\n min-width: min(max(", ", var(", ", 0px)), ", ");\n max-width: ", ";\n max-height: ", ";\n overflow-y: auto;\n padding: ", " 0;\n background-color: ", ";\n color: ", ";\n border: ", ";\n border-radius: ", ";\n box-shadow: ", ";\n animation: ", " ", " ", "\n ", ";\n\n ", " {\n animation: ", " ", " ", "\n ", ";\n }\n\n ", "\n\n &:focus {\n outline: none;\n }\n"
46
46
  // The trigger's wrapper takes no box of its own
47
- ])), size[4500], size[7500], size.menu.maxHeight, space[100], semantic.surface.raised, color.text["default"], border["default"], radius.md, elevation.floating, enter, motion.duration.fast, motion.easing.decelerate, function (_a) {
47
+ ])), size[4500], ANCHOR_WIDTH_VAR, size[7500], size[7500], size.menu.maxHeight, space[100], semantic.surface.overlay, color.text["default"], border["default"], radius.md, elevation.floating, enter, motion.duration.fast, motion.easing.decelerate, function (_a) {
48
48
  var $exiting = _a.$exiting;
49
49
  return $exiting ? exitAnimation : css(templateObject_3 || (templateObject_3 = __makeTemplateObject([""], [""])));
50
50
  }, reducedMotion, fade, motion.duration.fast, motion.easing.decelerate, function (_a) {
@@ -76,6 +76,8 @@ var Menu = function Menu(_a) {
76
76
  side = _c === void 0 ? 'bottom' : _c,
77
77
  _d = _a.align,
78
78
  align = _d === void 0 ? 'start' : _d,
79
+ _e = _a.matchTriggerWidth,
80
+ matchTriggerWidth = _e === void 0 ? false : _e,
79
81
  dataTestId = _a["data-testid"];
80
82
  var menuId = useId();
81
83
  var triggerId = useId();
@@ -88,14 +90,14 @@ var Menu = function Menu(_a) {
88
90
  text: '',
89
91
  timer: undefined
90
92
  });
91
- var _e = useState(defaultOpen),
92
- uncontrolledOpen = _e[0],
93
- setUncontrolledOpen = _e[1];
93
+ var _f = useState(defaultOpen),
94
+ uncontrolledOpen = _f[0],
95
+ setUncontrolledOpen = _f[1];
94
96
  var isControlled = openProp !== undefined;
95
97
  var isOpen = isControlled ? openProp : uncontrolledOpen;
96
- var _f = usePresence(isOpen),
97
- isPresent = _f.isPresent,
98
- isExiting = _f.isExiting;
98
+ var _g = usePresence(isOpen),
99
+ isPresent = _g.isPresent,
100
+ isExiting = _g.isExiting;
99
101
  var triggerElement = function triggerElement() {
100
102
  return laidOutElement(anchorRef.current);
101
103
  };
@@ -146,6 +148,7 @@ var Menu = function Menu(_a) {
146
148
  anchorRef: anchorRef,
147
149
  side: side,
148
150
  align: align,
151
+ matchAnchorWidth: matchTriggerWidth,
149
152
  onDetach: detach
150
153
  });
151
154
  // Opening from the trigger focuses the first or last item. An open that didn't come from the
@@ -54,7 +54,7 @@ var StyledDialog = /*#__PURE__*/styled.div.withConfig({
54
54
  })(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n position: fixed;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%) scale(1);\n z-index: ", ";\n\n width: ", ";\n max-width: calc(100vw - ", " * 2);\n max-height: calc(100vh - ", " * 2);\n\n display: flex;\n flex-direction: column;\n\n background-color: ", ";\n border-radius: ", ";\n box-shadow: ", ";\n overflow: hidden;\n\n ", "\n\n ", " {\n animation: ", " ", " ", "", ";\n }\n\n /* Auto-fullscreen below md breakpoint (768px) */\n @media (max-width: ", ") {\n width: 100vw;\n height: 100vh;\n max-width: 100vw;\n max-height: 100vh;\n border-radius: 0;\n top: 0;\n left: 0;\n transform: none;\n animation: ", " ", " ", "", ";\n }\n\n &:focus {\n outline: none;\n }\n\n"], ["\n position: fixed;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%) scale(1);\n z-index: ", ";\n\n width: ", ";\n max-width: calc(100vw - ", " * 2);\n max-height: calc(100vh - ", " * 2);\n\n display: flex;\n flex-direction: column;\n\n background-color: ", ";\n border-radius: ", ";\n box-shadow: ", ";\n overflow: hidden;\n\n ", "\n\n ", " {\n animation: ", " ", " ", "", ";\n }\n\n /* Auto-fullscreen below md breakpoint (768px) */\n @media (max-width: ", ") {\n width: 100vw;\n height: 100vh;\n max-width: 100vw;\n max-height: 100vh;\n border-radius: 0;\n top: 0;\n left: 0;\n transform: none;\n animation: ", " ", " ", "", ";\n }\n\n &:focus {\n outline: none;\n }\n\n"])), semantic.layer.modal, function (_a) {
55
55
  var $width = _a.$width;
56
56
  return $width;
57
- }, space[400], space[400], semantic.surface.raised, semantic.radius.xl, elevation.overlay, css(templateObject_5 || (templateObject_5 = __makeTemplateObject(["animation: ", " ", " ", "", ";"], ["animation: ", " ", " ", "", ";"])), scaleIn, motion.duration.moderate, motion.easing.decelerate, function (_a) {
57
+ }, space[400], space[400], semantic.surface.overlay, tokens.component.overlay.borderRadius, elevation.overlay, css(templateObject_5 || (templateObject_5 = __makeTemplateObject(["animation: ", " ", " ", "", ";"], ["animation: ", " ", " ", "", ";"])), scaleIn, motion.duration.moderate, motion.easing.decelerate, function (_a) {
58
58
  var $isExiting = _a.$isExiting;
59
59
  return $isExiting && exitAnimation;
60
60
  }), reducedMotion, fadeIn, motion.duration.moderate, motion.easing.decelerate, function (_a) {
@@ -7,6 +7,7 @@ const styled = styled$module.default || styled$module;
7
7
  import { StyledInputBase } from '../TextField/InputBase.mjs';
8
8
  import { IconButton } from '../../atoms/IconButton/IconButton.mjs';
9
9
  import tokens from '../../../lib/cssTokens.mjs';
10
+ import { fieldButtonRadius } from '../../../lib/styleUtils.mjs';
10
11
 
11
12
  var field = tokens.component.field;
12
13
  // Gaps come from the semantic spacing scale: no component spacing tokens (decision 0022)
@@ -34,7 +35,7 @@ var StyledNumberInput = /*#__PURE__*/styled(StyledInputBase).withConfig({
34
35
  var StyledStepperContainer = /*#__PURE__*/styled.div.withConfig({
35
36
  displayName: "NumberInput__StyledStepperContainer",
36
37
  componentId: "sc-qotc3w-5"
37
- })(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n position: absolute;\n right: ", ";\n display: flex;\n flex-direction: row;\n gap: ", ";\n"], ["\n position: absolute;\n right: ", ";\n display: flex;\n flex-direction: row;\n gap: ", ";\n"])), tokens.semantic.space[200], tokens.semantic.space[200]);
38
+ })(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n position: absolute;\n right: ", ";\n display: flex;\n flex-direction: row;\n gap: ", ";\n\n /* Buttons inside the field nest within its corner: a step tighter than the control radius (decision 0055) */\n & > button {\n border-radius: ", ";\n }\n"], ["\n position: absolute;\n right: ", ";\n display: flex;\n flex-direction: row;\n gap: ", ";\n\n /* Buttons inside the field nest within its corner: a step tighter than the control radius (decision 0055) */\n & > button {\n border-radius: ", ";\n }\n"])), tokens.semantic.space[200], tokens.semantic.space[200], fieldButtonRadius);
38
39
  var StyledHelperText = /*#__PURE__*/styled.div.withConfig({
39
40
  displayName: "NumberInput__StyledHelperText",
40
41
  componentId: "sc-qotc3w-6"
@@ -7,6 +7,7 @@ const styled = styled$module.default || styled$module;
7
7
  import { StyledInputBase } from '../TextField/InputBase.mjs';
8
8
  import { IconButton } from '../../atoms/IconButton/IconButton.mjs';
9
9
  import tokens from '../../../lib/cssTokens.mjs';
10
+ import { fieldButtonRadius } from '../../../lib/styleUtils.mjs';
10
11
 
11
12
  var field = tokens.component.field;
12
13
  // Gaps come from the semantic spacing scale: no component spacing tokens (decision 0022)
@@ -37,7 +38,7 @@ var StyledInputWrapper = /*#__PURE__*/styled.div.withConfig({
37
38
  var StyledToggleButton = /*#__PURE__*/styled.div.withConfig({
38
39
  displayName: "PasswordField__StyledToggleButton",
39
40
  componentId: "sc-1p15zk0-5"
40
- })(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n position: absolute;\n right: ", ";\n top: 50%;\n transform: translateY(-50%);\n"], ["\n position: absolute;\n right: ", ";\n top: 50%;\n transform: translateY(-50%);\n"
41
+ })(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n position: absolute;\n right: ", ";\n top: 50%;\n transform: translateY(-50%);\n\n /* Buttons inside the field nest within its corner: a step tighter than the control radius (decision 0055) */\n & > button {\n border-radius: ", ";\n }\n"], ["\n position: absolute;\n right: ", ";\n top: 50%;\n transform: translateY(-50%);\n\n /* Buttons inside the field nest within its corner: a step tighter than the control radius (decision 0055) */\n & > button {\n border-radius: ", ";\n }\n"
41
42
  /**
42
43
  * PasswordField component for secure password input with visibility toggle
43
44
  *
@@ -49,7 +50,7 @@ var StyledToggleButton = /*#__PURE__*/styled.div.withConfig({
49
50
  * required
50
51
  * />
51
52
  * ```
52
- */])), tokens.semantic.space[200]);
53
+ */])), tokens.semantic.space[200], fieldButtonRadius);
53
54
  /**
54
55
  * PasswordField component for secure password input with visibility toggle
55
56
  *