@expressivecss/expressive 0.3.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (96) hide show
  1. package/CHANGELOG.md +96 -0
  2. package/README.md +4 -9
  3. package/dist/css/expressive.css +3183 -2150
  4. package/dist/css/expressive.css.map +1 -1
  5. package/dist/css/expressive.min.css +1 -1
  6. package/dist/css/expressive.min.css.map +1 -1
  7. package/dist/js/expressive.cjs +1254 -1567
  8. package/dist/js/expressive.cjs.map +4 -4
  9. package/dist/js/expressive.js +1254 -1567
  10. package/dist/js/expressive.js.map +4 -4
  11. package/dist/js/expressive.min.js +12 -22
  12. package/dist/js/expressive.min.js.map +4 -4
  13. package/dist/js/expressive.mjs +1254 -1568
  14. package/dist/js/expressive.mjs.map +4 -4
  15. package/dist/types/behaviors/bottomSheets.d.ts +18 -0
  16. package/dist/types/behaviors/sideSheets.d.ts +18 -0
  17. package/dist/types/components/autocomplete.d.ts +13 -20
  18. package/dist/types/components/buttons.d.ts +2 -2
  19. package/dist/types/components/cards.d.ts +3 -6
  20. package/dist/types/components/carousel.d.ts +3 -3
  21. package/dist/types/components/characterCounter.d.ts +3 -5
  22. package/dist/types/components/chips.d.ts +2 -2
  23. package/dist/types/components/datepicker.d.ts +2 -8
  24. package/dist/types/components/index.d.ts +3 -6
  25. package/dist/types/components/lightbox.d.ts +2 -2
  26. package/dist/types/components/{dropdown.d.ts → menu.d.ts} +48 -38
  27. package/dist/types/components/navigationRail.d.ts +53 -0
  28. package/dist/types/components/parallax.d.ts +2 -8
  29. package/dist/types/components/range.d.ts +5 -2
  30. package/dist/types/components/registry.d.ts +7 -19
  31. package/dist/types/components/scrollspy.d.ts +26 -50
  32. package/dist/types/components/select.d.ts +28 -14
  33. package/dist/types/components/sidenav.d.ts +40 -55
  34. package/dist/types/components/slider.d.ts +2 -2
  35. package/dist/types/components/{toasts.d.ts → snackbar.d.ts} +28 -25
  36. package/dist/types/components/tabs.d.ts +2 -2
  37. package/dist/types/components/timepicker.d.ts +2 -4
  38. package/dist/types/components/tooltip.d.ts +2 -2
  39. package/dist/types/core/component.d.ts +4 -4
  40. package/dist/types/index.d.ts +3 -1
  41. package/package.json +4 -3
  42. package/src/sass/README.md +13 -15
  43. package/src/sass/abstracts/_breakpoints.scss +14 -19
  44. package/src/sass/abstracts/_mixins.scss +3 -3
  45. package/src/sass/abstracts/_variables.scss +27 -23
  46. package/src/sass/base/_global.scss +1 -1
  47. package/src/sass/base/_grid.scss +64 -133
  48. package/src/sass/base/_index.scss +1 -1
  49. package/src/sass/components/_badges.scss +76 -61
  50. package/src/sass/components/_bottom-sheet.scss +137 -0
  51. package/src/sass/components/_buttons.scss +22 -54
  52. package/src/sass/components/_cards.scss +54 -127
  53. package/src/sass/components/_carousel.scss +4 -6
  54. package/src/sass/components/_chips.scss +6 -5
  55. package/src/sass/components/_datepicker.scss +1 -15
  56. package/src/sass/components/_dialog.scss +268 -0
  57. package/src/sass/components/_index.scss +9 -7
  58. package/src/sass/components/_list.scss +253 -0
  59. package/src/sass/components/_menu.scss +341 -0
  60. package/src/sass/components/_navbar.scss +68 -117
  61. package/src/sass/components/_navigation-bar.scss +165 -0
  62. package/src/sass/components/_navigation-rail.scss +308 -0
  63. package/src/sass/components/_page-footer.scss +138 -15
  64. package/src/sass/components/_parallax.scss +7 -28
  65. package/src/sass/components/_preloader.scss +145 -300
  66. package/src/sass/components/_scrollspy.scss +18 -0
  67. package/src/sass/components/_side-sheet.scss +193 -0
  68. package/src/sass/components/_sidenav.scss +281 -146
  69. package/src/sass/components/{_toast.scss → _snackbar.scss} +43 -43
  70. package/src/sass/components/_table_of_contents.scss +30 -14
  71. package/src/sass/components/_tabs.scss +43 -50
  72. package/src/sass/components/_toolbar.scss +93 -27
  73. package/src/sass/components/_tooltip.scss +5 -10
  74. package/src/sass/components/_transitions.scss +0 -5
  75. package/src/sass/components/forms/_fieldset.scss +1 -1
  76. package/src/sass/components/forms/_index.scss +0 -5
  77. package/src/sass/components/forms/_input-fields.scss +52 -55
  78. package/src/sass/components/forms/_range.scss +423 -98
  79. package/src/sass/components/forms/_select.scss +177 -60
  80. package/src/sass/components/forms/_switches.scss +21 -8
  81. package/src/sass/tokens/_reference.scss +37 -13
  82. package/src/sass/tokens/_theme.scss +5 -13
  83. package/src/sass/utilities/_colors.scss +16 -74
  84. package/src/sass/utilities/_helpers.scss +1 -3
  85. package/src/sass/utilities/_typescale.scss +0 -5
  86. package/src/sass/utilities/_visibility.scss +10 -2
  87. package/dist/types/components/collapsible.d.ts +0 -96
  88. package/dist/types/components/modal.d.ts +0 -45
  89. package/dist/types/components/pushpin.d.ts +0 -51
  90. package/dist/types/components/tapTarget.d.ts +0 -57
  91. package/src/sass/components/_collapsible.scss +0 -181
  92. package/src/sass/components/_collection.scss +0 -198
  93. package/src/sass/components/_dropdown.scss +0 -129
  94. package/src/sass/components/_modal.scss +0 -208
  95. package/src/sass/components/_pushpin.scss +0 -11
  96. package/src/sass/components/_tapTarget.scss +0 -191
@@ -2,7 +2,7 @@
2
2
 
3
3
  // Parallax. Anatomy is the HTML: a .parallax (or <figure class="parallax">)
4
4
  // clips an <img>, <picture>, or <video>. A heading / <p> / <figcaption> is
5
- // the overlay. .parallax-container is the old wrapper and still works.
5
+ // the overlay.
6
6
  //
7
7
  // Motion is CSS. A named view timeline on the clip drives the image; without
8
8
  // animation-timeline the image is just object-fit: cover. JS does not scroll.
@@ -12,8 +12,7 @@
12
12
  // --md-comp-parallax-travel how far the image moves (64px)
13
13
  // --md-comp-parallax-shape 12px, same as media / lightbox / slider
14
14
 
15
- .parallax,
16
- .parallax-container {
15
+ .parallax {
17
16
  --md-comp-parallax-height: 500px;
18
17
  --md-comp-parallax-travel: 120px;
19
18
  --md-comp-parallax-shape: 12px;
@@ -29,22 +28,8 @@
29
28
  view-timeline-axis: block;
30
29
  }
31
30
 
32
- // Old markup: container > .parallax > img. The outer box is the clip;
33
- // the inner .parallax is just a fill, not a second 500px window.
34
- .parallax-container > .parallax {
35
- position: absolute;
36
- inset: 0;
37
- height: auto;
38
- margin: 0;
39
- border-radius: 0;
40
- overflow: visible;
41
- view-timeline-name: none;
42
- }
43
-
44
31
  .parallax > :is(img, video),
45
- .parallax > picture,
46
- .parallax-container .parallax > :is(img, video),
47
- .parallax-container .parallax > picture {
32
+ .parallax > picture {
48
33
  position: absolute;
49
34
  inset: 0;
50
35
  display: block;
@@ -53,8 +38,7 @@
53
38
  border: 0;
54
39
  }
55
40
 
56
- .parallax > picture img,
57
- .parallax-container .parallax > picture img {
41
+ .parallax > picture img {
58
42
  display: block;
59
43
  width: 100%;
60
44
  height: 100%;
@@ -62,9 +46,7 @@
62
46
  }
63
47
 
64
48
  .parallax > :is(img, video),
65
- .parallax > picture img,
66
- .parallax-container .parallax > :is(img, video),
67
- .parallax-container .parallax > picture img {
49
+ .parallax > picture img {
68
50
  object-fit: cover;
69
51
  object-position: center;
70
52
  }
@@ -95,8 +77,7 @@
95
77
  }
96
78
 
97
79
  // Full-bleed hero. Meets the viewport edges; no corners.
98
- .parallax.max,
99
- .parallax-container.max {
80
+ .parallax.max {
100
81
  height: 100vh;
101
82
  height: 100dvh;
102
83
  border-radius: 0;
@@ -107,9 +88,7 @@
107
88
  @supports (animation-timeline: view()) {
108
89
  @media (prefers-reduced-motion: no-preference) {
109
90
  .parallax > :is(img, video),
110
- .parallax > picture img,
111
- .parallax-container .parallax > :is(img, video),
112
- .parallax-container .parallax > picture img {
91
+ .parallax > picture img {
113
92
  height: calc(100% + 2 * var(--md-comp-parallax-travel));
114
93
  inset: calc(-1 * var(--md-comp-parallax-travel)) 0 auto;
115
94
  animation: parallax-shift linear both;
@@ -1,344 +1,189 @@
1
1
  @use "../abstracts" as *;
2
2
 
3
+ // Progress. Anatomy is the HTML:
4
+ // <progress class="progress" value="70" max="100"> determinate bar
5
+ // <progress class="progress"> indeterminate bar
6
+ // <span class="preloader" role="status"> circular spinner
7
+ //
8
+ // Linear aliases: .progress > .determinate / .indeterminate, and
9
+ // --md-comp-progress-value on a bare div.progress.
10
+ //
11
+ // Tokens:
12
+ // --md-comp-progress-track
13
+ // --md-comp-progress-indicator
14
+ // --md-comp-progress-thickness 4px
15
+ // --md-comp-progress-shape 4px
16
+ // --md-comp-progress-value determinate fill (optional)
17
+ // --md-comp-progress-circular-size 48px
18
+ // --md-comp-progress-circular-thickness 4px
19
+
20
+ .progress,
21
+ .preloader {
22
+ --md-comp-progress-track: var(--md-sys-color-secondary-container);
23
+ --md-comp-progress-indicator: var(--md-sys-color-primary);
24
+ --md-comp-progress-thickness: 4px;
25
+ --md-comp-progress-shape: 4px;
26
+ --md-comp-progress-circular-size: 48px;
27
+ --md-comp-progress-circular-thickness: 4px;
28
+ }
29
+
30
+ // ---------------------------------------------------------------------------
31
+ // Linear
32
+ // ---------------------------------------------------------------------------
33
+
3
34
  .progress {
35
+ box-sizing: border-box;
4
36
  position: relative;
5
- height: 4px;
6
37
  display: block;
7
38
  width: 100%;
8
- background-color: var(--md-sys-color-surface-variant);
9
- border-radius: 4px;
10
- margin: $element-top-margin 0 $element-bottom-margin 0;
39
+ height: var(--md-comp-progress-thickness);
40
+ margin: $element-top-margin 0 $element-bottom-margin;
11
41
  overflow: hidden;
12
- background-color: var(--md-sys-color-secondary-container);
13
-
14
- .determinate {
15
- position: absolute;
16
- top: 0;
17
- left: 0;
18
- bottom: 0;
19
- background-color: var(--md-sys-color-primary);
20
- transition: width .3s linear;
21
- }
22
-
23
- .indeterminate {
24
- background-color: var(--md-sys-color-primary);
25
-
26
- &:before {
27
- content: '';
28
- position: absolute;
29
- background-color: inherit;
30
- top: 0;
31
- left: 0;
32
- bottom: 0;
33
- will-change: left, right;
34
- // Custom bezier
35
- animation: indeterminate 2.1s cubic-bezier(0.650, 0.815, 0.735, 0.395) infinite;
36
-
37
- }
38
-
39
- &:after {
40
- content: '';
41
- position: absolute;
42
- background-color: inherit;
43
- top: 0;
44
- left: 0;
45
- bottom: 0;
46
- will-change: left, right;
47
- // Custom bezier
48
- animation: indeterminate-short 2.1s cubic-bezier(0.165, 0.840, 0.440, 1.000) infinite;
49
- animation-delay: 1.15s;
50
- }
51
- }
42
+ border: 0;
43
+ border-radius: var(--md-comp-progress-shape);
44
+ background-color: var(--md-comp-progress-track);
45
+ appearance: none;
46
+ -webkit-appearance: none;
52
47
  }
53
48
 
54
- @keyframes indeterminate {
55
- 0% {
56
- left: -35%;
57
- right: 100%;
58
- }
59
- 60% {
60
- left: 100%;
61
- right: -90%;
62
- }
63
- 100% {
64
- left: 100%;
65
- right: -90%;
66
- }
67
- }
49
+ progress.progress {
50
+ vertical-align: baseline;
68
51
 
69
- @keyframes indeterminate-short {
70
- 0% {
71
- left: -200%;
72
- right: 100%;
73
- }
74
- 60% {
75
- left: 107%;
76
- right: -8%;
77
- }
78
- 100% {
79
- left: 107%;
80
- right: -8%;
52
+ &::-webkit-progress-bar {
53
+ background-color: var(--md-comp-progress-track);
54
+ border-radius: var(--md-comp-progress-shape);
81
55
  }
82
- }
83
-
84
-
85
-
86
- /*
87
- @license
88
- Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
89
- This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
90
- The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
91
- The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
92
- Code distributed by Google as part of the polymer project is also
93
- subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
94
- */
95
56
 
96
- /**************************/
97
- /* STYLES FOR THE SPINNER */
98
- /**************************/
99
-
100
- /*
101
- * Constants:
102
- * STROKEWIDTH = 3px
103
- * ARCSIZE = 270 degrees (amount of circle the arc takes up)
104
- * ARCTIME = 1333ms (time it takes to expand and contract arc)
105
- * ARCSTARTROT = 216 degrees (how much the start location of the arc
106
- * should rotate each time, 216 gives us a
107
- * 5 pointed star shape (it's 360/5 * 3).
108
- * For a 7 pointed star, we might do
109
- * 360/7 * 3 = 154.286)
110
- * CONTAINERWIDTH = 28px
111
- * SHRINK_TIME = 400ms
112
- */
113
-
114
-
115
- .preloader-wrapper {
116
- display: inline-block;
117
- position: relative;
118
- width: 50px;
119
- height: 50px;
120
-
121
- &.small {
122
- width: 36px;
123
- height: 36px;
57
+ &::-webkit-progress-value {
58
+ background-color: var(--md-comp-progress-indicator);
59
+ border-radius: var(--md-comp-progress-shape);
124
60
  }
125
61
 
126
- &.big {
127
- width: 64px;
128
- height: 64px;
62
+ &::-moz-progress-bar {
63
+ background-color: var(--md-comp-progress-indicator);
64
+ border-radius: var(--md-comp-progress-shape);
129
65
  }
130
66
 
131
- &.active {
132
- /* duration: 360 * ARCTIME / (ARCSTARTROT + (360-ARCSIZE)) */
133
- animation: container-rotate 1568ms linear infinite;
67
+ &:indeterminate::-webkit-progress-value,
68
+ &:indeterminate::-moz-progress-bar {
69
+ background-color: transparent;
134
70
  }
135
71
  }
136
72
 
137
- @keyframes container-rotate {
138
- to { transform: rotate(360deg) }
139
- }
140
-
141
- .spinner-layer {
73
+ .progress > .determinate {
142
74
  position: absolute;
143
- width: 100%;
144
- height: 100%;
145
- opacity: 0;
146
- border-color: var(--md-sys-color-primary);
147
- }
148
-
149
- .spinner-blue,
150
- .spinner-blue-only {
151
- border-color: #4285f4;
152
- }
153
-
154
- .spinner-red,
155
- .spinner-red-only {
156
- border-color: #db4437;
157
- }
158
-
159
- .spinner-yellow,
160
- .spinner-yellow-only {
161
- border-color: #f4b400;
162
- }
163
-
164
- .spinner-green,
165
- .spinner-green-only {
166
- border-color: #0f9d58;
167
- }
168
-
169
- /**
170
- * NOTE ABOUT CSS ANIMATION PROPERTIES (keanulee):
171
- *
172
- * iOS Safari (tested on iOS 8.1) does not handle animation-delay very well - it doesn't
173
- * guarantee that the animation will start _exactly_ after that value. So we avoid using
174
- * animation-delay and instead set custom keyframes for each color (as redundant as it
175
- * seems).
176
- *
177
- * The second half of this note explained why each animation is written as the
178
- * `animation` shorthand rather than as separate animation-name/-duration
179
- * longhands: the Web Animations polyfill on old Safari mistook the longhands
180
- * for -webkit-animation. That polyfill is long gone, and the prefixed
181
- * declarations it was about have been removed - the shorthand is kept only
182
- * because it is shorter here. See github.com/Polymer/platform/issues/53.
183
- */
184
- .active .spinner-layer.spinner-blue {
185
- /* durations: 4 * ARCTIME */
186
- animation: fill-unfill-rotate 5332ms cubic-bezier(0.4, 0.0, 0.2, 1) infinite both, blue-fade-in-out 5332ms cubic-bezier(0.4, 0.0, 0.2, 1) infinite both;
75
+ inset: 0 auto 0 0;
76
+ width: var(--md-comp-progress-value, 0%);
77
+ background-color: var(--md-comp-progress-indicator);
78
+ transition: width 0.3s linear;
187
79
  }
188
80
 
189
- .active .spinner-layer.spinner-red {
190
- /* durations: 4 * ARCTIME */
191
- animation: fill-unfill-rotate 5332ms cubic-bezier(0.4, 0.0, 0.2, 1) infinite both, red-fade-in-out 5332ms cubic-bezier(0.4, 0.0, 0.2, 1) infinite both;
192
- }
193
-
194
- .active .spinner-layer.spinner-yellow {
195
- /* durations: 4 * ARCTIME */
196
- animation: fill-unfill-rotate 5332ms cubic-bezier(0.4, 0.0, 0.2, 1) infinite both, yellow-fade-in-out 5332ms cubic-bezier(0.4, 0.0, 0.2, 1) infinite both;
197
- }
198
-
199
- .active .spinner-layer.spinner-green {
200
- /* durations: 4 * ARCTIME */
201
- animation: fill-unfill-rotate 5332ms cubic-bezier(0.4, 0.0, 0.2, 1) infinite both, green-fade-in-out 5332ms cubic-bezier(0.4, 0.0, 0.2, 1) infinite both;
202
- }
81
+ // Bare div.progress with a value token, no child.
82
+ .progress:not(:is(progress)):not(:has(> .determinate, > .indeterminate)) {
83
+ &::after {
84
+ content: "";
85
+ position: absolute;
86
+ inset: 0 auto 0 0;
87
+ width: var(--md-comp-progress-value, 0%);
88
+ background-color: var(--md-comp-progress-indicator);
89
+ transition: width 0.3s linear;
90
+ }
203
91
 
204
- .active .spinner-layer,
205
- .active .spinner-layer.spinner-blue-only,
206
- .active .spinner-layer.spinner-red-only,
207
- .active .spinner-layer.spinner-yellow-only,
208
- .active .spinner-layer.spinner-green-only {
209
- /* durations: 4 * ARCTIME */
210
- opacity: 1;
211
- animation: fill-unfill-rotate 5332ms cubic-bezier(0.4, 0.0, 0.2, 1) infinite both;
92
+ &:not([style*="--md-comp-progress-value"])::after {
93
+ width: auto;
94
+ animation: preloader-indeterminate 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;
95
+ }
212
96
  }
213
97
 
214
- @keyframes fill-unfill-rotate {
215
- 12.5% { transform: rotate(135deg); } /* 0.5 * ARCSIZE */
216
- 25% { transform: rotate(270deg); } /* 1 * ARCSIZE */
217
- 37.5% { transform: rotate(405deg); } /* 1.5 * ARCSIZE */
218
- 50% { transform: rotate(540deg); } /* 2 * ARCSIZE */
219
- 62.5% { transform: rotate(675deg); } /* 2.5 * ARCSIZE */
220
- 75% { transform: rotate(810deg); } /* 3 * ARCSIZE */
221
- 87.5% { transform: rotate(945deg); } /* 3.5 * ARCSIZE */
222
- to { transform: rotate(1080deg); } /* 4 * ARCSIZE */
223
- }
98
+ .progress > .indeterminate,
99
+ progress.progress:indeterminate {
100
+ background-color: transparent;
224
101
 
225
- @keyframes blue-fade-in-out {
226
- from { opacity: 1; }
227
- 25% { opacity: 1; }
228
- 26% { opacity: 0; }
229
- 89% { opacity: 0; }
230
- 90% { opacity: 1; }
231
- 100% { opacity: 1; }
232
- }
102
+ &::before,
103
+ &::after {
104
+ content: "";
105
+ position: absolute;
106
+ inset: 0 auto 0 0;
107
+ background-color: var(--md-comp-progress-indicator);
108
+ }
233
109
 
234
- @keyframes red-fade-in-out {
235
- from { opacity: 0; }
236
- 15% { opacity: 0; }
237
- 25% { opacity: 1; }
238
- 50% { opacity: 1; }
239
- 51% { opacity: 0; }
240
- }
110
+ &::before {
111
+ animation: preloader-indeterminate 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;
112
+ }
241
113
 
242
- @keyframes yellow-fade-in-out {
243
- from { opacity: 0; }
244
- 40% { opacity: 0; }
245
- 50% { opacity: 1; }
246
- 75% { opacity: 1; }
247
- 76% { opacity: 0; }
114
+ &::after {
115
+ animation: preloader-indeterminate-short 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) infinite;
116
+ animation-delay: 1.15s;
117
+ }
248
118
  }
249
119
 
250
- @keyframes green-fade-in-out {
251
- from { opacity: 0; }
252
- 65% { opacity: 0; }
253
- 75% { opacity: 1; }
254
- 90% { opacity: 1; }
255
- 100% { opacity: 0; }
120
+ @keyframes preloader-indeterminate {
121
+ 0% { left: -35%; right: 100%; }
122
+ 60% { left: 100%; right: -90%; }
123
+ 100% { left: 100%; right: -90%; }
256
124
  }
257
125
 
258
- /**
259
- * Patch the gap that appear between the two adjacent div.circle-clipper while the
260
- * spinner is rotating (appears on Chrome 38, Safari 7.1, and IE 11).
261
- */
262
- .gap-patch {
263
- position: absolute;
264
- top: 0;
265
- left: 45%;
266
- width: 10%;
267
- height: 100%;
268
- overflow: hidden;
269
- border-color: inherit;
126
+ @keyframes preloader-indeterminate-short {
127
+ 0% { left: -200%; right: 100%; }
128
+ 60% { left: 107%; right: -8%; }
129
+ 100% { left: 107%; right: -8%; }
270
130
  }
271
131
 
272
- .gap-patch .circle {
273
- width: 1000%;
274
- left: -450%;
275
- }
132
+ // ---------------------------------------------------------------------------
133
+ // Circular — one element
134
+ // ---------------------------------------------------------------------------
276
135
 
277
- .circle-clipper {
136
+ .preloader {
137
+ box-sizing: border-box;
278
138
  display: inline-block;
279
- position: relative;
280
- width: 50%;
281
- height: 100%;
282
- overflow: hidden;
283
- border-color: inherit;
284
-
285
- .circle {
286
- width: 200%;
287
- height: 100%;
288
- border-width: 3px; /* STROKEWIDTH */
289
- border-style: solid;
290
- border-color: inherit;
291
- border-bottom-color: transparent !important;
292
- border-radius: 50%;
139
+ width: var(--md-comp-progress-circular-size);
140
+ height: var(--md-comp-progress-circular-size);
141
+ border-radius: 50%;
142
+ background: conic-gradient(
143
+ from 0turn,
144
+ var(--md-comp-progress-indicator) 0 90deg,
145
+ transparent 90deg 360deg
146
+ );
147
+ mask: radial-gradient(
148
+ farthest-side,
149
+ transparent calc(100% - var(--md-comp-progress-circular-thickness)),
150
+ #000 0
151
+ );
152
+ -webkit-mask: radial-gradient(
153
+ farthest-side,
154
+ transparent calc(100% - var(--md-comp-progress-circular-thickness)),
155
+ #000 0
156
+ );
157
+ animation: preloader-rotate 1.4s linear infinite;
158
+ vertical-align: middle;
159
+
160
+ &.small { --md-comp-progress-circular-size: 36px; }
161
+ &.big { --md-comp-progress-circular-size: 64px; }
162
+
163
+ &.determinate {
293
164
  animation: none;
294
- position: absolute;
295
- top: 0;
296
- right: 0;
297
- bottom: 0;
298
- }
299
-
300
- &.left .circle {
301
- left: 0;
302
- border-right-color: transparent !important;
303
- transform: rotate(129deg);
165
+ background: conic-gradient(
166
+ from 0turn,
167
+ var(--md-comp-progress-indicator) 0 var(--md-comp-progress-value, 0%),
168
+ color-mix(in oklab, var(--md-comp-progress-indicator) 20%, transparent)
169
+ var(--md-comp-progress-value, 0%)
170
+ );
304
171
  }
305
- &.right .circle {
306
- left: -100%;
307
- border-left-color: transparent !important;
308
- transform: rotate(-129deg);
309
- }
310
- }
311
-
312
-
313
-
314
- .active .circle-clipper.left .circle {
315
- /* duration: ARCTIME */
316
- animation: left-spin 1333ms cubic-bezier(0.4, 0.0, 0.2, 1) infinite both;
317
- }
318
-
319
- .active .circle-clipper.right .circle {
320
- /* duration: ARCTIME */
321
- animation: right-spin 1333ms cubic-bezier(0.4, 0.0, 0.2, 1) infinite both;
322
- }
323
-
324
- @keyframes left-spin {
325
- from { transform: rotate(130deg); }
326
- 50% { transform: rotate(-5deg); }
327
- to { transform: rotate(130deg); }
328
172
  }
329
173
 
330
- @keyframes right-spin {
331
- from { transform: rotate(-130deg); }
332
- 50% { transform: rotate(5deg); }
333
- to { transform: rotate(-130deg); }
174
+ @keyframes preloader-rotate {
175
+ to { transform: rotate(1turn); }
334
176
  }
335
177
 
336
- #spinnerContainer.cooldown {
337
- /* duration: SHRINK_TIME */
338
- animation: container-rotate 1568ms linear infinite, fade-out 400ms cubic-bezier(0.4, 0.0, 0.2, 1);
339
- }
178
+ @media (prefers-reduced-motion: reduce) {
179
+ .progress > .indeterminate,
180
+ progress.progress:indeterminate,
181
+ .progress:not(:is(progress)):not(:has(> .determinate, > .indeterminate)):not([style*="--md-comp-progress-value"]),
182
+ .preloader {
183
+ animation: none;
184
+ }
340
185
 
341
- @keyframes fade-out {
342
- from { opacity: 1; }
343
- to { opacity: 0; }
186
+ .preloader {
187
+ transform: none;
188
+ }
344
189
  }
@@ -0,0 +1,18 @@
1
+ @use "../abstracts" as *;
2
+
3
+ // ScrollSpy. The section is the target of a hash link. Offset is CSS
4
+ // (scroll-margin). Which TOC link is current is IntersectionObserver.
5
+ //
6
+ // Tokens:
7
+ // --md-comp-scrollspy-offset 200px (JS writes the instance value)
8
+
9
+ .scrollspy {
10
+ --md-comp-scrollspy-offset: 200px;
11
+ scroll-margin-block-start: var(--md-comp-scrollspy-offset);
12
+ }
13
+
14
+ @media (prefers-reduced-motion: no-preference) {
15
+ html:has(.scrollspy) {
16
+ scroll-behavior: smooth;
17
+ }
18
+ }