@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
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { DialogBase } from '../namespace-browser/base';
|
|
2
2
|
/**
|
|
3
|
-
* A representation of an alert presentation.
|
|
4
|
-
* Use it from the client module like `void alert('Save failed.')`.
|
|
3
|
+
* @summary A representation of an alert presentation. Use it from the client module like `void alert('Save failed.')`.
|
|
5
4
|
*/
|
|
6
5
|
export declare class AlertDialog extends DialogBase {
|
|
7
6
|
#private;
|
|
@@ -3,8 +3,7 @@ import { CleanupRegistry } from '../internal/class/cleanup-registry';
|
|
|
3
3
|
import { devFlags, onoff, touchGlass } from '../internal/utils';
|
|
4
4
|
import { DialogBase } from '../namespace-browser/base';
|
|
5
5
|
/**
|
|
6
|
-
* A representation of an alert presentation.
|
|
7
|
-
* Use it from the client module like `void alert('Save failed.')`.
|
|
6
|
+
* @summary A representation of an alert presentation. Use it from the client module like `void alert('Save failed.')`.
|
|
8
7
|
*/
|
|
9
8
|
export class AlertDialog extends DialogBase {
|
|
10
9
|
constructor() {
|
|
@@ -1,5 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @summary The content and behavior of the view.
|
|
3
|
+
*/
|
|
1
4
|
export declare class BodyView extends HTMLElement {
|
|
2
5
|
constructor();
|
|
3
6
|
disconnectedCallback(): void;
|
|
4
7
|
connectedCallback(): void;
|
|
5
8
|
}
|
|
9
|
+
declare global {
|
|
10
|
+
interface HTMLElementTagNameMap {
|
|
11
|
+
'body-view': BodyView;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ButtonBase } from '../namespace-browser/base';
|
|
2
2
|
/**
|
|
3
|
-
* @summary A control that
|
|
3
|
+
* @summary A control that starts an action. Styled with a standard border, adapting to the button’s surroundings.
|
|
4
4
|
*
|
|
5
|
-
* @example <button is="bordered-button"><label-view system-image="hand-tap" title="Tap Me"></label-view></button> — Creating a
|
|
5
|
+
* @example <button is="bordered-button"><label-view system-image="hand-tap" title="Tap Me"></label-view></button> — Creating a bordered button
|
|
6
6
|
*
|
|
7
7
|
* @slot overlay
|
|
8
8
|
*
|
|
@@ -3,9 +3,9 @@ import { devFlags, ensurePlaceholder, onoff } from '../internal/utils';
|
|
|
3
3
|
import { ButtonBase } from '../namespace-browser/base';
|
|
4
4
|
import { Snapshot } from '../snapshot';
|
|
5
5
|
/**
|
|
6
|
-
* @summary A control that
|
|
6
|
+
* @summary A control that starts an action. Styled with a standard border, adapting to the button’s surroundings.
|
|
7
7
|
*
|
|
8
|
-
* @example <button is="bordered-button"><label-view system-image="hand-tap" title="Tap Me"></label-view></button> — Creating a
|
|
8
|
+
* @example <button is="bordered-button"><label-view system-image="hand-tap" title="Tap Me"></label-view></button> — Creating a bordered button
|
|
9
9
|
*
|
|
10
10
|
* @slot overlay
|
|
11
11
|
*
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ButtonBase } from '../namespace-browser/base';
|
|
2
2
|
/**
|
|
3
|
-
* @summary A control that
|
|
3
|
+
* @summary A control that starts an action. Styled with a prominent border, adapting to the button’s surroundings.
|
|
4
4
|
*
|
|
5
|
-
* @example <button is="bordered-prominent-button"><label-view system-image="hand-tap" title="Tap Me"></label-view></button>
|
|
5
|
+
* @example <button is="bordered-prominent-button"><label-view system-image="hand-tap" title="Tap Me"></label-view></button> — Creating a prominent bordered button
|
|
6
6
|
*
|
|
7
7
|
* @slot overlay
|
|
8
8
|
*
|
|
@@ -3,9 +3,9 @@ import { devFlags, ensurePlaceholder, onoff } from '../internal/utils';
|
|
|
3
3
|
import { ButtonBase } from '../namespace-browser/base';
|
|
4
4
|
import { Snapshot } from '../snapshot';
|
|
5
5
|
/**
|
|
6
|
-
* @summary A control that
|
|
6
|
+
* @summary A control that starts an action. Styled with a prominent border, adapting to the button’s surroundings.
|
|
7
7
|
*
|
|
8
|
-
* @example <button is="bordered-prominent-button"><label-view system-image="hand-tap" title="Tap Me"></label-view></button>
|
|
8
|
+
* @example <button is="bordered-prominent-button"><label-view system-image="hand-tap" title="Tap Me"></label-view></button> — Creating a prominent bordered button
|
|
9
9
|
*
|
|
10
10
|
* @slot overlay
|
|
11
11
|
*
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ButtonBase } from '../namespace-browser/base';
|
|
2
2
|
/**
|
|
3
|
-
* @summary A control that
|
|
3
|
+
* @summary A control that starts an action. Styled without any borders.
|
|
4
4
|
*
|
|
5
|
-
* @example <button is="borderless-button"><label-view system-image="hand-tap" title="Tap Me"></label-view></button>
|
|
5
|
+
* @example <button is="borderless-button"><label-view system-image="hand-tap" title="Tap Me"></label-view></button> — Use the `is` attribute to style a `button` as a `borderless-button`
|
|
6
6
|
*
|
|
7
7
|
* @slot overlay
|
|
8
8
|
*
|
|
@@ -3,9 +3,9 @@ import { devFlags, ensurePlaceholder, onoff } from '../internal/utils';
|
|
|
3
3
|
import { ButtonBase } from '../namespace-browser/base';
|
|
4
4
|
import { Snapshot } from '../snapshot';
|
|
5
5
|
/**
|
|
6
|
-
* @summary A control that
|
|
6
|
+
* @summary A control that starts an action. Styled without any borders.
|
|
7
7
|
*
|
|
8
|
-
* @example <button is="borderless-button"><label-view system-image="hand-tap" title="Tap Me"></label-view></button>
|
|
8
|
+
* @example <button is="borderless-button"><label-view system-image="hand-tap" title="Tap Me"></label-view></button> — Use the `is` attribute to style a `button` as a `borderless-button`
|
|
9
9
|
*
|
|
10
10
|
* @slot overlay
|
|
11
11
|
*
|
|
@@ -5,3 +5,8 @@ export declare class ColorScheme extends HTMLElement {
|
|
|
5
5
|
disconnectedCallback(): void;
|
|
6
6
|
attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
|
|
7
7
|
}
|
|
8
|
+
declare global {
|
|
9
|
+
interface HTMLElementTagNameMap {
|
|
10
|
+
'color-scheme': ColorScheme;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @summary A message with a title and extra information that you show when part of your app can’t be used.
|
|
3
|
+
*
|
|
4
|
+
* @example <content-unavailable search></content-unavailable>
|
|
5
|
+
*
|
|
6
|
+
* @example <content-unavailable search="foo"></content-unavailable>
|
|
7
|
+
*
|
|
8
|
+
* @example <content-unavailable padding><label-view title="No Mail"><i class="ph ph-tray" slot="icon" foreground="secondary"></i></label-view><label-view title="New mails you receive will appear here." foreground="secondary" slot="description"></label-view><button is="borderless-button" type="button" tabindex="0" slot="actions"><label-view title="Switch Account"></label-view></button></content-unavailable>
|
|
9
|
+
*
|
|
10
|
+
* @example <content-unavailable padding><label-view title="No Mail"><svg slot="icon" foreground="secondary" ...>...</svg></label-view><label-view title="New mails you receive will appear here." foreground="secondary" slot="description"></label-view><button is="borderless-button" type="button" tabindex="0" slot="actions"><label-view title="Switch Account"></label-view></button></content-unavailable>
|
|
11
|
+
*
|
|
12
|
+
* @slot — The default slot.
|
|
13
|
+
* @slot description
|
|
14
|
+
* @slot actions
|
|
15
|
+
*
|
|
16
|
+
*/
|
|
17
|
+
export declare class ContentUnavailable extends HTMLElement {
|
|
18
|
+
#private;
|
|
19
|
+
static get observedAttributes(): string[];
|
|
20
|
+
static get template(): DocumentFragment;
|
|
21
|
+
constructor();
|
|
22
|
+
attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
|
|
23
|
+
disconnectedCallback(): void;
|
|
24
|
+
connectedCallback(): void;
|
|
25
|
+
}
|
|
26
|
+
declare global {
|
|
27
|
+
interface HTMLElementTagNameMap {
|
|
28
|
+
'content-unavailable': ContentUnavailable;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -4,20 +4,20 @@ import { $, devFlags, onoff } from '../internal/utils';
|
|
|
4
4
|
/**
|
|
5
5
|
* @summary A message with a title and extra information that you show when part of your app can’t be used.
|
|
6
6
|
*
|
|
7
|
-
* @example <content-unavailable
|
|
7
|
+
* @example <content-unavailable search></content-unavailable>
|
|
8
8
|
*
|
|
9
|
-
* @example <content-unavailable
|
|
9
|
+
* @example <content-unavailable search="foo"></content-unavailable>
|
|
10
10
|
*
|
|
11
|
-
* @example <content-unavailable
|
|
11
|
+
* @example <content-unavailable padding><label-view title="No Mail"><i class="ph ph-tray" slot="icon" foreground="secondary"></i></label-view><label-view title="New mails you receive will appear here." foreground="secondary" slot="description"></label-view><button is="borderless-button" type="button" tabindex="0" slot="actions"><label-view title="Switch Account"></label-view></button></content-unavailable>
|
|
12
12
|
*
|
|
13
|
-
* @example <content-unavailable
|
|
13
|
+
* @example <content-unavailable padding><label-view title="No Mail"><svg slot="icon" foreground="secondary" ...>...</svg></label-view><label-view title="New mails you receive will appear here." foreground="secondary" slot="description"></label-view><button is="borderless-button" type="button" tabindex="0" slot="actions"><label-view title="Switch Account"></label-view></button></content-unavailable>
|
|
14
14
|
*
|
|
15
15
|
* @slot — The default slot.
|
|
16
16
|
* @slot description
|
|
17
17
|
* @slot actions
|
|
18
18
|
*
|
|
19
19
|
*/
|
|
20
|
-
export class
|
|
20
|
+
export class ContentUnavailable extends HTMLElement {
|
|
21
21
|
static get observedAttributes() {
|
|
22
22
|
return ['search'];
|
|
23
23
|
}
|
|
@@ -48,7 +48,7 @@ export class ContentUnavailableView extends HTMLElement {
|
|
|
48
48
|
}
|
|
49
49
|
attributeChangedCallback(name, oldValue, newValue) {
|
|
50
50
|
if (devFlags.debug)
|
|
51
|
-
console.debug(`${
|
|
51
|
+
console.debug(`${ContentUnavailable.name} ⚡️ attr-change [${name}] ("${oldValue}" → "${newValue}")`);
|
|
52
52
|
switch (name) {
|
|
53
53
|
case 'search':
|
|
54
54
|
if (oldValue === newValue)
|
|
@@ -63,11 +63,11 @@ export class ContentUnavailableView extends HTMLElement {
|
|
|
63
63
|
}
|
|
64
64
|
disconnectedCallback() {
|
|
65
65
|
if (devFlags.debug)
|
|
66
|
-
console.debug(`${
|
|
66
|
+
console.debug(`${ContentUnavailable.name} ⚡️ disconnect`);
|
|
67
67
|
}
|
|
68
68
|
connectedCallback() {
|
|
69
69
|
if (devFlags.debug)
|
|
70
|
-
console.debug(`${
|
|
70
|
+
console.debug(`${ContentUnavailable.name} ⚡️ connect`);
|
|
71
71
|
}
|
|
72
72
|
#renderSearch = (search) => {
|
|
73
73
|
const titleLabel = this.querySelector(':scope>:not([slot])') ?? this.appendChild($(`<label-view><i class="ph ph-magnifying-glass" slot="icon" foreground="secondary"></i></label-view>`, '>1')), descText = this.querySelector(':scope>[slot=description]') ?? this.appendChild($(`<label-view foreground="secondary" slot="description"></label-view>`, '>1'));
|
|
@@ -2,7 +2,7 @@ import { FormAssociatedBase } from '../internal/class/form-associated-base';
|
|
|
2
2
|
declare const datePickerStyles: readonly ["graphical", "field", "automatic"];
|
|
3
3
|
export type DatePickerStyle = (typeof datePickerStyles)[number];
|
|
4
4
|
/**
|
|
5
|
-
* @summary A control
|
|
5
|
+
* @summary A control that selects an absolute date.
|
|
6
6
|
*/
|
|
7
7
|
export declare class DatePicker extends FormAssociatedBase {
|
|
8
8
|
#private;
|
|
@@ -15,7 +15,6 @@ export declare class DatePicker extends FormAssociatedBase {
|
|
|
15
15
|
get datePickerStyle(): DatePickerStyle;
|
|
16
16
|
/**
|
|
17
17
|
* Form participation property
|
|
18
|
-
* @type {string}
|
|
19
18
|
*/
|
|
20
19
|
get name(): string;
|
|
21
20
|
get value(): {
|
|
@@ -40,8 +39,14 @@ export declare class DatePicker extends FormAssociatedBase {
|
|
|
40
39
|
} | null;
|
|
41
40
|
setValidity: (flags?: ValidityStateFlags, message?: string, anchor?: HTMLElement) => void;
|
|
42
41
|
setCustomValidity: (message: string) => void;
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
42
|
+
formStateRestoreCallback(state: string, reason: string): void;
|
|
43
|
+
formAssociatedCallback(form: HTMLFormElement): void;
|
|
44
|
+
formDisabledCallback(disabled: boolean): void;
|
|
45
|
+
formResetCallback(): void;
|
|
46
|
+
}
|
|
47
|
+
declare global {
|
|
48
|
+
interface HTMLElementTagNameMap {
|
|
49
|
+
'date-picker': DatePicker;
|
|
50
|
+
}
|
|
46
51
|
}
|
|
47
52
|
export {};
|
|
@@ -7,7 +7,7 @@ import { $, clamp, devFlags, kebabCase, onoff, set } from '../internal/utils';
|
|
|
7
7
|
import { html, queryMorph } from '../morphdom';
|
|
8
8
|
const datePickerStyles = ['graphical', 'field', 'automatic'];
|
|
9
9
|
/**
|
|
10
|
-
* @summary A control
|
|
10
|
+
* @summary A control that selects an absolute date.
|
|
11
11
|
*/
|
|
12
12
|
export class DatePicker extends FormAssociatedBase {
|
|
13
13
|
static get observedAttributes() {
|
|
@@ -17,11 +17,17 @@ export class DatePicker extends FormAssociatedBase {
|
|
|
17
17
|
* @type {"graphical"|"field"|"automatic"}
|
|
18
18
|
*/
|
|
19
19
|
'date-picker-style',
|
|
20
|
+
/**
|
|
21
|
+
* @type {required}
|
|
22
|
+
*/
|
|
20
23
|
'required',
|
|
21
24
|
'prompt',
|
|
22
25
|
'label',
|
|
23
26
|
'name',
|
|
24
27
|
'selection',
|
|
28
|
+
/**
|
|
29
|
+
* @type {disabled}
|
|
30
|
+
*/
|
|
25
31
|
'disabled',
|
|
26
32
|
'minimum',
|
|
27
33
|
'maximum',
|
|
@@ -93,7 +99,7 @@ export class DatePicker extends FormAssociatedBase {
|
|
|
93
99
|
input.setAttribute('placeholder', map[input.name] ?? '');
|
|
94
100
|
break;
|
|
95
101
|
case 'label':
|
|
96
|
-
queryMorph('[slot=label]', html `<label-view slot="label" foreground="secondary">${newValue ? html `<span>${newValue}</span>` : null}</label-view>`, this);
|
|
102
|
+
queryMorph('[slot=label]', html `<label-view slot="label" foreground="secondary">${newValue ? html `<span>${newValue}</span>` : null}</label-view>`, this);
|
|
97
103
|
// this.#sendValueToForm()
|
|
98
104
|
break;
|
|
99
105
|
case 'disabled':
|
|
@@ -335,7 +341,6 @@ export class DatePicker extends FormAssociatedBase {
|
|
|
335
341
|
};
|
|
336
342
|
/**
|
|
337
343
|
* Form participation property
|
|
338
|
-
* @type {string}
|
|
339
344
|
*/
|
|
340
345
|
get name() {
|
|
341
346
|
return this.getAttribute('name') ?? this.getAttribute('label') ?? this.querySelector(':scope>[slot=label]')?.textContent ?? '';
|
|
@@ -453,20 +458,23 @@ export class DatePicker extends FormAssociatedBase {
|
|
|
453
458
|
else
|
|
454
459
|
this.#sendValueToForm(false);
|
|
455
460
|
};
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
}
|
|
459
|
-
|
|
461
|
+
formStateRestoreCallback(state, reason) {
|
|
462
|
+
//
|
|
463
|
+
}
|
|
464
|
+
formAssociatedCallback(form) {
|
|
465
|
+
this.#sendValueToForm(false);
|
|
466
|
+
}
|
|
467
|
+
formDisabledCallback(disabled) {
|
|
460
468
|
for (const input of this.#inputs)
|
|
461
469
|
input.toggleAttribute('disabled', !disabled);
|
|
462
|
-
}
|
|
463
|
-
formResetCallback
|
|
470
|
+
}
|
|
471
|
+
formResetCallback() {
|
|
464
472
|
this.#selectedDate = {
|
|
465
473
|
year: '',
|
|
466
474
|
month: '',
|
|
467
475
|
day: '',
|
|
468
476
|
};
|
|
469
|
-
this.#sendValueToForm();
|
|
470
|
-
}
|
|
477
|
+
this.#sendValueToForm(false);
|
|
478
|
+
}
|
|
471
479
|
}
|
|
472
480
|
_a = DatePicker;
|
|
@@ -7,3 +7,8 @@ export declare class FormView extends FormBase {
|
|
|
7
7
|
static polyfillDisconnectedCallback(el: HTMLFormElement): void;
|
|
8
8
|
static polyfillConnectedCallback(el: HTMLFormElement): void;
|
|
9
9
|
}
|
|
10
|
+
declare global {
|
|
11
|
+
interface HTMLElementTagNameMap {
|
|
12
|
+
'form-view': FormView;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ButtonBase } from '../namespace-browser/base';
|
|
2
2
|
/**
|
|
3
|
-
* @summary A control that
|
|
3
|
+
* @summary A control that starts an action. Styled with a glass border, adapting to the button’s surroundings.
|
|
4
4
|
*
|
|
5
|
-
* @example <button is="glass-button"><label-view system-image="hand-tap" title="Tap Me"></label-view></button>
|
|
5
|
+
* @example <button is="glass-button"><label-view system-image="hand-tap" title="Tap Me"></label-view></button> — Creating a glass button
|
|
6
6
|
*
|
|
7
7
|
* @slot overlay
|
|
8
8
|
*
|
|
@@ -3,9 +3,9 @@ import { devFlags, ensurePlaceholder, onoff, touchGlass } from '../internal/util
|
|
|
3
3
|
import { ButtonBase } from '../namespace-browser/base';
|
|
4
4
|
import { Snapshot } from '../snapshot';
|
|
5
5
|
/**
|
|
6
|
-
* @summary A control that
|
|
6
|
+
* @summary A control that starts an action. Styled with a glass border, adapting to the button’s surroundings.
|
|
7
7
|
*
|
|
8
|
-
* @example <button is="glass-button"><label-view system-image="hand-tap" title="Tap Me"></label-view></button>
|
|
8
|
+
* @example <button is="glass-button"><label-view system-image="hand-tap" title="Tap Me"></label-view></button> — Creating a glass button
|
|
9
9
|
*
|
|
10
10
|
* @slot overlay
|
|
11
11
|
*
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ButtonBase } from '../namespace-browser/base';
|
|
2
2
|
/**
|
|
3
|
-
* @summary A control that
|
|
3
|
+
* @summary A control that starts an action. Styled with a prominent glass border, adapting to the button’s surroundings.
|
|
4
4
|
*
|
|
5
|
-
* @example <button is="glass-prominent-button"><label-view system-image="hand-tap" title="Tap Me"></label-view></button>
|
|
5
|
+
* @example <button is="glass-prominent-button"><label-view system-image="hand-tap" title="Tap Me"></label-view></button> — Creating a prominent glass button
|
|
6
6
|
*
|
|
7
7
|
* @slot overlay
|
|
8
8
|
*
|
|
@@ -3,9 +3,9 @@ import { devFlags, ensurePlaceholder, onoff, touchGlass } from '../internal/util
|
|
|
3
3
|
import { ButtonBase } from '../namespace-browser/base';
|
|
4
4
|
import { Snapshot } from '../snapshot';
|
|
5
5
|
/**
|
|
6
|
-
* @summary A control that
|
|
6
|
+
* @summary A control that starts an action. Styled with a prominent glass border, adapting to the button’s surroundings.
|
|
7
7
|
*
|
|
8
|
-
* @example <button is="glass-prominent-button"><label-view system-image="hand-tap" title="Tap Me"></label-view></button>
|
|
8
|
+
* @example <button is="glass-prominent-button"><label-view system-image="hand-tap" title="Tap Me"></label-view></button> — Creating a prominent glass button
|
|
9
9
|
*
|
|
10
10
|
* @slot overlay
|
|
11
11
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @summary A view that arranges its
|
|
2
|
+
* @summary A view that arranges its children side by side.
|
|
3
3
|
*
|
|
4
4
|
* @attr {@templateSet} template — The main-axis grid template
|
|
5
5
|
*
|
|
@@ -15,3 +15,8 @@ export declare class HStack extends HTMLElement {
|
|
|
15
15
|
connectedCallback(): void;
|
|
16
16
|
disconnectedCallback(): void;
|
|
17
17
|
}
|
|
18
|
+
declare global {
|
|
19
|
+
interface HTMLElementTagNameMap {
|
|
20
|
+
'h-stack': HStack;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -5,7 +5,7 @@ export * from './bordered-prominent-button';
|
|
|
5
5
|
export * from './borderless-button';
|
|
6
6
|
export * from './color-scheme';
|
|
7
7
|
export * from './confirmation-dialog';
|
|
8
|
-
export * from './content-unavailable
|
|
8
|
+
export * from './content-unavailable';
|
|
9
9
|
export * from './date-picker';
|
|
10
10
|
export * from './disclosure-group';
|
|
11
11
|
export * from './fine-tooltip';
|
|
@@ -5,7 +5,7 @@ export * from './bordered-prominent-button';
|
|
|
5
5
|
export * from './borderless-button';
|
|
6
6
|
export * from './color-scheme';
|
|
7
7
|
export * from './confirmation-dialog';
|
|
8
|
-
export * from './content-unavailable
|
|
8
|
+
export * from './content-unavailable';
|
|
9
9
|
export * from './date-picker';
|
|
10
10
|
export * from './disclosure-group';
|
|
11
11
|
export * from './fine-tooltip';
|
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
|
+
* @summary A view that labels items with an icon and a title.
|
|
3
|
+
*
|
|
4
|
+
* @example <label-view><span>Hello world!</span></label-view> — Creating a label using a `span` element
|
|
5
|
+
* @example <label-view title="Hello world!"></label-view> — Creating a label using the `title` attribute
|
|
6
|
+
* @example <label-view system-image="hand-waving"><span>Hello world!</span></label-view> — Creating a label with an icon and a title using the `system-image` attribute
|
|
7
|
+
* @example <label-view><i slot="icon" class="ph ph-duotone ph-hand-waving"></i><span>Hello world!</span></label-view> — Creating a label with an icon and a title using the `icon` slot
|
|
2
8
|
*
|
|
3
9
|
* @attr {@fontSet} font — Sets the default font for text in this view.
|
|
4
10
|
*
|
|
5
|
-
* @slot —
|
|
6
|
-
* @slot icon
|
|
11
|
+
* @slot — Any children without a `slot` attribute are placed in the title block of the label.
|
|
12
|
+
* @slot icon — Use the `slot="icon"` attribute to place childen in the icon block of the label.
|
|
7
13
|
*
|
|
8
14
|
*/
|
|
9
15
|
export declare class LabelView extends HTMLElement {
|
|
@@ -1,16 +1,30 @@
|
|
|
1
1
|
import { $, devFlags } from '../internal/utils';
|
|
2
2
|
import { html, queryMorph } from '../morphdom';
|
|
3
3
|
/**
|
|
4
|
+
* @summary A view that labels items with an icon and a title.
|
|
5
|
+
*
|
|
6
|
+
* @example <label-view><span>Hello world!</span></label-view> — Creating a label using a `span` element
|
|
7
|
+
* @example <label-view title="Hello world!"></label-view> — Creating a label using the `title` attribute
|
|
8
|
+
* @example <label-view system-image="hand-waving"><span>Hello world!</span></label-view> — Creating a label with an icon and a title using the `system-image` attribute
|
|
9
|
+
* @example <label-view><i slot="icon" class="ph ph-duotone ph-hand-waving"></i><span>Hello world!</span></label-view> — Creating a label with an icon and a title using the `icon` slot
|
|
4
10
|
*
|
|
5
11
|
* @attr {@fontSet} font — Sets the default font for text in this view.
|
|
6
12
|
*
|
|
7
|
-
* @slot —
|
|
8
|
-
* @slot icon
|
|
13
|
+
* @slot — Any children without a `slot` attribute are placed in the title block of the label.
|
|
14
|
+
* @slot icon — Use the `slot="icon"` attribute to place childen in the icon block of the label.
|
|
9
15
|
*
|
|
10
16
|
*/
|
|
11
17
|
export class LabelView extends HTMLElement {
|
|
12
18
|
static get observedAttributes() {
|
|
13
|
-
return [
|
|
19
|
+
return [
|
|
20
|
+
'system-image',
|
|
21
|
+
'title',
|
|
22
|
+
'line-limit',
|
|
23
|
+
/**
|
|
24
|
+
* @type {tail}
|
|
25
|
+
*/
|
|
26
|
+
'truncation-mode',
|
|
27
|
+
];
|
|
14
28
|
}
|
|
15
29
|
static #template;
|
|
16
30
|
static get template() {
|
|
@@ -51,10 +65,10 @@ export class LabelView extends HTMLElement {
|
|
|
51
65
|
// )
|
|
52
66
|
// break
|
|
53
67
|
case 'system-image':
|
|
54
|
-
queryMorph('[slot=icon]', html `<image-view slot="icon" system-name="${newValue}"></image-view>`, this, { removeIf: !newValue });
|
|
68
|
+
queryMorph('[slot=icon]', html `<image-view slot="icon" system-name="${newValue}"></image-view>`, this, { removeIf: !newValue });
|
|
55
69
|
break;
|
|
56
70
|
case 'title':
|
|
57
|
-
queryMorph(':not([slot])', html `<span>${newValue}</span>`, this, { removeIf: !newValue });
|
|
71
|
+
queryMorph(':not([slot])', html `<span>${newValue}</span>`, this, { removeIf: !newValue });
|
|
58
72
|
break;
|
|
59
73
|
}
|
|
60
74
|
}
|
|
@@ -2,7 +2,17 @@ import { $, devFlags } from '../internal/utils';
|
|
|
2
2
|
import { html, queryMorph } from '../morphdom';
|
|
3
3
|
export class LabeledContent extends HTMLElement {
|
|
4
4
|
static get observedAttributes() {
|
|
5
|
-
return [
|
|
5
|
+
return [
|
|
6
|
+
'value',
|
|
7
|
+
'label',
|
|
8
|
+
'header',
|
|
9
|
+
'footer',
|
|
10
|
+
/**
|
|
11
|
+
* @type {vertical|horizontal}
|
|
12
|
+
*/
|
|
13
|
+
'labeled-content-style',
|
|
14
|
+
'format',
|
|
15
|
+
];
|
|
6
16
|
}
|
|
7
17
|
static #template;
|
|
8
18
|
static get template() {
|
|
@@ -71,16 +81,16 @@ export class LabeledContent extends HTMLElement {
|
|
|
71
81
|
break;
|
|
72
82
|
case 'value': {
|
|
73
83
|
const val = this.#fmt(newValue, this.getAttribute('format'));
|
|
74
|
-
queryMorph('label-view:not([slot])', html `<label-view>${val ? html `<span>${val}</span>` : null}</label-view>`, this);
|
|
84
|
+
queryMorph('label-view:not([slot])', html `<label-view>${val ? html `<span>${val}</span>` : null}</label-view>`, this);
|
|
75
85
|
break;
|
|
76
86
|
}
|
|
77
87
|
case 'format': {
|
|
78
88
|
const val = this.#fmt(this.getAttribute('value'), newValue);
|
|
79
|
-
queryMorph('label-view:not([slot])', html `<label-view>${val ? html `<span>${val}</span>` : null}</label-view>`, this);
|
|
89
|
+
queryMorph('label-view:not([slot])', html `<label-view>${val ? html `<span>${val}</span>` : null}</label-view>`, this);
|
|
80
90
|
break;
|
|
81
91
|
}
|
|
82
92
|
case 'label':
|
|
83
|
-
queryMorph('[slot=label]', html `<label-view slot="label">${newValue ? html `<span>${newValue}</span>` : null}</label-view>`, this);
|
|
93
|
+
queryMorph('[slot=label]', html `<label-view slot="label">${newValue ? html `<span>${newValue}</span>` : null}</label-view>`, this);
|
|
84
94
|
break;
|
|
85
95
|
}
|
|
86
96
|
}
|
|
@@ -4,20 +4,8 @@ import { devFlags, listActive, onoff } from '../internal/utils';
|
|
|
4
4
|
* @attr {hidden} navigation-link-indicator-visibility — Hides accessories like right-arrow-chevron on NavigationLink buttons inside.
|
|
5
5
|
*/
|
|
6
6
|
export class ListView extends HTMLElement {
|
|
7
|
-
// static #template: DocumentFragment
|
|
8
|
-
// static get template() {
|
|
9
|
-
// return (this.#template ??= $(
|
|
10
|
-
// String.raw`
|
|
11
|
-
// <slot name="searchable"></slot>
|
|
12
|
-
// <slot></slot>
|
|
13
|
-
// `
|
|
14
|
-
// ))
|
|
15
|
-
// }
|
|
16
|
-
// #shadowRoot
|
|
17
7
|
constructor() {
|
|
18
8
|
super();
|
|
19
|
-
// this.#shadowRoot = this.attachShadow({ mode: 'closed' })
|
|
20
|
-
// this.#shadowRoot.appendChild(document.importNode((this.constructor as typeof ListView).template, true))
|
|
21
9
|
}
|
|
22
10
|
disconnectedCallback() {
|
|
23
11
|
if (devFlags.debug)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @summary A control
|
|
2
|
+
* @summary A control that opens a menu of actions.
|
|
3
3
|
*
|
|
4
4
|
* @slot — The default slot.
|
|
5
5
|
* @slot label
|
|
@@ -13,3 +13,8 @@ export declare class MenuView extends HTMLElement {
|
|
|
13
13
|
disconnectedCallback(): void;
|
|
14
14
|
connectedCallback(): void;
|
|
15
15
|
}
|
|
16
|
+
declare global {
|
|
17
|
+
interface HTMLElementTagNameMap {
|
|
18
|
+
'menu-view': MenuView;
|
|
19
|
+
}
|
|
20
|
+
}
|