@swiftwc/ui 0.0.0-dev.91 → 0.0.0-dev.93

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 (73) hide show
  1. package/generated/components/alert-dialog.d.ts +1 -2
  2. package/generated/components/alert-dialog.js +1 -2
  3. package/generated/components/body-view.d.ts +3 -0
  4. package/generated/components/body-view.js +3 -0
  5. package/generated/components/bordered-button.d.ts +2 -2
  6. package/generated/components/bordered-button.js +2 -2
  7. package/generated/components/bordered-prominent-button.d.ts +2 -2
  8. package/generated/components/bordered-prominent-button.js +2 -2
  9. package/generated/components/borderless-button.d.ts +2 -2
  10. package/generated/components/borderless-button.js +2 -2
  11. package/generated/components/content-unavailable.d.ts +25 -0
  12. package/generated/components/{content-unavailable-view.js → content-unavailable.js} +9 -8
  13. package/generated/components/date-picker.d.ts +9 -1
  14. package/generated/components/date-picker.js +11 -4
  15. package/generated/components/form-view.d.ts +1 -1
  16. package/generated/components/form-view.js +1 -1
  17. package/generated/components/glass-button.d.ts +2 -2
  18. package/generated/components/glass-button.js +2 -2
  19. package/generated/components/glass-prominent-button.d.ts +2 -2
  20. package/generated/components/glass-prominent-button.js +2 -2
  21. package/generated/components/h-stack.d.ts +6 -6
  22. package/generated/components/h-stack.js +6 -6
  23. package/generated/components/index.d.ts +1 -1
  24. package/generated/components/index.js +1 -1
  25. package/generated/components/label-view.d.ts +6 -2
  26. package/generated/components/label-view.js +8 -4
  27. package/generated/components/labeled-content.js +3 -3
  28. package/generated/components/list-view.d.ts +1 -1
  29. package/generated/components/list-view.js +1 -13
  30. package/generated/components/menu-view.d.ts +2 -1
  31. package/generated/components/menu-view.js +3 -8
  32. package/generated/components/navigation-stack.js +0 -2
  33. package/generated/components/navigation-title.js +0 -9
  34. package/generated/components/picker-view.d.ts +8 -2
  35. package/generated/components/picker-view.js +14 -9
  36. package/generated/components/progress-view.d.ts +1 -0
  37. package/generated/components/progress-view.js +2 -1
  38. package/generated/components/scroll-view.d.ts +1 -0
  39. package/generated/components/scroll-view.js +11 -2
  40. package/generated/components/search-view.js +0 -3
  41. package/generated/components/section-view.d.ts +2 -1
  42. package/generated/components/section-view.js +4 -48
  43. package/generated/components/sheet-view.js +0 -20
  44. package/generated/components/sidebar-view.js +1 -1
  45. package/generated/components/tab-bar.js +0 -3
  46. package/generated/components/tab-view.d.ts +5 -2
  47. package/generated/components/tab-view.js +5 -72
  48. package/generated/components/table-view.d.ts +2 -1
  49. package/generated/components/table-view.js +4 -3
  50. package/generated/components/text-field.d.ts +6 -0
  51. package/generated/components/text-field.js +7 -2
  52. package/generated/components/toggle-view.d.ts +6 -0
  53. package/generated/components/toggle-view.js +7 -2
  54. package/generated/components/tool-bar.d.ts +10 -10
  55. package/generated/components/tool-bar.js +10 -10
  56. package/generated/components/v-keyboard.d.ts +1 -1
  57. package/generated/components/v-keyboard.js +1 -1
  58. package/generated/components/v-stack.d.ts +7 -7
  59. package/generated/components/v-stack.js +7 -7
  60. package/generated/css/index.css +24 -17
  61. package/generated/events/scroll-view.js +0 -4
  62. package/generated/events/text-field.js +0 -3
  63. package/generated/events/toggle-view.js +0 -3
  64. package/generated/internal/utils/ensure-placeholder.js +0 -55
  65. package/package.json +3 -2
  66. package/scss/_components.scss +1 -1
  67. package/scss/components/{_content-unavailable-view.scss → _content-unavailable.scss} +1 -1
  68. package/scss/components/_index.scss +5 -4
  69. package/scss/components/_labeled-content.scss +8 -0
  70. package/scss/components/_navigation-title.scss +1 -1
  71. package/scss/components/_toggle-view.scss +1 -1
  72. package/web-components.html-data/en.json +340 -91
  73. package/generated/components/content-unavailable-view.d.ts +0 -24
@@ -1,7 +1,6 @@
1
1
  import { DialogBase } from '../namespace-browser/base';
2
2
  /**
3
- * A representation of an alert presentation.
4
- * Use it from the client module like `void alert('Save failed.')`.
3
+ * @summary A representation of an alert presentation. Use it from the client module like `void alert('Save failed.')`.
5
4
  */
6
5
  export declare class AlertDialog extends DialogBase {
7
6
  #private;
@@ -3,8 +3,7 @@ import { CleanupRegistry } from '../internal/class/cleanup-registry';
3
3
  import { devFlags, onoff, touchGlass } from '../internal/utils';
4
4
  import { DialogBase } from '../namespace-browser/base';
5
5
  /**
6
- * A representation of an alert presentation.
7
- * Use it from the client module like `void alert('Save failed.')`.
6
+ * @summary A representation of an alert presentation. Use it from the client module like `void alert('Save failed.')`.
8
7
  */
9
8
  export class AlertDialog extends DialogBase {
10
9
  constructor() {
@@ -1,3 +1,6 @@
1
+ /**
2
+ * @summary The content and behavior of the view.
3
+ */
1
4
  export declare class BodyView extends HTMLElement {
2
5
  constructor();
3
6
  disconnectedCallback(): void;
@@ -1,4 +1,7 @@
1
1
  import { devFlags } from '../internal/utils';
2
+ /**
3
+ * @summary The content and behavior of the view.
4
+ */
2
5
  export class BodyView extends HTMLElement {
3
6
  constructor() {
4
7
  super();
@@ -1,8 +1,8 @@
1
1
  import { ButtonBase } from '../namespace-browser/base';
2
2
  /**
3
- * @summary A control that initiates an action. Styled with standard border artwork based on the button’s context.
3
+ * @summary A control that starts an action. Styled with a standard border, adapting to the button’s surroundings.
4
4
  *
5
- * @example <button is="bordered-button"><label-view system-image="hand-tap" title="Tap Me"></label-view></button>
5
+ * @example <button is="bordered-button"><label-view system-image="hand-tap" title="Tap Me"></label-view></button> — Creating a bordered button
6
6
  *
7
7
  * @slot overlay
8
8
  *
@@ -3,9 +3,9 @@ import { devFlags, ensurePlaceholder, onoff } from '../internal/utils';
3
3
  import { ButtonBase } from '../namespace-browser/base';
4
4
  import { Snapshot } from '../snapshot';
5
5
  /**
6
- * @summary A control that initiates an action. Styled with standard border artwork based on the button’s context.
6
+ * @summary A control that starts an action. Styled with a standard border, adapting to the button’s surroundings.
7
7
  *
8
- * @example <button is="bordered-button"><label-view system-image="hand-tap" title="Tap Me"></label-view></button>
8
+ * @example <button is="bordered-button"><label-view system-image="hand-tap" title="Tap Me"></label-view></button> — Creating a bordered button
9
9
  *
10
10
  * @slot overlay
11
11
  *
@@ -1,8 +1,8 @@
1
1
  import { ButtonBase } from '../namespace-browser/base';
2
2
  /**
3
- * @summary A control that initiates an action. Styled with standard border prominent artwork based on the button’s context.
3
+ * @summary A control that starts an action. Styled with a prominent border, adapting to the button’s surroundings.
4
4
  *
5
- * @example <button is="bordered-prominent-button"><label-view system-image="hand-tap" title="Tap Me"></label-view></button>
5
+ * @example <button is="bordered-prominent-button"><label-view system-image="hand-tap" title="Tap Me"></label-view></button> — Creating a prominent bordered button
6
6
  *
7
7
  * @slot overlay
8
8
  *
@@ -3,9 +3,9 @@ import { devFlags, ensurePlaceholder, onoff } from '../internal/utils';
3
3
  import { ButtonBase } from '../namespace-browser/base';
4
4
  import { Snapshot } from '../snapshot';
5
5
  /**
6
- * @summary A control that initiates an action. Styled with standard border prominent artwork based on the button’s context.
6
+ * @summary A control that starts an action. Styled with a prominent border, adapting to the button’s surroundings.
7
7
  *
8
- * @example <button is="bordered-prominent-button"><label-view system-image="hand-tap" title="Tap Me"></label-view></button>
8
+ * @example <button is="bordered-prominent-button"><label-view system-image="hand-tap" title="Tap Me"></label-view></button> — Creating a prominent bordered button
9
9
  *
10
10
  * @slot overlay
11
11
  *
@@ -1,8 +1,8 @@
1
1
  import { ButtonBase } from '../namespace-browser/base';
2
2
  /**
3
- * @summary A control that initiates an action. Styled without any borders.
3
+ * @summary A control that starts an action. Styled without any borders.
4
4
  *
5
- * @example <button is="borderless-button"><label-view system-image="hand-tap" title="Tap Me"></label-view></button>
5
+ * @example <button is="borderless-button"><label-view system-image="hand-tap" title="Tap Me"></label-view></button> — Use the `is` attribute to style a `button` as a `borderless-button`
6
6
  *
7
7
  * @slot overlay
8
8
  *
@@ -3,9 +3,9 @@ import { devFlags, ensurePlaceholder, onoff } from '../internal/utils';
3
3
  import { ButtonBase } from '../namespace-browser/base';
4
4
  import { Snapshot } from '../snapshot';
5
5
  /**
6
- * @summary A control that initiates an action. Styled without any borders.
6
+ * @summary A control that starts an action. Styled without any borders.
7
7
  *
8
- * @example <button is="borderless-button"><label-view system-image="hand-tap" title="Tap Me"></label-view></button>
8
+ * @example <button is="borderless-button"><label-view system-image="hand-tap" title="Tap Me"></label-view></button> — Use the `is` attribute to style a `button` as a `borderless-button`
9
9
  *
10
10
  * @slot overlay
11
11
  *
@@ -0,0 +1,25 @@
1
+ /**
2
+ * @summary A message with a title and extra information that you show when part of your app can’t be used.
3
+ *
4
+ * @example <content-unavailable search></content-unavailable>
5
+ *
6
+ * @example <content-unavailable search="foo"></content-unavailable>
7
+ *
8
+ * @example <content-unavailable padding><label-view title="No Mail"><i class="ph ph-tray" slot="icon" foreground="secondary"></i></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>
9
+ *
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
+ *
12
+ * @slot — The default slot.
13
+ * @slot description
14
+ * @slot actions
15
+ *
16
+ */
17
+ export declare class ContentUnavailable extends HTMLElement {
18
+ #private;
19
+ static get observedAttributes(): string[];
20
+ static get template(): DocumentFragment;
21
+ constructor();
22
+ attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
23
+ disconnectedCallback(): void;
24
+ connectedCallback(): void;
25
+ }
@@ -4,19 +4,20 @@ import { $, devFlags, onoff } from '../internal/utils';
4
4
  /**
5
5
  * @summary A message with a title and extra information that you show when part of your app can’t be used.
6
6
  *
7
- * @example <content-unavailable-view search></content-unavailable-view>
7
+ * @example <content-unavailable search></content-unavailable>
8
8
  *
9
- * @example <content-unavailable-view search="foo"></content-unavailable-view>
9
+ * @example <content-unavailable search="foo"></content-unavailable>
10
10
  *
11
- * @example <content-unavailable-view padding><label-view title="No Mail"><i class="ph ph-tray" slot="icon" foreground="secondary"></i></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-view>
11
+ * @example <content-unavailable padding><label-view title="No Mail"><i class="ph ph-tray" slot="icon" foreground="secondary"></i></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>
12
12
  *
13
- * @example <content-unavailable-view 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-view>
13
+ * @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>
14
14
  *
15
+ * @slot — The default slot.
15
16
  * @slot description
16
17
  * @slot actions
17
18
  *
18
19
  */
19
- export class ContentUnavailableView extends HTMLElement {
20
+ export class ContentUnavailable extends HTMLElement {
20
21
  static get observedAttributes() {
21
22
  return ['search'];
22
23
  }
@@ -47,7 +48,7 @@ export class ContentUnavailableView extends HTMLElement {
47
48
  }
48
49
  attributeChangedCallback(name, oldValue, newValue) {
49
50
  if (devFlags.debug)
50
- console.debug(`${ContentUnavailableView.name} ⚡️ attr-change [${name}] ("${oldValue}" → "${newValue}")`);
51
+ console.debug(`${ContentUnavailable.name} ⚡️ attr-change [${name}] ("${oldValue}" → "${newValue}")`);
51
52
  switch (name) {
52
53
  case 'search':
53
54
  if (oldValue === newValue)
@@ -62,11 +63,11 @@ export class ContentUnavailableView extends HTMLElement {
62
63
  }
63
64
  disconnectedCallback() {
64
65
  if (devFlags.debug)
65
- console.debug(`${ContentUnavailableView.name} ⚡️ disconnect`);
66
+ console.debug(`${ContentUnavailable.name} ⚡️ disconnect`);
66
67
  }
67
68
  connectedCallback() {
68
69
  if (devFlags.debug)
69
- console.debug(`${ContentUnavailableView.name} ⚡️ connect`);
70
+ console.debug(`${ContentUnavailable.name} ⚡️ connect`);
70
71
  }
71
72
  #renderSearch = (search) => {
72
73
  const titleLabel = this.querySelector(':scope>:not([slot])') ?? this.appendChild($(`<label-view><i class="ph ph-magnifying-glass" slot="icon" foreground="secondary"></i></label-view>`, '>1')), descText = this.querySelector(':scope>[slot=description]') ?? this.appendChild($(`<label-view foreground="secondary" slot="description"></label-view>`, '>1'));
@@ -2,7 +2,7 @@ import { FormAssociatedBase } from '../internal/class/form-associated-base';
2
2
  declare const datePickerStyles: readonly ["graphical", "field", "automatic"];
3
3
  export type DatePickerStyle = (typeof datePickerStyles)[number];
4
4
  /**
5
- * @summary A control for selecting an absolute date.
5
+ * @summary A control that selects an absolute date.
6
6
  */
7
7
  export declare class DatePicker extends FormAssociatedBase {
8
8
  #private;
@@ -13,12 +13,20 @@ export declare class DatePicker extends FormAssociatedBase {
13
13
  disconnectedCallback(): void;
14
14
  connectedCallback(): void;
15
15
  get datePickerStyle(): DatePickerStyle;
16
+ /**
17
+ * Form participation property
18
+ * @type {string}
19
+ */
16
20
  get name(): string;
17
21
  get value(): {
18
22
  year: string;
19
23
  month: string;
20
24
  day: string;
21
25
  };
26
+ /**
27
+ * Returns the value as a Date object.
28
+ * @type {Date|null}
29
+ */
22
30
  get valueAsDate(): Date | null;
23
31
  get minimum(): {
24
32
  year: string;
@@ -7,7 +7,7 @@ import { $, clamp, devFlags, kebabCase, onoff, set } from '../internal/utils';
7
7
  import { html, queryMorph } from '../morphdom';
8
8
  const datePickerStyles = ['graphical', 'field', 'automatic'];
9
9
  /**
10
- * @summary A control for selecting an absolute date.
10
+ * @summary A control that selects an absolute date.
11
11
  */
12
12
  export class DatePicker extends FormAssociatedBase {
13
13
  static get observedAttributes() {
@@ -85,7 +85,7 @@ export class DatePicker extends FormAssociatedBase {
85
85
  case 'name':
86
86
  case 'minimum':
87
87
  case 'maximum':
88
- this.#sendValueToForm();
88
+ this.#sendValueToForm(false);
89
89
  break;
90
90
  case 'prompt':
91
91
  const [py = '', pm = '', pd = ''] = (newValue ?? '').split(/\D+/), map = { year: py, month: pm, day: pd };
@@ -93,7 +93,7 @@ export class DatePicker extends FormAssociatedBase {
93
93
  input.setAttribute('placeholder', map[input.name] ?? '');
94
94
  break;
95
95
  case 'label':
96
- queryMorph('[slot=label]', html `<label-view slot="label" foreground="secondary">${newValue ? html `<span>${newValue}</span>` : null}</label-view>`, this); //renderLabel(':scope>label-view[slot=label]', `<label-view slot="label" foreground="secondary"><span></span></label-view>`, this, newValue)
96
+ queryMorph('[slot=label]', html `<label-view slot="label" foreground="secondary">${newValue ? html `<span>${newValue}</span>` : null}</label-view>`, this);
97
97
  // this.#sendValueToForm()
98
98
  break;
99
99
  case 'disabled':
@@ -333,7 +333,10 @@ export class DatePicker extends FormAssociatedBase {
333
333
  console.debug(`${_a.name} ⚡️ ${evt?.type}`);
334
334
  this.#sendValueToForm();
335
335
  };
336
- // Optional: form participation properties
336
+ /**
337
+ * Form participation property
338
+ * @type {string}
339
+ */
337
340
  get name() {
338
341
  return this.getAttribute('name') ?? this.getAttribute('label') ?? this.querySelector(':scope>[slot=label]')?.textContent ?? '';
339
342
  }
@@ -347,6 +350,10 @@ export class DatePicker extends FormAssociatedBase {
347
350
  day: (map.day ?? '').padStart(2, '0'),
348
351
  };
349
352
  }
353
+ /**
354
+ * Returns the value as a Date object.
355
+ * @type {Date|null}
356
+ */
350
357
  get valueAsDate() {
351
358
  try {
352
359
  const d = new Date(`${this.value.year}-${this.value.month}-${this.value.day}`);
@@ -1,6 +1,6 @@
1
1
  import { FormBase } from '../namespace-browser/base';
2
2
  /**
3
- * @attr {hidden} navigation-link-indicator-visibility - Hides accessories like right-arrow-chevron on NavigationLink buttons inside.
3
+ * @attr {hidden} navigation-link-indicator-visibility — Hides accessories like right-arrow-chevron on NavigationLink buttons inside.
4
4
  */
5
5
  export declare class FormView extends FormBase {
6
6
  constructor();
@@ -2,7 +2,7 @@ import { CleanupRegistry } from '../internal/class/cleanup-registry';
2
2
  import { devFlags, listActive, onoff } from '../internal/utils';
3
3
  import { FormBase } from '../namespace-browser/base';
4
4
  /**
5
- * @attr {hidden} navigation-link-indicator-visibility - Hides accessories like right-arrow-chevron on NavigationLink buttons inside.
5
+ * @attr {hidden} navigation-link-indicator-visibility — Hides accessories like right-arrow-chevron on NavigationLink buttons inside.
6
6
  */
7
7
  export class FormView extends FormBase {
8
8
  constructor() {
@@ -1,8 +1,8 @@
1
1
  import { ButtonBase } from '../namespace-browser/base';
2
2
  /**
3
- * @summary A control that initiates an action. Styled with glass border artwork based on the button’s context.
3
+ * @summary A control that starts an action. Styled with a glass border, adapting to the button’s surroundings.
4
4
  *
5
- * @example <button is="glass-button"><label-view system-image="hand-tap" title="Tap Me"></label-view></button>
5
+ * @example <button is="glass-button"><label-view system-image="hand-tap" title="Tap Me"></label-view></button> — Creating a glass button
6
6
  *
7
7
  * @slot overlay
8
8
  *
@@ -3,9 +3,9 @@ import { devFlags, ensurePlaceholder, onoff, touchGlass } from '../internal/util
3
3
  import { ButtonBase } from '../namespace-browser/base';
4
4
  import { Snapshot } from '../snapshot';
5
5
  /**
6
- * @summary A control that initiates an action. Styled with glass border artwork based on the button’s context.
6
+ * @summary A control that starts an action. Styled with a glass border, adapting to the button’s surroundings.
7
7
  *
8
- * @example <button is="glass-button"><label-view system-image="hand-tap" title="Tap Me"></label-view></button>
8
+ * @example <button is="glass-button"><label-view system-image="hand-tap" title="Tap Me"></label-view></button> — Creating a glass button
9
9
  *
10
10
  * @slot overlay
11
11
  *
@@ -1,8 +1,8 @@
1
1
  import { ButtonBase } from '../namespace-browser/base';
2
2
  /**
3
- * @summary A control that initiates an action. Styled with prominent glass border artwork based on the button’s context.
3
+ * @summary A control that starts an action. Styled with a prominent glass border, adapting to the button’s surroundings.
4
4
  *
5
- * @example <button is="glass-prominent-button"><label-view system-image="hand-tap" title="Tap Me"></label-view></button>
5
+ * @example <button is="glass-prominent-button"><label-view system-image="hand-tap" title="Tap Me"></label-view></button> — Creating a prominent glass button
6
6
  *
7
7
  * @slot overlay
8
8
  *
@@ -3,9 +3,9 @@ import { devFlags, ensurePlaceholder, onoff, touchGlass } from '../internal/util
3
3
  import { ButtonBase } from '../namespace-browser/base';
4
4
  import { Snapshot } from '../snapshot';
5
5
  /**
6
- * @summary A control that initiates an action. Styled with prominent glass border artwork based on the button’s context.
6
+ * @summary A control that starts an action. Styled with a prominent glass border, adapting to the button’s surroundings.
7
7
  *
8
- * @example <button is="glass-prominent-button"><label-view system-image="hand-tap" title="Tap Me"></label-view></button>
8
+ * @example <button is="glass-prominent-button"><label-view system-image="hand-tap" title="Tap Me"></label-view></button> — Creating a prominent glass button
9
9
  *
10
10
  * @slot overlay
11
11
  *
@@ -1,13 +1,13 @@
1
1
  /**
2
- * @summary A view that arranges its subviews in a horizontal line.
2
+ * @summary A view that arranges its children side by side.
3
3
  *
4
- * @attr {@templateSet} template - The main-axis grid template
4
+ * @attr {@templateSet} template — The main-axis grid template
5
5
  *
6
- * @attr {@spacingSet} spacing - The gap between the primary axis
6
+ * @attr {@spacingSet} spacing — The gap between the primary axis
7
7
  *
8
- * @attr {@blockSet} alignment - The cross-axis alignment
9
- * @attr {@inlineSet} distribution - The main-axis alignment
10
- * @attr {@inlinePlacementSet} placement - The main-axis alignment
8
+ * @attr {@blockSet} alignment — The cross-axis alignment
9
+ * @attr {@inlineSet} distribution — The main-axis alignment
10
+ * @attr {@inlinePlacementSet} placement — The main-axis alignment
11
11
  *
12
12
  */
13
13
  export declare class HStack extends HTMLElement {
@@ -1,14 +1,14 @@
1
1
  import { devFlags } from '../internal/utils';
2
2
  /**
3
- * @summary A view that arranges its subviews in a horizontal line.
3
+ * @summary A view that arranges its children side by side.
4
4
  *
5
- * @attr {@templateSet} template - The main-axis grid template
5
+ * @attr {@templateSet} template — The main-axis grid template
6
6
  *
7
- * @attr {@spacingSet} spacing - The gap between the primary axis
7
+ * @attr {@spacingSet} spacing — The gap between the primary axis
8
8
  *
9
- * @attr {@blockSet} alignment - The cross-axis alignment
10
- * @attr {@inlineSet} distribution - The main-axis alignment
11
- * @attr {@inlinePlacementSet} placement - The main-axis alignment
9
+ * @attr {@blockSet} alignment — The cross-axis alignment
10
+ * @attr {@inlineSet} distribution — The main-axis alignment
11
+ * @attr {@inlinePlacementSet} placement — The main-axis alignment
12
12
  *
13
13
  */
14
14
  export class HStack extends HTMLElement {
@@ -5,7 +5,7 @@ export * from './bordered-prominent-button';
5
5
  export * from './borderless-button';
6
6
  export * from './color-scheme';
7
7
  export * from './confirmation-dialog';
8
- export * from './content-unavailable-view';
8
+ export * from './content-unavailable';
9
9
  export * from './date-picker';
10
10
  export * from './disclosure-group';
11
11
  export * from './fine-tooltip';
@@ -5,7 +5,7 @@ export * from './bordered-prominent-button';
5
5
  export * from './borderless-button';
6
6
  export * from './color-scheme';
7
7
  export * from './confirmation-dialog';
8
- export * from './content-unavailable-view';
8
+ export * from './content-unavailable';
9
9
  export * from './date-picker';
10
10
  export * from './disclosure-group';
11
11
  export * from './fine-tooltip';
@@ -1,8 +1,12 @@
1
1
  /**
2
+ * @summary A view that labels items with an icon and a title.
2
3
  *
3
- * @attr {@fontSet} font - Sets the default font for text in this view.
4
+ * @example <label-view system-image="hand-tap"><span>Hello</span></label-view> — Creating a label with an icon image and a title
4
5
  *
5
- * @slot icon
6
+ * @attr {@fontSet} font — Sets the default font for text in this view.
7
+ *
8
+ * @slot — Place children without a `slot` attribute inside the main block of the label.
9
+ * @slot icon — Place children with a `slot="icon"` attribute in the icon block of the label.
6
10
  *
7
11
  */
8
12
  export declare class LabelView extends HTMLElement {
@@ -1,10 +1,14 @@
1
1
  import { $, devFlags } from '../internal/utils';
2
2
  import { html, queryMorph } from '../morphdom';
3
3
  /**
4
+ * @summary A view that labels items with an icon and a title.
4
5
  *
5
- * @attr {@fontSet} font - Sets the default font for text in this view.
6
+ * @example <label-view system-image="hand-tap"><span>Hello</span></label-view> — Creating a label with an icon image and a title
6
7
  *
7
- * @slot icon
8
+ * @attr {@fontSet} font — Sets the default font for text in this view.
9
+ *
10
+ * @slot — Place children without a `slot` attribute inside the main block of the label.
11
+ * @slot icon — Place children with a `slot="icon"` attribute in the icon block of the label.
8
12
  *
9
13
  */
10
14
  export class LabelView extends HTMLElement {
@@ -50,10 +54,10 @@ export class LabelView extends HTMLElement {
50
54
  // )
51
55
  // break
52
56
  case 'system-image':
53
- queryMorph('[slot=icon]', html `<image-view slot="icon" system-name="${newValue}"></image-view>`, this, { removeIf: !newValue }); //renderLabelIcon(this, newValue)
57
+ queryMorph('[slot=icon]', html `<image-view slot="icon" system-name="${newValue}"></image-view>`, this, { removeIf: !newValue });
54
58
  break;
55
59
  case 'title':
56
- queryMorph(':not([slot])', html `<span>${newValue}</span>`, this, { removeIf: !newValue }); //renderLabelTitle(this, newValue)
60
+ queryMorph(':not([slot])', html `<span>${newValue}</span>`, this, { removeIf: !newValue });
57
61
  break;
58
62
  }
59
63
  }
@@ -71,16 +71,16 @@ export class LabeledContent extends HTMLElement {
71
71
  break;
72
72
  case 'value': {
73
73
  const val = this.#fmt(newValue, this.getAttribute('format'));
74
- queryMorph('label-view:not([slot])', html `<label-view>${val ? html `<span>${val}</span>` : null}</label-view>`, this); //renderLabel(':scope>label-view:not([slot])', `<label-view><span></span></label-view>`, this, this.#fmt(newValue, this.getAttribute('format')))
74
+ queryMorph('label-view:not([slot])', html `<label-view>${val ? html `<span>${val}</span>` : null}</label-view>`, this);
75
75
  break;
76
76
  }
77
77
  case 'format': {
78
78
  const val = this.#fmt(this.getAttribute('value'), newValue);
79
- queryMorph('label-view:not([slot])', html `<label-view>${val ? html `<span>${val}</span>` : null}</label-view>`, this); //renderLabel(':scope>label-view:not([slot])', `<label-view><span></span></label-view>`, this, this.#fmt(this.getAttribute('value'), newValue))
79
+ queryMorph('label-view:not([slot])', html `<label-view>${val ? html `<span>${val}</span>` : null}</label-view>`, this);
80
80
  break;
81
81
  }
82
82
  case 'label':
83
- queryMorph('[slot=label]', html `<label-view slot="label">${newValue ? html `<span>${newValue}</span>` : null}</label-view>`, this); //renderLabel(':scope>label-view[slot=label]', `<label-view slot="label"><span></span></label-view>`, this, newValue)
83
+ queryMorph('[slot=label]', html `<label-view slot="label">${newValue ? html `<span>${newValue}</span>` : null}</label-view>`, this);
84
84
  break;
85
85
  }
86
86
  }
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @attr {hidden} navigation-link-indicator-visibility - Hides accessories like right-arrow-chevron on NavigationLink buttons inside.
2
+ * @attr {hidden} navigation-link-indicator-visibility — Hides accessories like right-arrow-chevron on NavigationLink buttons inside.
3
3
  */
4
4
  export declare class ListView extends HTMLElement {
5
5
  constructor();
@@ -1,23 +1,11 @@
1
1
  import { CleanupRegistry } from '../internal/class/cleanup-registry';
2
2
  import { devFlags, listActive, onoff } from '../internal/utils';
3
3
  /**
4
- * @attr {hidden} navigation-link-indicator-visibility - Hides accessories like right-arrow-chevron on NavigationLink buttons inside.
4
+ * @attr {hidden} navigation-link-indicator-visibility — Hides accessories like right-arrow-chevron on NavigationLink buttons inside.
5
5
  */
6
6
  export class ListView extends HTMLElement {
7
- // static #template: DocumentFragment
8
- // static get template() {
9
- // return (this.#template ??= $(
10
- // String.raw`
11
- // <slot name="searchable"></slot>
12
- // <slot></slot>
13
- // `
14
- // ))
15
- // }
16
- // #shadowRoot
17
7
  constructor() {
18
8
  super();
19
- // this.#shadowRoot = this.attachShadow({ mode: 'closed' })
20
- // this.#shadowRoot.appendChild(document.importNode((this.constructor as typeof ListView).template, true))
21
9
  }
22
10
  disconnectedCallback() {
23
11
  if (devFlags.debug)
@@ -1,6 +1,7 @@
1
1
  /**
2
- * @summary A control for presenting a menu of actions.
2
+ * @summary A control that opens a menu of actions.
3
3
  *
4
+ * @slot — The default slot.
4
5
  * @slot label
5
6
  */
6
7
  export declare class MenuView extends HTMLElement {
@@ -3,8 +3,9 @@ import { CleanupRegistry } from '../internal/class/cleanup-registry';
3
3
  import { $, devFlags, onoff, touchGlass } from '../internal/utils';
4
4
  import { html, queryMorph } from '../morphdom';
5
5
  /**
6
- * @summary A control for presenting a menu of actions.
6
+ * @summary A control that opens a menu of actions.
7
7
  *
8
+ * @slot — The default slot.
8
9
  * @slot label
9
10
  */
10
11
  export class MenuView extends HTMLElement {
@@ -61,19 +62,13 @@ export class MenuView extends HTMLElement {
61
62
  }
62
63
  break;
63
64
  case 'label':
64
- queryMorph('[slot=label]', html `<label-view slot="label">${newValue ? html `<span>${newValue}</span>` : null}</label-view>`, this); //renderLabel(':scope>[slot=label]', `<label-view slot="label"><span></span></label-view>`, this, newValue)
65
+ queryMorph('[slot=label]', html `<label-view slot="label">${newValue ? html `<span>${newValue}</span>` : null}</label-view>`, this);
65
66
  break;
66
67
  }
67
68
  }
68
69
  disconnectedCallback() {
69
70
  if (devFlags.debug)
70
71
  console.debug(`${_a.name} ⚡️ disconnect`);
71
- // const dialog = this.#shadowRoot.querySelector('dialog'),
72
- // trigger = this.#shadowRoot.querySelector('button')
73
- // trigger?.removeEventListener('click', this.#handleTriggerClick)
74
- // dialog?.removeEventListener('click', this.#handleDialogClick)
75
- // dialog?.removeEventListener('close', this.#handleDialogClose)
76
- // dialog?.removeEventListener('cancel', this.#handleDialogCancel)
77
72
  const summaryPart = this.#shadowRoot.querySelector('[part*=menu-summary]'), dialogPart = this.#shadowRoot.querySelector('[part*=menu-dialog]');
78
73
  summaryPart?.style.removeProperty('anchor-name'); //$.prop('anchor-name', null, summaryPart)
79
74
  dialogPart?.style.removeProperty('position-anchor'); //$.prop('position-anchor', null, dialogPart)
@@ -11,12 +11,10 @@ export class NavigationStack extends NavigationView {
11
11
  if (devFlags.debug)
12
12
  console.debug(`${NavigationStack.name} ⚡️ attr-change [${name}] ("${oldValue}" → "${newValue}")`);
13
13
  super.attributeChangedCallback(name, oldValue, newValue);
14
- // Snapshot.waitReady.then(() => {
15
14
  switch (name) {
16
15
  case 'hidden':
17
16
  break;
18
17
  }
19
- // })
20
18
  }
21
19
  disconnectedCallback() {
22
20
  if (devFlags.debug)
@@ -29,8 +29,6 @@ let NavigationTitle = NavigationTitle_1 = class NavigationTitle extends HTMLElem
29
29
  console.debug(`${NavigationTitle_1.name} ⚡️ connect`);
30
30
  }
31
31
  #render = (title, subtitle, systemImage, systemImageWeight) => {
32
- // const container = this.querySelector(':scope>:not([slot])') ?? this.appendChild(document.createElement('navigation-large-title'))
33
- // render(template, container)
34
32
  queryMorph(':not([slot])', html `
35
33
  <navigation-large-title>
36
34
  <v-stack alignment="fill">
@@ -50,13 +48,6 @@ let NavigationTitle = NavigationTitle_1 = class NavigationTitle extends HTMLElem
50
48
  </v-stack>
51
49
  </navigation-large-title>
52
50
  `, this);
53
- // const titleTemplate = `<label-view line-limit="1" truncation-mode="tail" font="headline"><span></span></label-view>`,
54
- // subtitleTemplate = `<label-view line-limit="1" truncation-mode="tail" foreground="secondary" font="callout"><span></span></label-view>`,
55
- // vStactTemplate = `<v-stack spacing="0" alignment="fill">${titleTemplate}${subtitleTemplate}</v-stack>`
56
- // const el = this.querySelector(':scope>:not([slot])') ?? this.appendChild($(`<navigation-large-title>${vStactTemplate}</navigation-large-title>`, '>1')),
57
- // vStack = el.querySelector(':scope>v-stack') ?? el.appendChild($(vStactTemplate, '>1'))
58
- // renderLabel(':scope>label-view:nth-child(1)', titleTemplate, vStack, title)
59
- // renderLabel(':scope>label-view:nth-child(2)', subtitleTemplate, vStack, subtitle)
60
51
  };
61
52
  };
62
53
  NavigationTitle = NavigationTitle_1 = __decorate([