@swiftwc/ui 0.0.0-dev.2 → 0.0.0-dev.21
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/README.md +15 -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 +29 -2
- package/generated/client/index.js +341 -8
- package/generated/components/alert-dialog.d.ts +8 -0
- package/generated/components/alert-dialog.js +94 -0
- package/generated/components/body-view.d.ts +5 -0
- package/generated/components/body-view.js +11 -0
- package/generated/components/bordered-button.d.ts +9 -0
- package/generated/components/bordered-button.js +34 -0
- package/generated/components/bordered-prominent-button.d.ts +9 -0
- package/generated/components/bordered-prominent-button.js +34 -0
- package/generated/components/borderless-button.d.ts +9 -0
- package/generated/components/borderless-button.js +34 -0
- package/generated/components/confirmation-dialog.d.ts +9 -0
- package/generated/components/confirmation-dialog.js +108 -0
- package/generated/components/content-unavailable-view.d.ts +24 -0
- package/generated/components/content-unavailable-view.js +78 -0
- package/generated/components/date-picker.d.ts +46 -0
- package/generated/components/date-picker.js +436 -0
- package/generated/components/disclosure-group.d.ts +9 -0
- package/generated/components/disclosure-group.js +54 -0
- package/generated/components/form-view.d.ts +6 -0
- package/generated/components/form-view.js +58 -0
- package/generated/components/glass-button.d.ts +8 -0
- package/generated/components/glass-button.js +31 -0
- package/generated/components/glass-prominent-button.d.ts +8 -0
- package/generated/components/glass-prominent-button.js +31 -0
- package/generated/components/index.d.ts +39 -1
- package/generated/components/index.js +39 -6
- package/generated/components/label-view.d.ts +9 -0
- package/generated/components/label-view.js +83 -0
- package/generated/components/list-view.d.ts +5 -0
- package/generated/components/list-view.js +29 -0
- package/generated/components/menu-view.d.ts +9 -0
- package/generated/components/menu-view.js +138 -0
- package/generated/components/navigation-large-title.d.ts +6 -0
- package/generated/components/navigation-large-title.js +177 -0
- package/generated/components/navigation-split-view.d.ts +10 -0
- package/generated/components/navigation-split-view.js +21 -0
- package/generated/components/navigation-stack.d.ts +10 -0
- package/generated/components/navigation-stack.js +27 -0
- package/generated/components/navigation-title.d.ts +8 -0
- package/generated/components/navigation-title.js +66 -0
- package/generated/components/picker-view.d.ts +27 -0
- package/generated/components/picker-view.js +448 -0
- package/generated/components/plain-button.d.ts +7 -0
- package/generated/components/plain-button.js +20 -0
- package/generated/components/screen-view.d.ts +5 -0
- package/generated/components/screen-view.js +9 -0
- package/generated/components/scroll-view-proxy.d.ts +8 -0
- package/generated/components/scroll-view-proxy.js +14 -0
- package/generated/components/scroll-view.d.ts +10 -0
- package/generated/components/scroll-view.js +196 -0
- package/generated/components/section-view.d.ts +9 -0
- package/generated/components/section-view.js +81 -0
- package/generated/components/sheet-view.d.ts +9 -0
- package/generated/components/sheet-view.js +73 -0
- package/generated/components/sidebar-toggle.d.ts +7 -0
- package/generated/components/sidebar-toggle.js +82 -0
- package/generated/components/sidebar-view.d.ts +7 -0
- package/generated/components/sidebar-view.js +35 -0
- package/generated/components/sticky-container.d.ts +6 -0
- package/generated/components/sticky-container.js +24 -0
- package/generated/components/tab-bar.d.ts +10 -0
- package/generated/components/tab-bar.js +42 -0
- package/generated/components/tab-item.d.ts +7 -0
- package/generated/components/tab-item.js +125 -0
- package/generated/components/tab-view.d.ts +22 -0
- package/generated/components/tab-view.js +259 -0
- package/generated/components/table-view.d.ts +7 -0
- package/generated/components/table-view.js +181 -0
- package/generated/components/text-field.d.ts +29 -0
- package/generated/components/text-field.js +473 -0
- package/generated/components/tool-bar-item-group.d.ts +7 -0
- package/generated/components/tool-bar-item-group.js +39 -0
- package/generated/components/tool-bar-item.d.ts +7 -0
- package/generated/components/tool-bar-item.js +49 -0
- package/generated/components/tool-bar.d.ts +7 -0
- package/generated/components/tool-bar.js +77 -0
- package/generated/components/v-keyboard.d.ts +11 -0
- package/generated/components/v-keyboard.js +81 -0
- package/generated/components/v-stack.d.ts +10 -0
- package/generated/components/v-stack.js +16 -0
- package/generated/css/index.css +7594 -0
- package/generated/events/alert-dialog.d.ts +8 -0
- package/generated/events/alert-dialog.js +1 -0
- package/generated/events/confirmation-dialog.d.ts +9 -0
- package/generated/events/confirmation-dialog.js +1 -0
- package/generated/events/date-picker.d.ts +8 -0
- package/generated/events/date-picker.js +1 -0
- package/generated/events/index.d.ts +8 -0
- package/generated/events/index.js +8 -0
- package/generated/events/lifecycle-observer.d.ts +10 -0
- package/generated/events/lifecycle-observer.js +1 -0
- package/generated/events/picker-view.d.ts +8 -0
- package/generated/events/picker-view.js +1 -0
- package/generated/events/scroll-view.d.ts +10 -0
- package/generated/events/scroll-view.js +1 -0
- package/generated/events/tab-view.d.ts +24 -0
- package/generated/events/tab-view.js +1 -0
- package/generated/events/text-field.d.ts +8 -0
- package/generated/events/text-field.js +1 -0
- package/generated/i18n/index.d.ts +34 -0
- package/generated/i18n/index.js +167 -0
- package/generated/i18n/locales/el.d.ts +17 -0
- package/generated/i18n/locales/el.js +17 -0
- package/generated/i18n/locales/en.d.ts +17 -0
- package/generated/i18n/locales/en.js +17 -0
- package/generated/i18n/locales/index.d.ts +4 -0
- package/generated/i18n/locales/index.js +4 -0
- package/generated/index.js +1 -1
- package/generated/internal/class/cleanup-registry.d.ts +5 -0
- package/generated/internal/class/cleanup-registry.js +38 -0
- package/generated/internal/class/css-style-observer.d.ts +8 -0
- package/generated/internal/class/css-style-observer.js +25 -0
- package/generated/internal/class/form-associated-base.d.ts +20 -0
- package/generated/internal/class/form-associated-base.js +96 -0
- package/generated/internal/class/mutation-observer-singleton.d.ts +10 -0
- package/generated/internal/class/mutation-observer-singleton.js +46 -0
- package/generated/internal/class/navigation-path.d.ts +15 -0
- package/generated/internal/class/navigation-path.js +84 -0
- package/generated/internal/class/navigation-view.d.ts +8 -0
- package/generated/internal/class/navigation-view.js +77 -0
- package/generated/internal/class/resize-observer-singleton.d.ts +7 -0
- package/generated/internal/class/resize-observer-singleton.js +22 -0
- package/generated/internal/decorators/custom-element.d.ts +5 -0
- package/generated/internal/decorators/custom-element.js +4 -0
- package/generated/internal/privateNamespace.d.ts +4 -0
- package/generated/internal/privateNamespace.js +1 -0
- package/generated/internal/utils/add.d.ts +1 -0
- package/generated/internal/utils/add.js +7 -0
- package/generated/internal/utils/button-role.d.ts +1 -0
- package/generated/internal/utils/button-role.js +19 -0
- package/generated/internal/utils/cash/ancestors.d.ts +1 -0
- package/generated/internal/utils/cash/ancestors.js +27 -0
- package/generated/internal/utils/cash/index.d.ts +23 -0
- package/generated/internal/utils/cash/index.js +25 -0
- package/generated/internal/utils/cash/next-all.d.ts +1 -0
- package/generated/internal/utils/cash/next-all.js +10 -0
- package/generated/internal/utils/cash/next.d.ts +1 -0
- package/generated/internal/utils/cash/next.js +9 -0
- package/generated/internal/utils/cash/prev-all.d.ts +1 -0
- package/generated/internal/utils/cash/prev-all.js +10 -0
- package/generated/internal/utils/cash/prev.d.ts +1 -0
- package/generated/internal/utils/cash/prev.js +9 -0
- package/generated/internal/utils/cash/prop.d.ts +18 -0
- package/generated/internal/utils/cash/prop.js +30 -0
- package/generated/internal/utils/cash/siblings.d.ts +1 -0
- package/generated/internal/utils/cash/siblings.js +10 -0
- package/generated/internal/utils/clamp.d.ts +1 -0
- package/generated/internal/utils/clamp.js +4 -0
- package/generated/internal/utils/compare-big-decimals.d.ts +1 -0
- package/generated/internal/utils/compare-big-decimals.js +90 -0
- package/generated/internal/utils/css-time.d.ts +1 -0
- package/generated/internal/utils/css-time.js +3 -0
- package/generated/internal/utils/debounce.d.ts +1 -0
- package/generated/internal/utils/debounce.js +13 -0
- package/generated/internal/utils/frame.d.ts +1 -0
- package/generated/internal/utils/frame.js +6 -0
- package/generated/internal/utils/index.d.ts +20 -1
- package/generated/internal/utils/index.js +21 -1
- 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.d.ts +1 -1
- package/generated/internal/utils/kebab-case.js +3 -3
- package/generated/internal/utils/list-active.d.ts +7 -0
- package/generated/internal/utils/list-active.js +83 -0
- package/generated/internal/utils/microtask.d.ts +1 -0
- package/generated/internal/utils/microtask.js +3 -0
- package/generated/internal/utils/onoff.d.ts +45 -0
- package/generated/internal/utils/onoff.js +31 -0
- package/generated/internal/utils/set.d.ts +1 -0
- package/generated/internal/utils/set.js +7 -0
- package/generated/internal/utils/sleep.d.ts +1 -0
- package/generated/internal/utils/sleep.js +3 -0
- package/generated/internal/utils/slow-hide-show.d.ts +1 -0
- package/generated/internal/utils/slow-hide-show.js +16 -0
- package/generated/internal/utils/timeout.d.ts +5 -0
- package/generated/internal/utils/timeout.js +16 -0
- package/generated/internal/utils/toolbar-repositioner.d.ts +1 -0
- package/generated/internal/utils/toolbar-repositioner.js +12 -0
- package/generated/internal/utils/touch-glass.d.ts +7 -0
- package/generated/internal/utils/touch-glass.js +19 -0
- package/generated/namespace-browser/base.d.ts +36 -0
- package/generated/namespace-browser/base.js +92 -0
- package/generated/namespace-browser/index.d.ts +7 -0
- package/generated/namespace-browser/index.js +1 -0
- package/generated/snapshot/index.d.ts +9 -0
- package/generated/snapshot/index.js +58 -0
- package/package.json +36 -9
- package/scss/_base.scss +5 -0
- package/scss/_components.scss +79 -0
- package/scss/_final.scss +1 -0
- package/scss/_functions.scss +31 -0
- package/scss/_mixins.scss +3 -0
- package/scss/_placeholders.scss +3 -0
- package/scss/_transitions.scss +28 -0
- package/scss/_utils.scss +9 -0
- package/scss/_vars.scss +174 -3
- package/scss/base/_layout.scss +56 -0
- package/scss/base/_reboot.scss +160 -0
- package/scss/base/_root.scss +396 -0
- package/scss/colors/_index.scss +635 -0
- package/scss/components/_alert-dialog.scss +106 -0
- package/scss/components/_body-view.scss +17 -0
- package/scss/components/_bordered-button.scss +30 -0
- package/scss/components/_bordered-prominent-button.scss +27 -0
- package/scss/components/_borderless-button.scss +27 -0
- package/scss/components/_confirmation-dialog.scss +110 -0
- package/scss/components/_content-unavailable-view.scss +45 -0
- package/scss/components/_date-picker.scss +30 -0
- package/scss/components/_detail-placeholder.scss +153 -0
- package/scss/components/_disclosure-group.scss +128 -0
- package/scss/components/_form-view.scss +195 -0
- package/scss/components/_full-screen.scss +15 -0
- package/scss/components/_glass-button.scss +32 -0
- package/scss/components/_glass-prominent-button.scss +32 -0
- package/scss/components/_h-divider.scss +13 -0
- package/scss/components/_h-flex-stack.scss +23 -0
- package/scss/components/_h-stack.scss +29 -0
- package/scss/components/_index.scss +246 -0
- package/scss/components/_label-view.scss +393 -0
- package/scss/components/_labeled-content.scss +9 -0
- package/scss/components/_list-view.scss +229 -0
- package/scss/components/_menu-view.scss +188 -0
- package/scss/components/_navigation-large-title.scss +27 -0
- package/scss/components/_navigation-split-view.scss +424 -0
- package/scss/components/_navigation-stack.scss +11 -0
- package/scss/components/_navigation-title.scss +10 -0
- package/scss/components/_picker-view.scss +122 -0
- package/scss/components/_plain-button.scss +18 -0
- package/scss/components/_scroll-view-proxy.scss +79 -0
- package/scss/components/_scroll-view-toolbars.scss +126 -0
- package/scss/components/_scroll-view.scss +130 -0
- package/scss/components/_section-view.scss +119 -0
- package/scss/components/_sheet-view.scss +102 -0
- package/scss/components/_sidebar-toggle.scss +121 -0
- package/scss/components/_sidebar-view.scss +53 -0
- package/scss/components/_sticky-container.scss +42 -0
- package/scss/components/_tab-bar.scss +255 -0
- package/scss/components/_tab-item.scss +25 -0
- package/scss/components/_tab-view.scss +312 -0
- package/scss/components/_table-column.scss +52 -0
- package/scss/components/_table-row.scss +172 -0
- package/scss/components/_table-view.scss +223 -0
- package/scss/components/_text-field.scss +37 -0
- package/scss/components/_tool-bar-item-group.scss +48 -0
- package/scss/components/_tool-bar-item.scss +145 -0
- package/scss/components/_tool-bar.scss +128 -0
- package/scss/components/_v-divider.scss +13 -0
- package/scss/components/_v-flex-stack.scss +29 -0
- package/scss/components/_v-keyboard.scss +14 -0
- package/scss/components/_v-stack.scss +25 -0
- package/scss/final/_touch-glass.scss +91 -0
- package/scss/index.scss +15 -6
- package/scss/mixins/_dialog.scss +89 -0
- package/scss/mixins/_index.scss +422 -0
- package/scss/placeholders/_buttons.scss +125 -0
- package/scss/placeholders/_lists.scss +561 -0
- package/scss/transitions/_alert-dialog.scss +19 -0
- package/scss/transitions/_bwd.navbar.scss +19 -0
- package/scss/transitions/_bwd.scss +39 -0
- package/scss/transitions/_confirmation-dialog.scss +19 -0
- package/scss/transitions/_dialog.scss +28 -0
- package/scss/transitions/_disclosure-group.scss +35 -0
- package/scss/transitions/_fwd.navbar.scss +41 -0
- package/scss/transitions/_fwd.scss +24 -0
- package/scss/transitions/_glass-button.scss +12 -0
- package/scss/transitions/_glass-prominent-button.scss +12 -0
- package/scss/transitions/_index.scss +74 -0
- package/scss/transitions/_menu-view.scss +26 -0
- package/scss/transitions/_navigation-split-view.scss +23 -0
- package/scss/transitions/_sidebar-view.scss +36 -0
- package/scss/transitions/_tab-bar.scss +19 -0
- package/scss/utils/_frame.scss +91 -0
- package/scss/utils/_index.scss +68 -0
- package/scss/utils/_scroll-view.scss +14 -0
- package/scss/utils/_spacing.scss +25 -0
- package/scss/utils/_stacks.scss +247 -0
- package/web-components.html-data/en.json +423 -0
- package/generated/internal/snapshot.d.ts +0 -5
- package/generated/internal/snapshot.js +0 -23
- package/generated/styles.css +0 -8
- package/scss/_reboot.scss +0 -11
|
@@ -1 +1,39 @@
|
|
|
1
|
-
export * from
|
|
1
|
+
export * from './alert-dialog';
|
|
2
|
+
export * from './body-view';
|
|
3
|
+
export * from './bordered-button';
|
|
4
|
+
export * from './bordered-prominent-button';
|
|
5
|
+
export * from './borderless-button';
|
|
6
|
+
export * from './confirmation-dialog';
|
|
7
|
+
export * from './content-unavailable-view';
|
|
8
|
+
export * from './date-picker';
|
|
9
|
+
export * from './disclosure-group';
|
|
10
|
+
export * from './form-view';
|
|
11
|
+
export * from './glass-button';
|
|
12
|
+
export * from './glass-prominent-button';
|
|
13
|
+
export * from './label-view';
|
|
14
|
+
export * from './list-view';
|
|
15
|
+
export * from './menu-view';
|
|
16
|
+
export * from './navigation-large-title';
|
|
17
|
+
export * from './navigation-split-view';
|
|
18
|
+
export * from './navigation-stack';
|
|
19
|
+
export * from './navigation-title';
|
|
20
|
+
export * from './picker-view';
|
|
21
|
+
export * from './plain-button';
|
|
22
|
+
export * from './screen-view';
|
|
23
|
+
export * from './scroll-view-proxy';
|
|
24
|
+
export * from './scroll-view';
|
|
25
|
+
export * from './section-view';
|
|
26
|
+
export * from './sheet-view';
|
|
27
|
+
export * from './sidebar-toggle';
|
|
28
|
+
export * from './sidebar-view';
|
|
29
|
+
export * from './sticky-container';
|
|
30
|
+
export * from './tab-bar';
|
|
31
|
+
export * from './tab-item';
|
|
32
|
+
export * from './tab-view';
|
|
33
|
+
export * from './table-view';
|
|
34
|
+
export * from './text-field';
|
|
35
|
+
export * from './tool-bar-item-group';
|
|
36
|
+
export * from './tool-bar-item';
|
|
37
|
+
export * from './tool-bar';
|
|
38
|
+
export * from './v-keyboard';
|
|
39
|
+
export * from './v-stack';
|
|
@@ -1,6 +1,39 @@
|
|
|
1
|
-
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
|
|
6
|
-
export * from
|
|
1
|
+
export * from './alert-dialog';
|
|
2
|
+
export * from './body-view';
|
|
3
|
+
export * from './bordered-button';
|
|
4
|
+
export * from './bordered-prominent-button';
|
|
5
|
+
export * from './borderless-button';
|
|
6
|
+
export * from './confirmation-dialog';
|
|
7
|
+
export * from './content-unavailable-view';
|
|
8
|
+
export * from './date-picker';
|
|
9
|
+
export * from './disclosure-group';
|
|
10
|
+
export * from './form-view';
|
|
11
|
+
export * from './glass-button';
|
|
12
|
+
export * from './glass-prominent-button';
|
|
13
|
+
export * from './label-view';
|
|
14
|
+
export * from './list-view';
|
|
15
|
+
export * from './menu-view';
|
|
16
|
+
export * from './navigation-large-title';
|
|
17
|
+
export * from './navigation-split-view';
|
|
18
|
+
export * from './navigation-stack';
|
|
19
|
+
export * from './navigation-title';
|
|
20
|
+
export * from './picker-view';
|
|
21
|
+
export * from './plain-button';
|
|
22
|
+
export * from './screen-view';
|
|
23
|
+
export * from './scroll-view-proxy';
|
|
24
|
+
export * from './scroll-view';
|
|
25
|
+
export * from './section-view';
|
|
26
|
+
export * from './sheet-view';
|
|
27
|
+
export * from './sidebar-toggle';
|
|
28
|
+
export * from './sidebar-view';
|
|
29
|
+
export * from './sticky-container';
|
|
30
|
+
export * from './tab-bar';
|
|
31
|
+
export * from './tab-item';
|
|
32
|
+
export * from './tab-view';
|
|
33
|
+
export * from './table-view';
|
|
34
|
+
export * from './text-field';
|
|
35
|
+
export * from './tool-bar-item-group';
|
|
36
|
+
export * from './tool-bar-item';
|
|
37
|
+
export * from './tool-bar';
|
|
38
|
+
export * from './v-keyboard';
|
|
39
|
+
export * from './v-stack';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare class LabelView extends HTMLElement {
|
|
2
|
+
#private;
|
|
3
|
+
static get observedAttributes(): string[];
|
|
4
|
+
static get template(): DocumentFragment;
|
|
5
|
+
constructor();
|
|
6
|
+
disconnectedCallback(): void;
|
|
7
|
+
connectedCallback(): void;
|
|
8
|
+
attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
|
|
9
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { $ } from '../internal/utils';
|
|
2
|
+
export class LabelView extends HTMLElement {
|
|
3
|
+
static get observedAttributes() {
|
|
4
|
+
return ['system-image', 'title', 'line-limit', 'truncation-mode'];
|
|
5
|
+
}
|
|
6
|
+
static #template;
|
|
7
|
+
static get template() {
|
|
8
|
+
return (this.#template ??= $(String.raw `
|
|
9
|
+
<div part="root label-image-stack">
|
|
10
|
+
<slot name="image"></slot>
|
|
11
|
+
</div>
|
|
12
|
+
<div part="root label-title-stack">
|
|
13
|
+
<slot></slot>
|
|
14
|
+
</div>`));
|
|
15
|
+
}
|
|
16
|
+
#shadowRoot;
|
|
17
|
+
// #imgSlot?: HTMLSlotElement
|
|
18
|
+
// #slot?: HTMLSlotElement
|
|
19
|
+
constructor() {
|
|
20
|
+
super();
|
|
21
|
+
this.#shadowRoot = this.attachShadow({ mode: 'closed' });
|
|
22
|
+
// Snapshot.waitReady.then(() => {
|
|
23
|
+
this.#shadowRoot.appendChild(document.importNode(this.constructor.template, true));
|
|
24
|
+
// // this.#imgSlot = this.#shadowRoot.querySelector<HTMLSlotElement>('slot[name=image]') ?? undefined
|
|
25
|
+
// // this.#slot = this.#shadowRoot.querySelector<HTMLSlotElement>('slot:not([name])') ?? undefined
|
|
26
|
+
//
|
|
27
|
+
// // this.#slot?.addEventListener('slotchange', this.#handleSlotchange)
|
|
28
|
+
// // // this.#imgSlot?.addEventListener('slotchange', this.#handleSlotchange)
|
|
29
|
+
// // // this.#handleSlotchange(new CustomEvent('slotchange'))
|
|
30
|
+
// })
|
|
31
|
+
}
|
|
32
|
+
disconnectedCallback() {
|
|
33
|
+
console.debug(`${LabelView.name} ⚡️ disconnect`);
|
|
34
|
+
// this.#slot?.removeEventListener('slotchange', this.#handleSlotchange)
|
|
35
|
+
}
|
|
36
|
+
connectedCallback() {
|
|
37
|
+
console.debug(`${LabelView.name} ⚡️ connect`);
|
|
38
|
+
}
|
|
39
|
+
attributeChangedCallback(name, oldValue, newValue) {
|
|
40
|
+
console.debug(`${LabelView.name} ⚡️ attr-change [${name}] ("${oldValue}" → "${newValue}")`);
|
|
41
|
+
// Snapshot.waitReady.then(() => {
|
|
42
|
+
switch (name) {
|
|
43
|
+
case 'system-image':
|
|
44
|
+
let image = this.querySelector(':scope>[slot=image]');
|
|
45
|
+
if (newValue) {
|
|
46
|
+
image ??= this.appendChild($(`<i slot="image"></i>`, '>1'));
|
|
47
|
+
image.setAttribute('class', `ph ph-${newValue}`);
|
|
48
|
+
}
|
|
49
|
+
else
|
|
50
|
+
image?.remove();
|
|
51
|
+
// // const imgSlot = this.#shadowRoot.querySelector<HTMLSlotElement>('slot[name=image]')
|
|
52
|
+
// // if (!imgSlot) break
|
|
53
|
+
// const assigned = this.#imgSlot!.assignedElements({ flatten: true }) as HTMLElement[]
|
|
54
|
+
// let el = assigned[0] as HTMLElement | undefined
|
|
55
|
+
// if (!el) {
|
|
56
|
+
// el = document.createElement('i')
|
|
57
|
+
// el.slot = 'image'
|
|
58
|
+
// this.append(el)
|
|
59
|
+
// }
|
|
60
|
+
// el.setAttribute('class', `ph ph-${newValue}`)
|
|
61
|
+
break;
|
|
62
|
+
case 'title':
|
|
63
|
+
let title = this.querySelector(':scope>:not([slot])');
|
|
64
|
+
if (newValue) {
|
|
65
|
+
title ??= this.appendChild($(`<span></span>`, '>1'));
|
|
66
|
+
title.textContent = newValue;
|
|
67
|
+
}
|
|
68
|
+
else
|
|
69
|
+
title?.remove();
|
|
70
|
+
// // const titleSlot = this.#shadowRoot.querySelector<HTMLSlotElement>('slot:not([name])')
|
|
71
|
+
// // if (!titleSlot) break
|
|
72
|
+
// const title = this.#slot!.assignedElements({ flatten: true }) as HTMLElement[]
|
|
73
|
+
// let el2 = title[0] as HTMLElement | undefined
|
|
74
|
+
// if (!el2) {
|
|
75
|
+
// el2 = document.createElement('span')
|
|
76
|
+
// this.append(el2)
|
|
77
|
+
// }
|
|
78
|
+
// el2.textContent = newValue //el2.replaceChildren(escapeHTMLPolicy.createHTML(newValue))
|
|
79
|
+
break;
|
|
80
|
+
}
|
|
81
|
+
// })
|
|
82
|
+
}
|
|
83
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { CleanupRegistry } from '../internal/class/cleanup-registry';
|
|
2
|
+
import { listActive, onoff } from '../internal/utils';
|
|
3
|
+
export class ListView extends HTMLElement {
|
|
4
|
+
// static formAssociated = true
|
|
5
|
+
// #internals
|
|
6
|
+
// #options
|
|
7
|
+
// #focusedIndex = 0
|
|
8
|
+
// #selected = new Set()
|
|
9
|
+
constructor() {
|
|
10
|
+
super();
|
|
11
|
+
// this.#internals = this.attachInternals()
|
|
12
|
+
// this.tabIndex = 0
|
|
13
|
+
}
|
|
14
|
+
disconnectedCallback() {
|
|
15
|
+
console.debug(`${ListView.name} ⚡️ disconnect`);
|
|
16
|
+
CleanupRegistry.unregister(this);
|
|
17
|
+
}
|
|
18
|
+
connectedCallback() {
|
|
19
|
+
console.debug(`${ListView.name} ⚡️ connect`);
|
|
20
|
+
CleanupRegistry.register(this, onoff(listActive(this), this).on());
|
|
21
|
+
// this.setAttribute('role', 'listbox')
|
|
22
|
+
// this.setAttribute('aria-multiselectable', 'true')
|
|
23
|
+
// this.#options = Array.from(this.querySelectorAll('[option]'))
|
|
24
|
+
// this.addEventListener('pointerleave', this.#onCancel)
|
|
25
|
+
// this.addEventListener('click', this.#onClick)
|
|
26
|
+
// this.addEventListener('keydown', this.#onKeyDown)
|
|
27
|
+
// this.#updateOptionAttributes()
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare class MenuView extends HTMLElement {
|
|
2
|
+
#private;
|
|
3
|
+
static get observedAttributes(): string[];
|
|
4
|
+
static get template(): DocumentFragment;
|
|
5
|
+
constructor();
|
|
6
|
+
disconnectedCallback(): void;
|
|
7
|
+
connectedCallback(): void;
|
|
8
|
+
attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
|
|
9
|
+
}
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
var _a;
|
|
2
|
+
import { CleanupRegistry } from '../internal/class/cleanup-registry';
|
|
3
|
+
import { $, onoff, touchGlass } from '../internal/utils';
|
|
4
|
+
export class MenuView extends HTMLElement {
|
|
5
|
+
static get observedAttributes() {
|
|
6
|
+
return ['open', 'closing', 'label'];
|
|
7
|
+
}
|
|
8
|
+
static #template;
|
|
9
|
+
static get template() {
|
|
10
|
+
return (this.#template ??= $(String.raw `
|
|
11
|
+
<button type="button" part="root button menu-summary">
|
|
12
|
+
<slot name="label"></slot>
|
|
13
|
+
</button>
|
|
14
|
+
<dialog part="root menu-dialog" autofocus inert>
|
|
15
|
+
<form part="root menu-form" method="dialog" novalidate>
|
|
16
|
+
<div part="root menu-scrollable">
|
|
17
|
+
<slot></slot>
|
|
18
|
+
</div>
|
|
19
|
+
</form>
|
|
20
|
+
</dialog>`));
|
|
21
|
+
}
|
|
22
|
+
#shadowRoot;
|
|
23
|
+
#dialog;
|
|
24
|
+
constructor() {
|
|
25
|
+
super();
|
|
26
|
+
this.#shadowRoot = this.attachShadow({ mode: 'closed' });
|
|
27
|
+
this.#shadowRoot.appendChild(document.importNode(this.constructor.template, true));
|
|
28
|
+
}
|
|
29
|
+
disconnectedCallback() {
|
|
30
|
+
console.debug(`${_a.name} ⚡️ disconnect`);
|
|
31
|
+
// const dialog = this.#shadowRoot.querySelector('dialog'),
|
|
32
|
+
// trigger = this.#shadowRoot.querySelector('button')
|
|
33
|
+
// trigger?.removeEventListener('click', this.#handleTriggerClick)
|
|
34
|
+
// dialog?.removeEventListener('click', this.#handleDialogClick)
|
|
35
|
+
// dialog?.removeEventListener('close', this.#handleDialogClose)
|
|
36
|
+
// dialog?.removeEventListener('cancel', this.#handleDialogCancel)
|
|
37
|
+
const summaryPart = this.#shadowRoot.querySelector('[part*=menu-summary]'), dialogPart = this.#shadowRoot.querySelector('[part*=menu-dialog]');
|
|
38
|
+
summaryPart?.style.removeProperty('anchor-name'); //$.prop('anchor-name', null, summaryPart)
|
|
39
|
+
dialogPart?.style.removeProperty('position-anchor'); //$.prop('position-anchor', null, dialogPart)
|
|
40
|
+
CleanupRegistry.unregister(this);
|
|
41
|
+
}
|
|
42
|
+
connectedCallback() {
|
|
43
|
+
console.debug(`${_a.name} ⚡️ connect`);
|
|
44
|
+
this.#dialog = this.#shadowRoot.querySelector('dialog') ?? undefined;
|
|
45
|
+
const trigger = this.#shadowRoot.querySelector('button') ?? undefined;
|
|
46
|
+
CleanupRegistry.register(this, onoff('click', this.#handleTriggerClick, trigger).on());
|
|
47
|
+
CleanupRegistry.register(this, onoff([
|
|
48
|
+
{ types: 'click', listener: this.#handleDialogClick },
|
|
49
|
+
{ types: 'close', listener: this.#handleDialogClose },
|
|
50
|
+
{ types: 'cancel', listener: this.#handleDialogCancel },
|
|
51
|
+
], this.#dialog).on());
|
|
52
|
+
CleanupRegistry.register(this, onoff(touchGlass(this, (t) => t, (evt) => {
|
|
53
|
+
const target = evt.target instanceof HTMLElement && evt.target;
|
|
54
|
+
if (!target)
|
|
55
|
+
return true;
|
|
56
|
+
if (target.matches('menu-view'))
|
|
57
|
+
return false;
|
|
58
|
+
if (!target.closest('menu-view[open]'))
|
|
59
|
+
return false;
|
|
60
|
+
return true;
|
|
61
|
+
}), this).on());
|
|
62
|
+
const newAnchorName = `--menu-view-${self.crypto.randomUUID()}`;
|
|
63
|
+
const summaryPart = this.#shadowRoot.querySelector('[part*=menu-summary]'), dialogPart = this.#shadowRoot.querySelector('[part*=menu-dialog]');
|
|
64
|
+
summaryPart?.style.setProperty('anchor-name', newAnchorName, 'important'); // override unset:all // $.prop('anchor-name', newAnchorName, summaryPart, 'important') //
|
|
65
|
+
dialogPart?.style.setProperty('position-anchor', newAnchorName); // $.prop('position-anchor', newAnchorName, dialogPart) //
|
|
66
|
+
}
|
|
67
|
+
attributeChangedCallback(name, oldValue, newValue) {
|
|
68
|
+
console.debug(`${_a.name} ⚡️ attr-change [${name}] ("${oldValue}" → "${newValue}")`);
|
|
69
|
+
switch (name) {
|
|
70
|
+
case 'open':
|
|
71
|
+
if (!this.#dialog)
|
|
72
|
+
break;
|
|
73
|
+
this.#dialog.inert = null === newValue;
|
|
74
|
+
if (null === newValue && this.#dialog.open) {
|
|
75
|
+
console.debug(`${_a.name} ⚡️ will-close`);
|
|
76
|
+
this.setAttribute('closing', '');
|
|
77
|
+
Promise.allSettled(this.#dialog.getAnimations().map(({ finished }) => finished)).then(() => {
|
|
78
|
+
if (!this.hasAttribute('closing'))
|
|
79
|
+
return;
|
|
80
|
+
this.#dialog?.close();
|
|
81
|
+
this.removeAttribute('closing');
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
if ('' === newValue && !this.#dialog.open) {
|
|
85
|
+
console.debug(`${_a.name} ⚡️ will-open`);
|
|
86
|
+
this.removeAttribute('closing');
|
|
87
|
+
const form = this.#shadowRoot.querySelector('form');
|
|
88
|
+
form.scrollTop = 0;
|
|
89
|
+
this.#dialog.showModal();
|
|
90
|
+
}
|
|
91
|
+
break;
|
|
92
|
+
case 'label':
|
|
93
|
+
let label = this.querySelector(':scope>[slot=label]');
|
|
94
|
+
if (newValue) {
|
|
95
|
+
label ??= this.appendChild($(`<label-view slot="label"></label-view>`, '>1'));
|
|
96
|
+
label.setAttribute('title', newValue);
|
|
97
|
+
}
|
|
98
|
+
else
|
|
99
|
+
label?.remove();
|
|
100
|
+
break;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
#handleDialogClick = (evt) => {
|
|
104
|
+
console.debug(`${_a.name} ⚡️ ${evt?.type}`);
|
|
105
|
+
const target = evt.target instanceof HTMLElement && evt.target;
|
|
106
|
+
if (!target)
|
|
107
|
+
return;
|
|
108
|
+
if (target.matches('dialog'))
|
|
109
|
+
return this.toggleAttribute('open', false); // click outside
|
|
110
|
+
target.scrollIntoView({
|
|
111
|
+
behavior: self.matchMedia('(prefers-reduced-motion: no-preference)').matches ? 'smooth' : 'instant',
|
|
112
|
+
block: 'nearest',
|
|
113
|
+
inline: 'nearest',
|
|
114
|
+
});
|
|
115
|
+
if (!target.closest('button'))
|
|
116
|
+
return;
|
|
117
|
+
// TODO: Handle btns this.toggleAttribute('open', false)
|
|
118
|
+
this.toggleAttribute('open', false);
|
|
119
|
+
// event.stopPropagation() //NOTE: add this only if not nested, disposes all nicely if ommited
|
|
120
|
+
};
|
|
121
|
+
#handleTriggerClick = (evt) => {
|
|
122
|
+
console.debug(`${_a.name} ⚡️ ${evt?.type}`);
|
|
123
|
+
this.toggleAttribute('open', true);
|
|
124
|
+
};
|
|
125
|
+
// intercept to modify open attr
|
|
126
|
+
#handleDialogCancel = (evt) => {
|
|
127
|
+
console.debug(`${_a.name} ⚡️ ${evt?.type}`);
|
|
128
|
+
if (!evt.cancelable)
|
|
129
|
+
return;
|
|
130
|
+
evt.preventDefault();
|
|
131
|
+
this.toggleAttribute('open', false);
|
|
132
|
+
};
|
|
133
|
+
#handleDialogClose = (evt) => {
|
|
134
|
+
console.debug(`${_a.name} ⚡️ ${evt?.type}`);
|
|
135
|
+
this.toggleAttribute('open', this.#shadowRoot.querySelector('dialog')?.open ?? false);
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
_a = MenuView;
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
var _a;
|
|
2
|
+
import { CleanupRegistry } from '../internal/class/cleanup-registry';
|
|
3
|
+
import { CSSStyleObserver } from '../internal/class/css-style-observer';
|
|
4
|
+
import { add, frame, onoff, slowHideShow, timeout } from '../internal/utils';
|
|
5
|
+
import { Snapshot } from '../snapshot';
|
|
6
|
+
const observing = new WeakSet();
|
|
7
|
+
function observeResizeEnd(el, callback, stableFrames = 4) {
|
|
8
|
+
let rafId = null;
|
|
9
|
+
let lastRect = el.getBoundingClientRect();
|
|
10
|
+
let stableCount = 0;
|
|
11
|
+
function check() {
|
|
12
|
+
const rect = el.getBoundingClientRect();
|
|
13
|
+
if (rect.width === lastRect.width && rect.height === lastRect.height) {
|
|
14
|
+
stableCount++;
|
|
15
|
+
}
|
|
16
|
+
else {
|
|
17
|
+
stableCount = 0;
|
|
18
|
+
lastRect = rect;
|
|
19
|
+
}
|
|
20
|
+
if (stableCount >= stableFrames) {
|
|
21
|
+
rafId = null;
|
|
22
|
+
callback(rect);
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
rafId = self.requestAnimationFrame(check);
|
|
26
|
+
}
|
|
27
|
+
const observer = new ResizeObserver(() => {
|
|
28
|
+
stableCount = 0;
|
|
29
|
+
if (rafId === null) {
|
|
30
|
+
lastRect = el.getBoundingClientRect();
|
|
31
|
+
rafId = self.requestAnimationFrame(check);
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
observer.observe(el);
|
|
35
|
+
return () => {
|
|
36
|
+
observer.disconnect();
|
|
37
|
+
if (rafId)
|
|
38
|
+
self.cancelAnimationFrame(rafId);
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
function parseRootMargin(rootMargin = '0px 0px 0px 0px') {
|
|
42
|
+
const parts = rootMargin.split(/\s+/).map((v) => parseInt(v));
|
|
43
|
+
switch (parts.length) {
|
|
44
|
+
case 1:
|
|
45
|
+
return [parts[0], parts[0], parts[0], parts[0]];
|
|
46
|
+
case 2:
|
|
47
|
+
return [parts[0], parts[1], parts[0], parts[1]];
|
|
48
|
+
case 3:
|
|
49
|
+
return [parts[0], parts[1], parts[2], parts[1]];
|
|
50
|
+
case 4:
|
|
51
|
+
return parts;
|
|
52
|
+
default:
|
|
53
|
+
return [0, 0, 0, 0];
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
function isIntersectingWithContainer(el, container, rootMargin = '0px 0px 0px 0px') {
|
|
57
|
+
if (!(el instanceof Element) || !(container instanceof Element))
|
|
58
|
+
return false;
|
|
59
|
+
const elRect = el.getBoundingClientRect();
|
|
60
|
+
const contRect = container.getBoundingClientRect();
|
|
61
|
+
const [topMargin, rightMargin, bottomMargin, leftMargin] = parseRootMargin(rootMargin);
|
|
62
|
+
const marginRect = {
|
|
63
|
+
top: contRect.top + topMargin,
|
|
64
|
+
right: contRect.right - rightMargin,
|
|
65
|
+
bottom: contRect.bottom - bottomMargin,
|
|
66
|
+
left: contRect.left + leftMargin,
|
|
67
|
+
};
|
|
68
|
+
return !(elRect.bottom < marginRect.top || elRect.top > marginRect.bottom || elRect.right < marginRect.left || elRect.left > marginRect.right);
|
|
69
|
+
}
|
|
70
|
+
export class NavigationLargeTitle extends HTMLElement {
|
|
71
|
+
#styleObserver;
|
|
72
|
+
#scrollObserver;
|
|
73
|
+
#scrollSafetyTimer = timeout();
|
|
74
|
+
#rootMarginTop = '0px';
|
|
75
|
+
constructor() {
|
|
76
|
+
super();
|
|
77
|
+
}
|
|
78
|
+
disconnectedCallback() {
|
|
79
|
+
console.debug(`${_a.name} ⚡️ disconnect`);
|
|
80
|
+
this.#clearScrollState();
|
|
81
|
+
this.#styleObserver?.disconnect();
|
|
82
|
+
CleanupRegistry.unregister(this);
|
|
83
|
+
}
|
|
84
|
+
connectedCallback() {
|
|
85
|
+
console.debug(`${_a.name} ⚡️ connect`);
|
|
86
|
+
const root = this.closest('scroll-view') ?? undefined;
|
|
87
|
+
if (!root)
|
|
88
|
+
return;
|
|
89
|
+
if (!root?.hasAttribute('navigation-bar-title-display-mode'))
|
|
90
|
+
root?.setAttribute('navigation-bar-title-display-mode', 'large');
|
|
91
|
+
frame(this).then(() => {
|
|
92
|
+
// if (!r) return // NOTE: Required or BREAKS transitions // self.requestAnimationFrame(() => {
|
|
93
|
+
this.#styleObserver = new CSSStyleObserver();
|
|
94
|
+
this.#styleObserver.observe(this, this.#handleStyleChange);
|
|
95
|
+
Snapshot.waitReady.then(() => self.requestAnimationFrame(this.#handleStyleChange)); //Snapshot.waitReady.then(this.#handleStyleChange)
|
|
96
|
+
// this.#observer?.observe(this)
|
|
97
|
+
CleanupRegistry.register(this, onoff([
|
|
98
|
+
{ types: 'scroll', listener: this.#handleScroll, addOptions: { passive: true } },
|
|
99
|
+
{ types: 'scrollend', listener: this.#handleScrollend, addOptions: { passive: true } },
|
|
100
|
+
], root).on());
|
|
101
|
+
observeResizeEnd(root, () => {
|
|
102
|
+
const isIntersecting = isIntersectingWithContainer(this, root, `${this.#rootMarginTop} 0px 0px 0px`);
|
|
103
|
+
this.#applySlowness(root, isIntersecting);
|
|
104
|
+
});
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
#handleStyleChange = () => {
|
|
108
|
+
console.debug(`${_a.name} ⚡️ style`);
|
|
109
|
+
const root = this.closest('scroll-view') ?? undefined;
|
|
110
|
+
if (!root)
|
|
111
|
+
return;
|
|
112
|
+
const style = self.getComputedStyle(this);
|
|
113
|
+
const blockSizeProp = style.getPropertyValue('--navigation-bar-block-size') || '0', //`${document.documentElement.computedStyleMap().get(`--navigation-bar-block-size`) ?? '0'}`, //
|
|
114
|
+
blockSize = parseFloat(blockSizeProp) * (blockSizeProp.endsWith('rem') ? parseFloat(style.getPropertyValue('--root-font-size')) || 16 : 1);
|
|
115
|
+
// blockSize = parseFloat(blockSizeProp) * (blockSizeProp.endsWith('rem') ? parseFloat(self.getComputedStyle(document.documentElement).fontSize) : 1)
|
|
116
|
+
const rootMarginTop = `${blockSize}px`;
|
|
117
|
+
if (this.#rootMarginTop === rootMarginTop)
|
|
118
|
+
return;
|
|
119
|
+
this.#rootMarginTop = rootMarginTop;
|
|
120
|
+
// Tear down old observer cleanly before replacing it
|
|
121
|
+
const wasObserving = observing.delete(this);
|
|
122
|
+
this.#scrollObserver?.disconnect();
|
|
123
|
+
this.#scrollObserver = new IntersectionObserver(this.#handleIntersect, {
|
|
124
|
+
root,
|
|
125
|
+
rootMargin: `-${this.#rootMarginTop} 0px 0px 0px`,
|
|
126
|
+
threshold: [0, 1],
|
|
127
|
+
});
|
|
128
|
+
// Re-observe immediately if we were mid-scroll
|
|
129
|
+
if (wasObserving) {
|
|
130
|
+
observing.add(this);
|
|
131
|
+
this.#scrollObserver.observe(this);
|
|
132
|
+
}
|
|
133
|
+
};
|
|
134
|
+
#clearScrollState = () => {
|
|
135
|
+
if (observing.delete(this))
|
|
136
|
+
this.#scrollObserver?.unobserve(this);
|
|
137
|
+
this.#scrollSafetyTimer.cancel();
|
|
138
|
+
};
|
|
139
|
+
#handleScroll = (evt) => {
|
|
140
|
+
if (add(observing, this))
|
|
141
|
+
this.#scrollObserver?.observe(this);
|
|
142
|
+
this.#scrollSafetyTimer.next(() => this.#clearScrollState(), 2000); // reset watchdog every scroll event
|
|
143
|
+
};
|
|
144
|
+
#handleScrollend = (evt) => {
|
|
145
|
+
this.#clearScrollState();
|
|
146
|
+
};
|
|
147
|
+
// #handleResizeend: EventListener = (evt: Event) => {
|
|
148
|
+
// const root = evt.target as HTMLElement
|
|
149
|
+
// const isIntersecting = isIntersectingWithContainer(this, root, `${this.#rootMarginTop} 0px 0px 0px`)
|
|
150
|
+
// this.#applySlowness(root, isIntersecting)
|
|
151
|
+
// }
|
|
152
|
+
#handleIntersect = (entries, { root }) => {
|
|
153
|
+
console.debug(`${_a.name} ⚡️ intersect (${entries?.at(0)?.isIntersecting})`);
|
|
154
|
+
if (!(root instanceof HTMLElement))
|
|
155
|
+
return;
|
|
156
|
+
for (const { isIntersecting } of entries)
|
|
157
|
+
this.#applySlowness(root, isIntersecting);
|
|
158
|
+
// for (const { isIntersecting } of entries) {
|
|
159
|
+
// const value = isIntersecting ? 'large' : 'inline'
|
|
160
|
+
// if (value === root?.getAttribute('navigation-bar-title-display-mode')) continue
|
|
161
|
+
// root?.setAttribute('navigation-bar-title-display-mode', value)
|
|
162
|
+
// if (this.closest('[hidden]')) continue // if (0 === this.offsetHeight + this.offsetWidth) continue
|
|
163
|
+
// if (this.hasAttribute('navigation-bar-auto-hide')) slowHideShow(isIntersecting ? 'show' : 'hide', this)
|
|
164
|
+
// }
|
|
165
|
+
};
|
|
166
|
+
#applySlowness = (root, isIntersecting) => {
|
|
167
|
+
const value = isIntersecting ? 'large' : 'inline';
|
|
168
|
+
if (this.closest('[hidden]'))
|
|
169
|
+
return; // if (0 === this.offsetHeight + this.offsetWidth) continue
|
|
170
|
+
if (value === root?.getAttribute('navigation-bar-title-display-mode'))
|
|
171
|
+
return;
|
|
172
|
+
root?.setAttribute('navigation-bar-title-display-mode', value);
|
|
173
|
+
if (this.hasAttribute('navigation-bar-auto-hide'))
|
|
174
|
+
slowHideShow(isIntersecting ? 'show' : 'hide', this);
|
|
175
|
+
};
|
|
176
|
+
}
|
|
177
|
+
_a = NavigationLargeTitle;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { NavigationView } from '../internal/class/navigation-view';
|
|
2
|
+
/**
|
|
3
|
+
* @summary A view with two or three side-by-side sections, where what you choose in the left section changes what appears in the next section.
|
|
4
|
+
*/
|
|
5
|
+
export declare class NavigationSplitView extends NavigationView {
|
|
6
|
+
constructor();
|
|
7
|
+
disconnectedCallback(): void;
|
|
8
|
+
connectedCallback(): void;
|
|
9
|
+
attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
|
|
10
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { NavigationView } from '../internal/class/navigation-view';
|
|
2
|
+
/**
|
|
3
|
+
* @summary A view with two or three side-by-side sections, where what you choose in the left section changes what appears in the next section.
|
|
4
|
+
*/
|
|
5
|
+
export class NavigationSplitView extends NavigationView {
|
|
6
|
+
constructor() {
|
|
7
|
+
super();
|
|
8
|
+
}
|
|
9
|
+
disconnectedCallback() {
|
|
10
|
+
console.debug(`${NavigationSplitView.name} ⚡️ disconnect`);
|
|
11
|
+
super.disconnectedCallback();
|
|
12
|
+
}
|
|
13
|
+
connectedCallback() {
|
|
14
|
+
console.debug(`${NavigationSplitView.name} ⚡️ connect`);
|
|
15
|
+
super.connectedCallback();
|
|
16
|
+
}
|
|
17
|
+
attributeChangedCallback(name, oldValue, newValue) {
|
|
18
|
+
console.debug(`${NavigationSplitView.name} ⚡️ attr-change [${name}] ("${oldValue}" → "${newValue}")`);
|
|
19
|
+
super.attributeChangedCallback(name, oldValue, newValue);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { NavigationView } from '../internal/class/navigation-view';
|
|
2
|
+
/**
|
|
3
|
+
* @summary A view that shows a main screen and lets you open other screens on top of it.
|
|
4
|
+
*/
|
|
5
|
+
export declare class NavigationStack extends NavigationView {
|
|
6
|
+
constructor();
|
|
7
|
+
disconnectedCallback(): void;
|
|
8
|
+
connectedCallback(): void;
|
|
9
|
+
attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
|
|
10
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { NavigationView } from '../internal/class/navigation-view';
|
|
2
|
+
/**
|
|
3
|
+
* @summary A view that shows a main screen and lets you open other screens on top of it.
|
|
4
|
+
*/
|
|
5
|
+
export class NavigationStack extends NavigationView {
|
|
6
|
+
constructor() {
|
|
7
|
+
super();
|
|
8
|
+
}
|
|
9
|
+
disconnectedCallback() {
|
|
10
|
+
console.debug(`${NavigationStack.name} ⚡️ disconnect`);
|
|
11
|
+
super.disconnectedCallback();
|
|
12
|
+
}
|
|
13
|
+
connectedCallback() {
|
|
14
|
+
console.debug(`${NavigationStack.name} ⚡️ connect`);
|
|
15
|
+
super.connectedCallback();
|
|
16
|
+
}
|
|
17
|
+
attributeChangedCallback(name, oldValue, newValue) {
|
|
18
|
+
console.debug(`${NavigationStack.name} ⚡️ attr-change [${name}] ("${oldValue}" → "${newValue}")`);
|
|
19
|
+
super.attributeChangedCallback(name, oldValue, newValue);
|
|
20
|
+
// Snapshot.waitReady.then(() => {
|
|
21
|
+
switch (name) {
|
|
22
|
+
case 'hidden':
|
|
23
|
+
break;
|
|
24
|
+
}
|
|
25
|
+
// })
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare class NavigationTitle extends HTMLElement {
|
|
2
|
+
#private;
|
|
3
|
+
static get observedAttributes(): string[];
|
|
4
|
+
constructor();
|
|
5
|
+
disconnectedCallback(): void;
|
|
6
|
+
connectedCallback(): void;
|
|
7
|
+
attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
|
|
8
|
+
}
|