m3-svelte 5.15.5 → 6.0.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/package/buttons/Button.svelte +107 -131
- package/package/buttons/ConnectedButtons.svelte +1 -1
- package/package/buttons/FAB.svelte +21 -20
- package/package/buttons/SplitButton.svelte +20 -19
- package/package/containers/BottomSheet.svelte +7 -7
- package/package/containers/Card.svelte +12 -12
- package/package/containers/Dialog.svelte +21 -44
- package/package/containers/Dialog.svelte.d.ts +0 -8
- package/package/containers/ListItem.svelte +19 -11
- package/package/containers/Menu.svelte +3 -3
- package/package/containers/MenuItem.svelte +7 -6
- package/package/containers/Snackbar.svelte +37 -45
- package/package/containers/Snackbar.svelte.d.ts +4 -17
- package/package/containers/SnackbarItem.svelte +6 -6
- package/package/containers/StandardSideSheet.svelte +5 -2
- package/package/forms/Checkbox.svelte +12 -12
- package/package/forms/Chip.svelte +22 -18
- package/package/forms/CircularProgress.svelte +3 -3
- package/package/forms/CircularProgressEstimate.svelte +2 -2
- package/package/forms/DateField.svelte +18 -18
- package/package/forms/DateFieldOutlined.svelte +27 -27
- package/package/forms/DatePickerDocked.svelte +2 -2
- package/package/forms/LinearProgress.svelte +5 -5
- package/package/forms/LinearProgressEstimate.svelte +4 -4
- package/package/forms/LoadingIndicator.svelte +4 -4
- package/package/forms/RadioAnim1.svelte +9 -9
- package/package/forms/RadioAnim2.svelte +9 -9
- package/package/forms/RadioAnim3.svelte +9 -9
- package/package/forms/Select.svelte +31 -35
- package/package/forms/SelectOutlined.svelte +32 -36
- package/package/forms/Slider.svelte +29 -30
- package/package/forms/Switch.svelte +27 -28
- package/package/forms/TextField.svelte +23 -29
- package/package/forms/TextFieldMultiline.svelte +23 -29
- package/package/forms/TextFieldOutlined.svelte +23 -29
- package/package/forms/TextFieldOutlinedMultiline.svelte +23 -29
- package/package/forms/WavyLinearProgress.svelte +2 -7
- package/package/forms/WavyLinearProgressEstimate.svelte +2 -7
- package/package/forms/_picker/CalendarPicker.svelte +3 -2
- package/package/forms/_picker/FocusPicker.svelte +3 -7
- package/package/forms/_picker/Header.svelte +6 -5
- package/package/forms/_picker/Item.svelte +9 -8
- package/package/index.d.ts +4 -8
- package/package/index.js +4 -7
- package/package/{utils → misc}/Divider.svelte +1 -1
- package/package/misc/Icon.svelte +0 -4
- package/package/misc/Layer.svelte +1 -1
- package/package/{utils → misc}/badge.js +8 -5
- package/package/misc/recommended-styles.css +9 -9
- package/package/misc/styles.css +160 -227
- package/package/misc/tailwind-styles.css +106 -104
- package/package/misc/utils.js +2 -4
- package/package/nav/NavCMLX.svelte +35 -29
- package/package/nav/NavCMLX.svelte.d.ts +1 -1
- package/package/nav/NavCMLXItem.svelte +119 -208
- package/package/nav/NavCMLXItem.svelte.d.ts +4 -7
- package/package/nav/Tabs.svelte +13 -10
- package/package/nav/TabsLink.svelte +13 -10
- package/package/nav/VariableTabs.svelte +12 -9
- package/package/nav/VariableTabsLink.svelte +12 -9
- package/package.json +16 -13
- package/package/containers/NewSnackbar.svelte +0 -113
- package/package/containers/NewSnackbar.svelte.d.ts +0 -7
- package/package/forms/CircularProgressIndeterminate.svelte +0 -62
- package/package/forms/CircularProgressIndeterminate.svelte.d.ts +0 -5
- package/package/forms/LinearProgressIndeterminate.svelte +0 -57
- package/package/forms/LinearProgressIndeterminate.svelte.d.ts +0 -5
- package/package/forms/SliderTicks.svelte +0 -12
- package/package/forms/SliderTicks.svelte.d.ts +0 -18
- /package/package/{utils → misc}/ChipChooser.svelte +0 -0
- /package/package/{utils → misc}/ChipChooser.svelte.d.ts +0 -0
- /package/package/{utils → misc}/Divider.svelte.d.ts +0 -0
- /package/package/{utils → misc}/badge.d.ts +0 -0
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import type { IconifyIcon } from "@iconify/types";
|
|
3
|
-
import type { HTMLButtonAttributes
|
|
3
|
+
import type { HTMLButtonAttributes } from "svelte/elements";
|
|
4
|
+
import type { AnchorAttrs } from "../misc/typing-utils";
|
|
4
5
|
import Icon from "../misc/Icon.svelte";
|
|
5
6
|
import Layer from "../misc/Layer.svelte";
|
|
6
7
|
|
|
7
|
-
type ActionProps =
|
|
8
|
-
| ({ click?: () => void } & HTMLButtonAttributes) // deprecated: drop in favour of `onclick`
|
|
9
|
-
| ({ href: string } & HTMLAnchorAttributes);
|
|
8
|
+
type ActionProps = AnchorAttrs | HTMLButtonAttributes;
|
|
10
9
|
let {
|
|
11
10
|
variant,
|
|
12
11
|
icon,
|
|
@@ -14,7 +13,7 @@
|
|
|
14
13
|
selected,
|
|
15
14
|
...props
|
|
16
15
|
}: {
|
|
17
|
-
variant: "compact" | "medium" | "large" | "
|
|
16
|
+
variant: "compact" | "medium" | "large" | "extra-large" | "auto";
|
|
18
17
|
icon: IconifyIcon;
|
|
19
18
|
text: string;
|
|
20
19
|
selected: boolean;
|
|
@@ -22,7 +21,7 @@
|
|
|
22
21
|
</script>
|
|
23
22
|
|
|
24
23
|
{#if "href" in props}
|
|
25
|
-
<a class="m3-container
|
|
24
|
+
<a class="m3-container {variant}" {...props}>
|
|
26
25
|
<div class="content" class:selected>
|
|
27
26
|
<Layer />
|
|
28
27
|
<div class="icon">
|
|
@@ -32,14 +31,7 @@
|
|
|
32
31
|
</div>
|
|
33
32
|
</a>
|
|
34
33
|
{:else}
|
|
35
|
-
|
|
36
|
-
<button
|
|
37
|
-
type="button"
|
|
38
|
-
onclick={click}
|
|
39
|
-
class="m3-container m3-font-label-medium {variant}"
|
|
40
|
-
disabled={selected}
|
|
41
|
-
{...extra}
|
|
42
|
-
>
|
|
34
|
+
<button type="button" class="m3-container {variant}" disabled={selected} {...props}>
|
|
43
35
|
<div class="content" class:selected>
|
|
44
36
|
<Layer />
|
|
45
37
|
<div class="icon">
|
|
@@ -51,7 +43,90 @@
|
|
|
51
43
|
{/if}
|
|
52
44
|
|
|
53
45
|
<style>
|
|
46
|
+
@mixin --cmlxi-compact {
|
|
47
|
+
height: 4rem;
|
|
48
|
+
padding-block: 0.375rem;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
@mixin --cmlxi-horizontal {
|
|
52
|
+
.content {
|
|
53
|
+
padding-inline: 1rem;
|
|
54
|
+
border-radius: var(--m3-shape-full);
|
|
55
|
+
}
|
|
56
|
+
.content.selected {
|
|
57
|
+
background-color: var(--m3c-secondary-container);
|
|
58
|
+
color: var(--m3c-on-secondary-container);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
@mixin --cmlxi-vertical {
|
|
63
|
+
.content {
|
|
64
|
+
flex-direction: column;
|
|
65
|
+
text-align: center;
|
|
66
|
+
|
|
67
|
+
&:hover {
|
|
68
|
+
> .icon {
|
|
69
|
+
background-color: --translucent(currentColor, 0.08);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
&:focus-visible,
|
|
74
|
+
&:active {
|
|
75
|
+
> .icon {
|
|
76
|
+
background-color: --translucent(currentColor, 0.12);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
> .icon {
|
|
81
|
+
width: 3.5rem;
|
|
82
|
+
height: 2rem;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
> :global(:is(.ripple-container, .tint)) {
|
|
86
|
+
display: none;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.content.selected {
|
|
91
|
+
color: var(--m3c-secondary);
|
|
92
|
+
> .icon {
|
|
93
|
+
color: var(--m3c-on-secondary-container);
|
|
94
|
+
}
|
|
95
|
+
> .icon::before {
|
|
96
|
+
opacity: 1;
|
|
97
|
+
width: 100%;
|
|
98
|
+
inset: 0;
|
|
99
|
+
transition:
|
|
100
|
+
width var(--m3-easing-fast-spatial),
|
|
101
|
+
inset var(--m3-easing-fast-spatial);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
@mixin --cmlxi-medium {
|
|
107
|
+
height: 4rem;
|
|
108
|
+
padding-block: 0.75rem;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
@mixin --cmlxi-large {
|
|
112
|
+
height: 4rem;
|
|
113
|
+
.content {
|
|
114
|
+
padding-block: 0.375rem;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
@mixin --cmlxi-extra-large {
|
|
119
|
+
@apply --m3-label-large;
|
|
120
|
+
height: 3.5rem;
|
|
121
|
+
padding-inline: 1.25rem;
|
|
122
|
+
|
|
123
|
+
.content {
|
|
124
|
+
gap: 0.75rem;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
54
128
|
.m3-container {
|
|
129
|
+
@apply --m3-label-medium;
|
|
55
130
|
display: flex;
|
|
56
131
|
|
|
57
132
|
&:is(button) {
|
|
@@ -65,239 +140,75 @@
|
|
|
65
140
|
gap: 0.25rem;
|
|
66
141
|
align-items: center;
|
|
67
142
|
position: relative;
|
|
68
|
-
color:
|
|
69
|
-
transition: var(--m3-
|
|
70
|
-
&:is(.compact .content, .large .content) {
|
|
71
|
-
flex-direction: column;
|
|
72
|
-
text-align: center;
|
|
73
|
-
&.selected {
|
|
74
|
-
color: rgb(var(--m3-scheme-secondary));
|
|
75
|
-
> .icon {
|
|
76
|
-
color: rgb(var(--m3-scheme-on-secondary-container));
|
|
77
|
-
}
|
|
78
|
-
> .icon::before {
|
|
79
|
-
opacity: 1;
|
|
80
|
-
width: 100%;
|
|
81
|
-
inset: 0;
|
|
82
|
-
transition:
|
|
83
|
-
width var(--m3-util-easing-fast-spatial),
|
|
84
|
-
inset var(--m3-util-easing-fast-spatial);
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
&:hover {
|
|
88
|
-
> .icon {
|
|
89
|
-
background-color: color-mix(in oklab, currentColor 8%, transparent);
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
&:focus-visible,
|
|
93
|
-
&:active {
|
|
94
|
-
> .icon {
|
|
95
|
-
background-color: color-mix(in oklab, currentColor 12%, transparent);
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
> .icon {
|
|
99
|
-
width: 3.5rem;
|
|
100
|
-
height: 2rem;
|
|
101
|
-
}
|
|
102
|
-
> :global(:is(.ripple-container, .tint)) {
|
|
103
|
-
display: none;
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
&:is(.medium .content, .expanded .content) {
|
|
107
|
-
padding-inline: 1rem;
|
|
108
|
-
border-radius: var(--m3-util-rounding-full);
|
|
109
|
-
&.selected {
|
|
110
|
-
background-color: rgb(var(--m3-scheme-secondary-container));
|
|
111
|
-
color: rgb(var(--m3-scheme-on-secondary-container));
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
&:is(.large .content) {
|
|
115
|
-
padding-block: 0.375rem;
|
|
116
|
-
}
|
|
117
|
-
&:is(.expanded .content) {
|
|
118
|
-
gap: 0.75rem;
|
|
119
|
-
}
|
|
143
|
+
color: var(--m3c-on-surface-variant);
|
|
144
|
+
transition: var(--m3-easing);
|
|
120
145
|
}
|
|
146
|
+
|
|
121
147
|
.icon {
|
|
122
148
|
display: flex;
|
|
123
149
|
align-items: center;
|
|
124
150
|
justify-content: center;
|
|
125
|
-
border-radius: var(--m3-
|
|
151
|
+
border-radius: var(--m3-shape-full);
|
|
126
152
|
position: relative;
|
|
127
|
-
transition: var(--m3-
|
|
153
|
+
transition: var(--m3-easing);
|
|
154
|
+
}
|
|
155
|
+
.icon > :global(svg) {
|
|
156
|
+
z-index: 1;
|
|
128
157
|
}
|
|
158
|
+
|
|
129
159
|
.icon::before {
|
|
130
160
|
position: absolute;
|
|
131
161
|
display: block;
|
|
132
162
|
content: " ";
|
|
133
|
-
background-color:
|
|
163
|
+
background-color: var(--m3c-secondary-container);
|
|
134
164
|
|
|
135
165
|
opacity: 0;
|
|
136
166
|
inset: 0 50%;
|
|
137
167
|
width: 0;
|
|
138
168
|
border-radius: 2rem;
|
|
139
169
|
transition:
|
|
140
|
-
opacity var(--m3-
|
|
170
|
+
opacity var(--m3-easing),
|
|
141
171
|
inset 0ms 500ms,
|
|
142
172
|
width 0ms 500ms;
|
|
143
173
|
}
|
|
144
|
-
|
|
145
|
-
z-index: 1;
|
|
146
|
-
}
|
|
174
|
+
|
|
147
175
|
&.compact {
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
padding-block: 0.375rem;
|
|
176
|
+
@apply --cmlxi-compact;
|
|
177
|
+
@apply --cmlxi-vertical;
|
|
151
178
|
}
|
|
152
179
|
&.medium {
|
|
153
|
-
|
|
154
|
-
|
|
180
|
+
@apply --cmlxi-medium;
|
|
181
|
+
@apply --cmlxi-horizontal;
|
|
155
182
|
}
|
|
156
183
|
&.large {
|
|
157
|
-
|
|
158
|
-
|
|
184
|
+
@apply --cmlxi-large;
|
|
185
|
+
@apply --cmlxi-vertical;
|
|
159
186
|
}
|
|
160
|
-
&.
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
font-size: var(--m3-font-label-large-size);
|
|
164
|
-
line-height: var(--m3-font-label-large-height);
|
|
165
|
-
letter-spacing: var(--m3-font-label-large-tracking);
|
|
166
|
-
font-weight: var(--m3-font-label-large-weight);
|
|
187
|
+
&.extra-large {
|
|
188
|
+
@apply --cmlxi-extra-large;
|
|
189
|
+
@apply --cmlxi-horizontal;
|
|
167
190
|
}
|
|
168
191
|
}
|
|
169
|
-
|
|
170
192
|
.m3-container.auto {
|
|
171
193
|
@media (width < 37.5rem) {
|
|
172
194
|
/* Compact */
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
padding-block: 0.375rem;
|
|
176
|
-
|
|
177
|
-
.content {
|
|
178
|
-
flex-direction: column;
|
|
179
|
-
text-align: center;
|
|
180
|
-
|
|
181
|
-
&.selected {
|
|
182
|
-
color: rgb(var(--m3-scheme-secondary));
|
|
183
|
-
> .icon {
|
|
184
|
-
color: rgb(var(--m3-scheme-on-secondary-container));
|
|
185
|
-
}
|
|
186
|
-
> .icon::before {
|
|
187
|
-
opacity: 1;
|
|
188
|
-
width: 100%;
|
|
189
|
-
inset: 0;
|
|
190
|
-
transition:
|
|
191
|
-
width var(--m3-util-easing-fast-spatial),
|
|
192
|
-
inset var(--m3-util-easing-fast-spatial);
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
&:hover {
|
|
197
|
-
> .icon {
|
|
198
|
-
background-color: color-mix(in oklab, currentColor 8%, transparent);
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
&:focus-visible,
|
|
203
|
-
&:active {
|
|
204
|
-
> .icon {
|
|
205
|
-
background-color: color-mix(in oklab, currentColor 12%, transparent);
|
|
206
|
-
}
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
> .icon {
|
|
210
|
-
width: 3.5rem;
|
|
211
|
-
height: 2rem;
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
> :global(:is(.ripple-container, .tint)) {
|
|
215
|
-
display: none;
|
|
216
|
-
}
|
|
217
|
-
}
|
|
195
|
+
@apply --cmlxi-compact;
|
|
196
|
+
@apply --cmlxi-vertical;
|
|
218
197
|
}
|
|
219
198
|
@media (37.5rem <= width < 52.5rem) {
|
|
220
199
|
/* Medium */
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
.content {
|
|
225
|
-
padding-inline: 1rem;
|
|
226
|
-
border-radius: var(--m3-util-rounding-full);
|
|
227
|
-
|
|
228
|
-
&.selected {
|
|
229
|
-
background-color: rgb(var(--m3-scheme-secondary-container));
|
|
230
|
-
color: rgb(var(--m3-scheme-on-secondary-container));
|
|
231
|
-
}
|
|
232
|
-
}
|
|
200
|
+
@apply --cmlxi-medium;
|
|
201
|
+
@apply --cmlxi-horizontal;
|
|
233
202
|
}
|
|
234
203
|
@media (52.5rem <= width < 100rem) {
|
|
235
204
|
/* Large */
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
min-height: 4rem;
|
|
239
|
-
|
|
240
|
-
.content {
|
|
241
|
-
flex-direction: column;
|
|
242
|
-
padding-block: 0.375rem;
|
|
243
|
-
|
|
244
|
-
&.selected {
|
|
245
|
-
color: rgb(var(--m3-scheme-secondary));
|
|
246
|
-
> .icon {
|
|
247
|
-
color: rgb(var(--m3-scheme-on-secondary-container));
|
|
248
|
-
}
|
|
249
|
-
> .icon::before {
|
|
250
|
-
opacity: 1;
|
|
251
|
-
width: 100%;
|
|
252
|
-
inset: 0;
|
|
253
|
-
transition:
|
|
254
|
-
width var(--m3-util-easing-fast-spatial),
|
|
255
|
-
inset var(--m3-util-easing-fast-spatial);
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
&:hover {
|
|
260
|
-
> .icon {
|
|
261
|
-
background-color: color-mix(in oklab, currentColor 8%, transparent);
|
|
262
|
-
}
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
&:focus-visible,
|
|
266
|
-
&:active {
|
|
267
|
-
> .icon {
|
|
268
|
-
background-color: color-mix(in oklab, currentColor 12%, transparent);
|
|
269
|
-
}
|
|
270
|
-
}
|
|
271
|
-
|
|
272
|
-
> .icon {
|
|
273
|
-
width: 3.5rem;
|
|
274
|
-
height: 2rem;
|
|
275
|
-
}
|
|
276
|
-
|
|
277
|
-
> :global(:is(.ripple-container, .tint)) {
|
|
278
|
-
display: none;
|
|
279
|
-
}
|
|
280
|
-
}
|
|
205
|
+
@apply --cmlxi-large;
|
|
206
|
+
@apply --cmlxi-vertical;
|
|
281
207
|
}
|
|
282
208
|
@media (100rem <= width) {
|
|
283
|
-
/* Extra large
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
font-size: var(--m3-font-label-large-size);
|
|
287
|
-
line-height: var(--m3-font-label-large-height);
|
|
288
|
-
letter-spacing: var(--m3-font-label-large-tracking);
|
|
289
|
-
font-weight: var(--m3-font-label-large-weight);
|
|
290
|
-
|
|
291
|
-
.content {
|
|
292
|
-
padding-inline: 1rem;
|
|
293
|
-
border-radius: var(--m3-util-rounding-full);
|
|
294
|
-
gap: 0.75rem;
|
|
295
|
-
|
|
296
|
-
&.selected {
|
|
297
|
-
background-color: rgb(var(--m3-scheme-secondary-container));
|
|
298
|
-
color: rgb(var(--m3-scheme-on-secondary-container));
|
|
299
|
-
}
|
|
300
|
-
}
|
|
209
|
+
/* Extra large */
|
|
210
|
+
@apply --cmlxi-extra-large;
|
|
211
|
+
@apply --cmlxi-horizontal;
|
|
301
212
|
}
|
|
302
213
|
}
|
|
303
214
|
</style>
|
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
import type { IconifyIcon } from "@iconify/types";
|
|
2
|
-
import type { HTMLButtonAttributes
|
|
3
|
-
type
|
|
4
|
-
|
|
5
|
-
} & HTMLButtonAttributes) | ({
|
|
6
|
-
href: string;
|
|
7
|
-
} & HTMLAnchorAttributes);
|
|
2
|
+
import type { HTMLButtonAttributes } from "svelte/elements";
|
|
3
|
+
import type { AnchorAttrs } from "../misc/typing-utils";
|
|
4
|
+
type ActionProps = AnchorAttrs | HTMLButtonAttributes;
|
|
8
5
|
type $$ComponentProps = {
|
|
9
|
-
variant: "compact" | "medium" | "large" | "
|
|
6
|
+
variant: "compact" | "medium" | "large" | "extra-large" | "auto";
|
|
10
7
|
icon: IconifyIcon;
|
|
11
8
|
text: string;
|
|
12
9
|
selected: boolean;
|
package/package/nav/Tabs.svelte
CHANGED
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
{#if item.icon}
|
|
32
32
|
<Icon icon={item.icon} />
|
|
33
33
|
{/if}
|
|
34
|
-
<span
|
|
34
|
+
<span>{item.name}</span>
|
|
35
35
|
</label>
|
|
36
36
|
{/each}
|
|
37
37
|
<div class="bar"></div>
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
.m3-container {
|
|
42
42
|
display: flex;
|
|
43
43
|
position: relative;
|
|
44
|
-
background-color:
|
|
44
|
+
background-color: var(--m3c-surface);
|
|
45
45
|
}
|
|
46
46
|
input {
|
|
47
47
|
position: absolute;
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
position: absolute;
|
|
53
53
|
inset: auto 0 0 0;
|
|
54
54
|
height: 1px;
|
|
55
|
-
background-color:
|
|
55
|
+
background-color: var(--m3c-surface-container-highest);
|
|
56
56
|
}
|
|
57
57
|
label {
|
|
58
58
|
flex: 1 0;
|
|
@@ -67,35 +67,38 @@
|
|
|
67
67
|
align-items: center;
|
|
68
68
|
justify-content: center;
|
|
69
69
|
|
|
70
|
-
color:
|
|
70
|
+
color: var(--m3c-on-surface-variant);
|
|
71
71
|
user-select: none;
|
|
72
72
|
cursor: pointer;
|
|
73
|
-
transition: color var(--m3-
|
|
73
|
+
transition: color var(--m3-easing-fast);
|
|
74
74
|
}
|
|
75
75
|
label > :global(svg) {
|
|
76
76
|
width: 1.5rem;
|
|
77
77
|
height: 1.5rem;
|
|
78
78
|
}
|
|
79
|
+
label > span {
|
|
80
|
+
@apply --m3-title-small;
|
|
81
|
+
}
|
|
79
82
|
|
|
80
83
|
@media (hover: hover) {
|
|
81
84
|
label:hover {
|
|
82
|
-
color:
|
|
85
|
+
color: var(--m3c-on-surface);
|
|
83
86
|
}
|
|
84
87
|
}
|
|
85
88
|
input:focus-visible + label,
|
|
86
89
|
input:active + label,
|
|
87
90
|
input:checked + label {
|
|
88
|
-
color:
|
|
91
|
+
color: var(--m3c-on-surface);
|
|
89
92
|
}
|
|
90
93
|
|
|
91
94
|
.bar {
|
|
92
95
|
position: absolute;
|
|
93
|
-
background-color:
|
|
96
|
+
background-color: var(--m3c-primary);
|
|
94
97
|
width: calc(100% / var(--items));
|
|
95
98
|
height: 0;
|
|
96
99
|
bottom: 0;
|
|
97
100
|
pointer-events: none;
|
|
98
|
-
transition: var(--m3-
|
|
101
|
+
transition: var(--m3-easing-fast-spatial);
|
|
99
102
|
}
|
|
100
103
|
input:checked:nth-of-type(1) ~ .bar {
|
|
101
104
|
inset-inline-start: 0;
|
|
@@ -128,7 +131,7 @@
|
|
|
128
131
|
height: 1.5rem;
|
|
129
132
|
}
|
|
130
133
|
.primary > input:checked + label {
|
|
131
|
-
color:
|
|
134
|
+
color: var(--m3c-primary);
|
|
132
135
|
}
|
|
133
136
|
.primary > .bar {
|
|
134
137
|
width: 3rem;
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
{#if item.icon}
|
|
35
35
|
<Icon icon={item.icon} />
|
|
36
36
|
{/if}
|
|
37
|
-
<span
|
|
37
|
+
<span>{item.name}</span>
|
|
38
38
|
</a>
|
|
39
39
|
{/each}
|
|
40
40
|
<div class="bar"></div>
|
|
@@ -44,13 +44,13 @@
|
|
|
44
44
|
.m3-container {
|
|
45
45
|
display: flex;
|
|
46
46
|
position: relative;
|
|
47
|
-
background-color:
|
|
47
|
+
background-color: var(--m3c-surface);
|
|
48
48
|
}
|
|
49
49
|
.divider {
|
|
50
50
|
position: absolute;
|
|
51
51
|
inset: auto 0 0 0;
|
|
52
52
|
height: 1px;
|
|
53
|
-
background-color:
|
|
53
|
+
background-color: var(--m3c-surface-container-highest);
|
|
54
54
|
}
|
|
55
55
|
a {
|
|
56
56
|
flex: 1 0;
|
|
@@ -65,36 +65,39 @@
|
|
|
65
65
|
align-items: center;
|
|
66
66
|
justify-content: center;
|
|
67
67
|
|
|
68
|
-
color:
|
|
68
|
+
color: var(--m3c-on-surface-variant);
|
|
69
69
|
user-select: none;
|
|
70
70
|
cursor: pointer;
|
|
71
|
-
transition: color var(--m3-
|
|
71
|
+
transition: color var(--m3-easing-fast);
|
|
72
72
|
}
|
|
73
73
|
a > :global(svg) {
|
|
74
74
|
width: 1.5rem;
|
|
75
75
|
height: 1.5rem;
|
|
76
76
|
}
|
|
77
|
+
a > span {
|
|
78
|
+
@apply --m3-title-small;
|
|
79
|
+
}
|
|
77
80
|
|
|
78
81
|
@media (hover: hover) {
|
|
79
82
|
a:hover {
|
|
80
|
-
color:
|
|
83
|
+
color: var(--m3c-on-surface);
|
|
81
84
|
}
|
|
82
85
|
}
|
|
83
86
|
a:focus-visible,
|
|
84
87
|
a:active,
|
|
85
88
|
a.selected {
|
|
86
|
-
color:
|
|
89
|
+
color: var(--m3c-on-surface);
|
|
87
90
|
}
|
|
88
91
|
|
|
89
92
|
.bar {
|
|
90
93
|
position: absolute;
|
|
91
|
-
background-color:
|
|
94
|
+
background-color: var(--m3c-primary);
|
|
92
95
|
width: calc(100% / var(--items));
|
|
93
96
|
height: 0.125rem;
|
|
94
97
|
left: calc(100% / var(--items) * var(--i));
|
|
95
98
|
bottom: 0;
|
|
96
99
|
pointer-events: none;
|
|
97
|
-
transition: var(--m3-
|
|
100
|
+
transition: var(--m3-easing-fast-spatial);
|
|
98
101
|
}
|
|
99
102
|
|
|
100
103
|
.primary > a {
|
|
@@ -109,7 +112,7 @@
|
|
|
109
112
|
height: 1.5rem;
|
|
110
113
|
}
|
|
111
114
|
.primary > a.selected {
|
|
112
|
-
color:
|
|
115
|
+
color: var(--m3c-primary);
|
|
113
116
|
}
|
|
114
117
|
.primary > .bar {
|
|
115
118
|
width: 3rem;
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
{#if item.icon}
|
|
91
91
|
<Icon icon={item.icon} />
|
|
92
92
|
{/if}
|
|
93
|
-
<span
|
|
93
|
+
<span>{item.name}</span>
|
|
94
94
|
</label>
|
|
95
95
|
{/each}
|
|
96
96
|
<div class="bar"></div>
|
|
@@ -100,7 +100,7 @@
|
|
|
100
100
|
.m3-container {
|
|
101
101
|
display: grid;
|
|
102
102
|
position: relative;
|
|
103
|
-
background-color:
|
|
103
|
+
background-color: var(--m3c-surface);
|
|
104
104
|
grid-template-columns: repeat(var(--items), auto);
|
|
105
105
|
padding-inline: 1rem;
|
|
106
106
|
justify-content: start;
|
|
@@ -115,7 +115,7 @@
|
|
|
115
115
|
position: absolute;
|
|
116
116
|
inset: auto 0 0 0;
|
|
117
117
|
height: 1px;
|
|
118
|
-
background-color:
|
|
118
|
+
background-color: var(--m3c-surface-container-highest);
|
|
119
119
|
}
|
|
120
120
|
label {
|
|
121
121
|
height: 3rem;
|
|
@@ -128,25 +128,28 @@
|
|
|
128
128
|
align-items: center;
|
|
129
129
|
justify-content: center;
|
|
130
130
|
|
|
131
|
-
color:
|
|
131
|
+
color: var(--m3c-on-surface-variant);
|
|
132
132
|
user-select: none;
|
|
133
133
|
cursor: pointer;
|
|
134
|
-
transition: color var(--m3-
|
|
134
|
+
transition: color var(--m3-easing-fast);
|
|
135
135
|
}
|
|
136
136
|
label > :global(svg) {
|
|
137
137
|
width: 1.5rem;
|
|
138
138
|
height: 1.5rem;
|
|
139
139
|
}
|
|
140
|
+
label > span {
|
|
141
|
+
@apply --m3-title-small;
|
|
142
|
+
}
|
|
140
143
|
|
|
141
144
|
@media (hover: hover) {
|
|
142
145
|
label:hover {
|
|
143
|
-
color:
|
|
146
|
+
color: var(--m3c-on-surface);
|
|
144
147
|
}
|
|
145
148
|
}
|
|
146
149
|
input:focus-visible + label,
|
|
147
150
|
input:active + label,
|
|
148
151
|
input:checked + label {
|
|
149
|
-
color:
|
|
152
|
+
color: var(--m3c-on-surface);
|
|
150
153
|
}
|
|
151
154
|
|
|
152
155
|
label,
|
|
@@ -154,7 +157,7 @@
|
|
|
154
157
|
grid-row: 1;
|
|
155
158
|
}
|
|
156
159
|
.bar {
|
|
157
|
-
background-color:
|
|
160
|
+
background-color: var(--m3c-primary);
|
|
158
161
|
height: 0.125rem;
|
|
159
162
|
z-index: 1;
|
|
160
163
|
align-self: end;
|
|
@@ -203,7 +206,7 @@
|
|
|
203
206
|
height: 1.5rem;
|
|
204
207
|
}
|
|
205
208
|
.primary > input:checked + label {
|
|
206
|
-
color:
|
|
209
|
+
color: var(--m3c-primary);
|
|
207
210
|
}
|
|
208
211
|
.primary > .bar {
|
|
209
212
|
width: 3rem;
|