@swiftwc/ui 0.0.0-dev.22 → 0.0.0-dev.24
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/generated/client/index.d.ts +1 -1
- package/generated/client/index.js +97 -32
- package/generated/components/bordered-button.js +1 -1
- package/generated/components/bordered-prominent-button.js +1 -1
- package/generated/components/borderless-button.js +1 -1
- package/generated/components/fine-tooltip.d.ts +7 -0
- package/generated/components/fine-tooltip.js +93 -0
- package/generated/components/glass-button.js +1 -1
- package/generated/components/glass-prominent-button.js +1 -1
- package/generated/components/index.d.ts +2 -0
- package/generated/components/index.js +2 -0
- package/generated/components/label-view.js +9 -4
- package/generated/components/picker-view.js +1 -1
- package/generated/components/progress-view.d.ts +13 -0
- package/generated/components/progress-view.js +122 -0
- package/generated/components/tool-bar-item.d.ts +2 -0
- package/generated/components/tool-bar-item.js +18 -4
- package/generated/css/index.css +374 -233
- package/generated/internal/utils/button-role.d.ts +1 -1
- package/generated/internal/utils/button-role.js +7 -3
- package/package.json +1 -1
- package/scss/_components.scss +3 -0
- package/scss/_mixins.scss +4 -0
- package/scss/_transitions.scss +4 -0
- package/scss/base/_reboot.scss +5 -0
- package/scss/base/_root.scss +64 -67
- package/scss/colors/_index.scss +81 -41
- package/scss/components/_alert-dialog.scss +4 -5
- package/scss/components/_bordered-button.scss +3 -0
- package/scss/components/_bordered-prominent-button.scss +3 -0
- package/scss/components/_borderless-button.scss +3 -0
- package/scss/components/_confirmation-dialog.scss +1 -1
- package/scss/components/_content-unavailable-view.scss +1 -1
- package/scss/components/_fine-tooltip.scss +82 -0
- package/scss/components/_glass-button.scss +3 -0
- package/scss/components/_glass-prominent-button.scss +3 -0
- package/scss/components/_index.scss +23 -20
- package/scss/components/_label-view copy.scss.txt +420 -0
- package/scss/components/_label-view.scss +26 -116
- package/scss/components/_menu-view.scss +17 -0
- package/scss/components/_navigation-split-view.scss +3 -3
- package/scss/components/_progress-view.scss +98 -0
- package/scss/components/_tool-bar-item.scss +61 -62
- package/scss/mixins/_button.scss +42 -0
- package/scss/mixins/_color.scss +16 -0
- package/scss/mixins/_index.scss +1 -1
- package/scss/placeholders/_buttons.scss +1 -44
- package/scss/transitions/_fine-tooltip.scss +21 -0
- package/scss/transitions/_progress-view.scss +23 -0
- package/scss/utils/_index.scss +9 -0
- package/web-components.html-data/en.json +27 -1
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
|
|
6
6
|
// scalpel precision
|
|
7
7
|
@property --label-gap {
|
|
8
|
-
syntax: '<
|
|
8
|
+
syntax: '<number>';
|
|
9
9
|
inherits: false;
|
|
10
|
-
initial-value: 0;
|
|
10
|
+
initial-value: 0.3;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
@property --label-image-size {
|
|
@@ -22,18 +22,18 @@
|
|
|
22
22
|
initial-value: 0;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
// @property --label-font-weight {
|
|
26
|
-
// syntax: 'ultra-light | thin | light | regular | medium | semibold | bold | heavy | black';
|
|
27
|
-
// inherits: false;
|
|
28
|
-
// initial-value: regular;
|
|
29
|
-
// }
|
|
30
|
-
|
|
31
25
|
// @property --label-style {
|
|
32
26
|
// syntax: 'title-and-icon | icon-only | title-only | automatic';
|
|
33
27
|
// inherits: true;
|
|
34
28
|
// initial-value: automatic;
|
|
35
29
|
// }
|
|
36
30
|
|
|
31
|
+
// @property --label-font-weight {
|
|
32
|
+
// syntax: 'ultra-light | thin | light | regular | medium | semibold | bold | heavy | black';
|
|
33
|
+
// inherits: false;
|
|
34
|
+
// initial-value: regular;
|
|
35
|
+
// }
|
|
36
|
+
|
|
37
37
|
// @property --label--style {
|
|
38
38
|
// syntax: '<number>';
|
|
39
39
|
// inherits: false;
|
|
@@ -79,20 +79,10 @@ $label-line-ifs: (
|
|
|
79
79
|
--label--host-grid-template-rows: minmax(0, 1fr);
|
|
80
80
|
--label--host-align-items: center;
|
|
81
81
|
--label--host-justify-items: normal;
|
|
82
|
-
|
|
83
|
-
--label-gap: 0.3rem;
|
|
84
|
-
--label--host-gap: var(--label-gap);
|
|
85
|
-
|
|
86
|
-
--label--iconstack-display: grid;
|
|
87
|
-
--label--titlestack-display: grid;
|
|
88
82
|
} @else if $label-style == h-icon-only {
|
|
89
83
|
--label-style: icon-only;
|
|
90
|
-
|
|
91
|
-
--label--iconstack-display: grid;
|
|
92
84
|
} @else if $label-style == h-title-only {
|
|
93
85
|
--label-style: title-only;
|
|
94
|
-
|
|
95
|
-
--label--titlestack-display: grid;
|
|
96
86
|
} @else if $label-style == v-title-and-icon {
|
|
97
87
|
--label-style: title-and-icon;
|
|
98
88
|
|
|
@@ -100,42 +90,13 @@ $label-line-ifs: (
|
|
|
100
90
|
--label--host-grid-template-rows: auto minmax(0, 1fr);
|
|
101
91
|
--label--host-align-items: normal;
|
|
102
92
|
--label--host-justify-items: center;
|
|
103
|
-
|
|
104
|
-
--label-gap: 0.3rem;
|
|
105
|
-
--label--host-gap: var(--label-gap);
|
|
106
|
-
|
|
107
|
-
--label--iconstack-display: grid;
|
|
108
|
-
--label--titlestack-display: grid;
|
|
109
93
|
} @else if $label-style == v-icon-only {
|
|
110
94
|
--label-style: icon-only;
|
|
111
|
-
|
|
112
|
-
--label--iconstack-display: grid;
|
|
113
95
|
} @else if $label-style == v-title-only {
|
|
114
96
|
--label-style: title-only;
|
|
115
|
-
|
|
116
|
-
--label--titlestack-display: grid;
|
|
117
97
|
}
|
|
118
98
|
}
|
|
119
99
|
|
|
120
|
-
// @mixin set-label-truncation-mode($value) {
|
|
121
|
-
// @if $value == 'tail' {
|
|
122
|
-
// --label--overflow: hidden;
|
|
123
|
-
|
|
124
|
-
// --label--text-overflow: ellipsis;
|
|
125
|
-
// }
|
|
126
|
-
// }
|
|
127
|
-
|
|
128
|
-
// @mixin set-label-line-limit($value) {
|
|
129
|
-
// @if $value == 1 {
|
|
130
|
-
// --label--host-white-space: nowrap;
|
|
131
|
-
// } @else {
|
|
132
|
-
// --label--host-white-space: normal;
|
|
133
|
-
// --label--display: -webkit-box;
|
|
134
|
-
// --label--box-orient: vertical;
|
|
135
|
-
// --label--line-clamp: #{$value};
|
|
136
|
-
// }
|
|
137
|
-
// }
|
|
138
|
-
|
|
139
100
|
@mixin set-label-font($value) {
|
|
140
101
|
--label--titlestack-font-size: var(--label-#{$value}-font-size);
|
|
141
102
|
--label--titlestack-line-height: var(--label-#{$value}-line-height);
|
|
@@ -172,67 +133,19 @@ $label-line-ifs: (
|
|
|
172
133
|
@layer #{vars.$components-layer} {
|
|
173
134
|
label-view {
|
|
174
135
|
:where(&) {
|
|
175
|
-
// transition: --label--style 1ms step-start;
|
|
176
|
-
|
|
177
136
|
padding-inline: var(--label-padding-inline);
|
|
178
137
|
|
|
179
138
|
align-items: var(--label--host-align-items,);
|
|
180
139
|
justify-items: var(--label--host-justify-items,);
|
|
181
|
-
// place-items: center;
|
|
182
|
-
// place-content: center;
|
|
183
140
|
|
|
184
|
-
// grid-auto-flow: column;
|
|
185
|
-
// grid-auto-columns: minmax(0, 1fr);
|
|
186
141
|
grid-template-columns: var(--label--host-grid-template-columns,);
|
|
187
142
|
grid-template-rows: var(--label--host-grid-template-rows,);
|
|
188
|
-
// grid-template-areas: 'label-image-stack label-title-stack';
|
|
189
143
|
|
|
190
|
-
gap: var(--label
|
|
144
|
+
gap: calc(var(--label-gap) * 1rem);
|
|
191
145
|
|
|
192
|
-
// --label-image-size: 2rem;
|
|
193
146
|
--label-imagestack-fontsize: calc(var(--label-image-size) * 1rem);
|
|
194
|
-
// gap: 0;
|
|
195
147
|
|
|
196
148
|
white-space: var(--label--host-white-space,);
|
|
197
|
-
|
|
198
|
-
&::part(label-image-stack),
|
|
199
|
-
&::part(label-title-stack) {
|
|
200
|
-
// display: none;
|
|
201
|
-
|
|
202
|
-
grid-auto-columns: minmax(0, 1fr);
|
|
203
|
-
grid-auto-rows: minmax(0, 1fr);
|
|
204
|
-
// grid-template-columns: subgrid;
|
|
205
|
-
// grid-template-rows: subgrid;
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
&::part(label-image-stack) {
|
|
209
|
-
display: var(--label--iconstack-display, none);
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
&::part(label-title-stack) {
|
|
213
|
-
display: var(--label--titlestack-display, none);
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
&::part(label-image-stack) {
|
|
217
|
-
aspect-ratio: 1 / 1;
|
|
218
|
-
|
|
219
|
-
inline-size: var(--label-imagestack-fontsize);
|
|
220
|
-
font-size: var(--label-imagestack-fontsize);
|
|
221
|
-
|
|
222
|
-
// line-height: 1;
|
|
223
|
-
|
|
224
|
-
// grid-area: label-image-stack;
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
&::part(label-title-stack) {
|
|
228
|
-
text-decoration: underline;
|
|
229
|
-
|
|
230
|
-
font-size: var(--label--titlestack-font-size,);
|
|
231
|
-
line-height: var(--label--titlestack-line-height,);
|
|
232
|
-
font-weight: var(--label--titlestack-font-weight,);
|
|
233
|
-
|
|
234
|
-
// grid-area: label-title-stack;
|
|
235
|
-
}
|
|
236
149
|
}
|
|
237
150
|
|
|
238
151
|
&:has(> [slot='image']) {
|
|
@@ -241,6 +154,7 @@ $label-line-ifs: (
|
|
|
241
154
|
// background-color: green;
|
|
242
155
|
}
|
|
243
156
|
}
|
|
157
|
+
|
|
244
158
|
&:has(> :not([slot])) {
|
|
245
159
|
:where(&) {
|
|
246
160
|
--label--has-title: yes;
|
|
@@ -250,7 +164,6 @@ $label-line-ifs: (
|
|
|
250
164
|
|
|
251
165
|
> :not([slot]) {
|
|
252
166
|
:where(&) {
|
|
253
|
-
// grid-area: label-title-stack;
|
|
254
167
|
overflow: var(--label--overflow,);
|
|
255
168
|
|
|
256
169
|
text-overflow: var(--label--text-overflow,);
|
|
@@ -261,14 +174,25 @@ $label-line-ifs: (
|
|
|
261
174
|
|
|
262
175
|
line-clamp: var(--label--line-clamp,);
|
|
263
176
|
-webkit-line-clamp: var(--label--line-clamp,);
|
|
177
|
+
|
|
178
|
+
text-decoration: underline;
|
|
179
|
+
|
|
180
|
+
font-size: var(--label--titlestack-font-size,);
|
|
181
|
+
|
|
182
|
+
line-height: var(--label--titlestack-line-height,);
|
|
183
|
+
|
|
184
|
+
font-weight: var(--label--titlestack-font-weight,);
|
|
264
185
|
}
|
|
265
186
|
}
|
|
266
187
|
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
188
|
+
> [slot='image'] {
|
|
189
|
+
aspect-ratio: 1 / 1;
|
|
190
|
+
|
|
191
|
+
inline-size: var(--label-imagestack-fontsize);
|
|
192
|
+
block-size: var(--label-imagestack-fontsize);
|
|
193
|
+
|
|
194
|
+
font-size: var(--label-imagestack-fontsize);
|
|
195
|
+
}
|
|
272
196
|
|
|
273
197
|
// vars
|
|
274
198
|
@supports (x: #{string.unquote('if(else:red)')}) {
|
|
@@ -306,17 +230,6 @@ $label-line-ifs: (
|
|
|
306
230
|
style(--label-style: title-and-icon): if(style(--label-flow: vertical): auto minmax(0, 1fr) ; else: minmax(0, 1fr) ;) ;
|
|
307
231
|
else: if(style(--label--has-icon: yes) and style(--label--has-title: yes): if(style(--label-flow: vertical): auto minmax(0, 1fr) ; else: minmax(0, 1fr) ;) ; else: minmax(0, 1fr) ;) ;
|
|
308
232
|
);
|
|
309
|
-
|
|
310
|
-
--label-gap: if(style(--label-style: title-and-icon): 0.3rem ; else: if(style(--label--has-icon: yes) and style(--label--has-title: yes): 0.3rem ;) ;);
|
|
311
|
-
--label--host-gap: if(style(--label-style: title-and-icon): var(--label-gap) ; else: if(style(--label--has-icon: yes) and style(--label--has-title: yes): var(--label-gap) ;) ;);
|
|
312
|
-
|
|
313
|
-
--label--iconstack-display: if(
|
|
314
|
-
style(--label-style: icon-only): grid ; style(--label-style: title-only): none ; style(--label-style: title-and-icon): grid ; else: if(style(--label--has-icon: yes): grid ; else: none;) ;
|
|
315
|
-
);
|
|
316
|
-
|
|
317
|
-
--label--titlestack-display: if(
|
|
318
|
-
style(--label-style: icon-only): none ; style(--label-style: title-only): grid ; style(--label-style: title-and-icon): grid ; else: if(style(--label--has-title: yes): grid ; else: none;) ;
|
|
319
|
-
);
|
|
320
233
|
}
|
|
321
234
|
}
|
|
322
235
|
|
|
@@ -335,15 +248,12 @@ $label-line-ifs: (
|
|
|
335
248
|
}
|
|
336
249
|
@container not style(--label-style) {
|
|
337
250
|
&:not([label-style]) {
|
|
338
|
-
// :where(&[image-hint='yes'][title-hint='yes']) {
|
|
339
251
|
:where(&:has(> [slot='image']):has(> :not([slot]))) {
|
|
340
252
|
@include set-label-style(h-title-and-icon);
|
|
341
253
|
}
|
|
342
|
-
// :where(&[image-hint='yes']:not([title-hint='yes'])) {
|
|
343
254
|
:where(&:has(> [slot='image']):not(:has(> :not([slot])))) {
|
|
344
255
|
@include set-label-style(h-icon-only);
|
|
345
256
|
}
|
|
346
|
-
// :where(&[title-hint='yes']:not([image-hint='yes'])) {
|
|
347
257
|
:where(&:has(> :not([slot])):not(:has(> [slot='image']))) {
|
|
348
258
|
@include set-label-style(h-title-only);
|
|
349
259
|
}
|
|
@@ -108,6 +108,9 @@
|
|
|
108
108
|
// }
|
|
109
109
|
|
|
110
110
|
// SECTION: componentize
|
|
111
|
+
:where(&)::part(menu-summary) {
|
|
112
|
+
@include mixins.componentize(menusummary);
|
|
113
|
+
}
|
|
111
114
|
:where(& > button, & > [is='disclosure-group'] > button, & > [is='disclosure-group'] > summary),
|
|
112
115
|
:where(& > menu-view)::part(menu-summary) {
|
|
113
116
|
@include mixins.componentize(menuitem);
|
|
@@ -130,6 +133,15 @@
|
|
|
130
133
|
// componentize
|
|
131
134
|
@layer #{vars.$colors-layer} {
|
|
132
135
|
menu-view {
|
|
136
|
+
@include mixins.add-focus-visible-state('::part(menu-summary)') {
|
|
137
|
+
--menusummaryface: var(--menusummaryhighlightface,);
|
|
138
|
+
--menusummarytext: var(--menusummaryhighlighttext,);
|
|
139
|
+
}
|
|
140
|
+
@include mixins.add-hover-state('::part(menu-summary)') {
|
|
141
|
+
--menusummaryface: var(--menusummaryhighlightface,);
|
|
142
|
+
--menusummarytext: var(--menusummaryhighlighttext,);
|
|
143
|
+
}
|
|
144
|
+
|
|
133
145
|
> button,
|
|
134
146
|
> [is='disclosure-group'] > button,
|
|
135
147
|
> [is='disclosure-group'] > summary {
|
|
@@ -170,6 +182,11 @@
|
|
|
170
182
|
// componentize
|
|
171
183
|
@layer #{vars.$ui-layer} {
|
|
172
184
|
menu-view {
|
|
185
|
+
@include mixins.add-active-state('::part(menu-summary)') {
|
|
186
|
+
--menusummaryface: var(--menusummaryactiveface,);
|
|
187
|
+
--menusummarytext: var(--menusummaryactivetext,);
|
|
188
|
+
}
|
|
189
|
+
|
|
173
190
|
> button,
|
|
174
191
|
> [is='disclosure-group'] > button,
|
|
175
192
|
> [is='disclosure-group'] > summary {
|
|
@@ -138,7 +138,7 @@
|
|
|
138
138
|
|
|
139
139
|
> scroll-view {
|
|
140
140
|
:where(&) {
|
|
141
|
-
border-right: solid 1px
|
|
141
|
+
border-right: solid 1px var(--separator);
|
|
142
142
|
// --scroll-view-box-shadow: none;
|
|
143
143
|
}
|
|
144
144
|
}
|
|
@@ -263,7 +263,7 @@
|
|
|
263
263
|
}
|
|
264
264
|
|
|
265
265
|
:where(& > scroll-view) {
|
|
266
|
-
border-right: solid 1px
|
|
266
|
+
border-right: solid 1px var(--separator);
|
|
267
267
|
// --scroll-view-box-shadow: none;
|
|
268
268
|
}
|
|
269
269
|
|
|
@@ -338,7 +338,7 @@
|
|
|
338
338
|
}
|
|
339
339
|
|
|
340
340
|
:where(& > scroll-view) {
|
|
341
|
-
border-right: solid 1px
|
|
341
|
+
border-right: solid 1px var(--separator);
|
|
342
342
|
// --scroll-view-box-shadow: none;
|
|
343
343
|
}
|
|
344
344
|
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
@use '../vars';
|
|
2
|
+
|
|
3
|
+
// @property --progress-view-style {
|
|
4
|
+
// syntax: 'circular | linear';
|
|
5
|
+
// inherits: false;
|
|
6
|
+
// initial-value: circular;
|
|
7
|
+
// }
|
|
8
|
+
@property --progress-view-style-index {
|
|
9
|
+
syntax: '<number>';
|
|
10
|
+
inherits: false;
|
|
11
|
+
initial-value: 0;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
@layer #{vars.$components-layer} {
|
|
15
|
+
progress-view {
|
|
16
|
+
:where(&) {
|
|
17
|
+
transition: --progress-view-style-index 1ms step-start;
|
|
18
|
+
|
|
19
|
+
grid-template-columns: minmax(0, 1fr);
|
|
20
|
+
|
|
21
|
+
place-items: center;
|
|
22
|
+
place-content: center;
|
|
23
|
+
|
|
24
|
+
gap: 0.3rem;
|
|
25
|
+
|
|
26
|
+
&::part(progress-line-control) {
|
|
27
|
+
background-color: var(--gray3);
|
|
28
|
+
|
|
29
|
+
inline-size: 100%;
|
|
30
|
+
block-size: 5px;
|
|
31
|
+
|
|
32
|
+
border-radius: var(--pill-border-radius);
|
|
33
|
+
|
|
34
|
+
border-left: solid 40px var(--accentColorEffective, var(--accentColor));
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
&::part(progress-circular-control) {
|
|
38
|
+
position: relative;
|
|
39
|
+
|
|
40
|
+
inline-size: 2rem;
|
|
41
|
+
block-size: 2rem;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
&::part(progress-circular-blade) {
|
|
45
|
+
position: absolute;
|
|
46
|
+
inset: 32.5% auto auto 42.5%;
|
|
47
|
+
inline-size: 12.5%;
|
|
48
|
+
block-size: 32.5%;
|
|
49
|
+
background-color: var(--accentColorEffective, var(--secondary));
|
|
50
|
+
border-radius: var(--pill-border-radius);
|
|
51
|
+
will-change: opacity;
|
|
52
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
53
|
+
animation: progressViewCircular 1s linear infinite;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
&::part(progress-circular-blade-1) {
|
|
57
|
+
transform: rotate(45deg) translateY(-100%);
|
|
58
|
+
animation-delay: -1.625s;
|
|
59
|
+
}
|
|
60
|
+
&::part(progress-circular-blade-2) {
|
|
61
|
+
transform: rotate(90deg) translateY(-100%);
|
|
62
|
+
animation-delay: -1.5s;
|
|
63
|
+
}
|
|
64
|
+
&::part(progress-circular-blade-3) {
|
|
65
|
+
transform: rotate(135deg) translateY(-100%);
|
|
66
|
+
animation-delay: -1.375s;
|
|
67
|
+
}
|
|
68
|
+
&::part(progress-circular-blade-4) {
|
|
69
|
+
transform: rotate(180deg) translateY(-100%);
|
|
70
|
+
animation-delay: -1.25s;
|
|
71
|
+
}
|
|
72
|
+
&::part(progress-circular-blade-5) {
|
|
73
|
+
transform: rotate(225deg) translateY(-100%);
|
|
74
|
+
animation-delay: -1.125s;
|
|
75
|
+
}
|
|
76
|
+
&::part(progress-circular-blade-6) {
|
|
77
|
+
transform: rotate(270deg) translateY(-100%);
|
|
78
|
+
animation-delay: -1s;
|
|
79
|
+
}
|
|
80
|
+
&::part(progress-circular-blade-7) {
|
|
81
|
+
transform: rotate(315deg) translateY(-100%);
|
|
82
|
+
animation-delay: -0.875s;
|
|
83
|
+
}
|
|
84
|
+
&::part(progress-circular-blade-8) {
|
|
85
|
+
transform: rotate(360deg) translateY(-100%);
|
|
86
|
+
animation-delay: -0.75s;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
@each $k, $v in (circular: 0, linear: 1) {
|
|
91
|
+
&[progress-view-style='#{$k}'] {
|
|
92
|
+
:where(&) {
|
|
93
|
+
--progress-view-style-index: #{$v};
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
@@ -29,6 +29,12 @@
|
|
|
29
29
|
--toolbaritemradiusbl: var(--toolbar-cell-border-radius);
|
|
30
30
|
--toolbaritemradiusbr: var(--toolbar-cell-border-radius);
|
|
31
31
|
--toolbaritemborder: 0;
|
|
32
|
+
|
|
33
|
+
--menusummaryradiustl: var(--toolbar-cell-border-radius);
|
|
34
|
+
--menusummaryradiustr: var(--toolbar-cell-border-radius);
|
|
35
|
+
--menusummaryradiusbl: var(--toolbar-cell-border-radius);
|
|
36
|
+
--menusummaryradiusbr: var(--toolbar-cell-border-radius);
|
|
37
|
+
--menusummaryborder: 0;
|
|
32
38
|
}
|
|
33
39
|
|
|
34
40
|
:where(&:has([disabled])) {
|
|
@@ -46,7 +52,11 @@
|
|
|
46
52
|
place-content: center;
|
|
47
53
|
}
|
|
48
54
|
|
|
49
|
-
|
|
55
|
+
> button {
|
|
56
|
+
@include mixins.takeover-button-slots;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
// NOTE: add paddings to labels w/ text in toolbar items
|
|
50
60
|
> button:has(> label-view > :not([slot])),
|
|
51
61
|
> picker-view > menu-view:has(> label-view > :not([slot])),
|
|
52
62
|
> menu-view:has(> label-view > :not([slot])) {
|
|
@@ -56,14 +66,14 @@
|
|
|
56
66
|
}
|
|
57
67
|
|
|
58
68
|
// NOTE: on fine screens, toolbar icons are a little smaller
|
|
59
|
-
@media (pointer: fine) {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
}
|
|
69
|
+
// @media (pointer: fine) {
|
|
70
|
+
// > button > label-view,
|
|
71
|
+
// > menu-view > label-view {
|
|
72
|
+
// :where(&) {
|
|
73
|
+
// --label-image-size: 1.8;
|
|
74
|
+
// }
|
|
75
|
+
// }
|
|
76
|
+
// }
|
|
67
77
|
}
|
|
68
78
|
|
|
69
79
|
// tool-bar-item[slot],
|
|
@@ -83,54 +93,43 @@
|
|
|
83
93
|
// }
|
|
84
94
|
}
|
|
85
95
|
|
|
86
|
-
@layer #{vars.$colors-layer} {
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
// list-view > button,
|
|
125
|
-
// [is='form-view'] > button {
|
|
126
|
-
// &:not(:disabled):not([readonly]) {
|
|
127
|
-
// :where(&) {
|
|
128
|
-
// --toolbaritempadistart: 0.3rem;
|
|
129
|
-
// --toolbaritempadbstart: 0.3rem;
|
|
130
|
-
// }
|
|
131
|
-
// }
|
|
132
|
-
// }
|
|
133
|
-
}
|
|
96
|
+
// @layer #{vars.$colors-layer} {
|
|
97
|
+
// sidebar-toggle > button,
|
|
98
|
+
// tool-bar-item > button,
|
|
99
|
+
// tool-bar-item > input,
|
|
100
|
+
// [is='tab-item'],
|
|
101
|
+
// // list-view > button,
|
|
102
|
+
// menu-view > button,
|
|
103
|
+
// [is='disclosure-group'] > button,
|
|
104
|
+
// [is='disclosure-group'] > summary {
|
|
105
|
+
// &:not(:disabled):not([readonly]) {
|
|
106
|
+
// :where(&) {
|
|
107
|
+
// @include mixins.add-focus-visible-state {
|
|
108
|
+
// --toolbaritemface: light-dark(var(--toolbar-cell-focus-bg), var(--toolbar-cell-focus-bg-dark));
|
|
109
|
+
// }
|
|
110
|
+
// }
|
|
111
|
+
// }
|
|
112
|
+
// }
|
|
113
|
+
|
|
114
|
+
// menu-view {
|
|
115
|
+
// @include mixins.add-focus-visible-state('::part(menu-summary)') {
|
|
116
|
+
// --toolbaritemface: var(--toolbaritemhighlightface,); //light-dark(var(--toolbar-cell-focus-bg), var(--toolbar-cell-focus-bg-dark));
|
|
117
|
+
// }
|
|
118
|
+
// @include mixins.add-hover-state('::part(menu-summary)') {
|
|
119
|
+
// --toolbaritemface: var(--toolbaritemhighlightface,); //light-dark(var(--toolbar-cell-focus-bg), var(--toolbar-cell-focus-bg-dark));
|
|
120
|
+
// }
|
|
121
|
+
// }
|
|
122
|
+
|
|
123
|
+
// list-view > button,
|
|
124
|
+
// [is='form-view'] > button {
|
|
125
|
+
// &:not(:disabled):not([readonly]) {
|
|
126
|
+
// :where(&) {
|
|
127
|
+
// --toolbaritempadistart: 0.3rem;
|
|
128
|
+
// --toolbaritempadbstart: 0.3rem;
|
|
129
|
+
// }
|
|
130
|
+
// }
|
|
131
|
+
// }
|
|
132
|
+
// }
|
|
134
133
|
|
|
135
134
|
@layer #{vars.$ui-layer} {
|
|
136
135
|
// sidebar-toggle > button,
|
|
@@ -150,11 +149,11 @@
|
|
|
150
149
|
// // }
|
|
151
150
|
// }
|
|
152
151
|
|
|
153
|
-
menu-view {
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
}
|
|
152
|
+
// menu-view {
|
|
153
|
+
// @include mixins.add-active-state('::part(menu-summary)') {
|
|
154
|
+
// --toolbaritemface: var(--toolbaritemactiveface,); //light-dark(var(--toolbar-cell-active-bg), var(--toolbar-cell-active-bg-dark));
|
|
155
|
+
// }
|
|
156
|
+
// }
|
|
158
157
|
|
|
159
158
|
:where(tool-bar-item[slot]:has(menu-view[open])),
|
|
160
159
|
:where(tool-bar-item-group:has(> tool-bar-item menu-view[open])) {
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
@mixin takeover-button-slots {
|
|
2
|
+
> [slot] {
|
|
3
|
+
:where(&) {
|
|
4
|
+
// take over NOTE: NO other propsm they break grids!! KISS pos+visibility+opacity
|
|
5
|
+
position: absolute;
|
|
6
|
+
|
|
7
|
+
visibility: collapse;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
> [slot='overlay'] {
|
|
11
|
+
:where(&) {
|
|
12
|
+
visibility: visible;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
&:not(:has(> :not([slot]))) > [slot='placeholder'] {
|
|
16
|
+
:where(&) {
|
|
17
|
+
position: relative;
|
|
18
|
+
|
|
19
|
+
visibility: visible;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
&:has(> [slot='overlay']) {
|
|
24
|
+
> *:not([slot='overlay']) {
|
|
25
|
+
:where(&) {
|
|
26
|
+
opacity: 0;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
> [slot='overlay'] {
|
|
31
|
+
:where(&) {
|
|
32
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
33
|
+
transition: opacity ease-out 200ms;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
@starting-style {
|
|
37
|
+
opacity: 0;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
@use '../vars';
|
|
2
|
+
@use '../functions';
|
|
3
|
+
@use 'sass:string';
|
|
4
|
+
@use 'sass:map';
|
|
5
|
+
@use 'sass:list';
|
|
6
|
+
|
|
7
|
+
@mixin wire-tinted-glass($prop) {
|
|
8
|
+
--#{$prop}face: light-dark(var(--accentColor), var(--accentColor));
|
|
9
|
+
--#{$prop}text: light-dark(oklch(from var(--accentColor) clamp(0, (0.7 - l) * 999, 1) none none), oklch(from var(--accentColor) clamp(0, (0.7 - l) * 999, 1) none none));
|
|
10
|
+
|
|
11
|
+
--#{$prop}highlightface: light-dark(oklch(from var(--accentColor) min(calc(l * 1.1), 1) min(calc(c * 1.1), c) h), oklch(from var(--accentColor) min(calc(l * 1.1), 1) min(calc(c * 1.1), c) h));
|
|
12
|
+
--#{$prop}highlighttext: light-dark(oklch(from var(--accentColor) clamp(0, (0.7 - l) * 999, 1) none none), oklch(from var(--accentColor) clamp(0, (0.7 - l) * 999, 1) none none));
|
|
13
|
+
|
|
14
|
+
--#{$prop}activeface: light-dark(oklch(from var(--accentColor) min(calc(l * 1.2), 1) min(calc(c * 1.1), c) h), oklch(from var(--accentColor) min(calc(l * 1.2), 1) min(calc(c * 1.1), c) h));
|
|
15
|
+
--#{$prop}activetext: light-dark(oklch(from var(--accentColor) clamp(0, (0.7 - l) * 999, 1) none none), oklch(from var(--accentColor) clamp(0, (0.7 - l) * 999, 1) none none));
|
|
16
|
+
}
|
package/scss/mixins/_index.scss
CHANGED
|
@@ -360,7 +360,7 @@
|
|
|
360
360
|
$result: string.slice($result, 1, string.length($result) - 1);
|
|
361
361
|
$final-result: functions.str-replace($result, 'minmax(0,1fr)', 'spacer');
|
|
362
362
|
@debug $final-result, $template;
|
|
363
|
-
:where(&[template='#{$result}']) {
|
|
363
|
+
:where(&[template='#{$final-result}']) {
|
|
364
364
|
#{$prop}: $template;
|
|
365
365
|
}
|
|
366
366
|
}
|
|
@@ -24,50 +24,7 @@
|
|
|
24
24
|
--btnradiusbr: var(--regular-btn-border-radius);
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
|
|
28
|
-
:where(&) {
|
|
29
|
-
position: absolute;
|
|
30
|
-
|
|
31
|
-
visibility: collapse;
|
|
32
|
-
|
|
33
|
-
// take over
|
|
34
|
-
max-inline-size: 90%;
|
|
35
|
-
|
|
36
|
-
max-block-size: 90%;
|
|
37
|
-
|
|
38
|
-
border-radius: inherit;
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
> [slot='overlay'] {
|
|
42
|
-
:where(&) {
|
|
43
|
-
visibility: visible;
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
&:not(:has(> :not([slot]))) > [slot='placeholder'] {
|
|
47
|
-
:where(&) {
|
|
48
|
-
position: relative;
|
|
49
|
-
|
|
50
|
-
visibility: visible;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
&:has(> [slot='overlay']) {
|
|
55
|
-
> *:not([slot='overlay']) {
|
|
56
|
-
:where(&) {
|
|
57
|
-
opacity: 0;
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
> [slot='overlay'] {
|
|
62
|
-
:where(&) {
|
|
63
|
-
transition: opacity ease-out 200ms;
|
|
64
|
-
|
|
65
|
-
@starting-style {
|
|
66
|
-
opacity: 0;
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
}
|
|
27
|
+
@include mixins.takeover-button-slots;
|
|
71
28
|
|
|
72
29
|
@each $size, $media in vars.$button-sizes {
|
|
73
30
|
// @if (regular != $size) {
|