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

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 (87) hide show
  1. package/generated/components/alert-dialog.d.ts +1 -1
  2. package/generated/components/alert-dialog.js +1 -1
  3. package/generated/components/body-view.d.ts +6 -1
  4. package/generated/components/body-view.js +1 -1
  5. package/generated/components/color-scheme.d.ts +5 -0
  6. package/generated/components/confirmation-dialog.d.ts +1 -2
  7. package/generated/components/confirmation-dialog.js +1 -2
  8. package/generated/components/content-unavailable.d.ts +5 -0
  9. package/generated/components/date-picker.d.ts +9 -4
  10. package/generated/components/date-picker.js +17 -9
  11. package/generated/components/disclosure-group.d.ts +4 -1
  12. package/generated/components/disclosure-group.js +5 -1
  13. package/generated/components/fine-tooltip.d.ts +5 -0
  14. package/generated/components/form-view.d.ts +7 -0
  15. package/generated/components/form-view.js +2 -0
  16. package/generated/components/h-stack.d.ts +7 -2
  17. package/generated/components/h-stack.js +2 -2
  18. package/generated/components/image-view.d.ts +9 -0
  19. package/generated/components/image-view.js +4 -0
  20. package/generated/components/label-view.d.ts +7 -4
  21. package/generated/components/label-view.js +16 -5
  22. package/generated/components/labeled-content.d.ts +13 -0
  23. package/generated/components/labeled-content.js +19 -1
  24. package/generated/components/list-view.d.ts +7 -0
  25. package/generated/components/list-view.js +2 -0
  26. package/generated/components/menu-view.d.ts +5 -0
  27. package/generated/components/navigation-large-title.d.ts +12 -0
  28. package/generated/components/navigation-large-title.js +7 -0
  29. package/generated/components/navigation-split-view.d.ts +6 -1
  30. package/generated/components/navigation-split-view.js +1 -1
  31. package/generated/components/navigation-stack.d.ts +6 -1
  32. package/generated/components/navigation-stack.js +1 -1
  33. package/generated/components/navigation-title.d.ts +10 -0
  34. package/generated/components/navigation-title.js +5 -0
  35. package/generated/components/picker-view.d.ts +9 -4
  36. package/generated/components/picker-view.js +11 -9
  37. package/generated/components/progress-view.d.ts +6 -1
  38. package/generated/components/progress-view.js +1 -1
  39. package/generated/components/scroll-view-proxy.d.ts +6 -1
  40. package/generated/components/scroll-view-proxy.js +1 -1
  41. package/generated/components/scroll-view.d.ts +7 -0
  42. package/generated/components/scroll-view.js +2 -0
  43. package/generated/components/search-view.d.ts +5 -0
  44. package/generated/components/section-view.d.ts +5 -0
  45. package/generated/components/sheet-view.d.ts +3 -0
  46. package/generated/components/sheet-view.js +3 -0
  47. package/generated/components/sidebar-toggle.d.ts +9 -1
  48. package/generated/components/sidebar-toggle.js +9 -6
  49. package/generated/components/sidebar-view.d.ts +3 -0
  50. package/generated/components/sidebar-view.js +3 -0
  51. package/generated/components/sticky-container.d.ts +6 -1
  52. package/generated/components/sticky-container.js +5 -5
  53. package/generated/components/tab-bar.d.ts +1 -1
  54. package/generated/components/tab-bar.js +1 -1
  55. package/generated/components/tab-item.d.ts +3 -0
  56. package/generated/components/tab-item.js +3 -0
  57. package/generated/components/tab-view.d.ts +8 -2
  58. package/generated/components/tab-view.js +1 -0
  59. package/generated/components/table-view.d.ts +6 -1
  60. package/generated/components/table-view.js +1 -1
  61. package/generated/components/text-field.d.ts +9 -4
  62. package/generated/components/text-field.js +37 -15
  63. package/generated/components/toggle-view.d.ts +11 -4
  64. package/generated/components/toggle-view.js +13 -11
  65. package/generated/components/tool-bar-item-group.d.ts +6 -1
  66. package/generated/components/tool-bar-item-group.js +1 -1
  67. package/generated/components/tool-bar-item.d.ts +6 -1
  68. package/generated/components/tool-bar-item.js +1 -1
  69. package/generated/components/tool-bar.d.ts +6 -1
  70. package/generated/components/tool-bar.js +1 -1
  71. package/generated/components/v-keyboard.d.ts +5 -0
  72. package/generated/components/v-stack.d.ts +7 -2
  73. package/generated/components/v-stack.js +2 -2
  74. package/generated/events/alert-dialog.d.ts +3 -1
  75. package/generated/events/confirmation-dialog.d.ts +3 -1
  76. package/generated/events/date-picker.d.ts +3 -1
  77. package/generated/events/lifecycle-observer.d.ts +6 -2
  78. package/generated/events/picker-view.d.ts +12 -4
  79. package/generated/events/scroll-view.d.ts +6 -2
  80. package/generated/events/tab-view.d.ts +24 -8
  81. package/generated/events/text-field.d.ts +3 -1
  82. package/generated/events/toggle-view.d.ts +3 -1
  83. package/generated/internal/class/form-associated-base.js +1 -1
  84. package/generated/internal/utils/kebab-case.js +6 -9
  85. package/package.json +6 -4
  86. package/web-components.css-data/en.json +28 -0
  87. package/web-components.html-data/en.json +248 -82
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @summary A view that shows the progress toward completion of a task.
2
+ * @summary A view that shows how far along a task is.
3
3
  *
4
4
  * @slot — The default slot.
5
5
  * @slot current-value
@@ -14,3 +14,8 @@ export declare class ProgressView extends HTMLElement {
14
14
  disconnectedCallback(): void;
15
15
  connectedCallback(): void;
16
16
  }
17
+ declare global {
18
+ interface HTMLElementTagNameMap {
19
+ 'progress-view': ProgressView;
20
+ }
21
+ }
@@ -6,7 +6,7 @@ import { html, queryMorph } from '../morphdom';
6
6
  import { Snapshot } from '../snapshot';
7
7
  const progressViewStyles = ['circular', 'linear'];
8
8
  /**
9
- * @summary A view that shows the progress toward completion of a task.
9
+ * @summary A view that shows how far along a task is.
10
10
  *
11
11
  * @slot — The default slot.
12
12
  * @slot current-value
@@ -1,8 +1,13 @@
1
1
  /**
2
- * @summary A wrapper to {hv}-stacks
2
+ * @summary A wrapper for {hv}-stacks
3
3
  */
4
4
  export declare class ScrollViewProxy extends HTMLElement {
5
5
  constructor();
6
6
  disconnectedCallback(): void;
7
7
  connectedCallback(): void;
8
8
  }
9
+ declare global {
10
+ interface HTMLElementTagNameMap {
11
+ 'scroll-view-proxy': ScrollViewProxy;
12
+ }
13
+ }
@@ -1,6 +1,6 @@
1
1
  import { devFlags } from '../internal/utils';
2
2
  /**
3
- * @summary A wrapper to {hv}-stacks
3
+ * @summary A wrapper for {hv}-stacks
4
4
  */
5
5
  export class ScrollViewProxy extends HTMLElement {
6
6
  constructor() {
@@ -1,4 +1,6 @@
1
1
  /**
2
+ * @summary A view that scrolls its content when it doesn’t fit the screen.
3
+ *
2
4
  * @slot — The default slot.
3
5
  * @slot top-bar-principal
4
6
  * @slot bottom-bar-principal
@@ -13,3 +15,8 @@ export declare class ScrollView extends HTMLElement {
13
15
  connectedCallback(): void;
14
16
  centerScrollToElement(child: Element): void;
15
17
  }
18
+ declare global {
19
+ interface HTMLElementTagNameMap {
20
+ 'scroll-view': ScrollView;
21
+ }
22
+ }
@@ -6,6 +6,8 @@ import { $, devFlags, frame, onoff, slowHideShow } from '../internal/utils';
6
6
  import { html, queryMorph } from '../morphdom';
7
7
  const observers = new ResizeObserverSingleton();
8
8
  /**
9
+ * @summary A view that scrolls its content when it doesn’t fit the screen.
10
+ *
9
11
  * @slot — The default slot.
10
12
  * @slot top-bar-principal
11
13
  * @slot bottom-bar-principal
@@ -5,3 +5,8 @@ export declare class SearchView extends InputBase {
5
5
  static polyfillConnectedCallback(el: InputBase): void;
6
6
  static polyfillAttributeChangedCallback([{ attributeName, target, oldValue }]: Pick<MutationRecord, 'attributeName' | 'oldValue' | 'target'>[]): void;
7
7
  }
8
+ declare global {
9
+ interface HTMLElementTagNameMap {
10
+ 'search-view': SearchView;
11
+ }
12
+ }
@@ -14,3 +14,8 @@ export declare class SectionView extends HTMLElement {
14
14
  disconnectedCallback(): void;
15
15
  connectedCallback(): void;
16
16
  }
17
+ declare global {
18
+ interface HTMLElementTagNameMap {
19
+ 'section-view': SectionView;
20
+ }
21
+ }
@@ -1,4 +1,7 @@
1
1
  import { DialogBase } from '../namespace-browser/base';
2
+ /**
3
+ * @summary A dialog that slides up over the current screen.
4
+ */
2
5
  export declare class SheetView extends DialogBase {
3
6
  #private;
4
7
  constructor();
@@ -1,6 +1,9 @@
1
1
  import { CleanupRegistry } from '../internal/class/cleanup-registry';
2
2
  import { devFlags, onoff } from '../internal/utils';
3
3
  import { DialogBase } from '../namespace-browser/base';
4
+ /**
5
+ * @summary A dialog that slides up over the current screen.
6
+ */
4
7
  export class SheetView extends DialogBase {
5
8
  constructor() {
6
9
  super();
@@ -1,7 +1,15 @@
1
+ /**
2
+ * @summary A control that shows or hides the sidebar view.
3
+ */
1
4
  export declare class SidebarToggle extends HTMLElement {
2
5
  #private;
3
6
  constructor();
4
- connectedCallback(): void;
5
7
  disconnectedCallback(): void;
8
+ connectedCallback(): void;
6
9
  private static query;
7
10
  }
11
+ declare global {
12
+ interface HTMLElementTagNameMap {
13
+ 'sidebar-toggle': SidebarToggle;
14
+ }
15
+ }
@@ -3,10 +3,19 @@ import { CleanupRegistry } from '../internal/class/cleanup-registry';
3
3
  import { ResizeObserverSingleton } from '../internal/class/resize-observer-singleton';
4
4
  import { debounce, devFlags, onoff } from '../internal/utils';
5
5
  const observers = new ResizeObserverSingleton();
6
+ /**
7
+ * @summary A control that shows or hides the sidebar view.
8
+ */
6
9
  export class SidebarToggle extends HTMLElement {
7
10
  constructor() {
8
11
  super();
9
12
  }
13
+ disconnectedCallback() {
14
+ if (devFlags.debug)
15
+ console.debug(`${_a.name} ⚡️ disconnect`);
16
+ observers.unobserve(this);
17
+ CleanupRegistry.unregister(this);
18
+ }
10
19
  connectedCallback() {
11
20
  if (devFlags.debug)
12
21
  console.debug(`${_a.name} ⚡️ connect`);
@@ -18,12 +27,6 @@ export class SidebarToggle extends HTMLElement {
18
27
  // @ts-expect-error
19
28
  _a.#handleMeasure([entry]);
20
29
  }
21
- disconnectedCallback() {
22
- if (devFlags.debug)
23
- console.debug(`${_a.name} ⚡️ disconnect`);
24
- observers.unobserve(this);
25
- CleanupRegistry.unregister(this);
26
- }
27
30
  static query(target) {
28
31
  const container = target?.closest('navigation-split-view,tab-view'), sideBar = container?.querySelector(':scope>[is=sidebar-view]');
29
32
  return { container, sideBar };
@@ -1,4 +1,7 @@
1
1
  import { DialogBase } from '../namespace-browser/base';
2
+ /**
3
+ * @summary A container view that arranges navigation destinations in a single column.
4
+ */
2
5
  export declare class SidebarView extends DialogBase {
3
6
  #private;
4
7
  constructor();
@@ -1,6 +1,9 @@
1
1
  import { CleanupRegistry } from '../internal/class/cleanup-registry';
2
2
  import { devFlags, onoff, touchGlass } from '../internal/utils';
3
3
  import { DialogBase } from '../namespace-browser/base';
4
+ /**
5
+ * @summary A container view that arranges navigation destinations in a single column.
6
+ */
4
7
  export class SidebarView extends DialogBase {
5
8
  constructor() {
6
9
  super();
@@ -1,6 +1,11 @@
1
1
  export declare class StickyContainer extends HTMLElement {
2
2
  #private;
3
3
  constructor();
4
- connectedCallback(): void;
5
4
  disconnectedCallback(): void;
5
+ connectedCallback(): void;
6
+ }
7
+ declare global {
8
+ interface HTMLElementTagNameMap {
9
+ 'sticky-container': StickyContainer;
10
+ }
6
11
  }
@@ -4,17 +4,17 @@ export class StickyContainer extends HTMLElement {
4
4
  constructor() {
5
5
  super();
6
6
  }
7
+ disconnectedCallback() {
8
+ if (devFlags.debug)
9
+ console.debug(`${StickyContainer.name} ⚡️ disconnect`);
10
+ CleanupRegistry.unregister(this);
11
+ }
7
12
  connectedCallback() {
8
13
  if (devFlags.debug)
9
14
  console.debug(`${StickyContainer.name} ⚡️ connect`);
10
15
  // CleanupRegistry.register(this, onoff('transitionend transitionstart transitioncancel', this.#handleTransitionrun as unknown as EventListener, this).on())
11
16
  CleanupRegistry.register(this, onoff('transitionrun', this.#handleTransitionrun, this).on());
12
17
  }
13
- disconnectedCallback() {
14
- if (devFlags.debug)
15
- console.debug(`${StickyContainer.name} ⚡️ disconnect`);
16
- CleanupRegistry.unregister(this);
17
- }
18
18
  #handleTransitionrun = ({ target, propertyName, pseudoElement }) => {
19
19
  if (!(target instanceof HTMLElement))
20
20
  return;
@@ -1,6 +1,6 @@
1
1
  import { DialogBase } from '../namespace-browser/base';
2
2
  /**
3
- * @summary A screen that lets users switch between different views using buttons, tabs, or other controls.
3
+ * @summary A container view that groups tab-items together along the top or bottom of the screen.
4
4
  */
5
5
  export declare class TabBar extends DialogBase {
6
6
  #private;
@@ -2,7 +2,7 @@ import { CleanupRegistry } from '../internal/class/cleanup-registry';
2
2
  import { devFlags, onoff, touchGlass } from '../internal/utils';
3
3
  import { DialogBase } from '../namespace-browser/base';
4
4
  /**
5
- * @summary A screen that lets users switch between different views using buttons, tabs, or other controls.
5
+ * @summary A container view that groups tab-items together along the top or bottom of the screen.
6
6
  */
7
7
  export class TabBar extends DialogBase {
8
8
  constructor() {
@@ -1,4 +1,7 @@
1
1
  import { ButtonBase } from '../namespace-browser/base';
2
+ /**
3
+ * @summary A control that switches the tab view to this tab.
4
+ */
2
5
  export declare class TabItem extends ButtonBase {
3
6
  #private;
4
7
  constructor();
@@ -2,6 +2,9 @@ import { CleanupRegistry } from '../internal/class/cleanup-registry';
2
2
  import { devFlags, onoff } from '../internal/utils';
3
3
  import { ButtonBase } from '../namespace-browser/base';
4
4
  import { TabView } from './tab-view';
5
+ /**
6
+ * @summary A control that switches the tab view to this tab.
7
+ */
5
8
  export class TabItem extends ButtonBase {
6
9
  constructor() {
7
10
  super();
@@ -3,6 +3,7 @@ import { type NavigationStack } from './navigation-stack';
3
3
  declare const TAB_BAR_PLACEMENTS: readonly ["bottom-bar", "ornament", "sidebar", "top-bar"];
4
4
  export type TabBarPlacement = (typeof TAB_BAR_PLACEMENTS)[number];
5
5
  /**
6
+ * @summary A container view that switches between screens using tabs.
6
7
  *
7
8
  * @cssprop --adaptable-tab-bar-placement
8
9
  *
@@ -19,7 +20,12 @@ export declare class TabView extends HTMLElement {
19
20
  get tabBarPlacement(): "bottom-bar" | "ornament" | "sidebar" | "top-bar" | undefined;
20
21
  get moreTab(): NavigationStack | null;
21
22
  connectedCallback(): void;
22
- get selectedTab(): (NavigationStack | NavigationSplitView)[];
23
- set selectedTab(tabs: (NavigationStack | NavigationSplitView)[]);
23
+ get selectedTab(): (NavigationSplitView | NavigationStack)[];
24
+ set selectedTab(tabs: (NavigationSplitView | NavigationStack)[]);
25
+ }
26
+ declare global {
27
+ interface HTMLElementTagNameMap {
28
+ 'tab-view': TabView;
29
+ }
24
30
  }
25
31
  export {};
@@ -6,6 +6,7 @@ import { $, cssTime, debounce, devFlags, frame, onoff, timeout } from '../intern
6
6
  import { Snapshot } from '../snapshot';
7
7
  const TAB_BAR_PLACEMENTS = ['bottom-bar', 'ornament', 'sidebar', 'top-bar'];
8
8
  /**
9
+ * @summary A container view that switches between screens using tabs.
9
10
  *
10
11
  * @cssprop --adaptable-tab-bar-placement
11
12
  *
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @summary Display selectable, sortable data arranged in rows and columns.
2
+ * @summary A container view that arranges data in rows and columns, optionally letting the user select one or more of them.
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
  *
@@ -19,3 +19,8 @@ export declare class TableView extends HTMLElement {
19
19
  disconnectedCallback(): void;
20
20
  connectedCallback(): void;
21
21
  }
22
+ declare global {
23
+ interface HTMLElementTagNameMap {
24
+ 'table-view': TableView;
25
+ }
26
+ }
@@ -6,7 +6,7 @@ import { $, devFlags, listActive, onoff } from '../internal/utils';
6
6
  import { html, queryMorph } from '../morphdom';
7
7
  import { Snapshot } from '../snapshot';
8
8
  /**
9
- * @summary Display selectable, sortable data arranged in rows and columns.
9
+ * @summary A container view that arranges data in rows and columns, optionally letting the user select one or more of them.
10
10
  *
11
11
  * @attr {title:trailing:subtitle|trailing:title:subtitle|title:subtitle:trailing|*} preferred-compact-template — Sets the template areas when the table is in compact mode
12
12
  *
@@ -20,7 +20,6 @@ export declare class TextField extends FormAssociatedBase {
20
20
  set text(v: string);
21
21
  /**
22
22
  * Form participation property
23
- * @type {string}
24
23
  */
25
24
  get name(): string;
26
25
  get value(): string;
@@ -28,8 +27,14 @@ export declare class TextField extends FormAssociatedBase {
28
27
  get negativeNumbersAllowed(): boolean;
29
28
  setValidity: (flags?: ValidityStateFlags, message?: string, anchor?: HTMLElement) => void;
30
29
  setCustomValidity: (message: string) => void;
31
- formAssociatedCallback: (form: HTMLFormElement) => void;
32
- formDisabledCallback: (disabled: boolean) => void;
33
- formResetCallback: () => void;
30
+ formStateRestoreCallback(state: string, reason: string): void;
31
+ formAssociatedCallback(form: HTMLFormElement): void;
32
+ formDisabledCallback(disabled: boolean): void;
33
+ formResetCallback(): void;
34
+ }
35
+ declare global {
36
+ interface HTMLElementTagNameMap {
37
+ 'text-field': TextField;
38
+ }
34
39
  }
35
40
  export {};
@@ -14,7 +14,33 @@ const keyboardTypes = ['decimal-pad', 'number-pad', 'default'];
14
14
  */
15
15
  export class TextField extends FormAssociatedBase {
16
16
  static get observedAttributes() {
17
- return ['prompt', 'minimum', 'maximum', 'min-length', 'max-length', 'label', 'name', 'text', 'text-input-autocapitalization', 'disable-autocorrection', 'keyboard-type', 'required', 'disabled'];
17
+ return [
18
+ 'prompt',
19
+ 'minimum',
20
+ 'maximum',
21
+ 'min-length',
22
+ 'max-length',
23
+ 'label',
24
+ 'name',
25
+ 'text',
26
+ 'text-input-autocapitalization',
27
+ /**
28
+ * @type {boolean}
29
+ */
30
+ 'disable-autocorrection',
31
+ /**
32
+ * @type {decimal-pad|number-pad|default}
33
+ */
34
+ 'keyboard-type',
35
+ /**
36
+ * @type {boolean}
37
+ */
38
+ 'required',
39
+ /**
40
+ * @type {boolean}
41
+ */
42
+ 'disabled',
43
+ ];
18
44
  }
19
45
  static #template;
20
46
  static get template() {
@@ -396,7 +422,6 @@ export class TextField extends FormAssociatedBase {
396
422
  };
397
423
  /**
398
424
  * Form participation property
399
- * @type {string}
400
425
  */
401
426
  get name() {
402
427
  return this.getAttribute('name') ?? this.getAttribute('label') ?? this.querySelector(':scope>[slot=label]')?.textContent ?? '';
@@ -438,14 +463,8 @@ export class TextField extends FormAssociatedBase {
438
463
  }
439
464
  }
440
465
  get negativeNumbersAllowed() {
441
- // switch (this.keyboardType) {
442
- // case 'decimal-pad':
443
- // case 'number-pad':
444
466
  const min = this.getAttribute('minimum') ?? '-Infinity', max = this.getAttribute('maximum') ?? 'Infinity';
445
467
  return compareBigDecimals('0', min) >= 0 && compareBigDecimals('0', max) <= 0;
446
- // default:
447
- // return false
448
- // }
449
468
  }
450
469
  setValidity = (flags, message, anchor) => {
451
470
  // let msg
@@ -487,16 +506,19 @@ export class TextField extends FormAssociatedBase {
487
506
  else
488
507
  this.#sendValueToForm(false);
489
508
  };
490
- formAssociatedCallback = (form) => {
491
- this.#sendValueToForm();
492
- };
493
- formDisabledCallback = (disabled) => {
509
+ formStateRestoreCallback(state, reason) {
510
+ this.text = state;
511
+ }
512
+ formAssociatedCallback(form) {
513
+ this.#sendValueToForm(false);
514
+ }
515
+ formDisabledCallback(disabled) {
494
516
  for (const el of this.#shadowRoot.querySelectorAll('input'))
495
517
  el.toggleAttribute('disabled', !disabled);
496
- };
497
- formResetCallback = () => {
518
+ }
519
+ formResetCallback() {
498
520
  this.text = '';
499
521
  this.#sendValueToForm(false);
500
- };
522
+ }
501
523
  }
502
524
  _a = TextField;
@@ -4,6 +4,8 @@ export type ToggleStyle = (typeof toggleStyles)[number];
4
4
  /**
5
5
  * @summary A control that switches between on and off states.
6
6
  *
7
+ * @fires toggle:change — User toggled the control
8
+ *
7
9
  * @slot label
8
10
  * @slot validity-options
9
11
  */
@@ -20,15 +22,20 @@ export declare class ToggleView extends FormAssociatedBase {
20
22
  set isOn(v: boolean);
21
23
  /**
22
24
  * Form participation property
23
- * @type {string}
24
25
  */
25
26
  get name(): string;
26
27
  get value(): string | null;
27
28
  set value(v: string | null);
28
29
  setValidity: (flags?: ValidityStateFlags, message?: string, anchor?: HTMLElement) => void;
29
30
  setCustomValidity: (message: string) => void;
30
- formAssociatedCallback: (form: HTMLFormElement) => void;
31
- formDisabledCallback: (disabled: boolean) => void;
32
- formResetCallback: () => void;
31
+ formStateRestoreCallback(state: string, reason: string): void;
32
+ formAssociatedCallback(form: HTMLFormElement): void;
33
+ formDisabledCallback(disabled: boolean): void;
34
+ formResetCallback(): void;
35
+ }
36
+ declare global {
37
+ interface HTMLElementTagNameMap {
38
+ 'toggle-view': ToggleView;
39
+ }
33
40
  }
34
41
  export {};
@@ -8,12 +8,12 @@ const toggleStyles = ['switch', 'button'];
8
8
  /**
9
9
  * @summary A control that switches between on and off states.
10
10
  *
11
+ * @fires toggle:change — User toggled the control
12
+ *
11
13
  * @slot label
12
14
  * @slot validity-options
13
15
  */
14
16
  export class ToggleView extends FormAssociatedBase {
15
- // declare addEventListener: TypedEventTargetMethods<ToggleViewEventMap>['addEventListener']
16
- // declare removeEventListener: TypedEventTargetMethods<ToggleViewEventMap>['removeEventListener']
17
17
  static get observedAttributes() {
18
18
  return ['label', 'name', 'value', 'is-on', 'keyboard-type', 'required', 'disabled'];
19
19
  }
@@ -164,7 +164,6 @@ export class ToggleView extends FormAssociatedBase {
164
164
  };
165
165
  /**
166
166
  * Form participation property
167
- * @type {string}
168
167
  */
169
168
  get name() {
170
169
  return this.getAttribute('name') ?? this.getAttribute('label') ?? this.querySelector(':scope>[slot=label]')?.textContent ?? '';
@@ -215,16 +214,19 @@ export class ToggleView extends FormAssociatedBase {
215
214
  else
216
215
  this.#sendValueToForm(false);
217
216
  };
218
- formAssociatedCallback = (form) => {
219
- this.#sendValueToForm();
220
- };
221
- formDisabledCallback = (disabled) => {
217
+ formStateRestoreCallback(state, reason) {
218
+ this.value = state;
219
+ }
220
+ formAssociatedCallback(form) {
221
+ this.#sendValueToForm(false);
222
+ }
223
+ formDisabledCallback(disabled) {
222
224
  for (const el of this.#shadowRoot.querySelectorAll('input'))
223
225
  el.toggleAttribute('disabled', !disabled);
224
- };
225
- formResetCallback = () => {
226
+ }
227
+ formResetCallback() {
226
228
  this.value = '';
227
- this.#sendValueToForm();
228
- };
229
+ this.#sendValueToForm(false);
230
+ }
229
231
  }
230
232
  _a = ToggleView;
@@ -1,8 +1,13 @@
1
1
  /**
2
- * A model that represents a group of `ToolbarItems` which can be placed in the toolbar or navigation bar.
2
+ * @summary A container view that groups items together in the toolbar or navigation bar.
3
3
  */
4
4
  export declare class ToolBarItemGroup extends HTMLElement {
5
5
  constructor();
6
6
  connectedCallback(): void;
7
7
  disconnectedCallback(): void;
8
8
  }
9
+ declare global {
10
+ interface HTMLElementTagNameMap {
11
+ 'tool-bar-item-group': ToolBarItemGroup;
12
+ }
13
+ }
@@ -9,7 +9,7 @@ import { CleanupRegistry } from '../internal/class/cleanup-registry';
9
9
  import { adaptiveSlot } from '../internal/decorators';
10
10
  import { devFlags } from '../internal/utils';
11
11
  /**
12
- * A model that represents a group of `ToolbarItems` which can be placed in the toolbar or navigation bar.
12
+ * @summary A container view that groups items together in the toolbar or navigation bar.
13
13
  */
14
14
  let ToolBarItemGroup = ToolBarItemGroup_1 = class ToolBarItemGroup extends HTMLElement {
15
15
  constructor() {
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @summary A model that represents an item which can be placed in the toolbar or navigation bar.
2
+ * @summary A view placed in the toolbar or navigation bar.
3
3
  */
4
4
  export declare class ToolBarItem extends HTMLElement {
5
5
  #private;
@@ -9,3 +9,8 @@ export declare class ToolBarItem extends HTMLElement {
9
9
  disconnectedCallback(): void;
10
10
  connectedCallback(): void;
11
11
  }
12
+ declare global {
13
+ interface HTMLElementTagNameMap {
14
+ 'tool-bar-item': ToolBarItem;
15
+ }
16
+ }
@@ -10,7 +10,7 @@ import { adaptiveSlot } from '../internal/decorators';
10
10
  import { devFlags, ensurePlaceholder, onoff, touchGlass } from '../internal/utils';
11
11
  import { Snapshot } from '../snapshot';
12
12
  /**
13
- * @summary A model that represents an item which can be placed in the toolbar or navigation bar.
13
+ * @summary A view placed in the toolbar or navigation bar.
14
14
  */
15
15
  let ToolBarItem = ToolBarItem_1 = class ToolBarItem extends HTMLElement {
16
16
  static get observedAttributes() {
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @summary Populates the toolbar or navigation bar with the specified items.
2
+ * @summary A list of items placed into the toolbar or navigation bar around your content.
3
3
  *
4
4
  * @slot cancellation-action — The item represents a cancellation action for a modal interface. Places the item in the leading edge of the top bar and on the trailing edge of the bottom bar when fine modal
5
5
  * @slot primary-action — The item represents a primary action. Places the item in the trailing edge of the top bar and on the trailing edge of the bottom bar when fine modal
@@ -19,3 +19,8 @@ export declare class ToolBar extends HTMLElement {
19
19
  connectedCallback(): void;
20
20
  disconnectedCallback(): void;
21
21
  }
22
+ declare global {
23
+ interface HTMLElementTagNameMap {
24
+ 'tool-bar': ToolBar;
25
+ }
26
+ }
@@ -3,7 +3,7 @@ import { ResizeObserverSingleton } from '../internal/class/resize-observer-singl
3
3
  import { $, devFlags } from '../internal/utils';
4
4
  const observers = new ResizeObserverSingleton();
5
5
  /**
6
- * @summary Populates the toolbar or navigation bar with the specified items.
6
+ * @summary A list of items placed into the toolbar or navigation bar around your content.
7
7
  *
8
8
  * @slot cancellation-action — The item represents a cancellation action for a modal interface. Places the item in the leading edge of the top bar and on the trailing edge of the bottom bar when fine modal
9
9
  * @slot primary-action — The item represents a primary action. Places the item in the trailing edge of the top bar and on the trailing edge of the bottom bar when fine modal
@@ -13,3 +13,8 @@ export declare class VKeyboard extends HTMLElement {
13
13
  connectedCallback(): void;
14
14
  set shouldKeyboardBeOpen(fn: () => boolean);
15
15
  }
16
+ declare global {
17
+ interface HTMLElementTagNameMap {
18
+ 'v-keyboard': VKeyboard;
19
+ }
20
+ }
@@ -3,9 +3,9 @@
3
3
  *
4
4
  * @attr {leading|"leading fill"|center|trailing|fill|space-between} distribution — The distribution of cols
5
5
  *
6
- * @attr {@templateSet} template — The main-axis grid template
6
+ * @attr {@Template} template — The main-axis grid template
7
7
  *
8
- * @attr {@spacingSet} spacing — The gap between the primary axis
8
+ * @attr {@Spacing} spacing — The gap between the primary axis
9
9
  *
10
10
  * @attr {@inlineSet} alignment — The cross-axis alignment
11
11
  * @attr {@blockSet} distribution — The main-axis alignment
@@ -17,3 +17,8 @@ export declare class VStack extends HTMLElement {
17
17
  connectedCallback(): void;
18
18
  disconnectedCallback(): void;
19
19
  }
20
+ declare global {
21
+ interface HTMLElementTagNameMap {
22
+ 'v-stack': VStack;
23
+ }
24
+ }
@@ -4,9 +4,9 @@ import { devFlags } from '../internal/utils';
4
4
  *
5
5
  * @attr {leading|"leading fill"|center|trailing|fill|space-between} distribution — The distribution of cols
6
6
  *
7
- * @attr {@templateSet} template — The main-axis grid template
7
+ * @attr {@Template} template — The main-axis grid template
8
8
  *
9
- * @attr {@spacingSet} spacing — The gap between the primary axis
9
+ * @attr {@Spacing} spacing — The gap between the primary axis
10
10
  *
11
11
  * @attr {@inlineSet} alignment — The cross-axis alignment
12
12
  * @attr {@blockSet} distribution — The main-axis alignment