@swiftwc/ui 0.0.0-dev.97 → 0.0.0-dev.99
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/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 +157 -36
- 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 +1459 -207
- package/package.json +1 -1
- package/scss/components/_index.scss +1 -0
- package/scss/components/_toggle-view.scss +66 -28
- package/scss/final/_touch-glass.scss +7 -0
- package/scss/utils/_frame.scss +24 -47
- package/scss/utils/_stacks.scss +14 -3
- package/web-components.html-data/en.json +844 -67
package/package.json
CHANGED
|
@@ -9,7 +9,19 @@
|
|
|
9
9
|
|
|
10
10
|
grid-template-rows: minmax(0, 1fr);
|
|
11
11
|
|
|
12
|
-
--toggle--
|
|
12
|
+
--toggle--track-padding: 0.2rem;
|
|
13
|
+
--toggle--track-bg: lightgray;
|
|
14
|
+
|
|
15
|
+
--toggle--dot-size: 1.4rem;
|
|
16
|
+
|
|
17
|
+
--toggle--dot-inset-inline-start: 0;
|
|
18
|
+
--toggle--dot-inset-inline-end: 100%;
|
|
19
|
+
|
|
20
|
+
--toggle--dot-x: 0px;
|
|
21
|
+
--toggle--dot-transition-duration: 200ms;
|
|
22
|
+
--toggle--dot-scale: scale(1);
|
|
23
|
+
|
|
24
|
+
--toogle--track-brightness: brightness(1);
|
|
13
25
|
|
|
14
26
|
&::part(toggle-stack) {
|
|
15
27
|
grid-template-columns: minmax(0, 1fr) auto;
|
|
@@ -30,50 +42,73 @@
|
|
|
30
42
|
justify-items: end;
|
|
31
43
|
|
|
32
44
|
place-content: stretch;
|
|
33
|
-
|
|
45
|
+
align-self: flex-start;
|
|
46
|
+
|
|
47
|
+
cursor: pointer;
|
|
34
48
|
|
|
35
|
-
|
|
36
|
-
|
|
49
|
+
padding-inline: var(--toggle--track-padding);
|
|
50
|
+
padding-block: var(--toggle--track-padding);
|
|
51
|
+
border-radius: var(--pill-border-radius);
|
|
52
|
+
background: var(--toggle--track-bg);
|
|
53
|
+
|
|
54
|
+
transition: background-color var(--toggle--dot-transition-duration) ease-out;
|
|
37
55
|
}
|
|
38
56
|
|
|
39
|
-
&::part(toggle-
|
|
57
|
+
&::part(toggle-track) {
|
|
58
|
+
container: toggle-track / size;
|
|
59
|
+
|
|
40
60
|
text-align: end;
|
|
41
61
|
|
|
42
62
|
position: relative;
|
|
43
63
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
64
|
+
outline: none;
|
|
65
|
+
|
|
66
|
+
// display: grid;
|
|
67
|
+
// outline: red solid 3px;
|
|
68
|
+
border-radius: var(--pill-border-radius);
|
|
47
69
|
inline-size: 4rem;
|
|
48
|
-
block-size:
|
|
49
|
-
background: var(--toggle--
|
|
70
|
+
block-size: var(--toggle--dot-size);
|
|
71
|
+
// background: var(--toggle--track-bg);
|
|
50
72
|
|
|
51
|
-
|
|
73
|
+
filter: var(--toogle--track-brightness,);
|
|
52
74
|
|
|
53
|
-
|
|
75
|
+
transition: background-color var(--toggle--dot-transition-duration) ease-out;
|
|
54
76
|
|
|
55
|
-
//
|
|
77
|
+
touch-action: none; // prevent scrolling while dragging
|
|
56
78
|
|
|
57
|
-
|
|
79
|
+
&:focus {
|
|
80
|
+
// outline: blue solid 5px;
|
|
81
|
+
// --toggle--track-bg: gray;
|
|
58
82
|
|
|
59
|
-
|
|
60
|
-
|
|
83
|
+
--toogle--track-brightness: brightness(0.9);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
&::before {
|
|
87
|
+
content: '';
|
|
61
88
|
|
|
62
|
-
|
|
63
|
-
content: '';
|
|
89
|
+
display: grid;
|
|
64
90
|
|
|
65
|
-
|
|
91
|
+
position: absolute;
|
|
92
|
+
inset: 0 var(--toggle--dot-inset-inline-end) auto var(--toggle--dot-inset-inline-start);
|
|
93
|
+
inline-size: var(--toggle--dot-size);
|
|
94
|
+
block-size: var(--toggle--dot-size);
|
|
95
|
+
border-radius: var(--pill-border-radius);
|
|
66
96
|
|
|
67
|
-
|
|
68
|
-
inset: 0 auto auto 0;
|
|
69
|
-
inline-size: 1rem;
|
|
70
|
-
block-size: 1rem;
|
|
71
|
-
border-radius: 1rem;
|
|
72
|
-
// background: yellow;
|
|
97
|
+
backdrop-filter: var(--liquid-glass-backdrop-filter);
|
|
73
98
|
|
|
74
|
-
|
|
99
|
+
box-shadow: var(--liquid-glass-box-shadow);
|
|
75
100
|
|
|
76
|
-
|
|
101
|
+
transition:
|
|
102
|
+
inset-inline-start var(--toggle--dot-transition-duration) ease-out,
|
|
103
|
+
inset-inline-end var(--toggle--dot-transition-duration) ease-out,
|
|
104
|
+
transform var(--toggle--dot-transition-duration) ease-out,
|
|
105
|
+
scale var(--toggle--dot-press-duration) ease-out;
|
|
106
|
+
|
|
107
|
+
transform: translateX(var(--toggle--dot-x));
|
|
108
|
+
scale: var(--toggle--dot-scale,);
|
|
109
|
+
|
|
110
|
+
transform-origin: center;
|
|
111
|
+
}
|
|
77
112
|
}
|
|
78
113
|
}
|
|
79
114
|
|
|
@@ -85,7 +120,10 @@
|
|
|
85
120
|
|
|
86
121
|
&[aria-checked='true'] {
|
|
87
122
|
:where(&) {
|
|
88
|
-
--toggle--
|
|
123
|
+
--toggle--track-bg: green;
|
|
124
|
+
|
|
125
|
+
--toggle--dot-inset-inline-start: calc(100% - var(--toggle--dot-size));
|
|
126
|
+
--toggle--dot-inset-inline-end: 0;
|
|
89
127
|
}
|
|
90
128
|
}
|
|
91
129
|
|
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
@use '../mixins';
|
|
3
3
|
|
|
4
4
|
@layer #{vars.$final-layer} {
|
|
5
|
+
toggle-view {
|
|
6
|
+
:where(&[touch-glass]) {
|
|
7
|
+
--toggle--dot-scale: 1.22;
|
|
8
|
+
--toggle--dot-press-duration: 100ms;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
|
|
5
12
|
@media (pointer: coarse) {
|
|
6
13
|
[is='glass-button'],
|
|
7
14
|
[is='glass-prominent-button'] {
|
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
|
+
}
|