@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
|
@@ -20,6 +20,7 @@ export * from './navigation-stack';
|
|
|
20
20
|
export * from './navigation-title';
|
|
21
21
|
export * from './picker-view';
|
|
22
22
|
export * from './plain-button';
|
|
23
|
+
export * from './progress-view';
|
|
23
24
|
export * from './screen-view';
|
|
24
25
|
export * from './scroll-view-proxy';
|
|
25
26
|
export * from './scroll-view';
|
|
@@ -20,6 +20,7 @@ export * from './navigation-stack';
|
|
|
20
20
|
export * from './navigation-title';
|
|
21
21
|
export * from './picker-view';
|
|
22
22
|
export * from './plain-button';
|
|
23
|
+
export * from './progress-view';
|
|
23
24
|
export * from './screen-view';
|
|
24
25
|
export * from './scroll-view-proxy';
|
|
25
26
|
export * from './scroll-view';
|
|
@@ -6,12 +6,17 @@ export class LabelView extends HTMLElement {
|
|
|
6
6
|
static #template;
|
|
7
7
|
static get template() {
|
|
8
8
|
return (this.#template ??= $(String.raw `
|
|
9
|
-
<div part="root label-image-stack">
|
|
10
9
|
<slot name="image"></slot>
|
|
11
|
-
</div>
|
|
12
|
-
<div part="root label-title-stack">
|
|
13
10
|
<slot></slot>
|
|
14
|
-
|
|
11
|
+
`
|
|
12
|
+
// String.raw`
|
|
13
|
+
// <div part="root label-image-stack">
|
|
14
|
+
// <slot name="image"></slot>
|
|
15
|
+
// </div>
|
|
16
|
+
// <div part="root label-title-stack">
|
|
17
|
+
// <slot></slot>
|
|
18
|
+
// </div>`
|
|
19
|
+
));
|
|
15
20
|
}
|
|
16
21
|
#shadowRoot;
|
|
17
22
|
constructor() {
|
|
@@ -20,8 +20,8 @@ export class PickerView extends FormAssociatedBase {
|
|
|
20
20
|
static #templates = new Map();
|
|
21
21
|
#lastRenderedStyle; //string | null
|
|
22
22
|
#shadowRoot;
|
|
23
|
-
#customValidity = '';
|
|
24
23
|
#slots = new Map();
|
|
24
|
+
#customValidity = '';
|
|
25
25
|
// #validitiesSlot?: HTMLSlotElement
|
|
26
26
|
// #datalistSlot?: HTMLSlotElement
|
|
27
27
|
// #tagSlot?: HTMLSlotElement
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
*/
|
|
4
|
+
export declare class ProgressView extends HTMLElement {
|
|
5
|
+
#private;
|
|
6
|
+
static get observedAttributes(): string[];
|
|
7
|
+
get progressViewStyle(): "circular" | "linear";
|
|
8
|
+
get template(): DocumentFragment;
|
|
9
|
+
constructor();
|
|
10
|
+
disconnectedCallback(): void;
|
|
11
|
+
connectedCallback(): void;
|
|
12
|
+
attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
|
|
13
|
+
}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
var _a;
|
|
2
|
+
import { CleanupRegistry } from '../internal/class/cleanup-registry';
|
|
3
|
+
import { CSSStyleObserver } from '../internal/class/css-style-observer';
|
|
4
|
+
import { $ } from '../internal/utils';
|
|
5
|
+
import { Snapshot } from '../snapshot';
|
|
6
|
+
const progressViewStyles = ['circular', 'linear'];
|
|
7
|
+
/**
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
10
|
+
export class ProgressView extends HTMLElement {
|
|
11
|
+
static get observedAttributes() {
|
|
12
|
+
return ['label', 'current-value-label', 'value'];
|
|
13
|
+
}
|
|
14
|
+
static #templates = new Map();
|
|
15
|
+
#cssStyleObserver;
|
|
16
|
+
#progressViewStyle;
|
|
17
|
+
#lastRenderedStyle;
|
|
18
|
+
#shadowRoot;
|
|
19
|
+
#slots = new Map();
|
|
20
|
+
get progressViewStyle() {
|
|
21
|
+
return this.#progressViewStyle ?? 'circular';
|
|
22
|
+
}
|
|
23
|
+
get template() {
|
|
24
|
+
if (!_a.#templates.has(this.progressViewStyle))
|
|
25
|
+
switch (this.progressViewStyle) {
|
|
26
|
+
case 'linear':
|
|
27
|
+
_a.#templates.set(this.progressViewStyle, $(String.raw `
|
|
28
|
+
<slot></slot>
|
|
29
|
+
<div part="root progress-control progress-line-control"></div>
|
|
30
|
+
<slot name="current-value"></slot>
|
|
31
|
+
`));
|
|
32
|
+
break;
|
|
33
|
+
case 'circular':
|
|
34
|
+
default:
|
|
35
|
+
_a.#templates.set(this.progressViewStyle, $(String.raw `
|
|
36
|
+
<div part="root progress-control progress-circular-control">
|
|
37
|
+
<div part="root progress-control progress-circular-blade progress-circular-blade-1"></div>
|
|
38
|
+
<div part="root progress-control progress-circular-blade progress-circular-blade-2"></div>
|
|
39
|
+
<div part="root progress-control progress-circular-blade progress-circular-blade-3"></div>
|
|
40
|
+
<div part="root progress-control progress-circular-blade progress-circular-blade-4"></div>
|
|
41
|
+
<div part="root progress-control progress-circular-blade progress-circular-blade-5"></div>
|
|
42
|
+
<div part="root progress-control progress-circular-blade progress-circular-blade-6"></div>
|
|
43
|
+
<div part="root progress-control progress-circular-blade progress-circular-blade-7"></div>
|
|
44
|
+
<div part="root progress-control progress-circular-blade progress-circular-blade-8"></div>
|
|
45
|
+
</div>
|
|
46
|
+
<slot></slot>
|
|
47
|
+
<slot name="current-value"></slot>
|
|
48
|
+
`));
|
|
49
|
+
break;
|
|
50
|
+
}
|
|
51
|
+
return _a.#templates.get(this.progressViewStyle);
|
|
52
|
+
}
|
|
53
|
+
constructor() {
|
|
54
|
+
super();
|
|
55
|
+
this.#shadowRoot = this.attachShadow({ mode: 'closed' });
|
|
56
|
+
}
|
|
57
|
+
disconnectedCallback() {
|
|
58
|
+
console.debug(`${_a.name} ⚡️ disconnect`);
|
|
59
|
+
CleanupRegistry.unregister(this);
|
|
60
|
+
}
|
|
61
|
+
connectedCallback() {
|
|
62
|
+
console.debug(`${_a.name} ⚡️ connect`);
|
|
63
|
+
this.#cssStyleObserver = new CSSStyleObserver({
|
|
64
|
+
properties: ['--progress-view-style-index'],
|
|
65
|
+
});
|
|
66
|
+
this.#cssStyleObserver.observe(this, this.#handleStyleChange);
|
|
67
|
+
Snapshot.waitReady.then(() => self.requestAnimationFrame(this.#handleStyleChange));
|
|
68
|
+
}
|
|
69
|
+
attributeChangedCallback(name, oldValue, newValue) {
|
|
70
|
+
console.debug(`${_a.name} ⚡️ attr-change [${name}] ("${oldValue}" → "${newValue}")`);
|
|
71
|
+
switch (name) {
|
|
72
|
+
case 'label': {
|
|
73
|
+
const label = this.querySelector(':scope>label-view:not([slot])') ?? this.appendChild($(`<label-view foreground="secondary"></label-view>`, '>1'));
|
|
74
|
+
if (newValue) {
|
|
75
|
+
label.setAttribute('title', newValue);
|
|
76
|
+
}
|
|
77
|
+
else
|
|
78
|
+
label.removeAttribute('title');
|
|
79
|
+
break;
|
|
80
|
+
}
|
|
81
|
+
case 'current-value-label': {
|
|
82
|
+
let label = this.querySelector(':scope>[slot=current-value]');
|
|
83
|
+
if (newValue) {
|
|
84
|
+
label ??= this.appendChild($(`<label-view slot="current-value" font="callout" foreground="secondary"></label-view>`, '>1'));
|
|
85
|
+
label.setAttribute('title', newValue);
|
|
86
|
+
}
|
|
87
|
+
else
|
|
88
|
+
label?.remove();
|
|
89
|
+
break;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
#handleStyleChange = () => {
|
|
94
|
+
console.debug(`${_a.name} ⚡️ style`);
|
|
95
|
+
const raw = self.getComputedStyle(this).getPropertyValue('--progress-view-style-index').trim();
|
|
96
|
+
const newValue = progressViewStyles[Number(raw)] ?? progressViewStyles[0];
|
|
97
|
+
if (newValue === this.#progressViewStyle)
|
|
98
|
+
return;
|
|
99
|
+
this.#progressViewStyle = newValue;
|
|
100
|
+
this.#render();
|
|
101
|
+
};
|
|
102
|
+
#render() {
|
|
103
|
+
console.debug(`${_a.name} ⚡️ render (${this.#progressViewStyle})`);
|
|
104
|
+
if (!this.isConnected)
|
|
105
|
+
return;
|
|
106
|
+
if (this.#lastRenderedStyle === this.#progressViewStyle)
|
|
107
|
+
return; // skip if already applied
|
|
108
|
+
this.#lastRenderedStyle = this.#progressViewStyle;
|
|
109
|
+
this.#shadowRoot.replaceChildren(document.importNode(this.template, true)); // clear shadow DOM
|
|
110
|
+
CleanupRegistry.unregister(this, 'slots');
|
|
111
|
+
for (const slot of this.#shadowRoot.querySelectorAll('slot'))
|
|
112
|
+
this.#slots?.set(slot.name, slot);
|
|
113
|
+
CleanupRegistry.register(this, () => {
|
|
114
|
+
this.#slots = new Map();
|
|
115
|
+
}, 'slots');
|
|
116
|
+
switch (this.#progressViewStyle
|
|
117
|
+
//
|
|
118
|
+
) {
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
_a = ProgressView;
|
package/generated/css/index.css
CHANGED
|
@@ -1037,6 +1037,7 @@
|
|
|
1037
1037
|
list-view:not([hidden]),
|
|
1038
1038
|
table-view:not([hidden]),
|
|
1039
1039
|
content-unavailable-view:not([hidden]),
|
|
1040
|
+
progress-view:not([hidden]),
|
|
1040
1041
|
tool-bar-item:not([hidden]),
|
|
1041
1042
|
tool-bar-item-group:not([hidden]),
|
|
1042
1043
|
fine-tooltip:not([hidden]),
|
|
@@ -1053,6 +1054,7 @@
|
|
|
1053
1054
|
picker-view:not([hidden])) {
|
|
1054
1055
|
display: grid;
|
|
1055
1056
|
}
|
|
1057
|
+
:where(progress-view)::part(progress-control),
|
|
1056
1058
|
:where(content-unavailable-view)::part(content-unavailable-title-stack),
|
|
1057
1059
|
:where(content-unavailable-view)::part(content-unavailable-description-stack),
|
|
1058
1060
|
:where(content-unavailable-view)::part(content-unavailable-actions-stack),
|
|
@@ -1428,6 +1430,84 @@
|
|
|
1428
1430
|
}
|
|
1429
1431
|
}
|
|
1430
1432
|
}
|
|
1433
|
+
@property --progress-view-style-index {
|
|
1434
|
+
syntax: "<number>";
|
|
1435
|
+
inherits: false;
|
|
1436
|
+
initial-value: 0;
|
|
1437
|
+
}
|
|
1438
|
+
@layer sw-components {
|
|
1439
|
+
:where(progress-view) {
|
|
1440
|
+
transition: --progress-view-style-index 1ms step-start;
|
|
1441
|
+
grid-template-columns: minmax(0, 1fr);
|
|
1442
|
+
place-items: center;
|
|
1443
|
+
place-content: center;
|
|
1444
|
+
gap: 0.3rem;
|
|
1445
|
+
}
|
|
1446
|
+
:where(progress-view)::part(progress-line-control) {
|
|
1447
|
+
background-color: var(--gray3);
|
|
1448
|
+
inline-size: 100%;
|
|
1449
|
+
block-size: 5px;
|
|
1450
|
+
border-radius: var(--pill-border-radius);
|
|
1451
|
+
border-left: solid 40px var(--accentColorEffective, var(--accentColor));
|
|
1452
|
+
}
|
|
1453
|
+
:where(progress-view)::part(progress-circular-control) {
|
|
1454
|
+
position: relative;
|
|
1455
|
+
inline-size: 2rem;
|
|
1456
|
+
block-size: 2rem;
|
|
1457
|
+
}
|
|
1458
|
+
:where(progress-view)::part(progress-circular-blade) {
|
|
1459
|
+
position: absolute;
|
|
1460
|
+
inset: 32.5% auto auto 42.5%;
|
|
1461
|
+
inline-size: 12.5%;
|
|
1462
|
+
block-size: 32.5%;
|
|
1463
|
+
background-color: var(--accentColorEffective, var(--secondary));
|
|
1464
|
+
border-radius: var(--pill-border-radius);
|
|
1465
|
+
will-change: opacity;
|
|
1466
|
+
}
|
|
1467
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
1468
|
+
:where(progress-view)::part(progress-circular-blade) {
|
|
1469
|
+
animation: progressViewCircular 1s linear infinite;
|
|
1470
|
+
}
|
|
1471
|
+
}
|
|
1472
|
+
:where(progress-view)::part(progress-circular-blade-1) {
|
|
1473
|
+
transform: rotate(45deg) translateY(-100%);
|
|
1474
|
+
animation-delay: -1.625s;
|
|
1475
|
+
}
|
|
1476
|
+
:where(progress-view)::part(progress-circular-blade-2) {
|
|
1477
|
+
transform: rotate(90deg) translateY(-100%);
|
|
1478
|
+
animation-delay: -1.5s;
|
|
1479
|
+
}
|
|
1480
|
+
:where(progress-view)::part(progress-circular-blade-3) {
|
|
1481
|
+
transform: rotate(135deg) translateY(-100%);
|
|
1482
|
+
animation-delay: -1.375s;
|
|
1483
|
+
}
|
|
1484
|
+
:where(progress-view)::part(progress-circular-blade-4) {
|
|
1485
|
+
transform: rotate(180deg) translateY(-100%);
|
|
1486
|
+
animation-delay: -1.25s;
|
|
1487
|
+
}
|
|
1488
|
+
:where(progress-view)::part(progress-circular-blade-5) {
|
|
1489
|
+
transform: rotate(225deg) translateY(-100%);
|
|
1490
|
+
animation-delay: -1.125s;
|
|
1491
|
+
}
|
|
1492
|
+
:where(progress-view)::part(progress-circular-blade-6) {
|
|
1493
|
+
transform: rotate(270deg) translateY(-100%);
|
|
1494
|
+
animation-delay: -1s;
|
|
1495
|
+
}
|
|
1496
|
+
:where(progress-view)::part(progress-circular-blade-7) {
|
|
1497
|
+
transform: rotate(315deg) translateY(-100%);
|
|
1498
|
+
animation-delay: -0.875s;
|
|
1499
|
+
}
|
|
1500
|
+
:where(progress-view)::part(progress-circular-blade-8) {
|
|
1501
|
+
transform: rotate(360deg) translateY(-100%);
|
|
1502
|
+
animation-delay: -0.75s;
|
|
1503
|
+
}
|
|
1504
|
+
:where(progress-view[progress-view-style=circular]) {
|
|
1505
|
+
--progress-view-style-index: 0;
|
|
1506
|
+
}
|
|
1507
|
+
:where(progress-view[progress-view-style=linear]) {
|
|
1508
|
+
--progress-view-style-index: 1;
|
|
1509
|
+
}
|
|
1510
|
+
}
|
|
1431
1511
|
@layer sw-tab-components {
|
|
1432
1512
|
:where(fine-tooltip) {
|
|
1433
1513
|
color: var(--text, );
|
|
@@ -1586,7 +1666,7 @@
|
|
|
1586
1666
|
}
|
|
1587
1667
|
content-unavailable-view > :not([slot]) {
|
|
1588
1668
|
--label-image-size: 5;
|
|
1589
|
-
--label-gap:
|
|
1669
|
+
--label-gap: 1;
|
|
1590
1670
|
}
|
|
1591
1671
|
:where(content-unavailable-view:not(:has(> [slot=description])))::part(content-unavailable-description-stack) {
|
|
1592
1672
|
display: none;
|
|
@@ -2078,6 +2158,8 @@
|
|
|
2078
2158
|
--btnpadbend: 0.1rem;
|
|
2079
2159
|
}
|
|
2080
2160
|
:where([is=borderless-button][role=destructive]) {
|
|
2161
|
+
--accentColorEffective: var(--red);
|
|
2162
|
+
--accentColorEffective4: var(--red4);
|
|
2081
2163
|
--accentColor: var(--red);
|
|
2082
2164
|
--accentColor2: var(--red2);
|
|
2083
2165
|
--accentColor3: var(--red3);
|
|
@@ -2127,6 +2209,8 @@
|
|
|
2127
2209
|
--btnpadbend: var(--large-btn-padding);
|
|
2128
2210
|
}
|
|
2129
2211
|
:where([is=bordered-button][role=destructive]) {
|
|
2212
|
+
--accentColorEffective: var(--red);
|
|
2213
|
+
--accentColorEffective4: var(--red4);
|
|
2130
2214
|
--accentColor: var(--red);
|
|
2131
2215
|
--accentColor2: var(--red2);
|
|
2132
2216
|
--accentColor3: var(--red3);
|
|
@@ -2171,6 +2255,8 @@
|
|
|
2171
2255
|
--btnpadbend: var(--large-btn-padding);
|
|
2172
2256
|
}
|
|
2173
2257
|
:where([is=bordered-prominent-button][role=destructive]) {
|
|
2258
|
+
--accentColorEffective: var(--red);
|
|
2259
|
+
--accentColorEffective4: var(--red4);
|
|
2174
2260
|
--accentColor: var(--red);
|
|
2175
2261
|
--accentColor2: var(--red2);
|
|
2176
2262
|
--accentColor3: var(--red3);
|
|
@@ -2218,6 +2304,8 @@
|
|
|
2218
2304
|
--btnpadbend: var(--large-btn-padding);
|
|
2219
2305
|
}
|
|
2220
2306
|
:where([is=glass-button][role=destructive]) {
|
|
2307
|
+
--accentColorEffective: var(--red);
|
|
2308
|
+
--accentColorEffective4: var(--red4);
|
|
2221
2309
|
--accentColor: var(--red);
|
|
2222
2310
|
--accentColor2: var(--red2);
|
|
2223
2311
|
--accentColor3: var(--red3);
|
|
@@ -2265,6 +2353,8 @@
|
|
|
2265
2353
|
--btnpadbend: var(--large-btn-padding);
|
|
2266
2354
|
}
|
|
2267
2355
|
:where([is=glass-prominent-button][role=destructive]) {
|
|
2356
|
+
--accentColorEffective: var(--red);
|
|
2357
|
+
--accentColorEffective4: var(--red4);
|
|
2268
2358
|
--accentColor: var(--red);
|
|
2269
2359
|
--accentColor2: var(--red2);
|
|
2270
2360
|
--accentColor3: var(--red3);
|
|
@@ -2346,9 +2436,9 @@
|
|
|
2346
2436
|
}
|
|
2347
2437
|
}
|
|
2348
2438
|
@property --label-gap {
|
|
2349
|
-
syntax: "<
|
|
2439
|
+
syntax: "<number>";
|
|
2350
2440
|
inherits: false;
|
|
2351
|
-
initial-value: 0;
|
|
2441
|
+
initial-value: 0.3;
|
|
2352
2442
|
}
|
|
2353
2443
|
@property --label-image-size {
|
|
2354
2444
|
syntax: "<number>";
|
|
@@ -2367,31 +2457,10 @@
|
|
|
2367
2457
|
justify-items: var(--label--host-justify-items, );
|
|
2368
2458
|
grid-template-columns: var(--label--host-grid-template-columns, );
|
|
2369
2459
|
grid-template-rows: var(--label--host-grid-template-rows, );
|
|
2370
|
-
gap: var(--label
|
|
2460
|
+
gap: calc(var(--label-gap) * 1rem);
|
|
2371
2461
|
--label-imagestack-fontsize: calc(var(--label-image-size) * 1rem);
|
|
2372
2462
|
white-space: var(--label--host-white-space, );
|
|
2373
2463
|
}
|
|
2374
|
-
:where(label-view)::part(label-image-stack), :where(label-view)::part(label-title-stack) {
|
|
2375
|
-
grid-auto-columns: minmax(0, 1fr);
|
|
2376
|
-
grid-auto-rows: minmax(0, 1fr);
|
|
2377
|
-
}
|
|
2378
|
-
:where(label-view)::part(label-image-stack) {
|
|
2379
|
-
display: var(--label--iconstack-display, none);
|
|
2380
|
-
}
|
|
2381
|
-
:where(label-view)::part(label-title-stack) {
|
|
2382
|
-
display: var(--label--titlestack-display, none);
|
|
2383
|
-
}
|
|
2384
|
-
:where(label-view)::part(label-image-stack) {
|
|
2385
|
-
aspect-ratio: 1/1;
|
|
2386
|
-
inline-size: var(--label-imagestack-fontsize);
|
|
2387
|
-
font-size: var(--label-imagestack-fontsize);
|
|
2388
|
-
}
|
|
2389
|
-
:where(label-view)::part(label-title-stack) {
|
|
2390
|
-
text-decoration: underline;
|
|
2391
|
-
font-size: var(--label--titlestack-font-size, );
|
|
2392
|
-
line-height: var(--label--titlestack-line-height, );
|
|
2393
|
-
font-weight: var(--label--titlestack-font-weight, );
|
|
2394
|
-
}
|
|
2395
2464
|
:where(label-view:has(> [slot=image])) {
|
|
2396
2465
|
--label--has-icon: yes;
|
|
2397
2466
|
}
|
|
@@ -2405,6 +2474,16 @@
|
|
|
2405
2474
|
-webkit-box-orient: var(--label--box-orient, );
|
|
2406
2475
|
line-clamp: var(--label--line-clamp, );
|
|
2407
2476
|
-webkit-line-clamp: var(--label--line-clamp, );
|
|
2477
|
+
text-decoration: underline;
|
|
2478
|
+
font-size: var(--label--titlestack-font-size, );
|
|
2479
|
+
line-height: var(--label--titlestack-line-height, );
|
|
2480
|
+
font-weight: var(--label--titlestack-font-weight, );
|
|
2481
|
+
}
|
|
2482
|
+
label-view > [slot=image] {
|
|
2483
|
+
aspect-ratio: 1/1;
|
|
2484
|
+
inline-size: var(--label-imagestack-fontsize);
|
|
2485
|
+
block-size: var(--label-imagestack-fontsize);
|
|
2486
|
+
font-size: var(--label-imagestack-fontsize);
|
|
2408
2487
|
}
|
|
2409
2488
|
@supports (x: if(else:red)) {
|
|
2410
2489
|
:where(label-view) {
|
|
@@ -2429,27 +2508,17 @@
|
|
|
2429
2508
|
style(--label-style: title-and-icon): if(style(--label-flow: vertical): auto minmax(0, 1fr) ; else: minmax(0, 1fr) ;) ;
|
|
2430
2509
|
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) ;) ;
|
|
2431
2510
|
);
|
|
2432
|
-
--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 ;) ;);
|
|
2433
|
-
--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) ;) ;);
|
|
2434
|
-
--label--iconstack-display: if(
|
|
2435
|
-
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;) ;
|
|
2436
|
-
);
|
|
2437
|
-
--label--titlestack-display: if(
|
|
2438
|
-
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;) ;
|
|
2439
|
-
);
|
|
2440
2511
|
}
|
|
2441
2512
|
}
|
|
2442
2513
|
@supports not (x: if(else:red)) {
|
|
2443
2514
|
@container style(--label-style: icon-only) {
|
|
2444
2515
|
:where(label-view:not([label-style])) {
|
|
2445
2516
|
--label-style: icon-only;
|
|
2446
|
-
--label--iconstack-display: grid;
|
|
2447
2517
|
}
|
|
2448
2518
|
}
|
|
2449
2519
|
@container style(--label-style: title-only) {
|
|
2450
2520
|
:where(label-view:not([label-style])) {
|
|
2451
2521
|
--label-style: title-only;
|
|
2452
|
-
--label--titlestack-display: grid;
|
|
2453
2522
|
}
|
|
2454
2523
|
}
|
|
2455
2524
|
@container style(--label-style: title-and-icon) {
|
|
@@ -2459,19 +2528,13 @@
|
|
|
2459
2528
|
--label--host-grid-template-rows: minmax(0, 1fr);
|
|
2460
2529
|
--label--host-align-items: center;
|
|
2461
2530
|
--label--host-justify-items: normal;
|
|
2462
|
-
--label-gap: 0.3rem;
|
|
2463
|
-
--label--host-gap: var(--label-gap);
|
|
2464
|
-
--label--iconstack-display: grid;
|
|
2465
|
-
--label--titlestack-display: grid;
|
|
2466
2531
|
}
|
|
2467
2532
|
}
|
|
2468
2533
|
:where(label-view[label-style=icon-only]) {
|
|
2469
2534
|
--label-style: icon-only;
|
|
2470
|
-
--label--iconstack-display: grid;
|
|
2471
2535
|
}
|
|
2472
2536
|
:where(label-view[label-style=title-only]) {
|
|
2473
2537
|
--label-style: title-only;
|
|
2474
|
-
--label--titlestack-display: grid;
|
|
2475
2538
|
}
|
|
2476
2539
|
:where(label-view[label-style=title-and-icon]) {
|
|
2477
2540
|
--label-style: title-and-icon;
|
|
@@ -2479,10 +2542,6 @@
|
|
|
2479
2542
|
--label--host-grid-template-rows: minmax(0, 1fr);
|
|
2480
2543
|
--label--host-align-items: center;
|
|
2481
2544
|
--label--host-justify-items: normal;
|
|
2482
|
-
--label-gap: 0.3rem;
|
|
2483
|
-
--label--host-gap: var(--label-gap);
|
|
2484
|
-
--label--iconstack-display: grid;
|
|
2485
|
-
--label--titlestack-display: grid;
|
|
2486
2545
|
}
|
|
2487
2546
|
@container not style(--label-style) {
|
|
2488
2547
|
:where(label-view:not([label-style]):has(> [slot=image]):has(> :not([slot]))) {
|
|
@@ -2491,30 +2550,22 @@
|
|
|
2491
2550
|
--label--host-grid-template-rows: minmax(0, 1fr);
|
|
2492
2551
|
--label--host-align-items: center;
|
|
2493
2552
|
--label--host-justify-items: normal;
|
|
2494
|
-
--label-gap: 0.3rem;
|
|
2495
|
-
--label--host-gap: var(--label-gap);
|
|
2496
|
-
--label--iconstack-display: grid;
|
|
2497
|
-
--label--titlestack-display: grid;
|
|
2498
2553
|
}
|
|
2499
2554
|
:where(label-view:not([label-style]):has(> [slot=image]):not(:has(> :not([slot])))) {
|
|
2500
2555
|
--label-style: icon-only;
|
|
2501
|
-
--label--iconstack-display: grid;
|
|
2502
2556
|
}
|
|
2503
2557
|
:where(label-view:not([label-style]):has(> :not([slot])):not(:has(> [slot=image]))) {
|
|
2504
2558
|
--label-style: title-only;
|
|
2505
|
-
--label--titlestack-display: grid;
|
|
2506
2559
|
}
|
|
2507
2560
|
}
|
|
2508
2561
|
@container style(--label-style: icon-only) and style(--label-flow: vertical) {
|
|
2509
2562
|
:where(label-view:not([label-style])) {
|
|
2510
2563
|
--label-style: icon-only;
|
|
2511
|
-
--label--iconstack-display: grid;
|
|
2512
2564
|
}
|
|
2513
2565
|
}
|
|
2514
2566
|
@container style(--label-style: title-only) and style(--label-flow: vertical) {
|
|
2515
2567
|
:where(label-view:not([label-style])) {
|
|
2516
2568
|
--label-style: title-only;
|
|
2517
|
-
--label--titlestack-display: grid;
|
|
2518
2569
|
}
|
|
2519
2570
|
}
|
|
2520
2571
|
@container style(--label-style: title-and-icon) and style(--label-flow: vertical) {
|
|
@@ -2524,20 +2575,14 @@
|
|
|
2524
2575
|
--label--host-grid-template-rows: auto minmax(0, 1fr);
|
|
2525
2576
|
--label--host-align-items: normal;
|
|
2526
2577
|
--label--host-justify-items: center;
|
|
2527
|
-
--label-gap: 0.3rem;
|
|
2528
|
-
--label--host-gap: var(--label-gap);
|
|
2529
|
-
--label--iconstack-display: grid;
|
|
2530
|
-
--label--titlestack-display: grid;
|
|
2531
2578
|
}
|
|
2532
2579
|
}
|
|
2533
2580
|
@container style(--label-flow: vertical) {
|
|
2534
2581
|
:where(label-view[label-style=icon-only]) {
|
|
2535
2582
|
--label-style: icon-only;
|
|
2536
|
-
--label--iconstack-display: grid;
|
|
2537
2583
|
}
|
|
2538
2584
|
:where(label-view[label-style=title-only]) {
|
|
2539
2585
|
--label-style: title-only;
|
|
2540
|
-
--label--titlestack-display: grid;
|
|
2541
2586
|
}
|
|
2542
2587
|
:where(label-view[label-style=title-and-icon]) {
|
|
2543
2588
|
--label-style: title-and-icon;
|
|
@@ -2545,10 +2590,6 @@
|
|
|
2545
2590
|
--label--host-grid-template-rows: auto minmax(0, 1fr);
|
|
2546
2591
|
--label--host-align-items: normal;
|
|
2547
2592
|
--label--host-justify-items: center;
|
|
2548
|
-
--label-gap: 0.3rem;
|
|
2549
|
-
--label--host-gap: var(--label-gap);
|
|
2550
|
-
--label--iconstack-display: grid;
|
|
2551
|
-
--label--titlestack-display: grid;
|
|
2552
2593
|
}
|
|
2553
2594
|
}
|
|
2554
2595
|
@container (not style(--label-style)) and style(--label-flow: vertical) {
|
|
@@ -2558,18 +2599,12 @@
|
|
|
2558
2599
|
--label--host-grid-template-rows: auto minmax(0, 1fr);
|
|
2559
2600
|
--label--host-align-items: normal;
|
|
2560
2601
|
--label--host-justify-items: center;
|
|
2561
|
-
--label-gap: 0.3rem;
|
|
2562
|
-
--label--host-gap: var(--label-gap);
|
|
2563
|
-
--label--iconstack-display: grid;
|
|
2564
|
-
--label--titlestack-display: grid;
|
|
2565
2602
|
}
|
|
2566
2603
|
:where(label-view:not([label-style]):has(> [slot=image]):not(:has(> :not([slot])))) {
|
|
2567
2604
|
--label-style: icon-only;
|
|
2568
|
-
--label--iconstack-display: grid;
|
|
2569
2605
|
}
|
|
2570
2606
|
:where(label-view:not([label-style]):has(> :not([slot])):not(:has(> [slot=image]))) {
|
|
2571
2607
|
--label-style: title-only;
|
|
2572
|
-
--label--titlestack-display: grid;
|
|
2573
2608
|
}
|
|
2574
2609
|
}
|
|
2575
2610
|
@container style(--label-line-limit: 1) {
|
|
@@ -4910,6 +4945,8 @@
|
|
|
4910
4945
|
color: var(--blue2);
|
|
4911
4946
|
}
|
|
4912
4947
|
:where([tint=gray]) {
|
|
4948
|
+
--accentColorEffective: var(--gray);
|
|
4949
|
+
--accentColorEffective4: var(--gray4);
|
|
4913
4950
|
--accentColor: var(--gray);
|
|
4914
4951
|
--accentColor2: var(--gray2);
|
|
4915
4952
|
--accentColor3: var(--gray3);
|
|
@@ -4920,6 +4957,8 @@
|
|
|
4920
4957
|
--accentSubtle: var(--gray4);
|
|
4921
4958
|
}
|
|
4922
4959
|
:where([tint=blue]) {
|
|
4960
|
+
--accentColorEffective: var(--blue);
|
|
4961
|
+
--accentColorEffective4: var(--blue4);
|
|
4923
4962
|
--accentColor: var(--blue);
|
|
4924
4963
|
--accentColor2: var(--blue2);
|
|
4925
4964
|
--accentColor3: var(--blue3);
|
|
@@ -4930,6 +4969,8 @@
|
|
|
4930
4969
|
--accentSubtle: var(--blue4);
|
|
4931
4970
|
}
|
|
4932
4971
|
:where([tint=red]) {
|
|
4972
|
+
--accentColorEffective: var(--red);
|
|
4973
|
+
--accentColorEffective4: var(--red4);
|
|
4933
4974
|
--accentColor: var(--red);
|
|
4934
4975
|
--accentColor2: var(--red2);
|
|
4935
4976
|
--accentColor3: var(--red3);
|
|
@@ -6692,6 +6733,19 @@
|
|
|
6692
6733
|
}
|
|
6693
6734
|
}
|
|
6694
6735
|
}
|
|
6736
|
+
@layer sw-transitions {
|
|
6737
|
+
@keyframes progressViewCircular {
|
|
6738
|
+
0% {
|
|
6739
|
+
opacity: 0.85;
|
|
6740
|
+
}
|
|
6741
|
+
50% {
|
|
6742
|
+
opacity: 0.25;
|
|
6743
|
+
}
|
|
6744
|
+
100% {
|
|
6745
|
+
opacity: 0.25;
|
|
6746
|
+
}
|
|
6747
|
+
}
|
|
6748
|
+
}
|
|
6695
6749
|
@layer sw-transitions {
|
|
6696
6750
|
@media (prefers-reduced-motion: no-preference) {
|
|
6697
6751
|
:where([is=glass-button]) {
|
|
@@ -7748,23 +7802,23 @@
|
|
|
7748
7802
|
--btnactivetext: light-dark(oklch(from var(--accentColor) max(calc(l * 0.5), 0) min(calc(c * 1.4), c) h), oklch(from var(--accentColor) min(calc(l * 1.3), 1) min(calc(c * 1.4), c) h));
|
|
7749
7803
|
}
|
|
7750
7804
|
:where([is=bordered-button]) {
|
|
7751
|
-
--btntext: var(--
|
|
7805
|
+
--btntext: var(--accentColorEffective, var(--accentColor));
|
|
7752
7806
|
--btnhighlighttext: light-dark(
|
|
7753
|
-
oklch(from var(--
|
|
7754
|
-
oklch(from var(--
|
|
7807
|
+
oklch(from var(--accentColorEffective, var(--accentColor)) max(calc(l * 0.7), 0) min(calc(c * 1.4), c) h),
|
|
7808
|
+
oklch(from var(--accentColorEffective, var(--accentColor)) min(calc(l * 1.2), 1) min(calc(c * 1.4), c) h)
|
|
7755
7809
|
);
|
|
7756
7810
|
--btnactivetext: light-dark(
|
|
7757
|
-
oklch(from var(--
|
|
7758
|
-
oklch(from var(--
|
|
7811
|
+
oklch(from var(--accentColorEffective, var(--accentColor)) max(calc(l * 0.5), 0) min(calc(c * 1.4), c) h),
|
|
7812
|
+
oklch(from var(--accentColorEffective, var(--accentColor)) min(calc(l * 1.3), 1) min(calc(c * 1.4), c) h)
|
|
7759
7813
|
);
|
|
7760
|
-
--btnface: light-dark(var(--
|
|
7814
|
+
--btnface: light-dark(var(--accentColorEffective4, oklch(from var(--accentColor4) l 0 h)), var(--accentColorEffective4, oklch(from var(--accentColor4) l 0 h)));
|
|
7761
7815
|
--btnhighlightface: light-dark(
|
|
7762
|
-
oklch(from var(--
|
|
7763
|
-
oklch(from var(--
|
|
7816
|
+
oklch(from var(--accentColorEffective4, oklch(from var(--accentColor4) l 0 h)) max(calc(l * 0.95), 0) min(calc(c * 1.8), c) h),
|
|
7817
|
+
oklch(from var(--accentColorEffective4, oklch(from var(--accentColor4) l 0 h)) min(calc(l * 1.2), 1) min(calc(c * 1.8), c) h)
|
|
7764
7818
|
);
|
|
7765
7819
|
--btnactiveface: light-dark(
|
|
7766
|
-
oklch(from var(--
|
|
7767
|
-
oklch(from var(--
|
|
7820
|
+
oklch(from var(--accentColorEffective4, oklch(from var(--accentColor4) l 0 h)) max(calc(l * 0.9), 0) min(calc(c * 1.8), c) h),
|
|
7821
|
+
oklch(from var(--accentColorEffective4, oklch(from var(--accentColor4) l 0 h)) min(calc(l * 1.3), 1) min(calc(c * 1.8), c) h)
|
|
7768
7822
|
);
|
|
7769
7823
|
}
|
|
7770
7824
|
:where([is=bordered-prominent-button]) {
|
|
@@ -7776,14 +7830,14 @@
|
|
|
7776
7830
|
--btnactiveface: light-dark(oklch(from var(--accentColor) max(calc(l * 0.8), 0) min(calc(c * 1.4), c) h), oklch(from var(--accentColor) min(calc(l * 1.2), 1) min(calc(c * 1.4), c) h));
|
|
7777
7831
|
}
|
|
7778
7832
|
:where([is=glass-button]) {
|
|
7779
|
-
--btntext: var(--
|
|
7833
|
+
--btntext: var(--accentColorEffective, var(--accentColor));
|
|
7780
7834
|
--btnhighlighttext: light-dark(
|
|
7781
|
-
oklch(from var(--
|
|
7782
|
-
oklch(from var(--
|
|
7835
|
+
oklch(from var(--accentColorEffective, var(--accentColor)) min(calc(l * 1.1), 1) min(calc(c * 1.1), c) h),
|
|
7836
|
+
oklch(from var(--accentColorEffective, var(--accentColor)) min(calc(l * 1.1), 1) min(calc(c * 1.1), c) h)
|
|
7783
7837
|
);
|
|
7784
7838
|
--btnactivetext: light-dark(
|
|
7785
|
-
oklch(from var(--
|
|
7786
|
-
oklch(from var(--
|
|
7839
|
+
oklch(from var(--accentColorEffective, var(--accentColor)) min(calc(l * 1.2), 1) min(calc(c * 1.1), c) h),
|
|
7840
|
+
oklch(from var(--accentColorEffective, var(--accentColor)) min(calc(l * 1.2), 1) min(calc(c * 1.1), c) h)
|
|
7787
7841
|
);
|
|
7788
7842
|
--btnface: light-dark(var(--clear-glass-bg), var(--clear-glass-bg-dark));
|
|
7789
7843
|
--btnhighlightface: light-dark(var(--clear-glass-focus-bg), var(--clear-glass-focus-bg-dark));
|
|
@@ -5,7 +5,6 @@ import { default as $ } from './cash';
|
|
|
5
5
|
import onoff from './onoff';
|
|
6
6
|
function renderPlaceholder(el, role) {
|
|
7
7
|
const label = el.querySelector(':scope>[slot=placeholder]') ?? el.appendChild($(`<label-view slot="placeholder"></label-view>`, '>1'));
|
|
8
|
-
console.log(9999999, el, role);
|
|
9
8
|
switch (role) {
|
|
10
9
|
case 'cancel':
|
|
11
10
|
label.setAttribute('title', I18n.t('ButtonRole').Default.Cancel);
|
package/package.json
CHANGED
package/scss/_components.scss
CHANGED