@redvars/peacock 4.7.0 → 4.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (277) hide show
  1. package/dist/accordion-item.js +4 -4
  2. package/dist/app-bar.js +1 -1
  3. package/dist/app-shell.js +2 -2
  4. package/dist/assets/styles.css +1 -1
  5. package/dist/assets/styles.css.map +1 -1
  6. package/dist/assets/theme.d.ts +2 -0
  7. package/dist/assets/theme.js +49 -29
  8. package/dist/assets/tokens.css +1 -1
  9. package/dist/assets/tokens.css.map +1 -1
  10. package/dist/bottom-sheet.js +3 -3
  11. package/dist/breadcrumb-item.js +1 -1
  12. package/dist/button-group.js +79 -0
  13. package/dist/button-group.js.map +1 -1
  14. package/dist/button.js +26 -25
  15. package/dist/button.js.map +1 -1
  16. package/dist/calendar-column-view.js +3 -3
  17. package/dist/calendar-month-view.js +3 -3
  18. package/dist/calendar-timeline.js +3 -3
  19. package/dist/card.js +2 -1
  20. package/dist/card.js.map +1 -1
  21. package/dist/carousel.js +182 -7
  22. package/dist/carousel.js.map +1 -1
  23. package/dist/{cartesian-chart-C8qKDXo8.js → cartesian-chart-UW1CYKRS.js} +2 -2
  24. package/dist/{cartesian-chart-C8qKDXo8.js.map → cartesian-chart-UW1CYKRS.js.map} +1 -1
  25. package/dist/cb-group.js +1 -1
  26. package/dist/chart-area.js +2 -2
  27. package/dist/chart-bar.js +2 -2
  28. package/dist/{chart-base-BpQMZZsw.js → chart-base-D5ujPGcl.js} +3 -3
  29. package/dist/{chart-base-BpQMZZsw.js.map → chart-base-D5ujPGcl.js.map} +1 -1
  30. package/dist/chart-doughnut.js +1 -1
  31. package/dist/chart-line.js +2 -2
  32. package/dist/chart-pie.js +2 -2
  33. package/dist/checkbox.js +5 -5
  34. package/dist/chip.js +34 -8
  35. package/dist/chip.js.map +1 -1
  36. package/dist/circular-progress.js +46 -15
  37. package/dist/circular-progress.js.map +1 -1
  38. package/dist/code-highlighter.js +1 -1
  39. package/dist/color-picker.js +1 -1
  40. package/dist/command-palette.js +2 -2
  41. package/dist/comment-composer.js +5 -5
  42. package/dist/condition-builder.js +1 -1
  43. package/dist/{condition-group-base-NcvOY-Zv.js → condition-group-base-DS76sprm.js} +2 -2
  44. package/dist/{condition-group-base-NcvOY-Zv.js.map → condition-group-base-DS76sprm.js.map} +1 -1
  45. package/dist/confirm-dialog.js +2 -2
  46. package/dist/custom-elements-jsdocs.json +302 -10
  47. package/dist/custom-elements.json +1128 -16
  48. package/dist/dependency-map.js +2 -2
  49. package/dist/{diagram-hv7hCgzx.js → diagram-DFO-X7yq.js} +2 -2
  50. package/dist/{diagram-hv7hCgzx.js.map → diagram-DFO-X7yq.js.map} +1 -1
  51. package/dist/diagram.js +1 -1
  52. package/dist/discussion.js +3 -3
  53. package/dist/{document-editor-CZBlz3ai.js → document-editor-CSS-wACs.js} +7 -7
  54. package/dist/{document-editor-CZBlz3ai.js.map → document-editor-CSS-wACs.js.map} +1 -1
  55. package/dist/document-editor.js +3 -3
  56. package/dist/dropdown-button.js +1 -1
  57. package/dist/erd.js +4 -4
  58. package/dist/fab-menu-item.js +189 -0
  59. package/dist/fab-menu-item.js.map +1 -0
  60. package/dist/fab-menu.js +326 -0
  61. package/dist/fab-menu.js.map +1 -0
  62. package/dist/fab.js +28 -17
  63. package/dist/fab.js.map +1 -1
  64. package/dist/field.js +1 -1
  65. package/dist/file-upload.js +1 -1
  66. package/dist/flow.js +1 -1
  67. package/dist/hover-card.js +5 -3
  68. package/dist/hover-card.js.map +1 -1
  69. package/dist/html-editor.js +4 -4
  70. package/dist/icon-button.js +26 -25
  71. package/dist/icon-button.js.map +1 -1
  72. package/dist/{index-DK3fREuj.js → index-BBxpsqx8.js} +4 -4
  73. package/dist/{index-DK3fREuj.js.map → index-BBxpsqx8.js.map} +1 -1
  74. package/dist/{index-CTEt3LtO.js → index-CDtKB0In.js} +4 -4
  75. package/dist/{index-CTEt3LtO.js.map → index-CDtKB0In.js.map} +1 -1
  76. package/dist/{index-Bag4vtx-.js → index-Tb0ky27z.js} +3 -3
  77. package/dist/{index-Bag4vtx-.js.map → index-Tb0ky27z.js.map} +1 -1
  78. package/dist/index.js +15 -12
  79. package/dist/index.js.map +1 -1
  80. package/dist/{indicator-navigation-item-BG0TrdDE.js → indicator-navigation-item-aZsm-RpR.js} +17 -5
  81. package/dist/{indicator-navigation-item-BG0TrdDE.js.map → indicator-navigation-item-aZsm-RpR.js.map} +1 -1
  82. package/dist/inline-edit.js +1 -1
  83. package/dist/json-viewer.js +1 -1
  84. package/dist/linear-progress.js +51 -4
  85. package/dist/linear-progress.js.map +1 -1
  86. package/dist/link-button.js +26 -25
  87. package/dist/link-button.js.map +1 -1
  88. package/dist/loader-full.js +8 -5
  89. package/dist/loader-full.js.map +1 -1
  90. package/dist/loader.js +17 -5
  91. package/dist/loader.js.map +1 -1
  92. package/dist/loading-indicator.js +301 -0
  93. package/dist/loading-indicator.js.map +1 -0
  94. package/dist/markdown-editor.js +4 -4
  95. package/dist/mention-input.js +1 -1
  96. package/dist/menu.js +8 -6
  97. package/dist/menu.js.map +1 -1
  98. package/dist/{modal-Dds0rXAG.js → modal-ClWCCbxD.js} +7 -5
  99. package/dist/{modal-Dds0rXAG.js.map → modal-ClWCCbxD.js.map} +1 -1
  100. package/dist/modal.js +2 -2
  101. package/dist/navigation-bar-item.js +1 -1
  102. package/dist/navigation-bar.js +1 -1
  103. package/dist/navigation-drawer-group.js +1 -1
  104. package/dist/navigation-drawer.js +1 -1
  105. package/dist/navigation-rail-item.js +1 -1
  106. package/dist/navigation-rail.js +1 -1
  107. package/dist/notification-center.js +1 -1
  108. package/dist/number-counter.js +1 -1
  109. package/dist/{overlay-controller-BOk-kfil.js → overlay-controller-iVaiUqos.js} +20 -10
  110. package/dist/{overlay-controller-BOk-kfil.js.map → overlay-controller-iVaiUqos.js.map} +1 -1
  111. package/dist/pagination.js +1 -1
  112. package/dist/popover-content.js +4 -2
  113. package/dist/popover-content.js.map +1 -1
  114. package/dist/popover.js +1 -1
  115. package/dist/{progress-base-BhJK__VP.js → progress-base-BeLu9-Tq.js} +13 -1
  116. package/dist/progress-base-BeLu9-Tq.js.map +1 -0
  117. package/dist/prompt-input.js +5 -5
  118. package/dist/radio.js +3 -3
  119. package/dist/resizable-panels.js +1 -1
  120. package/dist/{rich-text-input-base-SrsPvc-j.js → rich-text-input-base-BCmnkpuV.js} +2 -2
  121. package/dist/{rich-text-input-base-SrsPvc-j.js.map → rich-text-input-base-BCmnkpuV.js.map} +1 -1
  122. package/dist/scroll-area.js +1 -1
  123. package/dist/search.js +1 -1
  124. package/dist/segmented-button.js +7 -2
  125. package/dist/segmented-button.js.map +1 -1
  126. package/dist/select.js +1 -1
  127. package/dist/side-sheet.js +3 -3
  128. package/dist/site-header.js +3 -3
  129. package/dist/site-nav-menu.js +1 -1
  130. package/dist/{slash-controller-DwL0nkqv.js → slash-controller-BFhzSjiR.js} +2 -2
  131. package/dist/{slash-controller-DwL0nkqv.js.map → slash-controller-BFhzSjiR.js.map} +1 -1
  132. package/dist/slider.js +163 -68
  133. package/dist/slider.js.map +1 -1
  134. package/dist/snackbar.js +2 -2
  135. package/dist/sparkline.js +2 -2
  136. package/dist/split-button.js +1 -1
  137. package/dist/src/button/button-group/button-group.d.ts +12 -0
  138. package/dist/src/button/fab/fab.d.ts +1 -0
  139. package/dist/src/carousel/carousel.d.ts +22 -0
  140. package/dist/src/chip/chip/chip.d.ts +4 -0
  141. package/dist/src/fab-menu/fab-menu-item.d.ts +30 -0
  142. package/dist/src/fab-menu/fab-menu.d.ts +64 -0
  143. package/dist/src/fab-menu/index.d.ts +2 -0
  144. package/dist/src/index.d.ts +3 -0
  145. package/dist/src/loading-indicator/index.d.ts +1 -0
  146. package/dist/src/loading-indicator/loading-indicator.d.ts +44 -0
  147. package/dist/src/loading-indicator/shapes.d.ts +29 -0
  148. package/dist/src/progress/circular-progress/circular-progress.d.ts +3 -1
  149. package/dist/src/progress/linear-progress/linear-progress.d.ts +2 -1
  150. package/dist/src/progress/progress-base.d.ts +7 -0
  151. package/dist/src/slider/slider.d.ts +23 -3
  152. package/dist/src/toolbar/toolbar.d.ts +20 -0
  153. package/dist/step.js +1 -1
  154. package/dist/switch.js +5 -2
  155. package/dist/switch.js.map +1 -1
  156. package/dist/tab-group.js +13 -2
  157. package/dist/tab-group.js.map +1 -1
  158. package/dist/tab-panel.js +26 -0
  159. package/dist/tab-panel.js.map +1 -1
  160. package/dist/tab.js +23 -5
  161. package/dist/tab.js.map +1 -1
  162. package/dist/table.js +4 -4
  163. package/dist/tag.js +2 -1
  164. package/dist/tag.js.map +1 -1
  165. package/dist/test/button-group-press.test.d.ts +1 -0
  166. package/dist/test/fab-menu.test.d.ts +1 -0
  167. package/dist/test/loading-indicator.test.d.ts +1 -0
  168. package/dist/toolbar.js +102 -0
  169. package/dist/toolbar.js.map +1 -1
  170. package/dist/tooltip.js +5 -2
  171. package/dist/tooltip.js.map +1 -1
  172. package/dist/tour.js +3 -3
  173. package/dist/tree-chart.js +3 -3
  174. package/dist/tree-item.js +1 -1
  175. package/dist/tsconfig.tsbuildinfo +1 -1
  176. package/dist/{video-DgtGGvrk.js → video-DSQ07o3h.js} +2 -2
  177. package/dist/{video-DgtGGvrk.js.map → video-DSQ07o3h.js.map} +1 -1
  178. package/dist/video.js +1 -1
  179. package/dist/workflow.js +5 -5
  180. package/package.json +1 -1
  181. package/scss/tokens.css +364 -0
  182. package/src/__internal/chart/chart-base.scss +4 -2
  183. package/src/__internal/controllers/overlay-controller.ts +19 -9
  184. package/src/__internal/rich-text/editor-chrome.scss +2 -1
  185. package/src/accordion/accordion-item.scss +10 -6
  186. package/src/app-bar/app-bar.scss +2 -1
  187. package/src/app-shell/app-shell.scss +2 -2
  188. package/src/bottom-sheet/bottom-sheet.scss +4 -2
  189. package/src/breadcrumb/breadcrumb-item/breadcrumb-item.scss +4 -2
  190. package/src/button/button/button-base.scss +14 -12
  191. package/src/button/button/button-layers.scss +27 -5
  192. package/src/button/button-group/button-group.scss +6 -0
  193. package/src/button/button-group/button-group.ts +105 -0
  194. package/src/button/fab/fab-sizes.scss +2 -0
  195. package/src/button/fab/fab.scss +32 -17
  196. package/src/button/fab/fab.ts +1 -0
  197. package/src/calendar/calendar-column-view.scss +3 -3
  198. package/src/calendar/calendar-month-view.scss +3 -3
  199. package/src/calendar-timeline/calendar-timeline.scss +6 -3
  200. package/src/card/card.scss +2 -1
  201. package/src/carousel/carousel.scss +71 -2
  202. package/src/carousel/carousel.ts +159 -7
  203. package/src/chart-pie/chart-pie.scss +4 -2
  204. package/src/checkbox/checkbox.scss +13 -7
  205. package/src/chip/chip/chip.scss +41 -8
  206. package/src/chip/chip/chip.ts +4 -0
  207. package/src/chip/tag/tag.scss +2 -1
  208. package/src/code-highlighter/code-highlighter.scss +2 -1
  209. package/src/color-picker/color-picker.scss +1 -1
  210. package/src/comment-composer/comment-composer.scss +2 -1
  211. package/src/components.manifest.json +21 -0
  212. package/src/condition-builder/condition-group-base.scss +1 -1
  213. package/src/dependency-map/dependency-map.scss +4 -2
  214. package/src/diagram/diagram.scss +2 -1
  215. package/src/document-editor/document-editor.scss +1 -1
  216. package/src/dropdown-button/dropdown-button.scss +2 -1
  217. package/src/erd/erd.scss +8 -4
  218. package/src/fab-menu/fab-menu-item.scss +99 -0
  219. package/src/fab-menu/fab-menu-item.ts +58 -0
  220. package/src/fab-menu/fab-menu.scss +119 -0
  221. package/src/fab-menu/fab-menu.ts +193 -0
  222. package/src/fab-menu/index.ts +2 -0
  223. package/src/field/field.scss +1 -1
  224. package/src/file-upload/file-upload.scss +2 -2
  225. package/src/hover-card/hover-card.scss +9 -2
  226. package/src/index.ts +3 -0
  227. package/src/inline-edit/inline-edit.scss +2 -2
  228. package/src/json-viewer/json-viewer.scss +2 -1
  229. package/src/loader.ts +12 -0
  230. package/src/loading-indicator/index.ts +1 -0
  231. package/src/loading-indicator/loading-indicator.scss +52 -0
  232. package/src/loading-indicator/loading-indicator.ts +164 -0
  233. package/src/loading-indicator/shapes.ts +104 -0
  234. package/src/menu/menu/menu.scss +10 -6
  235. package/src/modal/modal.scss +8 -4
  236. package/src/navigation-drawer/navigation-drawer-group.scss +2 -2
  237. package/src/navigation-drawer/navigation-drawer.scss +3 -2
  238. package/src/navigation-rail/navigation-rail-item.scss +27 -5
  239. package/src/number-counter/number-counter.scss +1 -1
  240. package/src/pagination/pagination.scss +2 -1
  241. package/src/popover/popover-content.scss +7 -2
  242. package/src/progress/circular-progress/circular-progress.scss +3 -2
  243. package/src/progress/circular-progress/circular-progress.ts +43 -12
  244. package/src/progress/linear-progress/linear-progress.scss +70 -2
  245. package/src/progress/linear-progress/linear-progress.ts +4 -1
  246. package/src/progress/progress-base.ts +11 -0
  247. package/src/prompt-input/prompt-input.scss +2 -1
  248. package/src/radio/radio.scss +8 -4
  249. package/src/resizable-panels/resizable-panels.scss +2 -1
  250. package/src/scroll-area/scroll-area.scss +2 -1
  251. package/src/search/search.scss +2 -1
  252. package/src/segmented-button/segmented-button.scss +8 -3
  253. package/src/select/select.scss +2 -1
  254. package/src/side-sheet/side-sheet.scss +4 -2
  255. package/src/site-header/site-header.scss +4 -4
  256. package/src/site-header/site-nav-menu.scss +2 -2
  257. package/src/slider/slider.scss +127 -64
  258. package/src/slider/slider.ts +74 -9
  259. package/src/snackbar/snackbar.scss +5 -2
  260. package/src/sparkline/sparkline.scss +6 -3
  261. package/src/split-button/split-button.scss +4 -2
  262. package/src/stepper/step.scss +2 -1
  263. package/src/switch/switch.scss +21 -2
  264. package/src/table/table.scss +8 -4
  265. package/src/tabs/tab-group.ts +12 -2
  266. package/src/tabs/tab-panel.scss +31 -0
  267. package/src/tabs/tab.scss +28 -17
  268. package/src/toolbar/toolbar-colors.scss +11 -0
  269. package/src/toolbar/toolbar.scss +28 -0
  270. package/src/toolbar/toolbar.ts +74 -1
  271. package/src/tooltip/tooltip.scss +9 -3
  272. package/src/tour/tour.scss +2 -2
  273. package/src/tree/tree-item.scss +2 -1
  274. package/src/tree-chart/tree-chart.scss +3 -3
  275. package/src/video/video.scss +2 -1
  276. package/src/workflow/workflow.scss +5 -5
  277. package/dist/progress-base-BhJK__VP.js.map +0 -1
@@ -37,6 +37,73 @@
37
37
  scroll-snap-align: start;
38
38
  }
39
39
 
40
+ // ── Hero layout (M3 Expressive) ──────────────────────────────────────────
41
+ // One large slide with the next peeking in at the end. Slides are rounded and grow from a smaller
42
+ // size as they scroll into place, then shrink a little as they leave, on a scroll-driven timeline.
43
+
44
+ :host([layout='hero']) {
45
+ .track {
46
+ --_peek: var(--carousel-peek, 25%);
47
+
48
+ // Room after the last slide, so it can scroll to the start like the others.
49
+ &::after {
50
+ content: '';
51
+ flex: 0 0 calc(var(--_peek) - var(--_gap));
52
+ }
53
+ }
54
+
55
+ ::slotted(*) {
56
+ flex: 0 0 calc(100% - var(--_peek) - var(--_gap));
57
+ clip-path: inset(
58
+ 0 round var(--carousel-slide-shape, var(--shape-corner-extra-large))
59
+ );
60
+ transform-origin: 0% 50%;
61
+ animation: carousel-hero linear both;
62
+ animation-timeline: view(inline);
63
+ }
64
+ }
65
+
66
+ // The `carousel-hero` keyframes live in carousel.ts: Sass cannot parse timeline-range selectors.
67
+
68
+ // ── Multi-browse layout (M3 Expressive) ──────────────────────────────────
69
+ // carousel.ts sets the large item's width, the scroll step and the keyframes that move and clip
70
+ // each slide onto the large, medium and small keylines as it scrolls.
71
+
72
+ :host([layout='multi-browse']) {
73
+ .track {
74
+ --_mb-shape: var(--carousel-slide-shape, var(--shape-corner-extra-large));
75
+
76
+ // Room after the last slide, so it can scroll to the start like the others.
77
+ &::after {
78
+ content: '';
79
+ flex: 0 0 calc(var(--_mb-width, 100%) - var(--_mb-step, 0px));
80
+ }
81
+ }
82
+
83
+ ::slotted(*) {
84
+ flex: 0 0 var(--_mb-large, 60%);
85
+ clip-path: inset(0 round var(--_mb-shape));
86
+ scroll-snap-align: start;
87
+ }
88
+ }
89
+
90
+ @supports (animation-timeline: view()) {
91
+ :host([layout='multi-browse']) ::slotted(*) {
92
+ // Each box overlaps the next, so one scroll step is shorter than a large item.
93
+ margin-inline-end: calc(
94
+ var(--_mb-step, 0px) - var(--_mb-large, 0px) - var(--_gap)
95
+ );
96
+ animation: carousel-multi-browse linear both;
97
+ animation-timeline: view(inline);
98
+ }
99
+ }
100
+
101
+ @media (prefers-reduced-motion: reduce) {
102
+ :host([layout='hero']) ::slotted(*) {
103
+ animation: none;
104
+ }
105
+ }
106
+
40
107
  // ── Controls ──────────────────────────────────────────────────────────────
41
108
 
42
109
  .controls {
@@ -75,8 +142,10 @@
75
142
  border-radius: var(--shape-corner-full);
76
143
  background-color: var(--color-outline-variant);
77
144
  transition:
78
- inline-size var(--duration-short4) var(--easing-standard),
79
- background-color var(--duration-short4) var(--easing-standard);
145
+ inline-size var(--motion-spring-fast-spatial-duration)
146
+ var(--motion-spring-fast-spatial-easing),
147
+ background-color var(--motion-spring-fast-effects-duration)
148
+ var(--motion-spring-fast-effects-easing);
80
149
  }
81
150
 
82
151
  &:hover::before {
@@ -1,4 +1,4 @@
1
- import { html, LitElement, nothing, type PropertyValues } from 'lit';
1
+ import { css, html, LitElement, nothing, type PropertyValues } from 'lit';
2
2
  import { property, query, state } from 'lit/decorators.js';
3
3
  import { classMap } from 'lit/directives/class-map.js';
4
4
  import { styleMap } from 'lit/directives/style-map.js';
@@ -12,6 +12,40 @@ export interface CarouselChangeDetail {
12
12
  index: number;
13
13
  }
14
14
 
15
+ /**
16
+ * Hero slides: small while they peek in at the end, full size once they reach the start, then a
17
+ * little smaller as they leave. Written here because Sass cannot parse timeline-range selectors.
18
+ */
19
+ const heroKeyframes = css`
20
+ @keyframes carousel-hero {
21
+ entry 0% {
22
+ scale: 0.82;
23
+ }
24
+ contain 100% {
25
+ scale: 1;
26
+ }
27
+ exit 100% {
28
+ scale: 0.9;
29
+ }
30
+ }
31
+ `;
32
+
33
+ /** Width of the small items at the end of a multi-browse carousel, in pixels. */
34
+ const SMALL_ITEM = 56;
35
+
36
+ /** Below this width a multi-browse carousel shows a large and a small item, without a medium one. */
37
+ const MULTI_BROWSE_THREE_ITEMS = 480;
38
+
39
+ /** Share of the room left after the small item that the large item takes. */
40
+ const LARGE_SHARE = 0.65;
41
+
42
+ interface Keyline {
43
+ /** Where the slide is drawn, from the start edge, in pixels. */
44
+ at: number;
45
+ /** How wide it is drawn. */
46
+ width: number;
47
+ }
48
+
15
49
  /** A slide is never drawn narrower than this, so `per-view` drops on narrow screens. */
16
50
  const MIN_SLIDE_WIDTH = 240;
17
51
 
@@ -50,6 +84,8 @@ const OWN_LABEL = 'data-carousel-label';
50
84
  * @csspart controls - The row of buttons under the slides.
51
85
  *
52
86
  * @cssprop --carousel-gap - Space between slides. Defaults to `--spacing-200`.
87
+ * @cssprop --carousel-peek - With `layout="hero"`, how much of the next slide shows. Defaults to 25%.
88
+ * @cssprop --carousel-slide-shape - With `layout="hero"` or `layout="multi-browse"`, the slides' corner radius. Defaults to var(--shape-corner-extra-large).
53
89
  *
54
90
  * @fires {CustomEvent<CarouselChangeDetail>} change - Dispatched when the slides in view change because the person used a control or scrolled, or autoplay moved on.
55
91
  *
@@ -73,7 +109,7 @@ const OWN_LABEL = 'data-carousel-label';
73
109
  export class Carousel extends LitElement {
74
110
  // ── Static ───────────────────────────────────────────────────────────────
75
111
 
76
- static styles = [styles];
112
+ static styles = [styles, heroKeyframes];
77
113
 
78
114
  // ── Properties ───────────────────────────────────────────────────────────
79
115
 
@@ -101,6 +137,17 @@ export class Carousel extends LitElement {
101
137
  @property({ type: Number })
102
138
  interval = 5000;
103
139
 
140
+ /**
141
+ * `default` lays out `per-view` equal slides. `hero` is the M3 Expressive hero layout: one large
142
+ * slide with the next one peeking in at the end, rounded corners, and slides that grow as they
143
+ * scroll into place. `multi-browse` is the M3 Expressive multi-browse layout: a large slide, then a
144
+ * medium and a small one, and slides grow and shrink as they scroll through those places. Both
145
+ * page one slide at a time and ignore `per-view`. Browsers without scroll-driven animations show
146
+ * `multi-browse` slides at the large size.
147
+ */
148
+ @property({ type: String, reflect: true })
149
+ layout: 'default' | 'hero' | 'multi-browse' = 'default';
150
+
104
151
  // ── State ────────────────────────────────────────────────────────────────
105
152
 
106
153
  @state() private slideCount = 0;
@@ -138,6 +185,12 @@ export class Carousel extends LitElement {
138
185
 
139
186
  private timer?: ReturnType<typeof setInterval>;
140
187
 
188
+ /** Holds the multi-browse keyframes, which depend on the carousel's width. */
189
+ private multiBrowseStyle?: HTMLStyleElement;
190
+
191
+ /** Scroll distance from one multi-browse slide to the next, in pixels. 0 in other layouts. */
192
+ private multiBrowseStep = 0;
193
+
141
194
  private settleTimer?: ReturnType<typeof setTimeout>;
142
195
 
143
196
  private readonly resizeObserver = new ResizeObserver(() =>
@@ -186,6 +239,9 @@ export class Carousel extends LitElement {
186
239
  // Untyped, because it reads private state.
187
240
  protected override updated(changed: PropertyValues) {
188
241
  super.updated(changed);
242
+ if (changed.has('layout') && changed.get('layout') !== undefined) {
243
+ this.syncVisible();
244
+ }
189
245
  if (
190
246
  changed.has('index') ||
191
247
  changed.has('visible') ||
@@ -272,8 +328,95 @@ export class Carousel extends LitElement {
272
328
  if (!track) return;
273
329
  const gap = parseFloat(getComputedStyle(track).columnGap) || 0;
274
330
  const fit = Math.floor((track.clientWidth + gap) / (MIN_SLIDE_WIDTH + gap));
275
- const visible = Math.max(1, Math.min(Math.floor(this.perView) || 1, fit));
331
+ const visible =
332
+ this.layout === 'default'
333
+ ? Math.max(1, Math.min(Math.floor(this.perView) || 1, fit))
334
+ : 1;
276
335
  if (visible !== this.visible) this.visible = visible;
336
+ this.syncMultiBrowse(track, gap);
337
+ }
338
+
339
+ /**
340
+ * Lays out `multi-browse`. Every slide is as wide as the large item, and slides overlap so one
341
+ * scroll step is a third (or half) of the carousel. A scroll-driven animation then moves and
342
+ * clips each slide onto the keylines: large at the start, then medium, then small. Neighbours
343
+ * pass between the same pair of keylines at the same time, so they stay a gap apart.
344
+ */
345
+ private syncMultiBrowse(track: HTMLElement, gap: number) {
346
+ const supported = CSS.supports('animation-timeline', 'view()');
347
+ if (this.layout !== 'multi-browse') {
348
+ this.multiBrowseStep = 0;
349
+ if (this.multiBrowseStyle) this.multiBrowseStyle.textContent = '';
350
+ return;
351
+ }
352
+ const width = track.clientWidth;
353
+ const small = Math.min(SMALL_ITEM, width / 4);
354
+ const three = width >= MULTI_BROWSE_THREE_ITEMS;
355
+ const room = width - small - (three ? 2 : 1) * gap;
356
+ const large = three ? room * LARGE_SHARE : room;
357
+ const medium = room - large;
358
+ const count = three ? 3 : 2;
359
+ const step = supported ? (width + gap) / count : large + gap;
360
+ this.multiBrowseStep = step;
361
+
362
+ track.style.setProperty('--_mb-large', `${large}px`);
363
+ track.style.setProperty('--_mb-step', `${step}px`);
364
+ track.style.setProperty('--_mb-width', `${width}px`);
365
+ if (!supported) return;
366
+
367
+ // Keyline k is where a slide is drawn when its box starts k steps from the start edge.
368
+ const keylines: Keyline[] = [
369
+ { at: -(small + gap), width: small },
370
+ { at: 0, width: large },
371
+ ...(three ? [{ at: large + gap, width: medium }] : []),
372
+ { at: width - small, width: small },
373
+ { at: width + gap, width: small },
374
+ ];
375
+ // The `cover` range runs from the box's start at the end edge to its end at the start edge.
376
+ const range = width + large;
377
+ const points = keylines.map((keyline, i) => ({
378
+ ...keyline,
379
+ box: (i - 1) * step,
380
+ }));
381
+ const frame = (box: number) => {
382
+ // Before the first keyline or after the last, slides keep their offset and size.
383
+ const after = points.findIndex(point => point.box >= box);
384
+ let line: Keyline;
385
+ if (after <= 0) {
386
+ const edge = after === 0 ? points[0] : points[points.length - 1];
387
+ line = { at: edge.at - edge.box + box, width: edge.width };
388
+ } else {
389
+ const [a, b] = [points[after - 1], points[after]];
390
+ const t = (box - a.box) / (b.box - a.box);
391
+ line = {
392
+ at: a.at + (b.at - a.at) * t,
393
+ width: a.width + (b.width - a.width) * t,
394
+ };
395
+ }
396
+ return { shift: line.at - box, clip: large - line.width };
397
+ };
398
+ const rtl = isRtl(this);
399
+ const boxes = [
400
+ width,
401
+ ...points
402
+ .map(point => point.box)
403
+ .filter(box => box < width && box > -large),
404
+ -large,
405
+ ];
406
+ const rules = boxes
407
+ .map(box => {
408
+ const { shift, clip } = frame(box);
409
+ const progress = ((width - box) / range) * 100;
410
+ const inset = rtl ? `0 0 0 ${clip}px` : `0 ${clip}px 0 0`;
411
+ return `${progress.toFixed(3)}% { translate: ${(rtl ? -shift : shift).toFixed(2)}px 0; clip-path: inset(${inset} round var(--_mb-shape)); }`;
412
+ })
413
+ .join('\n');
414
+
415
+ if (!this.multiBrowseStyle) {
416
+ this.multiBrowseStyle = document.createElement('style');
417
+ this.renderRoot.append(this.multiBrowseStyle);
418
+ }
419
+ this.multiBrowseStyle.textContent = `@keyframes carousel-multi-browse {\n${rules}\n}`;
277
420
  }
278
421
 
279
422
  /** Names each slide and makes the ones out of view inert. */
@@ -302,22 +445,31 @@ export class Carousel extends LitElement {
302
445
  const { track } = this;
303
446
  const slide = this.slides[this.index];
304
447
  if (!track || !slide) return;
448
+ const behavior =
449
+ smooth && !this.reducedMotion.matches ? 'smooth' : 'instant';
450
+ // Multi-browse slides are drawn away from their boxes, so their place comes from the step.
451
+ if (this.multiBrowseStep) {
452
+ const left = this.index * this.multiBrowseStep * (isRtl(this) ? -1 : 1);
453
+ if (Math.abs(track.scrollLeft - left) >= 1)
454
+ track.scrollTo({ left, behavior });
455
+ return;
456
+ }
305
457
  const trackBox = track.getBoundingClientRect();
306
458
  const slideBox = slide.getBoundingClientRect();
307
459
  const delta = isRtl(this)
308
460
  ? slideBox.right - trackBox.right
309
461
  : slideBox.left - trackBox.left;
310
462
  if (Math.abs(delta) < 1) return;
311
- track.scrollBy({
312
- left: delta,
313
- behavior: smooth && !this.reducedMotion.matches ? 'smooth' : 'instant',
314
- });
463
+ track.scrollBy({ left: delta, behavior });
315
464
  }
316
465
 
317
466
  /** The slide nearest the start edge of the track. */
318
467
  private nearestIndex() {
319
468
  const { track } = this;
320
469
  if (!track || !this.slides.length) return 0;
470
+ if (this.multiBrowseStep) {
471
+ return Math.round(Math.abs(track.scrollLeft) / this.multiBrowseStep);
472
+ }
321
473
  const trackBox = track.getBoundingClientRect();
322
474
  const rtl = isRtl(this);
323
475
  let nearest = 0;
@@ -3,8 +3,10 @@
3
3
  .slice {
4
4
  stroke: none;
5
5
  transition:
6
- opacity var(--duration-short3) var(--easing-standard),
7
- transform var(--duration-short4) var(--easing-emphasized-decelerate);
6
+ opacity var(--motion-spring-fast-effects-duration)
7
+ var(--motion-spring-fast-effects-easing),
8
+ transform var(--motion-spring-fast-spatial-duration)
9
+ var(--motion-spring-fast-spatial-easing);
8
10
  }
9
11
 
10
12
  .slice-label {
@@ -64,7 +64,8 @@
64
64
  border: 2px solid var(--checkbox-unselected-color);
65
65
  border-radius: var(--checkbox-border-radius);
66
66
  box-sizing: border-box;
67
- transition: border-color var(--duration-short2) var(--easing-standard);
67
+ transition: border-color var(--motion-spring-fast-effects-duration)
68
+ var(--motion-spring-fast-effects-easing);
68
69
  }
69
70
 
70
71
  .background {
@@ -76,8 +77,10 @@
76
77
  opacity: 0;
77
78
  transform: scale(0);
78
79
  transition:
79
- transform var(--duration-short2) var(--easing-standard),
80
- opacity var(--duration-short2) var(--easing-standard);
80
+ transform var(--motion-spring-fast-spatial-duration)
81
+ var(--motion-spring-fast-spatial-easing),
82
+ opacity var(--motion-spring-fast-effects-duration)
83
+ var(--motion-spring-fast-effects-easing);
81
84
  }
82
85
 
83
86
  .icon {
@@ -90,19 +93,22 @@
90
93
  stroke-linecap: round;
91
94
  stroke-linejoin: round;
92
95
  opacity: 0;
93
- transition: opacity var(--duration-short1) var(--easing-standard);
96
+ transition: opacity var(--motion-spring-fast-effects-duration)
97
+ var(--motion-spring-fast-effects-easing);
94
98
 
95
99
  .checkmark {
96
100
  stroke-dasharray: 14;
97
101
  stroke-dashoffset: 14;
98
- transition: stroke-dashoffset var(--duration-short4)
99
- var(--easing-emphasized);
102
+ transition: stroke-dashoffset
103
+ var(--motion-spring-default-effects-duration)
104
+ var(--motion-spring-default-effects-easing);
100
105
  }
101
106
 
102
107
  .indeterminate {
103
108
  transform-origin: center;
104
109
  opacity: 0;
105
- transition: opacity var(--duration-short1) var(--easing-standard);
110
+ transition: opacity var(--motion-spring-fast-effects-duration)
111
+ var(--motion-spring-fast-effects-easing);
106
112
  }
107
113
  }
108
114
 
@@ -2,6 +2,16 @@
2
2
 
3
3
  @include mixin.base-styles;
4
4
 
5
+ // Corners morph on the fast spatial spring when the chip is pressed or
6
+ // selected; fills fade on the effects spring.
7
+ @mixin spring-shape {
8
+ transition:
9
+ border-radius var(--motion-spring-fast-spatial-duration)
10
+ var(--motion-spring-fast-spatial-easing),
11
+ background-color var(--motion-spring-fast-effects-duration)
12
+ var(--motion-spring-fast-effects-easing);
13
+ }
14
+
5
15
  :host {
6
16
  position: relative;
7
17
  display: inline-flex;
@@ -9,6 +19,10 @@
9
19
  --chip-label-text-color: var(--color-on-surface);
10
20
  --chip-outline-color: var(--color-outline-variant);
11
21
  --chip-container-shape: var(--shape-corner-small);
22
+ --chip-container-selected-shape: var(--shape-corner-medium);
23
+ --chip-container-pressed-shape: var(--shape-corner-extra-small);
24
+
25
+ --_chip-shape: var(--chip-container-shape);
12
26
 
13
27
  --chip-container-padding: 1rem;
14
28
  /* 8dp */
@@ -86,8 +100,8 @@
86
100
  padding-inline: calc(var(--chip-container-padding) / 2);
87
101
  margin: 0;
88
102
  border: none;
89
- border-start-end-radius: var(--chip-container-shape);
90
- border-end-end-radius: var(--chip-container-shape);
103
+ border-start-end-radius: var(--_chip-shape);
104
+ border-end-end-radius: var(--_chip-shape);
91
105
  background: transparent;
92
106
  line-height: 0;
93
107
  cursor: pointer;
@@ -125,6 +139,11 @@
125
139
  padding-inline-start: 0;
126
140
  }
127
141
 
142
+ // M3 Expressive: a selected chip's label is emphasized.
143
+ &.selected .tag-content {
144
+ @include mixin.get-typography(label-large-emphasized);
145
+ }
146
+
128
147
  &.icon-slot-has-content .icon-slot-container, &.selected .icon-slot-container {
129
148
  padding-inline: calc(var(--chip-container-padding) / 2);
130
149
  }
@@ -136,24 +155,26 @@
136
155
  .focus-ring {
137
156
  z-index: 2;
138
157
  display: block;
139
- --focus-ring-container-shape: var(--chip-container-shape);
158
+ --focus-ring-container-shape: var(--_chip-shape);
140
159
  }
141
160
 
142
161
  .ripple {
143
162
  display: block;
144
- border-radius: var(--chip-container-shape);
163
+ @include spring-shape;
164
+ border-radius: var(--_chip-shape);
145
165
  --ripple-state-opacity: var(--_chip-state-opacity, 0);
146
166
  --ripple-pressed-color: var(--_chip-state-color);
147
167
  }
148
168
 
149
169
  .background {
150
170
  display: block;
171
+ @include spring-shape;
151
172
  position: absolute;
152
173
  top: 0;
153
174
  inset-inline-start: 0;
154
175
  width: 100%;
155
176
  height: 100%;
156
- border-radius: var(--chip-container-shape);
177
+ border-radius: var(--_chip-shape);
157
178
  background: var(--_chip-container-color);
158
179
  opacity: var(--_chip-container-opacity, 1);
159
180
  pointer-events: none;
@@ -162,19 +183,21 @@
162
183
  .outline {
163
184
  z-index: 0;
164
185
  display: block;
186
+ @include spring-shape;
165
187
  position: absolute;
166
188
  top: 0;
167
189
  inset-inline-start: 0;
168
190
  width: 100%;
169
191
  height: 100%;
170
- border-radius: var(--chip-container-shape);
192
+ border-radius: var(--_chip-shape);
171
193
  border: 1px solid var(--chip-outline-color);
172
194
  }
173
195
 
174
196
  .elevation {
175
197
  --elevation-level: 0;
176
- transition-duration: 280ms;
177
- --elevation-container-shape: var(--chip-container-shape);
198
+ transition-duration: var(--motion-spring-default-effects-duration);
199
+ transition-timing-function: var(--motion-spring-default-effects-easing);
200
+ --elevation-container-shape: var(--_chip-shape);
178
201
  }
179
202
 
180
203
  /* Color/state management */
@@ -188,13 +211,23 @@
188
211
  --_chip-state-opacity: 0.08;
189
212
  }
190
213
 
214
+ :host(:active:not([disabled])) {
215
+ --_chip-shape: var(--chip-container-pressed-shape);
216
+ }
217
+
191
218
  :host(:active) {
192
219
  --_chip-state-opacity: 0.12;
193
220
  }
194
221
 
195
222
  :host([selected]) {
223
+ --_chip-shape: var(--chip-container-selected-shape);
196
224
  --_chip-container-color: var(--color-secondary-container);
197
225
  --_chip-text-color: var(--color-on-secondary-container);
226
+
227
+ // M3: a selected chip's icon takes the label color, which also keeps it readable at high contrast.
228
+ .icon-slot-container {
229
+ --icon-color: var(--_chip-text-color);
230
+ }
198
231
  }
199
232
 
200
233
  :host([disabled]) {
@@ -44,6 +44,10 @@ import { I18nController } from '@/__internal/i18n/i18n-controller.js';
44
44
  *
45
45
  * @fires {CustomEvent} dismiss - Dispatched when the dismiss button of a `dismissible` chip is clicked.
46
46
  *
47
+ * @cssprop --chip-container-shape - Corner radius at rest. Defaults to var(--shape-corner-small).
48
+ * @cssprop --chip-container-selected-shape - Corner radius while selected. Defaults to var(--shape-corner-medium).
49
+ * @cssprop --chip-container-pressed-shape - Corner radius while pressed. Defaults to var(--shape-corner-extra-small).
50
+ *
47
51
  * @example
48
52
  * ```html
49
53
  * <wc-chip>Chip content</wc-chip>
@@ -64,7 +64,8 @@
64
64
 
65
65
  .elevation {
66
66
  --elevation-level: 0;
67
- transition-duration: 280ms;
67
+ transition-duration: var(--motion-spring-default-effects-duration);
68
+ transition-timing-function: var(--motion-spring-default-effects-easing);
68
69
  border-radius: var(--_container-shape);
69
70
  corner-shape: var(--_container-corner-shape-variant);
70
71
  }
@@ -174,7 +174,8 @@
174
174
  }
175
175
 
176
176
  .expand-icon {
177
- transition: transform var(--duration-short4) var(--easing-standard);
177
+ transition: transform var(--motion-spring-fast-spatial-duration)
178
+ var(--motion-spring-fast-spatial-easing);
178
179
 
179
180
  &.flipped {
180
181
  transform: rotate(180deg);
@@ -153,7 +153,7 @@
153
153
  transform: translate(-50%, -50%);
154
154
  cursor: grab;
155
155
  outline: none;
156
- transition: box-shadow 0.15s ease;
156
+ transition: box-shadow var(--motion-spring-fast-effects-duration) var(--motion-spring-fast-effects-easing);
157
157
 
158
158
  &:focus-visible {
159
159
  box-shadow:
@@ -21,7 +21,8 @@
21
21
  border: 1px solid var(--color-outline-variant);
22
22
  border-radius: var(--shape-corner-medium);
23
23
  background: var(--comment-composer-background, var(--color-surface));
24
- transition: border-color 0.12s ease;
24
+ transition: border-color var(--motion-spring-fast-effects-duration)
25
+ var(--motion-spring-fast-effects-easing);
25
26
  }
26
27
 
27
28
  .composer:hover .box {
@@ -84,6 +84,20 @@
84
84
  "export": "SplitButton",
85
85
  "dependencies": []
86
86
  },
87
+ {
88
+ "tag": "wc-fab-menu",
89
+ "source": "fab-menu/fab-menu",
90
+ "load": "eager",
91
+ "export": "FabMenu",
92
+ "dependencies": []
93
+ },
94
+ {
95
+ "tag": "wc-fab-menu-item",
96
+ "source": "fab-menu/fab-menu-item",
97
+ "load": "eager",
98
+ "export": "FabMenuItem",
99
+ "dependencies": []
100
+ },
87
101
  {
88
102
  "tag": "wc-dropdown-button",
89
103
  "source": "dropdown-button/dropdown-button",
@@ -233,6 +247,13 @@
233
247
  "export": "CircularProgress",
234
248
  "dependencies": []
235
249
  },
250
+ {
251
+ "tag": "wc-loading-indicator",
252
+ "source": "loading-indicator/loading-indicator",
253
+ "load": "eager",
254
+ "export": "LoadingIndicator",
255
+ "dependencies": []
256
+ },
236
257
  {
237
258
  "tag": "wc-skeleton",
238
259
  "source": "skeleton/skeleton",
@@ -70,7 +70,7 @@
70
70
  border-radius: inherit;
71
71
  background: currentcolor;
72
72
  opacity: 0;
73
- transition: opacity var(--duration-short2, 100ms) linear;
73
+ transition: opacity var(--motion-spring-fast-effects-duration) var(--motion-spring-fast-effects-easing);
74
74
  }
75
75
 
76
76
  &:hover::before {
@@ -141,7 +141,8 @@
141
141
  .dm-edge {
142
142
  --_edge: var(--dependency-map-edge-color);
143
143
 
144
- transition: opacity 200ms ease;
144
+ transition: opacity var(--motion-spring-fast-effects-duration)
145
+ var(--motion-spring-fast-effects-easing);
145
146
 
146
147
  &.is-warning {
147
148
  --_edge: var(--color-warning);
@@ -224,7 +225,8 @@
224
225
  transition:
225
226
  box-shadow 150ms ease,
226
227
  border-color 150ms ease,
227
- opacity 200ms ease;
228
+ opacity var(--motion-spring-fast-effects-duration)
229
+ var(--motion-spring-fast-effects-easing);
228
230
 
229
231
  &:hover {
230
232
  border-color: var(--color-outline);
@@ -136,7 +136,8 @@
136
136
  stroke-linecap: round;
137
137
  stroke-linejoin: round;
138
138
  pointer-events: none;
139
- transition: stroke-width 150ms ease;
139
+ transition: stroke-width var(--motion-spring-fast-effects-duration)
140
+ var(--motion-spring-fast-effects-easing);
140
141
 
141
142
  &.variant-dashed {
142
143
  stroke-dasharray: 6 6;
@@ -185,7 +185,7 @@
185
185
  border-radius: var(--shape-corner-medium);
186
186
  background: var(--color-surface);
187
187
  box-shadow: var(--elevation-level1);
188
- transition: top 0.15s ease;
188
+ transition: top var(--motion-spring-fast-spatial-duration) var(--motion-spring-fast-spatial-easing);
189
189
  }
190
190
 
191
191
  ::slotted([data-active]) {
@@ -14,7 +14,8 @@
14
14
  }
15
15
 
16
16
  .dropdown-icon {
17
- transition: transform 200ms ease;
17
+ transition: transform var(--motion-spring-fast-spatial-duration)
18
+ var(--motion-spring-fast-spatial-easing);
18
19
  }
19
20
 
20
21
  .trigger-button.active .dropdown-icon {