@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.
Files changed (51) hide show
  1. package/generated/client/index.d.ts +1 -1
  2. package/generated/client/index.js +97 -32
  3. package/generated/components/bordered-button.js +1 -1
  4. package/generated/components/bordered-prominent-button.js +1 -1
  5. package/generated/components/borderless-button.js +1 -1
  6. package/generated/components/fine-tooltip.d.ts +7 -0
  7. package/generated/components/fine-tooltip.js +93 -0
  8. package/generated/components/glass-button.js +1 -1
  9. package/generated/components/glass-prominent-button.js +1 -1
  10. package/generated/components/index.d.ts +2 -0
  11. package/generated/components/index.js +2 -0
  12. package/generated/components/label-view.js +9 -4
  13. package/generated/components/picker-view.js +1 -1
  14. package/generated/components/progress-view.d.ts +13 -0
  15. package/generated/components/progress-view.js +122 -0
  16. package/generated/components/tool-bar-item.d.ts +2 -0
  17. package/generated/components/tool-bar-item.js +18 -4
  18. package/generated/css/index.css +374 -233
  19. package/generated/internal/utils/button-role.d.ts +1 -1
  20. package/generated/internal/utils/button-role.js +7 -3
  21. package/package.json +1 -1
  22. package/scss/_components.scss +3 -0
  23. package/scss/_mixins.scss +4 -0
  24. package/scss/_transitions.scss +4 -0
  25. package/scss/base/_reboot.scss +5 -0
  26. package/scss/base/_root.scss +64 -67
  27. package/scss/colors/_index.scss +81 -41
  28. package/scss/components/_alert-dialog.scss +4 -5
  29. package/scss/components/_bordered-button.scss +3 -0
  30. package/scss/components/_bordered-prominent-button.scss +3 -0
  31. package/scss/components/_borderless-button.scss +3 -0
  32. package/scss/components/_confirmation-dialog.scss +1 -1
  33. package/scss/components/_content-unavailable-view.scss +1 -1
  34. package/scss/components/_fine-tooltip.scss +82 -0
  35. package/scss/components/_glass-button.scss +3 -0
  36. package/scss/components/_glass-prominent-button.scss +3 -0
  37. package/scss/components/_index.scss +23 -20
  38. package/scss/components/_label-view copy.scss.txt +420 -0
  39. package/scss/components/_label-view.scss +26 -116
  40. package/scss/components/_menu-view.scss +17 -0
  41. package/scss/components/_navigation-split-view.scss +3 -3
  42. package/scss/components/_progress-view.scss +98 -0
  43. package/scss/components/_tool-bar-item.scss +61 -62
  44. package/scss/mixins/_button.scss +42 -0
  45. package/scss/mixins/_color.scss +16 -0
  46. package/scss/mixins/_index.scss +1 -1
  47. package/scss/placeholders/_buttons.scss +1 -44
  48. package/scss/transitions/_fine-tooltip.scss +21 -0
  49. package/scss/transitions/_progress-view.scss +23 -0
  50. package/scss/utils/_index.scss +9 -0
  51. package/web-components.html-data/en.json +27 -1
@@ -0,0 +1,82 @@
1
+ @use '../vars';
2
+ @use '../mixins';
3
+
4
+ @layer #{vars.$tab-components-layer} {
5
+ fine-tooltip {
6
+ :where(&) {
7
+ color: var(--text,);
8
+
9
+ pointer-events: none;
10
+ touch-action: none;
11
+
12
+ position: fixed;
13
+
14
+ inline-size: max-content;
15
+ block-size: max-content;
16
+ height: auto; // safari
17
+
18
+ max-inline-size: 80vw;
19
+ max-block-size: 80vh;
20
+
21
+ margin-block: var(--tooltip--dialog-margin-block,);
22
+ margin-inline: var(--tooltip--dialog-margin-inline,);
23
+
24
+ transform: var(--tooltip--dialog-scale,) var(--tooltip--dialog-translate,);
25
+ opacity: var(--tooltip--dialog-opacity,);
26
+ transform-origin: top;
27
+
28
+ position-anchor: --fine-tooltip; // overriden
29
+ position-area: bottom center;
30
+
31
+ overflow: clip;
32
+ border-radius: 0.9rem;
33
+
34
+ backdrop-filter: var(--liquid-glass-backdrop-filter,);
35
+ box-shadow: var(--menu-popover-box-shadow,);
36
+
37
+ padding-block: 0.5rem;
38
+ padding-inline: 1rem;
39
+ gap: 0.5rem;
40
+
41
+ border: none;
42
+
43
+ position-try-fallbacks: --custom-top;
44
+ position-try-order: most-height;
45
+ position-visibility: anchors-visible;
46
+
47
+ // finally
48
+ --tooltip--dialog-translate: translateY(-10%);
49
+ --tooltip--dialog-scale: scale(0.9);
50
+ --tooltip--dialog-opacity: 0;
51
+ }
52
+
53
+ &[open] {
54
+ :where(&) {
55
+ --tooltip--dialog-margin-block: max(env(safe-area-inset-top), var(--menu-spacing)) max(env(safe-area-inset-bottom), var(--menu-spacing));
56
+ --tooltip--dialog-margin-inline: max(env(safe-area-inset-left), var(--menu-spacing)) max(env(safe-area-inset-right), var(--menu-spacing));
57
+
58
+ --tooltip--dialog-translate: translateY(0);
59
+ --tooltip--dialog-scale: scale(1);
60
+ --tooltip--dialog-opacity: 0.9;
61
+
62
+ @starting-style {
63
+ --tooltip--dialog-translate: translateY(-10%);
64
+ --tooltip--dialog-scale: scale(0.9);
65
+ --tooltip--dialog-opacity: 0;
66
+ }
67
+ }
68
+ }
69
+
70
+ &[closing] {
71
+ :where(&) {
72
+ --tooltip--dialog-translate: translateY(-10%);
73
+ --tooltip--dialog-scale: scale(0.9);
74
+ --tooltip--dialog-opacity: 0;
75
+ }
76
+ }
77
+ }
78
+ }
79
+
80
+ @position-try --custom-top {
81
+ position-area: top center;
82
+ }
@@ -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);
@@ -29,8 +29,10 @@
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,
35
+ fine-tooltip,
34
36
  sidebar-toggle,
35
37
  [is='form-view'],
36
38
  v-stack,
@@ -47,6 +49,7 @@
47
49
  }
48
50
  }
49
51
 
52
+ :where(progress-view)::part(progress-control),
50
53
  :where(content-unavailable-view)::part(content-unavailable-title-stack),
51
54
  :where(content-unavailable-view)::part(content-unavailable-description-stack),
52
55
  :where(content-unavailable-view)::part(content-unavailable-actions-stack),
@@ -115,8 +118,8 @@
115
118
  [is='tab-bar'] [is='tab-item'],
116
119
  tool-bar-item [is='disclosure-group'] > button,
117
120
  tool-bar-item [is='disclosure-group'] > summary
118
- ),
119
- :where(menu-view)::part(menu-summary) {
121
+ ) {
122
+ // :where(menu-view)::part(menu-summary) {
120
123
  // display: grid;
121
124
  // place-items: center;
122
125
  // place-content: center;
@@ -175,7 +178,7 @@
175
178
  tool-bar-item > button,
176
179
  tool-bar-item > input,
177
180
  [is='tab-bar'] [is='tab-item'],
178
- menu-view > button,
181
+ // menu-view > button,
179
182
  tool-bar-item [is='disclosure-group'] > button,
180
183
  tool-bar-item [is='disclosure-group'] > summary {
181
184
  @include mixins.add-focus-visible-state {
@@ -187,16 +190,16 @@
187
190
  --toolbaritemtext: var(--toolbaritemhighlighttext,);
188
191
  }
189
192
  }
190
- menu-view {
191
- @include mixins.add-focus-visible-state('::part(menu-summary)') {
192
- --toolbaritemface: var(--toolbaritemhighlightface,);
193
- --toolbaritemtext: var(--toolbaritemhighlighttext,);
194
- }
195
- @include mixins.add-hover-state('::part(menu-summary)') {
196
- --toolbaritemface: var(--toolbaritemhighlightface,);
197
- --toolbaritemtext: var(--toolbaritemhighlighttext,);
198
- }
199
- }
193
+ // menu-view {
194
+ // @include mixins.add-focus-visible-state('::part(menu-summary)') {
195
+ // --toolbaritemface: var(--toolbaritemhighlightface,);
196
+ // --toolbaritemtext: var(--toolbaritemhighlighttext,);
197
+ // }
198
+ // @include mixins.add-hover-state('::part(menu-summary)') {
199
+ // --toolbaritemface: var(--toolbaritemhighlightface,);
200
+ // --toolbaritemtext: var(--toolbaritemhighlighttext,);
201
+ // }
202
+ // }
200
203
  // itemize
201
204
  // list-view,
202
205
  // [is='form-view'] {
@@ -217,7 +220,7 @@
217
220
  tool-bar-item > button,
218
221
  tool-bar-item > input,
219
222
  [is='tab-bar'] [is='tab-item'],
220
- menu-view > button,
223
+ // menu-view > button,
221
224
  tool-bar-item [is='disclosure-group'] > button,
222
225
  tool-bar-item [is='disclosure-group'] > summary {
223
226
  @include mixins.add-active-state {
@@ -225,12 +228,12 @@
225
228
  --toolbaritemtext: var(--toolbaritemactivetext,);
226
229
  }
227
230
  }
228
- menu-view {
229
- @include mixins.add-active-state('::part(menu-summary)') {
230
- --toolbaritemface: var(--toolbaritemactiveface,);
231
- --toolbaritemtext: var(--toolbaritemactivetext,);
232
- }
233
- }
231
+ // menu-view {
232
+ // @include mixins.add-active-state('::part(menu-summary)') {
233
+ // --toolbaritemface: var(--toolbaritemactiveface,);
234
+ // --toolbaritemtext: var(--toolbaritemactivetext,);
235
+ // }
236
+ // }
234
237
  // itemize
235
238
  // list-view,
236
239
  // [is='form-view'] {
@@ -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
+ }