@redvars/peacock 4.7.0 → 4.8.1
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.
- package/dist/accordion-item.js +4 -4
- package/dist/app-bar.js +1 -1
- package/dist/app-shell.js +2 -2
- package/dist/assets/styles.css +1 -1
- package/dist/assets/styles.css.map +1 -1
- package/dist/assets/theme.d.ts +2 -0
- package/dist/assets/theme.js +49 -29
- package/dist/assets/tokens.css +1 -1
- package/dist/assets/tokens.css.map +1 -1
- package/dist/bottom-sheet.js +3 -3
- package/dist/breadcrumb-item.js +1 -1
- package/dist/button-group.js +79 -0
- package/dist/button-group.js.map +1 -1
- package/dist/button.js +26 -25
- package/dist/button.js.map +1 -1
- package/dist/calendar-column-view.js +3 -3
- package/dist/calendar-month-view.js +3 -3
- package/dist/calendar-timeline.js +3 -3
- package/dist/card.js +2 -1
- package/dist/card.js.map +1 -1
- package/dist/carousel.js +182 -7
- package/dist/carousel.js.map +1 -1
- package/dist/{cartesian-chart-C8qKDXo8.js → cartesian-chart-UW1CYKRS.js} +2 -2
- package/dist/{cartesian-chart-C8qKDXo8.js.map → cartesian-chart-UW1CYKRS.js.map} +1 -1
- package/dist/cb-group.js +1 -1
- package/dist/chart-area.js +2 -2
- package/dist/chart-bar.js +2 -2
- package/dist/{chart-base-BpQMZZsw.js → chart-base-D5ujPGcl.js} +3 -3
- package/dist/{chart-base-BpQMZZsw.js.map → chart-base-D5ujPGcl.js.map} +1 -1
- package/dist/chart-doughnut.js +1 -1
- package/dist/chart-line.js +2 -2
- package/dist/chart-pie.js +2 -2
- package/dist/checkbox.js +7 -6
- package/dist/checkbox.js.map +1 -1
- package/dist/chip.js +34 -8
- package/dist/chip.js.map +1 -1
- package/dist/circular-progress.js +46 -15
- package/dist/circular-progress.js.map +1 -1
- package/dist/code-highlighter.js +1 -1
- package/dist/color-picker.js +1 -1
- package/dist/command-palette.js +2 -2
- package/dist/comment-composer.js +5 -5
- package/dist/condition-builder.js +1 -1
- package/dist/{condition-group-base-NcvOY-Zv.js → condition-group-base-DS76sprm.js} +2 -2
- package/dist/{condition-group-base-NcvOY-Zv.js.map → condition-group-base-DS76sprm.js.map} +1 -1
- package/dist/confirm-dialog.js +2 -2
- package/dist/custom-elements-jsdocs.json +302 -10
- package/dist/custom-elements.json +1209 -16
- package/dist/date-picker.js +51 -1
- package/dist/date-picker.js.map +1 -1
- package/dist/dependency-map.js +2 -2
- package/dist/{diagram-hv7hCgzx.js → diagram-DFO-X7yq.js} +2 -2
- package/dist/{diagram-hv7hCgzx.js.map → diagram-DFO-X7yq.js.map} +1 -1
- package/dist/diagram.js +1 -1
- package/dist/discussion.js +3 -3
- package/dist/{document-editor-CZBlz3ai.js → document-editor-W4pXGCEL.js} +19 -7
- package/dist/document-editor-W4pXGCEL.js.map +1 -0
- package/dist/document-editor.js +3 -3
- package/dist/dropdown-button.js +1 -1
- package/dist/erd.js +4 -4
- package/dist/fab-menu-item.js +189 -0
- package/dist/fab-menu-item.js.map +1 -0
- package/dist/fab-menu.js +329 -0
- package/dist/fab-menu.js.map +1 -0
- package/dist/fab.js +28 -17
- package/dist/fab.js.map +1 -1
- package/dist/field.js +1 -1
- package/dist/file-upload.js +1 -1
- package/dist/flow.js +1 -1
- package/dist/haptics-CAaQ2E-9.js +29 -0
- package/dist/haptics-CAaQ2E-9.js.map +1 -0
- package/dist/hover-card.js +5 -3
- package/dist/hover-card.js.map +1 -1
- package/dist/html-editor.js +4 -4
- package/dist/icon-button.js +26 -25
- package/dist/icon-button.js.map +1 -1
- package/dist/{index-DK3fREuj.js → index-BBxpsqx8.js} +4 -4
- package/dist/{index-DK3fREuj.js.map → index-BBxpsqx8.js.map} +1 -1
- package/dist/{index-CTEt3LtO.js → index-CDtKB0In.js} +4 -4
- package/dist/{index-CTEt3LtO.js.map → index-CDtKB0In.js.map} +1 -1
- package/dist/{index-Bag4vtx-.js → index-Tb0ky27z.js} +3 -3
- package/dist/{index-Bag4vtx-.js.map → index-Tb0ky27z.js.map} +1 -1
- package/dist/index.js +17 -13
- package/dist/index.js.map +1 -1
- package/dist/{indicator-navigation-item-BG0TrdDE.js → indicator-navigation-item-aZsm-RpR.js} +17 -5
- package/dist/{indicator-navigation-item-BG0TrdDE.js.map → indicator-navigation-item-aZsm-RpR.js.map} +1 -1
- package/dist/inline-edit.js +1 -1
- package/dist/json-viewer.js +1 -1
- package/dist/linear-progress.js +51 -4
- package/dist/linear-progress.js.map +1 -1
- package/dist/link-button.js +26 -25
- package/dist/link-button.js.map +1 -1
- package/dist/loader-full.js +10 -6
- package/dist/loader-full.js.map +1 -1
- package/dist/loader.js +19 -6
- package/dist/loader.js.map +1 -1
- package/dist/loading-indicator.js +301 -0
- package/dist/loading-indicator.js.map +1 -0
- package/dist/markdown-editor.js +4 -4
- package/dist/mention-input.js +1 -1
- package/dist/menu.js +8 -6
- package/dist/menu.js.map +1 -1
- package/dist/{modal-Dds0rXAG.js → modal-ClWCCbxD.js} +7 -5
- package/dist/{modal-Dds0rXAG.js.map → modal-ClWCCbxD.js.map} +1 -1
- package/dist/modal.js +14 -3
- package/dist/modal.js.map +1 -1
- package/dist/navigation-bar-item.js +1 -1
- package/dist/navigation-bar.js +1 -1
- package/dist/navigation-drawer-group.js +1 -1
- package/dist/navigation-drawer.js +1 -1
- package/dist/navigation-rail-item.js +1 -1
- package/dist/navigation-rail.js +1 -1
- package/dist/notification-center.js +1 -1
- package/dist/number-counter.js +1 -1
- package/dist/{overlay-controller-BOk-kfil.js → overlay-controller-iVaiUqos.js} +20 -10
- package/dist/{overlay-controller-BOk-kfil.js.map → overlay-controller-iVaiUqos.js.map} +1 -1
- package/dist/pagination.js +1 -1
- package/dist/popover-content.js +4 -2
- package/dist/popover-content.js.map +1 -1
- package/dist/popover.js +1 -1
- package/dist/{progress-base-BhJK__VP.js → progress-base-BeLu9-Tq.js} +13 -1
- package/dist/progress-base-BeLu9-Tq.js.map +1 -0
- package/dist/prompt-input.js +5 -5
- package/dist/radio.js +6 -4
- package/dist/radio.js.map +1 -1
- package/dist/resizable-panels.js +1 -1
- package/dist/{rich-text-input-base-SrsPvc-j.js → rich-text-input-base-BCmnkpuV.js} +2 -2
- package/dist/{rich-text-input-base-SrsPvc-j.js.map → rich-text-input-base-BCmnkpuV.js.map} +1 -1
- package/dist/scroll-area.js +1 -1
- package/dist/search.js +1 -1
- package/dist/segmented-button.js +7 -2
- package/dist/segmented-button.js.map +1 -1
- package/dist/select.js +1 -1
- package/dist/side-sheet.js +3 -3
- package/dist/site-header.js +3 -3
- package/dist/site-nav-menu.js +1 -1
- package/dist/{slash-controller-DwL0nkqv.js → slash-controller-BFhzSjiR.js} +2 -2
- package/dist/{slash-controller-DwL0nkqv.js.map → slash-controller-BFhzSjiR.js.map} +1 -1
- package/dist/slider.js +169 -69
- package/dist/slider.js.map +1 -1
- package/dist/snackbar.js +2 -2
- package/dist/sparkline.js +2 -2
- package/dist/split-button.js +1 -1
- package/dist/src/__internal/utils/haptics.d.ts +7 -0
- package/dist/src/button/button-group/button-group.d.ts +12 -0
- package/dist/src/button/fab/fab.d.ts +1 -0
- package/dist/src/carousel/carousel.d.ts +22 -0
- package/dist/src/chip/chip/chip.d.ts +4 -0
- package/dist/src/date-picker/date-picker.d.ts +6 -1
- package/dist/src/document-editor/document-editor.d.ts +2 -0
- package/dist/src/fab-menu/fab-menu-item.d.ts +30 -0
- package/dist/src/fab-menu/fab-menu.d.ts +64 -0
- package/dist/src/fab-menu/index.d.ts +2 -0
- package/dist/src/index.d.ts +3 -0
- package/dist/src/loading-indicator/index.d.ts +1 -0
- package/dist/src/loading-indicator/loading-indicator.d.ts +44 -0
- package/dist/src/loading-indicator/shapes.d.ts +29 -0
- package/dist/src/modal/modal.d.ts +4 -0
- package/dist/src/progress/circular-progress/circular-progress.d.ts +3 -1
- package/dist/src/progress/linear-progress/linear-progress.d.ts +2 -1
- package/dist/src/progress/progress-base.d.ts +7 -0
- package/dist/src/slider/slider.d.ts +23 -3
- package/dist/src/toolbar/toolbar.d.ts +20 -0
- package/dist/step.js +1 -1
- package/dist/switch.js +7 -3
- package/dist/switch.js.map +1 -1
- package/dist/tab-group.js +13 -2
- package/dist/tab-group.js.map +1 -1
- package/dist/tab-panel.js +26 -0
- package/dist/tab-panel.js.map +1 -1
- package/dist/tab.js +23 -5
- package/dist/tab.js.map +1 -1
- package/dist/table.js +4 -4
- package/dist/tag.js +2 -1
- package/dist/tag.js.map +1 -1
- package/dist/test/button-group-press.test.d.ts +1 -0
- package/dist/test/fab-menu.test.d.ts +1 -0
- package/dist/test/haptics.test.d.ts +1 -0
- package/dist/test/loading-indicator.test.d.ts +1 -0
- package/dist/{toggle-base-DP3PSXbf.js → toggle-base-CVO9YntI.js} +3 -1
- package/dist/toggle-base-CVO9YntI.js.map +1 -0
- package/dist/toolbar.js +102 -0
- package/dist/toolbar.js.map +1 -1
- package/dist/tooltip.js +5 -2
- package/dist/tooltip.js.map +1 -1
- package/dist/tour.js +3 -3
- package/dist/tree-chart.js +3 -3
- package/dist/tree-item.js +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/{video-DgtGGvrk.js → video-DSQ07o3h.js} +2 -2
- package/dist/{video-DgtGGvrk.js.map → video-DSQ07o3h.js.map} +1 -1
- package/dist/video.js +1 -1
- package/dist/workflow.js +5 -5
- package/package.json +1 -1
- package/scss/tokens.css +364 -0
- package/src/__internal/chart/chart-base.scss +4 -2
- package/src/__internal/controllers/overlay-controller.ts +19 -9
- package/src/__internal/rich-text/editor-chrome.scss +2 -1
- package/src/__internal/toggle-base.ts +2 -0
- package/src/__internal/utils/haptics.ts +32 -0
- package/src/accordion/accordion-item.scss +10 -6
- package/src/app-bar/app-bar.scss +2 -1
- package/src/app-shell/app-shell.scss +2 -2
- package/src/bottom-sheet/bottom-sheet.scss +4 -2
- package/src/breadcrumb/breadcrumb-item/breadcrumb-item.scss +4 -2
- package/src/button/button/button-base.scss +14 -12
- package/src/button/button/button-layers.scss +27 -5
- package/src/button/button-group/button-group.scss +6 -0
- package/src/button/button-group/button-group.ts +105 -0
- package/src/button/fab/fab-sizes.scss +2 -0
- package/src/button/fab/fab.scss +32 -17
- package/src/button/fab/fab.ts +1 -0
- package/src/calendar/calendar-column-view.scss +3 -3
- package/src/calendar/calendar-month-view.scss +3 -3
- package/src/calendar-timeline/calendar-timeline.scss +6 -3
- package/src/card/card.scss +2 -1
- package/src/carousel/carousel.scss +71 -2
- package/src/carousel/carousel.ts +159 -7
- package/src/chart-pie/chart-pie.scss +4 -2
- package/src/checkbox/checkbox.scss +13 -7
- package/src/chip/chip/chip.scss +41 -8
- package/src/chip/chip/chip.ts +4 -0
- package/src/chip/tag/tag.scss +2 -1
- package/src/code-highlighter/code-highlighter.scss +2 -1
- package/src/color-picker/color-picker.scss +1 -1
- package/src/comment-composer/comment-composer.scss +2 -1
- package/src/components.manifest.json +21 -0
- package/src/condition-builder/condition-group-base.scss +1 -1
- package/src/date-picker/date-picker.scss +27 -0
- package/src/date-picker/date-picker.ts +27 -1
- package/src/dependency-map/dependency-map.scss +4 -2
- package/src/diagram/diagram.scss +2 -1
- package/src/document-editor/document-editor.scss +1 -1
- package/src/document-editor/document-editor.ts +17 -0
- package/src/dropdown-button/dropdown-button.scss +2 -1
- package/src/erd/erd.scss +8 -4
- package/src/fab-menu/fab-menu-item.scss +99 -0
- package/src/fab-menu/fab-menu-item.ts +58 -0
- package/src/fab-menu/fab-menu.scss +119 -0
- package/src/fab-menu/fab-menu.ts +195 -0
- package/src/fab-menu/index.ts +2 -0
- package/src/field/field.scss +1 -1
- package/src/file-upload/file-upload.scss +2 -2
- package/src/hover-card/hover-card.scss +9 -2
- package/src/index.ts +3 -0
- package/src/inline-edit/inline-edit.scss +2 -2
- package/src/json-viewer/json-viewer.scss +2 -1
- package/src/loader.ts +12 -0
- package/src/loading-indicator/index.ts +1 -0
- package/src/loading-indicator/loading-indicator.scss +52 -0
- package/src/loading-indicator/loading-indicator.ts +164 -0
- package/src/loading-indicator/shapes.ts +104 -0
- package/src/menu/menu/menu.scss +10 -6
- package/src/modal/modal.scss +8 -4
- package/src/modal/modal.ts +14 -1
- package/src/navigation-drawer/navigation-drawer-group.scss +2 -2
- package/src/navigation-drawer/navigation-drawer.scss +3 -2
- package/src/navigation-rail/navigation-rail-item.scss +27 -5
- package/src/number-counter/number-counter.scss +1 -1
- package/src/pagination/pagination.scss +2 -1
- package/src/popover/popover-content.scss +7 -2
- package/src/progress/circular-progress/circular-progress.scss +3 -2
- package/src/progress/circular-progress/circular-progress.ts +43 -12
- package/src/progress/linear-progress/linear-progress.scss +70 -2
- package/src/progress/linear-progress/linear-progress.ts +4 -1
- package/src/progress/progress-base.ts +11 -0
- package/src/prompt-input/prompt-input.scss +2 -1
- package/src/radio/radio.scss +8 -4
- package/src/radio/radio.ts +2 -0
- package/src/resizable-panels/resizable-panels.scss +2 -1
- package/src/scroll-area/scroll-area.scss +2 -1
- package/src/search/search.scss +2 -1
- package/src/segmented-button/segmented-button.scss +8 -3
- package/src/select/select.scss +2 -1
- package/src/side-sheet/side-sheet.scss +4 -2
- package/src/site-header/site-header.scss +4 -4
- package/src/site-header/site-nav-menu.scss +2 -2
- package/src/slider/slider.scss +127 -64
- package/src/slider/slider.ts +80 -10
- package/src/snackbar/snackbar.scss +5 -2
- package/src/sparkline/sparkline.scss +6 -3
- package/src/split-button/split-button.scss +4 -2
- package/src/stepper/step.scss +2 -1
- package/src/switch/switch.scss +21 -2
- package/src/table/table.scss +8 -4
- package/src/tabs/tab-group.ts +12 -2
- package/src/tabs/tab-panel.scss +31 -0
- package/src/tabs/tab.scss +28 -17
- package/src/toolbar/toolbar-colors.scss +11 -0
- package/src/toolbar/toolbar.scss +28 -0
- package/src/toolbar/toolbar.ts +74 -1
- package/src/tooltip/tooltip.scss +9 -3
- package/src/tour/tour.scss +2 -2
- package/src/tree/tree-item.scss +2 -1
- package/src/tree-chart/tree-chart.scss +3 -3
- package/src/video/video.scss +2 -1
- package/src/workflow/workflow.scss +5 -5
- package/dist/document-editor-CZBlz3ai.js.map +0 -1
- package/dist/progress-base-BhJK__VP.js.map +0 -1
- package/dist/toggle-base-DP3PSXbf.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(--
|
|
79
|
-
|
|
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 {
|
package/src/carousel/carousel.ts
CHANGED
|
@@ -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 =
|
|
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(--
|
|
7
|
-
|
|
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(--
|
|
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(--
|
|
80
|
-
|
|
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(--
|
|
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
|
|
99
|
-
var(--
|
|
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(--
|
|
110
|
+
transition: opacity var(--motion-spring-fast-effects-duration)
|
|
111
|
+
var(--motion-spring-fast-effects-easing);
|
|
106
112
|
}
|
|
107
113
|
}
|
|
108
114
|
|
package/src/chip/chip/chip.scss
CHANGED
|
@@ -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(--
|
|
90
|
-
border-end-end-radius: var(--
|
|
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(--
|
|
158
|
+
--focus-ring-container-shape: var(--_chip-shape);
|
|
140
159
|
}
|
|
141
160
|
|
|
142
161
|
.ripple {
|
|
143
162
|
display: block;
|
|
144
|
-
|
|
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(--
|
|
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(--
|
|
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:
|
|
177
|
-
|
|
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]) {
|
package/src/chip/chip/chip.ts
CHANGED
|
@@ -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>
|
package/src/chip/tag/tag.scss
CHANGED
|
@@ -64,7 +64,8 @@
|
|
|
64
64
|
|
|
65
65
|
.elevation {
|
|
66
66
|
--elevation-level: 0;
|
|
67
|
-
transition-duration:
|
|
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(--
|
|
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
|
|
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
|
|
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-
|
|
73
|
+
transition: opacity var(--motion-spring-fast-effects-duration) var(--motion-spring-fast-effects-easing);
|
|
74
74
|
}
|
|
75
75
|
|
|
76
76
|
&:hover::before {
|
|
@@ -80,6 +80,33 @@
|
|
|
80
80
|
gap: var(--spacing-300);
|
|
81
81
|
}
|
|
82
82
|
|
|
83
|
+
// M3 Expressive: a new month slides in from the side it comes from (`data-enter`) on the default
|
|
84
|
+
// spatial spring and fades in on the effects spring. The spring tokens drop the movement for
|
|
85
|
+
// reduced motion.
|
|
86
|
+
@keyframes date-picker-month-enter {
|
|
87
|
+
from {
|
|
88
|
+
translate: var(--_month-enter-offset) 0;
|
|
89
|
+
opacity: 0;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.months[data-enter] {
|
|
94
|
+
--_month-enter-offset: 2rem;
|
|
95
|
+
|
|
96
|
+
animation: date-picker-month-enter
|
|
97
|
+
var(--motion-spring-default-spatial-duration)
|
|
98
|
+
var(--motion-spring-default-spatial-easing) backwards;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.months[data-enter='start'],
|
|
102
|
+
:host(:dir(rtl)) .months[data-enter='end'] {
|
|
103
|
+
--_month-enter-offset: -2rem;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
:host(:dir(rtl)) .months[data-enter='start'] {
|
|
107
|
+
--_month-enter-offset: 2rem;
|
|
108
|
+
}
|
|
109
|
+
|
|
83
110
|
.month {
|
|
84
111
|
border-collapse: collapse;
|
|
85
112
|
border-spacing: 0;
|