@swiftwc/ui 0.0.0-dev.23 → 0.0.0-dev.25

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.
@@ -608,25 +608,34 @@ $colors: map.merge(
608
608
  }
609
609
 
610
610
  :where([is='bordered-button']) {
611
- --btntext: var(--accentEmphasis, var(--accentColor));
611
+ --btntext: var(--accentColorEffective, var(--accentColor));
612
612
  --btnhighlighttext: light-dark(
613
- oklch(from var(--accentEmphasis, var(--accentColor)) max(calc(l * 0.7), 0) min(calc(c * 1.4), c) h),
614
- oklch(from var(--accentEmphasis, var(--accentColor)) min(calc(l * 1.2), 1) min(calc(c * 1.4), c) h)
613
+ oklch(from var(--accentColorEffective, var(--accentColor)) max(calc(l * 0.7), 0) min(calc(c * 1.4), c) h),
614
+ oklch(from var(--accentColorEffective, var(--accentColor)) min(calc(l * 1.2), 1) min(calc(c * 1.4), c) h)
615
615
  );
616
616
  --btnactivetext: light-dark(
617
- oklch(from var(--accentEmphasis, var(--accentColor)) max(calc(l * 0.5), 0) min(calc(c * 1.4), c) h),
618
- oklch(from var(--accentEmphasis, var(--accentColor)) min(calc(l * 1.3), 1) min(calc(c * 1.4), c) h)
617
+ oklch(from var(--accentColorEffective, var(--accentColor)) max(calc(l * 0.5), 0) min(calc(c * 1.4), c) h),
618
+ oklch(from var(--accentColorEffective, var(--accentColor)) min(calc(l * 1.3), 1) min(calc(c * 1.4), c) h)
619
619
  );
620
620
 
621
- --btnface: light-dark(var(--accentSubtle, oklch(from var(--accentColor4) l 0 h)), var(--accentSubtle, oklch(from var(--accentColor4) l 0 h)));
621
+ --btnface: light-dark(var(--accentColorEffective4, oklch(from var(--accentColor4) l 0 h)), var(--accentColorEffective4, oklch(from var(--accentColor4) l 0 h)));
622
622
  --btnhighlightface: light-dark(
623
- oklch(from var(--accentSubtle, oklch(from var(--accentColor4) l 0 h)) max(calc(l * 0.95), 0) min(calc(c * 1.8), c) h),
624
- oklch(from var(--accentSubtle, oklch(from var(--accentColor4) l 0 h)) min(calc(l * 1.2), 1) min(calc(c * 1.8), c) h)
623
+ oklch(from var(--accentColorEffective4, oklch(from var(--accentColor4) l 0 h)) max(calc(l * 0.95), 0) min(calc(c * 1.8), c) h),
624
+ oklch(from var(--accentColorEffective4, oklch(from var(--accentColor4) l 0 h)) min(calc(l * 1.2), 1) min(calc(c * 1.8), c) h)
625
625
  );
626
626
  --btnactiveface: light-dark(
627
- oklch(from var(--accentSubtle, oklch(from var(--accentColor4) l 0 h)) max(calc(l * 0.9), 0) min(calc(c * 1.8), c) h),
628
- oklch(from var(--accentSubtle, oklch(from var(--accentColor4) l 0 h)) min(calc(l * 1.3), 1) min(calc(c * 1.8), c) h)
627
+ oklch(from var(--accentColorEffective4, oklch(from var(--accentColor4) l 0 h)) max(calc(l * 0.9), 0) min(calc(c * 1.8), c) h),
628
+ oklch(from var(--accentColorEffective4, oklch(from var(--accentColor4) l 0 h)) min(calc(l * 1.3), 1) min(calc(c * 1.8), c) h)
629
629
  );
630
+ // --btnface: light-dark(var(--accentSubtle, oklch(from var(--accentColor4) l 0 h)), var(--accentSubtle, oklch(from var(--accentColor4) l 0 h)));
631
+ // --btnhighlightface: light-dark(
632
+ // oklch(from var(--accentSubtle, oklch(from var(--accentColor4) l 0 h)) max(calc(l * 0.95), 0) min(calc(c * 1.8), c) h),
633
+ // oklch(from var(--accentSubtle, oklch(from var(--accentColor4) l 0 h)) min(calc(l * 1.2), 1) min(calc(c * 1.8), c) h)
634
+ // );
635
+ // --btnactiveface: light-dark(
636
+ // oklch(from var(--accentSubtle, oklch(from var(--accentColor4) l 0 h)) max(calc(l * 0.9), 0) min(calc(c * 1.8), c) h),
637
+ // oklch(from var(--accentSubtle, oklch(from var(--accentColor4) l 0 h)) min(calc(l * 1.3), 1) min(calc(c * 1.8), c) h)
638
+ // );
630
639
  }
631
640
 
632
641
  :where([is='bordered-prominent-button']) {
@@ -640,14 +649,14 @@ $colors: map.merge(
640
649
  }
641
650
 
642
651
  :where([is='glass-button']) {
643
- --btntext: var(--accentEmphasis, var(--accentColor));
652
+ --btntext: var(--accentColorEffective, var(--accentColor));
644
653
  --btnhighlighttext: light-dark(
645
- oklch(from var(--accentEmphasis, var(--accentColor)) min(calc(l * 1.1), 1) min(calc(c * 1.1), c) h),
646
- oklch(from var(--accentEmphasis, var(--accentColor)) min(calc(l * 1.1), 1) min(calc(c * 1.1), c) h)
654
+ oklch(from var(--accentColorEffective, var(--accentColor)) min(calc(l * 1.1), 1) min(calc(c * 1.1), c) h),
655
+ oklch(from var(--accentColorEffective, var(--accentColor)) min(calc(l * 1.1), 1) min(calc(c * 1.1), c) h)
647
656
  );
648
657
  --btnactivetext: light-dark(
649
- oklch(from var(--accentEmphasis, var(--accentColor)) min(calc(l * 1.2), 1) min(calc(c * 1.1), c) h),
650
- oklch(from var(--accentEmphasis, var(--accentColor)) min(calc(l * 1.2), 1) min(calc(c * 1.1), c) h)
658
+ oklch(from var(--accentColorEffective, var(--accentColor)) min(calc(l * 1.2), 1) min(calc(c * 1.1), c) h),
659
+ oklch(from var(--accentColorEffective, var(--accentColor)) min(calc(l * 1.2), 1) min(calc(c * 1.1), c) h)
651
660
  );
652
661
 
653
662
  --btnface: light-dark(var(--clear-glass-bg), var(--clear-glass-bg-dark));
@@ -26,6 +26,9 @@
26
26
  }
27
27
 
28
28
  :where(&[role='destructive']) {
29
+ --accentColorEffective: var(--red);
30
+ --accentColorEffective4: var(--red4);
31
+
29
32
  --accentColor: var(--red);
30
33
  --accentColor2: var(--red2);
31
34
  --accentColor3: var(--red3);
@@ -1,5 +1,6 @@
1
1
  @use '../vars';
2
2
  @use '../placeholders';
3
+ @use '../mixins';
3
4
 
4
5
  @layer #{vars.$components-layer} {
5
6
  [is='bordered-prominent-button'] {
@@ -22,6 +23,9 @@
22
23
  }
23
24
 
24
25
  :where(&[role='destructive']) {
26
+ --accentColorEffective: var(--red);
27
+ --accentColorEffective4: var(--red4);
28
+
25
29
  --accentColor: var(--red);
26
30
  --accentColor2: var(--red2);
27
31
  --accentColor3: var(--red3);
@@ -31,6 +35,13 @@
31
35
  }
32
36
  }
33
37
 
38
+ @layer #{vars.$colors-layer} {
39
+ [is='bordered-prominent-button'] {
40
+ --secondary: var(--btntext);
41
+ --blue: var(--btntext);
42
+ }
43
+ }
44
+
34
45
  @layer #{vars.$utils-layer} {
35
46
  [is='bordered-prominent-button'] {
36
47
  :where(&) {
@@ -13,6 +13,9 @@
13
13
  }
14
14
 
15
15
  :where(&[role='destructive']) {
16
+ --accentColorEffective: var(--red);
17
+ --accentColorEffective4: var(--red4);
18
+
16
19
  --accentColor: var(--red);
17
20
  --accentColor2: var(--red2);
18
21
  --accentColor3: var(--red3);
@@ -25,7 +25,7 @@
25
25
  > :not([slot]) {
26
26
  --label-image-size: 5;
27
27
 
28
- --label-gap: 1rem;
28
+ --label-gap: 1;
29
29
 
30
30
  // --label-font: title3;
31
31
  }
@@ -28,6 +28,9 @@
28
28
  }
29
29
 
30
30
  :where(&[role='destructive']) {
31
+ --accentColorEffective: var(--red);
32
+ --accentColorEffective4: var(--red4);
33
+
31
34
  --accentColor: var(--red);
32
35
  --accentColor2: var(--red2);
33
36
  --accentColor3: var(--red3);
@@ -28,6 +28,9 @@
28
28
  }
29
29
 
30
30
  :where(&[role='destructive']) {
31
+ --accentColorEffective: var(--red);
32
+ --accentColorEffective4: var(--red4);
33
+
31
34
  --accentColor: var(--red);
32
35
  --accentColor2: var(--red2);
33
36
  --accentColor3: var(--red3);
@@ -37,6 +40,13 @@
37
40
  }
38
41
  }
39
42
 
43
+ @layer #{vars.$colors-layer} {
44
+ [is='bordered-prominent-button'] {
45
+ --secondary: var(--btntext);
46
+ --blue: var(--btntext);
47
+ }
48
+ }
49
+
40
50
  @layer #{vars.$utils-layer} {
41
51
  [is='glass-prominent-button'] {
42
52
  :where(&) {
@@ -29,6 +29,7 @@
29
29
  list-view,
30
30
  table-view,
31
31
  content-unavailable-view,
32
+ progress-view,
32
33
  tool-bar-item,
33
34
  tool-bar-item-group,
34
35
  fine-tooltip,
@@ -48,6 +49,7 @@
48
49
  }
49
50
  }
50
51
 
52
+ :where(progress-view)::part(progress-control),
51
53
  :where(content-unavailable-view)::part(content-unavailable-title-stack),
52
54
  :where(content-unavailable-view)::part(content-unavailable-description-stack),
53
55
  :where(content-unavailable-view)::part(content-unavailable-actions-stack),
@@ -0,0 +1,420 @@
1
+ @use '../vars';
2
+ @use '../mixins';
3
+ @use 'sass:string';
4
+ @use 'sass:map';
5
+
6
+ // scalpel precision
7
+ @property --label-gap {
8
+ syntax: '<length>';
9
+ inherits: false;
10
+ initial-value: 0;
11
+ }
12
+
13
+ @property --label-image-size {
14
+ syntax: '<number>';
15
+ inherits: false;
16
+ initial-value: 2;
17
+ }
18
+
19
+ @property --label-padding-inline {
20
+ syntax: '<length>';
21
+ inherits: false;
22
+ initial-value: 0;
23
+ }
24
+
25
+ // @property --label-style {
26
+ // syntax: 'title-and-icon | icon-only | title-only | automatic';
27
+ // inherits: true;
28
+ // initial-value: automatic;
29
+ // }
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
+
38
+ // @property --label--style {
39
+ // syntax: '<number>';
40
+ // inherits: false;
41
+ // initial-value: 0;
42
+ // }
43
+
44
+ // @property --label-truncation-mode {
45
+ // syntax: 'tail';
46
+ // inherits: true;
47
+ // }
48
+
49
+ // @property --label--has-icon {
50
+ // syntax: 'yes | no';
51
+ // inherits: true;
52
+ // initial-value: no;
53
+ // }
54
+
55
+ $label-truncation-ifs: (
56
+ tail: (
57
+ --label--overflow: hidden,
58
+
59
+ --label--text-overflow: ellipsis,
60
+ ),
61
+ );
62
+
63
+ $label-line-ifs: (
64
+ 1: (
65
+ --label--host-white-space: nowrap,
66
+ ),
67
+ 2: (
68
+ --label--host-white-space: normal,
69
+ --label--display: -webkit-box,
70
+ --label--box-orient: vertical,
71
+ --label--line-clamp: 2,
72
+ ),
73
+ );
74
+
75
+ @mixin set-label-style($label-style) {
76
+ @if $label-style == h-title-and-icon {
77
+ --label-style: title-and-icon;
78
+
79
+ --label--host-grid-template-columns: auto minmax(0, 1fr);
80
+ --label--host-grid-template-rows: minmax(0, 1fr);
81
+ --label--host-align-items: center;
82
+ --label--host-justify-items: normal;
83
+
84
+ --label-gap: 0.3rem;
85
+ --label--host-gap: var(--label-gap);
86
+
87
+ --label--iconstack-display: grid;
88
+ --label--titlestack-display: grid;
89
+ } @else if $label-style == h-icon-only {
90
+ --label-style: icon-only;
91
+
92
+ --label--iconstack-display: grid;
93
+ } @else if $label-style == h-title-only {
94
+ --label-style: title-only;
95
+
96
+ --label--titlestack-display: grid;
97
+ } @else if $label-style == v-title-and-icon {
98
+ --label-style: title-and-icon;
99
+
100
+ --label--host-grid-template-columns: minmax(0, 1fr);
101
+ --label--host-grid-template-rows: auto minmax(0, 1fr);
102
+ --label--host-align-items: normal;
103
+ --label--host-justify-items: center;
104
+
105
+ --label-gap: 0.3rem;
106
+ --label--host-gap: var(--label-gap);
107
+
108
+ --label--iconstack-display: grid;
109
+ --label--titlestack-display: grid;
110
+ } @else if $label-style == v-icon-only {
111
+ --label-style: icon-only;
112
+
113
+ --label--iconstack-display: grid;
114
+ } @else if $label-style == v-title-only {
115
+ --label-style: title-only;
116
+
117
+ --label--titlestack-display: grid;
118
+ }
119
+ }
120
+
121
+ // @mixin set-label-truncation-mode($value) {
122
+ // @if $value == 'tail' {
123
+ // --label--overflow: hidden;
124
+
125
+ // --label--text-overflow: ellipsis;
126
+ // }
127
+ // }
128
+
129
+ // @mixin set-label-line-limit($value) {
130
+ // @if $value == 1 {
131
+ // --label--host-white-space: nowrap;
132
+ // } @else {
133
+ // --label--host-white-space: normal;
134
+ // --label--display: -webkit-box;
135
+ // --label--box-orient: vertical;
136
+ // --label--line-clamp: #{$value};
137
+ // }
138
+ // }
139
+
140
+ @mixin set-label-font($value) {
141
+ --label--titlestack-font-size: var(--label-#{$value}-font-size);
142
+ --label--titlestack-line-height: var(--label-#{$value}-line-height);
143
+ --label--titlestack-font-weight: var(--label-#{$value}-font-weight);
144
+ }
145
+
146
+ @function if-chain($labels, $prop: null) {
147
+ $if-chain: null;
148
+
149
+ @each $label, $size in $labels {
150
+ @if $if-chain == null {
151
+ $if-chain: 'style(--label-font: #{$label}): var(--label-#{$label}-#{$prop}) ;';
152
+ } @else {
153
+ $if-chain: '#{$if-chain} style(--label-font: #{$label}): var(--label-#{$label}-#{$prop}) ;';
154
+ }
155
+ }
156
+
157
+ @return $if-chain;
158
+ }
159
+
160
+ @mixin if-chain($key, $prop, $label) {
161
+ @container style(#{$key}: #{$label}) {
162
+ :where(&) {
163
+ @content;
164
+ }
165
+ }
166
+ @container not style(#{$key}: #{$label}) {
167
+ :where(&[#{$prop}='#{$label}']) {
168
+ @content;
169
+ }
170
+ }
171
+ }
172
+
173
+ @layer #{vars.$components-layer} {
174
+ label-view {
175
+ :where(&) {
176
+ // transition: --label--style 1ms step-start;
177
+
178
+ padding-inline: var(--label-padding-inline);
179
+
180
+ align-items: var(--label--host-align-items,);
181
+ justify-items: var(--label--host-justify-items,);
182
+ // place-items: center;
183
+ // place-content: center;
184
+
185
+ // grid-auto-flow: column;
186
+ // grid-auto-columns: minmax(0, 1fr);
187
+ grid-template-columns: var(--label--host-grid-template-columns,);
188
+ grid-template-rows: var(--label--host-grid-template-rows,);
189
+ // grid-template-areas: 'label-image-stack label-title-stack';
190
+
191
+ gap: var(--label--host-gap,); //;
192
+
193
+ // --label-image-size: 2rem;
194
+ --label-imagestack-fontsize: calc(var(--label-image-size) * 1rem);
195
+ // gap: 0;
196
+
197
+ white-space: var(--label--host-white-space,);
198
+
199
+ &::part(label-image-stack),
200
+ &::part(label-title-stack) {
201
+ // display: none;
202
+
203
+ grid-auto-columns: minmax(0, 1fr);
204
+ grid-auto-rows: minmax(0, 1fr);
205
+ // grid-template-columns: subgrid;
206
+ // grid-template-rows: subgrid;
207
+ }
208
+
209
+ &::part(label-image-stack) {
210
+ display: var(--label--iconstack-display, none);
211
+ }
212
+
213
+ &::part(label-title-stack) {
214
+ display: var(--label--titlestack-display, none);
215
+ }
216
+
217
+ &::part(label-image-stack) {
218
+ aspect-ratio: 1 / 1;
219
+
220
+ inline-size: var(--label-imagestack-fontsize);
221
+ font-size: var(--label-imagestack-fontsize);
222
+
223
+ // line-height: 1;
224
+
225
+ // grid-area: label-image-stack;
226
+ }
227
+
228
+ &::part(label-title-stack) {
229
+ text-decoration: underline;
230
+
231
+ font-size: var(--label--titlestack-font-size,);
232
+ line-height: var(--label--titlestack-line-height,);
233
+ font-weight: var(--label--titlestack-font-weight,);
234
+
235
+ // grid-area: label-title-stack;
236
+ }
237
+ }
238
+
239
+ &:has(> [slot='image']) {
240
+ :where(&) {
241
+ --label--has-icon: yes;
242
+ // background-color: green;
243
+ }
244
+ }
245
+ &:has(> :not([slot])) {
246
+ :where(&) {
247
+ --label--has-title: yes;
248
+ // background-color: red;
249
+ }
250
+ }
251
+
252
+ > :not([slot]) {
253
+ :where(&) {
254
+ // grid-area: label-title-stack;
255
+ overflow: var(--label--overflow,);
256
+
257
+ text-overflow: var(--label--text-overflow,);
258
+
259
+ display: var(--label--display,);
260
+
261
+ -webkit-box-orient: var(--label--box-orient,);
262
+
263
+ line-clamp: var(--label--line-clamp,);
264
+ -webkit-line-clamp: var(--label--line-clamp,);
265
+ }
266
+ }
267
+
268
+ // > [slot='image'] {
269
+ // :where(&:is(i)) {
270
+ // line-height: 1.1;
271
+ // }
272
+ // }
273
+
274
+ // vars
275
+ @supports (x: #{string.unquote('if(else:red)')}) {
276
+ :where(&) {
277
+ --label--titlestack-font-size: if(#{if-chain(vars.$label-fonts, font-size)});
278
+ --label--titlestack-line-height: if(#{if-chain(vars.$label-fonts, line-height)});
279
+ --label--titlestack-font-weight: if(#{if-chain(vars.$label-fonts, font-weight)});
280
+ // if(
281
+ // style(--label-font: callout): 0.5rem ; style(--label-font: large-title): 3rem ; style(--label-font: large-title): 3rem ;
282
+ // );
283
+ // ANCHOR: truncation-mode
284
+ @include mixins.write-ifs(--label-truncation-mode, $label-truncation-ifs);
285
+ // --label--overflow: if(style(--label-truncation-mode: tail): hidden ;);
286
+ // --label--text-overflow: if(style(--label-truncation-mode: tail): ellipsis ;);
287
+
288
+ // ANCHOR: line-limit
289
+ @include mixins.write-ifs(--label-line-limit, $label-line-ifs);
290
+ // --label--host-white-space: if(style(--label-line-limit: 1): nowrap ; style(--label-line-limit: 2): normal ;);
291
+ // --label--display: if(style(--label-line-limit: 2): -webkit-box ;);
292
+ // --label--box-orient: if(style(--label-line-limit: 2): vertical ;);
293
+ // --label--line-clamp: if(style(--label-line-limit: 2): 2 ;);
294
+
295
+ // ANCHOR: label-flow
296
+ --label--host-align-items: if(style(--label-flow: vertical): normal ; else: center ;);
297
+ --label--host-justify-items: if(style(--label-flow: vertical): center ; else: normal ;);
298
+
299
+ // ANCHOR: label-style
300
+ --label--host-grid-template-columns: if(
301
+ style(--label-style: icon-only): minmax(0, 1fr) ; style(--label-style: title-only): minmax(0, 1fr) ;
302
+ style(--label-style: title-and-icon): if(style(--label-flow: vertical): minmax(0, 1fr) ; else: auto minmax(0, 1fr) ;) ;
303
+ else: if(style(--label--has-icon: yes) and style(--label--has-title: yes): if(style(--label-flow: vertical): minmax(0, 1fr) ; else: auto minmax(0, 1fr) ;) ; else: minmax(0, 1fr) ;) ;
304
+ );
305
+ --label--host-grid-template-rows: if(
306
+ style(--label-style: icon-only): minmax(0, 1fr) ; style(--label-style: title-only): minmax(0, 1fr) ;
307
+ style(--label-style: title-and-icon): if(style(--label-flow: vertical): auto minmax(0, 1fr) ; else: minmax(0, 1fr) ;) ;
308
+ 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) ;) ;
309
+ );
310
+
311
+ --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 ;) ;);
312
+ --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) ;) ;);
313
+
314
+ --label--iconstack-display: if(
315
+ 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;) ;
316
+ );
317
+
318
+ --label--titlestack-display: if(
319
+ 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;) ;
320
+ );
321
+ }
322
+ }
323
+
324
+ @supports not (x: #{string.unquote('if(else:red)')}) {
325
+ :where(&:not([label-style])) {
326
+ @each $v in vars.$label-styles {
327
+ @container style(--label-style: #{$v}) {
328
+ @include set-label-style(h-#{$v});
329
+ }
330
+ }
331
+ }
332
+ @each $v in vars.$label-styles {
333
+ :where(&[label-style='#{$v}']) {
334
+ @include set-label-style(h-#{$v});
335
+ }
336
+ }
337
+ @container not style(--label-style) {
338
+ &:not([label-style]) {
339
+ // :where(&[image-hint='yes'][title-hint='yes']) {
340
+ :where(&:has(> [slot='image']):has(> :not([slot]))) {
341
+ @include set-label-style(h-title-and-icon);
342
+ }
343
+ // :where(&[image-hint='yes']:not([title-hint='yes'])) {
344
+ :where(&:has(> [slot='image']):not(:has(> :not([slot])))) {
345
+ @include set-label-style(h-icon-only);
346
+ }
347
+ // :where(&[title-hint='yes']:not([image-hint='yes'])) {
348
+ :where(&:has(> :not([slot])):not(:has(> [slot='image']))) {
349
+ @include set-label-style(h-title-only);
350
+ }
351
+ }
352
+ }
353
+ // AGAIN
354
+ :where(&:not([label-style])) {
355
+ @each $v in vars.$label-styles {
356
+ @container style(--label-style: #{$v}) and style(--label-flow: vertical) {
357
+ @include set-label-style(v-#{$v});
358
+ }
359
+ }
360
+ }
361
+ @container style(--label-flow: vertical) {
362
+ @each $v in vars.$label-styles {
363
+ :where(&[label-style='#{$v}']) {
364
+ @include set-label-style(v-#{$v});
365
+ }
366
+ }
367
+ }
368
+ @container (not style(--label-style)) and style(--label-flow: vertical) {
369
+ &:not([label-style]) {
370
+ :where(&:has(> [slot='image']):has(> :not([slot]))) {
371
+ @include set-label-style(v-title-and-icon);
372
+ }
373
+ :where(&:has(> [slot='image']):not(:has(> :not([slot])))) {
374
+ @include set-label-style(v-icon-only);
375
+ }
376
+ :where(&:has(> :not([slot])):not(:has(> [slot='image']))) {
377
+ @include set-label-style(v-title-only);
378
+ }
379
+ }
380
+ }
381
+ //
382
+ @for $i from 1 through 2 {
383
+ @include if-chain(--label-line-limit, line-limit, $i) {
384
+ @include mixins.write-props(map.get($label-line-ifs, $i)); //@include set-label-line-limit($i);
385
+ }
386
+ }
387
+ //
388
+ @include if-chain(--label-truncation-mode, truncation-mode, tail) {
389
+ @include mixins.write-props(map.get($label-truncation-ifs, tail)); //@include set-label-truncation-mode(tail);
390
+ }
391
+ //
392
+ @each $label, $size in vars.$label-fonts {
393
+ @include if-chain(--label-font, font, $label) {
394
+ @include set-label-font($label);
395
+ }
396
+ }
397
+ }
398
+
399
+ // ifs finally
400
+ @supports (x: #{string.unquote('attr(x type(*))')}) {
401
+ :where(&) {
402
+ --label-style: attr(label-style type(<custom-ident>), inherit);
403
+ --label-truncation-mode: attr(truncation-mode type(<custom-ident>), inherit);
404
+ --label-line-limit: attr(line-limit type(<number>), inherit);
405
+ --label-font: attr(font type(<custom-ident>), inherit);
406
+ }
407
+ }
408
+
409
+ @supports not (x: #{string.unquote('attr(x type(*))')}) {
410
+ @for $i from 1 through 2 {
411
+ :where(&[line-limit='#{$i}']) {
412
+ --label-line-limit: #{$i};
413
+ }
414
+ }
415
+ :where(&[truncation-mode='tail']) {
416
+ --label-truncation-mode: tail;
417
+ }
418
+ }
419
+ }
420
+ }