@swiftwc/ui 0.0.0-dev.36 → 0.0.0-dev.37
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 +2 -9
- package/generated/client/index.js +5 -156
- package/generated/components/alert-dialog.js +18 -21
- package/generated/components/body-view.js +3 -2
- package/generated/components/bordered-button.js +4 -4
- package/generated/components/bordered-prominent-button.js +4 -4
- package/generated/components/borderless-button.js +4 -4
- package/generated/components/confirmation-dialog.js +18 -21
- package/generated/components/content-unavailable-view.js +4 -4
- package/generated/components/date-picker.d.ts +0 -10
- package/generated/components/date-picker.js +43 -28
- package/generated/components/disclosure-group.js +5 -5
- package/generated/components/fine-tooltip.js +4 -4
- package/generated/components/form-view.js +3 -3
- package/generated/components/glass-button.js +4 -4
- package/generated/components/glass-prominent-button.js +4 -4
- package/generated/components/index.d.ts +1 -0
- package/generated/components/index.js +1 -0
- package/generated/components/label-view.js +4 -4
- package/generated/components/list-view.js +3 -3
- package/generated/components/menu-view.js +14 -16
- package/generated/components/navigation-large-title.js +5 -5
- package/generated/components/navigation-split-view.js +4 -3
- package/generated/components/navigation-stack.js +4 -3
- package/generated/components/navigation-title.js +4 -4
- package/generated/components/picker-view.d.ts +2 -2
- package/generated/components/picker-view.js +313 -192
- package/generated/components/plain-button.js +3 -3
- package/generated/components/progress-view.js +6 -6
- package/generated/components/screen-view.js +2 -1
- package/generated/components/scroll-view-proxy.js +3 -2
- package/generated/components/scroll-view.js +15 -18
- package/generated/components/search-view.d.ts +8 -0
- package/generated/components/search-view.js +27 -0
- package/generated/components/section-view.js +4 -4
- package/generated/components/sheet-view.js +6 -34
- package/generated/components/sidebar-toggle.js +9 -10
- package/generated/components/sidebar-view.js +6 -8
- package/generated/components/sticky-container.js +3 -3
- package/generated/components/tab-bar.js +8 -10
- package/generated/components/tab-item.js +8 -8
- package/generated/components/tab-view.js +10 -11
- package/generated/components/table-view.js +18 -36
- package/generated/components/text-field.js +32 -17
- package/generated/components/tool-bar-item-group.js +17 -19
- package/generated/components/tool-bar-item.js +22 -23
- package/generated/components/tool-bar.d.ts +2 -2
- package/generated/components/tool-bar.js +7 -7
- package/generated/components/v-keyboard.js +5 -5
- package/generated/components/v-stack.js +3 -2
- package/generated/css/index.css +283 -272
- package/generated/events/picker-view.d.ts +6 -0
- package/generated/i18n/locales/el.d.ts +1 -0
- package/generated/i18n/locales/el.js +1 -0
- package/generated/i18n/locales/en.d.ts +1 -0
- package/generated/i18n/locales/en.js +1 -0
- package/generated/internal/class/css-style-observer.js +2 -2
- package/generated/internal/class/form-associated-base.d.ts +0 -4
- package/generated/internal/class/form-associated-base.js +21 -41
- package/generated/internal/class/mutation-observer-set.d.ts +9 -0
- package/generated/internal/class/mutation-observer-set.js +42 -0
- package/generated/internal/class/mutation-observer-singleton.js +18 -0
- package/generated/internal/class/navigation-view.js +3 -3
- package/generated/internal/decorators/adaptive-slot.d.ts +1 -0
- package/generated/internal/decorators/adaptive-slot.js +47 -0
- package/generated/internal/decorators/custom-element.d.ts +1 -1
- package/generated/internal/decorators/custom-element.js +2 -1
- package/generated/internal/decorators/index.d.ts +4 -0
- package/generated/internal/decorators/index.js +4 -0
- package/generated/internal/privateNamespace.d.ts +10 -0
- package/generated/internal/privateNamespace.js +159 -1
- package/generated/internal/utils/debug.d.ts +1 -0
- package/generated/internal/utils/debug.js +3 -0
- package/generated/internal/utils/index.d.ts +3 -3
- package/generated/internal/utils/index.js +5 -3
- package/generated/namespace-browser/base.d.ts +9 -0
- package/generated/namespace-browser/base.js +23 -0
- package/generated/snapshot/index.d.ts +1 -1
- package/generated/snapshot/index.js +4 -4
- package/package.json +2 -1
- package/scss/_components.scss +2 -0
- package/scss/base/_root.scss +10 -8
- package/scss/colors/_index.scss +9 -12
- package/scss/components/_index.scss +2 -0
- package/scss/components/_menu-view.scss +11 -5
- package/scss/components/_picker-view.scss +11 -2
- package/scss/components/_scroll-view.scss +4 -0
- package/scss/components/_search-view.scss +18 -0
- package/scss/components/_sheet-view.scss +2 -1
- package/scss/components/_sticky-container.scss +1 -1
- package/scss/placeholders/_lists.scss +35 -35
- package/scss/utils/_index.scss +21 -7
- package/scss/utils/_stacks.scss +5 -43
- package/web-components.html-data/en.json +11 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { onoff } from '../internal/utils';
|
|
1
|
+
import { debug, onoff } from '../internal/utils';
|
|
2
2
|
export class Snapshot {
|
|
3
3
|
static #readyCalled = false;
|
|
4
4
|
static #config;
|
|
@@ -9,7 +9,7 @@ export class Snapshot {
|
|
|
9
9
|
}
|
|
10
10
|
static on = new EventTarget();
|
|
11
11
|
static waitReady = Promise.all([
|
|
12
|
-
'complete' === document.readyState ? Promise.resolve() : new Promise((r) => self.addEventListener('load', r, { once: true })),
|
|
12
|
+
'complete' === document.readyState ? Promise.resolve() : new Promise((r) => self.addEventListener('load', () => r(), { once: true })),
|
|
13
13
|
(async () => {
|
|
14
14
|
if (!this.#readyCalled)
|
|
15
15
|
await this.setOwnConfig();
|
|
@@ -45,10 +45,10 @@ export class Snapshot {
|
|
|
45
45
|
const mediaQueryList = self.matchMedia(`(pointer: fine) and (min-width: ${this.#config['ipad-sheet-view-inline-size']}) and (min-height: ${this.#config['ipad-sheet-view-height']})`);
|
|
46
46
|
this.#breakpoints = new Map([['fine_dialog_sheet', mediaQueryList.matches]]);
|
|
47
47
|
this.#listeners.add(onoff('change', (evt) => this.#handleMediaChange(evt, 'fine_dialog_sheet:change'), mediaQueryList).on());
|
|
48
|
-
|
|
48
|
+
debug(this.#config);
|
|
49
49
|
}
|
|
50
50
|
static #handleMediaChange = ({ type, matches, media }, kind) => {
|
|
51
|
-
|
|
51
|
+
debug(`${Snapshot.name} ⚡️ ${type}`);
|
|
52
52
|
this.#breakpoints?.set('fine_dialog_sheet', matches);
|
|
53
53
|
this.on.dispatchEvent(new MediaQueryListEvent(kind, {
|
|
54
54
|
matches,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@swiftwc/ui",
|
|
3
|
-
"version": "0.0.0-dev.
|
|
3
|
+
"version": "0.0.0-dev.37",
|
|
4
4
|
"description": "Elegant SwiftUI-inspired web components for standalone web apps and web extensions.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -68,6 +68,7 @@
|
|
|
68
68
|
"build:barrels:events": "barrelsby --noHeader --delete --singleQuotes --noSemicolon --directory ./js/events --exclude \".\\.test\\.ts\"",
|
|
69
69
|
"build:barrels:buses": "barrelsby --noHeader --delete --singleQuotes --noSemicolon --exportDefault --directory ./js/buses",
|
|
70
70
|
"build:barrels:i18n": "barrelsby --noHeader --delete --singleQuotes --noSemicolon --exportDefault --fullPathname --directory ./js/i18n/locales",
|
|
71
|
+
"build:barrels:decorators": "barrelsby --noHeader --delete --singleQuotes --noSemicolon --exportDefault --directory ./js/internal/decorators",
|
|
71
72
|
"format:check": "prettier . --check",
|
|
72
73
|
"format:write": "prettier . --write",
|
|
73
74
|
"test": "vitest --dom",
|
package/scss/_components.scss
CHANGED
package/scss/base/_root.scss
CHANGED
|
@@ -123,8 +123,8 @@
|
|
|
123
123
|
// --secondary-label: oklch(0.4962 0 0); // ✅
|
|
124
124
|
// --secondary-label-dark: oklch(0.6334 0 0); // ✅
|
|
125
125
|
|
|
126
|
-
--secondary-text: var(--black);
|
|
127
|
-
--secondary-text-dark: var(--white);
|
|
126
|
+
// --secondary-text: var(--black);
|
|
127
|
+
// --secondary-text-dark: var(--white);
|
|
128
128
|
|
|
129
129
|
--tint: oklch(0.5325 0.1899 257.12);
|
|
130
130
|
--tint1g: color-mix(in oklch, white 70%, var(--tint)); //oklch(0.9208 0.0306 249.69);
|
|
@@ -139,17 +139,17 @@
|
|
|
139
139
|
// --divider: oklch(0.9431 0 0); // ✅
|
|
140
140
|
// --divider-dark: oklch(0.2858 0.0036 286.17); // ✅
|
|
141
141
|
|
|
142
|
-
--system-bg: var(--white); // ✅
|
|
143
|
-
--system-bg-dark: var(--black); // ✅
|
|
142
|
+
// --system-bg: var(--white); // ✅
|
|
143
|
+
// --system-bg-dark: var(--black); // ✅
|
|
144
144
|
|
|
145
145
|
// --primary-bg: oklch(0.9566 0.0067 286.27); // ✅
|
|
146
146
|
// --primary-bg-dark: var(--black); // ✅
|
|
147
147
|
|
|
148
|
-
--primary-grouped-bg: var(--white); //0.8136 0.0428 255.03;
|
|
149
|
-
--primary-grouped-bg-dark: oklch(0.8136 0.0428 255.03);
|
|
148
|
+
// --primary-grouped-bg: var(--white); //0.8136 0.0428 255.03;
|
|
149
|
+
// --primary-grouped-bg-dark: oklch(0.8136 0.0428 255.03);
|
|
150
150
|
|
|
151
|
-
--secondary-bg: oklch(0.8045 0.0779 73.42);
|
|
152
|
-
--secondary-bg-dark: oklch(0.8045 0.0779 73.42);
|
|
151
|
+
// --secondary-bg: oklch(0.8045 0.0779 73.42);
|
|
152
|
+
// --secondary-bg-dark: oklch(0.8045 0.0779 73.42);
|
|
153
153
|
|
|
154
154
|
--view-transition-leading-x: -50%;
|
|
155
155
|
--view-transition-principal-x: 0%;
|
|
@@ -250,11 +250,13 @@
|
|
|
250
250
|
--#{$v}-item-padding-block-start: 1rem;
|
|
251
251
|
--#{$v}-item-padding-block-start: 1rem;
|
|
252
252
|
|
|
253
|
+
// FIXME: feat-sheet 3/3
|
|
253
254
|
--#{$v}-item-background-color: var(--background); //light-dark(var(--system-bg), var(--primary-bg-dark)); // ✅
|
|
254
255
|
--#{$v}-item-color: var(--primary);
|
|
255
256
|
--#{$v}-highlighteditem-background-color: var(--tint1g);
|
|
256
257
|
--#{$v}-highlighteditem-color: ;
|
|
257
258
|
|
|
259
|
+
// FIXME: feat-sheet 3/3
|
|
258
260
|
--inset#{$v}-item-background-color: var(--background); //light-dark(var(--system-bg), var(--primary-bg-dark)); // ✅
|
|
259
261
|
--inset#{$v}-item-color: var(--primary);
|
|
260
262
|
--inset#{$v}-highlighteditem-background-color: var(--accentColor);
|
package/scss/colors/_index.scss
CHANGED
|
@@ -452,7 +452,8 @@ $colors: map.merge(
|
|
|
452
452
|
// --face2: var(--secondaryBackground); // IMPORTANT: redeclare references scope or it WONT pick up!
|
|
453
453
|
// --face3: var(--tertiaryBackground); // IMPORTANT: redeclare references scope or it WONT pick up!
|
|
454
454
|
|
|
455
|
-
|
|
455
|
+
// FIXME: feat-sheet 1/3
|
|
456
|
+
--background: var(--secondaryBackground); //light-dark(var(--secondary-bg), var(--secondary-bg-dark));
|
|
456
457
|
// --face: light-dark(var(--secondary-bg), var(--secondary-bg-dark));
|
|
457
458
|
|
|
458
459
|
// --text: light-dark(var(--secondary-text), var(--secondary-text-dark));
|
|
@@ -463,10 +464,8 @@ $colors: map.merge(
|
|
|
463
464
|
// --canvastext: light-dark(var(--primary-label), var(--primary-label-dark));
|
|
464
465
|
|
|
465
466
|
@include mixins.if-2col-split-view-fits {
|
|
466
|
-
--face: light-dark(
|
|
467
|
-
|
|
468
|
-
var(--liquid-glass-bg-dark)
|
|
469
|
-
); //light-dark(oklch(var(--sidebar-bg-lch) / var(--sidebar-bg-alpha)), oklch(var(--sidebar-bg-lch-dark) / var(--sidebar-bg-alpha-dark)));
|
|
467
|
+
--face: light-dark(var(--liquid-glass-bg), var(--liquid-glass-bg-dark));
|
|
468
|
+
//light-dark(oklch(var(--sidebar-bg-lch) / var(--sidebar-bg-alpha)), oklch(var(--sidebar-bg-lch-dark) / var(--sidebar-bg-alpha-dark)));
|
|
470
469
|
|
|
471
470
|
// --text: light-dark(var(--secondary-text), var(--secondary-text-dark));
|
|
472
471
|
}
|
|
@@ -474,10 +473,8 @@ $colors: map.merge(
|
|
|
474
473
|
|
|
475
474
|
tab-view > [is='sidebar-view'] {
|
|
476
475
|
:where(&) {
|
|
477
|
-
--face: light-dark(
|
|
478
|
-
|
|
479
|
-
var(--liquid-glass-bg-dark)
|
|
480
|
-
); //light-dark(oklch(var(--sidebar-bg-lch) / var(--sidebar-bg-alpha)), oklch(var(--sidebar-bg-lch-dark) / var(--sidebar-bg-alpha-dark)));
|
|
476
|
+
--face: light-dark(var(--liquid-glass-bg), var(--liquid-glass-bg-dark));
|
|
477
|
+
//light-dark(oklch(var(--sidebar-bg-lch) / var(--sidebar-bg-alpha)), oklch(var(--sidebar-bg-lch-dark) / var(--sidebar-bg-alpha-dark)));
|
|
481
478
|
// --text: light-dark(var(--secondary-text), var(--secondary-text-dark));
|
|
482
479
|
}
|
|
483
480
|
|
|
@@ -493,9 +490,9 @@ $colors: map.merge(
|
|
|
493
490
|
}
|
|
494
491
|
|
|
495
492
|
:where([is='tab-bar']) {
|
|
496
|
-
--toolbaritemtext: light-dark(var(--secondary-text), var(--secondary-text-dark));
|
|
497
|
-
--toolbaritemhighlighttext: light-dark(var(--secondary-text), var(--secondary-text-dark));
|
|
498
|
-
--toolbaritemactivetext: light-dark(var(--secondary-text), var(--secondary-text-dark));
|
|
493
|
+
--toolbaritemtext: var(--text); //light-dark(var(--secondary-text), var(--secondary-text-dark));
|
|
494
|
+
--toolbaritemhighlighttext: var(--text); //light-dark(var(--secondary-text), var(--secondary-text-dark));
|
|
495
|
+
--toolbaritemactivetext: var(--text); //light-dark(var(--secondary-text), var(--secondary-text-dark));
|
|
499
496
|
}
|
|
500
497
|
|
|
501
498
|
tool-bar-item,
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
scroll-view,
|
|
11
11
|
body-view,
|
|
12
12
|
tab-view,
|
|
13
|
+
[is='search-view'],
|
|
13
14
|
[is='sidebar-view'],
|
|
14
15
|
[is='tab-bar'],
|
|
15
16
|
[is='full-screen'],
|
|
@@ -43,6 +44,7 @@
|
|
|
43
44
|
section-view,
|
|
44
45
|
text-field,
|
|
45
46
|
detail-placeholder,
|
|
47
|
+
sticky-container,
|
|
46
48
|
picker-view {
|
|
47
49
|
:where(&:not([hidden])) {
|
|
48
50
|
display: grid;
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
menu-view {
|
|
8
8
|
:where(&)::part(menu-summary) {
|
|
9
9
|
transform: var(--menu--summary-scale,);
|
|
10
|
+
|
|
10
11
|
filter: var(--menu--summary-filter,);
|
|
11
12
|
}
|
|
12
13
|
|
|
@@ -70,6 +71,8 @@
|
|
|
70
71
|
|
|
71
72
|
// finally
|
|
72
73
|
--menu--dialog-scale: scale(0);
|
|
74
|
+
--menu--summary-scale: ;
|
|
75
|
+
--menu--summary-filter: ;
|
|
73
76
|
}
|
|
74
77
|
|
|
75
78
|
&[open] {
|
|
@@ -82,9 +85,10 @@
|
|
|
82
85
|
|
|
83
86
|
--menu--dialog-scale: scale(1);
|
|
84
87
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
+
// BUG: Safari rerenders entire scale animation on every button change
|
|
89
|
+
// @starting-style {
|
|
90
|
+
// --menu--dialog-scale: scale(0);
|
|
91
|
+
// }
|
|
88
92
|
}
|
|
89
93
|
}
|
|
90
94
|
|
|
@@ -96,8 +100,10 @@
|
|
|
96
100
|
}
|
|
97
101
|
}
|
|
98
102
|
|
|
99
|
-
|
|
100
|
-
&[open]
|
|
103
|
+
// shrink again, if opened outside of a direct parent toolbaritem (they shrink themselves)
|
|
104
|
+
// &[open] > &[open],
|
|
105
|
+
// &[open]:not(tool-bar-item &) {
|
|
106
|
+
&[open]:not(tool-bar-item > &) {
|
|
101
107
|
--menu--summary-scale: scale(0.01);
|
|
102
108
|
|
|
103
109
|
--menu--summary-filter: blur(10px);
|
|
@@ -79,7 +79,12 @@ $picker-elses: (
|
|
|
79
79
|
// --picker--stack-grid-template-columns: auto minmax(0, 1fr);
|
|
80
80
|
}
|
|
81
81
|
|
|
82
|
-
:where(& > menu-view >
|
|
82
|
+
:where(& menu-view > menu-view > label-view[slot='label']) {
|
|
83
|
+
@container style(--picker-style: menu) {
|
|
84
|
+
margin-inline-start: 2rem;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
:where(& menu-view > button, & menu-view > [is='disclosure-group'] > button, & menu-view > [is='disclosure-group'] > summary) {
|
|
83
88
|
@container style(--picker-style: menu) {
|
|
84
89
|
@include make-button-affordance;
|
|
85
90
|
}
|
|
@@ -103,7 +108,11 @@ $picker-elses: (
|
|
|
103
108
|
}
|
|
104
109
|
@each $v in vars.$picker-styles {
|
|
105
110
|
:where(&[picker-style='#{$v}']) {
|
|
106
|
-
:where(& > menu-view >
|
|
111
|
+
:where(& menu-view > menu-view > label-view[slot='label']) {
|
|
112
|
+
margin-inline-start: 2rem;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
:where(& menu-view > button, & menu-view > [is='disclosure-group'] > button, & menu-view > [is='disclosure-group'] > summary) {
|
|
107
116
|
@include make-button-affordance;
|
|
108
117
|
}
|
|
109
118
|
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
@use '../vars';
|
|
2
|
+
@use '../placeholders';
|
|
3
|
+
|
|
4
|
+
@layer #{vars.$components-layer} {
|
|
5
|
+
[is='search-view'] {
|
|
6
|
+
:where(&) {
|
|
7
|
+
height: 30px;
|
|
8
|
+
// outline: red solid 3px;
|
|
9
|
+
|
|
10
|
+
backdrop-filter: var(--liquid-glass-backdrop-filter,);
|
|
11
|
+
box-shadow: var(--menu-popover-box-shadow,);
|
|
12
|
+
|
|
13
|
+
border-radius: var(--pill-border-radius);
|
|
14
|
+
|
|
15
|
+
padding-inline: 1rem;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -13,9 +13,9 @@
|
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
// componentize buttons
|
|
16
|
-
> :not([slot], section-view, [is='disclosure-group'], picker-view, menu-view, whatever-name),
|
|
17
|
-
section-view > :not([slot], section-view, [is='disclosure-group'], picker-view, menu-view, whatever-name),
|
|
18
|
-
[is='disclosure-group'] > :not([slot], section-view, [is='disclosure-group'], picker-view, menu-view, whatever-name) {
|
|
16
|
+
> :not([slot], section-view, [is='disclosure-group'], picker-view, menu-view, menu-view *, whatever-name),
|
|
17
|
+
section-view > :not([slot], section-view, [is='disclosure-group'], picker-view, menu-view, menu-view *, whatever-name),
|
|
18
|
+
[is='disclosure-group'] > :not([slot], section-view, [is='disclosure-group'], picker-view, menu-view, menu-view *, whatever-name) {
|
|
19
19
|
// :where(&:is(summary:not([is='disclosure-group'] [is='disclosure-group'] summary))) {
|
|
20
20
|
// box-shadow: inset 0 0 4px magenta;
|
|
21
21
|
// }
|
|
@@ -78,17 +78,17 @@
|
|
|
78
78
|
|
|
79
79
|
// SECTION: wire gaps
|
|
80
80
|
:not([slot], section-view) ~ section-view {
|
|
81
|
-
:where(
|
|
81
|
+
:where(&:not(menu-view *)) {
|
|
82
82
|
padding-block-start: var(--list--section-gap,);
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
85
|
section-view:not([slot]) ~ section-view {
|
|
86
|
-
:where(
|
|
86
|
+
:where(&:not(menu-view *)) {
|
|
87
87
|
padding-block-start: var(--list--section-gap,);
|
|
88
88
|
}
|
|
89
89
|
}
|
|
90
90
|
section-view:has(~ :not([slot], section-view)) {
|
|
91
|
-
:where(
|
|
91
|
+
:where(&:not(menu-view *)) {
|
|
92
92
|
padding-block-end: var(--list--section-gap,);
|
|
93
93
|
}
|
|
94
94
|
}
|
|
@@ -98,28 +98,28 @@
|
|
|
98
98
|
// }
|
|
99
99
|
// }
|
|
100
100
|
:not([slot], [is='disclosure-group']) ~ [is='disclosure-group'] {
|
|
101
|
-
:where(
|
|
101
|
+
:where(&:not(menu-view *)) {
|
|
102
102
|
margin-block-start: var(--list--details-gap,);
|
|
103
103
|
}
|
|
104
104
|
}
|
|
105
105
|
[is='disclosure-group']:not([slot]) ~ [is='disclosure-group'] {
|
|
106
|
-
:where(
|
|
106
|
+
:where(&:not(menu-view *)) {
|
|
107
107
|
margin-block-start: calc(var(--list--details-gap, 0px) / 2);
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
110
|
[is='disclosure-group']:has(~ :not([slot], [is='disclosure-group'])) {
|
|
111
|
-
:where(
|
|
111
|
+
:where(&:not(menu-view *)) {
|
|
112
112
|
margin-block-end: var(--list--details-gap,);
|
|
113
113
|
}
|
|
114
114
|
}
|
|
115
115
|
[is='disclosure-group']:has(~ [is='disclosure-group']:not([slot])) {
|
|
116
|
-
:where(
|
|
116
|
+
:where(&:not(menu-view *)) {
|
|
117
117
|
margin-block-end: calc(var(--list--details-gap, 0px) / 2);
|
|
118
118
|
}
|
|
119
119
|
}
|
|
120
120
|
|
|
121
121
|
// SECTION: wire paddings
|
|
122
|
-
:where(
|
|
122
|
+
:where(&:not(menu-view *)) {
|
|
123
123
|
--itempadistart: var(--list--item-padding-inline-start, 0rem);
|
|
124
124
|
--itempadiend: calc(var(--list--item-padding-inline-end, 0rem) + var(--list--accessories-size, 0rem));
|
|
125
125
|
--itempadbstart: var(--list--item-padding-block-start,);
|
|
@@ -140,7 +140,7 @@
|
|
|
140
140
|
}
|
|
141
141
|
|
|
142
142
|
// SECTION: overwrites for details
|
|
143
|
-
[is='disclosure-group'] {
|
|
143
|
+
[is='disclosure-group']:not(menu-view *) {
|
|
144
144
|
> :not(summary) {
|
|
145
145
|
:where(&) {
|
|
146
146
|
--itemface: var(--list--details-background-color, var(--list--item-background-color,));
|
|
@@ -183,8 +183,8 @@
|
|
|
183
183
|
}
|
|
184
184
|
}
|
|
185
185
|
}
|
|
186
|
-
> [is='disclosure-group'],
|
|
187
|
-
> section-view > [is='disclosure-group'] {
|
|
186
|
+
> [is='disclosure-group']:not(menu-view *),
|
|
187
|
+
> section-view > [is='disclosure-group']:not(menu-view *) {
|
|
188
188
|
--disclosure-style: var(--list--rootsummary-marker-display,);
|
|
189
189
|
|
|
190
190
|
> summary {
|
|
@@ -244,9 +244,9 @@
|
|
|
244
244
|
}
|
|
245
245
|
|
|
246
246
|
// SECTION: add borders + arrows
|
|
247
|
-
> :not([slot]) ~ :not([slot], section-view),
|
|
248
|
-
section-view > :not([slot]) ~ :not([slot], section-view),
|
|
249
|
-
[is='disclosure-group'] > :not([slot]) ~ :not([slot], section-view) {
|
|
247
|
+
> :not([slot]) ~ :not([slot], section-view, menu-view *),
|
|
248
|
+
section-view > :not([slot]) ~ :not([slot], section-view, menu-view *),
|
|
249
|
+
[is='disclosure-group'] > :not([slot]) ~ :not([slot], section-view, menu-view *) {
|
|
250
250
|
:where(&) {
|
|
251
251
|
position: relative;
|
|
252
252
|
|
|
@@ -292,9 +292,9 @@
|
|
|
292
292
|
}
|
|
293
293
|
|
|
294
294
|
// SECTION: sharpen top corners
|
|
295
|
-
> :not([slot]) ~ :not([slot], section-view),
|
|
296
|
-
section-view > :not([slot]) ~ :not([slot], section-view),
|
|
297
|
-
[is='disclosure-group'] > :not([slot]) ~ :not([slot]) {
|
|
295
|
+
> :not([slot]) ~ :not([slot], section-view, menu-view *),
|
|
296
|
+
section-view > :not([slot]) ~ :not([slot], section-view, menu-view *),
|
|
297
|
+
[is='disclosure-group'] > :not([slot]) ~ :not([slot], menu-view *) {
|
|
298
298
|
:where(&) {
|
|
299
299
|
// outline: yellow solid 5px;
|
|
300
300
|
--itemradiustl: var(--list--adjacentitem-border-radius, var(--list--item-border-radius,)); //0 0;
|
|
@@ -313,10 +313,10 @@
|
|
|
313
313
|
}
|
|
314
314
|
|
|
315
315
|
// SECTION: sharpen bottom corners
|
|
316
|
-
> :not([slot]):has(~ :not([slot], section-view)),
|
|
317
|
-
section-view > :not([slot]):has(~ :not([slot], section-view)),
|
|
318
|
-
[is='disclosure-group'] > :not([slot], summary):has(~ :not([slot])),
|
|
319
|
-
[is='disclosure-group']:not([data-state='closed']) > summary {
|
|
316
|
+
> :not([slot]):has(~ :not([slot], section-view, menu-view *)),
|
|
317
|
+
section-view > :not([slot]):has(~ :not([slot], section-view, menu-view *)),
|
|
318
|
+
[is='disclosure-group'] > :not([slot], summary, menu-view *):has(~ :not([slot])),
|
|
319
|
+
[is='disclosure-group']:not([data-state='closed'], menu-view *) > summary {
|
|
320
320
|
:where(&) {
|
|
321
321
|
// outline: green solid 5px;
|
|
322
322
|
--itemradiusbl: var(--list--adjacentitem-border-radius, var(--list--item-border-radius,)); //0 0;
|
|
@@ -347,7 +347,7 @@
|
|
|
347
347
|
// }
|
|
348
348
|
|
|
349
349
|
// SECTION: style section heders/footers
|
|
350
|
-
section-view:not(section-view section-view) {
|
|
350
|
+
section-view:not(section-view section-view, menu-view *) {
|
|
351
351
|
:where(&)::part(section-footer-stack),
|
|
352
352
|
:where(&)::part(section-header-stack) {
|
|
353
353
|
// outline: magenta 4px solid;
|
|
@@ -370,7 +370,7 @@
|
|
|
370
370
|
}
|
|
371
371
|
|
|
372
372
|
// SECTION: Enable 2-col layout
|
|
373
|
-
&[columns='2'] {
|
|
373
|
+
&[columns='2']:not(menu-view *) {
|
|
374
374
|
:where(&) {
|
|
375
375
|
--list--host-grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
376
376
|
|
|
@@ -454,9 +454,9 @@
|
|
|
454
454
|
|
|
455
455
|
// SECTION: add accessories
|
|
456
456
|
// &:has(summary[marker-placement='leading']) {
|
|
457
|
-
> :not([slot], section-view, [is='disclosure-group'], picker-view, menu-view, whatever-name),
|
|
458
|
-
section-view > :not([slot], section-view, [is='disclosure-group'], picker-view, menu-view, whatever-name),
|
|
459
|
-
[is='disclosure-group'] > :not([slot], section-view, [is='disclosure-group'], picker-view, menu-view, whatever-name) {
|
|
457
|
+
> :not([slot], section-view, [is='disclosure-group'], picker-view, menu-view, menu-view *, whatever-name),
|
|
458
|
+
section-view > :not([slot], section-view, [is='disclosure-group'], picker-view, menu-view, menu-view *, whatever-name),
|
|
459
|
+
[is='disclosure-group'] > :not([slot], section-view, [is='disclosure-group'], picker-view, menu-view, menu-view *, whatever-name) {
|
|
460
460
|
// --itempadistart: 4rem;
|
|
461
461
|
|
|
462
462
|
// --item-accessory-size: 24px;
|
|
@@ -521,9 +521,9 @@
|
|
|
521
521
|
@layer #{vars.$colors-layer} {
|
|
522
522
|
// componentize
|
|
523
523
|
%list {
|
|
524
|
-
> :not([slot], section-view, [is='disclosure-group'], picker-view, menu-view, whatever-name),
|
|
525
|
-
section-view > :not([slot], section-view, [is='disclosure-group'], picker-view, menu-view, whatever-name),
|
|
526
|
-
[is='disclosure-group'] > :not([slot], section-view, [is='disclosure-group'], picker-view, menu-view, whatever-name) {
|
|
524
|
+
> :not([slot], section-view, [is='disclosure-group'], picker-view, menu-view, menu-view *, whatever-name),
|
|
525
|
+
section-view > :not([slot], section-view, [is='disclosure-group'], picker-view, menu-view, menu-view *, whatever-name),
|
|
526
|
+
[is='disclosure-group'] > :not([slot], section-view, [is='disclosure-group'], picker-view, menu-view, menu-view *, whatever-name) {
|
|
527
527
|
@include mixins.add-focus-visible-state {
|
|
528
528
|
--itemface: var(--itemhighlightface,);
|
|
529
529
|
--itemtext: var(--itemhighlighttext,);
|
|
@@ -540,9 +540,9 @@
|
|
|
540
540
|
@layer #{vars.$ui-layer} {
|
|
541
541
|
// componentize
|
|
542
542
|
%list {
|
|
543
|
-
> :not([slot], section-view, [is='disclosure-group'], picker-view, menu-view, whatever-name),
|
|
544
|
-
section-view > :not([slot], section-view, [is='disclosure-group'], picker-view, menu-view, whatever-name),
|
|
545
|
-
[is='disclosure-group'] > :not([slot], section-view, [is='disclosure-group'], picker-view, menu-view, whatever-name) {
|
|
543
|
+
> :not([slot], section-view, [is='disclosure-group'], picker-view, menu-view, menu-view *, whatever-name),
|
|
544
|
+
section-view > :not([slot], section-view, [is='disclosure-group'], picker-view, menu-view, menu-view *, whatever-name),
|
|
545
|
+
[is='disclosure-group'] > :not([slot], section-view, [is='disclosure-group'], picker-view, menu-view, menu-view *, whatever-name) {
|
|
546
546
|
// :where(&:is(button)) {
|
|
547
547
|
@include mixins.add-jsactive-state {
|
|
548
548
|
--itemface: var(--itemactiveface,);
|
package/scss/utils/_index.scss
CHANGED
|
@@ -1,14 +1,28 @@
|
|
|
1
1
|
@use '../vars';
|
|
2
2
|
|
|
3
3
|
@layer #{vars.$utils-layer} {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
[background-style='grouped'] {
|
|
5
|
+
:where(&) {
|
|
6
|
+
--background: var(--groupedBackground);
|
|
7
|
+
--secondaryBackground: var(--secondaryGroupedBackground);
|
|
8
|
+
--tertiaryBackground: var(--tertiaryGroupedBackground);
|
|
9
|
+
|
|
10
|
+
--face: var(--background);
|
|
11
|
+
// --face2: var(--secondaryBackground);
|
|
12
|
+
// --face3: var(--tertiaryBackground);
|
|
13
|
+
}
|
|
8
14
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
15
|
+
// FIXME: feat-sheet 2/3
|
|
16
|
+
[is='sheet-view'] &,
|
|
17
|
+
[is='full-screen'] &,
|
|
18
|
+
[is='confirmation-dialog'] &,
|
|
19
|
+
[is='alert-dialog'] & {
|
|
20
|
+
:where(&) {
|
|
21
|
+
// --background: var(--secondaryGroupedBackground);
|
|
22
|
+
// --secondaryBackground: var(--secondaryGroupedBackground);
|
|
23
|
+
// --tertiaryBackground: var(--tertiaryGroupedBackground);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
12
26
|
}
|
|
13
27
|
|
|
14
28
|
:where([foreground='secondary']) {
|
package/scss/utils/_stacks.scss
CHANGED
|
@@ -3,48 +3,6 @@
|
|
|
3
3
|
@use 'sass:map';
|
|
4
4
|
@use 'sass:list';
|
|
5
5
|
|
|
6
|
-
// $h-map: (
|
|
7
|
-
// leading: start,
|
|
8
|
-
// center: center,
|
|
9
|
-
// trailing: end,
|
|
10
|
-
// fill: stretch, // cross-axis stretch
|
|
11
|
-
// );
|
|
12
|
-
|
|
13
|
-
// $v-map: (
|
|
14
|
-
// top: start,
|
|
15
|
-
// center: center,
|
|
16
|
-
// bottom: end,
|
|
17
|
-
// fill: stretch, // cross-axis stretch
|
|
18
|
-
// );
|
|
19
|
-
|
|
20
|
-
// $placement-map: (
|
|
21
|
-
// top-leading: start start,
|
|
22
|
-
// top: start center,
|
|
23
|
-
// top-trailing: start end,
|
|
24
|
-
// center-leading: center start,
|
|
25
|
-
// center: center center,
|
|
26
|
-
// center-trailing: center end,
|
|
27
|
-
// bottom-leading: end start,
|
|
28
|
-
// bottom: end center,
|
|
29
|
-
// bottom-trailing: end end,
|
|
30
|
-
// );
|
|
31
|
-
|
|
32
|
-
// $alignment-map: (
|
|
33
|
-
// leading: start,
|
|
34
|
-
// center: center,
|
|
35
|
-
// trailing: end,
|
|
36
|
-
// fill: stretch, // cross-axis stretch
|
|
37
|
-
// );
|
|
38
|
-
|
|
39
|
-
// $distribution-map: (
|
|
40
|
-
// top: start,
|
|
41
|
-
// center: center,
|
|
42
|
-
// bottom: end,
|
|
43
|
-
// fill: stretch,
|
|
44
|
-
// between: space-between,
|
|
45
|
-
// evenly: space-evenly,
|
|
46
|
-
// );
|
|
47
|
-
|
|
48
6
|
$inline-map: (
|
|
49
7
|
leading: (
|
|
50
8
|
(justify-items (start)),
|
|
@@ -240,8 +198,12 @@ $v-placement-map: (
|
|
|
240
198
|
}
|
|
241
199
|
|
|
242
200
|
// all direct children (excluding stacks) of stacks get margins, also some special cases like a details>summary[padding] etc.
|
|
243
|
-
:where(& > [padding]:not(
|
|
201
|
+
:where(& > [padding]:not(&, sticky-container), & > [is='disclosure-group'] > summary[padding]) {
|
|
244
202
|
margin-inline: 1rem;
|
|
245
203
|
}
|
|
204
|
+
|
|
205
|
+
:where(& > sticky-container) {
|
|
206
|
+
padding-inline: 1rem;
|
|
207
|
+
}
|
|
246
208
|
}
|
|
247
209
|
}
|