@cloudscape-design/components-themeable 3.0.1399 → 3.0.1401

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 (224) hide show
  1. package/lib/internal/manifest.json +1 -1
  2. package/lib/internal/scss/autosuggest/styles.scss +5 -0
  3. package/lib/internal/scss/copy-to-clipboard/styles.scss +7 -7
  4. package/lib/internal/scss/flashbar/collapsible.scss +21 -11
  5. package/lib/internal/scss/flashbar/styles.scss +26 -8
  6. package/lib/internal/scss/icon/hover-motion.scss +21 -0
  7. package/lib/internal/scss/icon/styles.scss +2 -1
  8. package/lib/internal/scss/input/styles.scss +32 -15
  9. package/lib/internal/scss/internal/components/autosuggest-input/styles.scss +4 -90
  10. package/lib/internal/scss/internal/components/option/styles.scss +8 -0
  11. package/lib/internal/scss/internal/components/radio-button/styles.scss +2 -0
  12. package/lib/internal/scss/internal/components/sticky-header/mixins.scss +11 -0
  13. package/lib/internal/scss/internal/generated/custom-css-properties/index.scss +1 -1
  14. package/lib/internal/scss/multiselect/styles.scss +22 -0
  15. package/lib/internal/scss/radio-button/styles.scss +1 -2
  16. package/lib/internal/scss/radio-group/styles.scss +3 -0
  17. package/lib/internal/scss/segmented-control/segment.scss +29 -6
  18. package/lib/internal/scss/segmented-control/styles.scss +26 -4
  19. package/lib/internal/scss/select/parts/styles.scss +15 -2
  20. package/lib/internal/scss/select/styles.scss +20 -0
  21. package/lib/internal/scss/table/resizer/styles.scss +4 -4
  22. package/lib/internal/scss/table/styles.scss +2 -5
  23. package/lib/internal/template/autosuggest/index.d.ts.map +1 -1
  24. package/lib/internal/template/autosuggest/index.js +1 -1
  25. package/lib/internal/template/autosuggest/index.js.map +1 -1
  26. package/lib/internal/template/autosuggest/internal.d.ts +6 -0
  27. package/lib/internal/template/autosuggest/internal.d.ts.map +1 -1
  28. package/lib/internal/template/autosuggest/internal.js +2 -2
  29. package/lib/internal/template/autosuggest/internal.js.map +1 -1
  30. package/lib/internal/template/autosuggest/styles.css.js +3 -3
  31. package/lib/internal/template/autosuggest/styles.scoped.css +5 -3
  32. package/lib/internal/template/autosuggest/styles.selectors.js +3 -3
  33. package/lib/internal/template/button-dropdown/filter.d.ts +1 -1
  34. package/lib/internal/template/button-dropdown/filter.d.ts.map +1 -1
  35. package/lib/internal/template/cards/index.js +1 -1
  36. package/lib/internal/template/cards/index.js.map +1 -1
  37. package/lib/internal/template/container/internal.d.ts +3 -2
  38. package/lib/internal/template/container/internal.d.ts.map +1 -1
  39. package/lib/internal/template/container/internal.js +2 -2
  40. package/lib/internal/template/container/internal.js.map +1 -1
  41. package/lib/internal/template/container/use-sticky-header.d.ts +0 -8
  42. package/lib/internal/template/container/use-sticky-header.d.ts.map +1 -1
  43. package/lib/internal/template/container/use-sticky-header.js +9 -92
  44. package/lib/internal/template/container/use-sticky-header.js.map +1 -1
  45. package/lib/internal/template/copy-to-clipboard/internal.d.ts.map +1 -1
  46. package/lib/internal/template/copy-to-clipboard/internal.js +2 -16
  47. package/lib/internal/template/copy-to-clipboard/internal.js.map +1 -1
  48. package/lib/internal/template/copy-to-clipboard/styles.css.js +10 -10
  49. package/lib/internal/template/copy-to-clipboard/styles.scoped.css +19 -19
  50. package/lib/internal/template/copy-to-clipboard/styles.selectors.js +10 -10
  51. package/lib/internal/template/flashbar/collapsible-flashbar.d.ts +1 -1
  52. package/lib/internal/template/flashbar/collapsible-flashbar.d.ts.map +1 -1
  53. package/lib/internal/template/flashbar/collapsible-flashbar.js +10 -4
  54. package/lib/internal/template/flashbar/collapsible-flashbar.js.map +1 -1
  55. package/lib/internal/template/flashbar/flash.d.ts +6 -0
  56. package/lib/internal/template/flashbar/flash.d.ts.map +1 -1
  57. package/lib/internal/template/flashbar/flash.js +6 -6
  58. package/lib/internal/template/flashbar/flash.js.map +1 -1
  59. package/lib/internal/template/flashbar/internal-interfaces.d.ts +11 -1
  60. package/lib/internal/template/flashbar/internal-interfaces.d.ts.map +1 -1
  61. package/lib/internal/template/flashbar/internal-interfaces.js.map +1 -1
  62. package/lib/internal/template/flashbar/non-collapsible-flashbar.d.ts.map +1 -1
  63. package/lib/internal/template/flashbar/non-collapsible-flashbar.js +8 -1
  64. package/lib/internal/template/flashbar/non-collapsible-flashbar.js.map +1 -1
  65. package/lib/internal/template/flashbar/styles.css.js +50 -50
  66. package/lib/internal/template/flashbar/styles.scoped.css +184 -161
  67. package/lib/internal/template/flashbar/styles.selectors.js +50 -50
  68. package/lib/internal/template/icon/generated/icons.d.ts +4 -0
  69. package/lib/internal/template/icon/generated/icons.d.ts.map +1 -1
  70. package/lib/internal/template/icon/generated/icons.js +14 -0
  71. package/lib/internal/template/icon/generated/icons.js.map +1 -1
  72. package/lib/internal/template/icon/styles.css.js +44 -43
  73. package/lib/internal/template/icon/styles.scoped.css +109 -107
  74. package/lib/internal/template/icon/styles.selectors.js +44 -43
  75. package/lib/internal/template/icon-provider/interfaces.d.ts +1 -1
  76. package/lib/internal/template/icon-provider/interfaces.d.ts.map +1 -1
  77. package/lib/internal/template/icon-provider/interfaces.js.map +1 -1
  78. package/lib/internal/template/input/internal.d.ts +1 -1
  79. package/lib/internal/template/input/internal.d.ts.map +1 -1
  80. package/lib/internal/template/input/internal.js +4 -2
  81. package/lib/internal/template/input/internal.js.map +1 -1
  82. package/lib/internal/template/input/styles.css.js +45 -44
  83. package/lib/internal/template/input/styles.scoped.css +102 -94
  84. package/lib/internal/template/input/styles.selectors.js +45 -44
  85. package/lib/internal/template/internal/base-component/styles.scoped.css +1 -1
  86. package/lib/internal/template/internal/components/autosuggest-input/index.d.ts +5 -0
  87. package/lib/internal/template/internal/components/autosuggest-input/index.d.ts.map +1 -1
  88. package/lib/internal/template/internal/components/autosuggest-input/index.js +22 -61
  89. package/lib/internal/template/internal/components/autosuggest-input/index.js.map +1 -1
  90. package/lib/internal/template/internal/components/autosuggest-input/inline-tokens.d.ts +1 -0
  91. package/lib/internal/template/internal/components/autosuggest-input/inline-tokens.d.ts.map +1 -1
  92. package/lib/internal/template/internal/components/autosuggest-input/inline-tokens.js +4 -2
  93. package/lib/internal/template/internal/components/autosuggest-input/inline-tokens.js.map +1 -1
  94. package/lib/internal/template/internal/components/autosuggest-input/styles.css.js +11 -33
  95. package/lib/internal/template/internal/components/autosuggest-input/styles.scoped.css +15 -233
  96. package/lib/internal/template/internal/components/autosuggest-input/styles.selectors.js +11 -33
  97. package/lib/internal/template/internal/components/autosuggest-input/use-token-overflow.d.ts +4 -8
  98. package/lib/internal/template/internal/components/autosuggest-input/use-token-overflow.d.ts.map +1 -1
  99. package/lib/internal/template/internal/components/autosuggest-input/use-token-overflow.js +16 -29
  100. package/lib/internal/template/internal/components/autosuggest-input/use-token-overflow.js.map +1 -1
  101. package/lib/internal/template/internal/components/option/index.d.ts.map +1 -1
  102. package/lib/internal/template/internal/components/option/index.js +2 -2
  103. package/lib/internal/template/internal/components/option/index.js.map +1 -1
  104. package/lib/internal/template/internal/components/option/styles.css.js +19 -18
  105. package/lib/internal/template/internal/components/option/styles.scoped.css +39 -33
  106. package/lib/internal/template/internal/components/option/styles.selectors.js +19 -18
  107. package/lib/internal/template/internal/components/radio-button/index.d.ts +1 -1
  108. package/lib/internal/template/internal/components/radio-button/index.d.ts.map +1 -1
  109. package/lib/internal/template/internal/components/radio-button/index.js.map +1 -1
  110. package/lib/internal/template/internal/components/radio-button/styles.css.js +7 -7
  111. package/lib/internal/template/internal/components/radio-button/styles.scoped.css +36 -12
  112. package/lib/internal/template/internal/components/radio-button/styles.selectors.js +7 -7
  113. package/lib/internal/template/internal/components/sortable-area/index.d.ts.map +1 -1
  114. package/lib/internal/template/internal/components/sortable-area/index.js +34 -4
  115. package/lib/internal/template/internal/components/sortable-area/index.js.map +1 -1
  116. package/lib/internal/template/internal/components/sortable-area/keyboard-sensor/index.js +1 -1
  117. package/lib/internal/template/internal/components/sortable-area/keyboard-sensor/index.js.map +1 -1
  118. package/lib/internal/template/{table → internal/components/sticky-header}/sticky-scrolling.d.ts +1 -6
  119. package/lib/internal/template/internal/components/sticky-header/sticky-scrolling.d.ts.map +1 -0
  120. package/lib/internal/template/{table → internal/components/sticky-header}/sticky-scrolling.js +2 -7
  121. package/lib/internal/template/internal/components/sticky-header/sticky-scrolling.js.map +1 -0
  122. package/lib/internal/template/internal/components/sticky-header/use-cells-resize-observer.d.ts +2 -0
  123. package/lib/internal/template/internal/components/sticky-header/use-cells-resize-observer.d.ts.map +1 -0
  124. package/lib/internal/template/internal/components/sticky-header/use-cells-resize-observer.js +39 -0
  125. package/lib/internal/template/internal/components/sticky-header/use-cells-resize-observer.js.map +1 -0
  126. package/lib/internal/template/internal/components/sticky-header/use-header-stuck.d.ts +8 -0
  127. package/lib/internal/template/internal/components/sticky-header/use-header-stuck.d.ts.map +1 -0
  128. package/lib/internal/template/internal/components/sticky-header/use-header-stuck.js +35 -0
  129. package/lib/internal/template/internal/components/sticky-header/use-header-stuck.js.map +1 -0
  130. package/lib/internal/template/internal/components/sticky-header/use-sticky-header-copy.d.ts +14 -0
  131. package/lib/internal/template/internal/components/sticky-header/use-sticky-header-copy.d.ts.map +1 -0
  132. package/lib/internal/template/{table/use-sticky-header.js → internal/components/sticky-header/use-sticky-header-copy.js} +7 -8
  133. package/lib/internal/template/internal/components/sticky-header/use-sticky-header-copy.js.map +1 -0
  134. package/lib/internal/template/internal/components/sticky-header/use-sticky-position.d.ts +22 -0
  135. package/lib/internal/template/internal/components/sticky-header/use-sticky-position.d.ts.map +1 -0
  136. package/lib/internal/template/internal/components/sticky-header/use-sticky-position.js +57 -0
  137. package/lib/internal/template/internal/components/sticky-header/use-sticky-position.js.map +1 -0
  138. package/lib/internal/template/internal/environment.js +2 -2
  139. package/lib/internal/template/internal/environment.json +2 -2
  140. package/lib/internal/template/multiselect/index.d.ts.map +1 -1
  141. package/lib/internal/template/multiselect/index.js +1 -1
  142. package/lib/internal/template/multiselect/index.js.map +1 -1
  143. package/lib/internal/template/multiselect/internal.d.ts +12 -1
  144. package/lib/internal/template/multiselect/internal.d.ts.map +1 -1
  145. package/lib/internal/template/multiselect/internal.js +10 -6
  146. package/lib/internal/template/multiselect/internal.js.map +1 -1
  147. package/lib/internal/template/multiselect/styles.css.js +5 -5
  148. package/lib/internal/template/multiselect/styles.scoped.css +17 -5
  149. package/lib/internal/template/multiselect/styles.selectors.js +5 -5
  150. package/lib/internal/template/radio-button/styles.css.js +1 -1
  151. package/lib/internal/template/radio-button/styles.scoped.css +1 -25
  152. package/lib/internal/template/radio-button/styles.selectors.js +1 -1
  153. package/lib/internal/template/radio-group/internal.d.ts +7 -1
  154. package/lib/internal/template/radio-group/internal.d.ts.map +1 -1
  155. package/lib/internal/template/radio-group/internal.js +2 -2
  156. package/lib/internal/template/radio-group/internal.js.map +1 -1
  157. package/lib/internal/template/radio-group/styles.css.js +5 -5
  158. package/lib/internal/template/radio-group/styles.scoped.css +7 -6
  159. package/lib/internal/template/radio-group/styles.selectors.js +5 -5
  160. package/lib/internal/template/segmented-control/internal-segmented-control.d.ts +3 -1
  161. package/lib/internal/template/segmented-control/internal-segmented-control.d.ts.map +1 -1
  162. package/lib/internal/template/segmented-control/internal-segmented-control.js +3 -3
  163. package/lib/internal/template/segmented-control/internal-segmented-control.js.map +1 -1
  164. package/lib/internal/template/segmented-control/internal.d.ts +11 -2
  165. package/lib/internal/template/segmented-control/internal.d.ts.map +1 -1
  166. package/lib/internal/template/segmented-control/internal.js +3 -2
  167. package/lib/internal/template/segmented-control/internal.js.map +1 -1
  168. package/lib/internal/template/segmented-control/segment.d.ts +2 -0
  169. package/lib/internal/template/segmented-control/segment.d.ts.map +1 -1
  170. package/lib/internal/template/segmented-control/segment.js +4 -2
  171. package/lib/internal/template/segmented-control/segment.js.map +1 -1
  172. package/lib/internal/template/segmented-control/styles.css.js +31 -31
  173. package/lib/internal/template/segmented-control/styles.scoped.css +119 -82
  174. package/lib/internal/template/segmented-control/styles.selectors.js +31 -31
  175. package/lib/internal/template/select/index.d.ts.map +1 -1
  176. package/lib/internal/template/select/index.js +1 -1
  177. package/lib/internal/template/select/index.js.map +1 -1
  178. package/lib/internal/template/select/internal.d.ts +8 -0
  179. package/lib/internal/template/select/internal.d.ts.map +1 -1
  180. package/lib/internal/template/select/internal.js +5 -5
  181. package/lib/internal/template/select/internal.js.map +1 -1
  182. package/lib/internal/template/select/parts/filter.d.ts +1 -1
  183. package/lib/internal/template/select/parts/filter.d.ts.map +1 -1
  184. package/lib/internal/template/select/parts/styles.css.js +22 -21
  185. package/lib/internal/template/select/parts/styles.scoped.css +28 -24
  186. package/lib/internal/template/select/parts/styles.selectors.js +22 -21
  187. package/lib/internal/template/select/parts/trigger.d.ts +6 -0
  188. package/lib/internal/template/select/parts/trigger.d.ts.map +1 -1
  189. package/lib/internal/template/select/parts/trigger.js +4 -4
  190. package/lib/internal/template/select/parts/trigger.js.map +1 -1
  191. package/lib/internal/template/select/styles.css.js +3 -3
  192. package/lib/internal/template/select/styles.scoped.css +14 -3
  193. package/lib/internal/template/select/styles.selectors.js +3 -3
  194. package/lib/internal/template/styling/autosuggest.scss +1 -0
  195. package/lib/internal/template/styling/flashbar.scss +127 -0
  196. package/lib/internal/template/styling/multiselect.scss +80 -0
  197. package/lib/internal/template/styling/radio-group.scss +1 -0
  198. package/lib/internal/template/styling/segmented-control.scss +111 -0
  199. package/lib/internal/template/styling/select.scss +80 -0
  200. package/lib/internal/template/table/resizer/styles.css.js +17 -17
  201. package/lib/internal/template/table/resizer/styles.scoped.css +30 -29
  202. package/lib/internal/template/table/resizer/styles.selectors.js +17 -17
  203. package/lib/internal/template/table/sticky-header.d.ts.map +1 -1
  204. package/lib/internal/template/table/sticky-header.js +8 -2
  205. package/lib/internal/template/table/sticky-header.js.map +1 -1
  206. package/lib/internal/template/table/styles.css.js +37 -37
  207. package/lib/internal/template/table/styles.scoped.css +47 -47
  208. package/lib/internal/template/table/styles.selectors.js +37 -37
  209. package/lib/internal/template/table/use-column-widths.d.ts.map +1 -1
  210. package/lib/internal/template/table/use-column-widths.js +4 -16
  211. package/lib/internal/template/table/use-column-widths.js.map +1 -1
  212. package/lib/internal/template/toggle/internal.d.ts.map +1 -1
  213. package/lib/internal/template/toggle/internal.js +1 -1
  214. package/lib/internal/template/toggle/internal.js.map +1 -1
  215. package/lib/internal/template/token-group/internal.d.ts +5 -1
  216. package/lib/internal/template/token-group/internal.d.ts.map +1 -1
  217. package/lib/internal/template/token-group/internal.js +2 -2
  218. package/lib/internal/template/token-group/internal.js.map +1 -1
  219. package/package.json +1 -1
  220. package/lib/internal/template/table/sticky-scrolling.d.ts.map +0 -1
  221. package/lib/internal/template/table/sticky-scrolling.js.map +0 -1
  222. package/lib/internal/template/table/use-sticky-header.d.ts +0 -6
  223. package/lib/internal/template/table/use-sticky-header.d.ts.map +0 -1
  224. package/lib/internal/template/table/use-sticky-header.js.map +0 -1
@@ -1,3 +1,3 @@
1
1
  {
2
- "commit": "8a3001d727d1280fa5bfafaf8e3554a416e42d4d"
2
+ "commit": "1a6b6c2b66ab2883122812e79ad4917e00e413da"
3
3
  }
@@ -3,6 +3,11 @@
3
3
  SPDX-License-Identifier: Apache-2.0
4
4
  */
5
5
 
6
+ @use '../internal/styles/style-api' as style-api;
7
+
8
+ @include style-api.docs-forward('input', 'input');
9
+ @include style-api.docs-forward('dropdown', 'dropdown', 'container');
10
+
6
11
  .root {
7
12
  inline-size: 100%;
8
13
  }
@@ -19,13 +19,6 @@
19
19
  inset: 0;
20
20
  }
21
21
 
22
- .icon-swap-copy,
23
- .icon-swap-result {
24
- position: absolute;
25
- inset-block-start: 0;
26
- inset-inline-start: 0;
27
- }
28
-
29
22
  .icon-swap-copy {
30
23
  opacity: 1;
31
24
  transform: scale(1);
@@ -38,6 +31,13 @@
38
31
  @include motion.exiting-with-motion;
39
32
  }
40
33
 
34
+ .icon-swap > .icon-swap-copy,
35
+ .icon-swap > .icon-swap-result {
36
+ position: absolute;
37
+ inset-block-start: 0;
38
+ inset-inline-start: 0;
39
+ }
40
+
41
41
  .icon-swap-copied > .icon-swap-copy {
42
42
  opacity: 0;
43
43
  transform: scale(0);
@@ -9,8 +9,21 @@
9
9
  @use '../internal/styles' as styles;
10
10
  @use '../internal/styles/typography' as typography;
11
11
  @use '../internal/styles/utils/theming' as theming;
12
+ @use '../internal/styles/style-api' as style-api;
12
13
  @use './collapsible.motion';
13
14
 
15
+ // Style API v2. The focus-ring tokens are registered once, in styles.scss.
16
+ $_bar-tokens: style-api.resolve(style-api.$focus-ring, carrier);
17
+ @include style-api.docs(
18
+ 'notificationBar',
19
+ $_bar-tokens,
20
+ $properties: (color, background, border, border-radius, box-shadow, padding),
21
+ $descriptions: (
22
+ slot:
23
+ 'The bar under the stacked messages that expands and collapses the stack. Rendered for `stackItems` with more than one message; use `:hover` and `:active` for interaction states.'
24
+ )
25
+ );
26
+
14
27
  $notification-bar-top-overlap: (
15
28
  'collapsed': calc(#{awsui.$space-scaled-xl} + 3px),
16
29
  'expanded': awsui.$space-scaled-s,
@@ -171,6 +184,7 @@ the grid layout will be:
171
184
  }
172
185
 
173
186
  .stack > .notification-bar {
187
+ @include style-api.carriers($_bar-tokens);
174
188
  @include styles.text-wrapping;
175
189
  background: var(#{custom-props.$styleBackgroundDefault}, awsui.$color-background-notification-stack-bar);
176
190
  border-color: var(#{custom-props.$styleBorderColorDefault}, awsui.$color-border-notification-stack-bar);
@@ -203,7 +217,7 @@ the grid layout will be:
203
217
  > .status > .item-count,
204
218
  > .button {
205
219
  @include typography.default-text-style;
206
- color: awsui.$color-text-notification-stack-bar;
220
+ color: inherit;
207
221
  cursor: pointer;
208
222
  margin-block: 0;
209
223
  padding-block: 0;
@@ -278,9 +292,6 @@ the grid layout will be:
278
292
  @include theming.one-theme-only {
279
293
  padding-inline: 0;
280
294
  }
281
- #{custom-props.$styleFocusRingBoxShadow}: 0 0 0
282
- var(#{custom-props.$styleFocusRingBorderWidth}, foundation.$box-shadow-focused-width)
283
- var(#{custom-props.$styleFocusRingBorderColor}, awsui.$color-border-notification-stack-bar-focused);
284
295
 
285
296
  > .icon {
286
297
  @include styles.with-motion {
@@ -296,13 +307,12 @@ the grid layout will be:
296
307
  }
297
308
 
298
309
  @include focus-visible.when-visible {
299
- @include styles.focus-highlight(
300
- $gutter: 0px,
301
- $border-radius: var(
302
- #{custom-props.$styleFocusRingBorderRadius},
303
- awsui.$border-radius-control-default-focus-ring
304
- ),
305
- $box-shadow: var(#{custom-props.$styleFocusRingBoxShadow})
310
+ @include style-api.focus-highlight(
311
+ $gutter-block: 0px,
312
+ $gutter-inline: 0px,
313
+ $radius: var(#{custom-props.$styleFocusRingBorderRadius}, awsui.$border-radius-control-default-focus-ring),
314
+ $width: var(#{custom-props.$styleFocusRingBorderWidth}, foundation.$box-shadow-focused-width),
315
+ $color: var(#{custom-props.$styleFocusRingBorderColor}, awsui.$color-border-notification-stack-bar-focused)
306
316
  );
307
317
  }
308
318
  }
@@ -8,9 +8,30 @@
8
8
  @use '../internal/styles' as styles;
9
9
  @use '../internal/styles/typography' as typography;
10
10
  @use '../internal/styles/foundation' as foundation;
11
+ @use '../internal/styles/style-api' as style-api;
11
12
  @use './motion';
12
13
  @use './collapsible';
13
14
 
15
+ // Style API v2. The focus-ring tokens are registered once here, for the item slot and the notificationBar slot
16
+ // (collapsible.scss).
17
+ $_item-tokens: style-api.resolve(style-api.$focus-ring, carrier);
18
+ @include style-api.register($_item-tokens);
19
+ @include style-api.docs(
20
+ 'item',
21
+ $_item-tokens,
22
+ $properties: (color, background, border, border-radius, box-shadow, padding),
23
+ $descriptions: (
24
+ slot:
25
+ 'One flash message: its box and focus ring. Accepts a class name, or a function of `{ item }` that returns one, so each `type` can take its own class.'
26
+ )
27
+ );
28
+ @include style-api.docs(
29
+ 'icon',
30
+ $properties: (color),
31
+ $descriptions: (slot: 'The status icon, or the spinner for `loading`.')
32
+ );
33
+ @include style-api.docs-forward('dismissButton', 'button', 'root');
34
+
14
35
  .flashbar {
15
36
  position: relative;
16
37
  /* stylelint-disable-next-line selector-max-type */
@@ -26,6 +47,7 @@
26
47
  }
27
48
 
28
49
  .flash {
50
+ @include style-api.carriers($_item-tokens);
29
51
  position: relative;
30
52
  display: flex;
31
53
  justify-content: flex-start;
@@ -41,10 +63,6 @@
41
63
  overflow-wrap: break-word;
42
64
  word-wrap: break-word;
43
65
  box-shadow: awsui.$shadow-flash-sticky;
44
-
45
- #{custom-props.$styleFocusRingBoxShadow}: 0 0 0
46
- var(#{custom-props.$styleFocusRingBorderWidth}, foundation.$box-shadow-focused-width)
47
- var(#{custom-props.$styleFocusRingBorderColor}, awsui.$color-border-item-focused);
48
66
  }
49
67
 
50
68
  .initial-hidden {
@@ -83,10 +101,10 @@
83
101
  outline: none;
84
102
  }
85
103
  @include focus-visible.when-visible {
86
- @include styles.focus-highlight(
87
- $gutter: awsui.$space-button-focus-outline-gutter,
88
- $border-radius: var(#{custom-props.$styleFocusRingBorderRadius}, awsui.$border-radius-control-default-focus-ring),
89
- $box-shadow: var(#{custom-props.$styleFocusRingBoxShadow})
104
+ @include style-api.focus-highlight(
105
+ $radius: var(#{custom-props.$styleFocusRingBorderRadius}, awsui.$border-radius-control-default-focus-ring),
106
+ $width: var(#{custom-props.$styleFocusRingBorderWidth}, foundation.$box-shadow-focused-width),
107
+ $color: var(#{custom-props.$styleFocusRingBorderColor}, awsui.$color-border-item-focused)
90
108
  );
91
109
  }
92
110
  }
@@ -692,6 +692,17 @@ $icon-hover-motion: (
692
692
  ),
693
693
  ),
694
694
  ),
695
+ 'view-vertical-start': (
696
+ (
697
+ part: 'awsui-icon-panel',
698
+ animation: icon-panel-slide-left,
699
+ duration: 600ms,
700
+ easing: cubic-bezier(0.65, 0, 0.35, 1),
701
+ base: (
702
+ transform-box: fill-box,
703
+ ),
704
+ ),
705
+ ),
695
706
  'zoom-in': (
696
707
  (
697
708
  part: 'awsui-icon-arm',
@@ -1920,6 +1931,16 @@ $icon-hover-motion: (
1920
1931
  }
1921
1932
  }
1922
1933
 
1934
+ @keyframes icon-panel-slide-left {
1935
+ 0%,
1936
+ 100% {
1937
+ transform: translateX(0);
1938
+ }
1939
+ 45% {
1940
+ transform: translateX(-300%);
1941
+ }
1942
+ }
1943
+
1923
1944
  @keyframes icon-bar-slide-left {
1924
1945
  0%,
1925
1946
  100% {
@@ -54,7 +54,8 @@
54
54
  .name-send,
55
55
  .name-shrink,
56
56
  .name-undo,
57
- .name-view-vertical
57
+ .name-view-vertical,
58
+ .name-view-vertical-start
58
59
  ) {
59
60
  @include styles.with-direction('rtl') {
60
61
  transform: scaleX(-1);
@@ -177,7 +177,6 @@ $input-tokens: style-api.resolve(
177
177
  inline-size: 100%;
178
178
  box-sizing: border-box;
179
179
  cursor: text;
180
- overflow: clip;
181
180
  color: var(#{custom-props.$styleColorDefault}, awsui.$color-text-form-secondary);
182
181
  border-start-start-radius: styles.$control-border-radius;
183
182
  border-start-end-radius: styles.$control-border-radius;
@@ -194,6 +193,11 @@ $input-tokens: style-api.resolve(
194
193
  @include styles.input-hover-styles;
195
194
  }
196
195
 
196
+ // Inline content can open popovers (e.g. the token overflow dropdown) that must not be clipped.
197
+ &:not(.input-field-has-inline-content) {
198
+ overflow: clip;
199
+ }
200
+
197
201
  &.input-field-readonly {
198
202
  color: var(
199
203
  #{custom-props.$styleColorReadonly},
@@ -260,19 +264,6 @@ $input-tokens: style-api.resolve(
260
264
  border-end-end-radius: awsui.$border-radius-dropdown;
261
265
  }
262
266
 
263
- // Nested so the grouped corner rules win over the field's own radius by specificity, not by source order.
264
- &.input-field-no-border {
265
- min-block-size: unset;
266
- &,
267
- &:hover,
268
- &:focus-within {
269
- border-block-width: 0;
270
- border-inline-width: 0;
271
- box-shadow: none;
272
- background-color: transparent;
273
- }
274
- }
275
-
276
267
  &.grouped {
277
268
  // Unlike other controls, input's padding is rendered by the inner input element and not by its wrapper,
278
269
  // so we should not add extra space to the wrapper for the validation border.
@@ -316,8 +307,28 @@ $input-tokens: style-api.resolve(
316
307
  cursor: default;
317
308
  }
318
309
 
310
+ // Starts the inline content one small gap after the start icon, which is offset from the outer border edge.
311
+ $inline-content-icon-padding: calc(
312
+ #{styles.$control-icon-horizontal-offset} + #{awsui.$size-icon-normal} + #{awsui.$space-xxs} -
313
+ #{awsui.$border-width-field}
314
+ );
315
+
316
+ .input-inline-content {
317
+ display: flex;
318
+ min-inline-size: 0;
319
+ padding-inline-start: $inline-content-icon-padding;
320
+ // Inline content is not editable text, so it does not show the field's text cursor.
321
+ cursor: default;
322
+
323
+ // The inline content already clears the start icon; the input keeps room to type.
324
+ + .input {
325
+ padding-inline-start: styles.$control-padding-horizontal;
326
+ min-inline-size: 20%;
327
+ }
328
+ }
329
+
319
330
  // The wider invalid/warning start border is absorbed by the first cell, so the content does not shift.
320
- // The first cell is the prefix when present, otherwise the native input.
331
+ // The first cell is the prefix when present, then the inline content, otherwise the native input.
321
332
  .input-field-invalid,
322
333
  .input-field-warning {
323
334
  > .input-prefix,
@@ -325,6 +336,12 @@ $input-tokens: style-api.resolve(
325
336
  padding-inline-start: styles.$invalid-control-left-padding;
326
337
  }
327
338
 
339
+ > .input-inline-content:first-child {
340
+ padding-inline-start: calc(
341
+ #{$inline-content-icon-padding} - (#{styles.$invalid-control-left-border} - #{awsui.$border-width-field})
342
+ );
343
+ }
344
+
328
345
  > .input-has-icon-start:first-child {
329
346
  padding-inline-start: calc(
330
347
  #{styles.$control-icon-horizontal-padding} -
@@ -5,8 +5,6 @@
5
5
 
6
6
  @use '../../../internal/styles/tokens' as awsui;
7
7
  @use '../../../internal/styles' as styles;
8
- @use '../../../internal/styles/foundation' as foundation;
9
- @use '../../../internal/generated/custom-css-properties/index.scss' as custom-props;
10
8
 
11
9
  .root {
12
10
  // Used in test-utils.
@@ -21,86 +19,6 @@
21
19
  display: contents;
22
20
  }
23
21
 
24
- .token-field-container {
25
- position: relative;
26
- inline-size: 100%;
27
- }
28
-
29
- .token-field {
30
- display: flex;
31
- align-items: center;
32
- flex-wrap: nowrap;
33
- inline-size: 100%;
34
- box-sizing: border-box;
35
- min-block-size: awsui.$size-vertical-input;
36
- padding-inline-start: styles.$control-padding-horizontal;
37
- padding-inline-end: 0;
38
- column-gap: awsui.$space-xxs;
39
- @include styles.logical-radius(styles.$control-border-radius);
40
- @include styles.input-default-styles;
41
-
42
- &:hover {
43
- @include styles.input-hover-styles;
44
- }
45
-
46
- &:focus-within {
47
- background-color: var(#{custom-props.$styleBackgroundFocus}, awsui.$color-background-input-default);
48
- @include styles.input-focus-styles;
49
- }
50
-
51
- &.token-field-disabled {
52
- @include styles.form-disabled-element(
53
- $background-color: var(#{custom-props.$styleBackgroundDisabled}, awsui.$color-background-input-disabled),
54
- $border-color: var(#{custom-props.$styleBorderColorDisabled}, awsui.$color-border-input-disabled),
55
- $color: var(#{custom-props.$styleColorDisabled}, awsui.$color-text-input-disabled),
56
- $cursor: default
57
- );
58
- box-shadow: var(#{custom-props.$styleBoxShadowDisabled});
59
- }
60
-
61
- &.token-field-readonly {
62
- box-shadow: var(#{custom-props.$styleBoxShadowReadonly});
63
- @include styles.input-readonly-styles;
64
- }
65
-
66
- &.token-field-invalid {
67
- @include styles.form-invalid-control(
68
- $color: var(#{custom-props.$styleColorDefault}, awsui.$color-text-status-error),
69
- $border-color: var(#{custom-props.$styleBorderColorDefault}, awsui.$color-text-status-error),
70
- $focus-box-shadow: var(#{custom-props.$styleBoxShadowFocus}, foundation.$box-shadow-focused-light-invalid)
71
- );
72
-
73
- &:focus-within {
74
- box-shadow: var(#{custom-props.$styleBoxShadowFocus}, foundation.$box-shadow-focused-light-invalid);
75
- }
76
- }
77
-
78
- &.token-field-warning {
79
- @include styles.form-warning-control(
80
- $color: var(#{custom-props.$styleColorDefault}, awsui.$color-text-status-warning),
81
- $border-color: var(#{custom-props.$styleBorderColorDefault}, awsui.$color-text-status-warning),
82
- $focus-box-shadow: var(#{custom-props.$styleBoxShadowFocus}, foundation.$box-shadow-focused-light-invalid)
83
- );
84
-
85
- &:focus-within {
86
- box-shadow: var(#{custom-props.$styleBoxShadowFocus}, foundation.$box-shadow-focused-light-invalid);
87
- }
88
- }
89
-
90
- &.grouped {
91
- @include styles.grouped-control;
92
- &.token-field-disabled {
93
- @include styles.grouped-control-disabled;
94
- }
95
- }
96
- }
97
-
98
- .token-field-icon {
99
- display: flex;
100
- align-items: center;
101
- flex-shrink: 0;
102
- }
103
-
104
22
  .token-list {
105
23
  @include styles.styles-reset-ul;
106
24
  display: flex;
@@ -112,20 +30,16 @@
112
30
  }
113
31
 
114
32
  .inline-tokens {
115
- display: contents;
33
+ display: flex;
34
+ align-items: center;
35
+ column-gap: awsui.$space-xxs;
36
+ min-inline-size: 0;
116
37
  }
117
38
 
118
39
  .token-list-item {
119
40
  display: contents;
120
41
  }
121
42
 
122
- .token-input-wrapper {
123
- flex: 1 1 0;
124
- min-inline-size: 20%;
125
- overflow: hidden;
126
- margin-inline-start: calc(-1 * #{awsui.$space-xxs});
127
- }
128
-
129
43
  .token-overflow {
130
44
  flex-shrink: 0;
131
45
  }
@@ -29,6 +29,14 @@
29
29
  color: awsui.$color-text-dropdown-group-label;
30
30
  }
31
31
  }
32
+ // Inside a trigger (Select `triggerVariant="option"`, inline Token) the option shows the selected value and
33
+ // takes the trigger's font and color, also when disabled, so a font or color set on the trigger reaches it.
34
+ &.in-trigger {
35
+ font-family: inherit;
36
+ font-size: inherit;
37
+ font-weight: inherit;
38
+ color: inherit;
39
+ }
32
40
  }
33
41
 
34
42
  .content {
@@ -14,6 +14,8 @@ $radio-size: awsui.$size-control;
14
14
 
15
15
  $_control-props: style-api.combine((fill-color, border-color, indicator-color), style-api.$focus-ring);
16
16
  $_control-tokens: style-api.resolve($_control-props, carrier);
17
+ // Registered here, next to the carrier, so every component that renders this control loads the registration.
18
+ @include style-api.register($_control-tokens);
17
19
 
18
20
  .radio-control {
19
21
  @include style-api.carriers($_control-tokens);
@@ -0,0 +1,11 @@
1
+ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
+ // SPDX-License-Identifier: Apache-2.0
3
+
4
+ // The sticky copy scrolls horizontally in step with the body, which owns the visible scrollbar.
5
+ @mixin copy-scroller {
6
+ overflow: auto;
7
+ scrollbar-width: none; /* Firefox */
8
+ &::-webkit-scrollbar {
9
+ display: none; /* Safari and Chrome */
10
+ }
11
+ }
@@ -1,6 +1,6 @@
1
1
 
2
2
  // Build environment
3
- $awsui-commit-hash: "8a3001d7";
3
+ $awsui-commit-hash: "1a6b6c2b";
4
4
  // Manually managed CSS-variables
5
5
  $maxContentWidth: --awsui-max-content-width-8i8exb;
6
6
  $minContentWidth: --awsui-min-content-width-8i8exb;
@@ -5,6 +5,28 @@
5
5
 
6
6
  @use '../internal/styles' as styles;
7
7
  @use '../internal/styles/tokens' as awsui;
8
+ @use '../internal/styles/style-api' as style-api;
9
+
10
+ // The trigger is the Select trigger part; its placeholder reads the carrier set on `.trigger-button` there.
11
+ $trigger-tokens: style-api.resolve((placeholder-color), carrier);
12
+ @include style-api.register($trigger-tokens);
13
+ @include style-api.docs(
14
+ 'trigger',
15
+ $trigger-tokens,
16
+ $properties: (color, background, border, border-radius, box-shadow, padding, font-family, font-size, font-weight),
17
+ $descriptions: (
18
+ slot:
19
+ 'The trigger button, which is also the field box. Pass a different class for the states you control (`invalid`, `warning`, `disabled`, `readOnly`); use `:hover` and `:focus` for interaction states.',
20
+ properties: (
21
+ color: 'The placeholder is styled with `--awsui-style-placeholder-color`.',
22
+ box-shadow: 'Also draws the focus ring under `:focus`.',
23
+ )
24
+ )
25
+ );
26
+ @include style-api.docs('inlineLabel', $properties: (color, background, font-family, font-size, font-weight));
27
+ @include style-api.docs-forward('filter', 'input');
28
+ @include style-api.docs-forward('dropdown', 'dropdown', 'container');
29
+ @include style-api.docs-forward('token', 'token');
8
30
 
9
31
  .root {
10
32
  @include styles.styles-reset;
@@ -6,10 +6,9 @@
6
6
  @use '../internal/styles' as styles;
7
7
  @use '../internal/styles/style-api' as style-api;
8
8
 
9
- // The control slot is painted by the shared internal radio button, which reads the same token map.
9
+ // The control slot is painted by the shared internal radio button, which reads the same token map and registers it.
10
10
  $control-props: style-api.combine((fill-color, border-color, indicator-color), style-api.$focus-ring);
11
11
  $control-tokens: style-api.resolve($control-props, carrier);
12
- @include style-api.register($control-tokens);
13
12
  @include style-api.docs('control', $control-tokens);
14
13
 
15
14
  .radio-button {
@@ -5,6 +5,9 @@
5
5
 
6
6
  @use '../internal/styles' as styles;
7
7
  @use '../internal/styles/tokens' as awsui;
8
+ @use '../internal/styles/style-api' as style-api;
9
+
10
+ @include style-api.docs-forward('radioButton', 'radio-button');
8
11
 
9
12
  .radio-group {
10
13
  @include styles.styles-reset;
@@ -8,8 +8,16 @@
8
8
  @use '../internal/styles/foundation' as foundation;
9
9
  @use '../internal/generated/custom-css-properties/index.scss' as custom-props;
10
10
  @use '../internal/styles/utils/theming' as theming;
11
+ @use '../internal/styles/style-api' as style-api;
11
12
  @use '@cloudscape-design/component-toolkit/internal/focus-visible' as focus-visible;
12
13
 
14
+ // Style API v2. The root radius is a carrier so the segments can derive their own radius from it; the segment
15
+ // focus ring and the divider (the ::after of the segment) read carriers re-anchored on the segment.
16
+ $root-tokens: style-api.resolve((border-radius), carrier);
17
+ $segment-tokens: style-api.resolve(style-api.$focus-ring, carrier);
18
+ $divider-tokens: style-api.resolve((color, width), carrier);
19
+ @include style-api.register($segment-tokens, $divider-tokens);
20
+
13
21
  $default-background: var(#{custom-props.$styleBackgroundDefault}, awsui.$color-background-segment-default);
14
22
  $default-color: var(#{custom-props.$styleColorDefault}, awsui.$color-text-segment-default);
15
23
  $hover-background: var(#{custom-props.$styleBackgroundHover}, awsui.$color-background-segment-hover);
@@ -23,9 +31,12 @@ $segment-border-width: var(#{$segment-border-width-prop}, 0);
23
31
  $segment-gap: awsui.$space-static-xxs;
24
32
  $segment-divider-width: 1px;
25
33
  $one-theme-segment-gap: calc(#{$segment-gap} - #{$segment-divider-width});
26
- $segment-radius: calc(awsui.$border-radius-button - (#{awsui.$border-width-field} + #{awsui.$border-width-button}));
34
+ $root-radius: style-api.value($root-tokens, border-radius, awsui.$border-radius-button);
35
+ $segment-radius: calc($root-radius - (#{awsui.$border-width-field} + #{awsui.$border-width-button}));
27
36
 
28
37
  .segment {
38
+ @include style-api.carriers($segment-tokens);
39
+ @include style-api.carriers($divider-tokens);
29
40
  @include styles.font-body-m;
30
41
  @include styles.text-flex-wrapping;
31
42
  @include styles.font-button;
@@ -69,13 +80,25 @@ $segment-radius: calc(awsui.$border-radius-button - (#{awsui.$border-width-field
69
80
  }
70
81
 
71
82
  #{custom-props.$styleFocusRingBoxShadow}: 0 0 0
72
- var(#{custom-props.$styleFocusRingBorderWidth}, foundation.$box-shadow-focused-width)
73
- var(#{custom-props.$styleFocusRingBorderColor}, awsui.$color-border-item-focused);
83
+ style-api.value(
84
+ $segment-tokens,
85
+ focus-ring-width,
86
+ var(#{custom-props.$styleFocusRingBorderWidth}, foundation.$box-shadow-focused-width)
87
+ )
88
+ style-api.value(
89
+ $segment-tokens,
90
+ focus-ring-color,
91
+ var(#{custom-props.$styleFocusRingBorderColor}, awsui.$color-border-item-focused)
92
+ );
74
93
 
75
94
  @include focus-visible.when-visible {
76
95
  @include styles.focus-highlight(
77
96
  $gutter: awsui.$space-segmented-control-focus-outline-gutter,
78
- $border-radius: var(#{custom-props.$styleFocusRingBorderRadius}, awsui.$border-radius-control-default-focus-ring),
97
+ $border-radius: style-api.value(
98
+ $segment-tokens,
99
+ focus-ring-radius,
100
+ var(#{custom-props.$styleFocusRingBorderRadius}, awsui.$border-radius-control-default-focus-ring)
101
+ ),
79
102
  $box-shadow: var(#{custom-props.$styleFocusRingBoxShadow}),
80
103
  $z-index: 1 // Prevents adjacent segments from overlapping the focus ring
81
104
  );
@@ -87,8 +110,8 @@ $segment-radius: calc(awsui.$border-radius-button - (#{awsui.$border-width-field
87
110
  inset-inline-end: calc(-1 * ($segment-gap + $segment-divider-width));
88
111
  block-size: calc(100% - (($segment-gap + awsui.$space-static-xxxs) * 2));
89
112
  min-block-size: calc(awsui.$line-height-body-m - $segment-gap * 2);
90
- inline-size: $segment-divider-width;
91
- background: awsui.$color-border-segment-divider;
113
+ inline-size: style-api.value($divider-tokens, width, $segment-divider-width);
114
+ background: style-api.value($divider-tokens, color, awsui.$color-border-segment-divider);
92
115
  z-index: 1;
93
116
  }
94
117
  &:not(.refresh):not(:last-child)::after {
@@ -8,8 +8,29 @@
8
8
  @use 'sass:list' as list;
9
9
  @use '../internal/styles/tokens' as awsui;
10
10
  @use '../internal/styles/utils/theming' as theming;
11
+ @use '../internal/styles/style-api' as style-api;
11
12
  @use '@cloudscape-design/component-toolkit/internal/focus-visible' as focus-visible;
12
13
 
14
+ // Style API v2
15
+ @include style-api.register(seg.$root-tokens);
16
+ @include style-api.docs(
17
+ 'root',
18
+ seg.$root-tokens,
19
+ $properties: (background, border),
20
+ $descriptions: (slot: 'The segment group. The radius is also applied to the segments.')
21
+ );
22
+ @include style-api.docs(
23
+ 'segment',
24
+ seg.$segment-tokens,
25
+ $properties: (color, background, border, border-radius, box-shadow, padding, font-family, font-size, font-weight),
26
+ $descriptions: (
27
+ slot:
28
+ 'Every segment button. Target the selected segment with `[aria-pressed=true]`, a disabled segment with `:disabled` or `[aria-disabled=true]`, and the hover state with `:hover`.'
29
+ )
30
+ );
31
+ @include style-api.docs('divider', seg.$divider-tokens, $descriptions: (slot: 'The line between two segments.'));
32
+ @include style-api.docs-forward('select', 'select');
33
+
13
34
  @function repeatValue($value, $times) {
14
35
  $result: ();
15
36
 
@@ -25,13 +46,14 @@
25
46
  }
26
47
 
27
48
  .segment-part {
49
+ @include style-api.carriers(seg.$root-tokens);
28
50
  display: inline-grid;
29
51
  border-inline: solid awsui.$border-width-field awsui.$color-border-segment-wrapper;
30
52
  border-block: solid awsui.$border-width-field awsui.$color-border-segment-wrapper;
31
- border-start-start-radius: awsui.$border-radius-button;
32
- border-start-end-radius: awsui.$border-radius-button;
33
- border-end-start-radius: awsui.$border-radius-button;
34
- border-end-end-radius: awsui.$border-radius-button;
53
+ border-start-start-radius: seg.$root-radius;
54
+ border-start-end-radius: seg.$root-radius;
55
+ border-end-start-radius: seg.$root-radius;
56
+ border-end-end-radius: seg.$root-radius;
35
57
  background-color: awsui.$color-background-segment-wrapper;
36
58
  align-items: center;
37
59
  min-block-size: calc(awsui.$line-height-body-m + awsui.$space-static-xxs);