@swiftwc/ui 0.0.0-dev.11 → 0.0.0-dev.111
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/css-data/en.json +28 -0
- 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 +24 -10
- package/generated/client/index.js +179 -194
- package/generated/components/alert-dialog.d.ts +11 -0
- package/generated/components/alert-dialog.js +94 -0
- package/generated/components/body-view.d.ts +8 -0
- package/generated/components/body-view.js +6 -2
- package/generated/components/bordered-button.d.ts +10 -0
- package/generated/components/bordered-button.js +36 -3
- package/generated/components/bordered-prominent-button.d.ts +10 -0
- package/generated/components/bordered-prominent-button.js +36 -3
- package/generated/components/borderless-button.d.ts +9 -1
- package/generated/components/borderless-button.js +29 -11
- package/generated/components/color-scheme.d.ts +12 -0
- package/generated/components/color-scheme.js +51 -0
- package/generated/components/confirmation-dialog.d.ts +4 -1
- package/generated/components/confirmation-dialog.js +38 -32
- package/generated/components/content-unavailable.d.ts +30 -0
- package/generated/components/content-unavailable.js +79 -0
- package/generated/components/date-picker.d.ts +21 -15
- package/generated/components/date-picker.js +126 -88
- package/generated/components/detail-placeholder.d.ts +11 -0
- package/generated/components/detail-placeholder.js +15 -0
- package/generated/components/disclosure-group.d.ts +8 -0
- package/generated/components/disclosure-group.js +18 -7
- package/generated/components/fine-tooltip.d.ts +15 -0
- package/generated/components/fine-tooltip.js +108 -0
- package/generated/components/form-view.d.ts +10 -0
- package/generated/components/form-view.js +8 -3
- package/generated/components/glass-button.d.ts +10 -0
- package/generated/components/glass-button.js +36 -3
- package/generated/components/glass-prominent-button.d.ts +10 -0
- package/generated/components/glass-prominent-button.js +36 -3
- package/generated/components/h-divider.d.ts +11 -0
- package/generated/components/h-divider.js +15 -0
- package/generated/components/h-stack.d.ts +22 -0
- package/generated/components/h-stack.js +24 -0
- package/generated/components/image-view.d.ts +18 -0
- package/generated/components/image-view.js +65 -0
- package/generated/components/index.d.ts +15 -3
- package/generated/components/index.js +15 -3
- package/generated/components/label-view.d.ts +19 -1
- package/generated/components/label-view.js +63 -62
- package/generated/components/labeled-content.d.ts +33 -0
- package/generated/components/labeled-content.js +160 -0
- package/generated/components/list-view.d.ts +14 -0
- package/generated/components/list-view.js +12 -17
- package/generated/components/menu-view.d.ts +12 -1
- package/generated/components/menu-view.js +63 -65
- package/generated/components/navigation-large-title.d.ts +11 -0
- package/generated/components/navigation-large-title.js +11 -5
- package/generated/components/navigation-split-view.d.ts +9 -1
- package/generated/components/navigation-split-view.js +10 -6
- package/generated/components/navigation-stack.d.ts +9 -1
- package/generated/components/navigation-stack.js +13 -11
- package/generated/components/navigation-title.d.ts +11 -1
- package/generated/components/navigation-title.js +58 -55
- package/generated/components/picker-view.d.ts +48 -7
- package/generated/components/picker-view.js +971 -261
- package/generated/components/plain-button.js +3 -3
- package/generated/components/progress-view.d.ts +20 -0
- package/generated/components/progress-view.js +120 -0
- package/generated/components/screen-view.js +2 -1
- package/generated/components/scroll-view-proxy.d.ts +13 -0
- package/generated/components/scroll-view-proxy.js +15 -0
- package/generated/components/scroll-view.d.ts +13 -1
- package/generated/components/scroll-view.js +140 -97
- package/generated/components/search-view.d.ts +12 -0
- package/generated/components/search-view.js +24 -0
- package/generated/components/section-view.d.ts +13 -1
- package/generated/components/section-view.js +38 -58
- package/generated/components/sheet-view.d.ts +4 -2
- package/generated/components/sheet-view.js +10 -39
- package/generated/components/sidebar-toggle.d.ts +9 -1
- package/generated/components/sidebar-toggle.js +46 -69
- package/generated/components/sidebar-view.d.ts +3 -0
- package/generated/components/sidebar-view.js +16 -9
- package/generated/components/sticky-container.d.ts +6 -1
- package/generated/components/sticky-container.js +9 -7
- package/generated/components/tab-bar.d.ts +3 -0
- package/generated/components/tab-bar.js +17 -13
- package/generated/components/tab-item.d.ts +3 -0
- package/generated/components/tab-item.js +20 -13
- package/generated/components/tab-view.d.ts +13 -4
- package/generated/components/tab-view.js +25 -89
- package/generated/components/table-view.d.ts +19 -0
- package/generated/components/table-view.js +88 -107
- package/generated/components/text-field.d.ts +19 -6
- package/generated/components/text-field.js +127 -99
- package/generated/components/text-view.d.ts +11 -0
- package/generated/components/text-view.js +16 -0
- package/generated/components/toggle-view.d.ts +43 -0
- package/generated/components/toggle-view.js +366 -0
- package/generated/components/tool-bar-item-group.d.ts +8 -0
- package/generated/components/tool-bar-item-group.js +22 -4
- package/generated/components/tool-bar-item.d.ts +12 -1
- package/generated/components/tool-bar-item.js +57 -10
- package/generated/components/tool-bar.d.ts +19 -0
- package/generated/components/tool-bar.js +48 -33
- package/generated/components/v-divider.d.ts +11 -0
- package/generated/components/v-divider.js +15 -0
- package/generated/components/v-keyboard.d.ts +8 -1
- package/generated/components/v-keyboard.js +11 -9
- package/generated/components/v-stack.d.ts +20 -0
- package/generated/components/v-stack.js +18 -2
- package/generated/css/index.css +4617 -1266
- package/generated/events/alert-dialog.d.ts +13 -0
- package/generated/events/alert-dialog.js +1 -0
- package/generated/events/confirmation-dialog.d.ts +7 -2
- package/generated/events/date-picker.d.ts +6 -1
- package/generated/events/index.d.ts +2 -0
- package/generated/events/index.js +2 -0
- package/generated/events/lifecycle-observer.d.ts +10 -2
- package/generated/events/picker-view.d.ts +22 -1
- package/generated/events/scroll-view.d.ts +10 -2
- package/generated/events/tab-view.d.ts +38 -8
- package/generated/events/text-field.d.ts +6 -1
- package/generated/events/toggle-view.d.ts +14 -0
- package/generated/events/toggle-view.js +1 -0
- package/generated/i18n/index.d.ts +19 -10
- package/generated/i18n/index.js +79 -54
- package/generated/i18n/locales/el.d.ts +16 -0
- package/generated/i18n/locales/el.js +16 -0
- package/generated/i18n/locales/en.d.ts +16 -0
- package/generated/i18n/locales/en.js +16 -0
- package/generated/i18n/locales/index.d.ts +4 -0
- package/generated/i18n/locales/index.js +4 -0
- package/generated/internal/class/css-style-observer.js +2 -2
- package/generated/internal/class/form-associated-base.d.ts +0 -4
- package/generated/internal/class/form-associated-base.js +22 -39
- package/generated/internal/class/mutation-observer-set.d.ts +9 -0
- package/generated/internal/class/mutation-observer-set.js +42 -0
- package/generated/internal/class/mutation-observer-singleton.js +18 -0
- package/generated/internal/class/navigation-view.d.ts +1 -1
- package/generated/internal/class/navigation-view.js +36 -43
- package/generated/internal/decorators/adaptive-slot.d.ts +1 -0
- package/generated/internal/decorators/adaptive-slot.js +47 -0
- package/generated/internal/decorators/custom-element.d.ts +1 -1
- package/generated/internal/decorators/custom-element.js +2 -1
- package/generated/internal/decorators/index.d.ts +6 -0
- package/generated/internal/decorators/index.js +6 -0
- package/generated/internal/decorators/microtask-on-connected.d.ts +39 -0
- package/generated/internal/decorators/microtask-on-connected.js +67 -0
- package/generated/internal/flags.d.ts +4 -0
- package/generated/internal/flags.js +1 -0
- package/generated/internal/privateNamespace.d.ts +10 -0
- package/generated/internal/privateNamespace.js +159 -1
- package/generated/internal/utils/$.d.ts +9 -0
- package/generated/internal/utils/$.js +11 -0
- package/generated/internal/utils/compare-big-decimals.js +7 -17
- package/generated/internal/utils/debug.d.ts +1 -0
- package/generated/internal/utils/debug.js +4 -0
- package/generated/internal/utils/define-translations.d.ts +1 -0
- package/generated/internal/utils/define-translations.js +3 -0
- package/generated/internal/utils/ensure-placeholder.d.ts +1 -0
- package/generated/internal/utils/ensure-placeholder.js +41 -0
- package/generated/internal/utils/index.d.ts +39 -2
- package/generated/internal/utils/index.js +39 -3
- package/generated/internal/utils/is-inside.d.ts +1 -0
- package/generated/internal/utils/is-inside.js +4 -0
- package/generated/internal/utils/kebab-case.js +6 -9
- package/generated/internal/utils/list-active.js +67 -12
- package/generated/internal/utils/touch-glass.js +5 -5
- package/generated/internal/vendor/morphdom.d.ts +6 -0
- package/generated/internal/vendor/morphdom.js +720 -0
- package/generated/morphdom/index.d.ts +8 -0
- package/generated/morphdom/index.js +8 -0
- package/generated/morphdom/morph.d.ts +4 -0
- package/generated/morphdom/morph.js +10 -0
- package/generated/morphdom/query-morph.d.ts +5 -0
- package/generated/morphdom/query-morph.js +12 -0
- package/generated/morphdom/render-to-string.d.ts +12 -0
- package/generated/morphdom/render-to-string.js +48 -0
- package/generated/morphdom/unsafe-html.d.ts +2 -0
- package/generated/morphdom/unsafe-html.js +4 -0
- package/generated/namespace-browser/base.d.ts +12 -3
- package/generated/namespace-browser/base.js +41 -18
- package/generated/namespace-browser/event.d.ts +10 -0
- package/generated/namespace-browser/event.js +1 -0
- package/generated/snapshot/index.d.ts +3 -1
- package/generated/snapshot/index.js +23 -2
- package/generated/tpl/html.d.ts +5 -0
- package/generated/tpl/html.js +7 -0
- package/generated/tpl/index.d.ts +6 -0
- package/generated/tpl/index.js +6 -0
- package/generated/tpl/is-template-result.d.ts +3 -0
- package/generated/tpl/is-template-result.js +1 -0
- package/generated/tpl/render.d.ts +2 -0
- package/generated/tpl/render.js +132 -0
- package/html-data/en.json +2620 -0
- package/package.json +32 -7
- package/scss/_components.scss +15 -0
- package/scss/_functions.scss +10 -0
- package/scss/_maps.scss +293 -0
- package/scss/_mixins.scss +4 -0
- package/scss/_transitions.scss +6 -1
- package/scss/_utils.scss +2 -0
- package/scss/_vars.scss +9 -115
- package/scss/base/_layout.scss +17 -7
- package/scss/base/_reboot.scss +34 -1
- package/scss/base/_root.scss +143 -124
- package/scss/colors/_index.scss +328 -88
- package/scss/components/_alert-dialog.scss +111 -0
- package/scss/components/_bordered-button.scss +37 -0
- package/scss/components/_bordered-prominent-button.scss +46 -0
- package/scss/components/_borderless-button.scss +26 -0
- package/scss/components/_confirmation-dialog.scss +41 -49
- package/scss/components/_content-unavailable.scss +57 -0
- package/scss/components/_date-picker.scss +15 -15
- package/scss/components/_detail-placeholder.scss +1 -3
- package/scss/components/_disclosure-group.scss +85 -34
- package/scss/components/_fine-tooltip.scss +84 -0
- package/scss/components/_form-view.scss +63 -24
- package/scss/components/_glass-button.scss +37 -0
- package/scss/components/_glass-prominent-button.scss +47 -0
- package/scss/components/_group-box.scss +27 -0
- package/scss/components/_h-flex-stack.scss +23 -0
- package/scss/components/_h-stack.scss +6 -17
- package/scss/components/_image-view.scss +20 -0
- package/scss/components/_index.scss +69 -36
- package/scss/components/_label-view copy.scss.txt +420 -0
- package/scss/components/_label-view.scss +105 -120
- package/scss/components/_label-view.scss.txt +536 -0
- package/scss/components/_labeled-content.scss +67 -1
- package/scss/components/_list-view.scss +70 -29
- package/scss/components/_menu-view.scss +96 -61
- package/scss/components/_navigation-large-title.scss +23 -0
- package/scss/components/_navigation-split-view.scss +3 -3
- package/scss/components/_navigation-title.scss +1 -1
- package/scss/components/_picker-view.scss +270 -63
- package/scss/components/_plain-button.scss +8 -0
- package/scss/components/_progress-view.scss +98 -0
- package/scss/components/_scroll-view-proxy.scss +24 -22
- package/scss/components/_scroll-view-toolbars.scss +8 -2
- package/scss/components/_scroll-view.scss +16 -0
- package/scss/components/_search-view.scss +23 -0
- package/scss/components/_section-view.scss +23 -22
- package/scss/components/_sheet-view.scss +16 -6
- package/scss/components/_sidebar-toggle.scss +1 -4
- package/scss/components/_sticky-container.scss +1 -1
- package/scss/components/_tab-bar.scss +17 -3
- package/scss/components/_tab-view.scss +12 -2
- package/scss/components/_table-column.scss +4 -2
- package/scss/components/_table-row.scss +71 -3
- package/scss/components/_table-view.scss +27 -18
- package/scss/components/_text-field.scss +37 -17
- package/scss/components/_text-view.scss +57 -0
- package/scss/components/_toggle-view.scss +171 -0
- package/scss/components/_tool-bar-item.scss +34 -82
- package/scss/components/_tool-bar.scss +77 -57
- package/scss/components/_v-stack.scss +8 -2
- package/scss/final/_touch-glass.scss +31 -0
- package/scss/mixins/_button.scss +44 -0
- package/scss/mixins/_color.scss +16 -0
- package/scss/mixins/_dialog.scss +1 -0
- package/scss/mixins/_index.scss +73 -5
- package/scss/placeholders/_buttons.scss +46 -11
- package/scss/placeholders/_lists.scss +159 -126
- package/scss/transitions/_alert-dialog.scss +18 -0
- package/scss/transitions/_confirmation-dialog.scss +8 -0
- package/scss/transitions/_fine-tooltip.scss +21 -0
- package/scss/transitions/_menu-view.scss +17 -15
- package/scss/transitions/_progress-view.scss +23 -0
- package/scss/transitions/_sheet-view.scss +30 -0
- package/scss/transitions/_tab-bar.scss +6 -5
- package/scss/utils/_background.scss +52 -0
- package/scss/utils/_frame.scss +59 -40
- package/scss/utils/_index.scss +45 -56
- package/scss/utils/_scroll-view.scss +1 -1
- package/scss/utils/_spacing.scss +1 -1
- package/scss/utils/_stacks.scss +34 -164
- package/generated/confirmation-dialog/index.d.ts +0 -1
- package/generated/confirmation-dialog/index.js +0 -1
- package/generated/internal/utils/cash/index.d.ts +0 -22
- package/generated/internal/utils/cash/index.js +0 -23
- package/generated/lifecycle-observer/index.d.ts +0 -1
- package/generated/lifecycle-observer/index.js +0 -1
- package/scss/transitions/_dialog.scss +0 -28
- package/web-components.html-data/en.json +0 -330
- /package/generated/internal/utils/{cash/ancestors.d.ts → ancestors.d.ts} +0 -0
- /package/generated/internal/utils/{cash/ancestors.js → ancestors.js} +0 -0
- /package/generated/internal/utils/{cash/next-all.d.ts → next-all.d.ts} +0 -0
- /package/generated/internal/utils/{cash/next-all.js → next-all.js} +0 -0
- /package/generated/internal/utils/{cash/next.d.ts → next.d.ts} +0 -0
- /package/generated/internal/utils/{cash/next.js → next.js} +0 -0
- /package/generated/internal/utils/{cash/prev-all.d.ts → prev-all.d.ts} +0 -0
- /package/generated/internal/utils/{cash/prev-all.js → prev-all.js} +0 -0
- /package/generated/internal/utils/{cash/prev.d.ts → prev.d.ts} +0 -0
- /package/generated/internal/utils/{cash/prev.js → prev.js} +0 -0
- /package/generated/internal/utils/{cash/prop.d.ts → prop.d.ts} +0 -0
- /package/generated/internal/utils/{cash/prop.js → prop.js} +0 -0
- /package/generated/internal/utils/{cash/siblings.d.ts → siblings.d.ts} +0 -0
- /package/generated/internal/utils/{cash/siblings.js → siblings.js} +0 -0
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
var _a;
|
|
2
|
+
import { CleanupRegistry } from '../internal/class/cleanup-registry';
|
|
3
|
+
import { $, debug, onoff } from '../internal/utils';
|
|
4
|
+
import { html } from '../tpl';
|
|
5
|
+
/**
|
|
6
|
+
* @summary A tooltip that shows an unobtrusive helpful message on pointer:fine screens. Use it by adding a `help` attribute to any element.
|
|
7
|
+
*/
|
|
8
|
+
export class FineTooltip extends HTMLElement {
|
|
9
|
+
constructor() {
|
|
10
|
+
super();
|
|
11
|
+
}
|
|
12
|
+
#handleTriggerRemovalMutation = (mutations) => {
|
|
13
|
+
if (this.#queryTrigger?.isConnected)
|
|
14
|
+
return;
|
|
15
|
+
this?.remove();
|
|
16
|
+
};
|
|
17
|
+
#handleTriggerAttrMutation = (mutations) => {
|
|
18
|
+
for (const { target, attributeName } of mutations)
|
|
19
|
+
if (target instanceof HTMLElement && attributeName)
|
|
20
|
+
this.#render(target.getAttribute(attributeName));
|
|
21
|
+
};
|
|
22
|
+
#handleMeasure = ([{ target, borderBoxSize }]) => {
|
|
23
|
+
debug(`${_a.name} ⚡️ measure`);
|
|
24
|
+
if (target.hasAttribute('closing'))
|
|
25
|
+
return;
|
|
26
|
+
if (!(target instanceof HTMLElement))
|
|
27
|
+
return;
|
|
28
|
+
const { top } = target.getBoundingClientRect();
|
|
29
|
+
const vpHeight = self.visualViewport?.height ?? 0, blockSize = borderBoxSize.at(0)?.blockSize ?? 0;
|
|
30
|
+
if (top > vpHeight - blockSize - 50) {
|
|
31
|
+
target.style.setProperty('position-area', 'top center');
|
|
32
|
+
target.style.setProperty('transform-origin', 'bottom');
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
#mutationObserver = new MutationObserver(this.#handleTriggerAttrMutation);
|
|
36
|
+
#mutationObserver2 = new MutationObserver(this.#handleTriggerRemovalMutation);
|
|
37
|
+
#resizeObserver = new ResizeObserver(this.#handleMeasure);
|
|
38
|
+
get #queryTrigger() {
|
|
39
|
+
const positionAnchor = this.style.positionAnchor;
|
|
40
|
+
if (!positionAnchor.startsWith('--help-'))
|
|
41
|
+
return;
|
|
42
|
+
const trigger = document.querySelector(`[style*="${CSS.escape(positionAnchor)}"][help]`);
|
|
43
|
+
return trigger ?? undefined;
|
|
44
|
+
}
|
|
45
|
+
#render = (str) => {
|
|
46
|
+
const label = this.querySelector(':scope>label-view') ?? this.appendChild($(html `<label-view></label-view>`, '>1'));
|
|
47
|
+
if (str)
|
|
48
|
+
label.setAttribute('title', str);
|
|
49
|
+
else
|
|
50
|
+
label.removeAttribute('title');
|
|
51
|
+
};
|
|
52
|
+
connectedCallback() {
|
|
53
|
+
debug(`${_a.name} ⚡️ connect`);
|
|
54
|
+
this.removeAttribute('closing');
|
|
55
|
+
this.popover = 'manual';
|
|
56
|
+
this.inert = true;
|
|
57
|
+
CleanupRegistry.register(this, onoff('toggle', this.#handleToggle, this).on());
|
|
58
|
+
CleanupRegistry.register(this, onoff('beforetoggle', this.#handleBeforetoggle, this).on());
|
|
59
|
+
this.showPopover();
|
|
60
|
+
}
|
|
61
|
+
disconnectedCallback() {
|
|
62
|
+
debug(`${_a.name} ⚡️ disconnect`);
|
|
63
|
+
this.#resizeObserver.unobserve(this);
|
|
64
|
+
this.#mutationObserver?.disconnect();
|
|
65
|
+
this.#mutationObserver2?.disconnect();
|
|
66
|
+
this.#queryTrigger?.style.removeProperty('anchor-name');
|
|
67
|
+
CleanupRegistry.unregister(this);
|
|
68
|
+
}
|
|
69
|
+
#handleToggle = ({ newState }) => {
|
|
70
|
+
if ('closed' !== newState)
|
|
71
|
+
return;
|
|
72
|
+
this.remove();
|
|
73
|
+
};
|
|
74
|
+
#handleBeforetoggle = (evt) => {
|
|
75
|
+
if ('open' !== evt.newState)
|
|
76
|
+
return;
|
|
77
|
+
const trigger = this.#queryTrigger;
|
|
78
|
+
if (!trigger) {
|
|
79
|
+
evt.preventDefault();
|
|
80
|
+
this.remove();
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
else {
|
|
84
|
+
this.#render(trigger.getAttribute('help'));
|
|
85
|
+
this.#mutationObserver.observe(trigger, {
|
|
86
|
+
attributes: true,
|
|
87
|
+
attributeFilter: ['help'],
|
|
88
|
+
});
|
|
89
|
+
this.#mutationObserver2.observe(document.body, {
|
|
90
|
+
childList: true,
|
|
91
|
+
subtree: true,
|
|
92
|
+
});
|
|
93
|
+
this.#resizeObserver.observe(this);
|
|
94
|
+
}
|
|
95
|
+
this.toggleAttribute('open', 'open' === evt.newState);
|
|
96
|
+
};
|
|
97
|
+
hidePopover() {
|
|
98
|
+
if (this.hasAttribute('closing'))
|
|
99
|
+
return;
|
|
100
|
+
this.setAttribute('closing', '');
|
|
101
|
+
Promise.allSettled(this.getAnimations().map(({ finished }) => finished)).then(() => {
|
|
102
|
+
if (!this.hasAttribute('closing'))
|
|
103
|
+
return;
|
|
104
|
+
this?.remove();
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
_a = FineTooltip;
|
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
import { FormBase } from '../namespace-browser/base';
|
|
2
|
+
/**
|
|
3
|
+
* @summary A container view that groups controls together for entering data, like a settings screen.
|
|
4
|
+
*
|
|
5
|
+
* @attr {hidden} navigation-link-indicator-visibility — Hides accessories like right-arrow-chevron on NavigationLink buttons inside.
|
|
6
|
+
*/
|
|
2
7
|
export declare class FormView extends FormBase {
|
|
3
8
|
constructor();
|
|
4
9
|
static polyfillDisconnectedCallback(el: HTMLFormElement): void;
|
|
5
10
|
static polyfillConnectedCallback(el: HTMLFormElement): void;
|
|
6
11
|
}
|
|
12
|
+
declare global {
|
|
13
|
+
interface HTMLElementTagNameMap {
|
|
14
|
+
'form-view': FormView;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -1,17 +1,22 @@
|
|
|
1
1
|
import { CleanupRegistry } from '../internal/class/cleanup-registry';
|
|
2
|
-
import { listActive, onoff } from '../internal/utils';
|
|
2
|
+
import { debug, listActive, onoff } from '../internal/utils';
|
|
3
3
|
import { FormBase } from '../namespace-browser/base';
|
|
4
|
+
/**
|
|
5
|
+
* @summary A container view that groups controls together for entering data, like a settings screen.
|
|
6
|
+
*
|
|
7
|
+
* @attr {hidden} navigation-link-indicator-visibility — Hides accessories like right-arrow-chevron on NavigationLink buttons inside.
|
|
8
|
+
*/
|
|
4
9
|
export class FormView extends FormBase {
|
|
5
10
|
constructor() {
|
|
6
11
|
super();
|
|
7
12
|
}
|
|
8
13
|
static polyfillDisconnectedCallback(el) {
|
|
9
|
-
|
|
14
|
+
debug(`${FormView.name} ⚡️ disconnect`);
|
|
10
15
|
// finally
|
|
11
16
|
CleanupRegistry.unregister(el);
|
|
12
17
|
}
|
|
13
18
|
static polyfillConnectedCallback(el) {
|
|
14
|
-
|
|
19
|
+
debug(`${FormView.name} ⚡️ connect`);
|
|
15
20
|
if (el.closest('[is=sidebar-view],[is=tab-bar]')) {
|
|
16
21
|
el.method = 'dialog';
|
|
17
22
|
el.noValidate = true;
|
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
import { ButtonBase } from '../namespace-browser/base';
|
|
2
|
+
/**
|
|
3
|
+
* @summary A control that starts an action. Styled with a glass border, adapting to the button’s surroundings.
|
|
4
|
+
*
|
|
5
|
+
* @example <button is="glass-button"><label-view system-image="hand-tap" title="Tap Me"></label-view></button> — Creating a glass button
|
|
6
|
+
*
|
|
7
|
+
* @slot overlay
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
2
10
|
export declare class GlassButton extends ButtonBase {
|
|
11
|
+
static get observedAttributes(): string[];
|
|
3
12
|
constructor();
|
|
4
13
|
static polyfillDisconnectedCallback(el: ButtonBase): void;
|
|
5
14
|
static polyfillConnectedCallback(el: ButtonBase): void;
|
|
15
|
+
static polyfillAttributeChangedCallback([{ attributeName, target, oldValue }]: Pick<MutationRecord, 'attributeName' | 'oldValue' | 'target'>[]): void;
|
|
6
16
|
}
|
|
@@ -1,17 +1,50 @@
|
|
|
1
1
|
import { CleanupRegistry } from '../internal/class/cleanup-registry';
|
|
2
|
-
import { onoff, touchGlass } from '../internal/utils';
|
|
2
|
+
import { debug, ensurePlaceholder, onoff, touchGlass } from '../internal/utils';
|
|
3
3
|
import { ButtonBase } from '../namespace-browser/base';
|
|
4
|
+
import { Snapshot } from '../snapshot';
|
|
5
|
+
/**
|
|
6
|
+
* @summary A control that starts an action. Styled with a glass border, adapting to the button’s surroundings.
|
|
7
|
+
*
|
|
8
|
+
* @example <button is="glass-button"><label-view system-image="hand-tap" title="Tap Me"></label-view></button> — Creating a glass button
|
|
9
|
+
*
|
|
10
|
+
* @slot overlay
|
|
11
|
+
*
|
|
12
|
+
*/
|
|
4
13
|
export class GlassButton extends ButtonBase {
|
|
14
|
+
static get observedAttributes() {
|
|
15
|
+
return [
|
|
16
|
+
/**
|
|
17
|
+
* A value that describes the purpose of a button
|
|
18
|
+
* @type {destructive|confirm}
|
|
19
|
+
*/
|
|
20
|
+
'role',
|
|
21
|
+
'title-key',
|
|
22
|
+
];
|
|
23
|
+
}
|
|
5
24
|
constructor() {
|
|
6
25
|
super();
|
|
7
26
|
}
|
|
8
27
|
static polyfillDisconnectedCallback(el) {
|
|
9
|
-
|
|
28
|
+
debug(`${GlassButton.name} ⚡️ disconnect`);
|
|
10
29
|
CleanupRegistry.unregister(el);
|
|
11
30
|
}
|
|
12
31
|
static polyfillConnectedCallback(el) {
|
|
13
|
-
|
|
32
|
+
debug(`${GlassButton.name} ⚡️ connect`);
|
|
14
33
|
CleanupRegistry.register(el, onoff(touchGlass(el, (t) => t, () => true), el).on());
|
|
15
34
|
el.tabIndex = 0;
|
|
16
35
|
}
|
|
36
|
+
static polyfillAttributeChangedCallback([{ attributeName, target, oldValue }]) {
|
|
37
|
+
debug(`${GlassButton.name} ⚡️ attr-change [${attributeName}] ("${oldValue}" → "${target.getAttribute(attributeName ?? '')}")`);
|
|
38
|
+
const node = target instanceof HTMLButtonElement;
|
|
39
|
+
if (!node)
|
|
40
|
+
return;
|
|
41
|
+
switch (attributeName) {
|
|
42
|
+
case 'title-key':
|
|
43
|
+
case 'role':
|
|
44
|
+
Snapshot.waitReady.then(() => {
|
|
45
|
+
ensurePlaceholder(target, target.getAttribute('role'), target.getAttribute('title-key'), Snapshot.config);
|
|
46
|
+
});
|
|
47
|
+
break;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
17
50
|
}
|
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
import { ButtonBase } from '../namespace-browser/base';
|
|
2
|
+
/**
|
|
3
|
+
* @summary A control that starts an action. Styled with a prominent glass border, adapting to the button’s surroundings.
|
|
4
|
+
*
|
|
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
|
+
*
|
|
7
|
+
* @slot overlay
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
2
10
|
export declare class GlassProminentButton extends ButtonBase {
|
|
11
|
+
static get observedAttributes(): string[];
|
|
3
12
|
constructor();
|
|
4
13
|
static polyfillDisconnectedCallback(el: ButtonBase): void;
|
|
5
14
|
static polyfillConnectedCallback(el: ButtonBase): void;
|
|
15
|
+
static polyfillAttributeChangedCallback([{ attributeName, target, oldValue }]: Pick<MutationRecord, 'attributeName' | 'oldValue' | 'target'>[]): void;
|
|
6
16
|
}
|
|
@@ -1,17 +1,50 @@
|
|
|
1
1
|
import { CleanupRegistry } from '../internal/class/cleanup-registry';
|
|
2
|
-
import { onoff, touchGlass } from '../internal/utils';
|
|
2
|
+
import { debug, ensurePlaceholder, onoff, touchGlass } from '../internal/utils';
|
|
3
3
|
import { ButtonBase } from '../namespace-browser/base';
|
|
4
|
+
import { Snapshot } from '../snapshot';
|
|
5
|
+
/**
|
|
6
|
+
* @summary A control that starts an action. Styled with a prominent glass border, adapting to the button’s surroundings.
|
|
7
|
+
*
|
|
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
|
+
*
|
|
10
|
+
* @slot overlay
|
|
11
|
+
*
|
|
12
|
+
*/
|
|
4
13
|
export class GlassProminentButton extends ButtonBase {
|
|
14
|
+
static get observedAttributes() {
|
|
15
|
+
return [
|
|
16
|
+
/**
|
|
17
|
+
* A value that describes the purpose of a button
|
|
18
|
+
* @type {destructive|confirm}
|
|
19
|
+
*/
|
|
20
|
+
'role',
|
|
21
|
+
'title-key',
|
|
22
|
+
];
|
|
23
|
+
}
|
|
5
24
|
constructor() {
|
|
6
25
|
super();
|
|
7
26
|
}
|
|
8
27
|
static polyfillDisconnectedCallback(el) {
|
|
9
|
-
|
|
28
|
+
debug(`${GlassProminentButton.name} ⚡️ disconnect`);
|
|
10
29
|
CleanupRegistry.unregister(el);
|
|
11
30
|
}
|
|
12
31
|
static polyfillConnectedCallback(el) {
|
|
13
|
-
|
|
32
|
+
debug(`${GlassProminentButton.name} ⚡️ connect`);
|
|
14
33
|
CleanupRegistry.register(el, onoff(touchGlass(el, (t) => t, () => true), el).on());
|
|
15
34
|
el.tabIndex = 0;
|
|
16
35
|
}
|
|
36
|
+
static polyfillAttributeChangedCallback([{ attributeName, target, oldValue }]) {
|
|
37
|
+
debug(`${GlassProminentButton.name} ⚡️ attr-change [${attributeName}] ("${oldValue}" → "${target.getAttribute(attributeName ?? '')}")`);
|
|
38
|
+
const node = target instanceof HTMLButtonElement;
|
|
39
|
+
if (!node)
|
|
40
|
+
return;
|
|
41
|
+
switch (attributeName) {
|
|
42
|
+
case 'title-key':
|
|
43
|
+
case 'role':
|
|
44
|
+
Snapshot.waitReady.then(() => {
|
|
45
|
+
ensurePlaceholder(target, target.getAttribute('role'), target.getAttribute('title-key'), Snapshot.config);
|
|
46
|
+
});
|
|
47
|
+
break;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
17
50
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare class HDivider extends HTMLElement {
|
|
2
|
+
constructor();
|
|
3
|
+
connectedCallback(): void;
|
|
4
|
+
disconnectedCallback(): void;
|
|
5
|
+
attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
|
|
6
|
+
}
|
|
7
|
+
declare global {
|
|
8
|
+
interface HTMLElementTagNameMap {
|
|
9
|
+
'h-divider': HDivider;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { debug } from '../internal/utils';
|
|
2
|
+
export class HDivider extends HTMLElement {
|
|
3
|
+
constructor() {
|
|
4
|
+
super();
|
|
5
|
+
}
|
|
6
|
+
connectedCallback() {
|
|
7
|
+
debug(`${HDivider.name} ⚡️ connect`);
|
|
8
|
+
}
|
|
9
|
+
disconnectedCallback() {
|
|
10
|
+
debug(`${HDivider.name} ⚡️ disconnect`);
|
|
11
|
+
}
|
|
12
|
+
attributeChangedCallback(name, oldValue, newValue) {
|
|
13
|
+
debug(`${HDivider.name} ⚡️ attr-change [${name}]`);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @summary A view that arranges its children side by side.
|
|
3
|
+
*
|
|
4
|
+
* @attr {@Template} template — The main-axis grid template
|
|
5
|
+
*
|
|
6
|
+
* @attr {@Spacing} spacing — The gap between the primary axis
|
|
7
|
+
*
|
|
8
|
+
* @attr {@blockSet} alignment — The cross-axis alignment
|
|
9
|
+
* @attr {@inlineSet} distribution — The main-axis alignment
|
|
10
|
+
* @attr {@inlinePlacementSet} placement — The main-axis alignment
|
|
11
|
+
*
|
|
12
|
+
*/
|
|
13
|
+
export declare class HStack extends HTMLElement {
|
|
14
|
+
constructor();
|
|
15
|
+
connectedCallback(): void;
|
|
16
|
+
disconnectedCallback(): void;
|
|
17
|
+
}
|
|
18
|
+
declare global {
|
|
19
|
+
interface HTMLElementTagNameMap {
|
|
20
|
+
'h-stack': HStack;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { debug } from '../internal/utils';
|
|
2
|
+
/**
|
|
3
|
+
* @summary A view that arranges its children side by side.
|
|
4
|
+
*
|
|
5
|
+
* @attr {@Template} template — The main-axis grid template
|
|
6
|
+
*
|
|
7
|
+
* @attr {@Spacing} spacing — The gap between the primary axis
|
|
8
|
+
*
|
|
9
|
+
* @attr {@blockSet} alignment — The cross-axis alignment
|
|
10
|
+
* @attr {@inlineSet} distribution — The main-axis alignment
|
|
11
|
+
* @attr {@inlinePlacementSet} placement — The main-axis alignment
|
|
12
|
+
*
|
|
13
|
+
*/
|
|
14
|
+
export class HStack extends HTMLElement {
|
|
15
|
+
constructor() {
|
|
16
|
+
super();
|
|
17
|
+
}
|
|
18
|
+
connectedCallback() {
|
|
19
|
+
debug(`${HStack.name} ⚡️ connect`);
|
|
20
|
+
}
|
|
21
|
+
disconnectedCallback() {
|
|
22
|
+
debug(`${HStack.name} ⚡️ disconnect`);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @summary A view that displays an image.
|
|
3
|
+
*
|
|
4
|
+
*/
|
|
5
|
+
export declare class ImageView extends HTMLElement {
|
|
6
|
+
#private;
|
|
7
|
+
static get observedAttributes(): string[];
|
|
8
|
+
static get template(): DocumentFragment;
|
|
9
|
+
constructor();
|
|
10
|
+
attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
|
|
11
|
+
disconnectedCallback(): void;
|
|
12
|
+
connectedCallback(): void;
|
|
13
|
+
}
|
|
14
|
+
declare global {
|
|
15
|
+
interface HTMLElementTagNameMap {
|
|
16
|
+
'image-view': ImageView;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { $, debug } from '../internal/utils';
|
|
2
|
+
import { queryMorph } from '../morphdom';
|
|
3
|
+
import { html } from '../tpl';
|
|
4
|
+
/**
|
|
5
|
+
* @summary A view that displays an image.
|
|
6
|
+
*
|
|
7
|
+
*/
|
|
8
|
+
export class ImageView extends HTMLElement {
|
|
9
|
+
static get observedAttributes() {
|
|
10
|
+
return ['system-name', 'system-weight'];
|
|
11
|
+
}
|
|
12
|
+
static #template;
|
|
13
|
+
static get template() {
|
|
14
|
+
return (this.#template ??= $(html `<slot></slot>`));
|
|
15
|
+
}
|
|
16
|
+
#shadowRoot;
|
|
17
|
+
constructor() {
|
|
18
|
+
super();
|
|
19
|
+
this.#shadowRoot = this.attachShadow({ mode: 'closed' });
|
|
20
|
+
this.#shadowRoot.appendChild(document.importNode(this.constructor.template, true));
|
|
21
|
+
}
|
|
22
|
+
attributeChangedCallback(name, oldValue, newValue) {
|
|
23
|
+
debug(`${ImageView.name} ⚡️ attr-change [${name}] ("${oldValue}" → "${newValue}")`);
|
|
24
|
+
if (oldValue === newValue)
|
|
25
|
+
return;
|
|
26
|
+
switch (name) {
|
|
27
|
+
case 'system-weight': {
|
|
28
|
+
this.#render(this.getAttribute('system-name'), newValue);
|
|
29
|
+
break;
|
|
30
|
+
}
|
|
31
|
+
case 'system-name': {
|
|
32
|
+
this.#render(newValue, this.getAttribute('system-weight'));
|
|
33
|
+
// // this.innerHTML = `<i style="line-height: 1.05" class="ph ph-${newValue}"></i>`
|
|
34
|
+
// //this.setAttribute('class', `ph ph-${newValue}`)
|
|
35
|
+
// let image = this.querySelector(':scope>:not([slot])')
|
|
36
|
+
// if (newValue) {
|
|
37
|
+
// const el = image ?? $(`<i style="line-height: 1"></i>`, '>1')
|
|
38
|
+
// el.setAttribute('class', `ph ph-${newValue}`)
|
|
39
|
+
// image ??= this.appendChild(el)
|
|
40
|
+
// // image ??= this.appendChild($(`<i style="line-height: 1.05"></i>`, '>1'))
|
|
41
|
+
// // image.setAttribute('class', `ph ph-${newValue}`)
|
|
42
|
+
// } else image?.remove()
|
|
43
|
+
break;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
#render(icon, weight) {
|
|
48
|
+
// if (!icon) {
|
|
49
|
+
// this.querySelector(':scope>:not([slot])')?.remove()
|
|
50
|
+
// return
|
|
51
|
+
// }
|
|
52
|
+
const tokens = [`ph${weight ? `-${weight}` : ''}`, `ph-${icon}`];
|
|
53
|
+
// const container = this.querySelector<HTMLElement>(':scope>:not([slot])') ?? this.appendChild<HTMLElement>($(`<i style="line-height: 1"></i>`, '>1'))
|
|
54
|
+
queryMorph(':not([slot])', html `<i style="line-height: 1" class="${tokens.join(' ')}"></i>`, this, { removeIf: !icon });
|
|
55
|
+
// if ('1' !== container.style.getPropertyValue('line-height')) container.style.setProperty('line-height', '1')
|
|
56
|
+
// for (const token of container.classList) if (token.startsWith('ph') && !tokens.includes(token)) container.classList.remove(token)
|
|
57
|
+
// container.classList.add(...tokens)
|
|
58
|
+
}
|
|
59
|
+
disconnectedCallback() {
|
|
60
|
+
debug(`${ImageView.name} ⚡️ disconnect`);
|
|
61
|
+
}
|
|
62
|
+
connectedCallback() {
|
|
63
|
+
debug(`${ImageView.name} ⚡️ connect`);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
@@ -1,17 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
* @file Automatically generated by barrelsby.
|
|
3
|
-
*/
|
|
1
|
+
export * from './alert-dialog';
|
|
4
2
|
export * from './body-view';
|
|
5
3
|
export * from './bordered-button';
|
|
6
4
|
export * from './bordered-prominent-button';
|
|
7
5
|
export * from './borderless-button';
|
|
6
|
+
export * from './color-scheme';
|
|
8
7
|
export * from './confirmation-dialog';
|
|
8
|
+
export * from './content-unavailable';
|
|
9
9
|
export * from './date-picker';
|
|
10
|
+
export * from './detail-placeholder';
|
|
10
11
|
export * from './disclosure-group';
|
|
12
|
+
export * from './fine-tooltip';
|
|
11
13
|
export * from './form-view';
|
|
12
14
|
export * from './glass-button';
|
|
13
15
|
export * from './glass-prominent-button';
|
|
16
|
+
export * from './h-divider';
|
|
17
|
+
export * from './h-stack';
|
|
18
|
+
export * from './image-view';
|
|
14
19
|
export * from './label-view';
|
|
20
|
+
export * from './labeled-content';
|
|
15
21
|
export * from './list-view';
|
|
16
22
|
export * from './menu-view';
|
|
17
23
|
export * from './navigation-large-title';
|
|
@@ -20,8 +26,11 @@ export * from './navigation-stack';
|
|
|
20
26
|
export * from './navigation-title';
|
|
21
27
|
export * from './picker-view';
|
|
22
28
|
export * from './plain-button';
|
|
29
|
+
export * from './progress-view';
|
|
23
30
|
export * from './screen-view';
|
|
31
|
+
export * from './scroll-view-proxy';
|
|
24
32
|
export * from './scroll-view';
|
|
33
|
+
export * from './search-view';
|
|
25
34
|
export * from './section-view';
|
|
26
35
|
export * from './sheet-view';
|
|
27
36
|
export * from './sidebar-toggle';
|
|
@@ -32,8 +41,11 @@ export * from './tab-item';
|
|
|
32
41
|
export * from './tab-view';
|
|
33
42
|
export * from './table-view';
|
|
34
43
|
export * from './text-field';
|
|
44
|
+
export * from './text-view';
|
|
45
|
+
export * from './toggle-view';
|
|
35
46
|
export * from './tool-bar-item-group';
|
|
36
47
|
export * from './tool-bar-item';
|
|
37
48
|
export * from './tool-bar';
|
|
49
|
+
export * from './v-divider';
|
|
38
50
|
export * from './v-keyboard';
|
|
39
51
|
export * from './v-stack';
|
|
@@ -1,17 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
* @file Automatically generated by barrelsby.
|
|
3
|
-
*/
|
|
1
|
+
export * from './alert-dialog';
|
|
4
2
|
export * from './body-view';
|
|
5
3
|
export * from './bordered-button';
|
|
6
4
|
export * from './bordered-prominent-button';
|
|
7
5
|
export * from './borderless-button';
|
|
6
|
+
export * from './color-scheme';
|
|
8
7
|
export * from './confirmation-dialog';
|
|
8
|
+
export * from './content-unavailable';
|
|
9
9
|
export * from './date-picker';
|
|
10
|
+
export * from './detail-placeholder';
|
|
10
11
|
export * from './disclosure-group';
|
|
12
|
+
export * from './fine-tooltip';
|
|
11
13
|
export * from './form-view';
|
|
12
14
|
export * from './glass-button';
|
|
13
15
|
export * from './glass-prominent-button';
|
|
16
|
+
export * from './h-divider';
|
|
17
|
+
export * from './h-stack';
|
|
18
|
+
export * from './image-view';
|
|
14
19
|
export * from './label-view';
|
|
20
|
+
export * from './labeled-content';
|
|
15
21
|
export * from './list-view';
|
|
16
22
|
export * from './menu-view';
|
|
17
23
|
export * from './navigation-large-title';
|
|
@@ -20,8 +26,11 @@ export * from './navigation-stack';
|
|
|
20
26
|
export * from './navigation-title';
|
|
21
27
|
export * from './picker-view';
|
|
22
28
|
export * from './plain-button';
|
|
29
|
+
export * from './progress-view';
|
|
23
30
|
export * from './screen-view';
|
|
31
|
+
export * from './scroll-view-proxy';
|
|
24
32
|
export * from './scroll-view';
|
|
33
|
+
export * from './search-view';
|
|
25
34
|
export * from './section-view';
|
|
26
35
|
export * from './sheet-view';
|
|
27
36
|
export * from './sidebar-toggle';
|
|
@@ -32,8 +41,11 @@ export * from './tab-item';
|
|
|
32
41
|
export * from './tab-view';
|
|
33
42
|
export * from './table-view';
|
|
34
43
|
export * from './text-field';
|
|
44
|
+
export * from './text-view';
|
|
45
|
+
export * from './toggle-view';
|
|
35
46
|
export * from './tool-bar-item-group';
|
|
36
47
|
export * from './tool-bar-item';
|
|
37
48
|
export * from './tool-bar';
|
|
49
|
+
export * from './v-divider';
|
|
38
50
|
export * from './v-keyboard';
|
|
39
51
|
export * from './v-stack';
|
|
@@ -1,9 +1,27 @@
|
|
|
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
|
|
8
|
+
*
|
|
9
|
+
* @attr {@Font} font — Sets the default font for text in this view.
|
|
10
|
+
*
|
|
11
|
+
* @slot — Any children without a `slot` attribute are placed in the title block.
|
|
12
|
+
* @slot icon — Use the `slot="icon"` attribute to place childen in the icon block.
|
|
13
|
+
*
|
|
14
|
+
* @cssprop {length} --label-gap — The gap between the icon and the title.
|
|
15
|
+
* @cssprop {number} --label-image-size — The size of the icon.
|
|
16
|
+
* @cssprop {length}--label-padding-inline — The padding inline of the label.
|
|
17
|
+
*
|
|
18
|
+
*/
|
|
1
19
|
export declare class LabelView extends HTMLElement {
|
|
2
20
|
#private;
|
|
3
21
|
static get observedAttributes(): string[];
|
|
4
22
|
static get template(): DocumentFragment;
|
|
5
23
|
constructor();
|
|
24
|
+
attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
|
|
6
25
|
disconnectedCallback(): void;
|
|
7
26
|
connectedCallback(): void;
|
|
8
|
-
attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
|
|
9
27
|
}
|