@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
package/src/index.ts
CHANGED
|
@@ -11,6 +11,8 @@ export { default as ButtonGroup } from './button/button-group/button-group.js';
|
|
|
11
11
|
export { SegmentedButton } from './segmented-button/segmented-button.js';
|
|
12
12
|
export { SegmentedButtonGroup } from './segmented-button/segmented-button-group.js';
|
|
13
13
|
export { SplitButton } from './split-button/split-button.js';
|
|
14
|
+
export { FabMenu } from './fab-menu/fab-menu.js';
|
|
15
|
+
export { FabMenuItem } from './fab-menu/fab-menu-item.js';
|
|
14
16
|
export { DropdownButton } from './dropdown-button/dropdown-button.js';
|
|
15
17
|
export { Divider } from './divider/divider.js';
|
|
16
18
|
export { Elevation } from './elevation/elevation.js';
|
|
@@ -30,6 +32,7 @@ export { NotificationManager } from './notification-manager/notification-manager
|
|
|
30
32
|
export { Tag } from './chip/tag/tag.js';
|
|
31
33
|
export { LinearProgress } from './progress/linear-progress/linear-progress.js';
|
|
32
34
|
export { CircularProgress } from './progress/circular-progress/circular-progress.js';
|
|
35
|
+
export { LoadingIndicator } from './loading-indicator/loading-indicator.js';
|
|
33
36
|
export { Skeleton } from './skeleton/skeleton.js';
|
|
34
37
|
export { Field } from './field/field.js';
|
|
35
38
|
export { Input } from './input/input.js';
|
|
@@ -42,8 +42,8 @@
|
|
|
42
42
|
|
|
43
43
|
.editable .text {
|
|
44
44
|
cursor: text;
|
|
45
|
-
transition: background-color var(--duration
|
|
46
|
-
var(--easing
|
|
45
|
+
transition: background-color var(--motion-spring-fast-effects-duration)
|
|
46
|
+
var(--motion-spring-fast-effects-easing);
|
|
47
47
|
|
|
48
48
|
&:hover {
|
|
49
49
|
background-color: var(--_hover-color);
|
|
@@ -101,7 +101,8 @@
|
|
|
101
101
|
}
|
|
102
102
|
|
|
103
103
|
.expander-icon {
|
|
104
|
-
transition: transform var(--
|
|
104
|
+
transition: transform var(--motion-spring-fast-spatial-duration)
|
|
105
|
+
var(--motion-spring-fast-spatial-easing);
|
|
105
106
|
}
|
|
106
107
|
|
|
107
108
|
// The collapsed arrow points to the end side: mirrored in right-to-left.
|
package/src/loader.ts
CHANGED
|
@@ -13,6 +13,8 @@ import ButtonGroup from '@/button/button-group/button-group.js';
|
|
|
13
13
|
import { SegmentedButton } from '@/segmented-button/segmented-button.js';
|
|
14
14
|
import { SegmentedButtonGroup } from '@/segmented-button/segmented-button-group.js';
|
|
15
15
|
import { SplitButton } from '@/split-button/split-button.js';
|
|
16
|
+
import { FabMenu } from '@/fab-menu/fab-menu.js';
|
|
17
|
+
import { FabMenuItem } from '@/fab-menu/fab-menu-item.js';
|
|
16
18
|
import { DropdownButton } from '@/dropdown-button/dropdown-button.js';
|
|
17
19
|
import { Divider } from '@/divider/divider.js';
|
|
18
20
|
import { Elevation } from '@/elevation/elevation.js';
|
|
@@ -33,6 +35,7 @@ import { NotificationManager } from '@/notification-manager/notification-manager
|
|
|
33
35
|
import { Tag } from '@/chip/tag/tag.js';
|
|
34
36
|
import { LinearProgress } from '@/progress/linear-progress/linear-progress.js';
|
|
35
37
|
import { CircularProgress } from '@/progress/circular-progress/circular-progress.js';
|
|
38
|
+
import { LoadingIndicator } from '@/loading-indicator/loading-indicator.js';
|
|
36
39
|
import { Skeleton } from '@/skeleton/skeleton.js';
|
|
37
40
|
import { Field } from '@/field/field.js';
|
|
38
41
|
import { Input } from '@/input/input.js';
|
|
@@ -214,6 +217,12 @@ const loaderConfig: LoaderConfig = {
|
|
|
214
217
|
'wc-split-button': {
|
|
215
218
|
CustomElementClass: SplitButton,
|
|
216
219
|
},
|
|
220
|
+
'wc-fab-menu': {
|
|
221
|
+
CustomElementClass: FabMenu,
|
|
222
|
+
},
|
|
223
|
+
'wc-fab-menu-item': {
|
|
224
|
+
CustomElementClass: FabMenuItem,
|
|
225
|
+
},
|
|
217
226
|
'wc-dropdown-button': {
|
|
218
227
|
CustomElementClass: DropdownButton,
|
|
219
228
|
},
|
|
@@ -277,6 +286,9 @@ const loaderConfig: LoaderConfig = {
|
|
|
277
286
|
'wc-circular-progress': {
|
|
278
287
|
CustomElementClass: CircularProgress,
|
|
279
288
|
},
|
|
289
|
+
'wc-loading-indicator': {
|
|
290
|
+
CustomElementClass: LoadingIndicator,
|
|
291
|
+
},
|
|
280
292
|
'wc-skeleton': {
|
|
281
293
|
CustomElementClass: Skeleton,
|
|
282
294
|
},
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { LoadingIndicator } from './loading-indicator.js';
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
@use '../../scss/mixin';
|
|
2
|
+
|
|
3
|
+
@include mixin.base-styles;
|
|
4
|
+
|
|
5
|
+
:host {
|
|
6
|
+
display: inline-block;
|
|
7
|
+
vertical-align: middle;
|
|
8
|
+
--loading-indicator-size: 3rem;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.loading-indicator {
|
|
12
|
+
display: block;
|
|
13
|
+
width: var(--loading-indicator-size);
|
|
14
|
+
height: var(--loading-indicator-size);
|
|
15
|
+
border-radius: var(--shape-corner-full);
|
|
16
|
+
--_color: var(--loading-indicator-color, var(--color-primary));
|
|
17
|
+
|
|
18
|
+
&.contained {
|
|
19
|
+
background: var(
|
|
20
|
+
--loading-indicator-container-color,
|
|
21
|
+
var(--color-primary-container)
|
|
22
|
+
);
|
|
23
|
+
--_color: var(
|
|
24
|
+
--loading-indicator-color,
|
|
25
|
+
var(--color-on-primary-container)
|
|
26
|
+
);
|
|
27
|
+
|
|
28
|
+
// Keep some room between the shape and the container's edge.
|
|
29
|
+
svg {
|
|
30
|
+
scale: 0.84;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
svg {
|
|
35
|
+
display: block;
|
|
36
|
+
width: 100%;
|
|
37
|
+
height: 100%;
|
|
38
|
+
overflow: visible;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.shape {
|
|
42
|
+
fill: var(--_color);
|
|
43
|
+
transform-origin: 50% 50%;
|
|
44
|
+
transform-box: view-box;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
@media (forced-colors: active) {
|
|
49
|
+
.loading-indicator .shape {
|
|
50
|
+
fill: CanvasText;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
import { html, LitElement } from 'lit';
|
|
2
|
+
import { property, query } from 'lit/decorators.js';
|
|
3
|
+
import { classMap } from 'lit/directives/class-map.js';
|
|
4
|
+
import styles from './loading-indicator.scss';
|
|
5
|
+
import { I18nController } from '@/__internal/i18n/i18n-controller.js';
|
|
6
|
+
import { mixinDelegatesAria } from '@/__internal/aria/delegate.js';
|
|
7
|
+
import type { ARIAMixinStrict } from '@/__internal/aria/aria.js';
|
|
8
|
+
import {
|
|
9
|
+
blendPath,
|
|
10
|
+
PAIR_OFFSETS,
|
|
11
|
+
SHAPE_POINTS,
|
|
12
|
+
SHAPE_RADII,
|
|
13
|
+
} from './shapes.js';
|
|
14
|
+
|
|
15
|
+
// One shape change every STEP_MS. Each morph eases in and out over the whole step, so the shape
|
|
16
|
+
// never snaps and never stops.
|
|
17
|
+
const STEP_MS = 650;
|
|
18
|
+
// A steady turn carries the motion; each morph adds a little more, eased like the morph, so the
|
|
19
|
+
// speed swells gently instead of jerking forward on every step.
|
|
20
|
+
const BASE_DEG_PER_S = 150;
|
|
21
|
+
const STEP_TURN_DEG = 45;
|
|
22
|
+
|
|
23
|
+
/** Ease in and out over 0..1, with zero speed at both ends. */
|
|
24
|
+
const easeInOut = (t: number) => 0.5 - 0.5 * Math.cos(Math.PI * t);
|
|
25
|
+
|
|
26
|
+
const DEG_PER_SAMPLE = 360 / SHAPE_POINTS;
|
|
27
|
+
const CYCLE_OFFSET = PAIR_OFFSETS.reduce((sum, k) => sum + k, 0);
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Degrees to turn the drawing by at the start of `step`: the morphs before it each ended on the
|
|
31
|
+
* next shape turned back by its pair offset, and this keeps the next morph starting from there.
|
|
32
|
+
*/
|
|
33
|
+
function offsetTurn(step: number): number {
|
|
34
|
+
const count = PAIR_OFFSETS.length;
|
|
35
|
+
let samples = Math.floor(step / count) * CYCLE_OFFSET;
|
|
36
|
+
for (let i = 0; i < step % count; i += 1) samples += PAIR_OFFSETS[i];
|
|
37
|
+
return -samples * DEG_PER_SAMPLE;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
const VIEWBOX = 100;
|
|
41
|
+
const CENTER = VIEWBOX / 2;
|
|
42
|
+
// The shape fills about 38/48 of the box, as in M3.
|
|
43
|
+
const SHAPE_RADIUS = VIEWBOX * 0.395;
|
|
44
|
+
|
|
45
|
+
// Reduced motion keeps the morph, since the changing shape is what says "still loading", but
|
|
46
|
+
// slower and with a slow steady turn instead of the swelling spin.
|
|
47
|
+
const REDUCED_STEP_MS = 1200;
|
|
48
|
+
const REDUCED_DEG_PER_S = 30;
|
|
49
|
+
|
|
50
|
+
const REDUCED_MOTION =
|
|
51
|
+
typeof window !== 'undefined' && window.matchMedia
|
|
52
|
+
? window.matchMedia('(prefers-reduced-motion: reduce)')
|
|
53
|
+
: undefined;
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* @label Loading Indicator
|
|
57
|
+
* @tag wc-loading-indicator
|
|
58
|
+
* @rawTag loading-indicator
|
|
59
|
+
* @summary An expressive spinner that morphs between rounded shapes while it turns, for short waits of unknown length.
|
|
60
|
+
* @overview
|
|
61
|
+
* <p>Use it for waits of a few seconds whose length is unknown, such as loading a page or
|
|
62
|
+
* refreshing content. For longer work, or when progress is known, use
|
|
63
|
+
* <code>wc-circular-progress</code> or <code>wc-linear-progress</code>.</p>
|
|
64
|
+
* <p><code>contained</code> draws it on a round container, for use over content such as
|
|
65
|
+
* pull-to-refresh. Set the size with <code>--loading-indicator-size</code> (48px by default).</p>
|
|
66
|
+
* <p>It is named "Loading" unless an <code>aria-label</code> on the element names it. With
|
|
67
|
+
* reduced motion it morphs more slowly and turns at a slow, steady speed.</p>
|
|
68
|
+
* @tags display
|
|
69
|
+
*
|
|
70
|
+
* @cssprop --loading-indicator-size - Width and height. Defaults to 3rem.
|
|
71
|
+
* @cssprop --loading-indicator-color - Shape color. Defaults to var(--color-primary), or var(--color-on-primary-container) when contained.
|
|
72
|
+
* @cssprop --loading-indicator-container-color - Container color when `contained`. Defaults to var(--color-primary-container).
|
|
73
|
+
*
|
|
74
|
+
* @example
|
|
75
|
+
* ```html
|
|
76
|
+
* <wc-loading-indicator></wc-loading-indicator>
|
|
77
|
+
* <wc-loading-indicator contained></wc-loading-indicator>
|
|
78
|
+
* ```
|
|
79
|
+
*/
|
|
80
|
+
export class LoadingIndicator extends mixinDelegatesAria(LitElement) {
|
|
81
|
+
static styles = [styles];
|
|
82
|
+
|
|
83
|
+
/** Draws the indicator on a round container. */
|
|
84
|
+
@property({ type: Boolean, reflect: true }) contained = false;
|
|
85
|
+
|
|
86
|
+
@query('.shape') private _shape?: SVGPathElement;
|
|
87
|
+
|
|
88
|
+
private readonly _i18n = new I18nController(this);
|
|
89
|
+
|
|
90
|
+
private _frame = 0;
|
|
91
|
+
|
|
92
|
+
private _start = 0;
|
|
93
|
+
|
|
94
|
+
override connectedCallback() {
|
|
95
|
+
super.connectedCallback();
|
|
96
|
+
this._start = performance.now();
|
|
97
|
+
this._frame = requestAnimationFrame(this._tick);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
override disconnectedCallback() {
|
|
101
|
+
super.disconnectedCallback();
|
|
102
|
+
cancelAnimationFrame(this._frame);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
private _tick = (now: number) => {
|
|
106
|
+
this._draw(now - this._start);
|
|
107
|
+
this._frame = requestAnimationFrame(this._tick);
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
/** Draws the frame `elapsed` ms after the indicator appeared. */
|
|
111
|
+
private _draw(sinceStart: number) {
|
|
112
|
+
// A frame's timestamp can be a little older than the moment the indicator connected.
|
|
113
|
+
const elapsed = Math.max(0, sinceStart);
|
|
114
|
+
const shape = this._shape;
|
|
115
|
+
if (!shape) return;
|
|
116
|
+
|
|
117
|
+
const reduced = REDUCED_MOTION?.matches ?? false;
|
|
118
|
+
const stepMs = reduced ? REDUCED_STEP_MS : STEP_MS;
|
|
119
|
+
const count = SHAPE_RADII.length;
|
|
120
|
+
const step = Math.floor(elapsed / stepMs);
|
|
121
|
+
const from = SHAPE_RADII[step % count];
|
|
122
|
+
const to = SHAPE_RADII[(step + 1) % count];
|
|
123
|
+
const progress = easeInOut((elapsed - step * stepMs) / stepMs);
|
|
124
|
+
|
|
125
|
+
shape.setAttribute(
|
|
126
|
+
'd',
|
|
127
|
+
blendPath(
|
|
128
|
+
from,
|
|
129
|
+
to,
|
|
130
|
+
progress,
|
|
131
|
+
SHAPE_RADIUS,
|
|
132
|
+
CENTER,
|
|
133
|
+
PAIR_OFFSETS[step % count],
|
|
134
|
+
),
|
|
135
|
+
);
|
|
136
|
+
const base = reduced
|
|
137
|
+
? (elapsed / 1000) * REDUCED_DEG_PER_S
|
|
138
|
+
: (elapsed / 1000) * BASE_DEG_PER_S + (step + progress) * STEP_TURN_DEG;
|
|
139
|
+
const turn = base + offsetTurn(step);
|
|
140
|
+
shape.style.transform = `rotate(${((turn % 360) + 360) % 360}deg)`;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
override firstUpdated() {
|
|
144
|
+
this._draw(performance.now() - this._start);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
override render() {
|
|
148
|
+
return html`
|
|
149
|
+
<div
|
|
150
|
+
class=${classMap({
|
|
151
|
+
'loading-indicator': true,
|
|
152
|
+
contained: this.contained,
|
|
153
|
+
})}
|
|
154
|
+
role="progressbar"
|
|
155
|
+
aria-label=${(this as ARIAMixinStrict).ariaLabel ||
|
|
156
|
+
this._i18n.t('loading')}
|
|
157
|
+
>
|
|
158
|
+
<svg viewBox="0 0 ${VIEWBOX} ${VIEWBOX}" aria-hidden="true">
|
|
159
|
+
<path class="shape"></path>
|
|
160
|
+
</svg>
|
|
161
|
+
</div>
|
|
162
|
+
`;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The shapes wc-loading-indicator morphs through, after the M3 Expressive loading indicator:
|
|
3
|
+
* soft burst, 9-sided cookie, pentagon, pill, sunny, 4-sided cookie and oval.
|
|
4
|
+
*
|
|
5
|
+
* Every shape is a polar function sampled at the same angles, so morphing is a per-point blend
|
|
6
|
+
* of radii. Radii are normalised so each shape's furthest point is 1.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
/** Points per shape. Enough to look smooth at large sizes, cheap enough to blend every frame. */
|
|
10
|
+
export const SHAPE_POINTS = 180;
|
|
11
|
+
|
|
12
|
+
type PolarShape = (theta: number) => number;
|
|
13
|
+
|
|
14
|
+
const wavy =
|
|
15
|
+
(lobes: number, depth: number): PolarShape =>
|
|
16
|
+
theta =>
|
|
17
|
+
1 + depth * Math.cos(lobes * theta);
|
|
18
|
+
|
|
19
|
+
const superellipse =
|
|
20
|
+
(ry: number, power: number, rotate = 0): PolarShape =>
|
|
21
|
+
theta => {
|
|
22
|
+
const t = theta + rotate;
|
|
23
|
+
const c = Math.abs(Math.cos(t)) ** power;
|
|
24
|
+
const s = Math.abs(Math.sin(t) / ry) ** power;
|
|
25
|
+
return (c + s) ** (-1 / power);
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
const SHAPES: PolarShape[] = [
|
|
29
|
+
wavy(10, 0.12), // soft burst
|
|
30
|
+
wavy(9, 0.07), // 9-sided cookie
|
|
31
|
+
wavy(5, 0.14), // pentagon
|
|
32
|
+
superellipse(0.62, 4, Math.PI / 4), // pill, on the diagonal
|
|
33
|
+
wavy(8, 0.05), // sunny
|
|
34
|
+
wavy(4, 0.1), // 4-sided cookie
|
|
35
|
+
superellipse(0.78, 2, -Math.PI / 4), // oval
|
|
36
|
+
];
|
|
37
|
+
|
|
38
|
+
function sample(shape: PolarShape): Float32Array {
|
|
39
|
+
const radii = new Float32Array(SHAPE_POINTS);
|
|
40
|
+
for (let i = 0; i < SHAPE_POINTS; i += 1) {
|
|
41
|
+
radii[i] = shape((i / SHAPE_POINTS) * Math.PI * 2);
|
|
42
|
+
}
|
|
43
|
+
const max = Math.max(...radii);
|
|
44
|
+
return radii.map(r => r / max);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/** Every shape as normalised radii, in the order they morph. */
|
|
48
|
+
export const SHAPE_RADII: readonly Float32Array[] = SHAPES.map(sample);
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* For each shape, the turn (in samples) that best lines the next shape up with it, so matching
|
|
52
|
+
* lobes travel the shortest way during the morph. `PAIR_OFFSETS[i]` is for shape i to shape i + 1.
|
|
53
|
+
*/
|
|
54
|
+
export const PAIR_OFFSETS: readonly number[] = SHAPE_RADII.map((from, i) => {
|
|
55
|
+
const to = SHAPE_RADII[(i + 1) % SHAPE_RADII.length];
|
|
56
|
+
let best = 0;
|
|
57
|
+
let bestError = Infinity;
|
|
58
|
+
for (let k = 0; k < SHAPE_POINTS; k += 1) {
|
|
59
|
+
let error = 0;
|
|
60
|
+
for (let j = 0; j < SHAPE_POINTS; j += 1) {
|
|
61
|
+
const d = from[j] - to[(j + k) % SHAPE_POINTS];
|
|
62
|
+
error += d * d;
|
|
63
|
+
}
|
|
64
|
+
if (error < bestError) {
|
|
65
|
+
bestError = error;
|
|
66
|
+
best = k;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
// The shorter way round.
|
|
70
|
+
return best > SHAPE_POINTS / 2 ? best - SHAPE_POINTS : best;
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* An SVG path for a shape on its way from `from` to `to`: a per-point blend of radii, so the
|
|
75
|
+
* outline stays a recognisable shape the whole way through.
|
|
76
|
+
*
|
|
77
|
+
* @param from Radii of the shape being left.
|
|
78
|
+
* @param to Radii of the shape being reached.
|
|
79
|
+
* @param progress 0 at `from`, 1 at `to`.
|
|
80
|
+
* @param size Radius in viewBox units of a point whose normalised radius is 1.
|
|
81
|
+
* @param center Centre of the shape in viewBox units.
|
|
82
|
+
* @param offset Samples to turn `to` by before blending (see PAIR_OFFSETS). At 1 the path is
|
|
83
|
+
* `to` turned back by `offset` samples, which the caller makes up with its rotation.
|
|
84
|
+
*/
|
|
85
|
+
export function blendPath(
|
|
86
|
+
from: Float32Array,
|
|
87
|
+
to: Float32Array,
|
|
88
|
+
progress: number,
|
|
89
|
+
size: number,
|
|
90
|
+
center: number,
|
|
91
|
+
offset = 0,
|
|
92
|
+
): string {
|
|
93
|
+
let d = '';
|
|
94
|
+
for (let i = 0; i < SHAPE_POINTS; i += 1) {
|
|
95
|
+
const target =
|
|
96
|
+
to[(((i + offset) % SHAPE_POINTS) + SHAPE_POINTS) % SHAPE_POINTS];
|
|
97
|
+
const r = (from[i] + (target - from[i]) * progress) * size;
|
|
98
|
+
const theta = (i / SHAPE_POINTS) * Math.PI * 2;
|
|
99
|
+
const x = (center + r * Math.cos(theta)).toFixed(2);
|
|
100
|
+
const y = (center + r * Math.sin(theta)).toFixed(2);
|
|
101
|
+
d += `${i === 0 ? 'M' : 'L'}${x} ${y}`;
|
|
102
|
+
}
|
|
103
|
+
return `${d}Z`;
|
|
104
|
+
}
|
package/src/menu/menu/menu.scss
CHANGED
|
@@ -54,10 +54,14 @@
|
|
|
54
54
|
);
|
|
55
55
|
transform-origin: top center;
|
|
56
56
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
--_menu-enter-
|
|
60
|
-
|
|
57
|
+
// M3 Expressive: the menu grows open on the default spatial spring and fades away on the
|
|
58
|
+
// effects spring, which never overshoots. Lists follow `transition-property`.
|
|
59
|
+
--_menu-enter-duration: var(--motion-spring-fast-effects-duration),
|
|
60
|
+
var(--motion-spring-default-spatial-duration);
|
|
61
|
+
--_menu-exit-duration: var(--motion-spring-fast-effects-duration);
|
|
62
|
+
--_menu-enter-easing: var(--motion-spring-fast-effects-easing),
|
|
63
|
+
var(--motion-spring-default-spatial-easing);
|
|
64
|
+
--_menu-exit-easing: var(--motion-spring-fast-effects-easing);
|
|
61
65
|
|
|
62
66
|
transition-property: opacity, transform;
|
|
63
67
|
transition-duration: var(--_menu-exit-duration);
|
|
@@ -66,7 +70,7 @@
|
|
|
66
70
|
&.closed {
|
|
67
71
|
opacity: 0;
|
|
68
72
|
pointer-events: none;
|
|
69
|
-
transform: translateY(-4px) scale(0.
|
|
73
|
+
transform: translateY(-4px) scale(0.92);
|
|
70
74
|
}
|
|
71
75
|
|
|
72
76
|
&.open {
|
|
@@ -77,7 +81,7 @@
|
|
|
77
81
|
|
|
78
82
|
@starting-style {
|
|
79
83
|
opacity: 0;
|
|
80
|
-
transform: translateY(-4px) scale(0.
|
|
84
|
+
transform: translateY(-4px) scale(0.92);
|
|
81
85
|
}
|
|
82
86
|
}
|
|
83
87
|
|
package/src/modal/modal.scss
CHANGED
|
@@ -11,8 +11,12 @@
|
|
|
11
11
|
--modal-min-width: 280px;
|
|
12
12
|
--modal-max-width: 560px;
|
|
13
13
|
--modal-max-height: 90dvh;
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
// M3 Expressive: the dialog grows in on the default spatial spring; the scrim and the exit use
|
|
15
|
+
// the effects spring, which never overshoots.
|
|
16
|
+
--modal-transition-duration: var(--motion-spring-default-spatial-duration);
|
|
17
|
+
--modal-transition-easing: var(--motion-spring-default-spatial-easing);
|
|
18
|
+
--_modal-fade-duration: var(--motion-spring-default-effects-duration);
|
|
19
|
+
--_modal-fade-easing: var(--motion-spring-default-effects-easing);
|
|
16
20
|
--modal-heading-color: var(--color-on-surface);
|
|
17
21
|
--modal-subheading-color: var(--color-on-surface-variant);
|
|
18
22
|
--modal-content-color: var(--color-on-surface-variant);
|
|
@@ -50,7 +54,7 @@
|
|
|
50
54
|
inset: 0;
|
|
51
55
|
opacity: 0;
|
|
52
56
|
position: absolute;
|
|
53
|
-
transition: opacity var(--
|
|
57
|
+
transition: opacity var(--_modal-fade-duration) var(--_modal-fade-easing);
|
|
54
58
|
}
|
|
55
59
|
|
|
56
60
|
.scrim.visible {
|
|
@@ -93,7 +97,7 @@
|
|
|
93
97
|
}
|
|
94
98
|
|
|
95
99
|
&:not(.open) {
|
|
96
|
-
animation: modal-exit var(--
|
|
100
|
+
animation: modal-exit var(--_modal-fade-duration) var(--_modal-fade-easing) forwards;
|
|
97
101
|
}
|
|
98
102
|
}
|
|
99
103
|
|
package/src/modal/modal.ts
CHANGED
|
@@ -94,6 +94,9 @@ export class Modal extends LitElement {
|
|
|
94
94
|
/** Peacock's strings for the close button label. */
|
|
95
95
|
private readonly i18n = new I18nController(this);
|
|
96
96
|
|
|
97
|
+
/** Whether the current press began on the scrim, so a drag that ends there is not a scrim click. */
|
|
98
|
+
private _pressStartedOnScrim = false;
|
|
99
|
+
|
|
97
100
|
private readonly overlay = new OverlayController(this, {
|
|
98
101
|
surface: () => this._dialog,
|
|
99
102
|
modal: true,
|
|
@@ -166,10 +169,19 @@ export class Modal extends LitElement {
|
|
|
166
169
|
if (this.open) this._close('escape');
|
|
167
170
|
}
|
|
168
171
|
|
|
172
|
+
/** Records where a press starts: a drag that begins in the content and ends on the scrim must not close. */
|
|
173
|
+
private _handleDialogPointerDown(event: PointerEvent) {
|
|
174
|
+
const target = event.target as Element;
|
|
175
|
+
this._pressStartedOnScrim = !!target.classList?.contains('dialog-wrapper');
|
|
176
|
+
}
|
|
177
|
+
|
|
169
178
|
/** A click that lands outside the dialog container, not on its content, is a scrim click. */
|
|
170
179
|
private _handleDialogClick(event: MouseEvent) {
|
|
171
180
|
const target = event.target as Element;
|
|
172
|
-
|
|
181
|
+
const onScrim = !!target.classList?.contains('dialog-wrapper');
|
|
182
|
+
const pressStartedOnScrim = this._pressStartedOnScrim;
|
|
183
|
+
this._pressStartedOnScrim = false;
|
|
184
|
+
if (!onScrim || !pressStartedOnScrim) return;
|
|
173
185
|
if (!this.noLightDismiss) this._close('light-dismiss');
|
|
174
186
|
}
|
|
175
187
|
|
|
@@ -228,6 +240,7 @@ export class Modal extends LitElement {
|
|
|
228
240
|
aria-busy=${this.loading ? 'true' : nothing}
|
|
229
241
|
@cancel=${this._handleCancel}
|
|
230
242
|
@close=${this._handleNativeClose}
|
|
243
|
+
@pointerdown=${this._handleDialogPointerDown}
|
|
231
244
|
@click=${this._handleDialogClick}
|
|
232
245
|
>
|
|
233
246
|
<div
|
|
@@ -61,8 +61,8 @@
|
|
|
61
61
|
}
|
|
62
62
|
|
|
63
63
|
.expand-icon {
|
|
64
|
-
transition: transform var(--duration
|
|
65
|
-
var(--easing
|
|
64
|
+
transition: transform var(--motion-spring-fast-spatial-duration)
|
|
65
|
+
var(--motion-spring-fast-spatial-easing);
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
&.expanded .expand-icon {
|
|
@@ -49,8 +49,9 @@
|
|
|
49
49
|
overflow-y: auto;
|
|
50
50
|
|
|
51
51
|
&[open] {
|
|
52
|
-
|
|
53
|
-
|
|
52
|
+
// Critically damped, like the sheets: an overshoot would open a gap at the edge.
|
|
53
|
+
animation: slide-in var(--motion-spring-slow-effects-duration, 300ms)
|
|
54
|
+
var(--motion-spring-slow-effects-easing, ease-out);
|
|
54
55
|
}
|
|
55
56
|
|
|
56
57
|
&::backdrop {
|
|
@@ -77,8 +77,24 @@
|
|
|
77
77
|
border-radius: var(--_indicator-shape);
|
|
78
78
|
overflow: hidden;
|
|
79
79
|
flex-shrink: 0;
|
|
80
|
-
|
|
81
|
-
|
|
80
|
+
|
|
81
|
+
// The pill grows out from the centre on the default spatial spring when
|
|
82
|
+
// the item becomes current.
|
|
83
|
+
&::before {
|
|
84
|
+
content: '';
|
|
85
|
+
position: absolute;
|
|
86
|
+
inset: 0;
|
|
87
|
+
z-index: 0;
|
|
88
|
+
border-radius: inherit;
|
|
89
|
+
background-color: var(--_indicator-color);
|
|
90
|
+
opacity: 0;
|
|
91
|
+
transform: scaleX(0.32);
|
|
92
|
+
transition:
|
|
93
|
+
transform var(--motion-spring-default-spatial-duration)
|
|
94
|
+
var(--motion-spring-default-spatial-easing),
|
|
95
|
+
opacity var(--motion-spring-fast-effects-duration)
|
|
96
|
+
var(--motion-spring-fast-effects-easing);
|
|
97
|
+
}
|
|
82
98
|
|
|
83
99
|
.ripple {
|
|
84
100
|
inset: 0;
|
|
@@ -133,8 +149,10 @@
|
|
|
133
149
|
pointer-events: none;
|
|
134
150
|
z-index: 1;
|
|
135
151
|
transition:
|
|
136
|
-
color var(--
|
|
137
|
-
|
|
152
|
+
color var(--motion-spring-fast-effects-duration)
|
|
153
|
+
var(--motion-spring-fast-effects-easing),
|
|
154
|
+
font-weight var(--motion-spring-fast-effects-duration)
|
|
155
|
+
var(--motion-spring-fast-effects-easing);
|
|
138
156
|
}
|
|
139
157
|
|
|
140
158
|
/* Hide label when collapsed via class */
|
|
@@ -166,7 +184,10 @@
|
|
|
166
184
|
--_state-color: var(--_active-icon-color);
|
|
167
185
|
|
|
168
186
|
.indicator {
|
|
169
|
-
|
|
187
|
+
&::before {
|
|
188
|
+
opacity: 1;
|
|
189
|
+
transform: scaleX(1);
|
|
190
|
+
}
|
|
170
191
|
|
|
171
192
|
.icon-container {
|
|
172
193
|
::slotted(*) {
|
|
@@ -221,6 +242,7 @@
|
|
|
221
242
|
@media (prefers-reduced-motion: reduce) {
|
|
222
243
|
.item {
|
|
223
244
|
.indicator,
|
|
245
|
+
.indicator::before,
|
|
224
246
|
.label {
|
|
225
247
|
transition: none;
|
|
226
248
|
}
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
.digit-content {
|
|
22
22
|
display: flex;
|
|
23
23
|
flex-direction: column;
|
|
24
|
-
transition: transform var(--duration
|
|
24
|
+
transition: transform var(--motion-spring-default-spatial-duration) var(--motion-spring-default-spatial-easing);
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
.each-digit, .digit-separator {
|
|
@@ -77,7 +77,8 @@
|
|
|
77
77
|
color: var(--color-on-surface-variant);
|
|
78
78
|
font-variant-numeric: tabular-nums;
|
|
79
79
|
cursor: pointer;
|
|
80
|
-
transition: background-color var(--duration
|
|
80
|
+
transition: background-color var(--motion-spring-fast-effects-duration)
|
|
81
|
+
var(--motion-spring-fast-effects-easing);
|
|
81
82
|
|
|
82
83
|
&:hover {
|
|
83
84
|
background: color-mix(in srgb, var(--color-on-surface) 8%, transparent);
|
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
left: 0;
|
|
20
20
|
z-index: var(--z-index-popover, 1000);
|
|
21
21
|
|
|
22
|
-
--_popover-duration: var(--duration
|
|
23
|
-
--_popover-easing: var(--easing
|
|
22
|
+
--_popover-duration: var(--motion-spring-fast-effects-duration, 0.1s);
|
|
23
|
+
--_popover-easing: var(--motion-spring-fast-effects-easing, ease-in-out);
|
|
24
24
|
|
|
25
25
|
/* Keep the panel in the top layer while it fades out. */
|
|
26
26
|
transition:
|
|
@@ -71,6 +71,11 @@
|
|
|
71
71
|
:host([open]:not([popover])) .popover-content {
|
|
72
72
|
transform: none;
|
|
73
73
|
opacity: 1;
|
|
74
|
+
// M3 Expressive: it grows open on the default spatial spring and fades out without overshoot.
|
|
75
|
+
transition-duration: var(--motion-spring-default-spatial-duration, 0.1s),
|
|
76
|
+
var(--_popover-duration);
|
|
77
|
+
transition-timing-function: var(--motion-spring-default-spatial-easing, ease-out),
|
|
78
|
+
var(--_popover-easing);
|
|
74
79
|
|
|
75
80
|
@starting-style {
|
|
76
81
|
transform: scale(0.9);
|
|
@@ -37,10 +37,11 @@
|
|
|
37
37
|
height: 100%;
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
circle
|
|
40
|
+
circle,
|
|
41
|
+
path {
|
|
41
42
|
fill: none;
|
|
42
43
|
stroke-linecap: round;
|
|
43
|
-
transition: stroke-dashoffset var(--duration
|
|
44
|
+
transition: stroke-dashoffset var(--motion-spring-default-effects-duration) var(--motion-spring-default-effects-easing);
|
|
44
45
|
}
|
|
45
46
|
|
|
46
47
|
.track {
|