@swiftwc/ui 0.0.0-dev.20 → 0.0.0-dev.21
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/buses/alert-dialog.d.ts +2 -0
- package/generated/buses/alert-dialog.js +1 -0
- package/generated/buses/confirmation-dialog.d.ts +2 -0
- package/generated/buses/confirmation-dialog.js +1 -0
- package/generated/buses/index.d.ts +6 -0
- package/generated/buses/index.js +6 -0
- package/generated/buses/lifecycle-observer.d.ts +2 -0
- package/generated/buses/lifecycle-observer.js +1 -0
- package/generated/client/index.d.ts +17 -4
- package/generated/client/index.js +83 -32
- package/generated/components/alert-dialog.d.ts +8 -0
- package/generated/components/alert-dialog.js +94 -0
- package/generated/components/bordered-button.d.ts +2 -0
- package/generated/components/bordered-button.js +15 -1
- package/generated/components/bordered-prominent-button.d.ts +2 -0
- package/generated/components/bordered-prominent-button.js +15 -1
- package/generated/components/borderless-button.d.ts +1 -1
- package/generated/components/borderless-button.js +6 -7
- package/generated/components/confirmation-dialog.d.ts +1 -1
- package/generated/components/confirmation-dialog.js +26 -20
- package/generated/components/content-unavailable-view.js +2 -2
- package/generated/components/date-picker.js +14 -6
- package/generated/components/disclosure-group.js +4 -1
- package/generated/components/glass-button.d.ts +2 -0
- package/generated/components/glass-button.js +15 -1
- package/generated/components/glass-prominent-button.d.ts +2 -0
- package/generated/components/glass-prominent-button.js +15 -1
- package/generated/components/index.d.ts +1 -0
- package/generated/components/index.js +1 -0
- package/generated/components/label-view.js +3 -3
- package/generated/components/menu-view.js +12 -7
- package/generated/components/navigation-title.js +4 -4
- package/generated/components/picker-view.js +16 -10
- package/generated/components/scroll-view.js +19 -10
- package/generated/components/section-view.js +3 -3
- package/generated/components/sheet-view.d.ts +1 -1
- package/generated/components/sheet-view.js +21 -17
- package/generated/components/sidebar-toggle.js +5 -3
- package/generated/components/sidebar-view.js +10 -4
- package/generated/components/sticky-container.js +3 -1
- package/generated/components/tab-bar.js +10 -4
- package/generated/components/tab-item.js +3 -1
- package/generated/components/tab-view.js +4 -1
- package/generated/components/table-view.js +11 -5
- package/generated/components/text-field.js +28 -28
- package/generated/components/tool-bar-item-group.d.ts +2 -0
- package/generated/components/tool-bar-item-group.js +28 -0
- package/generated/components/tool-bar-item.d.ts +2 -0
- package/generated/components/tool-bar-item.js +32 -2
- package/generated/components/tool-bar.js +1 -1
- package/generated/components/v-stack.d.ts +5 -0
- package/generated/components/v-stack.js +5 -0
- package/generated/css/index.css +128 -37
- package/generated/events/alert-dialog.d.ts +8 -0
- package/generated/events/alert-dialog.js +1 -0
- package/generated/events/confirmation-dialog.d.ts +2 -2
- package/generated/events/index.d.ts +1 -0
- package/generated/events/index.js +1 -0
- package/generated/i18n/locales/el.d.ts +9 -0
- package/generated/i18n/locales/el.js +9 -0
- package/generated/i18n/locales/en.d.ts +9 -0
- package/generated/i18n/locales/en.js +9 -0
- package/generated/internal/class/form-associated-base.js +4 -1
- package/generated/internal/class/navigation-view.js +4 -4
- package/generated/internal/utils/button-role.d.ts +1 -0
- package/generated/internal/utils/button-role.js +19 -0
- package/generated/internal/utils/cash/index.d.ts +4 -3
- package/generated/internal/utils/cash/index.js +6 -4
- package/generated/internal/utils/index.d.ts +3 -0
- package/generated/internal/utils/index.js +3 -0
- package/generated/internal/utils/is-inside.d.ts +1 -0
- package/generated/internal/utils/is-inside.js +4 -0
- package/generated/internal/utils/list-active.js +15 -5
- package/generated/internal/utils/toolbar-repositioner.d.ts +1 -0
- package/generated/internal/utils/toolbar-repositioner.js +12 -0
- package/generated/snapshot/index.d.ts +2 -0
- package/generated/snapshot/index.js +21 -0
- package/package.json +7 -4
- package/scss/_components.scss +2 -0
- package/scss/_functions.scss +10 -0
- package/scss/_transitions.scss +1 -0
- package/scss/colors/_index.scss +2 -2
- package/scss/components/_alert-dialog.scss +106 -0
- package/scss/components/_confirmation-dialog.scss +39 -39
- package/scss/components/_h-stack.scss +3 -13
- package/scss/components/_index.scss +1 -0
- package/scss/components/_sheet-view.scss +11 -1
- package/scss/components/_v-stack.scss +3 -13
- package/scss/final/_touch-glass.scss +7 -0
- package/scss/mixins/_index.scss +17 -0
- package/scss/placeholders/_buttons.scss +42 -0
- package/scss/transitions/_alert-dialog.scss +19 -0
- package/scss/utils/_frame.scss +7 -0
- package/web-components.html-data/en.json +84 -7
- package/generated/confirmation-dialog/index.d.ts +0 -1
- package/generated/confirmation-dialog/index.js +0 -1
- package/generated/lifecycle-observer/index.d.ts +0 -1
- package/generated/lifecycle-observer/index.js +0 -1
- package/scss/components/_components.scss +0 -76
|
@@ -39,7 +39,7 @@ export class TableView extends HTMLElement {
|
|
|
39
39
|
<slot name="footer-trailing"></slot>
|
|
40
40
|
</div>
|
|
41
41
|
</div>
|
|
42
|
-
</div
|
|
42
|
+
</div>`));
|
|
43
43
|
}
|
|
44
44
|
#shadowRoot;
|
|
45
45
|
#colSlot;
|
|
@@ -103,7 +103,10 @@ export class TableView extends HTMLElement {
|
|
|
103
103
|
}
|
|
104
104
|
#handleSlotchange = (evt) => {
|
|
105
105
|
console.debug(`${_a.name} ⚡️ ${evt?.type}`);
|
|
106
|
-
const slot = evt.target
|
|
106
|
+
const slot = evt.target instanceof HTMLSlotElement && evt.target;
|
|
107
|
+
if (!slot)
|
|
108
|
+
return;
|
|
109
|
+
const assigned = slot.assignedElements({ flatten: true });
|
|
107
110
|
observers.syncObservations(this.#trackedElements, assigned, this.#handleTagMutation);
|
|
108
111
|
if (0 < assigned.length)
|
|
109
112
|
this.#handleTagMutation();
|
|
@@ -116,7 +119,7 @@ export class TableView extends HTMLElement {
|
|
|
116
119
|
// for (const el of sourceSlot?.assignedElements({ flatten: true }) ?? []) menu.insertAdjacentElement('beforeend', TableView.wrapTag(el, sourceSlot?.name))
|
|
117
120
|
//
|
|
118
121
|
if (!this.#compactToolbarItem) {
|
|
119
|
-
this.#compactToolbarItem = $(`<menu-view tabindex="0" slot="header-trailing"></menu-view
|
|
122
|
+
this.#compactToolbarItem = $(`<menu-view tabindex="0" slot="header-trailing"></menu-view>`, '>1');
|
|
120
123
|
CleanupRegistry.unregister(this, 'compact_toolbar');
|
|
121
124
|
CleanupRegistry.register(this, onoff('click', this.#handleMenuClick, this.#compactToolbarItem).on(), 'compact_toolbar');
|
|
122
125
|
}
|
|
@@ -129,7 +132,7 @@ export class TableView extends HTMLElement {
|
|
|
129
132
|
<label-view></label-view>
|
|
130
133
|
<label-view font="callout" foreground="secondary"></label-view>
|
|
131
134
|
</v-stack>
|
|
132
|
-
</button
|
|
135
|
+
</button>`, '>1'), title = btn.querySelector('label-view:first-child'), subTitle = btn.querySelector('label-view:last-child');
|
|
133
136
|
title?.setAttribute('title', node.textContent.trim());
|
|
134
137
|
subTitle?.setAttribute('title', node.ariaSort ?? '');
|
|
135
138
|
this.#compactToolbarItem.appendChild(btn);
|
|
@@ -164,7 +167,10 @@ export class TableView extends HTMLElement {
|
|
|
164
167
|
}
|
|
165
168
|
};
|
|
166
169
|
#handleMenuClick = (evt) => {
|
|
167
|
-
const
|
|
170
|
+
const target = evt.target instanceof HTMLElement && evt.target;
|
|
171
|
+
if (!target)
|
|
172
|
+
return;
|
|
173
|
+
const btn = target.closest('button');
|
|
168
174
|
if (!btn)
|
|
169
175
|
return;
|
|
170
176
|
const siblings = [...(btn.parentNode?.querySelectorAll(':scope>button') ?? [])];
|
|
@@ -23,7 +23,7 @@ export class TextField extends FormAssociatedBase {
|
|
|
23
23
|
<input type="text" part="root input text-field-form-input">
|
|
24
24
|
</div>
|
|
25
25
|
<slot name="validity-options" hidden></slot>
|
|
26
|
-
</label
|
|
26
|
+
</label>`));
|
|
27
27
|
}
|
|
28
28
|
#shadowRoot;
|
|
29
29
|
// #internals: ElementInternals
|
|
@@ -137,7 +137,7 @@ export class TextField extends FormAssociatedBase {
|
|
|
137
137
|
case 'label':
|
|
138
138
|
let label = this.querySelector(':scope>[slot=label]');
|
|
139
139
|
if (newValue) {
|
|
140
|
-
label ??= this.appendChild($(`<span slot="label" foreground="secondary"></span
|
|
140
|
+
label ??= this.appendChild($(`<span slot="label" foreground="secondary"></span>`, '>1'));
|
|
141
141
|
label.textContent = newValue;
|
|
142
142
|
}
|
|
143
143
|
else
|
|
@@ -217,7 +217,7 @@ export class TextField extends FormAssociatedBase {
|
|
|
217
217
|
};
|
|
218
218
|
#handleInputPaste = (evt) => {
|
|
219
219
|
console.debug(`${_a.name} ⚡️ ${evt?.type}`);
|
|
220
|
-
const input = evt.target;
|
|
220
|
+
const input = evt.target instanceof HTMLInputElement && evt.target;
|
|
221
221
|
if (!input)
|
|
222
222
|
return;
|
|
223
223
|
evt.preventDefault();
|
|
@@ -287,40 +287,40 @@ export class TextField extends FormAssociatedBase {
|
|
|
287
287
|
const allowedSignsRegex2 = /^[+-]?$|^[+-]?(\d+([.,]\d*)?|[.,]\d*)$/, // allow single '+' or '-', then allow only one ',' or '.' and finally only digits
|
|
288
288
|
digitsDecimalsOnlyRegex = /^(\d+([.,]\d*)?|[.,]\d*)?$/; // allow only one ',' or '.' and finally only digits
|
|
289
289
|
return (this.negativeNumbersAllowed ? allowedSignsRegex2 : digitsDecimalsOnlyRegex).test(str);
|
|
290
|
-
// //
|
|
291
|
-
// //
|
|
292
|
-
// //
|
|
293
|
-
// //
|
|
294
|
-
// //
|
|
295
|
-
// //
|
|
296
|
-
// //
|
|
297
|
-
// //
|
|
298
|
-
// //
|
|
299
|
-
// //
|
|
300
|
-
// //
|
|
301
|
-
// //
|
|
302
|
-
// //
|
|
303
|
-
// //
|
|
290
|
+
// // isValidDecimal(""); // true
|
|
291
|
+
// // isValidDecimal("+"); // true
|
|
292
|
+
// // isValidDecimal("-"); // true
|
|
293
|
+
// // isValidDecimal("123"); // true
|
|
294
|
+
// // isValidDecimal("+123"); // true
|
|
295
|
+
// // isValidDecimal("-456"); // true
|
|
296
|
+
// // isValidDecimal("12.34"); // true
|
|
297
|
+
// // isValidDecimal("-0,56"); // true
|
|
298
|
+
// // isValidDecimal(".78"); // true
|
|
299
|
+
// // isValidDecimal(",9"); // true
|
|
300
|
+
// // isValidDecimal("12.3.4"); // false
|
|
301
|
+
// // isValidDecimal("12,3,4"); // false
|
|
302
|
+
// // isValidDecimal("12-3"); // false
|
|
303
|
+
// // isValidDecimal("12a"); // false
|
|
304
304
|
case 'number-pad':
|
|
305
305
|
const allowedSignsRegex = /^([+-]|\d+|[+-]\d+)?$/, // allow single '+' or '-', then allow only digits
|
|
306
306
|
digitsOnlyRegex = /^(\d+)?$/; // allow only digits
|
|
307
307
|
return (this.negativeNumbersAllowed ? allowedSignsRegex : digitsOnlyRegex).test(str);
|
|
308
|
-
// //
|
|
309
|
-
// //
|
|
310
|
-
// //
|
|
311
|
-
// //
|
|
312
|
-
// //
|
|
313
|
-
// //
|
|
314
|
-
// //
|
|
315
|
-
// //
|
|
316
|
-
// //
|
|
308
|
+
// // isValidInteger(""); // true
|
|
309
|
+
// // isValidInteger("+"); // true
|
|
310
|
+
// // isValidInteger("-"); // true
|
|
311
|
+
// // isValidInteger("123"); // true
|
|
312
|
+
// // isValidInteger("+123"); // true
|
|
313
|
+
// // isValidInteger("-456"); // true
|
|
314
|
+
// // isValidInteger("12-3"); // false
|
|
315
|
+
// // isValidInteger("++123"); // false
|
|
316
|
+
// // isValidInteger("123a"); // false
|
|
317
317
|
default:
|
|
318
318
|
return true;
|
|
319
319
|
}
|
|
320
320
|
};
|
|
321
321
|
#handleInputBeforeinput = (evt) => {
|
|
322
322
|
console.debug(`${_a.name} ⚡️ ${evt?.type}`);
|
|
323
|
-
const input = evt.target;
|
|
323
|
+
const input = evt.target instanceof HTMLInputElement && evt.target;
|
|
324
324
|
if (!input)
|
|
325
325
|
return;
|
|
326
326
|
if ('insertText' !== evt.inputType)
|
|
@@ -355,7 +355,7 @@ export class TextField extends FormAssociatedBase {
|
|
|
355
355
|
};
|
|
356
356
|
#handleInputBlur = (evt) => {
|
|
357
357
|
console.debug(`${_a.name} ⚡️ ${evt?.type}`);
|
|
358
|
-
const input = evt.target;
|
|
358
|
+
const input = evt.target instanceof HTMLInputElement && evt.target;
|
|
359
359
|
if (!input)
|
|
360
360
|
return;
|
|
361
361
|
if (0 === input.value.length)
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export declare class ToolBarItemGroup extends HTMLElement {
|
|
2
|
+
static get observedAttributes(): string[];
|
|
2
3
|
constructor();
|
|
3
4
|
connectedCallback(): void;
|
|
4
5
|
disconnectedCallback(): void;
|
|
6
|
+
attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
|
|
5
7
|
}
|
|
@@ -1,11 +1,39 @@
|
|
|
1
|
+
import { CleanupRegistry } from '../internal/class/cleanup-registry';
|
|
2
|
+
import { onoff, toolbarRepositioner } from '../internal/utils';
|
|
3
|
+
import { Snapshot } from '../snapshot';
|
|
1
4
|
export class ToolBarItemGroup extends HTMLElement {
|
|
5
|
+
static get observedAttributes() {
|
|
6
|
+
return ['preferred-fine-modal-placement'];
|
|
7
|
+
}
|
|
2
8
|
constructor() {
|
|
3
9
|
super();
|
|
4
10
|
}
|
|
5
11
|
connectedCallback() {
|
|
6
12
|
console.debug(`${ToolBarItemGroup.name} ⚡️ connect`);
|
|
13
|
+
if (!this.closest('[is=sheet-view]'))
|
|
14
|
+
return;
|
|
15
|
+
const handler1 = toolbarRepositioner.bind(null, this);
|
|
16
|
+
CleanupRegistry.register(this, onoff('fine_dialog_sheet:change', handler1, Snapshot.on).on());
|
|
17
|
+
Snapshot.waitReady.then(() => {
|
|
18
|
+
toolbarRepositioner(this, new MediaQueryListEvent(`media-change`, {
|
|
19
|
+
matches: Snapshot.breakpoints?.get('fine_dialog_sheet'),
|
|
20
|
+
})); // Initial check
|
|
21
|
+
});
|
|
7
22
|
}
|
|
8
23
|
disconnectedCallback() {
|
|
9
24
|
console.debug(`${ToolBarItemGroup.name} ⚡️ disconnect`);
|
|
25
|
+
CleanupRegistry.unregister(this);
|
|
26
|
+
}
|
|
27
|
+
attributeChangedCallback(name, oldValue, newValue) {
|
|
28
|
+
console.debug(`${ToolBarItemGroup.name} ⚡️ attr-change [${name}] ("${oldValue}" → "${newValue}")`);
|
|
29
|
+
switch (name) {
|
|
30
|
+
case 'preferred-fine-modal-placement':
|
|
31
|
+
Snapshot.waitReady.then(() => {
|
|
32
|
+
toolbarRepositioner(this, new MediaQueryListEvent(`media-change`, {
|
|
33
|
+
matches: Snapshot.breakpoints?.get('fine_dialog_sheet'),
|
|
34
|
+
})); // Initial check
|
|
35
|
+
});
|
|
36
|
+
break;
|
|
37
|
+
}
|
|
10
38
|
}
|
|
11
39
|
}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export declare class ToolBarItem extends HTMLElement {
|
|
2
|
+
static get observedAttributes(): string[];
|
|
2
3
|
constructor();
|
|
3
4
|
connectedCallback(): void;
|
|
4
5
|
disconnectedCallback(): void;
|
|
6
|
+
attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
|
|
5
7
|
}
|
|
@@ -1,19 +1,49 @@
|
|
|
1
1
|
import { CleanupRegistry } from '../internal/class/cleanup-registry';
|
|
2
|
-
import { onoff, touchGlass } from '../internal/utils';
|
|
2
|
+
import { onoff, toolbarRepositioner, touchGlass } from '../internal/utils';
|
|
3
|
+
import { Snapshot } from '../snapshot';
|
|
3
4
|
export class ToolBarItem extends HTMLElement {
|
|
5
|
+
static get observedAttributes() {
|
|
6
|
+
return ['preferred-fine-modal-placement'];
|
|
7
|
+
}
|
|
4
8
|
constructor() {
|
|
5
9
|
super();
|
|
6
10
|
}
|
|
7
11
|
connectedCallback() {
|
|
8
12
|
console.debug(`${ToolBarItem.name} ⚡️ connect`);
|
|
9
13
|
CleanupRegistry.register(this, onoff(touchGlass(this, (t) => t.closest('tool-bar-item-group') ?? t, (evt) => {
|
|
10
|
-
|
|
14
|
+
const target = evt.target instanceof HTMLElement && evt.target;
|
|
15
|
+
if (!target)
|
|
16
|
+
return true;
|
|
17
|
+
if (target.closest('menu-view[open]'))
|
|
11
18
|
return false;
|
|
12
19
|
return true;
|
|
13
20
|
}), this).on());
|
|
21
|
+
if (this.closest('tool-bar-item-group'))
|
|
22
|
+
return;
|
|
23
|
+
if (!this.closest('[is=sheet-view]'))
|
|
24
|
+
return;
|
|
25
|
+
const handler1 = toolbarRepositioner.bind(null, this);
|
|
26
|
+
CleanupRegistry.register(this, onoff('fine_dialog_sheet:change', handler1, Snapshot.on).on());
|
|
27
|
+
Snapshot.waitReady.then(() => {
|
|
28
|
+
toolbarRepositioner(this, new MediaQueryListEvent(`media-change`, {
|
|
29
|
+
matches: Snapshot.breakpoints?.get('fine_dialog_sheet'),
|
|
30
|
+
})); // Initial check
|
|
31
|
+
});
|
|
14
32
|
}
|
|
15
33
|
disconnectedCallback() {
|
|
16
34
|
console.debug(`${ToolBarItem.name} ⚡️ disconnect`);
|
|
17
35
|
CleanupRegistry.unregister(this);
|
|
18
36
|
}
|
|
37
|
+
attributeChangedCallback(name, oldValue, newValue) {
|
|
38
|
+
console.debug(`${ToolBarItem.name} ⚡️ attr-change [${name}] ("${oldValue}" → "${newValue}")`);
|
|
39
|
+
switch (name) {
|
|
40
|
+
case 'preferred-fine-modal-placement':
|
|
41
|
+
Snapshot.waitReady.then(() => {
|
|
42
|
+
toolbarRepositioner(this, new MediaQueryListEvent(`media-change`, {
|
|
43
|
+
matches: Snapshot.breakpoints?.get('fine_dialog_sheet'),
|
|
44
|
+
})); // Initial check
|
|
45
|
+
});
|
|
46
|
+
break;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
19
49
|
}
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @attr {leading|"leading fill"|center|trailing|fill|space-between} distribution - The distribution of cols
|
|
3
|
+
*
|
|
4
|
+
* @attr {"auto spacer"|"auto auto spacer"|"auto auto auto spacer"} template
|
|
5
|
+
*/
|
|
1
6
|
export declare class VStack extends HTMLElement {
|
|
2
7
|
constructor();
|
|
3
8
|
connectedCallback(): void;
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @attr {leading|"leading fill"|center|trailing|fill|space-between} distribution - The distribution of cols
|
|
3
|
+
*
|
|
4
|
+
* @attr {"auto spacer"|"auto auto spacer"|"auto auto auto spacer"} template
|
|
5
|
+
*/
|
|
1
6
|
export class VStack extends HTMLElement {
|
|
2
7
|
constructor() {
|
|
3
8
|
super();
|
package/generated/css/index.css
CHANGED
|
@@ -871,6 +871,7 @@
|
|
|
871
871
|
:where([is=glass-prominent-button], [is=glass-button], [is=bordered-prominent-button], [is=bordered-button], [is=borderless-button], [is=plain-button]) {
|
|
872
872
|
place-items: center;
|
|
873
873
|
place-content: center;
|
|
874
|
+
position: relative;
|
|
874
875
|
appearance: none;
|
|
875
876
|
-webkit-appearance: none;
|
|
876
877
|
border: var(--btnborder,);
|
|
@@ -888,6 +889,21 @@
|
|
|
888
889
|
--btnradiusbl: var(--regular-btn-border-radius);
|
|
889
890
|
--btnradiusbr: var(--regular-btn-border-radius);
|
|
890
891
|
}
|
|
892
|
+
:where([is=glass-prominent-button]:has(> [slot=overlay]) > *:not([slot=overlay]), [is=glass-button]:has(> [slot=overlay]) > *:not([slot=overlay]), [is=bordered-prominent-button]:has(> [slot=overlay]) > *:not([slot=overlay]), [is=bordered-button]:has(> [slot=overlay]) > *:not([slot=overlay]), [is=borderless-button]:has(> [slot=overlay]) > *:not([slot=overlay]), [is=plain-button]:has(> [slot=overlay]) > *:not([slot=overlay])) {
|
|
893
|
+
opacity: 0;
|
|
894
|
+
}
|
|
895
|
+
:where([is=glass-prominent-button]:has(> [slot=overlay]) > [slot=overlay], [is=glass-button]:has(> [slot=overlay]) > [slot=overlay], [is=bordered-prominent-button]:has(> [slot=overlay]) > [slot=overlay], [is=bordered-button]:has(> [slot=overlay]) > [slot=overlay], [is=borderless-button]:has(> [slot=overlay]) > [slot=overlay], [is=plain-button]:has(> [slot=overlay]) > [slot=overlay]) {
|
|
896
|
+
position: absolute;
|
|
897
|
+
transition: opacity ease-out 200ms;
|
|
898
|
+
max-inline-size: 90%;
|
|
899
|
+
max-block-size: 90%;
|
|
900
|
+
border-radius: inherit;
|
|
901
|
+
}
|
|
902
|
+
@starting-style {
|
|
903
|
+
:where([is=glass-prominent-button]:has(> [slot=overlay]) > [slot=overlay], [is=glass-button]:has(> [slot=overlay]) > [slot=overlay], [is=bordered-prominent-button]:has(> [slot=overlay]) > [slot=overlay], [is=bordered-button]:has(> [slot=overlay]) > [slot=overlay], [is=borderless-button]:has(> [slot=overlay]) > [slot=overlay], [is=plain-button]:has(> [slot=overlay]) > [slot=overlay]) {
|
|
904
|
+
opacity: 0;
|
|
905
|
+
}
|
|
906
|
+
}
|
|
891
907
|
:where([control-size=mini][is=glass-prominent-button], [control-size=mini][is=glass-button], [control-size=mini][is=bordered-prominent-button], [control-size=mini][is=bordered-button], [control-size=mini][is=borderless-button], [control-size=mini][is=plain-button]) {
|
|
892
908
|
--btnpadistart: var(--mini-btn-padding);
|
|
893
909
|
--btnpadiend: var(--mini-btn-padding);
|
|
@@ -934,6 +950,17 @@
|
|
|
934
950
|
}
|
|
935
951
|
}
|
|
936
952
|
}
|
|
953
|
+
@layer sw-utils {
|
|
954
|
+
:where([is=glass-prominent-button] > [slot], [is=glass-button] > [slot], [is=bordered-prominent-button] > [slot], [is=bordered-button] > [slot], [is=borderless-button] > [slot], [is=plain-button] > [slot]) {
|
|
955
|
+
display: none;
|
|
956
|
+
}
|
|
957
|
+
:where([is=glass-prominent-button]:has(> [slot=overlay]) > [slot=overlay], [is=glass-button]:has(> [slot=overlay]) > [slot=overlay], [is=bordered-prominent-button]:has(> [slot=overlay]) > [slot=overlay], [is=bordered-button]:has(> [slot=overlay]) > [slot=overlay], [is=borderless-button]:has(> [slot=overlay]) > [slot=overlay], [is=plain-button]:has(> [slot=overlay]) > [slot=overlay]) {
|
|
958
|
+
display: grid;
|
|
959
|
+
}
|
|
960
|
+
:where([is=glass-prominent-button]:not(:has(> :not([slot]))) > [slot=placeholder], [is=glass-button]:not(:has(> :not([slot]))) > [slot=placeholder], [is=bordered-prominent-button]:not(:has(> :not([slot]))) > [slot=placeholder], [is=bordered-button]:not(:has(> :not([slot]))) > [slot=placeholder], [is=borderless-button]:not(:has(> :not([slot]))) > [slot=placeholder], [is=plain-button]:not(:has(> :not([slot]))) > [slot=placeholder]) {
|
|
961
|
+
display: grid;
|
|
962
|
+
}
|
|
963
|
+
}
|
|
937
964
|
@layer sw-actions {
|
|
938
965
|
:where([is=glass-prominent-button]:not(:disabled):not([readonly]), [is=glass-button]:not(:disabled):not([readonly]), [is=bordered-prominent-button]:not(:disabled):not([readonly]), [is=bordered-button]:not(:disabled):not([readonly]), [is=borderless-button]:not(:disabled):not([readonly]), [is=plain-button]:not(:disabled):not([readonly])):active {
|
|
939
966
|
--btnface: var(--btnactiveface,);
|
|
@@ -1014,6 +1041,7 @@
|
|
|
1014
1041
|
[is=tab-bar]:not([hidden]),
|
|
1015
1042
|
[is=full-screen]:not([hidden]),
|
|
1016
1043
|
[is=confirmation-dialog]:not([hidden]),
|
|
1044
|
+
[is=alert-dialog]:not([hidden]),
|
|
1017
1045
|
[is=sheet-view]:not([hidden]),
|
|
1018
1046
|
[is=form-view]:not([hidden]),
|
|
1019
1047
|
[is=disclosure-group]:not([hidden]),
|
|
@@ -1462,9 +1490,14 @@
|
|
|
1462
1490
|
transform: var(--sheet-view-translate, );
|
|
1463
1491
|
--sheet-view-translate: translateY(var(--view-transition-dialog-offscreen-y));
|
|
1464
1492
|
}
|
|
1465
|
-
:where(:where([is=sheet-view])[
|
|
1493
|
+
:where(:where([is=sheet-view]) > tool-bar > [slot=top-bar-leading], :where([is=sheet-view]) > tool-bar > [slot=top-bar-trailing]) {
|
|
1466
1494
|
--label-style: icon-only;
|
|
1467
1495
|
}
|
|
1496
|
+
@media (pointer: coarse) {
|
|
1497
|
+
:where(:where([is=sheet-view]) > tool-bar > [slot^=bottom-bar-]) {
|
|
1498
|
+
--label-style: icon-only;
|
|
1499
|
+
}
|
|
1500
|
+
}
|
|
1468
1501
|
@media (pointer: coarse) and (orientation: portrait) {
|
|
1469
1502
|
:where([is=sheet-view]) {
|
|
1470
1503
|
clip-path: inset(var(--safe-area-inset-top) 0 0 0 round 2rem 2rem 0 0);
|
|
@@ -1579,40 +1612,61 @@
|
|
|
1579
1612
|
--confirmation--dialog-max-block-size: anchor-size();
|
|
1580
1613
|
--confirmation--dialog-scale: scale(0);
|
|
1581
1614
|
}
|
|
1582
|
-
:where([is=confirmation-dialog] > button) {
|
|
1583
|
-
appearance: none;
|
|
1584
|
-
-webkit-appearance: none;
|
|
1585
|
-
border: var(--dialogbtnborder,);
|
|
1586
|
-
background: var(--dialogbtnface,);
|
|
1587
|
-
color: var(--dialogbtntext,);
|
|
1588
|
-
padding-inline: var(--dialogbtnpadistart,) var(--dialogbtnpadiend,);
|
|
1589
|
-
padding-block: var(--dialogbtnpadbstart,) var(--dialogbtnpadbend,);
|
|
1590
|
-
border-radius: var(--dialogbtnradiustl,) var(--dialogbtnradiustr,) var(--dialogbtnradiusbr,) var(--dialogbtnradiusbl,);
|
|
1591
|
-
}
|
|
1592
|
-
:where([is=confirmation-dialog]) {
|
|
1593
|
-
--dialogbtnpadistart: 0.6rem;
|
|
1594
|
-
--dialogbtnpadiend: 0.6rem;
|
|
1595
|
-
--dialogbtnpadbstart: 0.6rem;
|
|
1596
|
-
--dialogbtnpadbend: 0.6rem;
|
|
1597
|
-
--dialogbtnradiustl: 1rem;
|
|
1598
|
-
--dialogbtnradiustr: 1rem;
|
|
1599
|
-
--dialogbtnradiusbl: 1rem;
|
|
1600
|
-
--dialogbtnradiusbr: 1rem;
|
|
1601
|
-
}
|
|
1602
1615
|
}
|
|
1603
|
-
@layer sw-
|
|
1604
|
-
:where([is=
|
|
1616
|
+
@layer sw-components {
|
|
1617
|
+
:where([is=alert-dialog]) {
|
|
1618
|
+
inset-inline: 0px;
|
|
1619
|
+
inset-block: 0px;
|
|
1620
|
+
margin: 0px;
|
|
1621
|
+
border: none;
|
|
1622
|
+
padding: 0px;
|
|
1623
|
+
background-color: transparent;
|
|
1624
|
+
color: transparent;
|
|
1625
|
+
max-width: 100lvw;
|
|
1626
|
+
max-height: 100lvh;
|
|
1605
1627
|
outline: none;
|
|
1606
1628
|
}
|
|
1607
|
-
:where([is=
|
|
1608
|
-
|
|
1609
|
-
--dialogbtntext: var(--dialogbtnhighlighttext,);
|
|
1629
|
+
:where([is=alert-dialog])::backdrop {
|
|
1630
|
+
background-color: transparent;
|
|
1610
1631
|
}
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1632
|
+
:where([is=alert-dialog]) {
|
|
1633
|
+
color: var(--text, );
|
|
1634
|
+
touch-action: none;
|
|
1635
|
+
position: fixed;
|
|
1636
|
+
inline-size: fit-content;
|
|
1637
|
+
block-size: fit-content;
|
|
1638
|
+
height: auto;
|
|
1639
|
+
max-inline-size: min(20rem, 80vw);
|
|
1640
|
+
max-block-size: 80vh;
|
|
1641
|
+
margin-block: max(env(safe-area-inset-top), var(--menu-spacing)) max(env(safe-area-inset-bottom), var(--menu-spacing));
|
|
1642
|
+
margin-inline: max(env(safe-area-inset-left), var(--menu-spacing)) max(env(safe-area-inset-right), var(--menu-spacing));
|
|
1643
|
+
transform: var(--alert--dialog-scale, );
|
|
1644
|
+
opacity: var(--alert--dialog-opacity, );
|
|
1645
|
+
position-anchor: --alert-dialog;
|
|
1646
|
+
position-area: center;
|
|
1647
|
+
overflow: clip;
|
|
1648
|
+
border-radius: 0.9rem;
|
|
1649
|
+
backdrop-filter: var(--liquid-glass-backdrop-filter, );
|
|
1650
|
+
box-shadow: var(--menu-popover-box-shadow, );
|
|
1651
|
+
padding-block: 1rem;
|
|
1652
|
+
padding-inline: 1em;
|
|
1653
|
+
gap: 1rem;
|
|
1654
|
+
--alert--dialog-scale: scale(1.2);
|
|
1655
|
+
--alert--dialog-opacity: 0.8;
|
|
1656
|
+
}
|
|
1657
|
+
:where([is=alert-dialog][open]) {
|
|
1658
|
+
--alert--dialog-scale: scale(1);
|
|
1659
|
+
--alert--dialog-opacity: 1;
|
|
1660
|
+
}
|
|
1661
|
+
@starting-style {
|
|
1662
|
+
:where([is=alert-dialog][open]) {
|
|
1663
|
+
--alert--dialog-scale: scale(1.2);
|
|
1664
|
+
--alert--dialog-opacity: 0.8;
|
|
1665
|
+
}
|
|
1666
|
+
}
|
|
1667
|
+
:where([is=alert-dialog][closing]) {
|
|
1668
|
+
--alert--dialog-scale: scale(0.98);
|
|
1669
|
+
--alert--dialog-opacity: 0;
|
|
1616
1670
|
}
|
|
1617
1671
|
}
|
|
1618
1672
|
@layer sw-components {
|
|
@@ -1746,6 +1800,9 @@
|
|
|
1746
1800
|
:where(h-stack[template="auto minmax(0,1fr) auto auto"]) {
|
|
1747
1801
|
grid-template-columns: auto minmax(0, 1fr) auto auto;
|
|
1748
1802
|
}
|
|
1803
|
+
:where(h-stack[template="auto minmax(0,1fr) auto"]) {
|
|
1804
|
+
grid-template-columns: auto minmax(0, 1fr) auto;
|
|
1805
|
+
}
|
|
1749
1806
|
:where(h-stack[template="repeat(4,minmax(0,1fr))"]) {
|
|
1750
1807
|
grid-template-columns: repeat(4, minmax(0, 1fr));
|
|
1751
1808
|
}
|
|
@@ -1760,14 +1817,31 @@
|
|
|
1760
1817
|
place-content: safe center;
|
|
1761
1818
|
gap: 1rem;
|
|
1762
1819
|
}
|
|
1820
|
+
:where(v-stack[template="auto minmax(0,1fr)"]) {
|
|
1821
|
+
grid-template-rows: auto minmax(0, 1fr);
|
|
1822
|
+
}
|
|
1763
1823
|
:where(v-stack[template="auto auto minmax(0,1fr)"]) {
|
|
1764
1824
|
grid-template-rows: auto auto minmax(0, 1fr);
|
|
1765
1825
|
}
|
|
1766
|
-
:where(v-stack[template="auto minmax(0,1fr)"]) {
|
|
1767
|
-
grid-template-rows: auto minmax(0, 1fr);
|
|
1826
|
+
:where(v-stack[template="auto auto auto minmax(0,1fr)"]) {
|
|
1827
|
+
grid-template-rows: auto auto auto minmax(0, 1fr);
|
|
1768
1828
|
}
|
|
1769
|
-
:where(v-stack[template="auto auto
|
|
1770
|
-
grid-template-rows: auto auto
|
|
1829
|
+
:where(v-stack[template="auto auto auto auto minmax(0,1fr)"]) {
|
|
1830
|
+
grid-template-rows: auto auto auto auto minmax(0, 1fr);
|
|
1831
|
+
}
|
|
1832
|
+
}
|
|
1833
|
+
@layer sw-components {
|
|
1834
|
+
:where(h-flex-stack) {
|
|
1835
|
+
display: flex;
|
|
1836
|
+
flex-flow: row nowrap;
|
|
1837
|
+
place-items: safe center;
|
|
1838
|
+
place-content: safe center;
|
|
1839
|
+
}
|
|
1840
|
+
:where(h-flex-stack > *) {
|
|
1841
|
+
max-block-size: 100%;
|
|
1842
|
+
}
|
|
1843
|
+
:where(h-flex-stack > [frame-height=infinity]) {
|
|
1844
|
+
flex-grow: 1;
|
|
1771
1845
|
}
|
|
1772
1846
|
}
|
|
1773
1847
|
@layer sw-components {
|
|
@@ -5247,6 +5321,12 @@
|
|
|
5247
5321
|
:where([frame\:max-width="100cqi"]) {
|
|
5248
5322
|
max-inline-size: 100cqi;
|
|
5249
5323
|
}
|
|
5324
|
+
:where([frame\:alignment=top]) {
|
|
5325
|
+
align-self: top;
|
|
5326
|
+
}
|
|
5327
|
+
:where([frame\:alignment=leading]) {
|
|
5328
|
+
justify-self: start;
|
|
5329
|
+
}
|
|
5250
5330
|
@media (prefers-reduced-motion: no-preference) {
|
|
5251
5331
|
:where([slow]) {
|
|
5252
5332
|
visibility: visible;
|
|
@@ -6388,6 +6468,13 @@
|
|
|
6388
6468
|
}
|
|
6389
6469
|
}
|
|
6390
6470
|
}
|
|
6471
|
+
@layer sw-transitions {
|
|
6472
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
6473
|
+
:where([is=alert-dialog]) {
|
|
6474
|
+
transition: all var(--touchglass-transition-duration) allow-discrete ease-out;
|
|
6475
|
+
}
|
|
6476
|
+
}
|
|
6477
|
+
}
|
|
6391
6478
|
@layer sw-transitions {}
|
|
6392
6479
|
@layer sw-transitions {
|
|
6393
6480
|
@media (prefers-reduced-motion: no-preference) {
|
|
@@ -7318,7 +7405,7 @@
|
|
|
7318
7405
|
--face: var(--background);
|
|
7319
7406
|
--text: var(--primary);
|
|
7320
7407
|
}
|
|
7321
|
-
:where([is=sheet-view], [is=full-screen], [is=confirmation-dialog]) {
|
|
7408
|
+
:where([is=sheet-view], [is=full-screen], [is=confirmation-dialog], [is=alert-dialog]) {
|
|
7322
7409
|
--face: var(--background);
|
|
7323
7410
|
--background: light-dark(var(--secondary-bg), var(--secondary-bg-dark));
|
|
7324
7411
|
}
|
|
@@ -7363,7 +7450,7 @@
|
|
|
7363
7450
|
--menuitemactivetext: light-dark(var(--menu-item-active-color), var(--menu-item-active-color-dark));
|
|
7364
7451
|
--menuitemactiveface: light-dark(var(--menu-item-active-bg), var(--menu-item-active-bg-dark));
|
|
7365
7452
|
}
|
|
7366
|
-
:where([is=confirmation-dialog]) {
|
|
7453
|
+
:where([is=confirmation-dialog], [is=alert-dialog]) {
|
|
7367
7454
|
--dialogbtnface: light-dark(var(--toolbar-cell-bg), var(--toolbar-cell-bg-dark));
|
|
7368
7455
|
--dialogbtnhighlightface: light-dark(var(--toolbar-cell-focus-bg), var(--toolbar-cell-focus-bg-dark));
|
|
7369
7456
|
--dialogbtnactiveface: light-dark(var(--toolbar-cell-active-bg), var(--toolbar-cell-active-bg-dark));
|
|
@@ -7457,6 +7544,10 @@
|
|
|
7457
7544
|
--confirmation--dialog-scale: scale(1.02);
|
|
7458
7545
|
transition-duration: 100ms;
|
|
7459
7546
|
}
|
|
7547
|
+
:where([is=alert-dialog][touch-glass]) {
|
|
7548
|
+
--alert--dialog-scale: scale(1.02);
|
|
7549
|
+
transition-duration: 100ms;
|
|
7550
|
+
}
|
|
7460
7551
|
:where(tool-bar > *[touch-glass]) {
|
|
7461
7552
|
--toolbar-cell-scale: scale(1.07);
|
|
7462
7553
|
transition-duration: 100ms;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export type
|
|
1
|
+
export type ConfirmationReturnDetail = {
|
|
2
2
|
returnValue: string;
|
|
3
3
|
positionAnchor: string;
|
|
4
4
|
};
|
|
5
5
|
declare global {
|
|
6
6
|
interface HTMLElementEventMap {
|
|
7
|
-
return: CustomEvent<
|
|
7
|
+
'confirmation:return': CustomEvent<ConfirmationReturnDetail>;
|
|
8
8
|
}
|
|
9
9
|
}
|
|
@@ -4,5 +4,14 @@ declare const _default: () => {
|
|
|
4
4
|
readonly Label: "Κανένα αποτέλεσμα για «{search}»";
|
|
5
5
|
readonly Description: "Ελέγξτε την ορθογραφία ή δοκιμάστε μια νέα αναζήτηση.";
|
|
6
6
|
};
|
|
7
|
+
readonly ButtonRole: {
|
|
8
|
+
readonly Default: {
|
|
9
|
+
readonly Cancel: "Cancel";
|
|
10
|
+
readonly Close: "Close";
|
|
11
|
+
readonly Confirm: "Confirm";
|
|
12
|
+
readonly Destructive: "Διαγραφή";
|
|
13
|
+
readonly OK: "OK";
|
|
14
|
+
};
|
|
15
|
+
};
|
|
7
16
|
};
|
|
8
17
|
export default _default;
|
|
@@ -5,4 +5,13 @@ export default defineTranslations(() => ({
|
|
|
5
5
|
Label: 'Κανένα αποτέλεσμα για «{search}»',
|
|
6
6
|
Description: 'Ελέγξτε την ορθογραφία ή δοκιμάστε μια νέα αναζήτηση.',
|
|
7
7
|
},
|
|
8
|
+
ButtonRole: {
|
|
9
|
+
Default: {
|
|
10
|
+
Cancel: 'Cancel',
|
|
11
|
+
Close: 'Close',
|
|
12
|
+
Confirm: 'Confirm',
|
|
13
|
+
Destructive: 'Διαγραφή',
|
|
14
|
+
OK: 'OK',
|
|
15
|
+
},
|
|
16
|
+
},
|
|
8
17
|
}));
|
|
@@ -4,5 +4,14 @@ declare const _default: () => {
|
|
|
4
4
|
readonly Label: "No Results for ”{search}”";
|
|
5
5
|
readonly Description: "Check the spelling or try a new search.";
|
|
6
6
|
};
|
|
7
|
+
readonly ButtonRole: {
|
|
8
|
+
readonly Default: {
|
|
9
|
+
readonly Cancel: "Cancel";
|
|
10
|
+
readonly Close: "Close";
|
|
11
|
+
readonly Confirm: "Confirm";
|
|
12
|
+
readonly Destructive: "Delete";
|
|
13
|
+
readonly OK: "OK";
|
|
14
|
+
};
|
|
15
|
+
};
|
|
7
16
|
};
|
|
8
17
|
export default _default;
|
|
@@ -5,4 +5,13 @@ export default defineTranslations(() => ({
|
|
|
5
5
|
Label: 'No Results for ”{search}”',
|
|
6
6
|
Description: 'Check the spelling or try a new search.',
|
|
7
7
|
},
|
|
8
|
+
ButtonRole: {
|
|
9
|
+
Default: {
|
|
10
|
+
Cancel: 'Cancel',
|
|
11
|
+
Close: 'Close',
|
|
12
|
+
Confirm: 'Confirm',
|
|
13
|
+
Destructive: 'Delete',
|
|
14
|
+
OK: 'OK',
|
|
15
|
+
},
|
|
16
|
+
},
|
|
8
17
|
}));
|