@swiftwc/ui 0.0.0-dev.93 → 0.0.0-dev.95
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 -1
- package/generated/components/alert-dialog.js +1 -1
- package/generated/components/body-view.d.ts +6 -1
- package/generated/components/body-view.js +1 -1
- package/generated/components/color-scheme.d.ts +5 -0
- package/generated/components/confirmation-dialog.d.ts +1 -2
- package/generated/components/confirmation-dialog.js +1 -2
- package/generated/components/content-unavailable.d.ts +5 -0
- package/generated/components/date-picker.d.ts +9 -4
- package/generated/components/date-picker.js +17 -9
- package/generated/components/disclosure-group.d.ts +4 -1
- package/generated/components/disclosure-group.js +5 -1
- package/generated/components/fine-tooltip.d.ts +5 -0
- package/generated/components/form-view.d.ts +7 -0
- package/generated/components/form-view.js +2 -0
- package/generated/components/h-stack.d.ts +7 -2
- package/generated/components/h-stack.js +2 -2
- package/generated/components/image-view.d.ts +9 -0
- package/generated/components/image-view.js +4 -0
- package/generated/components/label-view.d.ts +7 -4
- package/generated/components/label-view.js +16 -5
- package/generated/components/labeled-content.d.ts +13 -0
- package/generated/components/labeled-content.js +19 -1
- package/generated/components/list-view.d.ts +7 -0
- package/generated/components/list-view.js +2 -0
- package/generated/components/menu-view.d.ts +5 -0
- package/generated/components/navigation-large-title.d.ts +12 -0
- package/generated/components/navigation-large-title.js +7 -0
- package/generated/components/navigation-split-view.d.ts +6 -1
- package/generated/components/navigation-split-view.js +1 -1
- package/generated/components/navigation-stack.d.ts +6 -1
- package/generated/components/navigation-stack.js +1 -1
- package/generated/components/navigation-title.d.ts +10 -0
- package/generated/components/navigation-title.js +5 -0
- package/generated/components/picker-view.d.ts +9 -4
- package/generated/components/picker-view.js +11 -9
- package/generated/components/progress-view.d.ts +6 -1
- package/generated/components/progress-view.js +1 -1
- package/generated/components/scroll-view-proxy.d.ts +6 -1
- package/generated/components/scroll-view-proxy.js +1 -1
- package/generated/components/scroll-view.d.ts +7 -0
- package/generated/components/scroll-view.js +2 -0
- package/generated/components/search-view.d.ts +5 -0
- package/generated/components/section-view.d.ts +5 -0
- package/generated/components/sheet-view.d.ts +3 -0
- package/generated/components/sheet-view.js +3 -0
- package/generated/components/sidebar-toggle.d.ts +9 -1
- package/generated/components/sidebar-toggle.js +9 -6
- package/generated/components/sidebar-view.d.ts +3 -0
- package/generated/components/sidebar-view.js +3 -0
- package/generated/components/sticky-container.d.ts +6 -1
- package/generated/components/sticky-container.js +5 -5
- package/generated/components/tab-bar.d.ts +1 -1
- package/generated/components/tab-bar.js +1 -1
- package/generated/components/tab-item.d.ts +3 -0
- package/generated/components/tab-item.js +3 -0
- package/generated/components/tab-view.d.ts +8 -2
- package/generated/components/tab-view.js +1 -0
- package/generated/components/table-view.d.ts +6 -1
- package/generated/components/table-view.js +1 -1
- package/generated/components/text-field.d.ts +9 -4
- package/generated/components/text-field.js +37 -15
- package/generated/components/toggle-view.d.ts +11 -4
- package/generated/components/toggle-view.js +13 -11
- package/generated/components/tool-bar-item-group.d.ts +6 -1
- package/generated/components/tool-bar-item-group.js +1 -1
- package/generated/components/tool-bar-item.d.ts +6 -1
- package/generated/components/tool-bar-item.js +1 -1
- package/generated/components/tool-bar.d.ts +6 -1
- package/generated/components/tool-bar.js +1 -1
- package/generated/components/v-keyboard.d.ts +5 -0
- package/generated/components/v-stack.d.ts +7 -2
- package/generated/components/v-stack.js +2 -2
- 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/tab-view.d.ts +24 -8
- package/generated/events/text-field.d.ts +3 -1
- package/generated/events/toggle-view.d.ts +3 -1
- package/generated/internal/class/form-associated-base.js +1 -1
- package/generated/internal/utils/kebab-case.js +6 -9
- package/package.json +6 -4
- package/web-components.css-data/en.json +28 -0
- package/web-components.html-data/en.json +248 -82
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @summary A view that shows
|
|
2
|
+
* @summary A view that shows how far along a task is.
|
|
3
3
|
*
|
|
4
4
|
* @slot — The default slot.
|
|
5
5
|
* @slot current-value
|
|
@@ -14,3 +14,8 @@ export declare class ProgressView extends HTMLElement {
|
|
|
14
14
|
disconnectedCallback(): void;
|
|
15
15
|
connectedCallback(): void;
|
|
16
16
|
}
|
|
17
|
+
declare global {
|
|
18
|
+
interface HTMLElementTagNameMap {
|
|
19
|
+
'progress-view': ProgressView;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -6,7 +6,7 @@ import { html, queryMorph } from '../morphdom';
|
|
|
6
6
|
import { Snapshot } from '../snapshot';
|
|
7
7
|
const progressViewStyles = ['circular', 'linear'];
|
|
8
8
|
/**
|
|
9
|
-
* @summary A view that shows
|
|
9
|
+
* @summary A view that shows how far along a task is.
|
|
10
10
|
*
|
|
11
11
|
* @slot — The default slot.
|
|
12
12
|
* @slot current-value
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @summary A wrapper
|
|
2
|
+
* @summary A wrapper for {hv}-stacks
|
|
3
3
|
*/
|
|
4
4
|
export declare class ScrollViewProxy extends HTMLElement {
|
|
5
5
|
constructor();
|
|
6
6
|
disconnectedCallback(): void;
|
|
7
7
|
connectedCallback(): void;
|
|
8
8
|
}
|
|
9
|
+
declare global {
|
|
10
|
+
interface HTMLElementTagNameMap {
|
|
11
|
+
'scroll-view-proxy': ScrollViewProxy;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
+
* @summary A view that scrolls its content when it doesn’t fit the screen.
|
|
3
|
+
*
|
|
2
4
|
* @slot — The default slot.
|
|
3
5
|
* @slot top-bar-principal
|
|
4
6
|
* @slot bottom-bar-principal
|
|
@@ -13,3 +15,8 @@ export declare class ScrollView extends HTMLElement {
|
|
|
13
15
|
connectedCallback(): void;
|
|
14
16
|
centerScrollToElement(child: Element): void;
|
|
15
17
|
}
|
|
18
|
+
declare global {
|
|
19
|
+
interface HTMLElementTagNameMap {
|
|
20
|
+
'scroll-view': ScrollView;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -6,6 +6,8 @@ import { $, devFlags, frame, onoff, slowHideShow } from '../internal/utils';
|
|
|
6
6
|
import { html, queryMorph } from '../morphdom';
|
|
7
7
|
const observers = new ResizeObserverSingleton();
|
|
8
8
|
/**
|
|
9
|
+
* @summary A view that scrolls its content when it doesn’t fit the screen.
|
|
10
|
+
*
|
|
9
11
|
* @slot — The default slot.
|
|
10
12
|
* @slot top-bar-principal
|
|
11
13
|
* @slot bottom-bar-principal
|
|
@@ -5,3 +5,8 @@ export declare class SearchView extends InputBase {
|
|
|
5
5
|
static polyfillConnectedCallback(el: InputBase): void;
|
|
6
6
|
static polyfillAttributeChangedCallback([{ attributeName, target, oldValue }]: Pick<MutationRecord, 'attributeName' | 'oldValue' | 'target'>[]): void;
|
|
7
7
|
}
|
|
8
|
+
declare global {
|
|
9
|
+
interface HTMLElementTagNameMap {
|
|
10
|
+
'search-view': SearchView;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { CleanupRegistry } from '../internal/class/cleanup-registry';
|
|
2
2
|
import { devFlags, onoff } from '../internal/utils';
|
|
3
3
|
import { DialogBase } from '../namespace-browser/base';
|
|
4
|
+
/**
|
|
5
|
+
* @summary A dialog that slides up over the current screen.
|
|
6
|
+
*/
|
|
4
7
|
export class SheetView extends DialogBase {
|
|
5
8
|
constructor() {
|
|
6
9
|
super();
|
|
@@ -1,7 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @summary A control that shows or hides the sidebar view.
|
|
3
|
+
*/
|
|
1
4
|
export declare class SidebarToggle extends HTMLElement {
|
|
2
5
|
#private;
|
|
3
6
|
constructor();
|
|
4
|
-
connectedCallback(): void;
|
|
5
7
|
disconnectedCallback(): void;
|
|
8
|
+
connectedCallback(): void;
|
|
6
9
|
private static query;
|
|
7
10
|
}
|
|
11
|
+
declare global {
|
|
12
|
+
interface HTMLElementTagNameMap {
|
|
13
|
+
'sidebar-toggle': SidebarToggle;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -3,10 +3,19 @@ import { CleanupRegistry } from '../internal/class/cleanup-registry';
|
|
|
3
3
|
import { ResizeObserverSingleton } from '../internal/class/resize-observer-singleton';
|
|
4
4
|
import { debounce, devFlags, onoff } from '../internal/utils';
|
|
5
5
|
const observers = new ResizeObserverSingleton();
|
|
6
|
+
/**
|
|
7
|
+
* @summary A control that shows or hides the sidebar view.
|
|
8
|
+
*/
|
|
6
9
|
export class SidebarToggle extends HTMLElement {
|
|
7
10
|
constructor() {
|
|
8
11
|
super();
|
|
9
12
|
}
|
|
13
|
+
disconnectedCallback() {
|
|
14
|
+
if (devFlags.debug)
|
|
15
|
+
console.debug(`${_a.name} ⚡️ disconnect`);
|
|
16
|
+
observers.unobserve(this);
|
|
17
|
+
CleanupRegistry.unregister(this);
|
|
18
|
+
}
|
|
10
19
|
connectedCallback() {
|
|
11
20
|
if (devFlags.debug)
|
|
12
21
|
console.debug(`${_a.name} ⚡️ connect`);
|
|
@@ -18,12 +27,6 @@ export class SidebarToggle extends HTMLElement {
|
|
|
18
27
|
// @ts-expect-error
|
|
19
28
|
_a.#handleMeasure([entry]);
|
|
20
29
|
}
|
|
21
|
-
disconnectedCallback() {
|
|
22
|
-
if (devFlags.debug)
|
|
23
|
-
console.debug(`${_a.name} ⚡️ disconnect`);
|
|
24
|
-
observers.unobserve(this);
|
|
25
|
-
CleanupRegistry.unregister(this);
|
|
26
|
-
}
|
|
27
30
|
static query(target) {
|
|
28
31
|
const container = target?.closest('navigation-split-view,tab-view'), sideBar = container?.querySelector(':scope>[is=sidebar-view]');
|
|
29
32
|
return { container, sideBar };
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { CleanupRegistry } from '../internal/class/cleanup-registry';
|
|
2
2
|
import { devFlags, onoff, touchGlass } from '../internal/utils';
|
|
3
3
|
import { DialogBase } from '../namespace-browser/base';
|
|
4
|
+
/**
|
|
5
|
+
* @summary A container view that arranges navigation destinations in a single column.
|
|
6
|
+
*/
|
|
4
7
|
export class SidebarView extends DialogBase {
|
|
5
8
|
constructor() {
|
|
6
9
|
super();
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
export declare class StickyContainer extends HTMLElement {
|
|
2
2
|
#private;
|
|
3
3
|
constructor();
|
|
4
|
-
connectedCallback(): void;
|
|
5
4
|
disconnectedCallback(): void;
|
|
5
|
+
connectedCallback(): void;
|
|
6
|
+
}
|
|
7
|
+
declare global {
|
|
8
|
+
interface HTMLElementTagNameMap {
|
|
9
|
+
'sticky-container': StickyContainer;
|
|
10
|
+
}
|
|
6
11
|
}
|
|
@@ -4,17 +4,17 @@ export class StickyContainer extends HTMLElement {
|
|
|
4
4
|
constructor() {
|
|
5
5
|
super();
|
|
6
6
|
}
|
|
7
|
+
disconnectedCallback() {
|
|
8
|
+
if (devFlags.debug)
|
|
9
|
+
console.debug(`${StickyContainer.name} ⚡️ disconnect`);
|
|
10
|
+
CleanupRegistry.unregister(this);
|
|
11
|
+
}
|
|
7
12
|
connectedCallback() {
|
|
8
13
|
if (devFlags.debug)
|
|
9
14
|
console.debug(`${StickyContainer.name} ⚡️ connect`);
|
|
10
15
|
// CleanupRegistry.register(this, onoff('transitionend transitionstart transitioncancel', this.#handleTransitionrun as unknown as EventListener, this).on())
|
|
11
16
|
CleanupRegistry.register(this, onoff('transitionrun', this.#handleTransitionrun, this).on());
|
|
12
17
|
}
|
|
13
|
-
disconnectedCallback() {
|
|
14
|
-
if (devFlags.debug)
|
|
15
|
-
console.debug(`${StickyContainer.name} ⚡️ disconnect`);
|
|
16
|
-
CleanupRegistry.unregister(this);
|
|
17
|
-
}
|
|
18
18
|
#handleTransitionrun = ({ target, propertyName, pseudoElement }) => {
|
|
19
19
|
if (!(target instanceof HTMLElement))
|
|
20
20
|
return;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DialogBase } from '../namespace-browser/base';
|
|
2
2
|
/**
|
|
3
|
-
* @summary A
|
|
3
|
+
* @summary A container view that groups tab-items together along the top or bottom of the screen.
|
|
4
4
|
*/
|
|
5
5
|
export declare class TabBar extends DialogBase {
|
|
6
6
|
#private;
|
|
@@ -2,7 +2,7 @@ import { CleanupRegistry } from '../internal/class/cleanup-registry';
|
|
|
2
2
|
import { devFlags, onoff, touchGlass } from '../internal/utils';
|
|
3
3
|
import { DialogBase } from '../namespace-browser/base';
|
|
4
4
|
/**
|
|
5
|
-
* @summary A
|
|
5
|
+
* @summary A container view that groups tab-items together along the top or bottom of the screen.
|
|
6
6
|
*/
|
|
7
7
|
export class TabBar extends DialogBase {
|
|
8
8
|
constructor() {
|
|
@@ -2,6 +2,9 @@ import { CleanupRegistry } from '../internal/class/cleanup-registry';
|
|
|
2
2
|
import { devFlags, onoff } from '../internal/utils';
|
|
3
3
|
import { ButtonBase } from '../namespace-browser/base';
|
|
4
4
|
import { TabView } from './tab-view';
|
|
5
|
+
/**
|
|
6
|
+
* @summary A control that switches the tab view to this tab.
|
|
7
|
+
*/
|
|
5
8
|
export class TabItem extends ButtonBase {
|
|
6
9
|
constructor() {
|
|
7
10
|
super();
|
|
@@ -3,6 +3,7 @@ import { type NavigationStack } from './navigation-stack';
|
|
|
3
3
|
declare const TAB_BAR_PLACEMENTS: readonly ["bottom-bar", "ornament", "sidebar", "top-bar"];
|
|
4
4
|
export type TabBarPlacement = (typeof TAB_BAR_PLACEMENTS)[number];
|
|
5
5
|
/**
|
|
6
|
+
* @summary A container view that switches between screens using tabs.
|
|
6
7
|
*
|
|
7
8
|
* @cssprop --adaptable-tab-bar-placement
|
|
8
9
|
*
|
|
@@ -19,7 +20,12 @@ export declare class TabView extends HTMLElement {
|
|
|
19
20
|
get tabBarPlacement(): "bottom-bar" | "ornament" | "sidebar" | "top-bar" | undefined;
|
|
20
21
|
get moreTab(): NavigationStack | null;
|
|
21
22
|
connectedCallback(): void;
|
|
22
|
-
get selectedTab(): (
|
|
23
|
-
set selectedTab(tabs: (
|
|
23
|
+
get selectedTab(): (NavigationSplitView | NavigationStack)[];
|
|
24
|
+
set selectedTab(tabs: (NavigationSplitView | NavigationStack)[]);
|
|
25
|
+
}
|
|
26
|
+
declare global {
|
|
27
|
+
interface HTMLElementTagNameMap {
|
|
28
|
+
'tab-view': TabView;
|
|
29
|
+
}
|
|
24
30
|
}
|
|
25
31
|
export {};
|
|
@@ -6,6 +6,7 @@ import { $, cssTime, debounce, devFlags, frame, onoff, timeout } from '../intern
|
|
|
6
6
|
import { Snapshot } from '../snapshot';
|
|
7
7
|
const TAB_BAR_PLACEMENTS = ['bottom-bar', 'ornament', 'sidebar', 'top-bar'];
|
|
8
8
|
/**
|
|
9
|
+
* @summary A container view that switches between screens using tabs.
|
|
9
10
|
*
|
|
10
11
|
* @cssprop --adaptable-tab-bar-placement
|
|
11
12
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @summary
|
|
2
|
+
* @summary A container view that arranges data in rows and columns, optionally letting the user select one or more of them.
|
|
3
3
|
*
|
|
4
4
|
* @attr {title:trailing:subtitle|trailing:title:subtitle|title:subtitle:trailing|*} preferred-compact-template — Sets the template areas when the table is in compact mode
|
|
5
5
|
*
|
|
@@ -19,3 +19,8 @@ export declare class TableView extends HTMLElement {
|
|
|
19
19
|
disconnectedCallback(): void;
|
|
20
20
|
connectedCallback(): void;
|
|
21
21
|
}
|
|
22
|
+
declare global {
|
|
23
|
+
interface HTMLElementTagNameMap {
|
|
24
|
+
'table-view': TableView;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -6,7 +6,7 @@ import { $, devFlags, listActive, onoff } from '../internal/utils';
|
|
|
6
6
|
import { html, queryMorph } from '../morphdom';
|
|
7
7
|
import { Snapshot } from '../snapshot';
|
|
8
8
|
/**
|
|
9
|
-
* @summary
|
|
9
|
+
* @summary A container view that arranges data in rows and columns, optionally letting the user select one or more of them.
|
|
10
10
|
*
|
|
11
11
|
* @attr {title:trailing:subtitle|trailing:title:subtitle|title:subtitle:trailing|*} preferred-compact-template — Sets the template areas when the table is in compact mode
|
|
12
12
|
*
|
|
@@ -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 {};
|
|
@@ -14,7 +14,33 @@ const keyboardTypes = ['decimal-pad', 'number-pad', 'default'];
|
|
|
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 {boolean}
|
|
29
|
+
*/
|
|
30
|
+
'disable-autocorrection',
|
|
31
|
+
/**
|
|
32
|
+
* @type {decimal-pad|number-pad|default}
|
|
33
|
+
*/
|
|
34
|
+
'keyboard-type',
|
|
35
|
+
/**
|
|
36
|
+
* @type {boolean}
|
|
37
|
+
*/
|
|
38
|
+
'required',
|
|
39
|
+
/**
|
|
40
|
+
* @type {boolean}
|
|
41
|
+
*/
|
|
42
|
+
'disabled',
|
|
43
|
+
];
|
|
18
44
|
}
|
|
19
45
|
static #template;
|
|
20
46
|
static get template() {
|
|
@@ -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;
|
|
@@ -4,6 +4,8 @@ export type ToggleStyle = (typeof toggleStyles)[number];
|
|
|
4
4
|
/**
|
|
5
5
|
* @summary A control that switches between on and off states.
|
|
6
6
|
*
|
|
7
|
+
* @fires toggle:change — User toggled the control
|
|
8
|
+
*
|
|
7
9
|
* @slot label
|
|
8
10
|
* @slot validity-options
|
|
9
11
|
*/
|
|
@@ -20,15 +22,20 @@ export declare class ToggleView extends FormAssociatedBase {
|
|
|
20
22
|
set isOn(v: boolean);
|
|
21
23
|
/**
|
|
22
24
|
* Form participation property
|
|
23
|
-
* @type {string}
|
|
24
25
|
*/
|
|
25
26
|
get name(): string;
|
|
26
27
|
get value(): string | null;
|
|
27
28
|
set value(v: string | null);
|
|
28
29
|
setValidity: (flags?: ValidityStateFlags, message?: string, anchor?: HTMLElement) => void;
|
|
29
30
|
setCustomValidity: (message: string) => void;
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
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
|
+
}
|
|
33
40
|
}
|
|
34
41
|
export {};
|
|
@@ -8,12 +8,12 @@ const toggleStyles = ['switch', 'button'];
|
|
|
8
8
|
/**
|
|
9
9
|
* @summary A control that switches between on and off states.
|
|
10
10
|
*
|
|
11
|
+
* @fires toggle:change — User toggled the control
|
|
12
|
+
*
|
|
11
13
|
* @slot label
|
|
12
14
|
* @slot validity-options
|
|
13
15
|
*/
|
|
14
16
|
export class ToggleView extends FormAssociatedBase {
|
|
15
|
-
// declare addEventListener: TypedEventTargetMethods<ToggleViewEventMap>['addEventListener']
|
|
16
|
-
// declare removeEventListener: TypedEventTargetMethods<ToggleViewEventMap>['removeEventListener']
|
|
17
17
|
static get observedAttributes() {
|
|
18
18
|
return ['label', 'name', 'value', 'is-on', 'keyboard-type', 'required', 'disabled'];
|
|
19
19
|
}
|
|
@@ -164,7 +164,6 @@ export class ToggleView extends FormAssociatedBase {
|
|
|
164
164
|
};
|
|
165
165
|
/**
|
|
166
166
|
* Form participation property
|
|
167
|
-
* @type {string}
|
|
168
167
|
*/
|
|
169
168
|
get name() {
|
|
170
169
|
return this.getAttribute('name') ?? this.getAttribute('label') ?? this.querySelector(':scope>[slot=label]')?.textContent ?? '';
|
|
@@ -215,16 +214,19 @@ export class ToggleView extends FormAssociatedBase {
|
|
|
215
214
|
else
|
|
216
215
|
this.#sendValueToForm(false);
|
|
217
216
|
};
|
|
218
|
-
|
|
219
|
-
this
|
|
220
|
-
}
|
|
221
|
-
|
|
217
|
+
formStateRestoreCallback(state, reason) {
|
|
218
|
+
this.value = state;
|
|
219
|
+
}
|
|
220
|
+
formAssociatedCallback(form) {
|
|
221
|
+
this.#sendValueToForm(false);
|
|
222
|
+
}
|
|
223
|
+
formDisabledCallback(disabled) {
|
|
222
224
|
for (const el of this.#shadowRoot.querySelectorAll('input'))
|
|
223
225
|
el.toggleAttribute('disabled', !disabled);
|
|
224
|
-
}
|
|
225
|
-
formResetCallback
|
|
226
|
+
}
|
|
227
|
+
formResetCallback() {
|
|
226
228
|
this.value = '';
|
|
227
|
-
this.#sendValueToForm();
|
|
228
|
-
}
|
|
229
|
+
this.#sendValueToForm(false);
|
|
230
|
+
}
|
|
229
231
|
}
|
|
230
232
|
_a = ToggleView;
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* A
|
|
2
|
+
* @summary A container view that groups items together in the toolbar or navigation bar.
|
|
3
3
|
*/
|
|
4
4
|
export declare class ToolBarItemGroup extends HTMLElement {
|
|
5
5
|
constructor();
|
|
6
6
|
connectedCallback(): void;
|
|
7
7
|
disconnectedCallback(): void;
|
|
8
8
|
}
|
|
9
|
+
declare global {
|
|
10
|
+
interface HTMLElementTagNameMap {
|
|
11
|
+
'tool-bar-item-group': ToolBarItemGroup;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -9,7 +9,7 @@ import { CleanupRegistry } from '../internal/class/cleanup-registry';
|
|
|
9
9
|
import { adaptiveSlot } from '../internal/decorators';
|
|
10
10
|
import { devFlags } from '../internal/utils';
|
|
11
11
|
/**
|
|
12
|
-
* A
|
|
12
|
+
* @summary A container view that groups items together in the toolbar or navigation bar.
|
|
13
13
|
*/
|
|
14
14
|
let ToolBarItemGroup = ToolBarItemGroup_1 = class ToolBarItemGroup extends HTMLElement {
|
|
15
15
|
constructor() {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @summary A
|
|
2
|
+
* @summary A view placed in the toolbar or navigation bar.
|
|
3
3
|
*/
|
|
4
4
|
export declare class ToolBarItem extends HTMLElement {
|
|
5
5
|
#private;
|
|
@@ -9,3 +9,8 @@ export declare class ToolBarItem extends HTMLElement {
|
|
|
9
9
|
disconnectedCallback(): void;
|
|
10
10
|
connectedCallback(): void;
|
|
11
11
|
}
|
|
12
|
+
declare global {
|
|
13
|
+
interface HTMLElementTagNameMap {
|
|
14
|
+
'tool-bar-item': ToolBarItem;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -10,7 +10,7 @@ import { adaptiveSlot } from '../internal/decorators';
|
|
|
10
10
|
import { devFlags, ensurePlaceholder, onoff, touchGlass } from '../internal/utils';
|
|
11
11
|
import { Snapshot } from '../snapshot';
|
|
12
12
|
/**
|
|
13
|
-
* @summary A
|
|
13
|
+
* @summary A view placed in the toolbar or navigation bar.
|
|
14
14
|
*/
|
|
15
15
|
let ToolBarItem = ToolBarItem_1 = class ToolBarItem extends HTMLElement {
|
|
16
16
|
static get observedAttributes() {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @summary
|
|
2
|
+
* @summary A list of items placed into the toolbar or navigation bar around your content.
|
|
3
3
|
*
|
|
4
4
|
* @slot cancellation-action — The item represents a cancellation action for a modal interface. Places the item in the leading edge of the top bar and on the trailing edge of the bottom bar when fine modal
|
|
5
5
|
* @slot primary-action — The item represents a primary action. Places the item in the trailing edge of the top bar and on the trailing edge of the bottom bar when fine modal
|
|
@@ -19,3 +19,8 @@ export declare class ToolBar extends HTMLElement {
|
|
|
19
19
|
connectedCallback(): void;
|
|
20
20
|
disconnectedCallback(): void;
|
|
21
21
|
}
|
|
22
|
+
declare global {
|
|
23
|
+
interface HTMLElementTagNameMap {
|
|
24
|
+
'tool-bar': ToolBar;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -3,7 +3,7 @@ import { ResizeObserverSingleton } from '../internal/class/resize-observer-singl
|
|
|
3
3
|
import { $, devFlags } from '../internal/utils';
|
|
4
4
|
const observers = new ResizeObserverSingleton();
|
|
5
5
|
/**
|
|
6
|
-
* @summary
|
|
6
|
+
* @summary A list of items placed into the toolbar or navigation bar around your content.
|
|
7
7
|
*
|
|
8
8
|
* @slot cancellation-action — The item represents a cancellation action for a modal interface. Places the item in the leading edge of the top bar and on the trailing edge of the bottom bar when fine modal
|
|
9
9
|
* @slot primary-action — The item represents a primary action. Places the item in the trailing edge of the top bar and on the trailing edge of the bottom bar when fine modal
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
*
|
|
4
4
|
* @attr {leading|"leading fill"|center|trailing|fill|space-between} distribution — The distribution of cols
|
|
5
5
|
*
|
|
6
|
-
* @attr {@
|
|
6
|
+
* @attr {@Template} template — The main-axis grid template
|
|
7
7
|
*
|
|
8
|
-
* @attr {@
|
|
8
|
+
* @attr {@Spacing} spacing — The gap between the primary axis
|
|
9
9
|
*
|
|
10
10
|
* @attr {@inlineSet} alignment — The cross-axis alignment
|
|
11
11
|
* @attr {@blockSet} distribution — The main-axis alignment
|
|
@@ -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
|
+
}
|
|
@@ -4,9 +4,9 @@ import { devFlags } from '../internal/utils';
|
|
|
4
4
|
*
|
|
5
5
|
* @attr {leading|"leading fill"|center|trailing|fill|space-between} distribution — The distribution of cols
|
|
6
6
|
*
|
|
7
|
-
* @attr {@
|
|
7
|
+
* @attr {@Template} template — The main-axis grid template
|
|
8
8
|
*
|
|
9
|
-
* @attr {@
|
|
9
|
+
* @attr {@Spacing} spacing — The gap between the primary axis
|
|
10
10
|
*
|
|
11
11
|
* @attr {@inlineSet} alignment — The cross-axis alignment
|
|
12
12
|
* @attr {@blockSet} distribution — The main-axis alignment
|