@cloudscape-design/components-themeable 3.0.1333 → 3.0.1335

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 (206) hide show
  1. package/lib/internal/manifest.json +1 -1
  2. package/lib/internal/scss/box/visual-accent.scss +61 -25
  3. package/lib/internal/scss/button/styles.scss +6 -0
  4. package/lib/internal/scss/code-editor/ace-editor.scss +1 -1
  5. package/lib/internal/scss/internal/generated/custom-css-properties/index.scss +1 -1
  6. package/lib/internal/scss/side-navigation/styles.scss +10 -3
  7. package/lib/internal/scss/steps/styles.scss +113 -31
  8. package/lib/internal/scss/table/header-cell/styles.scss +42 -14
  9. package/lib/internal/scss/table/styles.scss +6 -0
  10. package/lib/internal/scss/tooltip/styles.scss +22 -0
  11. package/lib/internal/template/app-layout/visual-refresh-toolbar/navigation/index.js +1 -1
  12. package/lib/internal/template/app-layout/visual-refresh-toolbar/navigation/index.js.map +1 -1
  13. package/lib/internal/template/box/interfaces.d.ts +1 -1
  14. package/lib/internal/template/box/interfaces.d.ts.map +1 -1
  15. package/lib/internal/template/box/interfaces.js.map +1 -1
  16. package/lib/internal/template/box/styles.css.js +220 -224
  17. package/lib/internal/template/box/styles.scoped.css +293 -313
  18. package/lib/internal/template/box/styles.selectors.js +220 -224
  19. package/lib/internal/template/button/internal.d.ts +2 -0
  20. package/lib/internal/template/button/internal.d.ts.map +1 -1
  21. package/lib/internal/template/button/internal.js +2 -1
  22. package/lib/internal/template/button/internal.js.map +1 -1
  23. package/lib/internal/template/button/styles.css.js +23 -22
  24. package/lib/internal/template/button/styles.scoped.css +74 -69
  25. package/lib/internal/template/button/styles.selectors.js +23 -22
  26. package/lib/internal/template/button-dropdown/internal-interfaces.d.ts +11 -0
  27. package/lib/internal/template/button-dropdown/internal-interfaces.d.ts.map +1 -1
  28. package/lib/internal/template/button-dropdown/internal-interfaces.js.map +1 -1
  29. package/lib/internal/template/button-dropdown/internal.d.ts.map +1 -1
  30. package/lib/internal/template/button-dropdown/internal.js +3 -2
  31. package/lib/internal/template/button-dropdown/internal.js.map +1 -1
  32. package/lib/internal/template/button-group/copy-to-clipboard-item.d.ts +16 -0
  33. package/lib/internal/template/button-group/copy-to-clipboard-item.d.ts.map +1 -0
  34. package/lib/internal/template/button-group/copy-to-clipboard-item.js +38 -0
  35. package/lib/internal/template/button-group/copy-to-clipboard-item.js.map +1 -0
  36. package/lib/internal/template/button-group/index.d.ts.map +1 -1
  37. package/lib/internal/template/button-group/index.js +9 -1
  38. package/lib/internal/template/button-group/index.js.map +1 -1
  39. package/lib/internal/template/button-group/interfaces.d.ts +38 -2
  40. package/lib/internal/template/button-group/interfaces.d.ts.map +1 -1
  41. package/lib/internal/template/button-group/interfaces.js.map +1 -1
  42. package/lib/internal/template/button-group/internal-interfaces.d.ts +1 -1
  43. package/lib/internal/template/button-group/internal-interfaces.d.ts.map +1 -1
  44. package/lib/internal/template/button-group/internal-interfaces.js.map +1 -1
  45. package/lib/internal/template/button-group/internal.d.ts.map +1 -1
  46. package/lib/internal/template/button-group/internal.js +2 -2
  47. package/lib/internal/template/button-group/internal.js.map +1 -1
  48. package/lib/internal/template/button-group/item-element.d.ts +2 -0
  49. package/lib/internal/template/button-group/item-element.d.ts.map +1 -1
  50. package/lib/internal/template/button-group/item-element.js +13 -3
  51. package/lib/internal/template/button-group/item-element.js.map +1 -1
  52. package/lib/internal/template/code-editor/styles.css.js +33 -33
  53. package/lib/internal/template/code-editor/styles.scoped.css +187 -187
  54. package/lib/internal/template/code-editor/styles.selectors.js +33 -33
  55. package/lib/internal/template/i18n/messages/all.all.js +1 -1
  56. package/lib/internal/template/i18n/messages/all.all.json +1 -1
  57. package/lib/internal/template/i18n/messages/all.ar.js +1 -1
  58. package/lib/internal/template/i18n/messages/all.ar.json +1 -1
  59. package/lib/internal/template/i18n/messages/all.de.js +1 -1
  60. package/lib/internal/template/i18n/messages/all.de.json +1 -1
  61. package/lib/internal/template/i18n/messages/all.en-GB.js +1 -1
  62. package/lib/internal/template/i18n/messages/all.en-GB.json +1 -1
  63. package/lib/internal/template/i18n/messages/all.en.js +1 -1
  64. package/lib/internal/template/i18n/messages/all.en.json +1 -1
  65. package/lib/internal/template/i18n/messages/all.es.js +1 -1
  66. package/lib/internal/template/i18n/messages/all.es.json +1 -1
  67. package/lib/internal/template/i18n/messages/all.fr.js +1 -1
  68. package/lib/internal/template/i18n/messages/all.fr.json +1 -1
  69. package/lib/internal/template/i18n/messages/all.id.js +1 -1
  70. package/lib/internal/template/i18n/messages/all.id.json +1 -1
  71. package/lib/internal/template/i18n/messages/all.it.js +1 -1
  72. package/lib/internal/template/i18n/messages/all.it.json +1 -1
  73. package/lib/internal/template/i18n/messages/all.ja.js +1 -1
  74. package/lib/internal/template/i18n/messages/all.ja.json +1 -1
  75. package/lib/internal/template/i18n/messages/all.ko.js +1 -1
  76. package/lib/internal/template/i18n/messages/all.ko.json +1 -1
  77. package/lib/internal/template/i18n/messages/all.pt-BR.js +1 -1
  78. package/lib/internal/template/i18n/messages/all.pt-BR.json +1 -1
  79. package/lib/internal/template/i18n/messages/all.tr.js +1 -1
  80. package/lib/internal/template/i18n/messages/all.tr.json +1 -1
  81. package/lib/internal/template/i18n/messages/all.zh-CN.js +1 -1
  82. package/lib/internal/template/i18n/messages/all.zh-CN.json +1 -1
  83. package/lib/internal/template/i18n/messages/all.zh-TW.js +1 -1
  84. package/lib/internal/template/i18n/messages/all.zh-TW.json +1 -1
  85. package/lib/internal/template/i18n/messages-types.d.ts +19 -0
  86. package/lib/internal/template/i18n/messages-types.d.ts.map +1 -1
  87. package/lib/internal/template/i18n/messages-types.js.map +1 -1
  88. package/lib/internal/template/internal/base-component/styles.scoped.css +163 -3
  89. package/lib/internal/template/internal/environment.js +2 -2
  90. package/lib/internal/template/internal/environment.json +2 -2
  91. package/lib/internal/template/internal/generated/styles/tokens.d.ts +35 -38
  92. package/lib/internal/template/internal/generated/styles/tokens.js +35 -38
  93. package/lib/internal/template/internal/generated/theming/index.cjs +585 -774
  94. package/lib/internal/template/internal/generated/theming/index.cjs.d.ts +36 -9
  95. package/lib/internal/template/internal/generated/theming/index.d.ts +36 -9
  96. package/lib/internal/template/internal/generated/theming/index.js +585 -774
  97. package/lib/internal/template/internal/utils/scrollable-containers.d.ts +5 -0
  98. package/lib/internal/template/internal/utils/scrollable-containers.d.ts.map +1 -1
  99. package/lib/internal/template/internal/utils/scrollable-containers.js +16 -0
  100. package/lib/internal/template/internal/utils/scrollable-containers.js.map +1 -1
  101. package/lib/internal/template/side-navigation/implementation.d.ts.map +1 -1
  102. package/lib/internal/template/side-navigation/implementation.js +3 -2
  103. package/lib/internal/template/side-navigation/implementation.js.map +1 -1
  104. package/lib/internal/template/side-navigation/parts.d.ts +2 -1
  105. package/lib/internal/template/side-navigation/parts.d.ts.map +1 -1
  106. package/lib/internal/template/side-navigation/parts.js +14 -13
  107. package/lib/internal/template/side-navigation/parts.js.map +1 -1
  108. package/lib/internal/template/side-navigation/styles.css.js +48 -47
  109. package/lib/internal/template/side-navigation/styles.scoped.css +77 -74
  110. package/lib/internal/template/side-navigation/styles.selectors.js +48 -47
  111. package/lib/internal/template/side-navigation/util.d.ts +1 -0
  112. package/lib/internal/template/side-navigation/util.d.ts.map +1 -1
  113. package/lib/internal/template/side-navigation/util.js +5 -0
  114. package/lib/internal/template/side-navigation/util.js.map +1 -1
  115. package/lib/internal/template/steps/interfaces.d.ts +2 -0
  116. package/lib/internal/template/steps/interfaces.d.ts.map +1 -1
  117. package/lib/internal/template/steps/interfaces.js.map +1 -1
  118. package/lib/internal/template/steps/internal.d.ts.map +1 -1
  119. package/lib/internal/template/steps/internal.js +35 -12
  120. package/lib/internal/template/steps/internal.js.map +1 -1
  121. package/lib/internal/template/steps/styles.css.js +17 -13
  122. package/lib/internal/template/steps/styles.scoped.css +99 -42
  123. package/lib/internal/template/steps/styles.selectors.js +17 -13
  124. package/lib/internal/template/table/clear-sort.d.ts +9 -0
  125. package/lib/internal/template/table/clear-sort.d.ts.map +1 -0
  126. package/lib/internal/template/table/clear-sort.js +15 -0
  127. package/lib/internal/template/table/clear-sort.js.map +1 -0
  128. package/lib/internal/template/table/header-cell/index.d.ts +4 -1
  129. package/lib/internal/template/table/header-cell/index.d.ts.map +1 -1
  130. package/lib/internal/template/table/header-cell/index.js +122 -33
  131. package/lib/internal/template/table/header-cell/index.js.map +1 -1
  132. package/lib/internal/template/table/header-cell/sort-menu.d.ts +14 -0
  133. package/lib/internal/template/table/header-cell/sort-menu.d.ts.map +1 -0
  134. package/lib/internal/template/table/header-cell/sort-menu.js +50 -0
  135. package/lib/internal/template/table/header-cell/sort-menu.js.map +1 -0
  136. package/lib/internal/template/table/header-cell/styles.css.js +38 -33
  137. package/lib/internal/template/table/header-cell/styles.scoped.css +101 -76
  138. package/lib/internal/template/table/header-cell/styles.selectors.js +38 -33
  139. package/lib/internal/template/table/header-cell/th-element.d.ts +8 -1
  140. package/lib/internal/template/table/header-cell/th-element.d.ts.map +1 -1
  141. package/lib/internal/template/table/header-cell/th-element.js +6 -2
  142. package/lib/internal/template/table/header-cell/th-element.js.map +1 -1
  143. package/lib/internal/template/table/index.d.ts.map +1 -1
  144. package/lib/internal/template/table/index.js +8 -4
  145. package/lib/internal/template/table/index.js.map +1 -1
  146. package/lib/internal/template/table/interfaces.d.ts +81 -2
  147. package/lib/internal/template/table/interfaces.d.ts.map +1 -1
  148. package/lib/internal/template/table/interfaces.js.map +1 -1
  149. package/lib/internal/template/table/internal.d.ts.map +1 -1
  150. package/lib/internal/template/table/internal.js +40 -9
  151. package/lib/internal/template/table/internal.js.map +1 -1
  152. package/lib/internal/template/table/multi-column-sort/live-announcement.d.ts +16 -0
  153. package/lib/internal/template/table/multi-column-sort/live-announcement.d.ts.map +1 -0
  154. package/lib/internal/template/table/multi-column-sort/live-announcement.js +68 -0
  155. package/lib/internal/template/table/multi-column-sort/live-announcement.js.map +1 -0
  156. package/lib/internal/template/table/multi-column-sort/utils.d.ts +45 -0
  157. package/lib/internal/template/table/multi-column-sort/utils.d.ts.map +1 -0
  158. package/lib/internal/template/table/multi-column-sort/utils.js +76 -0
  159. package/lib/internal/template/table/multi-column-sort/utils.js.map +1 -0
  160. package/lib/internal/template/table/styles.css.js +37 -36
  161. package/lib/internal/template/table/styles.scoped.css +46 -43
  162. package/lib/internal/template/table/styles.selectors.js +37 -36
  163. package/lib/internal/template/table/thead.d.ts +3 -0
  164. package/lib/internal/template/table/thead.d.ts.map +1 -1
  165. package/lib/internal/template/table/thead.js +3 -3
  166. package/lib/internal/template/table/thead.js.map +1 -1
  167. package/lib/internal/template/table/tools-header.d.ts +2 -1
  168. package/lib/internal/template/table/tools-header.d.ts.map +1 -1
  169. package/lib/internal/template/table/tools-header.js +4 -3
  170. package/lib/internal/template/table/tools-header.js.map +1 -1
  171. package/lib/internal/template/table/use-auto-skeleton-rows.d.ts +12 -0
  172. package/lib/internal/template/table/use-auto-skeleton-rows.d.ts.map +1 -0
  173. package/lib/internal/template/table/use-auto-skeleton-rows.js +100 -0
  174. package/lib/internal/template/table/use-auto-skeleton-rows.js.map +1 -0
  175. package/lib/internal/template/test-utils/dom/button-group/index.d.ts +4 -0
  176. package/lib/internal/template/test-utils/dom/button-group/index.js +8 -0
  177. package/lib/internal/template/test-utils/dom/button-group/index.js.map +1 -1
  178. package/lib/internal/template/test-utils/dom/pagination/index.js +2 -2
  179. package/lib/internal/template/test-utils/dom/pagination/index.js.map +1 -1
  180. package/lib/internal/template/test-utils/dom/steps/index.d.ts +4 -0
  181. package/lib/internal/template/test-utils/dom/steps/index.js +6 -0
  182. package/lib/internal/template/test-utils/dom/steps/index.js.map +1 -1
  183. package/lib/internal/template/test-utils/dom/table/index.d.ts +77 -0
  184. package/lib/internal/template/test-utils/dom/table/index.js +87 -2
  185. package/lib/internal/template/test-utils/dom/table/index.js.map +1 -1
  186. package/lib/internal/template/test-utils/selectors/button-group/index.d.ts +4 -0
  187. package/lib/internal/template/test-utils/selectors/button-group/index.js +8 -0
  188. package/lib/internal/template/test-utils/selectors/button-group/index.js.map +1 -1
  189. package/lib/internal/template/test-utils/selectors/pagination/index.js +2 -2
  190. package/lib/internal/template/test-utils/selectors/pagination/index.js.map +1 -1
  191. package/lib/internal/template/test-utils/selectors/steps/index.d.ts +4 -0
  192. package/lib/internal/template/test-utils/selectors/steps/index.js +6 -0
  193. package/lib/internal/template/test-utils/selectors/steps/index.js.map +1 -1
  194. package/lib/internal/template/test-utils/selectors/table/index.d.ts +77 -0
  195. package/lib/internal/template/test-utils/selectors/table/index.js +87 -2
  196. package/lib/internal/template/test-utils/selectors/table/index.js.map +1 -1
  197. package/lib/internal/template/tooltip/internal.d.ts.map +1 -1
  198. package/lib/internal/template/tooltip/internal.js +2 -1
  199. package/lib/internal/template/tooltip/internal.js.map +1 -1
  200. package/lib/internal/template/tooltip/styles.css.js +7 -0
  201. package/lib/internal/template/tooltip/styles.scoped.css +165 -0
  202. package/lib/internal/template/tooltip/styles.selectors.js +8 -0
  203. package/lib/internal/template/top-navigation/use-top-navigation.d.ts.map +1 -1
  204. package/lib/internal/template/top-navigation/use-top-navigation.js +2 -5
  205. package/lib/internal/template/top-navigation/use-top-navigation.js.map +1 -1
  206. package/package.json +1 -1
@@ -1,3 +1,3 @@
1
1
  {
2
- "commit": "0404a6355e2e8056d2df2fc4096395b0d1588e1b"
2
+ "commit": "e9c0c768093476a4787def17cd3f7cfceb8231ba"
3
3
  }
@@ -4,7 +4,6 @@
4
4
  */
5
5
 
6
6
  @use 'sass:map';
7
- @use 'sass:meta';
8
7
  @use '../internal/styles/tokens' as awsui;
9
8
 
10
9
  // T-shirt size keywords mirror the Box spacing scale (see spacing.scss).
@@ -85,33 +84,70 @@ $accent-radii: (
85
84
  // stylesheet source order. Winning here preserves the guaranteed background/foreground color
86
85
  // contrast of the accent pair. Descendants (nested Box, Icon) inherit this color.
87
86
  //
88
- // Token variables are looked up dynamically from the tokens module, so adding a color only
89
- // requires extending `$accent-colors`.
87
+ // Keep literal token references in this map so the style build can discover every token and emit
88
+ // its mode-specific custom property declarations.
90
89
  $accent-colors: (
91
- 'red',
92
- 'yellow',
93
- 'indigo',
94
- 'green',
95
- 'orange',
96
- 'purple',
97
- 'mint',
98
- 'lime',
99
- 'grey',
100
- 'teal',
101
- 'cyan',
102
- 'blue',
103
- 'violet',
104
- 'fuchsia',
105
- 'magenta',
106
- 'pink',
107
- 'rose',
108
- 'amber'
90
+ 'red': (
91
+ background: awsui.$color-background-visual-accent-red,
92
+ foreground: awsui.$color-text-visual-accent-red,
93
+ ),
94
+ 'yellow': (
95
+ background: awsui.$color-background-visual-accent-yellow,
96
+ foreground: awsui.$color-text-visual-accent-yellow,
97
+ ),
98
+ 'indigo': (
99
+ background: awsui.$color-background-visual-accent-indigo,
100
+ foreground: awsui.$color-text-visual-accent-indigo,
101
+ ),
102
+ 'green': (
103
+ background: awsui.$color-background-visual-accent-green,
104
+ foreground: awsui.$color-text-visual-accent-green,
105
+ ),
106
+ 'orange': (
107
+ background: awsui.$color-background-visual-accent-orange,
108
+ foreground: awsui.$color-text-visual-accent-orange,
109
+ ),
110
+ 'purple': (
111
+ background: awsui.$color-background-visual-accent-purple,
112
+ foreground: awsui.$color-text-visual-accent-purple,
113
+ ),
114
+ 'lime': (
115
+ background: awsui.$color-background-visual-accent-lime,
116
+ foreground: awsui.$color-text-visual-accent-lime,
117
+ ),
118
+ 'grey': (
119
+ background: awsui.$color-background-visual-accent-grey,
120
+ foreground: awsui.$color-text-visual-accent-grey,
121
+ ),
122
+ 'teal': (
123
+ background: awsui.$color-background-visual-accent-teal,
124
+ foreground: awsui.$color-text-visual-accent-teal,
125
+ ),
126
+ 'blue': (
127
+ background: awsui.$color-background-visual-accent-blue,
128
+ foreground: awsui.$color-text-visual-accent-blue,
129
+ ),
130
+ 'violet': (
131
+ background: awsui.$color-background-visual-accent-violet,
132
+ foreground: awsui.$color-text-visual-accent-violet,
133
+ ),
134
+ 'magenta': (
135
+ background: awsui.$color-background-visual-accent-magenta,
136
+ foreground: awsui.$color-text-visual-accent-magenta,
137
+ ),
138
+ 'pink': (
139
+ background: awsui.$color-background-visual-accent-pink,
140
+ foreground: awsui.$color-text-visual-accent-pink,
141
+ ),
142
+ 'amber': (
143
+ background: awsui.$color-background-visual-accent-amber,
144
+ foreground: awsui.$color-text-visual-accent-amber,
145
+ ),
109
146
  );
110
- $tokens: meta.module-variables('awsui');
111
147
 
112
- @each $accent in $accent-colors {
148
+ @each $accent, $colors in $accent-colors {
113
149
  .box.visual-accent.visual-accent-#{$accent} {
114
- background-color: map.get($tokens, 'color-background-accent-#{$accent}');
115
- color: map.get($tokens, 'color-text-accent-#{$accent}');
150
+ background-color: map.get($colors, 'background');
151
+ color: map.get($colors, 'foreground');
116
152
  }
117
153
  }
@@ -148,6 +148,12 @@
148
148
  border-inline-width: 0;
149
149
  }
150
150
 
151
+ &.button-compact {
152
+ padding-block: 0;
153
+ border-block-width: 0;
154
+ border-inline-width: 0;
155
+ }
156
+
151
157
  &.variant-inline-icon-pointer-target {
152
158
  padding-block: awsui.$space-xxxs;
153
159
  border-block-width: 0;
@@ -20,7 +20,7 @@
20
20
  }
21
21
 
22
22
  .code-editor :global .ace_editor {
23
- font-family: Monaco, Menlo, Consolas, 'Courier Prime', Courier, 'Courier New', monospace;
23
+ font-family: awsui.$font-family-monospace;
24
24
  font-size: 14px;
25
25
  line-height: 20px;
26
26
 
@@ -1,6 +1,6 @@
1
1
 
2
2
  // Build environment
3
- $awsui-commit-hash: "0404a635";
3
+ $awsui-commit-hash: "e9c0c768";
4
4
  // Manually managed CSS-variables
5
5
  $maxContentWidth: --awsui-max-content-width-esndbs;
6
6
  $minContentWidth: --awsui-min-content-width-esndbs;
@@ -9,7 +9,8 @@
9
9
 
10
10
  // ==========================================================================
11
11
  // Item sizing — single source of truth for navigation density.
12
- // Adjust awsui.$size-side-navigation-item-height and awsui.$space-side-navigation-item-gap/awsui.$space-side-navigation-item-collapsed-gap to scale all items uniformly.
12
+ // Adjust awsui.$size-side-navigation-item-height and the item gap tokens
13
+ // (awsui.$space-side-navigation-item-default-gap / awsui.$space-side-navigation-item-icon-gap) to scale all items uniformly.
13
14
  // ==========================================================================
14
15
  $item-icon-text-gap: awsui.$space-xs;
15
16
  // Padding is calculated to be able to horizontally align items without having to use align-items: center for wrapping
@@ -147,17 +148,23 @@ $expandable-icon-negative-margin: awsui.$space-l;
147
148
  // ==========================================================================
148
149
  .list-item {
149
150
  margin-inline: 0;
150
- margin-block: awsui.$space-side-navigation-item-gap;
151
+ margin-block: awsui.$space-side-navigation-item-default-gap;
151
152
  padding-block: 0;
152
153
  padding-inline: $item-padding-inline;
153
154
  list-style: none;
155
+
156
+ // When any top-level item has an icon, use the wider icon gap between items.
157
+ .list--with-icons > & {
158
+ margin-block: awsui.$space-side-navigation-item-icon-gap;
159
+ }
160
+
154
161
  // Remove margin from first item in side nav, outer block margins are covered by list-container
155
162
  .list-variant-root--first > &:first-child {
156
163
  margin-block-start: 0px;
157
164
  }
158
165
 
159
166
  &--collapsed {
160
- margin-block: awsui.$space-side-navigation-item-collapsed-gap;
167
+ margin-block: awsui.$space-side-navigation-item-icon-gap;
161
168
  display: flex;
162
169
  justify-content: center;
163
170
  padding-block: 0;
@@ -13,6 +13,10 @@
13
13
  background-color: transparent;
14
14
  }
15
15
 
16
+ .header {
17
+ /* used in test-utils */
18
+ }
19
+
16
20
  .root {
17
21
  @include styles.styles-reset;
18
22
  @include styles.text-wrapping;
@@ -27,7 +31,13 @@
27
31
  grid-template-columns: awsui.$space-static-l 1fr;
28
32
  grid-template-rows: minmax(awsui.$space-static-l, auto);
29
33
 
30
- > .header {
34
+ > .annotation {
35
+ justify-self: flex-end;
36
+ min-inline-size: 0;
37
+ color: awsui.$color-text-status-inactive;
38
+ }
39
+
40
+ > .step-layout {
31
41
  display: flex;
32
42
  gap: awsui.$space-xxs;
33
43
  grid-row: 1;
@@ -40,23 +50,6 @@
40
50
  grid-column: 2;
41
51
  margin-block-end: awsui.$space-static-xs;
42
52
  }
43
-
44
- > .connector {
45
- grid-row: 2;
46
- grid-column: 1;
47
- margin-block: 0;
48
- border-block: 0;
49
- border-inline: 0;
50
- inline-size: awsui.$border-divider-list-width;
51
- block-size: auto;
52
- min-block-size: awsui.$space-static-xs;
53
- position: relative;
54
- inset-inline-end: awsui.$space-static-xxxs;
55
- }
56
- }
57
-
58
- > :last-of-type > .connector {
59
- display: none;
60
53
  }
61
54
 
62
55
  &.custom > .details {
@@ -71,18 +64,26 @@
71
64
  display: grid;
72
65
  align-items: flex-start;
73
66
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
67
+ // Shared rows: annotation | icon and connector | header and details.
68
+ grid-template-rows: auto minmax(awsui.$space-static-l, auto) auto;
74
69
  grid-auto-flow: column;
75
70
 
76
71
  > .container {
77
- display: grid;
78
- grid-template-columns: awsui.$space-static-l 1fr;
79
- grid-template-rows: minmax(awsui.$space-static-l, auto);
72
+ // Spanning the subgrid rows keeps steps with different-height annotations aligned.
73
+ grid-row: 1 / -1;
74
+ grid-template-rows: subgrid;
80
75
  align-items: center;
81
76
 
82
- > .header {
83
- display: flex;
77
+ > .annotation {
78
+ justify-self: flex-start;
79
+ align-self: flex-end;
84
80
  grid-row: 1;
85
81
  grid-column: 1 / span 2;
82
+ padding-inline-end: awsui.$space-xs;
83
+ }
84
+
85
+ > .step-layout {
86
+ grid-row: 2;
86
87
  align-items: center;
87
88
 
88
89
  > .connector {
@@ -101,27 +102,68 @@
101
102
  }
102
103
  }
103
104
 
104
- > .horizontal-header {
105
- grid-row: 2;
106
- grid-column: 1 / span 3;
107
- padding-inline-end: awsui.$space-xs;
108
- }
109
-
110
- > .details {
105
+ > .content {
106
+ align-self: flex-start;
111
107
  grid-row: 3;
112
108
  grid-column: 1 / span 3;
109
+ min-inline-size: 0;
113
110
  padding-inline-end: awsui.$space-xs;
111
+
112
+ > .details {
113
+ margin-block-end: awsui.$space-static-xs;
114
+ }
114
115
  }
115
116
  }
116
117
 
117
118
  > .container:last-child {
118
- > .header > .connector {
119
+ > .step-layout > .connector {
119
120
  display: none;
120
121
  }
121
122
  }
122
123
  }
123
124
  }
124
125
 
126
+ .vertical {
127
+ > .list {
128
+ // A single connector fills extra annotation/details height and provides the default spacing otherwise.
129
+ > .container > .step-layout {
130
+ display: grid;
131
+ grid-template-columns: subgrid;
132
+ grid-template-rows: auto 1fr;
133
+ gap: 0;
134
+
135
+ > :first-child {
136
+ grid-column: 1 / -1;
137
+ }
138
+
139
+ > .details {
140
+ grid-row: 2;
141
+ grid-column: 2;
142
+ margin-block-end: awsui.$space-static-xs;
143
+ }
144
+
145
+ > .connector-continuation {
146
+ grid-row: 2;
147
+ grid-column: 1;
148
+ justify-self: center;
149
+ margin-block: 0;
150
+ margin-inline: 0;
151
+ border-block: 0;
152
+ border-inline: 0;
153
+ inline-size: awsui.$border-divider-list-width;
154
+ block-size: auto;
155
+ min-block-size: awsui.$space-static-xs;
156
+ position: relative;
157
+ inset-inline-end: awsui.$space-static-xxxs;
158
+ }
159
+ }
160
+
161
+ > :last-of-type > .step-layout > .connector-continuation {
162
+ display: none;
163
+ }
164
+ }
165
+ }
166
+
125
167
  // Vertical custom steps: a column-1 "rail" stacks the icon above a connector that grows to fill
126
168
  // the full height of the step (header + details), keeping the vertical line continuous and
127
169
  // connecting consecutive steps regardless of header height. Placed after `.horizontal` so
@@ -156,6 +198,46 @@
156
198
  }
157
199
  }
158
200
 
201
+ // Shared columns via subgrid: widest annotation | icon and connector | remaining content.
202
+ .root > .list.with-annotation {
203
+ display: grid;
204
+ grid-template-columns: fit-content(50%) awsui.$space-static-l 1fr;
205
+
206
+ > .container {
207
+ grid-column: 1 / -1;
208
+ grid-template-columns: subgrid;
209
+
210
+ > .annotation {
211
+ grid-row: 1;
212
+ grid-column: 1;
213
+ padding-inline-end: awsui.$space-xxs;
214
+ }
215
+ }
216
+
217
+ // The step layout spans the icon and content columns.
218
+ > .container:not(.custom-vertical) {
219
+ > .step-layout {
220
+ grid-column: 2 / span 2;
221
+ }
222
+
223
+ > .details {
224
+ grid-column: 3;
225
+ }
226
+ }
227
+
228
+ // Custom DOM: rail in the icon column, header and details in the content column.
229
+ > .container.custom-vertical {
230
+ > .rail {
231
+ grid-column: 2;
232
+ }
233
+
234
+ > .content {
235
+ grid-column: 3;
236
+ }
237
+ }
238
+ }
239
+
240
+ // Hide the connector after the final custom/rail step. Placed last so its higher specificity
159
241
  .root > .list > .container.custom-vertical:last-of-type > .rail > .connector {
160
242
  display: none;
161
243
  }
@@ -150,6 +150,15 @@ $cell-horizontal-padding: awsui.$space-scaled-l;
150
150
  color: awsui.$color-text-column-sorting-icon;
151
151
  }
152
152
 
153
+ .header-cell-main {
154
+ /* When the wrapper is present without a sort menu, behave as if it weren't there. */
155
+ display: contents;
156
+ }
157
+
158
+ .sort-priority-badge {
159
+ margin-inline-end: awsui.$space-xxs;
160
+ }
161
+
153
162
  .edit-icon {
154
163
  margin-inline-start: awsui.$space-xxs;
155
164
  margin-block-start: awsui.$space-scaled-xxs;
@@ -162,15 +171,10 @@ $cell-horizontal-padding: awsui.$space-scaled-l;
162
171
  padding-inline-end: awsui.$space-s;
163
172
  @include cell-offset(awsui.$space-s);
164
173
 
165
- .header-cell-group > &,
166
- .header-cell-grouped > &,
167
- .header-cell-spans-rows > & {
174
+ .header-cell-group > & {
168
175
  padding-block: awsui.$space-xxxs;
169
176
  }
170
177
 
171
- .header-cell-sortable > & {
172
- padding-inline-end: calc(#{awsui.$space-xl} + #{awsui.$space-xxs});
173
- }
174
178
  &:focus {
175
179
  outline: none;
176
180
  text-decoration: none;
@@ -178,18 +182,44 @@ $cell-horizontal-padding: awsui.$space-scaled-l;
178
182
 
179
183
  @include header-cell-focus-outline(awsui.$space-table-header-focus-outline-gutter);
180
184
 
181
- .header-cell-disabled.header-cell-sorted > & {
185
+ .header-cell-grouped > .header-cell-main > &,
186
+ .header-cell-spans-rows > .header-cell-main > & {
187
+ padding-block: awsui.$space-xxxs;
188
+ }
189
+
190
+ .header-cell-sortable > .header-cell-main > & {
191
+ padding-inline-end: calc(#{awsui.$space-xl} + #{awsui.$space-xxs});
192
+ }
193
+
194
+ // The multi-sort priority badge renders alongside the sort arrow inside the
195
+ // absolutely-positioned sort icon. Reserve extra inline-end space for it so it
196
+ // does not overlap long, non-truncated header text (e.g. resizable columns off).
197
+ .header-cell-sortable > .header-cell-main > &.header-cell-content-multi-sorted {
198
+ padding-inline-end: calc(#{awsui.$space-xl} + #{awsui.$space-xxs} + #{awsui.$space-m});
199
+ }
200
+
201
+ .header-cell-disabled.header-cell-sorted > .header-cell-main > & {
182
202
  & > .sorting-icon {
183
203
  color: awsui.$color-text-interactive-disabled;
184
204
  }
185
205
  }
186
206
  }
187
207
 
208
+ .header-cell-main-with-menu {
209
+ display: flex;
210
+ align-items: center;
211
+ }
212
+
213
+ .header-cell-content-with-menu {
214
+ flex-grow: 1;
215
+ min-inline-size: 0;
216
+ }
217
+
188
218
  .header-cell-spans-rows {
189
219
  block-size: 100%;
190
220
  vertical-align: bottom;
191
221
 
192
- > .header-cell-content {
222
+ > .header-cell-main > .header-cell-content {
193
223
  block-size: 100%;
194
224
  box-sizing: border-box;
195
225
  display: flex;
@@ -206,11 +236,9 @@ $cell-horizontal-padding: awsui.$space-scaled-l;
206
236
  }
207
237
 
208
238
  .header-cell-sortable:not(.header-cell-disabled) {
209
- & > .header-cell-content {
210
- cursor: pointer;
211
- }
212
- & > .header-cell-content:hover,
213
- &.header-cell-sorted > .header-cell-content {
239
+ cursor: pointer;
240
+ & > .header-cell-main > .header-cell-content:hover,
241
+ &.header-cell-sorted > .header-cell-main > .header-cell-content {
214
242
  color: awsui.$color-text-interactive-active;
215
243
  & > .sorting-icon {
216
244
  color: awsui.$color-text-interactive-active;
@@ -251,7 +279,7 @@ settings icon in the pagination slot.
251
279
  &:first-child {
252
280
  @include header-cell-focus-outline-first(awsui.$space-scaled-xxs);
253
281
  }
254
- &:first-child:not(.header-cell-grouped):not(.header-cell-group) > .header-cell-content {
282
+ &:first-child:not(.header-cell-grouped):not(.header-cell-group) > .header-cell-main > .header-cell-content {
255
283
  @include cell-offset(0px);
256
284
  @include header-cell-focus-outline-first(awsui.$space-table-header-focus-outline-gutter);
257
285
  }
@@ -37,6 +37,12 @@
37
37
  margin-inline-start: auto;
38
38
  }
39
39
 
40
+ &-clear-sort {
41
+ align-self: center;
42
+ }
43
+
44
+ &-clear-sort + &-pagination,
45
+ &-clear-sort + &-preferences,
40
46
  &-pagination + &-preferences {
41
47
  border-inline-start: awsui.$border-divider-section-width solid awsui.$color-border-divider-default;
42
48
  box-sizing: border-box;
@@ -0,0 +1,22 @@
1
+ /*
2
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
+ SPDX-License-Identifier: Apache-2.0
4
+ */
5
+
6
+ @use '../internal/styles' as styles;
7
+ @use '../internal/styles/tokens' as awsui;
8
+
9
+ .root {
10
+ @include styles.with-motion {
11
+ animation: awsui-motion-fade-in-tooltip awsui.$motion-duration-tooltip-enter awsui.$motion-easing-tooltip-enter;
12
+
13
+ @keyframes awsui-motion-fade-in-tooltip {
14
+ from {
15
+ opacity: 0;
16
+ }
17
+ to {
18
+ opacity: 1;
19
+ }
20
+ }
21
+ }
22
+ }
@@ -35,7 +35,7 @@ export function AppLayoutNavigationImplementation({ appLayoutInternals, bottomDr
35
35
  }) },
36
36
  React.createElement(InternalButton, { ariaLabel: navigationCollapsed
37
37
  ? ((_b = ariaLabels === null || ariaLabels === void 0 ? void 0 : ariaLabels.navigationToggle) !== null && _b !== void 0 ? _b : undefined)
38
- : ((_c = ariaLabels === null || ariaLabels === void 0 ? void 0 : ariaLabels.navigationClose) !== null && _c !== void 0 ? _c : undefined), ariaExpanded: navigationCollapsible && !isMobile ? navigationOpen : undefined, iconName: navigationCollapsed ? 'angle-right' : isMobile ? 'close' : 'angle-left', onClick: () => onNavigationToggle(!navigationOpen), variant: "icon", formAction: "none", className: testutilStyles['navigation-close'], ref: navigationFocusControl.refs.close, analyticsAction: navigationCollapsed ? 'open' : 'close' })),
38
+ : ((_c = ariaLabels === null || ariaLabels === void 0 ? void 0 : ariaLabels.navigationClose) !== null && _c !== void 0 ? _c : undefined), ariaExpanded: navigationCollapsible && !isMobile ? navigationOpen : undefined, iconName: navigationCollapsed ? 'angle-right' : isMobile ? 'close' : 'angle-left', onClick: () => onNavigationToggle(navigationCollapsible ? !navigationOpen : false), variant: "icon", formAction: "none", className: testutilStyles['navigation-close'], ref: navigationFocusControl.refs.close, analyticsAction: navigationCollapsed ? 'open' : 'close' })),
39
39
  navigation)));
40
40
  }
41
41
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/app-layout/visual-refresh-toolbar/navigation/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,WAAW,EAAE,MAAM,0CAA0C,CAAC;AAEvE,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAGpD,OAAO,YAAY,MAAM,4BAA4B,CAAC;AACtD,OAAO,cAAc,MAAM,kCAAkC,CAAC;AAC9D,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAQrC,MAAM,UAAU,iCAAiC,CAAC,EAChD,kBAAkB,EAClB,wBAAwB,EACxB,qBAAqB,GACkB;;IACvC,MAAM,EACJ,UAAU,EACV,kBAAkB,EAClB,QAAQ,EACR,cAAc,EACd,UAAU,EACV,sBAAsB,EACtB,SAAS,EACT,eAAe,GAChB,GAAG,kBAAkB,CAAC;IAEvB,MAAM,EAAE,eAAe,EAAE,YAAY,EAAE,GAAG,eAAe,CACvD,eAAe,EACf,QAAQ,EACR,SAAS,EACT,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,wBAAwB,aAAxB,wBAAwB,cAAxB,wBAAwB,GAA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AAmB;wBACjB,CAAC,CAAC,CAAC,MAAA,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,gBAAgB,mCAAI,SAAS,CAAC;wBAC7C,CAAC,CAAC,CAAC,MAAA,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,eAAe,mCAAI,SAAS,CAAC,EAEhD,YAAY,EAAE,qBAAqB,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,SAAS,EAC7E,QAAQ,EAAE,mBAAmB,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,YAAY,EACjF,OAAO,EAAE,GAAG,EAAE,CAAC,kBAAkB,CAAC,CAAC,cAAc,CAAC,EAClD,OAAO,EAAC,MAAM,EACd,UAAU,EAAC,MAAM,EACjB,SAAS,EAAE,cAAc,CAAC,kBAAkB,CAAC,EAC7C,GAAG,EAAE,sBAAsB,CAAC,IAAI,CAAC,KAAK,EACtC,eAAe,EAAE,mBAAmB,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,GACvD,CACE;YACL,UAAU,CACP,CACF,CACP,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\nimport clsx from 'clsx';\n\nimport { findUpUntil } from '@cloudscape-design/component-toolkit/dom';\n\nimport { InternalButton } from '../../../button/internal';\nimport { getDrawerStyles } from '../compute-layout';\nimport { AppLayoutInternals } from '../interfaces';\n\nimport sharedStyles from '../../resize/styles.css.js';\nimport testutilStyles from '../../test-classes/styles.css.js';\nimport styles from './styles.css.js';\n\ninterface AppLayoutNavigationImplementationProps {\n appLayoutInternals: AppLayoutInternals;\n bottomDrawerReportedSize?: number;\n navigationCollapsible?: boolean;\n}\n\nexport function AppLayoutNavigationImplementation({\n appLayoutInternals,\n bottomDrawerReportedSize,\n navigationCollapsible,\n}: AppLayoutNavigationImplementationProps) {\n const {\n ariaLabels,\n onNavigationToggle,\n isMobile,\n navigationOpen,\n navigation,\n navigationFocusControl,\n placement,\n verticalOffsets,\n } = appLayoutInternals;\n\n const { drawerTopOffset, drawerHeight } = getDrawerStyles(\n verticalOffsets,\n isMobile,\n placement,\n isMobile ? 0 : (bottomDrawerReportedSize ?? 0)\n );\n\n const navigationCollapsed = navigationCollapsible && !navigationOpen && !isMobile;\n\n // Close the Navigation drawer on mobile when a user clicks a link inside.\n const onNavigationClick = (event: React.MouseEvent) => {\n const hasLink = findUpUntil(\n event.target as HTMLElement,\n node => node.tagName === 'A' && !!(node as HTMLAnchorElement).href\n );\n if (hasLink && isMobile) {\n onNavigationToggle(false);\n }\n };\n\n return (\n <div\n className={clsx(styles['navigation-container'], sharedStyles['with-motion-horizontal'], {\n [styles['is-navigation-open']]: navigationOpen,\n [styles['is-navigation-collapsed']]: navigationCollapsed,\n })}\n style={{\n blockSize: drawerHeight,\n insetBlockStart: drawerTopOffset,\n }}\n >\n <nav\n aria-label={ariaLabels?.navigation ?? undefined}\n className={clsx(\n styles.navigation,\n {\n [testutilStyles['drawer-closed']]: !navigationOpen,\n },\n testutilStyles.navigation\n )}\n aria-hidden={!navigationOpen && !navigationCollapsed}\n onClick={onNavigationClick}\n >\n <div\n className={clsx(styles['hide-navigation'], {\n [styles['expand-navigation-toggle']]: navigationCollapsed,\n })}\n >\n <InternalButton\n ariaLabel={\n navigationCollapsed\n ? (ariaLabels?.navigationToggle ?? undefined)\n : (ariaLabels?.navigationClose ?? undefined)\n }\n ariaExpanded={navigationCollapsible && !isMobile ? navigationOpen : undefined}\n iconName={navigationCollapsed ? 'angle-right' : isMobile ? 'close' : 'angle-left'}\n onClick={() => onNavigationToggle(!navigationOpen)}\n variant=\"icon\"\n formAction=\"none\"\n className={testutilStyles['navigation-close']}\n ref={navigationFocusControl.refs.close}\n analyticsAction={navigationCollapsed ? 'open' : 'close'}\n />\n </div>\n {navigation}\n </nav>\n </div>\n );\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/app-layout/visual-refresh-toolbar/navigation/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,WAAW,EAAE,MAAM,0CAA0C,CAAC;AAEvE,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAGpD,OAAO,YAAY,MAAM,4BAA4B,CAAC;AACtD,OAAO,cAAc,MAAM,kCAAkC,CAAC;AAC9D,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAQrC,MAAM,UAAU,iCAAiC,CAAC,EAChD,kBAAkB,EAClB,wBAAwB,EACxB,qBAAqB,GACkB;;IACvC,MAAM,EACJ,UAAU,EACV,kBAAkB,EAClB,QAAQ,EACR,cAAc,EACd,UAAU,EACV,sBAAsB,EACtB,SAAS,EACT,eAAe,GAChB,GAAG,kBAAkB,CAAC;IAEvB,MAAM,EAAE,eAAe,EAAE,YAAY,EAAE,GAAG,eAAe,CACvD,eAAe,EACf,QAAQ,EACR,SAAS,EACT,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,wBAAwB,aAAxB,wBAAwB,cAAxB,wBAAwB,GAAI,CAAC,CAAC,CAC/C,CAAC;IAEF,MAAM,mBAAmB,GAAG,qBAAqB,IAAI,CAAC,cAAc,IAAI,CAAC,QAAQ,CAAC;IAElF,0EAA0E;IAC1E,MAAM,iBAAiB,GAAG,CAAC,KAAuB,EAAE,EAAE;QACpD,MAAM,OAAO,GAAG,WAAW,CACzB,KAAK,CAAC,MAAqB,EAC3B,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,OAAO,KAAK,GAAG,IAAI,CAAC,CAAE,IAA0B,CAAC,IAA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C,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,YAAY,EACjF,OAAO,EAAE,GAAG,EAAE,CAAC,kBAAkB,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,KAAK,CAAC,EAClF,OAAO,EAAC,MAAM,EACd,UAAU,EAAC,MAAM,EACjB,SAAS,EAAE,cAAc,CAAC,kBAAkB,CAAC,EAC7C,GAAG,EAAE,sBAAsB,CAAC,IAAI,CAAC,KAAK,EACtC,eAAe,EAAE,mBAAmB,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,GACvD,CACE;YACL,UAAU,CACP,CACF,CACP,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\nimport clsx from 'clsx';\n\nimport { findUpUntil } from '@cloudscape-design/component-toolkit/dom';\n\nimport { InternalButton } from '../../../button/internal';\nimport { getDrawerStyles } from '../compute-layout';\nimport { AppLayoutInternals } from '../interfaces';\n\nimport sharedStyles from '../../resize/styles.css.js';\nimport testutilStyles from '../../test-classes/styles.css.js';\nimport styles from './styles.css.js';\n\ninterface AppLayoutNavigationImplementationProps {\n appLayoutInternals: AppLayoutInternals;\n bottomDrawerReportedSize?: number;\n navigationCollapsible?: boolean;\n}\n\nexport function AppLayoutNavigationImplementation({\n appLayoutInternals,\n bottomDrawerReportedSize,\n navigationCollapsible,\n}: AppLayoutNavigationImplementationProps) {\n const {\n ariaLabels,\n onNavigationToggle,\n isMobile,\n navigationOpen,\n navigation,\n navigationFocusControl,\n placement,\n verticalOffsets,\n } = appLayoutInternals;\n\n const { drawerTopOffset, drawerHeight } = getDrawerStyles(\n verticalOffsets,\n isMobile,\n placement,\n isMobile ? 0 : (bottomDrawerReportedSize ?? 0)\n );\n\n const navigationCollapsed = navigationCollapsible && !navigationOpen && !isMobile;\n\n // Close the Navigation drawer on mobile when a user clicks a link inside.\n const onNavigationClick = (event: React.MouseEvent) => {\n const hasLink = findUpUntil(\n event.target as HTMLElement,\n node => node.tagName === 'A' && !!(node as HTMLAnchorElement).href\n );\n if (hasLink && isMobile) {\n onNavigationToggle(false);\n }\n };\n\n return (\n <div\n className={clsx(styles['navigation-container'], sharedStyles['with-motion-horizontal'], {\n [styles['is-navigation-open']]: navigationOpen,\n [styles['is-navigation-collapsed']]: navigationCollapsed,\n })}\n style={{\n blockSize: drawerHeight,\n insetBlockStart: drawerTopOffset,\n }}\n >\n <nav\n aria-label={ariaLabels?.navigation ?? undefined}\n className={clsx(\n styles.navigation,\n {\n [testutilStyles['drawer-closed']]: !navigationOpen,\n },\n testutilStyles.navigation\n )}\n aria-hidden={!navigationOpen && !navigationCollapsed}\n onClick={onNavigationClick}\n >\n <div\n className={clsx(styles['hide-navigation'], {\n [styles['expand-navigation-toggle']]: navigationCollapsed,\n })}\n >\n <InternalButton\n ariaLabel={\n navigationCollapsed\n ? (ariaLabels?.navigationToggle ?? undefined)\n : (ariaLabels?.navigationClose ?? undefined)\n }\n ariaExpanded={navigationCollapsible && !isMobile ? navigationOpen : undefined}\n iconName={navigationCollapsed ? 'angle-right' : isMobile ? 'close' : 'angle-left'}\n onClick={() => onNavigationToggle(navigationCollapsible ? !navigationOpen : false)}\n variant=\"icon\"\n formAction=\"none\"\n className={testutilStyles['navigation-close']}\n ref={navigationFocusControl.refs.close}\n analyticsAction={navigationCollapsed ? 'open' : 'close'}\n />\n </div>\n {navigation}\n </nav>\n </div>\n );\n}\n"]}
@@ -188,7 +188,7 @@ export declare namespace BoxProps {
188
188
  borderRadius?: BoxProps.VisualAccent.BorderRadius;
189
189
  }
190
190
  namespace VisualAccent {
191
- type Color = 'red' | 'yellow' | 'indigo' | 'green' | 'orange' | 'purple' | 'mint' | 'lime' | 'grey' | 'teal' | 'cyan' | 'blue' | 'violet' | 'fuchsia' | 'magenta' | 'pink' | 'rose' | 'amber';
191
+ type Color = 'red' | 'yellow' | 'indigo' | 'green' | 'orange' | 'purple' | 'lime' | 'grey' | 'teal' | 'blue' | 'violet' | 'magenta' | 'pink' | 'amber';
192
192
  type AspectRatio = 'auto' | 'equal';
193
193
  type BorderRadius = 'xxxs' | 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl' | 'xxxl' | 'full';
194
194
  }
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/box/interfaces.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D;;GAEG;AACH,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAE9D,MAAM,WAAW,QAAS,SAAQ,kBAAkB;IAClD;;;;;;;;;;;;;;OAcG;IACH,OAAO,CAAC,EAAE,QAAQ,CAAC,OAAO,CAAC;IAC3B;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,YAAY,CAAC,EAAE,QAAQ,CAAC,YAAY,CAAC;IACrC;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;;;;;;OASG;IACH,OAAO,CAAC,EAAE,QAAQ,CAAC,OAAO,CAAC;IAC3B;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,MAAM,CAAC,EAAE,QAAQ,CAAC,WAAW,GAAG,QAAQ,CAAC,OAAO,CAAC;IACjD;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,OAAO,CAAC,EAAE,QAAQ,CAAC,WAAW,GAAG,QAAQ,CAAC,OAAO,CAAC;IAClD;;OAEG;IACH,SAAS,CAAC,EAAE,QAAQ,CAAC,SAAS,CAAC;IAC/B;;OAEG;IACH,KAAK,CAAC,EAAE,QAAQ,CAAC,KAAK,CAAC;IACvB;;OAEG;IACH,QAAQ,CAAC,EAAE,QAAQ,CAAC,QAAQ,CAAC;IAC7B;;;OAGG;IACH,UAAU,CAAC,EAAE,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1B,KAAY,WAAW,GAAG,GAAG,GAAG,MAAM,GAAG,KAAK,GAAG,IAAI,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,IAAI,GAAG,KAAK,GAAG,MAAM,CAAC;IAChG,UAAiB,OAAO;QACtB,GAAG,CAAC,EAAE,QAAQ,CAAC,WAAW,CAAC;QAC3B,KAAK,CAAC,EAAE,QAAQ,CAAC,WAAW,CAAC;QAC7B,MAAM,CAAC,EAAE,QAAQ,CAAC,WAAW,CAAC;QAC9B,IAAI,CAAC,EAAE,QAAQ,CAAC,WAAW,CAAC;QAC5B,UAAU,CAAC,EAAE,QAAQ,CAAC,WAAW,CAAC;QAClC,QAAQ,CAAC,EAAE,QAAQ,CAAC,WAAW,CAAC;KACjC;CACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/box/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { BaseComponentProps } from '../types/base-component';\n/**\n * @awsuiSystem core\n */\nimport { NativeAttributes } from '../types/native-attributes';\n\nexport interface BoxProps extends BaseComponentProps {\n /**\n * Defines the style of element to display.\n *\n * - If you set it to `'div'`, `'span'`, `'h1'`, `'h2'`, `'h3'`, `'h4'`, `'h5'`, `'p'`, `'strong'`, `'small'`, `'code'`, `'pre'`, or `'samp'`, the variant is also used as the HTML tag name.\n * - If you set it to `awsui-key-label`, the component will render a `div`,\n * styled for use as a key label in key-value pairs.\n * - If you set it to `awsui-gen-ai-label`, the component will render a `div`,\n * styled for use as a label indicating that content is produced by generative AI.\n * - If you set it to `awsui-value-large`, the component will render a `span`,\n * styled using \"Display large light\" typography.\n * - If you set it to `awsui-inline-code`, the component will render a `code` element,\n * styled with a background and padding for inline code snippets.\n *\n * Override the HTML tag by using property `tagOverride`.\n */\n variant?: BoxProps.Variant;\n /**\n * Renders the box as a visual accent wrapper to emphasize its content.\n *\n * Setting this property activates the accent styling: a coordinated background and content\n * color combination that works in both light and dark modes. A `variant` is not required to\n * activate the accent. The accent styling is applied on top of the element determined by\n * `variant` (or `tagOverride`), so the rendered HTML tag is unaffected.\n *\n * The object accepts the following fields:\n * - `color` (required) — the coordinated background and foreground color pair. The foreground\n * color is applied as the wrapper's CSS `color`, so it only affects content that inherits\n * the current color (for example an `Icon`, or a nested `Box` with `color=\"inherit\"`).\n * Content that sets its own color is not overridden.\n * - `aspectRatio` — `auto` (default) lets the wrapper's width follow its content;\n * `equal` forces equal width and height, suitable for wrapping icons.\n * - `borderRadius` — the corner rounding applied to the wrapper, using a t-shirt size keyword\n * from the Box spacing scale (`xxxs`, `xxs`, `xs`, `s`, `m`, `l`, `xl`, `xxl`, `xxxl`), or\n * `full` for fully rounded corners. When not set, the wrapper has no border radius. Set it to\n * `full` together with `aspectRatio: 'equal'` to render a circle.\n *\n * Composes with existing Box props such as `padding` and `margin`.\n */\n visualAccent?: BoxProps.VisualAccent;\n /**\n * Overrides the default HTML tag provided by the variant.\n */\n tagOverride?: string;\n /**\n * Overrides the display of the element. You can set it to the following values:\n *\n * - `block` - Specifies block display.\n * - `inline` - Specifies inline display.\n * - `inline-block` - Specifies inline-block display.\n * - `none` - Hides the box.\n *\n * Note: If you don't set it, the display depends on the variant.\n */\n display?: BoxProps.Display;\n /**\n * Adds margins to the element. It can be the following:\n *\n * - A single string with a size. This applies the same margin to all sides (that is, top, right, bottom, left).\n * - An object specifying the size of the margin per side. The object has the following format:\n * ```\n * {\n * top: \"size of top margin\",\n * right: \"size of right margin\",\n * bottom: \"size of bottom margin\",\n * left: \"size of left margin\",\n * horizontal: \"size of left and right margin\",\n * vertical: \"size of top and bottom margin\",\n * }\n * ```\n *\n * The size can be `n`, `xxxs`, `xxs`, `xs`, `s`, `m`, `l`, `xl`, `xxl`, `xxxl`, where `n` stands for none.\n * Sizes are automatically scaled down in compact mode.\n *\n * For example, `margin=\"s\"` adds a small margin to all sides.\n * `margin={{ right: \"l\", bottom: \"s\" }}` adds a small margin to the bottom and a large margin to the right.\n */\n margin?: BoxProps.SpacingSize | BoxProps.Spacing;\n /**\n * Adds padding to the element. It can be the following:\n *\n * - A single string with a size. This applies the same padding to all sides (that is, top, right, bottom, left).\n * - An object specifying the size of padding per side. The object has the following format:\n * ```\n * {\n * top: \"size of top padding\",\n * right: \"size of right padding\",\n * bottom: \"size of bottom padding\",\n * left: \"size of left padding\",\n * horizontal: \"size of left and right padding\",\n * vertical: \"size of top and bottom padding\",\n * }\n * ```\n *\n * The size can be `n`, `xxxs`, `xxs`, `xs`, `s`, `m`, `l`, `xl`, `xxl`, `xxxl`, where `n` stands for none.\n * Sizes are automatically scaled down in compact mode.\n *\n * For example, `padding=\"s\"` adds small padding to all sides.\n * `padding={{ right: \"l\", bottom: \"s\" }}` adds small padding to the bottom and large padding to the right.\n */\n padding?: BoxProps.SpacingSize | BoxProps.Spacing;\n /**\n * Defines the text alignment within the element. You can set it to `left`, `center`, or `right`.\n */\n textAlign?: BoxProps.TextAlign;\n /**\n * Defines the floating behavior. You can set it to `left` or `right`.\n */\n float?: BoxProps.Float;\n /**\n * Overrides the font size and line height. If not set, the font size and line height depend on the variant.\n */\n fontSize?: BoxProps.FontSize;\n /**\n * Overrides the font weight. If not set, the value depends on the variant.\n * @visualrefresh 'heavy'\n */\n fontWeight?: BoxProps.FontWeight;\n /**\n * Overrides the text color. You can set it to the following values:\n *\n * - `inherit` - Inherits the color from the parent element. For example, use this to style content\n * in Flashbars and to style the `empty` and `noMatch` slots of the Table and Cards components.\n * - `text-label` - Specifies the text color for non-form labels. For example, use it for the key in key/value pairs.\n * - `text-body-secondary` - Specifies the color for secondary text.\n * - `text-status-error` - Specifies the color for error text and icons.\n * - `text-status-success` - Specifies the color for success text and icons.\n * - `text-status-info` - Specifies the color for info text and icon.\n * - `text-status-inactive` - Specifies the color for inactive and loading text and icons.\n * - `text-status-warning` - Specifies the color for warning text and icons.\n *\n * Note: If you don't set it, the text color depends on the variant.\n */\n color?: BoxProps.Color;\n /**\n * Content of the box.\n * @displayname content\n */\n children?: React.ReactNode;\n\n /**\n * Attributes to add to the native element.\n * Some attributes will be automatically combined with internal attribute values:\n * - `className` will be appended.\n * - Event handlers will be chained, unless the default is prevented.\n *\n * We do not support using this attribute to apply custom styling.\n *\n * @awsuiSystem core\n */\n nativeAttributes?: NativeAttributes<React.HTMLAttributes<HTMLElement>>;\n}\n\nexport namespace BoxProps {\n export type Variant =\n | 'div'\n | 'span'\n | 'h1'\n | 'h2'\n | 'h3'\n | 'h4'\n | 'h5'\n | 'p'\n | 'strong'\n | 'small'\n | 'code'\n | 'pre'\n | 'samp'\n | 'awsui-key-label'\n | 'awsui-gen-ai-label'\n | 'awsui-value-large'\n | 'awsui-inline-code';\n\n export interface VisualAccent {\n /**\n * The coordinated background and foreground color pair applied to the accent wrapper.\n * Each color works in both light and dark modes.\n *\n * The background color is applied directly to the wrapper. The foreground color is applied\n * as the wrapper's CSS `color` and is therefore only picked up by content that inherits the\n * current color, such as an `Icon` or a nested `Box` with `color=\"inherit\"`. Content that\n * defines its own color (for example a `Box` with an explicit `color`, or a `Link`) keeps that\n * color and is not recolored by the accent.\n */\n color: BoxProps.VisualAccent.Color;\n /**\n * Controls the aspect ratio of the accent wrapper.\n *\n * - `auto` (default) — the wrapper's width follows its content.\n * - `equal` — the wrapper has equal width and height, suitable for wrapping icons.\n *\n * Combine `aspectRatio: 'equal'` with `borderRadius: 'full'` to render a circle.\n */\n aspectRatio?: BoxProps.VisualAccent.AspectRatio;\n /**\n * The corner rounding applied to the accent wrapper. When not set, the wrapper has no\n * border radius.\n *\n * Use one of the curated t-shirt size keywords, which map to the same spacing scale used by\n * `padding` and `margin`: `xxxs`, `xxs`, `xs`, `s`, `m`, `l`, `xl`, `xxl`, or `xxxl`. Use\n * `full` for fully rounded corners; combine it with `aspectRatio: 'equal'` to render a circle.\n */\n borderRadius?: BoxProps.VisualAccent.BorderRadius;\n }\n\n export namespace VisualAccent {\n export type Color =\n | 'red'\n | 'yellow'\n | 'indigo'\n | 'green'\n | 'orange'\n | 'purple'\n | 'mint'\n | 'lime'\n | 'grey'\n | 'teal'\n | 'cyan'\n | 'blue'\n | 'violet'\n | 'fuchsia'\n | 'magenta'\n | 'pink'\n | 'rose'\n | 'amber';\n export type AspectRatio = 'auto' | 'equal';\n export type BorderRadius = 'xxxs' | 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl' | 'xxxl' | 'full';\n }\n\n export type Display = 'block' | 'inline' | 'inline-block' | 'none';\n export type TextAlign = 'left' | 'center' | 'right';\n export type Float = 'left' | 'right';\n export type FontSize =\n | 'body-s'\n | 'body-m'\n | 'heading-xs'\n | 'heading-s'\n | 'heading-m'\n | 'heading-l'\n | 'heading-xl'\n | 'display-l'\n | 'display-xl';\n export type FontWeight = 'light' | 'normal' | 'bold' | 'heavy';\n export type Color =\n | 'inherit'\n | 'text-label'\n | 'text-body-secondary'\n | 'text-status-error'\n | 'text-status-success'\n | 'text-status-info'\n | 'text-status-inactive'\n | 'text-status-warning';\n export type SpacingSize = 'n' | 'xxxs' | 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl' | 'xxxl';\n export interface Spacing {\n top?: BoxProps.SpacingSize;\n right?: BoxProps.SpacingSize;\n bottom?: BoxProps.SpacingSize;\n left?: BoxProps.SpacingSize;\n horizontal?: BoxProps.SpacingSize;\n vertical?: BoxProps.SpacingSize;\n }\n}\n"]}
1
+ {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/box/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { BaseComponentProps } from '../types/base-component';\n/**\n * @awsuiSystem core\n */\nimport { NativeAttributes } from '../types/native-attributes';\n\nexport interface BoxProps extends BaseComponentProps {\n /**\n * Defines the style of element to display.\n *\n * - If you set it to `'div'`, `'span'`, `'h1'`, `'h2'`, `'h3'`, `'h4'`, `'h5'`, `'p'`, `'strong'`, `'small'`, `'code'`, `'pre'`, or `'samp'`, the variant is also used as the HTML tag name.\n * - If you set it to `awsui-key-label`, the component will render a `div`,\n * styled for use as a key label in key-value pairs.\n * - If you set it to `awsui-gen-ai-label`, the component will render a `div`,\n * styled for use as a label indicating that content is produced by generative AI.\n * - If you set it to `awsui-value-large`, the component will render a `span`,\n * styled using \"Display large light\" typography.\n * - If you set it to `awsui-inline-code`, the component will render a `code` element,\n * styled with a background and padding for inline code snippets.\n *\n * Override the HTML tag by using property `tagOverride`.\n */\n variant?: BoxProps.Variant;\n /**\n * Renders the box as a visual accent wrapper to emphasize its content.\n *\n * Setting this property activates the accent styling: a coordinated background and content\n * color combination that works in both light and dark modes. A `variant` is not required to\n * activate the accent. The accent styling is applied on top of the element determined by\n * `variant` (or `tagOverride`), so the rendered HTML tag is unaffected.\n *\n * The object accepts the following fields:\n * - `color` (required) — the coordinated background and foreground color pair. The foreground\n * color is applied as the wrapper's CSS `color`, so it only affects content that inherits\n * the current color (for example an `Icon`, or a nested `Box` with `color=\"inherit\"`).\n * Content that sets its own color is not overridden.\n * - `aspectRatio` — `auto` (default) lets the wrapper's width follow its content;\n * `equal` forces equal width and height, suitable for wrapping icons.\n * - `borderRadius` — the corner rounding applied to the wrapper, using a t-shirt size keyword\n * from the Box spacing scale (`xxxs`, `xxs`, `xs`, `s`, `m`, `l`, `xl`, `xxl`, `xxxl`), or\n * `full` for fully rounded corners. When not set, the wrapper has no border radius. Set it to\n * `full` together with `aspectRatio: 'equal'` to render a circle.\n *\n * Composes with existing Box props such as `padding` and `margin`.\n */\n visualAccent?: BoxProps.VisualAccent;\n /**\n * Overrides the default HTML tag provided by the variant.\n */\n tagOverride?: string;\n /**\n * Overrides the display of the element. You can set it to the following values:\n *\n * - `block` - Specifies block display.\n * - `inline` - Specifies inline display.\n * - `inline-block` - Specifies inline-block display.\n * - `none` - Hides the box.\n *\n * Note: If you don't set it, the display depends on the variant.\n */\n display?: BoxProps.Display;\n /**\n * Adds margins to the element. It can be the following:\n *\n * - A single string with a size. This applies the same margin to all sides (that is, top, right, bottom, left).\n * - An object specifying the size of the margin per side. The object has the following format:\n * ```\n * {\n * top: \"size of top margin\",\n * right: \"size of right margin\",\n * bottom: \"size of bottom margin\",\n * left: \"size of left margin\",\n * horizontal: \"size of left and right margin\",\n * vertical: \"size of top and bottom margin\",\n * }\n * ```\n *\n * The size can be `n`, `xxxs`, `xxs`, `xs`, `s`, `m`, `l`, `xl`, `xxl`, `xxxl`, where `n` stands for none.\n * Sizes are automatically scaled down in compact mode.\n *\n * For example, `margin=\"s\"` adds a small margin to all sides.\n * `margin={{ right: \"l\", bottom: \"s\" }}` adds a small margin to the bottom and a large margin to the right.\n */\n margin?: BoxProps.SpacingSize | BoxProps.Spacing;\n /**\n * Adds padding to the element. It can be the following:\n *\n * - A single string with a size. This applies the same padding to all sides (that is, top, right, bottom, left).\n * - An object specifying the size of padding per side. The object has the following format:\n * ```\n * {\n * top: \"size of top padding\",\n * right: \"size of right padding\",\n * bottom: \"size of bottom padding\",\n * left: \"size of left padding\",\n * horizontal: \"size of left and right padding\",\n * vertical: \"size of top and bottom padding\",\n * }\n * ```\n *\n * The size can be `n`, `xxxs`, `xxs`, `xs`, `s`, `m`, `l`, `xl`, `xxl`, `xxxl`, where `n` stands for none.\n * Sizes are automatically scaled down in compact mode.\n *\n * For example, `padding=\"s\"` adds small padding to all sides.\n * `padding={{ right: \"l\", bottom: \"s\" }}` adds small padding to the bottom and large padding to the right.\n */\n padding?: BoxProps.SpacingSize | BoxProps.Spacing;\n /**\n * Defines the text alignment within the element. You can set it to `left`, `center`, or `right`.\n */\n textAlign?: BoxProps.TextAlign;\n /**\n * Defines the floating behavior. You can set it to `left` or `right`.\n */\n float?: BoxProps.Float;\n /**\n * Overrides the font size and line height. If not set, the font size and line height depend on the variant.\n */\n fontSize?: BoxProps.FontSize;\n /**\n * Overrides the font weight. If not set, the value depends on the variant.\n * @visualrefresh 'heavy'\n */\n fontWeight?: BoxProps.FontWeight;\n /**\n * Overrides the text color. You can set it to the following values:\n *\n * - `inherit` - Inherits the color from the parent element. For example, use this to style content\n * in Flashbars and to style the `empty` and `noMatch` slots of the Table and Cards components.\n * - `text-label` - Specifies the text color for non-form labels. For example, use it for the key in key/value pairs.\n * - `text-body-secondary` - Specifies the color for secondary text.\n * - `text-status-error` - Specifies the color for error text and icons.\n * - `text-status-success` - Specifies the color for success text and icons.\n * - `text-status-info` - Specifies the color for info text and icon.\n * - `text-status-inactive` - Specifies the color for inactive and loading text and icons.\n * - `text-status-warning` - Specifies the color for warning text and icons.\n *\n * Note: If you don't set it, the text color depends on the variant.\n */\n color?: BoxProps.Color;\n /**\n * Content of the box.\n * @displayname content\n */\n children?: React.ReactNode;\n\n /**\n * Attributes to add to the native element.\n * Some attributes will be automatically combined with internal attribute values:\n * - `className` will be appended.\n * - Event handlers will be chained, unless the default is prevented.\n *\n * We do not support using this attribute to apply custom styling.\n *\n * @awsuiSystem core\n */\n nativeAttributes?: NativeAttributes<React.HTMLAttributes<HTMLElement>>;\n}\n\nexport namespace BoxProps {\n export type Variant =\n | 'div'\n | 'span'\n | 'h1'\n | 'h2'\n | 'h3'\n | 'h4'\n | 'h5'\n | 'p'\n | 'strong'\n | 'small'\n | 'code'\n | 'pre'\n | 'samp'\n | 'awsui-key-label'\n | 'awsui-gen-ai-label'\n | 'awsui-value-large'\n | 'awsui-inline-code';\n\n export interface VisualAccent {\n /**\n * The coordinated background and foreground color pair applied to the accent wrapper.\n * Each color works in both light and dark modes.\n *\n * The background color is applied directly to the wrapper. The foreground color is applied\n * as the wrapper's CSS `color` and is therefore only picked up by content that inherits the\n * current color, such as an `Icon` or a nested `Box` with `color=\"inherit\"`. Content that\n * defines its own color (for example a `Box` with an explicit `color`, or a `Link`) keeps that\n * color and is not recolored by the accent.\n */\n color: BoxProps.VisualAccent.Color;\n /**\n * Controls the aspect ratio of the accent wrapper.\n *\n * - `auto` (default) — the wrapper's width follows its content.\n * - `equal` — the wrapper has equal width and height, suitable for wrapping icons.\n *\n * Combine `aspectRatio: 'equal'` with `borderRadius: 'full'` to render a circle.\n */\n aspectRatio?: BoxProps.VisualAccent.AspectRatio;\n /**\n * The corner rounding applied to the accent wrapper. When not set, the wrapper has no\n * border radius.\n *\n * Use one of the curated t-shirt size keywords, which map to the same spacing scale used by\n * `padding` and `margin`: `xxxs`, `xxs`, `xs`, `s`, `m`, `l`, `xl`, `xxl`, or `xxxl`. Use\n * `full` for fully rounded corners; combine it with `aspectRatio: 'equal'` to render a circle.\n */\n borderRadius?: BoxProps.VisualAccent.BorderRadius;\n }\n\n export namespace VisualAccent {\n export type Color =\n | 'red'\n | 'yellow'\n | 'indigo'\n | 'green'\n | 'orange'\n | 'purple'\n | 'lime'\n | 'grey'\n | 'teal'\n | 'blue'\n | 'violet'\n | 'magenta'\n | 'pink'\n | 'amber';\n export type AspectRatio = 'auto' | 'equal';\n export type BorderRadius = 'xxxs' | 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl' | 'xxxl' | 'full';\n }\n\n export type Display = 'block' | 'inline' | 'inline-block' | 'none';\n export type TextAlign = 'left' | 'center' | 'right';\n export type Float = 'left' | 'right';\n export type FontSize =\n | 'body-s'\n | 'body-m'\n | 'heading-xs'\n | 'heading-s'\n | 'heading-m'\n | 'heading-l'\n | 'heading-xl'\n | 'display-l'\n | 'display-xl';\n export type FontWeight = 'light' | 'normal' | 'bold' | 'heavy';\n export type Color =\n | 'inherit'\n | 'text-label'\n | 'text-body-secondary'\n | 'text-status-error'\n | 'text-status-success'\n | 'text-status-info'\n | 'text-status-inactive'\n | 'text-status-warning';\n export type SpacingSize = 'n' | 'xxxs' | 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl' | 'xxxl';\n export interface Spacing {\n top?: BoxProps.SpacingSize;\n right?: BoxProps.SpacingSize;\n bottom?: BoxProps.SpacingSize;\n left?: BoxProps.SpacingSize;\n horizontal?: BoxProps.SpacingSize;\n vertical?: BoxProps.SpacingSize;\n }\n}\n"]}