@swiftwc/ui 0.0.0-dev.96 → 0.0.0-dev.98
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/fine-tooltip.d.ts +3 -0
- package/generated/components/fine-tooltip.js +3 -0
- package/generated/components/label-view.d.ts +1 -1
- package/generated/components/label-view.js +1 -1
- package/generated/components/picker-view.d.ts +1 -1
- package/generated/components/picker-view.js +1 -1
- package/generated/components/progress-view.d.ts +0 -1
- package/generated/components/progress-view.js +2 -2
- package/generated/components/text-field.d.ts +1 -1
- package/generated/components/text-field.js +1 -1
- package/generated/components/toggle-view.d.ts +1 -1
- package/generated/components/toggle-view.js +1 -1
- package/generated/components/tool-bar-item.js +2 -2
- package/generated/components/v-stack.d.ts +1 -0
- package/generated/components/v-stack.js +1 -0
- package/generated/css/index.css +1481 -205
- package/generated/events/alert-dialog.d.ts +3 -0
- package/generated/events/confirmation-dialog.d.ts +3 -0
- package/generated/events/date-picker.d.ts +3 -0
- package/generated/events/lifecycle-observer.d.ts +4 -0
- package/generated/events/picker-view.d.ts +6 -0
- package/generated/events/scroll-view.d.ts +4 -0
- package/generated/events/tab-view.d.ts +10 -0
- package/generated/events/text-field.d.ts +3 -0
- package/generated/events/toggle-view.d.ts +3 -0
- package/package.json +1 -1
- package/scss/_maps.scss +19 -13
- package/scss/base/_root.scss +1 -1
- package/scss/components/_picker-view.scss +7 -1
- package/scss/components/_scroll-view-toolbars.scss +8 -2
- package/scss/components/_toggle-view.scss +2 -1
- package/scss/mixins/_index.scss +8 -2
- package/scss/placeholders/_lists.scss +27 -1
- package/scss/utils/_frame.scss +24 -47
- package/scss/utils/_stacks.scss +14 -3
- package/web-components.html-data/en.json +891 -76
|
@@ -20,4 +20,10 @@ declare global {
|
|
|
20
20
|
'picker:searchblur': PickerSearchblurEvent;
|
|
21
21
|
'picker:searchinput': PickerSearchinputEvent;
|
|
22
22
|
}
|
|
23
|
+
interface DocumentEventMap {
|
|
24
|
+
selection: PickerSelectionEvent;
|
|
25
|
+
'picker:searchfocus': PickerSearchfocusEvent;
|
|
26
|
+
'picker:searchblur': PickerSearchblurEvent;
|
|
27
|
+
'picker:searchinput': PickerSearchinputEvent;
|
|
28
|
+
}
|
|
23
29
|
}
|
|
@@ -41,4 +41,14 @@ declare global {
|
|
|
41
41
|
'tab-view:toggle': TabViewToggleEvent;
|
|
42
42
|
'tab-view:adaptable-tab-bar-placement-change': TabViewAdaptableTabBarPlacementChangeEvent;
|
|
43
43
|
}
|
|
44
|
+
interface DocumentEventMap {
|
|
45
|
+
tabshow: TabshowEvent;
|
|
46
|
+
tabhide: TabhideEvent;
|
|
47
|
+
tabreveal: TabrevealEvent;
|
|
48
|
+
tabswap: TabswapEvent;
|
|
49
|
+
beforetabreveal: BeforetabrevealEvent;
|
|
50
|
+
beforetabswap: BeforetabswapEvent;
|
|
51
|
+
'tab-view:toggle': TabViewToggleEvent;
|
|
52
|
+
'tab-view:adaptable-tab-bar-placement-change': TabViewAdaptableTabBarPlacementChangeEvent;
|
|
53
|
+
}
|
|
44
54
|
}
|
package/package.json
CHANGED
package/scss/_maps.scss
CHANGED
|
@@ -151,62 +151,67 @@ $block-placement-map: (
|
|
|
151
151
|
$label-fonts-map: (
|
|
152
152
|
footnote: (
|
|
153
153
|
size: 1rem,
|
|
154
|
-
|
|
154
|
+
leading: calc(1.1875 / 1),
|
|
155
155
|
weight: 400,
|
|
156
156
|
),
|
|
157
157
|
caption2: (
|
|
158
158
|
size: 0.75rem,
|
|
159
|
-
|
|
159
|
+
leading: calc(1.0625 / 0.75),
|
|
160
160
|
weight: 400,
|
|
161
161
|
),
|
|
162
162
|
caption: (
|
|
163
|
-
size: 0.
|
|
164
|
-
|
|
163
|
+
size: 0.8125rem,
|
|
164
|
+
leading: calc(1.25 / 0.8125),
|
|
165
165
|
weight: 400,
|
|
166
166
|
),
|
|
167
167
|
callout: (
|
|
168
168
|
size: 0.875rem,
|
|
169
|
-
|
|
169
|
+
leading: calc(1.1875 / 0.875),
|
|
170
170
|
weight: 400,
|
|
171
171
|
),
|
|
172
172
|
body: (
|
|
173
173
|
size: 1rem,
|
|
174
|
-
|
|
174
|
+
leading: calc(1.5 / 1),
|
|
175
175
|
weight: 400,
|
|
176
176
|
),
|
|
177
177
|
subheadline: (
|
|
178
178
|
size: 1.125rem,
|
|
179
|
-
|
|
179
|
+
leading: calc(1.6875 / 1.125),
|
|
180
180
|
weight: 400,
|
|
181
181
|
),
|
|
182
182
|
headline: (
|
|
183
183
|
size: 1.25rem,
|
|
184
|
-
|
|
184
|
+
leading: calc(1.75 / 1.25),
|
|
185
185
|
weight: 500,
|
|
186
186
|
),
|
|
187
187
|
title3: (
|
|
188
188
|
size: 1.5rem,
|
|
189
|
-
|
|
189
|
+
leading: calc(2 / 1.5),
|
|
190
190
|
weight: 600,
|
|
191
191
|
),
|
|
192
192
|
title2: (
|
|
193
193
|
size: 1.875rem,
|
|
194
|
-
|
|
194
|
+
leading: calc(2.25 / 1.875),
|
|
195
195
|
weight: 600,
|
|
196
196
|
),
|
|
197
197
|
title: (
|
|
198
198
|
size: 2.25rem,
|
|
199
|
-
|
|
199
|
+
leading: calc(2.5 / 2.25),
|
|
200
200
|
weight: 600,
|
|
201
201
|
),
|
|
202
202
|
large-title: (
|
|
203
203
|
size: 3rem,
|
|
204
|
-
|
|
204
|
+
leading: 1,
|
|
205
205
|
weight: 700,
|
|
206
206
|
),
|
|
207
207
|
extra-large-title: (
|
|
208
208
|
size: 3.75rem,
|
|
209
|
-
|
|
209
|
+
leading: 1,
|
|
210
|
+
weight: 700,
|
|
211
|
+
),
|
|
212
|
+
extra-large-title2: (
|
|
213
|
+
size: 4.5rem,
|
|
214
|
+
leading: 1,
|
|
210
215
|
weight: 700,
|
|
211
216
|
),
|
|
212
217
|
);
|
|
@@ -258,6 +263,7 @@ $button-sizes-map: (
|
|
|
258
263
|
$tint-names: gray, blue, red, green, orange, purple;
|
|
259
264
|
|
|
260
265
|
$foreground-tokens: (
|
|
266
|
+
primary: --primary,
|
|
261
267
|
secondary: --secondary,
|
|
262
268
|
blue: --blue,
|
|
263
269
|
red: --red,
|
package/scss/base/_root.scss
CHANGED
|
@@ -234,7 +234,7 @@
|
|
|
234
234
|
|
|
235
235
|
@each $label, $props in maps.$label-fonts-map {
|
|
236
236
|
--label-#{$label}-font-size: #{map.get($props, size)};
|
|
237
|
-
--label-#{$label}-line-height: #{map.get($props,
|
|
237
|
+
--label-#{$label}-line-height: #{map.get($props, leading)};
|
|
238
238
|
--label-#{$label}-font-weight: #{map.get($props, weight)};
|
|
239
239
|
}
|
|
240
240
|
|
|
@@ -152,13 +152,19 @@ $picker-ifs: (
|
|
|
152
152
|
&::part(picker-label-stack) {
|
|
153
153
|
display: var(--picker--labelstack-display, none); // display: none;
|
|
154
154
|
|
|
155
|
-
color: var(--secondary);
|
|
155
|
+
// color: var(--secondary);
|
|
156
156
|
|
|
157
157
|
--label-truncation-mode: tail;
|
|
158
158
|
|
|
159
159
|
--label-line-limit: 1;
|
|
160
160
|
}
|
|
161
161
|
|
|
162
|
+
form & {
|
|
163
|
+
:where(&)::part(picker-label-stack) {
|
|
164
|
+
color: var(--secondary);
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
|
|
162
168
|
--picker--stack-grid-template-columns: minmax(30%, 1fr) auto;
|
|
163
169
|
|
|
164
170
|
--picker--stack-grid-template-rows: minmax(0, 1fr);
|
|
@@ -25,8 +25,14 @@
|
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
-
scroll-view:has(
|
|
29
|
-
|
|
28
|
+
scroll-view:has(
|
|
29
|
+
~ tool-bar > [slot^='top-bar'],
|
|
30
|
+
~ tool-bar > [slot='cancellation-action'],
|
|
31
|
+
~ tool-bar > [slot='primary-action'],
|
|
32
|
+
~ tool-bar > [slot='confirmation-action'],
|
|
33
|
+
~ tool-bar > [slot='destructive-action']
|
|
34
|
+
),
|
|
35
|
+
scroll-view:has(> [slot^='top-bar'], > [slot='cancellation-action'], > [slot='primary-action'], > [slot='confirmation-action'], > [slot='destructive-action']) {
|
|
30
36
|
:where(&)::part(scroll-view-navbar) {
|
|
31
37
|
visibility: visible;
|
|
32
38
|
}
|
package/scss/mixins/_index.scss
CHANGED
|
@@ -80,8 +80,14 @@
|
|
|
80
80
|
grid-area: main;
|
|
81
81
|
}
|
|
82
82
|
|
|
83
|
-
&:has(
|
|
84
|
-
|
|
83
|
+
&:has(
|
|
84
|
+
~ tool-bar > [slot^='top-bar'],
|
|
85
|
+
~ tool-bar > [slot='cancellation-action'],
|
|
86
|
+
~ tool-bar > [slot='primary-action'],
|
|
87
|
+
~ tool-bar > [slot='confirmation-action'],
|
|
88
|
+
~ tool-bar > [slot='destructive-action']
|
|
89
|
+
),
|
|
90
|
+
&:has(> [slot^='top-bar'], > [slot='cancellation-action'], > [slot='primary-action'], > [slot='confirmation-action'], > [slot='destructive-action']) {
|
|
85
91
|
grid-template-rows: var(--navigation-bar-block-size) minmax(max-content, 1fr);
|
|
86
92
|
}
|
|
87
93
|
}
|
|
@@ -364,7 +364,7 @@ $list-item-selector: ':not([slot], section-view, [is="disclosure-group"], picker
|
|
|
364
364
|
}
|
|
365
365
|
|
|
366
366
|
&::part(section-header-stack) {
|
|
367
|
-
top:
|
|
367
|
+
top: var(--list--sticky-block-size, 0px); // + var(--navigation-bar-block-size));
|
|
368
368
|
|
|
369
369
|
position: sticky;
|
|
370
370
|
|
|
@@ -373,6 +373,32 @@ $list-item-selector: ':not([slot], section-view, [is="disclosure-group"], picker
|
|
|
373
373
|
// text-shadow: 0 0 5px var(--face);
|
|
374
374
|
}
|
|
375
375
|
}
|
|
376
|
+
|
|
377
|
+
// &:is([list-style*='inset'] section-view, [form-style*='inset'] section-view) {
|
|
378
|
+
// :where(&) {
|
|
379
|
+
// &::part(section-header-stack) {
|
|
380
|
+
// top: calc(var(--list--sticky-block-size, 0px) + 1rem);
|
|
381
|
+
// }
|
|
382
|
+
// }
|
|
383
|
+
// }
|
|
384
|
+
|
|
385
|
+
&:is(
|
|
386
|
+
scroll-view:has(
|
|
387
|
+
~ tool-bar > [slot^='top-bar'],
|
|
388
|
+
~ tool-bar > [slot='cancellation-action'],
|
|
389
|
+
~ tool-bar > [slot='primary-action'],
|
|
390
|
+
~ tool-bar > [slot='confirmation-action'],
|
|
391
|
+
~ tool-bar > [slot='destructive-action']
|
|
392
|
+
)
|
|
393
|
+
section-view,
|
|
394
|
+
scroll-view:has(> [slot^='top-bar'], > [slot='cancellation-action'], > [slot='primary-action'], > [slot='confirmation-action'], > [slot='destructive-action']) section-view
|
|
395
|
+
) {
|
|
396
|
+
:where(&) {
|
|
397
|
+
&::part(section-header-stack) {
|
|
398
|
+
top: calc(var(--list--sticky-block-size, 0px) + var(--navigation-bar-block-size));
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
}
|
|
376
402
|
}
|
|
377
403
|
|
|
378
404
|
// SECTION: Enable 2-col layout
|
package/scss/utils/_frame.scss
CHANGED
|
@@ -16,9 +16,15 @@ $self-map: (
|
|
|
16
16
|
max-inline-size: 100%;
|
|
17
17
|
}
|
|
18
18
|
@for $i from 0 through 100 {
|
|
19
|
+
:where([frame\:width='#{$i}']) {
|
|
20
|
+
max-inline-size: #{$i}rem;
|
|
21
|
+
}
|
|
19
22
|
:where([frame\:max-width='#{$i}']) {
|
|
20
23
|
max-inline-size: #{$i}rem;
|
|
21
24
|
}
|
|
25
|
+
:where([frame\:width='#{$i}cqi']) {
|
|
26
|
+
max-inline-size: #{$i}cqi;
|
|
27
|
+
}
|
|
22
28
|
:where([frame\:max-width='#{$i}cqi']) {
|
|
23
29
|
max-inline-size: #{$i}cqi;
|
|
24
30
|
}
|
|
@@ -52,53 +58,6 @@ $self-map: (
|
|
|
52
58
|
}
|
|
53
59
|
}
|
|
54
60
|
|
|
55
|
-
// :where([frame\:alignment='top']) {
|
|
56
|
-
// align-self: start;
|
|
57
|
-
// }
|
|
58
|
-
// :where([frame\:alignment='leading']) {
|
|
59
|
-
// justify-self: start;
|
|
60
|
-
// }
|
|
61
|
-
|
|
62
|
-
// :where([frame-width='infinity']) {
|
|
63
|
-
// place-items: stretch; //justify-self: stretch;
|
|
64
|
-
// }
|
|
65
|
-
// :where([frame-alignment='leading']) {
|
|
66
|
-
// align-self: start;
|
|
67
|
-
// }
|
|
68
|
-
// :where([frame-alignment='center']) {
|
|
69
|
-
// align-self: center;
|
|
70
|
-
// }
|
|
71
|
-
// :where([frame-alignment='trailing']) {
|
|
72
|
-
// align-self: end;
|
|
73
|
-
// }
|
|
74
|
-
// :where([alignment='start']) {
|
|
75
|
-
// place-items: start;
|
|
76
|
-
// }
|
|
77
|
-
// :where([alignment='fill']) {
|
|
78
|
-
// place-items: stretch;
|
|
79
|
-
// }
|
|
80
|
-
// :where([content='start']) {
|
|
81
|
-
// place-content: start;
|
|
82
|
-
// }
|
|
83
|
-
// :where([justify-content='start']) {
|
|
84
|
-
// justify-content: start;
|
|
85
|
-
// }
|
|
86
|
-
// :where([justify-content='start']) {
|
|
87
|
-
// justify-content: start;
|
|
88
|
-
// }
|
|
89
|
-
// :where([spacer='top']) {
|
|
90
|
-
// margin-top: auto;
|
|
91
|
-
// }
|
|
92
|
-
// :where([distribution='start']) {
|
|
93
|
-
// place-content: start;
|
|
94
|
-
// }
|
|
95
|
-
// :where([distribution='space-between']) {
|
|
96
|
-
// place-content: space-between;
|
|
97
|
-
// }
|
|
98
|
-
// :where(spacer) {
|
|
99
|
-
// margin: auto;
|
|
100
|
-
// }
|
|
101
|
-
|
|
102
61
|
@media (prefers-reduced-motion: no-preference) {
|
|
103
62
|
:where([slow]) {
|
|
104
63
|
visibility: visible;
|
|
@@ -124,3 +83,21 @@ $self-map: (
|
|
|
124
83
|
}
|
|
125
84
|
}
|
|
126
85
|
}
|
|
86
|
+
|
|
87
|
+
@layer #{vars.$components-layer} {
|
|
88
|
+
// readable 2/2
|
|
89
|
+
v-stack {
|
|
90
|
+
:where(&[readable]) {
|
|
91
|
+
inline-size: 100%; //->[frame\:width='infinity']
|
|
92
|
+
justify-self: center; //->[frame\:alignment='center'];
|
|
93
|
+
}
|
|
94
|
+
@for $i from 0 through 100 {
|
|
95
|
+
:where(&[readable='#{$i}']) {
|
|
96
|
+
max-inline-size: #{$i}rem; //->[frame:max-width='{length}'`]
|
|
97
|
+
}
|
|
98
|
+
:where(&[readable='#{$i}cqi']) {
|
|
99
|
+
max-inline-size: #{$i}cqi; //->[frame:max-width='{length}'`]
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
package/scss/utils/_stacks.scss
CHANGED
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
h-flex-stack {
|
|
42
42
|
// block dir for items+content
|
|
43
43
|
@each $k, $declarations in maps.$block-map {
|
|
44
|
-
&[distribution='#{$k}'] {
|
|
44
|
+
:where(&[distribution='#{$k}']) {
|
|
45
45
|
@each $decl in $declarations {
|
|
46
46
|
#{list.nth($decl, 1)}: #{list.join(list.nth($decl, 2), ' ')}; //#{list.nth($decl, 2)};
|
|
47
47
|
}
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
|
|
51
51
|
// inline dir for items+content
|
|
52
52
|
@each $k, $declarations in maps.$inline-map {
|
|
53
|
-
&[alignment='#{$k}'] {
|
|
53
|
+
:where(&[alignment='#{$k}']) {
|
|
54
54
|
@each $decl in $declarations {
|
|
55
55
|
#{list.nth($decl, 1)}: #{list.join(list.nth($decl, 2), ' ')}; //#{list.nth($decl, 2)};
|
|
56
56
|
}
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
|
|
60
60
|
// placement="leading fill" -> shortcut for distribution="leading" alignment="fill"
|
|
61
61
|
@each $k, $declarations in maps.$block-placement-map {
|
|
62
|
-
&[placement='#{$k}'] {
|
|
62
|
+
:where(&[placement='#{$k}']) {
|
|
63
63
|
@each $decl in $declarations {
|
|
64
64
|
#{list.nth($decl, 1)}: #{list.join(list.nth($decl, 2), ' ')};
|
|
65
65
|
}
|
|
@@ -99,3 +99,14 @@
|
|
|
99
99
|
}
|
|
100
100
|
}
|
|
101
101
|
}
|
|
102
|
+
|
|
103
|
+
@layer #{vars.$components-layer} {
|
|
104
|
+
// readable 1/2
|
|
105
|
+
v-stack {
|
|
106
|
+
:where(&[readable]) {
|
|
107
|
+
@each $decl in map.get(maps.$block-placement-map, 'leading fill') {
|
|
108
|
+
#{list.nth($decl, 1)}: #{list.join(list.nth($decl, 2), ' ')}; //->[placement='leading fill']->[distribution='leading'][alignment='fill']
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|