@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
|
@@ -1,9 +1,29 @@
|
|
|
1
|
-
import { html, nothing } from 'lit';
|
|
1
|
+
import { html, nothing, svg } from 'lit';
|
|
2
2
|
import { classMap } from 'lit/directives/class-map.js';
|
|
3
3
|
import { styleMap } from 'lit/directives/style-map.js';
|
|
4
4
|
import styles from './circular-progress.scss';
|
|
5
5
|
import { ProgressBase } from '../progress-base.js';
|
|
6
6
|
|
|
7
|
+
/**
|
|
8
|
+
* The ring for `wavy`: radius 6 around (8, 8), rippling by WAVE_AMPLITUDE with WAVE_COUNT waves.
|
|
9
|
+
* Its `pathLength` is set to the plain circle's circumference, so the dash maths (and the
|
|
10
|
+
* indeterminate keyframes) are the same for both.
|
|
11
|
+
*/
|
|
12
|
+
const WAVE_COUNT = 8;
|
|
13
|
+
const WAVE_AMPLITUDE = 0.4;
|
|
14
|
+
const WAVY_RING = (() => {
|
|
15
|
+
const points = 240;
|
|
16
|
+
let d = '';
|
|
17
|
+
for (let i = 0; i <= points; i += 1) {
|
|
18
|
+
const theta = (i / points) * Math.PI * 2;
|
|
19
|
+
const r = 6 + WAVE_AMPLITUDE * Math.sin(WAVE_COUNT * theta);
|
|
20
|
+
const x = (8 + r * Math.cos(theta)).toFixed(3);
|
|
21
|
+
const y = (8 + r * Math.sin(theta)).toFixed(3);
|
|
22
|
+
d += `${i === 0 ? 'M' : 'L'}${x} ${y}`;
|
|
23
|
+
}
|
|
24
|
+
return d;
|
|
25
|
+
})();
|
|
26
|
+
|
|
7
27
|
/**
|
|
8
28
|
* @label Circular Progress
|
|
9
29
|
* @tag wc-circular-progress
|
|
@@ -14,7 +34,9 @@ import { ProgressBase } from '../progress-base.js';
|
|
|
14
34
|
* range. The visible <code>label</code> names the indicator through
|
|
15
35
|
* <code>aria-labelledby</code>; without one, an <code>aria-label</code> on the element names it,
|
|
16
36
|
* else it is named "Loading". With
|
|
17
|
-
* <code>indeterminate</code> it spins, for a wait of unknown length
|
|
37
|
+
* <code>indeterminate</code> it spins, for a wait of unknown length. <code>wavy</code> draws the
|
|
38
|
+
* indicator as a rippling ring, the M3 Expressive style; for short waits also consider
|
|
39
|
+
* <code>wc-loading-indicator</code>.</p>
|
|
18
40
|
* @tags display
|
|
19
41
|
*
|
|
20
42
|
* @example
|
|
@@ -32,6 +54,10 @@ export class CircularProgress extends ProgressBase {
|
|
|
32
54
|
const radius = 6;
|
|
33
55
|
const circumference = 2 * Math.PI * radius;
|
|
34
56
|
const offset = circumference - (percentage / 100) * circumference;
|
|
57
|
+
const indicatorStyle = {
|
|
58
|
+
strokeDasharray: `${circumference}`,
|
|
59
|
+
strokeDashoffset: this.indeterminate ? undefined : `${offset}`,
|
|
60
|
+
};
|
|
35
61
|
|
|
36
62
|
return html`
|
|
37
63
|
<div
|
|
@@ -39,6 +65,7 @@ export class CircularProgress extends ProgressBase {
|
|
|
39
65
|
'circular-progress': true,
|
|
40
66
|
indeterminate: this.indeterminate,
|
|
41
67
|
inline: this.inline,
|
|
68
|
+
wavy: this.wavy,
|
|
42
69
|
})}"
|
|
43
70
|
role="progressbar"
|
|
44
71
|
aria-labelledby=${this.label ? 'label' : nothing}
|
|
@@ -52,16 +79,20 @@ export class CircularProgress extends ProgressBase {
|
|
|
52
79
|
<div class="circular-progress-container">
|
|
53
80
|
<svg viewBox="0 0 16 16">
|
|
54
81
|
<circle class="track" cx="8" cy="8" r="6"></circle>
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
82
|
+
${this.wavy && !this.__complete
|
|
83
|
+
? svg`<path
|
|
84
|
+
class="active-indicator"
|
|
85
|
+
d=${WAVY_RING}
|
|
86
|
+
pathLength=${circumference}
|
|
87
|
+
style="${styleMap(indicatorStyle)}"
|
|
88
|
+
></path>`
|
|
89
|
+
: svg`<circle
|
|
90
|
+
class="active-indicator"
|
|
91
|
+
cx="8"
|
|
92
|
+
cy="8"
|
|
93
|
+
r="6"
|
|
94
|
+
style="${styleMap(indicatorStyle)}"
|
|
95
|
+
></circle>`}
|
|
65
96
|
</svg>
|
|
66
97
|
</div>
|
|
67
98
|
|
|
@@ -82,11 +82,11 @@
|
|
|
82
82
|
|
|
83
83
|
&:not(.indeterminate) {
|
|
84
84
|
.track-start {
|
|
85
|
-
transition: width var(--duration
|
|
85
|
+
transition: width var(--motion-spring-default-effects-duration) var(--motion-spring-default-effects-easing);
|
|
86
86
|
}
|
|
87
87
|
|
|
88
88
|
.active-indicator {
|
|
89
|
-
transition: width var(--duration
|
|
89
|
+
transition: width var(--motion-spring-default-effects-duration) var(--motion-spring-default-effects-easing);
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
92
|
|
|
@@ -146,3 +146,71 @@
|
|
|
146
146
|
}
|
|
147
147
|
|
|
148
148
|
|
|
149
|
+
|
|
150
|
+
// ── Wavy (M3 Expressive) ──────────────────────────────────────────────
|
|
151
|
+
// The filled part is masked with a repeating sine stroke that travels forward. The track stays
|
|
152
|
+
// flat. Once the task is complete the mask goes and the bar settles back to a flat line.
|
|
153
|
+
$wave: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 10'%3E%3Cpath d='M0 5Q10 1 20 5T40 5' fill='none' stroke='%23000' stroke-width='4' stroke-linecap='round'/%3E%3C/svg%3E");
|
|
154
|
+
|
|
155
|
+
.linear-progress.wavy {
|
|
156
|
+
--_wave-height: calc(var(--progress-height) * 2.5);
|
|
157
|
+
--_wave-length: calc(var(--progress-height) * 10);
|
|
158
|
+
|
|
159
|
+
.progress-body .linear-progress-container {
|
|
160
|
+
align-items: center;
|
|
161
|
+
min-height: var(--_wave-height);
|
|
162
|
+
|
|
163
|
+
.track:after {
|
|
164
|
+
top: calc(var(--progress-height) / -2);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
.active-indicator {
|
|
168
|
+
height: var(--_wave-height);
|
|
169
|
+
border-radius: 0;
|
|
170
|
+
mask-image: $wave;
|
|
171
|
+
mask-size: var(--_wave-length) var(--_wave-height);
|
|
172
|
+
mask-repeat: repeat-x;
|
|
173
|
+
mask-position: 0 50%;
|
|
174
|
+
animation: wave-travel 1s linear infinite;
|
|
175
|
+
transition:
|
|
176
|
+
width var(--motion-spring-default-effects-duration) var(--motion-spring-default-effects-easing),
|
|
177
|
+
height var(--motion-spring-default-spatial-duration)
|
|
178
|
+
var(--motion-spring-default-spatial-easing);
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
&.indeterminate .progress-body .linear-progress-container .active-indicator {
|
|
183
|
+
animation:
|
|
184
|
+
active-indicator-indeterminate 3s var(--easing-linear) infinite,
|
|
185
|
+
wave-travel 1s linear infinite;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
&.complete .progress-body .linear-progress-container .active-indicator {
|
|
189
|
+
height: var(--progress-height);
|
|
190
|
+
border-radius: var(--shape-corner-full);
|
|
191
|
+
mask-image: none;
|
|
192
|
+
animation: none;
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
@keyframes wave-travel {
|
|
197
|
+
to {
|
|
198
|
+
mask-position: var(--_wave-length) 50%;
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
@media (prefers-reduced-motion: reduce) {
|
|
203
|
+
.linear-progress.wavy:not(.indeterminate)
|
|
204
|
+
.progress-body
|
|
205
|
+
.linear-progress-container
|
|
206
|
+
.active-indicator {
|
|
207
|
+
animation: none;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
.linear-progress.wavy.indeterminate
|
|
211
|
+
.progress-body
|
|
212
|
+
.linear-progress-container
|
|
213
|
+
.active-indicator {
|
|
214
|
+
animation: active-indicator-indeterminate 3s var(--easing-linear) infinite;
|
|
215
|
+
}
|
|
216
|
+
}
|
|
@@ -13,7 +13,8 @@ import { ProgressBase } from '../progress-base.js';
|
|
|
13
13
|
* <p><code>value</code> runs from 0 to <code>max</code> (default 100) and is clamped into that
|
|
14
14
|
* range. The visible <code>label</code> names the bar through <code>aria-labelledby</code>; without
|
|
15
15
|
* one, an <code>aria-label</code> on the element names it, else it is named "Loading". Use <code>indeterminate</code> when the amount of work is not
|
|
16
|
-
* known
|
|
16
|
+
* known. <code>wavy</code> draws the filled part as a moving wave, the M3 Expressive style; it
|
|
17
|
+
* flattens once the task is complete.</p>
|
|
17
18
|
* @tags display
|
|
18
19
|
*
|
|
19
20
|
* @example
|
|
@@ -33,6 +34,8 @@ export class LinearProgress extends ProgressBase {
|
|
|
33
34
|
'linear-progress': true,
|
|
34
35
|
indeterminate: this.indeterminate,
|
|
35
36
|
inline: this.inline,
|
|
37
|
+
wavy: this.wavy,
|
|
38
|
+
complete: this.__complete,
|
|
36
39
|
})}"
|
|
37
40
|
>
|
|
38
41
|
${this.label
|
|
@@ -30,6 +30,12 @@ export class ProgressBase extends mixinDelegatesAria(LitElement) {
|
|
|
30
30
|
/** Lays out the label and the indicator on one line instead of stacking them. */
|
|
31
31
|
@property({ type: Boolean }) inline = false;
|
|
32
32
|
|
|
33
|
+
/**
|
|
34
|
+
* Draws the active indicator as a wave, the M3 Expressive style. The wave flattens out once the
|
|
35
|
+
* task is complete, and stops moving with reduced motion.
|
|
36
|
+
*/
|
|
37
|
+
@property({ type: Boolean, reflect: true }) wavy = false;
|
|
38
|
+
|
|
33
39
|
/** Peacock's strings, for the fallback accessible name. */
|
|
34
40
|
protected readonly i18n = new I18nController(this);
|
|
35
41
|
|
|
@@ -50,6 +56,11 @@ export class ProgressBase extends mixinDelegatesAria(LitElement) {
|
|
|
50
56
|
return Math.min(this.__max, Math.max(0, value));
|
|
51
57
|
}
|
|
52
58
|
|
|
59
|
+
/** Whether a determinate task has reached `max`. */
|
|
60
|
+
protected get __complete(): boolean {
|
|
61
|
+
return !this.indeterminate && this.__clampedValue >= this.__max;
|
|
62
|
+
}
|
|
63
|
+
|
|
53
64
|
/** The clamped value as a percentage of `max`. */
|
|
54
65
|
__getPercentageValue(): number {
|
|
55
66
|
return (this.__clampedValue / this.__max) * 100;
|
|
@@ -16,7 +16,8 @@
|
|
|
16
16
|
background: var(--prompt-input-background, var(--color-surface));
|
|
17
17
|
border: 1px solid var(--color-outline);
|
|
18
18
|
border-radius: calc(var(--_line) / 2 + var(--spacing-200, 1rem));
|
|
19
|
-
transition: border-color
|
|
19
|
+
transition: border-color var(--motion-spring-fast-effects-duration)
|
|
20
|
+
var(--motion-spring-fast-effects-easing);
|
|
20
21
|
|
|
21
22
|
&.focused {
|
|
22
23
|
border-color: var(--color-primary);
|
package/src/radio/radio.scss
CHANGED
|
@@ -51,7 +51,8 @@
|
|
|
51
51
|
inset: 0;
|
|
52
52
|
border-radius: 50%;
|
|
53
53
|
opacity: 0;
|
|
54
|
-
transition: opacity var(--
|
|
54
|
+
transition: opacity var(--motion-spring-fast-effects-duration)
|
|
55
|
+
var(--motion-spring-fast-effects-easing);
|
|
55
56
|
}
|
|
56
57
|
|
|
57
58
|
.outer-circle {
|
|
@@ -61,7 +62,8 @@
|
|
|
61
62
|
border: 2px solid var(--radio-unselected-color);
|
|
62
63
|
border-radius: 50%;
|
|
63
64
|
box-sizing: border-box;
|
|
64
|
-
transition: border-color var(--
|
|
65
|
+
transition: border-color var(--motion-spring-fast-effects-duration)
|
|
66
|
+
var(--motion-spring-fast-effects-easing);
|
|
65
67
|
}
|
|
66
68
|
|
|
67
69
|
.inner-circle {
|
|
@@ -73,8 +75,10 @@
|
|
|
73
75
|
opacity: 0;
|
|
74
76
|
transform: scale(0.5);
|
|
75
77
|
transition:
|
|
76
|
-
transform var(--
|
|
77
|
-
|
|
78
|
+
transform var(--motion-spring-fast-spatial-duration)
|
|
79
|
+
var(--motion-spring-fast-spatial-easing),
|
|
80
|
+
opacity var(--motion-spring-fast-effects-duration)
|
|
81
|
+
var(--motion-spring-fast-effects-easing);
|
|
78
82
|
}
|
|
79
83
|
|
|
80
84
|
.label {
|
package/src/radio/radio.ts
CHANGED
|
@@ -10,6 +10,7 @@ import ToggleBase from '@/__internal/toggle-base.js';
|
|
|
10
10
|
import type { ControlValidity } from '@/__internal/input-base.js';
|
|
11
11
|
|
|
12
12
|
import styles from './radio.scss';
|
|
13
|
+
import { haptic } from '../__internal/utils/haptics.js';
|
|
13
14
|
|
|
14
15
|
type RadioDirection = 1 | -1;
|
|
15
16
|
|
|
@@ -138,6 +139,7 @@ export class Radio extends ToggleBase {
|
|
|
138
139
|
if (!this.checked) {
|
|
139
140
|
this.checked = true;
|
|
140
141
|
this.uncheckSiblings();
|
|
142
|
+
haptic('toggle');
|
|
141
143
|
this.dispatchChange(event);
|
|
142
144
|
}
|
|
143
145
|
|
|
@@ -36,7 +36,8 @@
|
|
|
36
36
|
cursor: col-resize;
|
|
37
37
|
touch-action: none;
|
|
38
38
|
outline: none;
|
|
39
|
-
transition: background-color var(--duration
|
|
39
|
+
transition: background-color var(--motion-spring-fast-effects-duration)
|
|
40
|
+
var(--motion-spring-fast-effects-easing);
|
|
40
41
|
|
|
41
42
|
&::before {
|
|
42
43
|
content: '';
|
package/src/search/search.scss
CHANGED
|
@@ -189,7 +189,8 @@
|
|
|
189
189
|
color: var(--_icon-color);
|
|
190
190
|
--icon-color: var(--_icon-color);
|
|
191
191
|
outline: none;
|
|
192
|
-
transition: background-color
|
|
192
|
+
transition: background-color var(--motion-spring-fast-effects-duration)
|
|
193
|
+
var(--motion-spring-fast-effects-easing);
|
|
193
194
|
|
|
194
195
|
&:hover:not([disabled]) {
|
|
195
196
|
background-color: color-mix(in srgb, var(--_icon-color) 8%, transparent);
|
|
@@ -31,8 +31,10 @@
|
|
|
31
31
|
background: transparent;
|
|
32
32
|
overflow: hidden;
|
|
33
33
|
transition:
|
|
34
|
-
background-color
|
|
35
|
-
|
|
34
|
+
background-color var(--motion-spring-fast-effects-duration)
|
|
35
|
+
var(--motion-spring-fast-effects-easing),
|
|
36
|
+
color var(--motion-spring-fast-effects-duration)
|
|
37
|
+
var(--motion-spring-fast-effects-easing);
|
|
36
38
|
|
|
37
39
|
.content {
|
|
38
40
|
position: relative;
|
|
@@ -63,7 +65,8 @@
|
|
|
63
65
|
background: var(--_segmented-button-state-layer-color);
|
|
64
66
|
opacity: 0;
|
|
65
67
|
pointer-events: none;
|
|
66
|
-
transition: opacity
|
|
68
|
+
transition: opacity var(--motion-spring-fast-effects-duration)
|
|
69
|
+
var(--motion-spring-fast-effects-easing);
|
|
67
70
|
}
|
|
68
71
|
|
|
69
72
|
/* right-side divider between segments */
|
|
@@ -95,6 +98,8 @@
|
|
|
95
98
|
|
|
96
99
|
.content {
|
|
97
100
|
color: var(--segmented-button-selected-label-text-color, var(--_segmented-button-selected-label-text-color));
|
|
101
|
+
// M3 Expressive: the selected label is emphasized.
|
|
102
|
+
@include mixin.get-typography(label-large-emphasized);
|
|
98
103
|
}
|
|
99
104
|
|
|
100
105
|
.state-layer {
|
package/src/select/select.scss
CHANGED
|
@@ -98,7 +98,8 @@
|
|
|
98
98
|
.dropdown-icon {
|
|
99
99
|
--icon-size: 1.5rem;
|
|
100
100
|
--icon-color: var(--color-on-surface-variant);
|
|
101
|
-
transition: transform
|
|
101
|
+
transition: transform var(--motion-spring-fast-spatial-duration)
|
|
102
|
+
var(--motion-spring-fast-spatial-easing);
|
|
102
103
|
flex-shrink: 0;
|
|
103
104
|
|
|
104
105
|
&.dropdown-icon--open {
|
|
@@ -9,8 +9,10 @@
|
|
|
9
9
|
--side-sheet-scrim-color: color-mix(in srgb, var(--color-scrim) 32%, transparent);
|
|
10
10
|
--side-sheet-shape: var(--shape-corner-extra-large, 28px);
|
|
11
11
|
--side-sheet-width: 360px;
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
// M3 Expressive: the sheet slides on the slow effects spring. It is critically damped, because an
|
|
13
|
+
// overshoot would open a gap at the edge the sheet is attached to.
|
|
14
|
+
--side-sheet-transition-duration: var(--motion-spring-slow-effects-duration, 300ms);
|
|
15
|
+
--side-sheet-transition-easing: var(--motion-spring-slow-effects-easing, cubic-bezier(0.2, 0, 0, 1));
|
|
14
16
|
}
|
|
15
17
|
|
|
16
18
|
/* The native dialog: reset its UA box; the scrim and the sheet are drawn inside it. */
|
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
:host([sticky]) {
|
|
15
15
|
position: sticky;
|
|
16
16
|
inset-block-start: 0;
|
|
17
|
-
transition: transform var(--duration
|
|
18
|
-
var(--easing
|
|
17
|
+
transition: transform var(--motion-spring-default-spatial-duration)
|
|
18
|
+
var(--motion-spring-default-spatial-easing);
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
:host([data-scrolled-away]) {
|
|
@@ -158,8 +158,8 @@
|
|
|
158
158
|
|
|
159
159
|
&[open] {
|
|
160
160
|
display: flex;
|
|
161
|
-
animation: site-header-slide-in var(--duration
|
|
162
|
-
var(--
|
|
161
|
+
animation: site-header-slide-in var(--motion-spring-slow-effects-duration)
|
|
162
|
+
var(--motion-spring-slow-effects-easing);
|
|
163
163
|
}
|
|
164
164
|
|
|
165
165
|
&:dir(rtl)[open] {
|
|
@@ -44,8 +44,8 @@
|
|
|
44
44
|
--icon-size: 1.125rem;
|
|
45
45
|
--icon-color: currentColor;
|
|
46
46
|
|
|
47
|
-
transition: transform var(--duration
|
|
48
|
-
var(--easing
|
|
47
|
+
transition: transform var(--motion-spring-fast-spatial-duration)
|
|
48
|
+
var(--motion-spring-fast-spatial-easing);
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
.open .chevron {
|
package/src/slider/slider.scss
CHANGED
|
@@ -1,14 +1,21 @@
|
|
|
1
1
|
@use '../../scss/mixin';
|
|
2
2
|
|
|
3
|
+
// M3 Expressive slider: a thick track split around a slim handle.
|
|
3
4
|
:host {
|
|
4
|
-
--_track-height:
|
|
5
|
-
--
|
|
6
|
-
--
|
|
5
|
+
--_track-height: 1rem;
|
|
6
|
+
--_track-shape: var(--shape-corner-small);
|
|
7
|
+
--_handle-height: 2.75rem;
|
|
8
|
+
--_handle-width: 0.25rem;
|
|
9
|
+
// Half the handle plus the gap that separates it from the track on each side.
|
|
10
|
+
--_handle-space: 0.5rem;
|
|
11
|
+
--_inner-shape: var(--shape-corner-extra-small);
|
|
12
|
+
--_icon-size: 1.5rem;
|
|
13
|
+
--_icon-inset: 0.5rem;
|
|
7
14
|
--_active-track-color: var(--color-primary);
|
|
8
15
|
--_inactive-track-color: var(--color-secondary-container);
|
|
9
16
|
--_thumb-color: var(--color-primary);
|
|
10
|
-
--_label-color: var(--color-
|
|
11
|
-
--_label-text-color: var(--color-on-
|
|
17
|
+
--_label-color: var(--color-inverse-surface);
|
|
18
|
+
--_label-text-color: var(--color-inverse-on-surface);
|
|
12
19
|
|
|
13
20
|
display: inline-block;
|
|
14
21
|
width: 100%;
|
|
@@ -17,14 +24,29 @@
|
|
|
17
24
|
touch-action: none; // Prevent scrolling while dragging
|
|
18
25
|
}
|
|
19
26
|
|
|
27
|
+
:host([size='sm']) {
|
|
28
|
+
--_track-height: 1.5rem;
|
|
29
|
+
}
|
|
30
|
+
|
|
20
31
|
:host([size='md']) {
|
|
21
|
-
--_track-height:
|
|
22
|
-
--
|
|
32
|
+
--_track-height: 2.5rem;
|
|
33
|
+
--_track-shape: var(--shape-corner-medium);
|
|
34
|
+
--_handle-height: 3.25rem;
|
|
23
35
|
}
|
|
24
36
|
|
|
25
37
|
:host([size='lg']) {
|
|
26
|
-
--_track-height:
|
|
27
|
-
--
|
|
38
|
+
--_track-height: 3.5rem;
|
|
39
|
+
--_track-shape: var(--shape-corner-large);
|
|
40
|
+
--_handle-height: 4.25rem;
|
|
41
|
+
--_icon-inset: 0.75rem;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
:host([size='xl']) {
|
|
45
|
+
--_track-height: 6rem;
|
|
46
|
+
--_track-shape: var(--shape-corner-extra-large);
|
|
47
|
+
--_handle-height: 6.75rem;
|
|
48
|
+
--_icon-size: 2rem;
|
|
49
|
+
--_icon-inset: 1rem;
|
|
28
50
|
}
|
|
29
51
|
|
|
30
52
|
.wrapper {
|
|
@@ -80,7 +102,7 @@
|
|
|
80
102
|
display: flex;
|
|
81
103
|
align-items: center;
|
|
82
104
|
width: 100%;
|
|
83
|
-
height:
|
|
105
|
+
height: max(3rem, var(--_handle-height)); // Touch target size
|
|
84
106
|
cursor: pointer;
|
|
85
107
|
|
|
86
108
|
&.disabled {
|
|
@@ -99,33 +121,85 @@
|
|
|
99
121
|
|
|
100
122
|
.track {
|
|
101
123
|
position: absolute;
|
|
102
|
-
|
|
124
|
+
top: 50%;
|
|
125
|
+
translate: 0 -50%;
|
|
103
126
|
height: var(--_track-height);
|
|
104
|
-
background-color: var(--_inactive-track-color);
|
|
105
|
-
border-radius: var(--_track-height);
|
|
106
|
-
overflow: hidden;
|
|
107
127
|
pointer-events: none;
|
|
128
|
+
transition:
|
|
129
|
+
width var(--motion-spring-fast-spatial-duration)
|
|
130
|
+
var(--motion-spring-fast-spatial-easing),
|
|
131
|
+
left var(--motion-spring-fast-spatial-duration)
|
|
132
|
+
var(--motion-spring-fast-spatial-easing);
|
|
133
|
+
}
|
|
108
134
|
|
|
109
|
-
|
|
135
|
+
// Outer ends follow the track shape; the ends beside the handle are nearly square.
|
|
136
|
+
.track-active {
|
|
137
|
+
// stylelint-disable-next-line property-disallowed-list
|
|
138
|
+
left: 0;
|
|
139
|
+
background-color: var(--_active-track-color);
|
|
140
|
+
border-radius: var(--_track-shape) var(--_inner-shape) var(--_inner-shape)
|
|
141
|
+
var(--_track-shape);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.track-inactive {
|
|
145
|
+
// stylelint-disable-next-line property-disallowed-list
|
|
146
|
+
right: 0;
|
|
147
|
+
background-color: var(--_inactive-track-color);
|
|
148
|
+
border-radius: var(--_inner-shape) var(--_track-shape) var(--_track-shape)
|
|
149
|
+
var(--_inner-shape);
|
|
150
|
+
|
|
151
|
+
// Stop indicator at the end of the track.
|
|
152
|
+
.stop {
|
|
110
153
|
position: absolute;
|
|
111
|
-
|
|
154
|
+
top: 50%;
|
|
155
|
+
// stylelint-disable-next-line property-disallowed-list
|
|
156
|
+
right: calc(var(--_track-height) / 2 - 0.125rem);
|
|
157
|
+
translate: 0 -50%;
|
|
158
|
+
width: 0.25rem;
|
|
159
|
+
height: 0.25rem;
|
|
160
|
+
border-radius: var(--shape-corner-full);
|
|
112
161
|
background-color: var(--_active-track-color);
|
|
113
|
-
will-change: width;
|
|
114
162
|
}
|
|
115
163
|
}
|
|
116
164
|
|
|
165
|
+
.track-icon {
|
|
166
|
+
position: absolute;
|
|
167
|
+
top: 50%;
|
|
168
|
+
translate: 0 -50%;
|
|
169
|
+
pointer-events: none;
|
|
170
|
+
--icon-size: var(--_icon-size);
|
|
171
|
+
--icon-color: var(--color-on-secondary-container);
|
|
172
|
+
transition: left var(--motion-spring-fast-spatial-duration)
|
|
173
|
+
var(--motion-spring-fast-spatial-easing);
|
|
174
|
+
|
|
175
|
+
&.on-active {
|
|
176
|
+
--icon-color: var(--color-on-primary);
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
.slider-container.dragging .track,
|
|
181
|
+
.slider-container.dragging .track-icon {
|
|
182
|
+
transition: none;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
// The handle: a slim rounded bar taller than the track. It narrows while pressed.
|
|
117
186
|
.thumb {
|
|
118
187
|
position: absolute;
|
|
119
188
|
top: 50%;
|
|
120
|
-
|
|
121
|
-
width: var(--
|
|
122
|
-
height: var(--
|
|
189
|
+
translate: 0 -50%;
|
|
190
|
+
width: var(--_handle-width);
|
|
191
|
+
height: var(--_handle-height);
|
|
123
192
|
background-color: var(--_thumb-color);
|
|
124
|
-
border-radius:
|
|
125
|
-
box-shadow: var(--elevation-level1);
|
|
193
|
+
border-radius: var(--shape-corner-full);
|
|
126
194
|
outline: none;
|
|
127
195
|
cursor: grab;
|
|
128
|
-
transition:
|
|
196
|
+
transition:
|
|
197
|
+
left var(--motion-spring-fast-spatial-duration)
|
|
198
|
+
var(--motion-spring-fast-spatial-easing),
|
|
199
|
+
width var(--motion-spring-fast-spatial-duration)
|
|
200
|
+
var(--motion-spring-fast-spatial-easing),
|
|
201
|
+
margin var(--motion-spring-fast-spatial-duration)
|
|
202
|
+
var(--motion-spring-fast-spatial-easing);
|
|
129
203
|
will-change: left;
|
|
130
204
|
z-index: 2;
|
|
131
205
|
|
|
@@ -133,70 +207,59 @@
|
|
|
133
207
|
align-items: center;
|
|
134
208
|
justify-content: center;
|
|
135
209
|
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
position: absolute;
|
|
140
|
-
top: 50%;
|
|
141
|
-
// Centering: physical on purpose, paired with the physical translate.
|
|
142
|
-
// stylelint-disable-next-line property-disallowed-list
|
|
143
|
-
left: 50%;
|
|
144
|
-
width: 40px;
|
|
145
|
-
height: 40px;
|
|
146
|
-
transform: translate(-50%, -50%);
|
|
147
|
-
border-radius: 50%;
|
|
148
|
-
background-color: var(--_thumb-color);
|
|
149
|
-
opacity: 0;
|
|
150
|
-
transition: opacity 0.2s;
|
|
210
|
+
&:focus-visible {
|
|
211
|
+
outline: 2px solid var(--color-secondary);
|
|
212
|
+
outline-offset: 2px;
|
|
151
213
|
}
|
|
152
214
|
|
|
153
|
-
&:
|
|
154
|
-
|
|
155
|
-
&:active {
|
|
215
|
+
&:active,
|
|
216
|
+
&.dragging {
|
|
156
217
|
cursor: grabbing;
|
|
157
|
-
|
|
218
|
+
width: calc(var(--_handle-width) / 2);
|
|
219
|
+
margin-inline-start: calc(var(--_handle-width) / 4);
|
|
158
220
|
}
|
|
159
221
|
|
|
160
|
-
//
|
|
222
|
+
// Follow the pointer exactly while dragging.
|
|
161
223
|
&.dragging {
|
|
162
|
-
transition:
|
|
224
|
+
transition:
|
|
225
|
+
width var(--motion-spring-fast-spatial-duration)
|
|
226
|
+
var(--motion-spring-fast-spatial-easing),
|
|
227
|
+
margin var(--motion-spring-fast-spatial-duration)
|
|
228
|
+
var(--motion-spring-fast-spatial-easing);
|
|
163
229
|
}
|
|
164
230
|
}
|
|
165
231
|
|
|
166
|
-
// Value
|
|
232
|
+
// Value label: a pill above the handle while it is used.
|
|
167
233
|
.value-label {
|
|
168
234
|
position: absolute;
|
|
169
235
|
bottom: 100%;
|
|
170
|
-
|
|
171
|
-
|
|
236
|
+
// stylelint-disable-next-line property-disallowed-list
|
|
237
|
+
left: 50%;
|
|
238
|
+
margin-bottom: 0.25rem;
|
|
239
|
+
min-width: 3rem;
|
|
240
|
+
padding: 0.75rem 1rem;
|
|
172
241
|
background-color: var(--_label-color);
|
|
173
242
|
color: var(--_label-text-color);
|
|
174
|
-
border-radius: var(--shape-corner-
|
|
175
|
-
|
|
243
|
+
border-radius: var(--shape-corner-full);
|
|
244
|
+
@include mixin.get-typography(label-large);
|
|
245
|
+
text-align: center;
|
|
176
246
|
white-space: nowrap;
|
|
177
247
|
opacity: 0;
|
|
178
|
-
transform:
|
|
179
|
-
|
|
248
|
+
transform: translate(-50%, 0.5rem) scale(0.6);
|
|
249
|
+
transform-origin: 50% 100%;
|
|
250
|
+
transition:
|
|
251
|
+
opacity var(--motion-spring-fast-effects-duration)
|
|
252
|
+
var(--motion-spring-fast-effects-easing),
|
|
253
|
+
transform var(--motion-spring-fast-spatial-duration)
|
|
254
|
+
var(--motion-spring-fast-spatial-easing);
|
|
180
255
|
pointer-events: none;
|
|
181
|
-
|
|
182
|
-
// Tooltip triangle
|
|
183
|
-
&::after {
|
|
184
|
-
content: '';
|
|
185
|
-
position: absolute;
|
|
186
|
-
top: 100%;
|
|
187
|
-
// stylelint-disable-next-line property-disallowed-list
|
|
188
|
-
left: 50%;
|
|
189
|
-
transform: translateX(-50%);
|
|
190
|
-
border: 6px solid transparent;
|
|
191
|
-
border-top-color: var(--_label-color);
|
|
192
|
-
}
|
|
193
256
|
}
|
|
194
257
|
|
|
195
258
|
.slider-container.dragging .value-label,
|
|
196
259
|
.slider-container:active .value-label,
|
|
197
260
|
.thumb:focus-visible .value-label {
|
|
198
261
|
opacity: 1;
|
|
199
|
-
transform:
|
|
262
|
+
transform: translate(-50%, 0) scale(1);
|
|
200
263
|
}
|
|
201
264
|
// The label with the Suggested badge beside it (ADR-030002).
|
|
202
265
|
.label-row {
|