@swiftwc/ui 0.0.0-dev.22 → 0.0.0-dev.23
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/client/index.d.ts +1 -1
- package/generated/client/index.js +97 -32
- package/generated/components/bordered-button.js +1 -1
- package/generated/components/bordered-prominent-button.js +1 -1
- package/generated/components/borderless-button.js +1 -1
- package/generated/components/fine-tooltip.d.ts +7 -0
- package/generated/components/fine-tooltip.js +93 -0
- package/generated/components/glass-button.js +1 -1
- package/generated/components/glass-prominent-button.js +1 -1
- package/generated/components/index.d.ts +1 -0
- package/generated/components/index.js +1 -0
- package/generated/components/tool-bar-item.d.ts +2 -0
- package/generated/components/tool-bar-item.js +18 -4
- package/generated/css/index.css +236 -149
- package/generated/internal/utils/button-role.d.ts +1 -1
- package/generated/internal/utils/button-role.js +8 -3
- package/package.json +1 -1
- package/scss/_components.scss +2 -0
- package/scss/_mixins.scss +4 -0
- package/scss/_transitions.scss +2 -0
- package/scss/base/_reboot.scss +5 -0
- package/scss/base/_root.scss +63 -67
- package/scss/colors/_index.scss +57 -26
- package/scss/components/_alert-dialog.scss +4 -5
- package/scss/components/_confirmation-dialog.scss +1 -1
- package/scss/components/_fine-tooltip.scss +82 -0
- package/scss/components/_index.scss +21 -20
- package/scss/components/_menu-view.scss +17 -0
- package/scss/components/_navigation-split-view.scss +3 -3
- package/scss/components/_tool-bar-item.scss +61 -62
- package/scss/mixins/_button.scss +42 -0
- package/scss/mixins/_color.scss +16 -0
- package/scss/mixins/_index.scss +1 -1
- package/scss/placeholders/_buttons.scss +1 -44
- package/scss/transitions/_fine-tooltip.scss +21 -0
- package/web-components.html-data/en.json +12 -1
|
@@ -108,6 +108,9 @@
|
|
|
108
108
|
// }
|
|
109
109
|
|
|
110
110
|
// SECTION: componentize
|
|
111
|
+
:where(&)::part(menu-summary) {
|
|
112
|
+
@include mixins.componentize(menusummary);
|
|
113
|
+
}
|
|
111
114
|
:where(& > button, & > [is='disclosure-group'] > button, & > [is='disclosure-group'] > summary),
|
|
112
115
|
:where(& > menu-view)::part(menu-summary) {
|
|
113
116
|
@include mixins.componentize(menuitem);
|
|
@@ -130,6 +133,15 @@
|
|
|
130
133
|
// componentize
|
|
131
134
|
@layer #{vars.$colors-layer} {
|
|
132
135
|
menu-view {
|
|
136
|
+
@include mixins.add-focus-visible-state('::part(menu-summary)') {
|
|
137
|
+
--menusummaryface: var(--menusummaryhighlightface,);
|
|
138
|
+
--menusummarytext: var(--menusummaryhighlighttext,);
|
|
139
|
+
}
|
|
140
|
+
@include mixins.add-hover-state('::part(menu-summary)') {
|
|
141
|
+
--menusummaryface: var(--menusummaryhighlightface,);
|
|
142
|
+
--menusummarytext: var(--menusummaryhighlighttext,);
|
|
143
|
+
}
|
|
144
|
+
|
|
133
145
|
> button,
|
|
134
146
|
> [is='disclosure-group'] > button,
|
|
135
147
|
> [is='disclosure-group'] > summary {
|
|
@@ -170,6 +182,11 @@
|
|
|
170
182
|
// componentize
|
|
171
183
|
@layer #{vars.$ui-layer} {
|
|
172
184
|
menu-view {
|
|
185
|
+
@include mixins.add-active-state('::part(menu-summary)') {
|
|
186
|
+
--menusummaryface: var(--menusummaryactiveface,);
|
|
187
|
+
--menusummarytext: var(--menusummaryactivetext,);
|
|
188
|
+
}
|
|
189
|
+
|
|
173
190
|
> button,
|
|
174
191
|
> [is='disclosure-group'] > button,
|
|
175
192
|
> [is='disclosure-group'] > summary {
|
|
@@ -138,7 +138,7 @@
|
|
|
138
138
|
|
|
139
139
|
> scroll-view {
|
|
140
140
|
:where(&) {
|
|
141
|
-
border-right: solid 1px
|
|
141
|
+
border-right: solid 1px var(--separator);
|
|
142
142
|
// --scroll-view-box-shadow: none;
|
|
143
143
|
}
|
|
144
144
|
}
|
|
@@ -263,7 +263,7 @@
|
|
|
263
263
|
}
|
|
264
264
|
|
|
265
265
|
:where(& > scroll-view) {
|
|
266
|
-
border-right: solid 1px
|
|
266
|
+
border-right: solid 1px var(--separator);
|
|
267
267
|
// --scroll-view-box-shadow: none;
|
|
268
268
|
}
|
|
269
269
|
|
|
@@ -338,7 +338,7 @@
|
|
|
338
338
|
}
|
|
339
339
|
|
|
340
340
|
:where(& > scroll-view) {
|
|
341
|
-
border-right: solid 1px
|
|
341
|
+
border-right: solid 1px var(--separator);
|
|
342
342
|
// --scroll-view-box-shadow: none;
|
|
343
343
|
}
|
|
344
344
|
|
|
@@ -29,6 +29,12 @@
|
|
|
29
29
|
--toolbaritemradiusbl: var(--toolbar-cell-border-radius);
|
|
30
30
|
--toolbaritemradiusbr: var(--toolbar-cell-border-radius);
|
|
31
31
|
--toolbaritemborder: 0;
|
|
32
|
+
|
|
33
|
+
--menusummaryradiustl: var(--toolbar-cell-border-radius);
|
|
34
|
+
--menusummaryradiustr: var(--toolbar-cell-border-radius);
|
|
35
|
+
--menusummaryradiusbl: var(--toolbar-cell-border-radius);
|
|
36
|
+
--menusummaryradiusbr: var(--toolbar-cell-border-radius);
|
|
37
|
+
--menusummaryborder: 0;
|
|
32
38
|
}
|
|
33
39
|
|
|
34
40
|
:where(&:has([disabled])) {
|
|
@@ -46,7 +52,11 @@
|
|
|
46
52
|
place-content: center;
|
|
47
53
|
}
|
|
48
54
|
|
|
49
|
-
|
|
55
|
+
> button {
|
|
56
|
+
@include mixins.takeover-button-slots;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
// NOTE: add paddings to labels w/ text in toolbar items
|
|
50
60
|
> button:has(> label-view > :not([slot])),
|
|
51
61
|
> picker-view > menu-view:has(> label-view > :not([slot])),
|
|
52
62
|
> menu-view:has(> label-view > :not([slot])) {
|
|
@@ -56,14 +66,14 @@
|
|
|
56
66
|
}
|
|
57
67
|
|
|
58
68
|
// NOTE: on fine screens, toolbar icons are a little smaller
|
|
59
|
-
@media (pointer: fine) {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
}
|
|
69
|
+
// @media (pointer: fine) {
|
|
70
|
+
// > button > label-view,
|
|
71
|
+
// > menu-view > label-view {
|
|
72
|
+
// :where(&) {
|
|
73
|
+
// --label-image-size: 1.8;
|
|
74
|
+
// }
|
|
75
|
+
// }
|
|
76
|
+
// }
|
|
67
77
|
}
|
|
68
78
|
|
|
69
79
|
// tool-bar-item[slot],
|
|
@@ -83,54 +93,43 @@
|
|
|
83
93
|
// }
|
|
84
94
|
}
|
|
85
95
|
|
|
86
|
-
@layer #{vars.$colors-layer} {
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
// list-view > button,
|
|
125
|
-
// [is='form-view'] > button {
|
|
126
|
-
// &:not(:disabled):not([readonly]) {
|
|
127
|
-
// :where(&) {
|
|
128
|
-
// --toolbaritempadistart: 0.3rem;
|
|
129
|
-
// --toolbaritempadbstart: 0.3rem;
|
|
130
|
-
// }
|
|
131
|
-
// }
|
|
132
|
-
// }
|
|
133
|
-
}
|
|
96
|
+
// @layer #{vars.$colors-layer} {
|
|
97
|
+
// sidebar-toggle > button,
|
|
98
|
+
// tool-bar-item > button,
|
|
99
|
+
// tool-bar-item > input,
|
|
100
|
+
// [is='tab-item'],
|
|
101
|
+
// // list-view > button,
|
|
102
|
+
// menu-view > button,
|
|
103
|
+
// [is='disclosure-group'] > button,
|
|
104
|
+
// [is='disclosure-group'] > summary {
|
|
105
|
+
// &:not(:disabled):not([readonly]) {
|
|
106
|
+
// :where(&) {
|
|
107
|
+
// @include mixins.add-focus-visible-state {
|
|
108
|
+
// --toolbaritemface: light-dark(var(--toolbar-cell-focus-bg), var(--toolbar-cell-focus-bg-dark));
|
|
109
|
+
// }
|
|
110
|
+
// }
|
|
111
|
+
// }
|
|
112
|
+
// }
|
|
113
|
+
|
|
114
|
+
// menu-view {
|
|
115
|
+
// @include mixins.add-focus-visible-state('::part(menu-summary)') {
|
|
116
|
+
// --toolbaritemface: var(--toolbaritemhighlightface,); //light-dark(var(--toolbar-cell-focus-bg), var(--toolbar-cell-focus-bg-dark));
|
|
117
|
+
// }
|
|
118
|
+
// @include mixins.add-hover-state('::part(menu-summary)') {
|
|
119
|
+
// --toolbaritemface: var(--toolbaritemhighlightface,); //light-dark(var(--toolbar-cell-focus-bg), var(--toolbar-cell-focus-bg-dark));
|
|
120
|
+
// }
|
|
121
|
+
// }
|
|
122
|
+
|
|
123
|
+
// list-view > button,
|
|
124
|
+
// [is='form-view'] > button {
|
|
125
|
+
// &:not(:disabled):not([readonly]) {
|
|
126
|
+
// :where(&) {
|
|
127
|
+
// --toolbaritempadistart: 0.3rem;
|
|
128
|
+
// --toolbaritempadbstart: 0.3rem;
|
|
129
|
+
// }
|
|
130
|
+
// }
|
|
131
|
+
// }
|
|
132
|
+
// }
|
|
134
133
|
|
|
135
134
|
@layer #{vars.$ui-layer} {
|
|
136
135
|
// sidebar-toggle > button,
|
|
@@ -150,11 +149,11 @@
|
|
|
150
149
|
// // }
|
|
151
150
|
// }
|
|
152
151
|
|
|
153
|
-
menu-view {
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
}
|
|
152
|
+
// menu-view {
|
|
153
|
+
// @include mixins.add-active-state('::part(menu-summary)') {
|
|
154
|
+
// --toolbaritemface: var(--toolbaritemactiveface,); //light-dark(var(--toolbar-cell-active-bg), var(--toolbar-cell-active-bg-dark));
|
|
155
|
+
// }
|
|
156
|
+
// }
|
|
158
157
|
|
|
159
158
|
:where(tool-bar-item[slot]:has(menu-view[open])),
|
|
160
159
|
:where(tool-bar-item-group:has(> tool-bar-item menu-view[open])) {
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
@mixin takeover-button-slots {
|
|
2
|
+
> [slot] {
|
|
3
|
+
:where(&) {
|
|
4
|
+
// take over NOTE: NO other propsm they break grids!! KISS pos+visibility+opacity
|
|
5
|
+
position: absolute;
|
|
6
|
+
|
|
7
|
+
visibility: collapse;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
> [slot='overlay'] {
|
|
11
|
+
:where(&) {
|
|
12
|
+
visibility: visible;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
&:not(:has(> :not([slot]))) > [slot='placeholder'] {
|
|
16
|
+
:where(&) {
|
|
17
|
+
position: relative;
|
|
18
|
+
|
|
19
|
+
visibility: visible;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
&:has(> [slot='overlay']) {
|
|
24
|
+
> *:not([slot='overlay']) {
|
|
25
|
+
:where(&) {
|
|
26
|
+
opacity: 0;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
> [slot='overlay'] {
|
|
31
|
+
:where(&) {
|
|
32
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
33
|
+
transition: opacity ease-out 200ms;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
@starting-style {
|
|
37
|
+
opacity: 0;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
@use '../vars';
|
|
2
|
+
@use '../functions';
|
|
3
|
+
@use 'sass:string';
|
|
4
|
+
@use 'sass:map';
|
|
5
|
+
@use 'sass:list';
|
|
6
|
+
|
|
7
|
+
@mixin wire-tinted-glass($prop) {
|
|
8
|
+
--#{$prop}face: light-dark(var(--accentColor), var(--accentColor));
|
|
9
|
+
--#{$prop}text: light-dark(oklch(from var(--accentColor) clamp(0, (0.7 - l) * 999, 1) none none), oklch(from var(--accentColor) clamp(0, (0.7 - l) * 999, 1) none none));
|
|
10
|
+
|
|
11
|
+
--#{$prop}highlightface: light-dark(oklch(from var(--accentColor) min(calc(l * 1.1), 1) min(calc(c * 1.1), c) h), oklch(from var(--accentColor) min(calc(l * 1.1), 1) min(calc(c * 1.1), c) h));
|
|
12
|
+
--#{$prop}highlighttext: light-dark(oklch(from var(--accentColor) clamp(0, (0.7 - l) * 999, 1) none none), oklch(from var(--accentColor) clamp(0, (0.7 - l) * 999, 1) none none));
|
|
13
|
+
|
|
14
|
+
--#{$prop}activeface: light-dark(oklch(from var(--accentColor) min(calc(l * 1.2), 1) min(calc(c * 1.1), c) h), oklch(from var(--accentColor) min(calc(l * 1.2), 1) min(calc(c * 1.1), c) h));
|
|
15
|
+
--#{$prop}activetext: light-dark(oklch(from var(--accentColor) clamp(0, (0.7 - l) * 999, 1) none none), oklch(from var(--accentColor) clamp(0, (0.7 - l) * 999, 1) none none));
|
|
16
|
+
}
|
package/scss/mixins/_index.scss
CHANGED
|
@@ -360,7 +360,7 @@
|
|
|
360
360
|
$result: string.slice($result, 1, string.length($result) - 1);
|
|
361
361
|
$final-result: functions.str-replace($result, 'minmax(0,1fr)', 'spacer');
|
|
362
362
|
@debug $final-result, $template;
|
|
363
|
-
:where(&[template='#{$result}']) {
|
|
363
|
+
:where(&[template='#{$final-result}']) {
|
|
364
364
|
#{$prop}: $template;
|
|
365
365
|
}
|
|
366
366
|
}
|
|
@@ -24,50 +24,7 @@
|
|
|
24
24
|
--btnradiusbr: var(--regular-btn-border-radius);
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
|
|
28
|
-
:where(&) {
|
|
29
|
-
position: absolute;
|
|
30
|
-
|
|
31
|
-
visibility: collapse;
|
|
32
|
-
|
|
33
|
-
// take over
|
|
34
|
-
max-inline-size: 90%;
|
|
35
|
-
|
|
36
|
-
max-block-size: 90%;
|
|
37
|
-
|
|
38
|
-
border-radius: inherit;
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
> [slot='overlay'] {
|
|
42
|
-
:where(&) {
|
|
43
|
-
visibility: visible;
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
&:not(:has(> :not([slot]))) > [slot='placeholder'] {
|
|
47
|
-
:where(&) {
|
|
48
|
-
position: relative;
|
|
49
|
-
|
|
50
|
-
visibility: visible;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
&:has(> [slot='overlay']) {
|
|
55
|
-
> *:not([slot='overlay']) {
|
|
56
|
-
:where(&) {
|
|
57
|
-
opacity: 0;
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
> [slot='overlay'] {
|
|
62
|
-
:where(&) {
|
|
63
|
-
transition: opacity ease-out 200ms;
|
|
64
|
-
|
|
65
|
-
@starting-style {
|
|
66
|
-
opacity: 0;
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
}
|
|
27
|
+
@include mixins.takeover-button-slots;
|
|
71
28
|
|
|
72
29
|
@each $size, $media in vars.$button-sizes {
|
|
73
30
|
// @if (regular != $size) {
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
@use '../vars';
|
|
2
|
+
@use '../mixins';
|
|
3
|
+
|
|
4
|
+
@layer #{vars.$transitions-layer} {
|
|
5
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
6
|
+
fine-tooltip {
|
|
7
|
+
:where(&) {
|
|
8
|
+
transition:
|
|
9
|
+
opacity 150ms allow-discrete ease-out,
|
|
10
|
+
transform 150ms allow-discrete ease-out;
|
|
11
|
+
transition-delay: 200ms;
|
|
12
|
+
will-change: opacity, transform;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
:where(&[closing]) {
|
|
16
|
+
transition-duration: 100ms;
|
|
17
|
+
transition-delay: 0ms;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -104,6 +104,9 @@
|
|
|
104
104
|
}
|
|
105
105
|
]
|
|
106
106
|
},
|
|
107
|
+
{
|
|
108
|
+
"name": "fine-tooltip"
|
|
109
|
+
},
|
|
107
110
|
{
|
|
108
111
|
"name": "form-view"
|
|
109
112
|
},
|
|
@@ -297,7 +300,15 @@
|
|
|
297
300
|
"name": "tool-bar-item-group"
|
|
298
301
|
},
|
|
299
302
|
{
|
|
300
|
-
"name": "tool-bar-item"
|
|
303
|
+
"name": "tool-bar-item",
|
|
304
|
+
"attributes": [
|
|
305
|
+
{
|
|
306
|
+
"name": "slot"
|
|
307
|
+
},
|
|
308
|
+
{
|
|
309
|
+
"name": "data-previous-slot"
|
|
310
|
+
}
|
|
311
|
+
]
|
|
301
312
|
},
|
|
302
313
|
{
|
|
303
314
|
"name": "tool-bar",
|