mtrl 0.10.0 → 0.10.2
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/components/bottom-sheet/config.js +1 -1
- package/dist/components/chips/api.js +4 -0
- package/dist/components/chips/features/controller.js +6 -1
- package/dist/components/chips/types.d.ts +10 -0
- package/dist/components/dialog/config.js +1 -1
- package/dist/components/fab-menu/fab-menu.js +12 -4
- package/dist/components/fab-menu/types.d.ts +5 -1
- package/dist/components/loading-indicator/constants.js +2 -2
- package/dist/components/loading-indicator/features/renderer.js +13 -2
- package/dist/components/side-sheet/config.js +1 -1
- package/dist/components/tabs/utils.js +3 -2
- package/dist/components/timepicker/config.js +1 -1
- package/dist/core/shapes/cubic.d.ts +2 -0
- package/dist/core/shapes/cubic.js +14 -0
- package/dist/core/shapes/index.d.ts +3 -3
- package/dist/core/shapes/index.js +3 -3
- package/dist/core/shapes/material.d.ts +136 -6
- package/dist/core/shapes/material.js +226 -25
- package/dist/core/shapes/polygon.d.ts +2 -0
- package/dist/core/shapes/polygon.js +27 -10
- package/dist/elements/css/fab-menu.js +1 -1
- package/dist/elements/fab-menu.js +1 -1
- package/dist/elements/preupgrade.css +1 -1
- package/dist/index.cjs +0 -0
- package/dist/package.json +1 -1
- package/dist/styles/badge.css +1 -1
- package/dist/styles/base.css +1 -1
- package/dist/styles/bottom-app-bar.css +1 -1
- package/dist/styles/bottom-sheet.css +1 -1
- package/dist/styles/button-group.css +1 -1
- package/dist/styles/button.css +1 -1
- package/dist/styles/card.css +1 -1
- package/dist/styles/carousel.css +1 -1
- package/dist/styles/checkbox.css +1 -1
- package/dist/styles/chips.css +1 -1
- package/dist/styles/datepicker.css +1 -1
- package/dist/styles/dialog.css +1 -1
- package/dist/styles/divider.css +1 -1
- package/dist/styles/drawer.css +1 -1
- package/dist/styles/extended-fab.css +1 -1
- package/dist/styles/fab-menu.css +2 -2
- package/dist/styles/fab.css +1 -1
- package/dist/styles/icon-button.css +1 -1
- package/dist/styles/list.css +1 -1
- package/dist/styles/loading-indicator.css +1 -1
- package/dist/styles/menu.css +1 -1
- package/dist/styles/navigation-rail.css +1 -1
- package/dist/styles/progress.css +1 -1
- package/dist/styles/radios.css +1 -1
- package/dist/styles/search.css +1 -1
- package/dist/styles/segmented-button.css +1 -1
- package/dist/styles/select.css +1 -1
- package/dist/styles/side-sheet.css +1 -1
- package/dist/styles/slider.css +1 -1
- package/dist/styles/snackbar.css +1 -1
- package/dist/styles/split-button.css +1 -1
- package/dist/styles/switch.css +1 -1
- package/dist/styles/tabs.css +1 -1
- package/dist/styles/textfield.css +1 -1
- package/dist/styles/timepicker.css +1 -1
- package/dist/styles/toolbar.css +1 -1
- package/dist/styles/tooltip.css +1 -1
- package/dist/styles/top-app-bar.css +1 -1
- package/dist/styles/utilities.css +1 -1
- package/dist/styles.css +2 -2
- package/dist/themes/autumn.css +1 -1
- package/dist/themes/baseline.css +1 -1
- package/dist/themes/brownbeige.css +1 -1
- package/dist/themes/browngreen.css +1 -1
- package/dist/themes/content.css +1 -1
- package/dist/themes/desert.css +1 -1
- package/dist/themes/expressive.css +1 -1
- package/dist/themes/fidelity.css +1 -1
- package/dist/themes/forest.css +1 -1
- package/dist/themes/fruit-salad.css +1 -1
- package/dist/themes/highcontrast.css +1 -1
- package/dist/themes/legacy.css +1 -1
- package/dist/themes/material.css +1 -1
- package/dist/themes/monochrome.css +1 -1
- package/dist/themes/neutral.css +1 -1
- package/dist/themes/ocean.css +1 -1
- package/dist/themes/rainbow.css +1 -1
- package/dist/themes/sageivory.css +1 -1
- package/dist/themes/spring.css +1 -1
- package/dist/themes/summer.css +1 -1
- package/dist/themes/sunset.css +1 -1
- package/dist/themes/tealcaramel.css +1 -1
- package/dist/themes/vibrant.css +1 -1
- package/dist/themes/winter.css +1 -1
- package/package.json +1 -129
- package/src/styles/abstract/_variables.scss +22 -1
- package/src/styles/components/_fab-menu.scss +34 -20
|
@@ -16,6 +16,9 @@
|
|
|
16
16
|
$component: '#{base.$prefix}-fab-menu';
|
|
17
17
|
$fab: '#{base.$prefix}-fab';
|
|
18
18
|
$spatial: v.motion('spring-fast-spatial-duration') v.motion('spring-fast-spatial-easing');
|
|
19
|
+
// Colours move on the same spring with its progress clamped, as Compose's
|
|
20
|
+
// Color.lerp clamps it: an overshoot never takes a colour past its target
|
|
21
|
+
$spatial-colour: v.motion('spring-fast-spatial-duration') v.motion('spring-fast-spatial-clamped-easing');
|
|
19
22
|
$effects: v.motion('spring-fast-effects-duration') v.motion('spring-fast-effects-easing');
|
|
20
23
|
// Where spring-fast-spatial crosses half its progress: the icon swaps there
|
|
21
24
|
// (the Compose sample swaps it at checkedProgress 0.5)
|
|
@@ -80,8 +83,8 @@ $swap: 48ms;
|
|
|
80
83
|
width $spatial,
|
|
81
84
|
height $spatial,
|
|
82
85
|
border-radius $spatial,
|
|
83
|
-
background-color $spatial,
|
|
84
|
-
color $spatial,
|
|
86
|
+
background-color $spatial-colour,
|
|
87
|
+
color $spatial-colour,
|
|
85
88
|
box-shadow $spatial;
|
|
86
89
|
|
|
87
90
|
> * {
|
|
@@ -111,7 +114,11 @@ $swap: 48ms;
|
|
|
111
114
|
&--list.#{$component}--open .#{$component}__fab {
|
|
112
115
|
width: 56px;
|
|
113
116
|
height: 56px;
|
|
114
|
-
|
|
117
|
+
// Half the close button, not the full-shape token: the corner lerps from
|
|
118
|
+
// the FAB's 16/20/28dp to 28dp (Compose FabFinalCornerRadius). Towards
|
|
119
|
+
// 9999px it went round in one frame, and the spring's undershoot on
|
|
120
|
+
// closing took it below 0, a square corner (FLO-348).
|
|
121
|
+
border-radius: 28px;
|
|
115
122
|
background-color: var(--#{$component}-close);
|
|
116
123
|
color: var(--#{$component}-on-close);
|
|
117
124
|
|
|
@@ -149,19 +156,19 @@ $swap: 48ms;
|
|
|
149
156
|
transition-delay: 0s;
|
|
150
157
|
}
|
|
151
158
|
|
|
152
|
-
// An item: a pill, 56dp high,
|
|
153
|
-
//
|
|
154
|
-
//
|
|
159
|
+
// An item: a pill, 56dp high, revealed by its width from 0 to its
|
|
160
|
+
// content's, measured as the list opens (Compose animates the Row's width
|
|
161
|
+
// inside a CornerFull surface). The width moves on FastSpatial, overshoot
|
|
162
|
+
// included, and the item fades in on FastEffects, after its stagger delay.
|
|
155
163
|
&__item {
|
|
156
164
|
position: relative;
|
|
157
165
|
display: inline-flex;
|
|
158
166
|
flex-shrink: 0;
|
|
159
|
-
|
|
160
|
-
gap: 8px;
|
|
167
|
+
justify-content: flex-end;
|
|
161
168
|
box-sizing: border-box;
|
|
162
|
-
|
|
169
|
+
width: 0;
|
|
163
170
|
height: 56px;
|
|
164
|
-
padding: 0
|
|
171
|
+
padding: 0;
|
|
165
172
|
border: none;
|
|
166
173
|
border-radius: v.shape('full');
|
|
167
174
|
background-color: var(--#{$component}-item);
|
|
@@ -171,16 +178,11 @@ $swap: 48ms;
|
|
|
171
178
|
cursor: pointer;
|
|
172
179
|
overflow: hidden;
|
|
173
180
|
opacity: 0;
|
|
174
|
-
clip-path: inset(0 0 0 100%);
|
|
175
181
|
transition:
|
|
176
182
|
opacity $effects,
|
|
177
|
-
|
|
183
|
+
width $spatial;
|
|
178
184
|
transition-delay: var(--#{$component}-delay, 0ms);
|
|
179
185
|
|
|
180
|
-
&:dir(rtl) {
|
|
181
|
-
clip-path: inset(0 100% 0 0);
|
|
182
|
-
}
|
|
183
|
-
|
|
184
186
|
&:hover {
|
|
185
187
|
@include m.state-layer(currentColor, 'hover');
|
|
186
188
|
}
|
|
@@ -196,9 +198,23 @@ $swap: 48ms;
|
|
|
196
198
|
}
|
|
197
199
|
}
|
|
198
200
|
|
|
201
|
+
// The content keeps its natural width, anchored to the end: while the item
|
|
202
|
+
// is narrower, the start of the label is clipped, as in Compose
|
|
203
|
+
&__item-content {
|
|
204
|
+
display: inline-flex;
|
|
205
|
+
flex-shrink: 0;
|
|
206
|
+
align-items: center;
|
|
207
|
+
justify-content: center;
|
|
208
|
+
gap: 8px;
|
|
209
|
+
box-sizing: border-box;
|
|
210
|
+
min-width: 56px;
|
|
211
|
+
height: 100%;
|
|
212
|
+
padding: 0 24px;
|
|
213
|
+
}
|
|
214
|
+
|
|
199
215
|
&--open .#{$component}__item {
|
|
200
216
|
opacity: 1;
|
|
201
|
-
|
|
217
|
+
width: var(--#{$component}-item-width, auto);
|
|
202
218
|
}
|
|
203
219
|
|
|
204
220
|
&__item-icon {
|
|
@@ -219,9 +235,7 @@ $swap: 48ms;
|
|
|
219
235
|
transition: background-color $effects, color $effects;
|
|
220
236
|
}
|
|
221
237
|
|
|
222
|
-
&__item
|
|
223
|
-
&__item:dir(rtl) {
|
|
224
|
-
clip-path: none;
|
|
238
|
+
&__item {
|
|
225
239
|
transition: opacity $effects;
|
|
226
240
|
}
|
|
227
241
|
}
|