@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
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var _a;
|
|
2
2
|
import { CleanupRegistry } from '../internal/class/cleanup-registry';
|
|
3
3
|
import { CSSStyleObserver } from '../internal/class/css-style-observer';
|
|
4
|
-
import { add, frame, onoff, slowHideShow, timeout } from '../internal/utils';
|
|
4
|
+
import { add, debug, frame, onoff, slowHideShow, timeout } from '../internal/utils';
|
|
5
5
|
import { Snapshot } from '../snapshot';
|
|
6
6
|
const observing = new WeakSet();
|
|
7
7
|
function observeResizeEnd(el, callback, stableFrames = 4) {
|
|
@@ -67,6 +67,12 @@ function isIntersectingWithContainer(el, container, rootMargin = '0px 0px 0px 0p
|
|
|
67
67
|
};
|
|
68
68
|
return !(elRect.bottom < marginRect.top || elRect.top > marginRect.bottom || elRect.right < marginRect.left || elRect.left > marginRect.right);
|
|
69
69
|
}
|
|
70
|
+
/**
|
|
71
|
+
*
|
|
72
|
+
* @attr {boolean} padding
|
|
73
|
+
* @attr {boolean} navigation-bar-auto-hide
|
|
74
|
+
*
|
|
75
|
+
*/
|
|
70
76
|
export class NavigationLargeTitle extends HTMLElement {
|
|
71
77
|
#styleObserver;
|
|
72
78
|
#scrollObserver;
|
|
@@ -76,13 +82,13 @@ export class NavigationLargeTitle extends HTMLElement {
|
|
|
76
82
|
super();
|
|
77
83
|
}
|
|
78
84
|
disconnectedCallback() {
|
|
79
|
-
|
|
85
|
+
debug(`${_a.name} ⚡️ disconnect`);
|
|
80
86
|
this.#clearScrollState();
|
|
81
87
|
this.#styleObserver?.disconnect();
|
|
82
88
|
CleanupRegistry.unregister(this);
|
|
83
89
|
}
|
|
84
90
|
connectedCallback() {
|
|
85
|
-
|
|
91
|
+
debug(`${_a.name} ⚡️ connect`);
|
|
86
92
|
const root = this.closest('scroll-view') ?? undefined;
|
|
87
93
|
if (!root)
|
|
88
94
|
return;
|
|
@@ -105,7 +111,7 @@ export class NavigationLargeTitle extends HTMLElement {
|
|
|
105
111
|
});
|
|
106
112
|
}
|
|
107
113
|
#handleStyleChange = () => {
|
|
108
|
-
|
|
114
|
+
debug(`${_a.name} ⚡️ style`);
|
|
109
115
|
const root = this.closest('scroll-view') ?? undefined;
|
|
110
116
|
if (!root)
|
|
111
117
|
return;
|
|
@@ -150,7 +156,7 @@ export class NavigationLargeTitle extends HTMLElement {
|
|
|
150
156
|
// this.#applySlowness(root, isIntersecting)
|
|
151
157
|
// }
|
|
152
158
|
#handleIntersect = (entries, { root }) => {
|
|
153
|
-
|
|
159
|
+
debug(`${_a.name} ⚡️ intersect (${entries?.at(0)?.isIntersecting})`);
|
|
154
160
|
if (!(root instanceof HTMLElement))
|
|
155
161
|
return;
|
|
156
162
|
for (const { isIntersecting } of entries)
|
|
@@ -1,7 +1,15 @@
|
|
|
1
1
|
import { NavigationView } from '../internal/class/navigation-view';
|
|
2
|
+
/**
|
|
3
|
+
* @summary A container view with two or three side-by-side screens, where what the user chooses in the left screen changes what appears in the next screen.
|
|
4
|
+
*/
|
|
2
5
|
export declare class NavigationSplitView extends NavigationView {
|
|
3
6
|
constructor();
|
|
7
|
+
attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
|
|
4
8
|
disconnectedCallback(): void;
|
|
5
9
|
connectedCallback(): void;
|
|
6
|
-
|
|
10
|
+
}
|
|
11
|
+
declare global {
|
|
12
|
+
interface HTMLElementTagNameMap {
|
|
13
|
+
'navigation-split-view': NavigationSplitView;
|
|
14
|
+
}
|
|
7
15
|
}
|
|
@@ -1,18 +1,22 @@
|
|
|
1
1
|
import { NavigationView } from '../internal/class/navigation-view';
|
|
2
|
+
import { debug } from '../internal/utils';
|
|
3
|
+
/**
|
|
4
|
+
* @summary A container view with two or three side-by-side screens, where what the user chooses in the left screen changes what appears in the next screen.
|
|
5
|
+
*/
|
|
2
6
|
export class NavigationSplitView extends NavigationView {
|
|
3
7
|
constructor() {
|
|
4
8
|
super();
|
|
5
9
|
}
|
|
10
|
+
attributeChangedCallback(name, oldValue, newValue) {
|
|
11
|
+
debug(`${NavigationSplitView.name} ⚡️ attr-change [${name}] ("${oldValue}" → "${newValue}")`);
|
|
12
|
+
super.attributeChangedCallback(name, oldValue, newValue);
|
|
13
|
+
}
|
|
6
14
|
disconnectedCallback() {
|
|
7
|
-
|
|
15
|
+
debug(`${NavigationSplitView.name} ⚡️ disconnect`);
|
|
8
16
|
super.disconnectedCallback();
|
|
9
17
|
}
|
|
10
18
|
connectedCallback() {
|
|
11
|
-
|
|
19
|
+
debug(`${NavigationSplitView.name} ⚡️ connect`);
|
|
12
20
|
super.connectedCallback();
|
|
13
21
|
}
|
|
14
|
-
attributeChangedCallback(name, oldValue, newValue) {
|
|
15
|
-
console.debug(`${NavigationSplitView.name} ⚡️ attr-change [${name}] ("${oldValue}" → "${newValue}")`);
|
|
16
|
-
super.attributeChangedCallback(name, oldValue, newValue);
|
|
17
|
-
}
|
|
18
22
|
}
|
|
@@ -1,7 +1,15 @@
|
|
|
1
1
|
import { NavigationView } from '../internal/class/navigation-view';
|
|
2
|
+
/**
|
|
3
|
+
* @summary A container view that shows a main screen and lets the user open other screens on top of it.
|
|
4
|
+
*/
|
|
2
5
|
export declare class NavigationStack extends NavigationView {
|
|
3
6
|
constructor();
|
|
7
|
+
attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
|
|
4
8
|
disconnectedCallback(): void;
|
|
5
9
|
connectedCallback(): void;
|
|
6
|
-
|
|
10
|
+
}
|
|
11
|
+
declare global {
|
|
12
|
+
interface HTMLElementTagNameMap {
|
|
13
|
+
'navigation-stack': NavigationStack;
|
|
14
|
+
}
|
|
7
15
|
}
|
|
@@ -1,24 +1,26 @@
|
|
|
1
1
|
import { NavigationView } from '../internal/class/navigation-view';
|
|
2
|
+
import { debug } from '../internal/utils';
|
|
3
|
+
/**
|
|
4
|
+
* @summary A container view that shows a main screen and lets the user open other screens on top of it.
|
|
5
|
+
*/
|
|
2
6
|
export class NavigationStack extends NavigationView {
|
|
3
7
|
constructor() {
|
|
4
8
|
super();
|
|
5
9
|
}
|
|
6
|
-
disconnectedCallback() {
|
|
7
|
-
console.debug(`${NavigationStack.name} ⚡️ disconnect`);
|
|
8
|
-
super.disconnectedCallback();
|
|
9
|
-
}
|
|
10
|
-
connectedCallback() {
|
|
11
|
-
console.debug(`${NavigationStack.name} ⚡️ connect`);
|
|
12
|
-
super.connectedCallback();
|
|
13
|
-
}
|
|
14
10
|
attributeChangedCallback(name, oldValue, newValue) {
|
|
15
|
-
|
|
11
|
+
debug(`${NavigationStack.name} ⚡️ attr-change [${name}] ("${oldValue}" → "${newValue}")`);
|
|
16
12
|
super.attributeChangedCallback(name, oldValue, newValue);
|
|
17
|
-
// Snapshot.waitReady.then(() => {
|
|
18
13
|
switch (name) {
|
|
19
14
|
case 'hidden':
|
|
20
15
|
break;
|
|
21
16
|
}
|
|
22
|
-
|
|
17
|
+
}
|
|
18
|
+
disconnectedCallback() {
|
|
19
|
+
debug(`${NavigationStack.name} ⚡️ disconnect`);
|
|
20
|
+
super.disconnectedCallback();
|
|
21
|
+
}
|
|
22
|
+
connectedCallback() {
|
|
23
|
+
debug(`${NavigationStack.name} ⚡️ connect`);
|
|
24
|
+
super.connectedCallback();
|
|
23
25
|
}
|
|
24
26
|
}
|
|
@@ -1,8 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @summary A container view.
|
|
3
|
+
*
|
|
4
|
+
* @attr {boolean} padding
|
|
5
|
+
*/
|
|
1
6
|
export declare class NavigationTitle extends HTMLElement {
|
|
2
7
|
#private;
|
|
3
8
|
static get observedAttributes(): string[];
|
|
4
9
|
constructor();
|
|
10
|
+
attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
|
|
5
11
|
disconnectedCallback(): void;
|
|
6
12
|
connectedCallback(): void;
|
|
7
|
-
|
|
13
|
+
}
|
|
14
|
+
declare global {
|
|
15
|
+
interface HTMLElementTagNameMap {
|
|
16
|
+
'navigation-title': NavigationTitle;
|
|
17
|
+
}
|
|
8
18
|
}
|
|
@@ -1,66 +1,69 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var NavigationTitle_1;
|
|
8
|
+
import { microtaskOnConnected } from '../internal/decorators';
|
|
9
|
+
import { debug } from '../internal/utils';
|
|
10
|
+
import { queryMorph } from '../morphdom';
|
|
11
|
+
import { html } from '../tpl';
|
|
12
|
+
/**
|
|
13
|
+
* @summary A container view.
|
|
14
|
+
*
|
|
15
|
+
* @attr {boolean} padding
|
|
16
|
+
*/
|
|
17
|
+
let NavigationTitle = NavigationTitle_1 = class NavigationTitle extends HTMLElement {
|
|
3
18
|
static get observedAttributes() {
|
|
4
|
-
return ['value', 'subtitle'];
|
|
19
|
+
return ['value', 'subtitle', 'system-image', 'system-image-weight'];
|
|
5
20
|
}
|
|
6
21
|
constructor() {
|
|
7
22
|
super();
|
|
8
23
|
}
|
|
24
|
+
attributeChangedCallback(name, oldValue, newValue) {
|
|
25
|
+
debug(`${NavigationTitle_1.name} ⚡️ attr-change [${name}] ("${oldValue}" → "${newValue}")`);
|
|
26
|
+
this.#render(this.getAttribute('value'), this.getAttribute('subtitle'), this.getAttribute('system-image'), this.getAttribute('system-image-weight'));
|
|
27
|
+
}
|
|
9
28
|
disconnectedCallback() {
|
|
10
|
-
|
|
29
|
+
debug(`${NavigationTitle_1.name} ⚡️ disconnect`);
|
|
11
30
|
}
|
|
12
31
|
connectedCallback() {
|
|
13
|
-
|
|
14
|
-
}
|
|
15
|
-
attributeChangedCallback(name, oldValue, newValue) {
|
|
16
|
-
console.debug(`${NavigationTitle.name} ⚡️ attr-change [${name}] ("${oldValue}" → "${newValue}")`);
|
|
17
|
-
const sibling = this.closest('scroll-view') ?? undefined;
|
|
18
|
-
switch (name) {
|
|
19
|
-
case 'value':
|
|
20
|
-
if (null === newValue)
|
|
21
|
-
sibling?.removeAttribute('navigation-inline-title');
|
|
22
|
-
else
|
|
23
|
-
sibling?.setAttribute('navigation-inline-title', newValue);
|
|
24
|
-
this.#render(newValue, this.getAttribute('subtitle'));
|
|
25
|
-
break;
|
|
26
|
-
case 'subtitle':
|
|
27
|
-
if (null === newValue)
|
|
28
|
-
sibling?.removeAttribute('navigation-inline-subtitle');
|
|
29
|
-
else
|
|
30
|
-
sibling?.setAttribute('navigation-inline-subtitle', newValue);
|
|
31
|
-
this.#render(this.getAttribute('value'), newValue);
|
|
32
|
-
break;
|
|
33
|
-
}
|
|
32
|
+
debug(`${NavigationTitle_1.name} ⚡️ connect`);
|
|
34
33
|
}
|
|
35
|
-
#render = (title, subtitle) => {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
34
|
+
#render = (title, subtitle, systemImage, systemImageWeight) => {
|
|
35
|
+
queryMorph(':not([slot])', html `
|
|
36
|
+
<navigation-large-title>
|
|
37
|
+
<v-stack alignment="fill">
|
|
38
|
+
${systemImage ? html `<image-view system-name="${systemImage}" system-weight="${systemImageWeight}" foreground="blue"></image-view>` : null}
|
|
39
|
+
<v-stack spacing="0" alignment="fill">
|
|
40
|
+
${title
|
|
41
|
+
? html `<label-view line-limit="1" truncation-mode="tail" font="headline">
|
|
42
|
+
<span>${title}</span>
|
|
43
|
+
</label-view>`
|
|
44
|
+
: null}
|
|
45
|
+
${subtitle
|
|
46
|
+
? html `<label-view line-limit="1" truncation-mode="tail" foreground="secondary" font="callout">
|
|
47
|
+
<span>${subtitle}</span>
|
|
48
|
+
</label-view>`
|
|
49
|
+
: null}
|
|
50
|
+
</v-stack>
|
|
51
|
+
</v-stack>
|
|
52
|
+
</navigation-large-title>
|
|
53
|
+
`, this);
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
NavigationTitle = NavigationTitle_1 = __decorate([
|
|
57
|
+
microtaskOnConnected((el) => {
|
|
58
|
+
const sibling = el.closest('scroll-view'), value = el.getAttribute('value'), subtitle = el.getAttribute('subtitle');
|
|
59
|
+
if (null === value)
|
|
60
|
+
sibling?.removeAttribute('navigation-inline-title');
|
|
44
61
|
else
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
subtitleLabel ??= vStack.appendChild($(`<label-view line-limit="1" truncation-mode="tail" font="callout"></label-view>`));
|
|
49
|
-
subtitleLabel.setAttribute('title', subtitle);
|
|
50
|
-
}
|
|
62
|
+
sibling?.setAttribute('navigation-inline-title', value);
|
|
63
|
+
if (null === subtitle)
|
|
64
|
+
sibling?.removeAttribute('navigation-inline-subtitle');
|
|
51
65
|
else
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
// innerHTML: `<navigation-large-title><v-stack spacing="0" alignment="fill" slot="top-bar-principal"><label-view line-limit="1" truncation-mode="tail" font="headline"></label-view><label-view line-limit="1" truncation-mode="tail" font="callout"></label-view></v-stack></navigation-large-title>`,
|
|
57
|
-
// }).content.firstElementChild!
|
|
58
|
-
// ),
|
|
59
|
-
// titleLabel = el.querySelector('label-view:nth-child(1)'),
|
|
60
|
-
// subtitleLabel = el.querySelector('label-view:nth-child(2)')
|
|
61
|
-
// if (title) titleLabel?.setAttribute('label', title)
|
|
62
|
-
// else titleLabel?.remove()
|
|
63
|
-
// if (subtitle) subtitleLabel?.setAttribute('label', subtitle)
|
|
64
|
-
// else subtitleLabel?.remove()
|
|
65
|
-
};
|
|
66
|
-
}
|
|
66
|
+
sibling?.setAttribute('navigation-inline-subtitle', subtitle);
|
|
67
|
+
})
|
|
68
|
+
], NavigationTitle);
|
|
69
|
+
export { NavigationTitle };
|
|
@@ -1,27 +1,68 @@
|
|
|
1
1
|
import { FormAssociatedBase } from '../internal/class/form-associated-base';
|
|
2
|
-
declare const pickerStyles: readonly ["menu", "inline", "automatic"];
|
|
2
|
+
declare const pickerStyles: readonly ["menu", "inline", "navigation-link", "sheet", "automatic"];
|
|
3
3
|
export type PickerStyle = (typeof pickerStyles)[number];
|
|
4
|
+
export type DictEntry = {
|
|
5
|
+
value: string;
|
|
6
|
+
title?: string;
|
|
7
|
+
subtitle?: string;
|
|
8
|
+
systemImage?: string;
|
|
9
|
+
children: DictEntry[];
|
|
10
|
+
};
|
|
11
|
+
export type Dictionary = DictEntry[];
|
|
12
|
+
/**
|
|
13
|
+
* @summary A control that selects one value from a set of options.
|
|
14
|
+
*
|
|
15
|
+
* @attr {menu|inline|navigation-link|sheet|automatic} picker-style
|
|
16
|
+
*
|
|
17
|
+
* @attr help — Adds a help tooltip to the trigger of the picker, if style supports one
|
|
18
|
+
*
|
|
19
|
+
* @attr {DictEntry[]} dictionary — Renders all options using this array
|
|
20
|
+
*
|
|
21
|
+
* @attr {vertical|horizontal|auto} label-value-placement
|
|
22
|
+
*
|
|
23
|
+
* @slot — The default slot.
|
|
24
|
+
* @slot label
|
|
25
|
+
* @slot list
|
|
26
|
+
* @slot {HTMLOptionElement[]} validity-options
|
|
27
|
+
*/
|
|
4
28
|
export declare class PickerView extends FormAssociatedBase {
|
|
5
29
|
#private;
|
|
6
30
|
static get ATTR(): {
|
|
7
31
|
PLACEHOLDER: string;
|
|
32
|
+
PLACEHOLDER_ICON: string;
|
|
8
33
|
LABEL: string;
|
|
9
34
|
PICKER_STYLE: string;
|
|
10
35
|
SELECTION: string;
|
|
36
|
+
SEARCHABLE: string;
|
|
37
|
+
CURRENT_VALUE_LABEL: string;
|
|
38
|
+
CURRENT_VALUE_ICON: string;
|
|
39
|
+
TRIGGER_HELP: string;
|
|
40
|
+
DICTIONARY: string;
|
|
41
|
+
REQUIRED: string;
|
|
11
42
|
};
|
|
12
43
|
static get observedAttributes(): string[];
|
|
44
|
+
get selection(): string;
|
|
45
|
+
set selection(v: string);
|
|
13
46
|
get template(): DocumentFragment;
|
|
14
47
|
constructor();
|
|
15
|
-
connectedCallback(): void;
|
|
16
|
-
disconnectedCallback(): void;
|
|
17
48
|
attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
|
|
49
|
+
disconnectedCallback(): void;
|
|
50
|
+
connectedCallback(): void;
|
|
18
51
|
get pickerStyle(): PickerStyle;
|
|
19
|
-
|
|
52
|
+
/**
|
|
53
|
+
* Form participation property
|
|
54
|
+
*/
|
|
20
55
|
get name(): string;
|
|
21
56
|
setValidity: (flags?: ValidityStateFlags, message?: string, anchor?: HTMLElement) => void;
|
|
22
57
|
setCustomValidity: (message: string) => void;
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
58
|
+
formStateRestoreCallback(state: string, reason: string): void;
|
|
59
|
+
formAssociatedCallback(form: HTMLFormElement): void;
|
|
60
|
+
formDisabledCallback(disabled: boolean): void;
|
|
61
|
+
formResetCallback(): void;
|
|
62
|
+
}
|
|
63
|
+
declare global {
|
|
64
|
+
interface HTMLElementTagNameMap {
|
|
65
|
+
'picker-view': PickerView;
|
|
66
|
+
}
|
|
26
67
|
}
|
|
27
68
|
export {};
|