@swiftwc/ui 0.0.0-dev.23 → 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/components/index.d.ts +1 -0
- package/generated/components/index.js +1 -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/css/index.css +138 -84
- package/generated/internal/utils/button-role.js +0 -1
- package/package.json +1 -1
- package/scss/_components.scss +1 -0
- package/scss/_transitions.scss +2 -0
- package/scss/base/_root.scss +1 -0
- package/scss/colors/_index.scss +24 -15
- 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/_content-unavailable-view.scss +1 -1
- package/scss/components/_glass-button.scss +3 -0
- package/scss/components/_glass-prominent-button.scss +3 -0
- package/scss/components/_index.scss +2 -0
- package/scss/components/_label-view copy.scss.txt +420 -0
- package/scss/components/_label-view.scss +26 -116
- package/scss/components/_progress-view.scss +98 -0
- package/scss/transitions/_progress-view.scss +23 -0
- package/scss/utils/_index.scss +9 -0
- package/web-components.html-data/en.json +15 -0
package/scss/base/_root.scss
CHANGED
package/scss/colors/_index.scss
CHANGED
|
@@ -608,25 +608,34 @@ $colors: map.merge(
|
|
|
608
608
|
}
|
|
609
609
|
|
|
610
610
|
:where([is='bordered-button']) {
|
|
611
|
-
--btntext: var(--
|
|
611
|
+
--btntext: var(--accentColorEffective, var(--accentColor));
|
|
612
612
|
--btnhighlighttext: light-dark(
|
|
613
|
-
oklch(from var(--
|
|
614
|
-
oklch(from var(--
|
|
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(--
|
|
618
|
-
oklch(from var(--
|
|
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(--
|
|
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(--
|
|
624
|
-
oklch(from var(--
|
|
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(--
|
|
628
|
-
oklch(from var(--
|
|
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(--
|
|
652
|
+
--btntext: var(--accentColorEffective, var(--accentColor));
|
|
644
653
|
--btnhighlighttext: light-dark(
|
|
645
|
-
oklch(from var(--
|
|
646
|
-
oklch(from var(--
|
|
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(--
|
|
650
|
-
oklch(from var(--
|
|
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));
|
|
@@ -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
|
+
}
|