@swiftwc/ui 0.0.0-dev.92 → 0.0.0-dev.94
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/alert-dialog.d.ts +1 -2
- package/generated/components/alert-dialog.js +1 -2
- package/generated/components/body-view.d.ts +8 -0
- package/generated/components/body-view.js +3 -0
- package/generated/components/bordered-button.d.ts +2 -2
- package/generated/components/bordered-button.js +2 -2
- package/generated/components/bordered-prominent-button.d.ts +2 -2
- package/generated/components/bordered-prominent-button.js +2 -2
- package/generated/components/borderless-button.d.ts +2 -2
- package/generated/components/borderless-button.js +2 -2
- package/generated/components/color-scheme.d.ts +5 -0
- package/generated/components/content-unavailable.d.ts +30 -0
- package/generated/components/{content-unavailable-view.js → content-unavailable.js} +8 -8
- package/generated/components/date-picker.d.ts +10 -5
- package/generated/components/date-picker.js +19 -11
- package/generated/components/fine-tooltip.d.ts +5 -0
- package/generated/components/form-view.d.ts +5 -0
- package/generated/components/glass-button.d.ts +2 -2
- package/generated/components/glass-button.js +2 -2
- package/generated/components/glass-prominent-button.d.ts +2 -2
- package/generated/components/glass-prominent-button.js +2 -2
- package/generated/components/h-stack.d.ts +6 -1
- package/generated/components/h-stack.js +1 -1
- package/generated/components/image-view.d.ts +5 -0
- package/generated/components/index.d.ts +1 -1
- package/generated/components/index.js +1 -1
- package/generated/components/label-view.d.ts +8 -2
- package/generated/components/label-view.js +19 -5
- package/generated/components/labeled-content.d.ts +5 -0
- package/generated/components/labeled-content.js +14 -4
- package/generated/components/list-view.d.ts +5 -0
- package/generated/components/list-view.js +0 -12
- package/generated/components/menu-view.d.ts +6 -1
- package/generated/components/menu-view.js +2 -8
- package/generated/components/navigation-large-title.d.ts +5 -0
- package/generated/components/navigation-split-view.d.ts +5 -0
- package/generated/components/navigation-stack.d.ts +5 -0
- package/generated/components/navigation-stack.js +0 -2
- package/generated/components/navigation-title.d.ts +5 -0
- package/generated/components/navigation-title.js +0 -9
- package/generated/components/picker-view.d.ts +10 -4
- package/generated/components/picker-view.js +18 -15
- package/generated/components/progress-view.d.ts +5 -0
- package/generated/components/progress-view.js +1 -1
- package/generated/components/scroll-view-proxy.d.ts +5 -0
- package/generated/components/scroll-view.d.ts +5 -0
- package/generated/components/scroll-view.js +0 -1
- package/generated/components/search-view.d.ts +5 -0
- package/generated/components/search-view.js +0 -3
- package/generated/components/section-view.d.ts +6 -1
- package/generated/components/section-view.js +3 -48
- package/generated/components/sheet-view.js +0 -20
- package/generated/components/sidebar-toggle.d.ts +6 -1
- package/generated/components/sidebar-toggle.js +6 -6
- package/generated/components/sidebar-view.js +1 -1
- package/generated/components/sticky-container.d.ts +6 -1
- package/generated/components/sticky-container.js +5 -5
- package/generated/components/tab-bar.js +0 -3
- package/generated/components/tab-view.d.ts +7 -2
- package/generated/components/tab-view.js +0 -70
- package/generated/components/table-view.d.ts +5 -0
- package/generated/components/table-view.js +2 -2
- package/generated/components/text-field.d.ts +10 -5
- package/generated/components/text-field.js +39 -17
- package/generated/components/toggle-view.d.ts +13 -4
- package/generated/components/toggle-view.js +16 -12
- package/generated/components/tool-bar-item-group.d.ts +5 -0
- package/generated/components/tool-bar-item.d.ts +5 -0
- package/generated/components/tool-bar.d.ts +5 -0
- package/generated/components/v-keyboard.d.ts +5 -0
- package/generated/components/v-stack.d.ts +6 -1
- package/generated/components/v-stack.js +1 -1
- package/generated/css/index.css +24 -17
- package/generated/events/alert-dialog.d.ts +3 -1
- package/generated/events/confirmation-dialog.d.ts +3 -1
- package/generated/events/date-picker.d.ts +3 -1
- package/generated/events/lifecycle-observer.d.ts +6 -2
- package/generated/events/picker-view.d.ts +12 -4
- package/generated/events/scroll-view.d.ts +6 -2
- package/generated/events/scroll-view.js +0 -4
- package/generated/events/tab-view.d.ts +24 -8
- package/generated/events/text-field.d.ts +3 -1
- package/generated/events/text-field.js +0 -3
- package/generated/events/toggle-view.d.ts +3 -1
- package/generated/events/toggle-view.js +0 -3
- package/generated/internal/class/form-associated-base.js +1 -1
- package/generated/internal/utils/ensure-placeholder.js +0 -55
- package/generated/internal/utils/kebab-case.js +6 -9
- package/package.json +1 -1
- package/scss/_components.scss +1 -1
- package/scss/components/{_content-unavailable-view.scss → _content-unavailable.scss} +1 -1
- package/scss/components/_index.scss +5 -4
- package/scss/components/_labeled-content.scss +8 -0
- package/scss/components/_navigation-title.scss +1 -1
- package/scss/components/_toggle-view.scss +1 -1
- package/web-components.html-data/en.json +89 -31
- package/generated/components/content-unavailable-view.d.ts +0 -25
|
@@ -48,23 +48,6 @@ export class TabView extends HTMLElement {
|
|
|
48
48
|
});
|
|
49
49
|
this.#cssStyleObserver.observe(this, this.#handleStyleChange);
|
|
50
50
|
Snapshot.waitReady.then(() => self.requestAnimationFrame(this.#handleStyleChange)); // Snapshot.waitReady.then(this.#handleStyleChange)
|
|
51
|
-
// NOTE: wait for config
|
|
52
|
-
// Snapshot.waitReady.then(() => { // FIXME: Check this removed!
|
|
53
|
-
// for (const [or, w, handler] of [
|
|
54
|
-
// ['portrait', `max-width:${Snapshot.config!['ipad-portrait-bp-max']}`, this.#handleMediaChange],
|
|
55
|
-
// ['landscape', `max-width:${Snapshot.config!['ipad-landscape-bp-max']}`, this.#handleMediaChange],
|
|
56
|
-
// ['portrait', `min-width:${Snapshot.config!['ipad-portrait-bp-min']}`, this.#handleMediaChange],
|
|
57
|
-
// ['landscape', `min-width:${Snapshot.config!['ipad-landscape-bp-min']}`, this.#handleMediaChange],
|
|
58
|
-
// ]) {
|
|
59
|
-
// const mediaQueryList = self.matchMedia(`(orientation:${or}) and (${w})`)
|
|
60
|
-
// if (mediaQueryList.matches)
|
|
61
|
-
// this.#handleMediaChange(
|
|
62
|
-
// new MediaQueryListEvent('media-change', {
|
|
63
|
-
// matches: mediaQueryList.matches,
|
|
64
|
-
// })
|
|
65
|
-
// ) // Initial check
|
|
66
|
-
// CleanupRegistry.register(this, onoff('change', handler as EventListener, mediaQueryList).on())
|
|
67
|
-
// }
|
|
68
51
|
CleanupRegistry.register(this, onoff([
|
|
69
52
|
{ types: 'tabreveal tabswap', listener: this.#debouncedHandler },
|
|
70
53
|
{ types: 'beforetabreveal beforetabswap', listener: this.#addAnimations },
|
|
@@ -75,7 +58,6 @@ export class TabView extends HTMLElement {
|
|
|
75
58
|
listener: this.#handleSummaryClick,
|
|
76
59
|
},
|
|
77
60
|
], this).on());
|
|
78
|
-
// })
|
|
79
61
|
}
|
|
80
62
|
#handleSummaryClick = ({ target }) => {
|
|
81
63
|
if (!(target instanceof HTMLElement))
|
|
@@ -116,57 +98,6 @@ export class TabView extends HTMLElement {
|
|
|
116
98
|
}));
|
|
117
99
|
}
|
|
118
100
|
};
|
|
119
|
-
// #handleMediaChange: (evt: MediaQueryListEvent) => void = (evt) => {
|
|
120
|
-
// if (devFlags.debug) console.debug(`${TabView.name} ⚡️ ${evt?.type}`)
|
|
121
|
-
// if (!evt.matches) return
|
|
122
|
-
// this.#handleStyleChange()
|
|
123
|
-
// // if (evt.matches) {
|
|
124
|
-
// // const placement = self.getComputedStyle(this).getPropertyValue('--adaptable-tab-bar-placement'), // or do it manually without any computedstyle
|
|
125
|
-
// // newValue = (TAB_BAR_PLACEMENTS as readonly string[]).includes(placement) ? (placement as (typeof TAB_BAR_PLACEMENTS)[number]) : 'bottom-bar'
|
|
126
|
-
// // if (newValue !== this.#cachedAdaptableTabBarPlacement) {
|
|
127
|
-
// // const oldValue = this.#cachedAdaptableTabBarPlacement
|
|
128
|
-
// // this.#cachedAdaptableTabBarPlacement = newValue
|
|
129
|
-
// // this.dispatchEvent(
|
|
130
|
-
// // new CustomEvent<TabViewAdaptableTabBarPlacementDetail>('tab-view:adaptable-tab-bar-placement-change', {
|
|
131
|
-
// // detail: { oldValue, newValue },
|
|
132
|
-
// // bubbles: true,
|
|
133
|
-
// // composed: true,
|
|
134
|
-
// // })
|
|
135
|
-
// // )
|
|
136
|
-
// // }
|
|
137
|
-
// // }
|
|
138
|
-
// // // trigger more-stack (dis)allowed event
|
|
139
|
-
// // if (evt.matches !== this.#moreStackAllowed) {
|
|
140
|
-
// // this.#moreStackAllowed = evt.matches
|
|
141
|
-
// // const eventType = evt.matches ? 'tab-view:more-tab-allowed' : 'tab-view:more-tab-disallowed'
|
|
142
|
-
// // this.dispatchEvent(new CustomEvent<TabMoreStackAllowanceDetail>(eventType, { detail: { moreTab: this.moreTab }, bubbles: true, composed: true }))
|
|
143
|
-
// // }
|
|
144
|
-
// // if (evt.matches) return // no button triggers should happen, already on iphone portrait
|
|
145
|
-
// // const innerSelection = this.moreTab?.querySelector(':scope>navigation-stack:not([hidden]),:scope>navigation-split-view:not([hidden])')?.id
|
|
146
|
-
// // if (innerSelection) {
|
|
147
|
-
// // const btn = this.querySelector<HTMLButtonElement>(`[is="tab-item"][value="${CSS.escape(innerSelection)}"]`)
|
|
148
|
-
// // // NOTE: simulate btn click BU WITHOUT tabroot functionality!
|
|
149
|
-
// // if (btn) {
|
|
150
|
-
// // const newTab = this.querySelector<NavigationStack | NavigationSplitView>(`#${btn.getAttribute('value')}`)
|
|
151
|
-
// // if (newTab) {
|
|
152
|
-
// // this.selectedTab = TabView.gatherTab(newTab)
|
|
153
|
-
// // return
|
|
154
|
-
// // }
|
|
155
|
-
// // }
|
|
156
|
-
// // }
|
|
157
|
-
// // const outerSelection = this?.querySelector(':scope>navigation-stack:not([hidden]),:scope>navigation-split-view:not([hidden])')?.id
|
|
158
|
-
// // if (outerSelection && outerSelection === this.moreTab?.id) {
|
|
159
|
-
// // const btn = this.querySelector<HTMLButtonElement>(`[is="tab-item"]:not([value="${CSS.escape(outerSelection)}"])`)
|
|
160
|
-
// // // NOTE: simulate btn click BU WITHOUT tabroot functionality!
|
|
161
|
-
// // if (btn) {
|
|
162
|
-
// // const newTab = this.querySelector<NavigationStack | NavigationSplitView>(`#${btn.getAttribute('value')}`)
|
|
163
|
-
// // if (newTab) {
|
|
164
|
-
// // this.selectedTab = TabView.gatherTab(newTab)
|
|
165
|
-
// // return
|
|
166
|
-
// // }
|
|
167
|
-
// // }
|
|
168
|
-
// // }
|
|
169
|
-
// }
|
|
170
101
|
#handleAdaptableTabBarPlacementChange = (evt) => {
|
|
171
102
|
if (devFlags.debug)
|
|
172
103
|
console.debug(`${_a.name} ⚡️ ${evt?.type}`);
|
|
@@ -198,7 +129,6 @@ export class TabView extends HTMLElement {
|
|
|
198
129
|
}
|
|
199
130
|
};
|
|
200
131
|
get selectedTab() {
|
|
201
|
-
// return this.querySelector<NavigationStack | NavigationSplitView>(':scope>navigation-stack:not([hidden]),:scope>navigation-split-view:not([hidden])')
|
|
202
132
|
return [...this.querySelectorAll('navigation-stack:not([hidden]),navigation-split-view:not([hidden])')];
|
|
203
133
|
}
|
|
204
134
|
set selectedTab(tabs) {
|
|
@@ -116,8 +116,8 @@ export class TableView extends HTMLElement {
|
|
|
116
116
|
<label-view font="callout" foreground="secondary"></label-view>
|
|
117
117
|
</v-stack>
|
|
118
118
|
</button>`, '>1'), title = btn.querySelector('label-view:first-child') ?? undefined, subTitle = btn.querySelector('label-view:last-child') ?? undefined;
|
|
119
|
-
queryMorph(':not([slot])', html `<span>${node.textContent.trim()}</span>`, title, { removeIf: !node.textContent.trim() });
|
|
120
|
-
queryMorph(':not([slot])', html `<span>${node.ariaSort ?? ''}</span>`, subTitle, { removeIf: !(node.ariaSort ?? '') });
|
|
119
|
+
queryMorph(':not([slot])', html `<span>${node.textContent.trim()}</span>`, title, { removeIf: !node.textContent.trim() });
|
|
120
|
+
queryMorph(':not([slot])', html `<span>${node.ariaSort ?? ''}</span>`, subTitle, { removeIf: !(node.ariaSort ?? '') });
|
|
121
121
|
this.#compactToolbarItem.appendChild(btn);
|
|
122
122
|
}
|
|
123
123
|
};
|
|
@@ -2,7 +2,7 @@ import { FormAssociatedBase } from '../internal/class/form-associated-base';
|
|
|
2
2
|
declare const keyboardTypes: readonly ["decimal-pad", "number-pad", "default"];
|
|
3
3
|
export type KeyboardType = (typeof keyboardTypes)[number];
|
|
4
4
|
/**
|
|
5
|
-
* @summary A control that displays an editable text
|
|
5
|
+
* @summary A control that displays an editable text area.
|
|
6
6
|
*
|
|
7
7
|
* @slot label
|
|
8
8
|
* @slot validity-options
|
|
@@ -20,7 +20,6 @@ export declare class TextField extends FormAssociatedBase {
|
|
|
20
20
|
set text(v: string);
|
|
21
21
|
/**
|
|
22
22
|
* Form participation property
|
|
23
|
-
* @type {string}
|
|
24
23
|
*/
|
|
25
24
|
get name(): string;
|
|
26
25
|
get value(): string;
|
|
@@ -28,8 +27,14 @@ export declare class TextField extends FormAssociatedBase {
|
|
|
28
27
|
get negativeNumbersAllowed(): boolean;
|
|
29
28
|
setValidity: (flags?: ValidityStateFlags, message?: string, anchor?: HTMLElement) => void;
|
|
30
29
|
setCustomValidity: (message: string) => void;
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
30
|
+
formStateRestoreCallback(state: string, reason: string): void;
|
|
31
|
+
formAssociatedCallback(form: HTMLFormElement): void;
|
|
32
|
+
formDisabledCallback(disabled: boolean): void;
|
|
33
|
+
formResetCallback(): void;
|
|
34
|
+
}
|
|
35
|
+
declare global {
|
|
36
|
+
interface HTMLElementTagNameMap {
|
|
37
|
+
'text-field': TextField;
|
|
38
|
+
}
|
|
34
39
|
}
|
|
35
40
|
export {};
|
|
@@ -7,14 +7,40 @@ import { $, compareBigDecimals, devFlags, kebabCase, onoff, set } from '../inter
|
|
|
7
7
|
import { html, queryMorph } from '../morphdom';
|
|
8
8
|
const keyboardTypes = ['decimal-pad', 'number-pad', 'default'];
|
|
9
9
|
/**
|
|
10
|
-
* @summary A control that displays an editable text
|
|
10
|
+
* @summary A control that displays an editable text area.
|
|
11
11
|
*
|
|
12
12
|
* @slot label
|
|
13
13
|
* @slot validity-options
|
|
14
14
|
*/
|
|
15
15
|
export class TextField extends FormAssociatedBase {
|
|
16
16
|
static get observedAttributes() {
|
|
17
|
-
return [
|
|
17
|
+
return [
|
|
18
|
+
'prompt',
|
|
19
|
+
'minimum',
|
|
20
|
+
'maximum',
|
|
21
|
+
'min-length',
|
|
22
|
+
'max-length',
|
|
23
|
+
'label',
|
|
24
|
+
'name',
|
|
25
|
+
'text',
|
|
26
|
+
'text-input-autocapitalization',
|
|
27
|
+
/**
|
|
28
|
+
* @type {""}
|
|
29
|
+
*/
|
|
30
|
+
'disable-autocorrection',
|
|
31
|
+
/**
|
|
32
|
+
* @type {decimal-pad|number-pad|default}
|
|
33
|
+
*/
|
|
34
|
+
'keyboard-type',
|
|
35
|
+
/**
|
|
36
|
+
* @type {required}
|
|
37
|
+
*/
|
|
38
|
+
'required',
|
|
39
|
+
/**
|
|
40
|
+
* @type {disabled}
|
|
41
|
+
*/
|
|
42
|
+
'disabled',
|
|
43
|
+
];
|
|
18
44
|
}
|
|
19
45
|
static #template;
|
|
20
46
|
static get template() {
|
|
@@ -140,7 +166,7 @@ export class TextField extends FormAssociatedBase {
|
|
|
140
166
|
this.#sendValueToForm();
|
|
141
167
|
break;
|
|
142
168
|
case 'label':
|
|
143
|
-
queryMorph('[slot=label]', html `<label-view slot="label" foreground="secondary">${newValue ? html `<span>${newValue}</span>` : null}</label-view>`, this);
|
|
169
|
+
queryMorph('[slot=label]', html `<label-view slot="label" foreground="secondary">${newValue ? html `<span>${newValue}</span>` : null}</label-view>`, this);
|
|
144
170
|
// this.#sendValueToForm()
|
|
145
171
|
break;
|
|
146
172
|
case 'disabled':
|
|
@@ -396,7 +422,6 @@ export class TextField extends FormAssociatedBase {
|
|
|
396
422
|
};
|
|
397
423
|
/**
|
|
398
424
|
* Form participation property
|
|
399
|
-
* @type {string}
|
|
400
425
|
*/
|
|
401
426
|
get name() {
|
|
402
427
|
return this.getAttribute('name') ?? this.getAttribute('label') ?? this.querySelector(':scope>[slot=label]')?.textContent ?? '';
|
|
@@ -438,14 +463,8 @@ export class TextField extends FormAssociatedBase {
|
|
|
438
463
|
}
|
|
439
464
|
}
|
|
440
465
|
get negativeNumbersAllowed() {
|
|
441
|
-
// switch (this.keyboardType) {
|
|
442
|
-
// case 'decimal-pad':
|
|
443
|
-
// case 'number-pad':
|
|
444
466
|
const min = this.getAttribute('minimum') ?? '-Infinity', max = this.getAttribute('maximum') ?? 'Infinity';
|
|
445
467
|
return compareBigDecimals('0', min) >= 0 && compareBigDecimals('0', max) <= 0;
|
|
446
|
-
// default:
|
|
447
|
-
// return false
|
|
448
|
-
// }
|
|
449
468
|
}
|
|
450
469
|
setValidity = (flags, message, anchor) => {
|
|
451
470
|
// let msg
|
|
@@ -487,16 +506,19 @@ export class TextField extends FormAssociatedBase {
|
|
|
487
506
|
else
|
|
488
507
|
this.#sendValueToForm(false);
|
|
489
508
|
};
|
|
490
|
-
|
|
491
|
-
this
|
|
492
|
-
}
|
|
493
|
-
|
|
509
|
+
formStateRestoreCallback(state, reason) {
|
|
510
|
+
this.text = state;
|
|
511
|
+
}
|
|
512
|
+
formAssociatedCallback(form) {
|
|
513
|
+
this.#sendValueToForm(false);
|
|
514
|
+
}
|
|
515
|
+
formDisabledCallback(disabled) {
|
|
494
516
|
for (const el of this.#shadowRoot.querySelectorAll('input'))
|
|
495
517
|
el.toggleAttribute('disabled', !disabled);
|
|
496
|
-
}
|
|
497
|
-
formResetCallback
|
|
518
|
+
}
|
|
519
|
+
formResetCallback() {
|
|
498
520
|
this.text = '';
|
|
499
521
|
this.#sendValueToForm(false);
|
|
500
|
-
}
|
|
522
|
+
}
|
|
501
523
|
}
|
|
502
524
|
_a = TextField;
|
|
@@ -2,6 +2,10 @@ import { FormAssociatedBase } from '../internal/class/form-associated-base';
|
|
|
2
2
|
declare const toggleStyles: readonly ["switch", "button"];
|
|
3
3
|
export type ToggleStyle = (typeof toggleStyles)[number];
|
|
4
4
|
/**
|
|
5
|
+
* @summary A control that switches between on and off states.
|
|
6
|
+
*
|
|
7
|
+
* @fires toggle:change — User toggled the control
|
|
8
|
+
*
|
|
5
9
|
* @slot label
|
|
6
10
|
* @slot validity-options
|
|
7
11
|
*/
|
|
@@ -18,15 +22,20 @@ export declare class ToggleView extends FormAssociatedBase {
|
|
|
18
22
|
set isOn(v: boolean);
|
|
19
23
|
/**
|
|
20
24
|
* Form participation property
|
|
21
|
-
* @type {string}
|
|
22
25
|
*/
|
|
23
26
|
get name(): string;
|
|
24
27
|
get value(): string | null;
|
|
25
28
|
set value(v: string | null);
|
|
26
29
|
setValidity: (flags?: ValidityStateFlags, message?: string, anchor?: HTMLElement) => void;
|
|
27
30
|
setCustomValidity: (message: string) => void;
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
+
formStateRestoreCallback(state: string, reason: string): void;
|
|
32
|
+
formAssociatedCallback(form: HTMLFormElement): void;
|
|
33
|
+
formDisabledCallback(disabled: boolean): void;
|
|
34
|
+
formResetCallback(): void;
|
|
35
|
+
}
|
|
36
|
+
declare global {
|
|
37
|
+
interface HTMLElementTagNameMap {
|
|
38
|
+
'toggle-view': ToggleView;
|
|
39
|
+
}
|
|
31
40
|
}
|
|
32
41
|
export {};
|
|
@@ -6,12 +6,14 @@ import { $, devFlags, kebabCase, onoff } from '../internal/utils';
|
|
|
6
6
|
import { html, queryMorph } from '../morphdom';
|
|
7
7
|
const toggleStyles = ['switch', 'button'];
|
|
8
8
|
/**
|
|
9
|
+
* @summary A control that switches between on and off states.
|
|
10
|
+
*
|
|
11
|
+
* @fires toggle:change — User toggled the control
|
|
12
|
+
*
|
|
9
13
|
* @slot label
|
|
10
14
|
* @slot validity-options
|
|
11
15
|
*/
|
|
12
16
|
export class ToggleView extends FormAssociatedBase {
|
|
13
|
-
// declare addEventListener: TypedEventTargetMethods<ToggleViewEventMap>['addEventListener']
|
|
14
|
-
// declare removeEventListener: TypedEventTargetMethods<ToggleViewEventMap>['removeEventListener']
|
|
15
17
|
static get observedAttributes() {
|
|
16
18
|
return ['label', 'name', 'value', 'is-on', 'keyboard-type', 'required', 'disabled'];
|
|
17
19
|
}
|
|
@@ -85,7 +87,7 @@ export class ToggleView extends FormAssociatedBase {
|
|
|
85
87
|
this.#sendValueToForm(this.#connected);
|
|
86
88
|
break;
|
|
87
89
|
case 'label':
|
|
88
|
-
queryMorph('[slot=label]', html `<label-view slot="label">${newValue ? html `<span>${newValue}</span>` : null}</label-view>`, this);
|
|
90
|
+
queryMorph('[slot=label]', html `<label-view slot="label">${newValue ? html `<span>${newValue}</span>` : null}</label-view>`, this);
|
|
89
91
|
break;
|
|
90
92
|
case 'disabled':
|
|
91
93
|
for (const el of this.#shadowRoot.querySelectorAll('input'))
|
|
@@ -162,7 +164,6 @@ export class ToggleView extends FormAssociatedBase {
|
|
|
162
164
|
};
|
|
163
165
|
/**
|
|
164
166
|
* Form participation property
|
|
165
|
-
* @type {string}
|
|
166
167
|
*/
|
|
167
168
|
get name() {
|
|
168
169
|
return this.getAttribute('name') ?? this.getAttribute('label') ?? this.querySelector(':scope>[slot=label]')?.textContent ?? '';
|
|
@@ -213,16 +214,19 @@ export class ToggleView extends FormAssociatedBase {
|
|
|
213
214
|
else
|
|
214
215
|
this.#sendValueToForm(false);
|
|
215
216
|
};
|
|
216
|
-
|
|
217
|
-
this
|
|
218
|
-
}
|
|
219
|
-
|
|
217
|
+
formStateRestoreCallback(state, reason) {
|
|
218
|
+
this.value = state;
|
|
219
|
+
}
|
|
220
|
+
formAssociatedCallback(form) {
|
|
221
|
+
this.#sendValueToForm(false);
|
|
222
|
+
}
|
|
223
|
+
formDisabledCallback(disabled) {
|
|
220
224
|
for (const el of this.#shadowRoot.querySelectorAll('input'))
|
|
221
225
|
el.toggleAttribute('disabled', !disabled);
|
|
222
|
-
}
|
|
223
|
-
formResetCallback
|
|
226
|
+
}
|
|
227
|
+
formResetCallback() {
|
|
224
228
|
this.value = '';
|
|
225
|
-
this.#sendValueToForm();
|
|
226
|
-
}
|
|
229
|
+
this.#sendValueToForm(false);
|
|
230
|
+
}
|
|
227
231
|
}
|
|
228
232
|
_a = ToggleView;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @summary A view that arranges its
|
|
2
|
+
* @summary A view that arranges its children one on top of the other.
|
|
3
3
|
*
|
|
4
4
|
* @attr {leading|"leading fill"|center|trailing|fill|space-between} distribution — The distribution of cols
|
|
5
5
|
*
|
|
@@ -17,3 +17,8 @@ export declare class VStack extends HTMLElement {
|
|
|
17
17
|
connectedCallback(): void;
|
|
18
18
|
disconnectedCallback(): void;
|
|
19
19
|
}
|
|
20
|
+
declare global {
|
|
21
|
+
interface HTMLElementTagNameMap {
|
|
22
|
+
'v-stack': VStack;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { devFlags } from '../internal/utils';
|
|
2
2
|
/**
|
|
3
|
-
* @summary A view that arranges its
|
|
3
|
+
* @summary A view that arranges its children one on top of the other.
|
|
4
4
|
*
|
|
5
5
|
* @attr {leading|"leading fill"|center|trailing|fill|space-between} distribution — The distribution of cols
|
|
6
6
|
*
|
package/generated/css/index.css
CHANGED
|
@@ -1070,6 +1070,7 @@
|
|
|
1070
1070
|
:where(navigation-stack:not([hidden]),
|
|
1071
1071
|
navigation-split-view:not([hidden]),
|
|
1072
1072
|
navigation-large-title:not([hidden]),
|
|
1073
|
+
navigation-title:not([hidden]),
|
|
1073
1074
|
scroll-view:not([hidden]),
|
|
1074
1075
|
body-view:not([hidden]),
|
|
1075
1076
|
tab-view:not([hidden]),
|
|
@@ -1093,7 +1094,7 @@
|
|
|
1093
1094
|
[is=glass-prominent-button]:not([hidden]),
|
|
1094
1095
|
list-view:not([hidden]),
|
|
1095
1096
|
table-view:not([hidden]),
|
|
1096
|
-
content-unavailable
|
|
1097
|
+
content-unavailable:not([hidden]),
|
|
1097
1098
|
progress-view:not([hidden]),
|
|
1098
1099
|
tool-bar-item:not([hidden]),
|
|
1099
1100
|
tool-bar-item-group:not([hidden]),
|
|
@@ -1119,9 +1120,9 @@
|
|
|
1119
1120
|
:where(labeled-content)::part(labeled-content-label-stack),
|
|
1120
1121
|
:where(labeled-content)::part(labeled-content-value-stack),
|
|
1121
1122
|
:where(progress-view)::part(progress-control),
|
|
1122
|
-
:where(content-unavailable
|
|
1123
|
-
:where(content-unavailable
|
|
1124
|
-
:where(content-unavailable
|
|
1123
|
+
:where(content-unavailable)::part(content-unavailable-title-stack),
|
|
1124
|
+
:where(content-unavailable)::part(content-unavailable-description-stack),
|
|
1125
|
+
:where(content-unavailable)::part(content-unavailable-actions-stack),
|
|
1125
1126
|
:where(table-view)::part(table-container),
|
|
1126
1127
|
:where(table-view)::part(table-column-stack),
|
|
1127
1128
|
:where(table-view)::part(table-header-stack),
|
|
@@ -1745,7 +1746,7 @@
|
|
|
1745
1746
|
}
|
|
1746
1747
|
}
|
|
1747
1748
|
@layer sw-components {
|
|
1748
|
-
:where(content-unavailable
|
|
1749
|
+
:where(content-unavailable) {
|
|
1749
1750
|
place-content: center;
|
|
1750
1751
|
place-items: center;
|
|
1751
1752
|
text-align: center;
|
|
@@ -1753,24 +1754,24 @@
|
|
|
1753
1754
|
padding-inline: 1rem;
|
|
1754
1755
|
padding-block: 1rem;
|
|
1755
1756
|
}
|
|
1756
|
-
:where(content-unavailable
|
|
1757
|
+
:where(content-unavailable)::part(content-unavailable-actions-stack), :where(content-unavailable)::part(content-unavailable-title-stack), :where(content-unavailable)::part(content-unavailable-description-stack) {
|
|
1757
1758
|
max-inline-size: 20rem;
|
|
1758
1759
|
}
|
|
1759
|
-
:where(content-unavailable
|
|
1760
|
+
:where(content-unavailable)::part(content-unavailable-actions-stack) {
|
|
1760
1761
|
row-gap: 0.2rem;
|
|
1761
1762
|
}
|
|
1762
|
-
:where(content-unavailable
|
|
1763
|
+
:where(content-unavailable)::part(content-unavailable-title-stack) {
|
|
1763
1764
|
--label-flow: vertical;
|
|
1764
1765
|
--label-font: title3;
|
|
1765
1766
|
}
|
|
1766
|
-
:where(content-unavailable
|
|
1767
|
+
:where(content-unavailable > :not([slot])) {
|
|
1767
1768
|
--label-image-size: 5;
|
|
1768
1769
|
--label-gap: 1;
|
|
1769
1770
|
}
|
|
1770
|
-
:where(content-unavailable
|
|
1771
|
+
:where(content-unavailable:not(:has(> [slot=description])))::part(content-unavailable-description-stack) {
|
|
1771
1772
|
display: none;
|
|
1772
1773
|
}
|
|
1773
|
-
:where(content-unavailable
|
|
1774
|
+
:where(content-unavailable:not(:has(> [slot=actions])))::part(content-unavailable-actions-stack) {
|
|
1774
1775
|
display: none;
|
|
1775
1776
|
}
|
|
1776
1777
|
}
|
|
@@ -3395,7 +3396,7 @@
|
|
|
3395
3396
|
--toggle--trigger-bg: lightgray;
|
|
3396
3397
|
}
|
|
3397
3398
|
:where(toggle-view)::part(toggle-stack) {
|
|
3398
|
-
grid-template-columns:
|
|
3399
|
+
grid-template-columns: minmax(0, 1fr) auto;
|
|
3399
3400
|
grid-template-rows: minmax(0, 1fr);
|
|
3400
3401
|
column-gap: var(--labeled-content-column-gap);
|
|
3401
3402
|
}
|
|
@@ -3490,6 +3491,16 @@
|
|
|
3490
3491
|
labeled-content > [slot=header],
|
|
3491
3492
|
labeled-content > [slot=footer]) {
|
|
3492
3493
|
color: var(--secondary);
|
|
3494
|
+
--label-font: callout;
|
|
3495
|
+
}
|
|
3496
|
+
@supports not (x: if(else:red)) {
|
|
3497
|
+
:where(labeled-content > :nth-child(n+2 of [slot=label]),
|
|
3498
|
+
labeled-content > [slot=header],
|
|
3499
|
+
labeled-content > [slot=footer]) {
|
|
3500
|
+
--label--titlestack-font-size: var(--label-callout-font-size);
|
|
3501
|
+
--label--titlestack-line-height: var(--label-callout-line-height);
|
|
3502
|
+
--label--titlestack-font-weight: var(--label-callout-font-weight);
|
|
3503
|
+
}
|
|
3493
3504
|
}
|
|
3494
3505
|
}
|
|
3495
3506
|
@layer sw-components {}
|
|
@@ -3512,11 +3523,7 @@
|
|
|
3512
3523
|
padding-block: 1rem;
|
|
3513
3524
|
}
|
|
3514
3525
|
}
|
|
3515
|
-
@layer sw-components {
|
|
3516
|
-
:where(navigation-title) {
|
|
3517
|
-
display: grid;
|
|
3518
|
-
}
|
|
3519
|
-
}
|
|
3526
|
+
@layer sw-components {}
|
|
3520
3527
|
@layer sw-components {
|
|
3521
3528
|
:where(tab-view:not([tab-view-style=tab-bar-only]) > sidebar-toggle, navigation-split-view > sidebar-toggle) {
|
|
3522
3529
|
position: fixed;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
export type AlertReturnDetail = {
|
|
2
2
|
returnValue: string;
|
|
3
3
|
};
|
|
4
|
+
export interface AlertReturnEvent extends CustomEvent<AlertReturnDetail> {
|
|
5
|
+
}
|
|
4
6
|
declare global {
|
|
5
7
|
interface HTMLElementEventMap {
|
|
6
|
-
'alert:return':
|
|
8
|
+
'alert:return': AlertReturnEvent;
|
|
7
9
|
}
|
|
8
10
|
}
|
|
@@ -2,8 +2,10 @@ export type ConfirmationReturnDetail = {
|
|
|
2
2
|
returnValue: string;
|
|
3
3
|
positionAnchor: string;
|
|
4
4
|
};
|
|
5
|
+
export interface ConfirmationReturnEvent extends CustomEvent<ConfirmationReturnDetail> {
|
|
6
|
+
}
|
|
5
7
|
declare global {
|
|
6
8
|
interface HTMLElementEventMap {
|
|
7
|
-
'confirmation:return':
|
|
9
|
+
'confirmation:return': ConfirmationReturnEvent;
|
|
8
10
|
}
|
|
9
11
|
}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
export type DatePickerSelectionDetail = {
|
|
2
2
|
selection: string;
|
|
3
3
|
};
|
|
4
|
+
export interface DatePickerSelectionEvent extends CustomEvent<DatePickerSelectionDetail> {
|
|
5
|
+
}
|
|
4
6
|
declare global {
|
|
5
7
|
interface HTMLElementEventMap {
|
|
6
|
-
selection:
|
|
8
|
+
selection: DatePickerSelectionEvent;
|
|
7
9
|
}
|
|
8
10
|
}
|
|
@@ -2,9 +2,13 @@ import { type ScrollView } from '../components';
|
|
|
2
2
|
export type PageShowHideDetail = {
|
|
3
3
|
page: ScrollView;
|
|
4
4
|
};
|
|
5
|
+
export interface PageShowEvent extends CustomEvent<PageShowHideDetail> {
|
|
6
|
+
}
|
|
7
|
+
export interface PageHideEvent extends CustomEvent<PageShowHideDetail> {
|
|
8
|
+
}
|
|
5
9
|
declare global {
|
|
6
10
|
interface HTMLElementEventMap {
|
|
7
|
-
pageshow:
|
|
8
|
-
pagehide:
|
|
11
|
+
pageshow: PageShowEvent;
|
|
12
|
+
pagehide: PageHideEvent;
|
|
9
13
|
}
|
|
10
14
|
}
|
|
@@ -5,11 +5,19 @@ export type PickerSearchableDetail = {
|
|
|
5
5
|
element: HTMLElement;
|
|
6
6
|
search: string;
|
|
7
7
|
};
|
|
8
|
+
export interface PickerSelectionEvent extends CustomEvent<PickerSelectionDetail> {
|
|
9
|
+
}
|
|
10
|
+
export interface PickerSearchfocusEvent extends CustomEvent<PickerSearchableDetail> {
|
|
11
|
+
}
|
|
12
|
+
export interface PickerSearchblurEvent extends CustomEvent<PickerSearchableDetail> {
|
|
13
|
+
}
|
|
14
|
+
export interface PickerSearchinputEvent extends CustomEvent<PickerSearchableDetail> {
|
|
15
|
+
}
|
|
8
16
|
declare global {
|
|
9
17
|
interface HTMLElementEventMap {
|
|
10
|
-
selection:
|
|
11
|
-
'picker:searchfocus':
|
|
12
|
-
'picker:searchblur':
|
|
13
|
-
'picker:searchinput':
|
|
18
|
+
selection: PickerSelectionEvent;
|
|
19
|
+
'picker:searchfocus': PickerSearchfocusEvent;
|
|
20
|
+
'picker:searchblur': PickerSearchblurEvent;
|
|
21
|
+
'picker:searchinput': PickerSearchinputEvent;
|
|
14
22
|
}
|
|
15
23
|
}
|
|
@@ -2,9 +2,13 @@ import { type ScrollView } from '../components';
|
|
|
2
2
|
export type PageRevealSwapDetail = {
|
|
3
3
|
page: ScrollView;
|
|
4
4
|
};
|
|
5
|
+
export interface PagerevealEvent extends CustomEvent<PageRevealSwapDetail> {
|
|
6
|
+
}
|
|
7
|
+
export interface PageswapEvent extends CustomEvent<PageRevealSwapDetail> {
|
|
8
|
+
}
|
|
5
9
|
declare global {
|
|
6
10
|
interface HTMLElementEventMap {
|
|
7
|
-
pagereveal:
|
|
8
|
-
pageswap:
|
|
11
|
+
pagereveal: PagerevealEvent;
|
|
12
|
+
pageswap: PageswapEvent;
|
|
9
13
|
}
|
|
10
14
|
}
|