@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.
Files changed (120) hide show
  1. package/generated/client/index.js +3 -3
  2. package/generated/components/content-unavailable.d.ts +1 -1
  3. package/generated/components/content-unavailable.js +1 -1
  4. package/generated/components/{body-view.d.ts → content-view.d.ts} +2 -2
  5. package/generated/components/{body-view.js → content-view.js} +3 -3
  6. package/generated/components/index.d.ts +1 -1
  7. package/generated/components/index.js +1 -1
  8. package/generated/components/labeled-content.d.ts +1 -1
  9. package/generated/components/labeled-content.js +1 -1
  10. package/generated/components/menu-view.d.ts +1 -1
  11. package/generated/components/menu-view.js +1 -1
  12. package/generated/components/picker-view.d.ts +1 -1
  13. package/generated/components/picker-view.js +12 -12
  14. package/generated/components/progress-view.d.ts +1 -1
  15. package/generated/components/progress-view.js +1 -1
  16. package/generated/components/scroll-view.d.ts +1 -1
  17. package/generated/components/scroll-view.js +1 -1
  18. package/generated/components/section-view.d.ts +1 -1
  19. package/generated/components/section-view.js +1 -1
  20. package/generated/components/tab-view.js +6 -1
  21. package/generated/components/table-view.d.ts +1 -1
  22. package/generated/components/table-view.js +1 -1
  23. package/generated/css/index.css +230 -228
  24. package/generated/internal/class/navigation-path.js +2 -2
  25. package/generated/internal/privateNamespace.d.ts +1 -1
  26. package/generated/internal/privateNamespace.js +3 -3
  27. package/generated/internal/utils/debug.js +2 -2
  28. package/html-data/en.json +18 -18
  29. package/package.json +4 -6
  30. package/scss/_components.scss +1 -1
  31. package/scss/_vars.scss +1 -0
  32. package/scss/base/_layout.scss +8 -8
  33. package/scss/base/_reboot.scss +4 -2
  34. package/scss/base/_root.scss +1 -1
  35. package/scss/colors/_index.scss +2 -2
  36. package/scss/components/_alert-dialog.scss +3 -3
  37. package/scss/components/_bordered-button.scss +2 -2
  38. package/scss/components/_bordered-prominent-button.scss +3 -3
  39. package/scss/components/_borderless-button.scss +2 -2
  40. package/scss/components/_confirmation-dialog.scss +1 -1
  41. package/scss/components/_content-unavailable.scss +1 -1
  42. package/scss/components/{_body-view.scss → _content-view.scss} +2 -2
  43. package/scss/components/_date-picker.scss +1 -1
  44. package/scss/components/_detail-placeholder.scss +5 -5
  45. package/scss/components/_disclosure-group.scss +2 -2
  46. package/scss/components/_fine-tooltip.scss +1 -1
  47. package/scss/components/_form-view.scss +3 -3
  48. package/scss/components/_full-screen.scss +1 -1
  49. package/scss/components/_glass-button.scss +2 -2
  50. package/scss/components/_glass-prominent-button.scss +3 -3
  51. package/scss/components/_group-box.scss +1 -1
  52. package/scss/components/_h-divider.scss +1 -1
  53. package/scss/components/_h-flex-stack.scss +1 -1
  54. package/scss/components/_h-stack.scss +1 -1
  55. package/scss/components/_image-view.scss +1 -1
  56. package/scss/components/_index.scss +4 -4
  57. package/scss/components/_label-view.scss +1 -1
  58. package/scss/components/_labeled-content.scss +1 -1
  59. package/scss/components/_list-view.scss +3 -3
  60. package/scss/components/_menu-view.scss +3 -3
  61. package/scss/components/_navigation-large-title.scss +1 -1
  62. package/scss/components/_navigation-split-view.scss +18 -18
  63. package/scss/components/_navigation-stack.scss +1 -1
  64. package/scss/components/_navigation-title.scss +1 -1
  65. package/scss/components/_picker-view.scss +2 -2
  66. package/scss/components/_plain-button.scss +2 -2
  67. package/scss/components/_progress-view.scss +1 -1
  68. package/scss/components/_scroll-view-proxy.scss +1 -1
  69. package/scss/components/_scroll-view-toolbars.scss +1 -1
  70. package/scss/components/_scroll-view.scss +2 -2
  71. package/scss/components/_search-view.scss +1 -1
  72. package/scss/components/_section-view.scss +1 -1
  73. package/scss/components/_sheet-view.scss +2 -2
  74. package/scss/components/_sidebar-toggle.scss +1 -1
  75. package/scss/components/_sidebar-view.scss +2 -2
  76. package/scss/components/_sticky-container.scss +1 -1
  77. package/scss/components/_tab-bar.scss +1 -1
  78. package/scss/components/_tab-item.scss +1 -1
  79. package/scss/components/_tab-view.scss +15 -15
  80. package/scss/components/_table-column.scss +1 -1
  81. package/scss/components/_table-row.scss +1 -1
  82. package/scss/components/_table-view.scss +1 -1
  83. package/scss/components/_text-field.scss +1 -1
  84. package/scss/components/_text-view.scss +1 -1
  85. package/scss/components/_toggle-view.scss +1 -1
  86. package/scss/components/_tool-bar-item-group.scss +1 -1
  87. package/scss/components/_tool-bar-item.scss +2 -2
  88. package/scss/components/_tool-bar.scss +2 -2
  89. package/scss/components/_v-divider.scss +1 -1
  90. package/scss/components/_v-flex-stack.scss +1 -1
  91. package/scss/components/_v-keyboard.scss +1 -1
  92. package/scss/components/_v-stack.scss +1 -1
  93. package/scss/final/_touch-glass.scss +1 -1
  94. package/scss/mixins/_index.scss +2 -2
  95. package/scss/placeholders/_buttons.scss +5 -5
  96. package/scss/placeholders/_lists.scss +3 -3
  97. package/scss/transitions/_alert-dialog.scss +1 -1
  98. package/scss/transitions/_bwd.navbar.scss +1 -1
  99. package/scss/transitions/_bwd.scss +3 -3
  100. package/scss/transitions/_confirmation-dialog.scss +1 -1
  101. package/scss/transitions/_disclosure-group.scss +1 -1
  102. package/scss/transitions/_fine-tooltip.scss +1 -1
  103. package/scss/transitions/_fwd.navbar.scss +1 -1
  104. package/scss/transitions/_fwd.scss +1 -1
  105. package/scss/transitions/_glass-button.scss +1 -1
  106. package/scss/transitions/_glass-prominent-button.scss +1 -1
  107. package/scss/transitions/_index.scss +1 -1
  108. package/scss/transitions/_menu-view.scss +1 -1
  109. package/scss/transitions/_navigation-split-view.scss +1 -1
  110. package/scss/transitions/_progress-view.scss +1 -1
  111. package/scss/transitions/_sheet-view.scss +1 -1
  112. package/scss/transitions/_sidebar-view.scss +1 -1
  113. package/scss/transitions/_tab-bar.scss +1 -1
  114. package/scss/utils/_background.scss +1 -1
  115. package/scss/utils/_frame.scss +2 -2
  116. package/scss/utils/_index.scss +1 -1
  117. package/scss/utils/_spacing.scss +1 -1
  118. package/scss/utils/_stacks.scss +2 -2
  119. /package/generated/internal/{flags.d.ts → dev-flags.d.ts} +0 -0
  120. /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 flags from '../internal/flags';
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(flags);
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('body-view,dialog')?.insertAdjacentElement('beforeend', dialog); // dialog.showModal()
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 BodyView extends HTMLElement {
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
- 'body-view': BodyView;
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 BodyView extends HTMLElement {
5
+ export class ContentView extends HTMLElement {
6
6
  constructor() {
7
7
  super();
8
8
  }
9
9
  disconnectedCallback() {
10
- debug(`${BodyView.name} ⚡️ disconnect`);
10
+ debug(`${ContentView.name} ⚡️ disconnect`);
11
11
  }
12
12
  connectedCallback() {
13
- debug(`${BodyView.name} ⚡️ connect`);
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
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * @summary A control that opens a menu of actions.
3
3
  *
4
- * @slot — The default slot.
4
+ * @slot — The default slot
5
5
  * @slot label
6
6
  */
7
7
  export declare class MenuView extends HTMLElement {
@@ -6,7 +6,7 @@ import { html } from '../tpl';
6
6
  /**
7
7
  * @summary A control that opens a menu of actions.
8
8
  *
9
- * @slot — The default slot.
9
+ * @slot — The default slot
10
10
  * @slot label
11
11
  */
12
12
  export class MenuView extends HTMLElement {
@@ -16,7 +16,7 @@ export type Dictionary = DictEntry[];
16
16
  *
17
17
  * @attr {boolean} horizontal-radio-group-layout
18
18
  *
19
- * @slot — The default slot.
19
+ * @slot — The default slot
20
20
  * @slot label
21
21
  * @slot list
22
22
  * @slot {HTMLOptionElement[]} validity-options
@@ -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, 'body-view', groupId, this.hasAttribute('searchable'), extractLabel(el));
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 `<body-view>
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
- </body-view>`, '>1'), sv = body.querySelector('scroll-view'), list = body.querySelector('list-view'), backBtn = body.querySelector('button');
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('body-view')) {
340
- const depth = ancestors('body-view,[is=sheet-view]', el).indexOf(this.#spawn);
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, 'body-view', groupId, this.hasAttribute('searchable'), title);
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' : 'body-view', undefined, this.hasAttribute('searchable'), this.getAttribute('label')));
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>('body-view')) {
429
- // const depth = $.ancestors('body-view,[is=sheet-view]', el).indexOf(this.#spawn)
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), 'body-view', this.hasAttribute('searchable'), datalist.dataset.label))
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' : 'body-view', undefined, this.hasAttribute('searchable'), this.getAttribute('label'));
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();
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * @summary A view that shows how far along a task is.
3
3
  *
4
- * @slot — The default slot.
4
+ * @slot — The default slot
5
5
  * @slot current-value
6
6
  */
7
7
  export declare class ProgressView extends HTMLElement {
@@ -9,7 +9,7 @@ const progressViewStyles = ['circular', 'linear'];
9
9
  /**
10
10
  * @summary A view that shows how far along a task is.
11
11
  *
12
- * @slot — The default slot.
12
+ * @slot — The default slot
13
13
  * @slot current-value
14
14
  */
15
15
  export class ProgressView extends HTMLElement {
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * @summary A view that scrolls its content when it doesn’t fit the screen.
3
3
  *
4
- * @slot — The default slot.
4
+ * @slot — The default slot
5
5
  * @slot top-bar-principal
6
6
  * @slot bottom-bar-principal
7
7
  */
@@ -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
  */
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * @summary A container view that groups related content together.
3
3
  *
4
- * @slot — The default slot.
4
+ * @slot — The default slot
5
5
  * @slot header
6
6
  * @slot footer
7
7
  */
@@ -4,7 +4,7 @@ import { html } from '../tpl';
4
4
  /**
5
5
  * @summary A container view that groups related content together.
6
6
  *
7
- * @slot — The default slot.
7
+ * @slot — The default slot
8
8
  * @slot header
9
9
  * @slot footer
10
10
  */
@@ -38,7 +38,12 @@ export class TabView extends HTMLElement {
38
38
  return this.#cachedAdaptableTabBarPlacement;
39
39
  }
40
40
  get moreTab() {
41
- return this.querySelector(':scope>navigation-stack:has(> navigation-stack,> navigation-split-view)');
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