@common-origin/design-system 3.1.0 → 3.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 (89) hide show
  1. package/dist/client.js +1050 -722
  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/Icon/Icon.d.mts +1 -1
  11. package/dist/components/atoms/Icon/Icon.d.ts +1 -1
  12. package/dist/components/atoms/Icon/Icon.mjs +35 -10
  13. package/dist/components/atoms/IconButton/IconButton.mjs +1 -1
  14. package/dist/components/atoms/ProgressBar/ProgressBar.d.mts +1 -1
  15. package/dist/components/atoms/ProgressBar/ProgressBar.d.ts +1 -1
  16. package/dist/components/atoms/Tag/Tag.d.mts +1 -1
  17. package/dist/components/atoms/Tag/Tag.d.ts +1 -1
  18. package/dist/components/atoms/Tooltip/Tooltip.d.mts +7 -1
  19. package/dist/components/atoms/Tooltip/Tooltip.d.ts +7 -1
  20. package/dist/components/atoms/Tooltip/Tooltip.mjs +18 -8
  21. package/dist/components/molecules/ActionSheet/ActionSheet.mjs +2 -2
  22. package/dist/components/molecules/Alert/Alert.mjs +1 -1
  23. package/dist/components/molecules/Checkbox/SelectableInputBase.mjs +1 -1
  24. package/dist/components/molecules/Dropdown/Dropdown.mjs +1 -1
  25. package/dist/components/molecules/List/ListItem.mjs +3 -3
  26. package/dist/components/molecules/Menu/Menu.d.mts +8 -1
  27. package/dist/components/molecules/Menu/Menu.d.ts +8 -1
  28. package/dist/components/molecules/Menu/Menu.mjs +12 -9
  29. package/dist/components/molecules/Modal/Modal.mjs +1 -1
  30. package/dist/components/molecules/NumberInput/NumberInput.mjs +2 -1
  31. package/dist/components/molecules/PasswordField/PasswordField.mjs +3 -2
  32. package/dist/components/molecules/SearchField/SearchField.mjs +3 -3
  33. package/dist/components/molecules/Sheet/Sheet.mjs +3 -3
  34. package/dist/components/molecules/SidebarNavItem/SidebarNavItem.d.mts +3 -2
  35. package/dist/components/molecules/SidebarNavItem/SidebarNavItem.d.ts +3 -2
  36. package/dist/components/molecules/SidebarNavItem/SidebarNavItem.mjs +128 -41
  37. package/dist/components/molecules/SidebarNavItem/sidebarNavMotion.d.mts +30 -0
  38. package/dist/components/molecules/SidebarNavItem/sidebarNavMotion.d.ts +30 -0
  39. package/dist/components/molecules/SidebarNavItem/sidebarNavMotion.mjs +69 -0
  40. package/dist/components/molecules/SidebarNavItem/sidebarNavMotion.mjs.map +1 -0
  41. package/dist/components/molecules/SidebarNavSection/SidebarNavSection.mjs +57 -43
  42. package/dist/components/molecules/TabBar/TabBar.mjs +3 -3
  43. package/dist/components/molecules/WorkspaceSwitcher/WorkspaceSwitcher.mjs +3 -1
  44. package/dist/components/organisms/SidebarNav/SidebarNav.mjs +173 -62
  45. package/dist/data.js +2680 -190
  46. package/dist/data.js.map +1 -1
  47. package/dist/index.d.mts +2 -1
  48. package/dist/index.d.ts +2 -1
  49. package/dist/index.js +1 -0
  50. package/dist/index.js.map +1 -1
  51. package/dist/index.mjs +1 -0
  52. package/dist/index.mjs.map +1 -1
  53. package/dist/lib/statusShapes.mjs +1 -1
  54. package/dist/lib/statusShapes.mjs.map +1 -1
  55. package/dist/lib/styleUtils.d.mts +4 -0
  56. package/dist/lib/styleUtils.d.ts +4 -0
  57. package/dist/lib/styleUtils.mjs +5 -1
  58. package/dist/lib/styleUtils.mjs.map +1 -1
  59. package/dist/lib/tokenAliases.mjs +1 -0
  60. package/dist/lib/tokenAliases.mjs.map +1 -1
  61. package/dist/lib/useFloatingLayer.d.mts +8 -1
  62. package/dist/lib/useFloatingLayer.d.ts +8 -1
  63. package/dist/lib/useFloatingLayer.mjs +11 -2
  64. package/dist/lib/useFloatingLayer.mjs.map +1 -1
  65. package/dist/styles/iconSet.json.mjs +2442 -0
  66. package/dist/styles/iconSet.json.mjs.map +1 -0
  67. package/dist/styles/tokens.d.mts +93 -24
  68. package/dist/styles/tokens.d.ts +93 -24
  69. package/dist/styles/tokens.json +96 -59
  70. package/dist/styles/tokens.json.mjs +96 -59
  71. package/dist/styles/tokens.json.mjs.map +1 -1
  72. package/dist/tokens/index.js +96 -59
  73. package/dist/tokens/index.js.map +1 -1
  74. package/dist/tokens/index.mjs +96 -59
  75. package/dist/tokens/index.mjs.map +1 -1
  76. package/dist/tokens/styles/tokens.d.mts +93 -24
  77. package/dist/tokens/styles/tokens.d.ts +93 -24
  78. package/dist/tokens.css +1105 -74
  79. package/dist/types/iconSet.d.mts +6 -0
  80. package/dist/types/iconSet.d.ts +6 -0
  81. package/dist/types/iconSet.mjs +12 -0
  82. package/dist/types/iconSet.mjs.map +1 -0
  83. package/dist/types/icons.d.mts +58 -6
  84. package/dist/types/icons.d.ts +58 -6
  85. package/dist/types/icons.mjs +5 -0
  86. package/dist/types/icons.mjs.map +1 -1
  87. package/dist/types/index.d.mts +1 -0
  88. package/dist/types/index.d.ts +1 -0
  89. package/package.json +7 -3
@@ -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;
@@ -8,7 +8,7 @@ export interface IconProps {
8
8
  /**
9
9
  * Makes the icon meaningful: it's announced as an image with this name. Without `aria-label`
10
10
  * or `title`, the icon is decorative and hidden from assistive technology (#85). Use a
11
- * human-readable name, never the internal icon name; `icons.json`'s `ariaLabelDefault` is a
11
+ * human-readable name, never the internal icon name; the icon's `ariaLabelDefault` in `iconSet` is a
12
12
  * starting point.
13
13
  */
14
14
  'aria-label'?: string;
@@ -8,7 +8,7 @@ export interface IconProps {
8
8
  /**
9
9
  * Makes the icon meaningful: it's announced as an image with this name. Without `aria-label`
10
10
  * or `title`, the icon is decorative and hidden from assistive technology (#85). Use a
11
- * human-readable name, never the internal icon name; `icons.json`'s `ariaLabelDefault` is a
11
+ * human-readable name, never the internal icon name; the icon's `ariaLabelDefault` in `iconSet` is a
12
12
  * starting point.
13
13
  */
14
14
  'aria-label'?: string;
@@ -1,10 +1,11 @@
1
1
  'use client';
2
2
  import { __makeTemplateObject, __assign } from '../../../vendor/tslib/tslib.es6.mjs';
3
3
  import { jsx, jsxs } from 'react/jsx-runtime';
4
+ import React from 'react';
4
5
  import styled$module from 'styled-components';
5
6
  const styled = styled$module.default || styled$module;
6
7
  import tokens from '../../../lib/cssTokens.mjs';
7
- import iconsJson from '../../../styles/icons.json.mjs';
8
+ import { iconSet } from '../../../types/iconSet.mjs';
8
9
 
9
10
  var IconStyled = /*#__PURE__*/styled.span.withConfig({
10
11
  shouldForwardProp: function shouldForwardProp(prop) {
@@ -12,7 +13,10 @@ var IconStyled = /*#__PURE__*/styled.span.withConfig({
12
13
  },
13
14
  displayName: "Icon__IconStyled",
14
15
  componentId: "sc-1105czq-0"
15
- })(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: ", ";\n height: ", ";\n \n svg {\n width: 100%;\n height: 100%;\n display: block;\n }\n \n /* Use semantic icon colors */\n color: ", ";\n"], ["\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: ", ";\n height: ", ";\n \n svg {\n width: 100%;\n height: 100%;\n display: block;\n }\n \n /* Use semantic icon colors */\n color: ", ";\n"])), function (_a) {
16
+ })(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: ", ";\n height: ", ";\n \n svg {\n width: 100%;\n height: 100%;\n display: block;\n }\n \n /* Use semantic icon colors */\n color: ", ";\n"], ["\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: ", ";\n height: ", ";\n \n svg {\n width: 100%;\n height: 100%;\n display: block;\n }\n \n /* Use semantic icon colors */\n color: ", ";\n"
17
+ // How each paint draws, in currentColor. Lines are 2px on the 24px grid, so they scale with the
18
+ // icon (decision 0058).
19
+ ])), function (_a) {
16
20
  var $size = _a.$size;
17
21
  return tokens.semantic.size.icon[$size];
18
22
  }, function (_a) {
@@ -45,6 +49,25 @@ var IconStyled = /*#__PURE__*/styled.span.withConfig({
45
49
  return tokens.semantic.color.icon["default"];
46
50
  }
47
51
  });
52
+ // How each paint draws, in currentColor. Lines are 2px on the 24px grid, so they scale with the
53
+ // icon (decision 0058).
54
+ var LINE = {
55
+ stroke: 'currentColor',
56
+ strokeWidth: 2,
57
+ strokeLinecap: 'round',
58
+ strokeLinejoin: 'round'
59
+ };
60
+ var PAINT = {
61
+ stroke: __assign({
62
+ fill: 'none'
63
+ }, LINE),
64
+ fill: {
65
+ fill: 'currentColor'
66
+ },
67
+ both: __assign({
68
+ fill: 'currentColor'
69
+ }, LINE)
70
+ };
48
71
  var Icon = function Icon(_a) {
49
72
  var name = _a.name,
50
73
  _b = _a.size,
@@ -56,10 +79,9 @@ var Icon = function Icon(_a) {
56
79
  dataTestId = _a["data-testid"];
57
80
  // Decorative unless it's given a name. A blank name is no name, so the icon stays hidden
58
81
  var label = (ariaLabel === null || ariaLabel === void 0 ? void 0 : ariaLabel.trim()) || (title === null || title === void 0 ? void 0 : title.trim()) || undefined;
59
- // Get the icon data from the JSON file
60
- var iconData = iconsJson[name];
61
- if (!iconData) {
62
- console.warn("Icon \"".concat(name, "\" not found in icons.json"));
82
+ var icon = iconSet[name];
83
+ if (!icon) {
84
+ console.warn("Icon \"".concat(name, "\" not found in iconSet"));
63
85
  return jsx(IconStyled, {
64
86
  "$size": size,
65
87
  "$iconColor": iconColor,
@@ -72,9 +94,8 @@ var Icon = function Icon(_a) {
72
94
  "data-testid": dataTestId,
73
95
  children: jsxs("svg", __assign({
74
96
  viewBox: "0 0 24 24",
75
- fill: "currentColor",
76
97
  xmlns: "http://www.w3.org/2000/svg"
77
- }, label ? {
98
+ }, PAINT[icon.paint], label ? {
78
99
  role: 'img',
79
100
  'aria-label': label
80
101
  } : {
@@ -83,8 +104,12 @@ var Icon = function Icon(_a) {
83
104
  }, {
84
105
  children: [(title === null || title === void 0 ? void 0 : title.trim()) && jsx("title", {
85
106
  children: title
86
- }), jsx("path", {
87
- d: iconData.path
107
+ }), icon.elements.map(function (_a, index) {
108
+ var tag = _a[0],
109
+ attributes = _a[1];
110
+ return /*#__PURE__*/React.createElement(tag, __assign({
111
+ key: index
112
+ }, attributes));
88
113
  })]
89
114
  }))
90
115
  });
@@ -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 {