@swiftwc/ui 0.0.0-dev.114 → 0.0.0-dev.117
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/generated/client/index.js +3 -3
- package/generated/components/content-unavailable.d.ts +1 -1
- package/generated/components/content-unavailable.js +1 -1
- package/generated/components/{body-view.d.ts → content-view.d.ts} +2 -2
- package/generated/components/{body-view.js → content-view.js} +3 -3
- package/generated/components/index.d.ts +1 -1
- package/generated/components/index.js +1 -1
- package/generated/components/labeled-content.d.ts +1 -1
- package/generated/components/labeled-content.js +1 -1
- package/generated/components/menu-view.d.ts +1 -1
- package/generated/components/menu-view.js +1 -1
- package/generated/components/picker-view.d.ts +1 -1
- package/generated/components/picker-view.js +12 -12
- package/generated/components/progress-view.d.ts +1 -1
- package/generated/components/progress-view.js +1 -1
- package/generated/components/scroll-view.d.ts +1 -1
- package/generated/components/scroll-view.js +1 -1
- package/generated/components/section-view.d.ts +1 -1
- package/generated/components/section-view.js +1 -1
- package/generated/components/tab-view.js +6 -1
- package/generated/components/table-view.d.ts +1 -1
- package/generated/components/table-view.js +1 -1
- package/generated/css/index.css +230 -228
- package/generated/internal/class/navigation-path.js +2 -2
- package/generated/internal/privateNamespace.d.ts +1 -1
- package/generated/internal/privateNamespace.js +3 -3
- package/generated/internal/utils/debug.js +2 -2
- package/html-data/en.json +18 -18
- package/package.json +4 -6
- package/scss/_components.scss +1 -1
- package/scss/_vars.scss +1 -0
- package/scss/base/_layout.scss +8 -8
- package/scss/base/_reboot.scss +4 -2
- package/scss/base/_root.scss +1 -1
- package/scss/colors/_index.scss +2 -2
- package/scss/components/_alert-dialog.scss +3 -3
- package/scss/components/_bordered-button.scss +2 -2
- package/scss/components/_bordered-prominent-button.scss +3 -3
- package/scss/components/_borderless-button.scss +2 -2
- package/scss/components/_confirmation-dialog.scss +1 -1
- package/scss/components/_content-unavailable.scss +1 -1
- package/scss/components/{_body-view.scss → _content-view.scss} +2 -2
- package/scss/components/_date-picker.scss +1 -1
- package/scss/components/_detail-placeholder.scss +5 -5
- package/scss/components/_disclosure-group.scss +2 -2
- package/scss/components/_fine-tooltip.scss +1 -1
- package/scss/components/_form-view.scss +3 -3
- package/scss/components/_full-screen.scss +1 -1
- package/scss/components/_glass-button.scss +2 -2
- package/scss/components/_glass-prominent-button.scss +3 -3
- package/scss/components/_group-box.scss +1 -1
- package/scss/components/_h-divider.scss +1 -1
- package/scss/components/_h-flex-stack.scss +1 -1
- package/scss/components/_h-stack.scss +1 -1
- package/scss/components/_image-view.scss +1 -1
- package/scss/components/_index.scss +4 -4
- package/scss/components/_label-view.scss +1 -1
- package/scss/components/_labeled-content.scss +1 -1
- package/scss/components/_list-view.scss +3 -3
- package/scss/components/_menu-view.scss +3 -3
- package/scss/components/_navigation-large-title.scss +1 -1
- package/scss/components/_navigation-split-view.scss +18 -18
- package/scss/components/_navigation-stack.scss +1 -1
- package/scss/components/_navigation-title.scss +1 -1
- package/scss/components/_picker-view.scss +2 -2
- package/scss/components/_plain-button.scss +2 -2
- package/scss/components/_progress-view.scss +1 -1
- package/scss/components/_scroll-view-proxy.scss +1 -1
- package/scss/components/_scroll-view-toolbars.scss +1 -1
- package/scss/components/_scroll-view.scss +2 -2
- package/scss/components/_search-view.scss +1 -1
- package/scss/components/_section-view.scss +1 -1
- package/scss/components/_sheet-view.scss +2 -2
- package/scss/components/_sidebar-toggle.scss +1 -1
- package/scss/components/_sidebar-view.scss +2 -2
- package/scss/components/_sticky-container.scss +1 -1
- package/scss/components/_tab-bar.scss +1 -1
- package/scss/components/_tab-item.scss +1 -1
- package/scss/components/_tab-view.scss +15 -15
- package/scss/components/_table-column.scss +1 -1
- package/scss/components/_table-row.scss +1 -1
- package/scss/components/_table-view.scss +1 -1
- package/scss/components/_text-field.scss +1 -1
- package/scss/components/_text-view.scss +1 -1
- package/scss/components/_toggle-view.scss +1 -1
- package/scss/components/_tool-bar-item-group.scss +1 -1
- package/scss/components/_tool-bar-item.scss +2 -2
- package/scss/components/_tool-bar.scss +2 -2
- package/scss/components/_v-divider.scss +1 -1
- package/scss/components/_v-flex-stack.scss +1 -1
- package/scss/components/_v-keyboard.scss +1 -1
- package/scss/components/_v-stack.scss +1 -1
- package/scss/final/_touch-glass.scss +1 -1
- package/scss/mixins/_index.scss +2 -2
- package/scss/placeholders/_buttons.scss +5 -5
- package/scss/placeholders/_lists.scss +3 -3
- package/scss/transitions/_alert-dialog.scss +1 -1
- package/scss/transitions/_bwd.navbar.scss +1 -1
- package/scss/transitions/_bwd.scss +3 -3
- package/scss/transitions/_confirmation-dialog.scss +1 -1
- package/scss/transitions/_disclosure-group.scss +1 -1
- package/scss/transitions/_fine-tooltip.scss +1 -1
- package/scss/transitions/_fwd.navbar.scss +1 -1
- package/scss/transitions/_fwd.scss +1 -1
- package/scss/transitions/_glass-button.scss +1 -1
- package/scss/transitions/_glass-prominent-button.scss +1 -1
- package/scss/transitions/_index.scss +1 -1
- package/scss/transitions/_menu-view.scss +1 -1
- package/scss/transitions/_navigation-split-view.scss +1 -1
- package/scss/transitions/_progress-view.scss +1 -1
- package/scss/transitions/_sheet-view.scss +1 -1
- package/scss/transitions/_sidebar-view.scss +1 -1
- package/scss/transitions/_tab-bar.scss +1 -1
- package/scss/utils/_background.scss +1 -1
- package/scss/utils/_frame.scss +2 -2
- package/scss/utils/_index.scss +1 -1
- package/scss/utils/_spacing.scss +1 -1
- package/scss/utils/_stacks.scss +2 -2
- /package/generated/internal/{flags.d.ts → dev-flags.d.ts} +0 -0
- /package/generated/internal/{flags.js → dev-flags.js} +0 -0
|
@@ -2,12 +2,12 @@ import { alertDialog, confirmationDialog as confirmationDialogBus, lifecycleObse
|
|
|
2
2
|
import * as Components from '../components';
|
|
3
3
|
import { I18n } from '../i18n';
|
|
4
4
|
import { NavigationPath } from '../internal/class/navigation-path';
|
|
5
|
-
import
|
|
5
|
+
import devFlags from '../internal/dev-flags';
|
|
6
6
|
import { queryInsertPosition, startViewTransition } from '../internal/privateNamespace';
|
|
7
7
|
import { $, debug, kebabCase, onoff } from '../internal/utils';
|
|
8
8
|
import { Snapshot } from '../snapshot';
|
|
9
9
|
import { html, render } from '../tpl';
|
|
10
|
-
debug(
|
|
10
|
+
debug(devFlags);
|
|
11
11
|
//#region polyfills
|
|
12
12
|
export const polyfills = new Map();
|
|
13
13
|
for (const [k, Ctor] of Object.entries(Components)) {
|
|
@@ -263,7 +263,7 @@ export const confirmationDialog = async (trigger, title, message, actions, optio
|
|
|
263
263
|
}
|
|
264
264
|
dialog.insertAdjacentElement('beforeend', btn);
|
|
265
265
|
}
|
|
266
|
-
trigger.closest('
|
|
266
|
+
trigger.closest('content-view,dialog')?.insertAdjacentElement('beforeend', dialog); // dialog.showModal()
|
|
267
267
|
const { promise, resolve } = Promise.withResolvers(), off = onoff('confirmation:return', (evt) => {
|
|
268
268
|
const { detail } = evt;
|
|
269
269
|
off();
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
*
|
|
10
10
|
* @example <content-unavailable padding><label-view title="No Mail"><svg slot="icon" foreground="secondary" ...>...</svg></label-view><label-view title="New mails you receive will appear here." foreground="secondary" slot="description"></label-view><button is="borderless-button" type="button" tabindex="0" slot="actions"><label-view title="Switch Account"></label-view></button></content-unavailable>
|
|
11
11
|
*
|
|
12
|
-
* @slot — The default slot
|
|
12
|
+
* @slot — The default slot
|
|
13
13
|
* @slot description
|
|
14
14
|
* @slot actions
|
|
15
15
|
*
|
|
@@ -13,7 +13,7 @@ import { html } from '../tpl';
|
|
|
13
13
|
*
|
|
14
14
|
* @example <content-unavailable padding><label-view title="No Mail"><svg slot="icon" foreground="secondary" ...>...</svg></label-view><label-view title="New mails you receive will appear here." foreground="secondary" slot="description"></label-view><button is="borderless-button" type="button" tabindex="0" slot="actions"><label-view title="Switch Account"></label-view></button></content-unavailable>
|
|
15
15
|
*
|
|
16
|
-
* @slot — The default slot
|
|
16
|
+
* @slot — The default slot
|
|
17
17
|
* @slot description
|
|
18
18
|
* @slot actions
|
|
19
19
|
*
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @summary A container view that wraps a scroll view, marking it as a screen your app can navigate to.
|
|
3
3
|
*/
|
|
4
|
-
export declare class
|
|
4
|
+
export declare class ContentView extends HTMLElement {
|
|
5
5
|
constructor();
|
|
6
6
|
disconnectedCallback(): void;
|
|
7
7
|
connectedCallback(): void;
|
|
8
8
|
}
|
|
9
9
|
declare global {
|
|
10
10
|
interface HTMLElementTagNameMap {
|
|
11
|
-
'
|
|
11
|
+
'content-view': ContentView;
|
|
12
12
|
}
|
|
13
13
|
}
|
|
@@ -2,14 +2,14 @@ import { debug } from '../internal/utils';
|
|
|
2
2
|
/**
|
|
3
3
|
* @summary A container view that wraps a scroll view, marking it as a screen your app can navigate to.
|
|
4
4
|
*/
|
|
5
|
-
export class
|
|
5
|
+
export class ContentView extends HTMLElement {
|
|
6
6
|
constructor() {
|
|
7
7
|
super();
|
|
8
8
|
}
|
|
9
9
|
disconnectedCallback() {
|
|
10
|
-
debug(`${
|
|
10
|
+
debug(`${ContentView.name} ⚡️ disconnect`);
|
|
11
11
|
}
|
|
12
12
|
connectedCallback() {
|
|
13
|
-
debug(`${
|
|
13
|
+
debug(`${ContentView.name} ⚡️ connect`);
|
|
14
14
|
}
|
|
15
15
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
export * from './alert-dialog';
|
|
2
|
-
export * from './body-view';
|
|
3
2
|
export * from './bordered-button';
|
|
4
3
|
export * from './bordered-prominent-button';
|
|
5
4
|
export * from './borderless-button';
|
|
6
5
|
export * from './color-scheme';
|
|
7
6
|
export * from './confirmation-dialog';
|
|
8
7
|
export * from './content-unavailable';
|
|
8
|
+
export * from './content-view';
|
|
9
9
|
export * from './date-picker';
|
|
10
10
|
export * from './detail-placeholder';
|
|
11
11
|
export * from './disclosure-group';
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
export * from './alert-dialog';
|
|
2
|
-
export * from './body-view';
|
|
3
2
|
export * from './bordered-button';
|
|
4
3
|
export * from './bordered-prominent-button';
|
|
5
4
|
export * from './borderless-button';
|
|
6
5
|
export * from './color-scheme';
|
|
7
6
|
export * from './confirmation-dialog';
|
|
8
7
|
export * from './content-unavailable';
|
|
8
|
+
export * from './content-view';
|
|
9
9
|
export * from './date-picker';
|
|
10
10
|
export * from './detail-placeholder';
|
|
11
11
|
export * from './disclosure-group';
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*
|
|
8
8
|
* @example <labeled-content value="Content"><label-view slot="label" title="Custom Value"></label-view><label-view slot="label" title="Custom Subtitle Value"></label-view></labeled-content> — Creates a labeled element that displays a custom label and a custom subtitle to the label
|
|
9
9
|
*
|
|
10
|
-
* @slot — The default slot
|
|
10
|
+
* @slot — The default slot
|
|
11
11
|
* @slot label — Use the `slot="label"` attribute to place childen in the label block.
|
|
12
12
|
* @slot header
|
|
13
13
|
* @slot footer
|
|
@@ -10,7 +10,7 @@ import { html } from '../tpl';
|
|
|
10
10
|
*
|
|
11
11
|
* @example <labeled-content value="Content"><label-view slot="label" title="Custom Value"></label-view><label-view slot="label" title="Custom Subtitle Value"></label-view></labeled-content> — Creates a labeled element that displays a custom label and a custom subtitle to the label
|
|
12
12
|
*
|
|
13
|
-
* @slot — The default slot
|
|
13
|
+
* @slot — The default slot
|
|
14
14
|
* @slot label — Use the `slot="label"` attribute to place childen in the label block.
|
|
15
15
|
* @slot header
|
|
16
16
|
* @slot footer
|
|
@@ -136,7 +136,7 @@ const flattenDictionary = (tree) => {
|
|
|
136
136
|
*
|
|
137
137
|
* @attr {boolean} horizontal-radio-group-layout
|
|
138
138
|
*
|
|
139
|
-
* @slot — The default slot
|
|
139
|
+
* @slot — The default slot
|
|
140
140
|
* @slot label
|
|
141
141
|
* @slot list
|
|
142
142
|
* @slot {HTMLOptionElement[]} validity-options
|
|
@@ -184,7 +184,7 @@ export class PickerView extends FormAssociatedBase {
|
|
|
184
184
|
const { target } = evt;
|
|
185
185
|
if (!(target instanceof HTMLElement))
|
|
186
186
|
return;
|
|
187
|
-
const newPage = this.#spawnPage(el instanceof Element ? Array.from(el.children) : el.children, '
|
|
187
|
+
const newPage = this.#spawnPage(el instanceof Element ? Array.from(el.children) : el.children, 'content-view', groupId, this.hasAttribute('searchable'), extractLabel(el));
|
|
188
188
|
if (!newPage)
|
|
189
189
|
return;
|
|
190
190
|
newPage.dataset.groupId = groupId; // <-- tag the spawned page
|
|
@@ -212,7 +212,7 @@ export class PickerView extends FormAssociatedBase {
|
|
|
212
212
|
</tool-bar-item>
|
|
213
213
|
</tool-bar>
|
|
214
214
|
</dialog>`, '>1')
|
|
215
|
-
: $(html `<
|
|
215
|
+
: $(html `<content-view>
|
|
216
216
|
<scroll-view>
|
|
217
217
|
<v-stack placement="leading fill">
|
|
218
218
|
<list-view preferred-expanded-style="inset"></list-view>
|
|
@@ -225,7 +225,7 @@ export class PickerView extends FormAssociatedBase {
|
|
|
225
225
|
</button>
|
|
226
226
|
</tool-bar-item>
|
|
227
227
|
</tool-bar>
|
|
228
|
-
</
|
|
228
|
+
</content-view>`, '>1'), sv = body.querySelector('scroll-view'), list = body.querySelector('list-view'), backBtn = body.querySelector('button');
|
|
229
229
|
if (title)
|
|
230
230
|
sv?.setAttribute('navigation-inline-title', title);
|
|
231
231
|
if (searchable) {
|
|
@@ -336,8 +336,8 @@ export class PickerView extends FormAssociatedBase {
|
|
|
336
336
|
if (!this.#spawn)
|
|
337
337
|
return;
|
|
338
338
|
const groupMap = indexGroups(freshRoot);
|
|
339
|
-
for (const el of this.#spawn.querySelectorAll('
|
|
340
|
-
const depth = ancestors('
|
|
339
|
+
for (const el of this.#spawn.querySelectorAll('content-view')) {
|
|
340
|
+
const depth = ancestors('content-view,[is=sheet-view]', el).indexOf(this.#spawn);
|
|
341
341
|
if (0 >= depth)
|
|
342
342
|
continue;
|
|
343
343
|
const groupId = el.dataset.groupId;
|
|
@@ -348,7 +348,7 @@ export class PickerView extends FormAssociatedBase {
|
|
|
348
348
|
}
|
|
349
349
|
const children = source instanceof Element ? Array.from(source.children) : source.children;
|
|
350
350
|
const title = source instanceof Element ? extractLabel(source) : (source.title ?? null);
|
|
351
|
-
const newPage = this.#spawnPage(children, '
|
|
351
|
+
const newPage = this.#spawnPage(children, 'content-view', groupId, this.hasAttribute('searchable'), title);
|
|
352
352
|
newPage.dataset.groupId = groupId;
|
|
353
353
|
reflectSpawnedPage(el, newPage);
|
|
354
354
|
}
|
|
@@ -422,18 +422,18 @@ export class PickerView extends FormAssociatedBase {
|
|
|
422
422
|
if (!this.#spawn)
|
|
423
423
|
break;
|
|
424
424
|
// rerender level 0
|
|
425
|
-
reflectSpawnedPage(this.#spawn, this.#spawnPage(input.source, 'DIALOG' === this.#spawn.tagName ? 'sheet-view' : '
|
|
425
|
+
reflectSpawnedPage(this.#spawn, this.#spawnPage(input.source, 'DIALOG' === this.#spawn.tagName ? 'sheet-view' : 'content-view', undefined, this.hasAttribute('searchable'), this.getAttribute('label')));
|
|
426
426
|
this.#resyncSpawnedPages(input.source);
|
|
427
427
|
// // FIXME:
|
|
428
|
-
// for (const el of this.#spawn.querySelectorAll<HTMLElement>('
|
|
429
|
-
// const depth = $.ancestors('
|
|
428
|
+
// for (const el of this.#spawn.querySelectorAll<HTMLElement>('content-view')) {
|
|
429
|
+
// const depth = $.ancestors('content-view,[is=sheet-view]', el).indexOf(this.#spawn)
|
|
430
430
|
// if (0 >= depth) continue
|
|
431
431
|
// const datalist = this.querySelector<HTMLElement>(`:scope>${Array.from({ length: depth }, () => 'datalist').join('>')}`)
|
|
432
432
|
// if (!datalist) {
|
|
433
433
|
// el.remove()
|
|
434
434
|
// break
|
|
435
435
|
// }
|
|
436
|
-
// reflectSpawnedElement(el, this.#spawnPage(Array.from(datalist.children), '
|
|
436
|
+
// reflectSpawnedElement(el, this.#spawnPage(Array.from(datalist.children), 'content-view', this.hasAttribute('searchable'), datalist.dataset.label))
|
|
437
437
|
// }
|
|
438
438
|
break;
|
|
439
439
|
}
|
|
@@ -788,7 +788,7 @@ export class PickerView extends FormAssociatedBase {
|
|
|
788
788
|
this.#spawn?.remove?.();
|
|
789
789
|
const { source } = this.#resolveSource();
|
|
790
790
|
const level0 = this.#spawnPage(source, // this.hasAttribute('dictionary') ? parseDictionary(this.getAttribute('dictionary')) : (this.#slots?.get('list')?.assignedElements() ?? []),
|
|
791
|
-
'sheet' === this.pickerStyle ? 'sheet-view' : '
|
|
791
|
+
'sheet' === this.pickerStyle ? 'sheet-view' : 'content-view', undefined, this.hasAttribute('searchable'), this.getAttribute('label'));
|
|
792
792
|
if (!level0)
|
|
793
793
|
return;
|
|
794
794
|
const path = new NavigationPath(target)?.hydrate();
|
|
@@ -9,7 +9,7 @@ const observers = new ResizeObserverSingleton();
|
|
|
9
9
|
/**
|
|
10
10
|
* @summary A view that scrolls its content when it doesn’t fit the screen.
|
|
11
11
|
*
|
|
12
|
-
* @slot — The default slot
|
|
12
|
+
* @slot — The default slot
|
|
13
13
|
* @slot top-bar-principal
|
|
14
14
|
* @slot bottom-bar-principal
|
|
15
15
|
*/
|
|
@@ -38,7 +38,12 @@ export class TabView extends HTMLElement {
|
|
|
38
38
|
return this.#cachedAdaptableTabBarPlacement;
|
|
39
39
|
}
|
|
40
40
|
get moreTab() {
|
|
41
|
-
|
|
41
|
+
try {
|
|
42
|
+
return this.querySelector(':scope>navigation-stack:has(> navigation-stack,> navigation-split-view)');
|
|
43
|
+
}
|
|
44
|
+
catch {
|
|
45
|
+
return this.querySelector(':scope>navigation-stack:has(> navigation-stack)') ?? this.querySelector(':scope>navigation-stack:has(> navigation-split-view)');
|
|
46
|
+
}
|
|
42
47
|
}
|
|
43
48
|
connectedCallback() {
|
|
44
49
|
debug(`${_a.name} ⚡️ connect`);
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* @attr {title:trailing:subtitle|trailing:title:subtitle|title:subtitle:trailing|*} preferred-compact-template — Sets the template areas when the table is in compact mode
|
|
5
5
|
*
|
|
6
|
-
* @slot — The default slot
|
|
6
|
+
* @slot — The default slot
|
|
7
7
|
* @slot header-leading
|
|
8
8
|
* @slot header-principal
|
|
9
9
|
* @slot header-trailing
|
|
@@ -11,7 +11,7 @@ import { html } from '../tpl';
|
|
|
11
11
|
*
|
|
12
12
|
* @attr {title:trailing:subtitle|trailing:title:subtitle|title:subtitle:trailing|*} preferred-compact-template — Sets the template areas when the table is in compact mode
|
|
13
13
|
*
|
|
14
|
-
* @slot — The default slot
|
|
14
|
+
* @slot — The default slot
|
|
15
15
|
* @slot header-leading
|
|
16
16
|
* @slot header-principal
|
|
17
17
|
* @slot header-trailing
|