@swiftwc/ui 0.0.0-dev.23 → 0.0.0-dev.25
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/navigation-title.js +2 -2
- 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 +152 -63
- 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 +11 -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 +10 -0
- package/scss/components/_index.scss +2 -0
- package/scss/components/_label-view copy.scss.txt +420 -0
- package/scss/components/_label-view.scss +30 -94
- package/scss/components/_progress-view.scss +98 -0
- package/scss/transitions/_progress-view.scss +23 -0
- package/scss/utils/_index.scss +19 -10
- 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() {
|
|
@@ -34,8 +34,8 @@ export class NavigationTitle extends HTMLElement {
|
|
|
34
34
|
}
|
|
35
35
|
#render = (title, subtitle) => {
|
|
36
36
|
const el = this.querySelector(':scope>:not([slot])') ??
|
|
37
|
-
this.appendChild($(`<navigation-large-title><v-stack spacing="0" alignment="fill"
|
|
38
|
-
el.appendChild($(`<v-stack spacing="0" alignment="fill"
|
|
37
|
+
this.appendChild($(`<navigation-large-title><v-stack spacing="0" alignment="fill"><label-view line-limit="1" truncation-mode="tail" font="headline"></label-view><label-view line-limit="1" truncation-mode="tail" font="callout"></label-view></v-stack></navigation-large-title>`, '>1')), vStack = el.querySelector(':scope>v-stack') ??
|
|
38
|
+
el.appendChild($(`<v-stack spacing="0" alignment="fill"><label-view line-limit="1" truncation-mode="tail" font="headline"></label-view><label-view line-limit="1" truncation-mode="tail" font="callout"></label-view></v-stack>`, '>1'));
|
|
39
39
|
let titleLabel = vStack.querySelector(':scope>label-view:nth-child(1)');
|
|
40
40
|
if (title) {
|
|
41
41
|
titleLabel ??= vStack.appendChild($(`<label-view line-limit="1" truncation-mode="tail" font="headline"></label-view>`, '>1'));
|
|
@@ -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);
|
|
@@ -2178,6 +2264,12 @@
|
|
|
2178
2264
|
--accentColor5: var(--red5);
|
|
2179
2265
|
}
|
|
2180
2266
|
}
|
|
2267
|
+
@layer sw-colors {
|
|
2268
|
+
[is=bordered-prominent-button] {
|
|
2269
|
+
--secondary: var(--btntext);
|
|
2270
|
+
--blue: var(--btntext);
|
|
2271
|
+
}
|
|
2272
|
+
}
|
|
2181
2273
|
@layer sw-utils {
|
|
2182
2274
|
:where([is=bordered-prominent-button]) {
|
|
2183
2275
|
text-align: center;
|
|
@@ -2218,6 +2310,8 @@
|
|
|
2218
2310
|
--btnpadbend: var(--large-btn-padding);
|
|
2219
2311
|
}
|
|
2220
2312
|
:where([is=glass-button][role=destructive]) {
|
|
2313
|
+
--accentColorEffective: var(--red);
|
|
2314
|
+
--accentColorEffective4: var(--red4);
|
|
2221
2315
|
--accentColor: var(--red);
|
|
2222
2316
|
--accentColor2: var(--red2);
|
|
2223
2317
|
--accentColor3: var(--red3);
|
|
@@ -2265,6 +2359,8 @@
|
|
|
2265
2359
|
--btnpadbend: var(--large-btn-padding);
|
|
2266
2360
|
}
|
|
2267
2361
|
:where([is=glass-prominent-button][role=destructive]) {
|
|
2362
|
+
--accentColorEffective: var(--red);
|
|
2363
|
+
--accentColorEffective4: var(--red4);
|
|
2268
2364
|
--accentColor: var(--red);
|
|
2269
2365
|
--accentColor2: var(--red2);
|
|
2270
2366
|
--accentColor3: var(--red3);
|
|
@@ -2272,6 +2368,12 @@
|
|
|
2272
2368
|
--accentColor5: var(--red5);
|
|
2273
2369
|
}
|
|
2274
2370
|
}
|
|
2371
|
+
@layer sw-colors {
|
|
2372
|
+
[is=bordered-prominent-button] {
|
|
2373
|
+
--secondary: var(--btntext);
|
|
2374
|
+
--blue: var(--btntext);
|
|
2375
|
+
}
|
|
2376
|
+
}
|
|
2275
2377
|
@layer sw-utils {
|
|
2276
2378
|
:where([is=glass-prominent-button]) {
|
|
2277
2379
|
text-align: center;
|
|
@@ -2346,9 +2448,9 @@
|
|
|
2346
2448
|
}
|
|
2347
2449
|
}
|
|
2348
2450
|
@property --label-gap {
|
|
2349
|
-
syntax: "<
|
|
2451
|
+
syntax: "<number>";
|
|
2350
2452
|
inherits: false;
|
|
2351
|
-
initial-value: 0;
|
|
2453
|
+
initial-value: 0.3;
|
|
2352
2454
|
}
|
|
2353
2455
|
@property --label-image-size {
|
|
2354
2456
|
syntax: "<number>";
|
|
@@ -2367,31 +2469,10 @@
|
|
|
2367
2469
|
justify-items: var(--label--host-justify-items, );
|
|
2368
2470
|
grid-template-columns: var(--label--host-grid-template-columns, );
|
|
2369
2471
|
grid-template-rows: var(--label--host-grid-template-rows, );
|
|
2370
|
-
gap: var(--label
|
|
2472
|
+
gap: calc(var(--label-gap) * 1rem);
|
|
2371
2473
|
--label-imagestack-fontsize: calc(var(--label-image-size) * 1rem);
|
|
2372
2474
|
white-space: var(--label--host-white-space, );
|
|
2373
2475
|
}
|
|
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
2476
|
:where(label-view:has(> [slot=image])) {
|
|
2396
2477
|
--label--has-icon: yes;
|
|
2397
2478
|
}
|
|
@@ -2405,6 +2486,18 @@
|
|
|
2405
2486
|
-webkit-box-orient: var(--label--box-orient, );
|
|
2406
2487
|
line-clamp: var(--label--line-clamp, );
|
|
2407
2488
|
-webkit-line-clamp: var(--label--line-clamp, );
|
|
2489
|
+
text-decoration: underline;
|
|
2490
|
+
font-size: var(--label--titlestack-font-size, );
|
|
2491
|
+
line-height: var(--label--titlestack-line-height, );
|
|
2492
|
+
font-weight: var(--label--titlestack-font-weight, );
|
|
2493
|
+
display: var(--label--titlestack-display, none);
|
|
2494
|
+
}
|
|
2495
|
+
label-view > [slot=image] {
|
|
2496
|
+
aspect-ratio: 1/1;
|
|
2497
|
+
inline-size: var(--label-imagestack-fontsize);
|
|
2498
|
+
block-size: var(--label-imagestack-fontsize);
|
|
2499
|
+
font-size: var(--label-imagestack-fontsize);
|
|
2500
|
+
display: var(--label--iconstack-display, none);
|
|
2408
2501
|
}
|
|
2409
2502
|
@supports (x: if(else:red)) {
|
|
2410
2503
|
:where(label-view) {
|
|
@@ -2429,8 +2522,6 @@
|
|
|
2429
2522
|
style(--label-style: title-and-icon): if(style(--label-flow: vertical): auto minmax(0, 1fr) ; else: minmax(0, 1fr) ;) ;
|
|
2430
2523
|
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
2524
|
);
|
|
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
2525
|
--label--iconstack-display: if(
|
|
2435
2526
|
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
2527
|
);
|
|
@@ -2459,8 +2550,6 @@
|
|
|
2459
2550
|
--label--host-grid-template-rows: minmax(0, 1fr);
|
|
2460
2551
|
--label--host-align-items: center;
|
|
2461
2552
|
--label--host-justify-items: normal;
|
|
2462
|
-
--label-gap: 0.3rem;
|
|
2463
|
-
--label--host-gap: var(--label-gap);
|
|
2464
2553
|
--label--iconstack-display: grid;
|
|
2465
2554
|
--label--titlestack-display: grid;
|
|
2466
2555
|
}
|
|
@@ -2479,8 +2568,6 @@
|
|
|
2479
2568
|
--label--host-grid-template-rows: minmax(0, 1fr);
|
|
2480
2569
|
--label--host-align-items: center;
|
|
2481
2570
|
--label--host-justify-items: normal;
|
|
2482
|
-
--label-gap: 0.3rem;
|
|
2483
|
-
--label--host-gap: var(--label-gap);
|
|
2484
2571
|
--label--iconstack-display: grid;
|
|
2485
2572
|
--label--titlestack-display: grid;
|
|
2486
2573
|
}
|
|
@@ -2491,8 +2578,6 @@
|
|
|
2491
2578
|
--label--host-grid-template-rows: minmax(0, 1fr);
|
|
2492
2579
|
--label--host-align-items: center;
|
|
2493
2580
|
--label--host-justify-items: normal;
|
|
2494
|
-
--label-gap: 0.3rem;
|
|
2495
|
-
--label--host-gap: var(--label-gap);
|
|
2496
2581
|
--label--iconstack-display: grid;
|
|
2497
2582
|
--label--titlestack-display: grid;
|
|
2498
2583
|
}
|
|
@@ -2524,8 +2609,6 @@
|
|
|
2524
2609
|
--label--host-grid-template-rows: auto minmax(0, 1fr);
|
|
2525
2610
|
--label--host-align-items: normal;
|
|
2526
2611
|
--label--host-justify-items: center;
|
|
2527
|
-
--label-gap: 0.3rem;
|
|
2528
|
-
--label--host-gap: var(--label-gap);
|
|
2529
2612
|
--label--iconstack-display: grid;
|
|
2530
2613
|
--label--titlestack-display: grid;
|
|
2531
2614
|
}
|
|
@@ -2545,8 +2628,6 @@
|
|
|
2545
2628
|
--label--host-grid-template-rows: auto minmax(0, 1fr);
|
|
2546
2629
|
--label--host-align-items: normal;
|
|
2547
2630
|
--label--host-justify-items: center;
|
|
2548
|
-
--label-gap: 0.3rem;
|
|
2549
|
-
--label--host-gap: var(--label-gap);
|
|
2550
2631
|
--label--iconstack-display: grid;
|
|
2551
2632
|
--label--titlestack-display: grid;
|
|
2552
2633
|
}
|
|
@@ -2558,8 +2639,6 @@
|
|
|
2558
2639
|
--label--host-grid-template-rows: auto minmax(0, 1fr);
|
|
2559
2640
|
--label--host-align-items: normal;
|
|
2560
2641
|
--label--host-justify-items: center;
|
|
2561
|
-
--label-gap: 0.3rem;
|
|
2562
|
-
--label--host-gap: var(--label-gap);
|
|
2563
2642
|
--label--iconstack-display: grid;
|
|
2564
2643
|
--label--titlestack-display: grid;
|
|
2565
2644
|
}
|
|
@@ -4910,35 +4989,32 @@
|
|
|
4910
4989
|
color: var(--blue2);
|
|
4911
4990
|
}
|
|
4912
4991
|
:where([tint=gray]) {
|
|
4992
|
+
--accentColorEffective: var(--gray);
|
|
4993
|
+
--accentColorEffective4: var(--gray4);
|
|
4913
4994
|
--accentColor: var(--gray);
|
|
4914
4995
|
--accentColor2: var(--gray2);
|
|
4915
4996
|
--accentColor3: var(--gray3);
|
|
4916
4997
|
--accentColor4: var(--gray4);
|
|
4917
4998
|
--accentColor5: var(--gray5);
|
|
4918
4999
|
}
|
|
4919
|
-
:where([tint=gray][is=bordered-button]) {
|
|
4920
|
-
--accentSubtle: var(--gray4);
|
|
4921
|
-
}
|
|
4922
5000
|
:where([tint=blue]) {
|
|
5001
|
+
--accentColorEffective: var(--blue);
|
|
5002
|
+
--accentColorEffective4: var(--blue4);
|
|
4923
5003
|
--accentColor: var(--blue);
|
|
4924
5004
|
--accentColor2: var(--blue2);
|
|
4925
5005
|
--accentColor3: var(--blue3);
|
|
4926
5006
|
--accentColor4: var(--blue4);
|
|
4927
5007
|
--accentColor5: var(--blue5);
|
|
4928
5008
|
}
|
|
4929
|
-
:where([tint=blue][is=bordered-button]) {
|
|
4930
|
-
--accentSubtle: var(--blue4);
|
|
4931
|
-
}
|
|
4932
5009
|
:where([tint=red]) {
|
|
5010
|
+
--accentColorEffective: var(--red);
|
|
5011
|
+
--accentColorEffective4: var(--red4);
|
|
4933
5012
|
--accentColor: var(--red);
|
|
4934
5013
|
--accentColor2: var(--red2);
|
|
4935
5014
|
--accentColor3: var(--red3);
|
|
4936
5015
|
--accentColor4: var(--red4);
|
|
4937
5016
|
--accentColor5: var(--red5);
|
|
4938
5017
|
}
|
|
4939
|
-
:where([tint=red][is=bordered-button]) {
|
|
4940
|
-
--accentSubtle: var(--red4);
|
|
4941
|
-
}
|
|
4942
5018
|
}
|
|
4943
5019
|
@layer sw-utils {
|
|
4944
5020
|
:where([frame\:width=infinity]) {
|
|
@@ -6692,6 +6768,19 @@
|
|
|
6692
6768
|
}
|
|
6693
6769
|
}
|
|
6694
6770
|
}
|
|
6771
|
+
@layer sw-transitions {
|
|
6772
|
+
@keyframes progressViewCircular {
|
|
6773
|
+
0% {
|
|
6774
|
+
opacity: 0.85;
|
|
6775
|
+
}
|
|
6776
|
+
50% {
|
|
6777
|
+
opacity: 0.25;
|
|
6778
|
+
}
|
|
6779
|
+
100% {
|
|
6780
|
+
opacity: 0.25;
|
|
6781
|
+
}
|
|
6782
|
+
}
|
|
6783
|
+
}
|
|
6695
6784
|
@layer sw-transitions {
|
|
6696
6785
|
@media (prefers-reduced-motion: no-preference) {
|
|
6697
6786
|
:where([is=glass-button]) {
|
|
@@ -7748,23 +7837,23 @@
|
|
|
7748
7837
|
--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
7838
|
}
|
|
7750
7839
|
:where([is=bordered-button]) {
|
|
7751
|
-
--btntext: var(--
|
|
7840
|
+
--btntext: var(--accentColorEffective, var(--accentColor));
|
|
7752
7841
|
--btnhighlighttext: light-dark(
|
|
7753
|
-
oklch(from var(--
|
|
7754
|
-
oklch(from var(--
|
|
7842
|
+
oklch(from var(--accentColorEffective, var(--accentColor)) max(calc(l * 0.7), 0) min(calc(c * 1.4), c) h),
|
|
7843
|
+
oklch(from var(--accentColorEffective, var(--accentColor)) min(calc(l * 1.2), 1) min(calc(c * 1.4), c) h)
|
|
7755
7844
|
);
|
|
7756
7845
|
--btnactivetext: light-dark(
|
|
7757
|
-
oklch(from var(--
|
|
7758
|
-
oklch(from var(--
|
|
7846
|
+
oklch(from var(--accentColorEffective, var(--accentColor)) max(calc(l * 0.5), 0) min(calc(c * 1.4), c) h),
|
|
7847
|
+
oklch(from var(--accentColorEffective, var(--accentColor)) min(calc(l * 1.3), 1) min(calc(c * 1.4), c) h)
|
|
7759
7848
|
);
|
|
7760
|
-
--btnface: light-dark(var(--
|
|
7849
|
+
--btnface: light-dark(var(--accentColorEffective4, oklch(from var(--accentColor4) l 0 h)), var(--accentColorEffective4, oklch(from var(--accentColor4) l 0 h)));
|
|
7761
7850
|
--btnhighlightface: light-dark(
|
|
7762
|
-
oklch(from var(--
|
|
7763
|
-
oklch(from var(--
|
|
7851
|
+
oklch(from var(--accentColorEffective4, oklch(from var(--accentColor4) l 0 h)) max(calc(l * 0.95), 0) min(calc(c * 1.8), c) h),
|
|
7852
|
+
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
7853
|
);
|
|
7765
7854
|
--btnactiveface: light-dark(
|
|
7766
|
-
oklch(from var(--
|
|
7767
|
-
oklch(from var(--
|
|
7855
|
+
oklch(from var(--accentColorEffective4, oklch(from var(--accentColor4) l 0 h)) max(calc(l * 0.9), 0) min(calc(c * 1.8), c) h),
|
|
7856
|
+
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
7857
|
);
|
|
7769
7858
|
}
|
|
7770
7859
|
:where([is=bordered-prominent-button]) {
|
|
@@ -7776,14 +7865,14 @@
|
|
|
7776
7865
|
--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
7866
|
}
|
|
7778
7867
|
:where([is=glass-button]) {
|
|
7779
|
-
--btntext: var(--
|
|
7868
|
+
--btntext: var(--accentColorEffective, var(--accentColor));
|
|
7780
7869
|
--btnhighlighttext: light-dark(
|
|
7781
|
-
oklch(from var(--
|
|
7782
|
-
oklch(from var(--
|
|
7870
|
+
oklch(from var(--accentColorEffective, var(--accentColor)) min(calc(l * 1.1), 1) min(calc(c * 1.1), c) h),
|
|
7871
|
+
oklch(from var(--accentColorEffective, var(--accentColor)) min(calc(l * 1.1), 1) min(calc(c * 1.1), c) h)
|
|
7783
7872
|
);
|
|
7784
7873
|
--btnactivetext: light-dark(
|
|
7785
|
-
oklch(from var(--
|
|
7786
|
-
oklch(from var(--
|
|
7874
|
+
oklch(from var(--accentColorEffective, var(--accentColor)) min(calc(l * 1.2), 1) min(calc(c * 1.1), c) h),
|
|
7875
|
+
oklch(from var(--accentColorEffective, var(--accentColor)) min(calc(l * 1.2), 1) min(calc(c * 1.1), c) h)
|
|
7787
7876
|
);
|
|
7788
7877
|
--btnface: light-dark(var(--clear-glass-bg), var(--clear-glass-bg-dark));
|
|
7789
7878
|
--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
package/scss/_transitions.scss
CHANGED