@vonage/vivid 4.14.3 → 4.14.4

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.
@@ -1,3 +1,5 @@
1
+ import { AffixIconWithTrailing } from '../../shared/patterns/affix';
2
+ import { ARIAGlobalStatesAndProperties } from '../../shared/foundation/patterns/aria-global';
1
3
  import { VividElement } from '../../shared/foundation/vivid-element/vivid-element';
2
4
  export declare function isListboxOption(el: Element): el is ListboxOption;
3
5
  export declare class ListboxOption extends VividElement {
@@ -31,3 +33,7 @@ export declare class DelegatesARIAListboxOption {
31
33
  ariaSelected: 'true' | 'false' | string | null;
32
34
  ariaSetSize: string | null;
33
35
  }
36
+ export interface DelegatesARIAListboxOption extends ARIAGlobalStatesAndProperties {
37
+ }
38
+ export interface ListboxOption extends DelegatesARIAListboxOption, AffixIconWithTrailing {
39
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vonage/vivid",
3
- "version": "4.14.3",
3
+ "version": "4.14.4",
4
4
  "type": "module",
5
5
  "module": "./index.js",
6
6
  "main": "./index.cjs",
@@ -2,10 +2,10 @@
2
2
 
3
3
  const definition = require('./definition27.cjs');
4
4
  const vividElement = require('./vivid-element.cjs');
5
- const keyCodes = require('./key-codes.cjs');
6
5
  const repeat = require('./repeat.cjs');
7
- const slotted = require('./slotted.cjs');
6
+ const keyCodes = require('./key-codes.cjs');
8
7
  const children = require('./children.cjs');
8
+ const slotted = require('./slotted.cjs');
9
9
  const when = require('./when.cjs');
10
10
 
11
11
  /**
@@ -1,9 +1,9 @@
1
1
  import { I as Icon, i as iconDefinition } from './definition27.js';
2
2
  import { a as attr, o as observable, V as VividElement, D as DOM, O as Observable, h as html, d as defineVividComponent, f as createRegisterFunction } from './vivid-element.js';
3
- import { d as keyEnd, g as keyHome, j as keyPageDown, l as keyPageUp, f as keyArrowDown, e as keyArrowUp, i as keyArrowRight, h as keyArrowLeft, b as keyEscape, m as keyFunction2, k as keyEnter, a as keySpace } from './key-codes.js';
4
3
  import { R as RepeatDirective } from './repeat.js';
5
- import { s as slotted, e as elements } from './slotted.js';
4
+ import { d as keyEnd, g as keyHome, j as keyPageDown, l as keyPageUp, f as keyArrowDown, e as keyArrowUp, i as keyArrowRight, h as keyArrowLeft, b as keyEscape, m as keyFunction2, k as keyEnter, a as keySpace } from './key-codes.js';
6
5
  import { c as children } from './children.js';
6
+ import { s as slotted, e as elements } from './slotted.js';
7
7
  import { w as when } from './when.js';
8
8
 
9
9
  /**
@@ -20,11 +20,11 @@ var __decorateClass = (decorators, target, key, kind) => {
20
20
  };
21
21
  const AccordionExpandMode$1 = {
22
22
  /**
23
- * Designates only a single {@link @microsoft/fast-foundation#(AccordionItem:class) } can be open a time.
23
+ * Designates only a single AccordionItem can be open a time.
24
24
  */
25
25
  single: "single",
26
26
  /**
27
- * Designates multiple {@link @microsoft/fast-foundation#(AccordionItem:class) | AccordionItems} can be open simultaneously.
27
+ * Designates multiple AccordionItems can be open simultaneously.
28
28
  */
29
29
  multi: "multi"
30
30
  };
@@ -18,11 +18,11 @@ var __decorateClass = (decorators, target, key, kind) => {
18
18
  };
19
19
  const AccordionExpandMode$1 = {
20
20
  /**
21
- * Designates only a single {@link @microsoft/fast-foundation#(AccordionItem:class) } can be open a time.
21
+ * Designates only a single AccordionItem can be open a time.
22
22
  */
23
23
  single: "single",
24
24
  /**
25
- * Designates multiple {@link @microsoft/fast-foundation#(AccordionItem:class) | AccordionItems} can be open simultaneously.
25
+ * Designates multiple AccordionItems can be open simultaneously.
26
26
  */
27
27
  multi: "multi"
28
28
  };
@@ -570,9 +570,6 @@ __decorateClass([
570
570
  __decorateClass([
571
571
  vividElement.attr({ mode: "boolean" })
572
572
  ], MenuItem.prototype, "checked");
573
- __decorateClass([
574
- vividElement.observable
575
- ], MenuItem.prototype, "submenuRegion");
576
573
  __decorateClass([
577
574
  vividElement.observable
578
575
  ], MenuItem.prototype, "hasSubmenu");
@@ -568,9 +568,6 @@ __decorateClass([
568
568
  __decorateClass([
569
569
  attr({ mode: "boolean" })
570
570
  ], MenuItem.prototype, "checked");
571
- __decorateClass([
572
- observable
573
- ], MenuItem.prototype, "submenuRegion");
574
571
  __decorateClass([
575
572
  observable
576
573
  ], MenuItem.prototype, "hasSubmenu");
@@ -8,8 +8,8 @@ const enums = require('./enums.cjs');
8
8
  const applyMixins = require('./apply-mixins.cjs');
9
9
  const localized = require('./localized.cjs');
10
10
  const playbackRates = require('./playbackRates.cjs');
11
- const when = require('./when.cjs');
12
11
  const repeat = require('./repeat.cjs');
12
+ const when = require('./when.cjs');
13
13
  const classNames = require('./class-names.cjs');
14
14
 
15
15
  const styles = ":host{display:block}.wrapper{container-type:inline-size}.base{display:inline-flex;box-sizing:border-box;align-items:center;padding:8px;color:var(--vvd-color-canvas-text);gap:8px;inline-size:100%;user-select:none}.base.disabled{color:var(--vvd-color-neutral-300)}.base .slider{flex:1;grid-area:slider}.base .controls{display:flex;align-items:center;justify-content:center;gap:8px;grid-area:controls}.base .time-stamp{display:inline-flex}.base .time-stamp .current-time,.base .time-stamp .total-time{margin-inline:6px;min-inline-size:32px}.base .playback-button{grid-area:playback}@container (max-width: 500px){.base.two-lines{display:inline-grid;grid-template:auto auto/1fr;grid-template-areas:\"slider\" \"controls\";inline-size:100%;row-gap:4px}.base.two-lines .time-stamp{margin-inline:auto 2px}.base.two-lines.playback{grid-template-areas:\"slider slider\" \"controls playback\";grid-template-columns:1fr auto}.base.two-lines.playback .time-stamp{margin-inline:auto}.base .slider{box-sizing:border-box;min-inline-size:auto;padding-inline:2px}}";
@@ -6,8 +6,8 @@ import { M as MediaSkipBy } from './enums.js';
6
6
  import { a as applyMixins } from './apply-mixins.js';
7
7
  import { L as Localized } from './localized.js';
8
8
  import { g as getPlaybackRatesArray } from './playbackRates.js';
9
- import { w as when } from './when.js';
10
9
  import { r as repeat } from './repeat.js';
10
+ import { w as when } from './when.js';
11
11
  import { c as classNames } from './class-names.js';
12
12
 
13
13
  const styles = ":host{display:block}.wrapper{container-type:inline-size}.base{display:inline-flex;box-sizing:border-box;align-items:center;padding:8px;color:var(--vvd-color-canvas-text);gap:8px;inline-size:100%;user-select:none}.base.disabled{color:var(--vvd-color-neutral-300)}.base .slider{flex:1;grid-area:slider}.base .controls{display:flex;align-items:center;justify-content:center;gap:8px;grid-area:controls}.base .time-stamp{display:inline-flex}.base .time-stamp .current-time,.base .time-stamp .total-time{margin-inline:6px;min-inline-size:32px}.base .playback-button{grid-area:playback}@container (max-width: 500px){.base.two-lines{display:inline-grid;grid-template:auto auto/1fr;grid-template-areas:\"slider\" \"controls\";inline-size:100%;row-gap:4px}.base.two-lines .time-stamp{margin-inline:auto 2px}.base.two-lines.playback{grid-template-areas:\"slider slider\" \"controls playback\";grid-template-columns:1fr auto}.base.two-lines.playback .time-stamp{margin-inline:auto}.base .slider{box-sizing:border-box;min-inline-size:auto;padding-inline:2px}}";
@@ -2,6 +2,7 @@
2
2
 
3
3
  const option = require('./option.cjs');
4
4
  const vividElement = require('./vivid-element.cjs');
5
+ const applyMixins = require('./apply-mixins.cjs');
5
6
  const keyCodes = require('./key-codes.cjs');
6
7
  const strings = require('./strings.cjs');
7
8
  const ariaGlobal = require('./aria-global.cjs');
@@ -22,26 +23,6 @@ function findLastIndex(array, predicate) {
22
23
  return -1;
23
24
  }
24
25
 
25
- /**
26
- * Apply mixins to a constructor.
27
- * Sourced from {@link https://www.typescriptlang.org/docs/handbook/mixins.html | TypeScript Documentation }.
28
- * @public
29
- */
30
- function applyMixins(derivedCtor, ...baseCtors) {
31
- const derivedAttributes = vividElement.AttributeConfiguration.locate(derivedCtor);
32
- baseCtors.forEach(baseCtor => {
33
- Object.getOwnPropertyNames(baseCtor.prototype).forEach(name => {
34
- if (name !== "constructor") {
35
- Object.defineProperty(derivedCtor.prototype, name,
36
- /* eslint-disable-next-line @typescript-eslint/no-non-null-assertion */
37
- Object.getOwnPropertyDescriptor(baseCtor.prototype, name));
38
- }
39
- });
40
- const baseAttributes = vividElement.AttributeConfiguration.locate(baseCtor);
41
- baseAttributes.forEach(x => derivedAttributes.push(x));
42
- });
43
- }
44
-
45
26
  var __defProp = Object.defineProperty;
46
27
  var __decorateClass = (decorators, target, key, kind) => {
47
28
  var result = void 0 ;
@@ -509,7 +490,7 @@ __decorateClass([
509
490
  __decorateClass([
510
491
  vividElement.observable
511
492
  ], DelegatesARIAListbox.prototype, "ariaMultiSelectable");
512
- applyMixins(DelegatesARIAListbox, ariaGlobal.ARIAGlobalStatesAndProperties);
513
- applyMixins(Listbox, DelegatesARIAListbox);
493
+ applyMixins.applyMixins(DelegatesARIAListbox, ariaGlobal.ARIAGlobalStatesAndProperties);
494
+ applyMixins.applyMixins(Listbox, DelegatesARIAListbox);
514
495
 
515
496
  exports.Listbox = Listbox;
package/shared/listbox.js CHANGED
@@ -1,5 +1,6 @@
1
1
  import { i as isListboxOption } from './option.js';
2
- import { A as AttributeConfiguration, V as VividElement, O as Observable, a as attr, o as observable } from './vivid-element.js';
2
+ import { V as VividElement, O as Observable, a as attr, o as observable } from './vivid-element.js';
3
+ import { a as applyMixins } from './apply-mixins.js';
3
4
  import { a as keySpace, b as keyEscape, k as keyEnter, c as keyTab, d as keyEnd, e as keyArrowUp, f as keyArrowDown, g as keyHome } from './key-codes.js';
4
5
  import { u as uniqueId } from './strings.js';
5
6
  import { A as ARIAGlobalStatesAndProperties } from './aria-global.js';
@@ -20,26 +21,6 @@ function findLastIndex(array, predicate) {
20
21
  return -1;
21
22
  }
22
23
 
23
- /**
24
- * Apply mixins to a constructor.
25
- * Sourced from {@link https://www.typescriptlang.org/docs/handbook/mixins.html | TypeScript Documentation }.
26
- * @public
27
- */
28
- function applyMixins(derivedCtor, ...baseCtors) {
29
- const derivedAttributes = AttributeConfiguration.locate(derivedCtor);
30
- baseCtors.forEach(baseCtor => {
31
- Object.getOwnPropertyNames(baseCtor.prototype).forEach(name => {
32
- if (name !== "constructor") {
33
- Object.defineProperty(derivedCtor.prototype, name,
34
- /* eslint-disable-next-line @typescript-eslint/no-non-null-assertion */
35
- Object.getOwnPropertyDescriptor(baseCtor.prototype, name));
36
- }
37
- });
38
- const baseAttributes = AttributeConfiguration.locate(baseCtor);
39
- baseAttributes.forEach(x => derivedAttributes.push(x));
40
- });
41
- }
42
-
43
24
  var __defProp = Object.defineProperty;
44
25
  var __decorateClass = (decorators, target, key, kind) => {
45
26
  var result = void 0 ;
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Tue, 04 Feb 2025 08:59:25 GMT
3
+ * Generated on Tue, 04 Feb 2025 16:43:13 GMT
4
4
  */
5
5
  .vvd-root {
6
6
  color-scheme: var(--vvd-color-scheme);
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Tue, 04 Feb 2025 08:59:25 GMT
3
+ * Generated on Tue, 04 Feb 2025 16:43:13 GMT
4
4
  */
5
5
  .vvd-root {
6
6
  color-scheme: var(--vvd-color-scheme);
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Tue, 04 Feb 2025 08:59:25 GMT
3
+ * Generated on Tue, 04 Feb 2025 16:43:13 GMT
4
4
  */
5
5
  .vvd-root:root {
6
6
  --vvd-size-font-scale-base: 1rem;
@@ -1,18 +1,18 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Tue, 04 Feb 2025 08:59:25 GMT
3
+ * Generated on Tue, 04 Feb 2025 16:43:13 GMT
4
4
  */
5
5
  /**
6
6
  * Do not edit directly
7
- * Generated on Tue, 04 Feb 2025 08:59:25 GMT
7
+ * Generated on Tue, 04 Feb 2025 16:43:13 GMT
8
8
  */
9
9
  /**
10
10
  * Do not edit directly
11
- * Generated on Tue, 04 Feb 2025 08:59:25 GMT
11
+ * Generated on Tue, 04 Feb 2025 16:43:13 GMT
12
12
  */
13
13
  /**
14
14
  * Do not edit directly
15
- * Generated on Tue, 04 Feb 2025 08:59:25 GMT
15
+ * Generated on Tue, 04 Feb 2025 16:43:13 GMT
16
16
  */
17
17
  @property --vvd-size-density {
18
18
  syntax: "<integer>";
@@ -1,18 +1,18 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Tue, 04 Feb 2025 08:59:25 GMT
3
+ * Generated on Tue, 04 Feb 2025 16:43:13 GMT
4
4
  */
5
5
  /**
6
6
  * Do not edit directly
7
- * Generated on Tue, 04 Feb 2025 08:59:25 GMT
7
+ * Generated on Tue, 04 Feb 2025 16:43:13 GMT
8
8
  */
9
9
  /**
10
10
  * Do not edit directly
11
- * Generated on Tue, 04 Feb 2025 08:59:25 GMT
11
+ * Generated on Tue, 04 Feb 2025 16:43:13 GMT
12
12
  */
13
13
  /**
14
14
  * Do not edit directly
15
- * Generated on Tue, 04 Feb 2025 08:59:25 GMT
15
+ * Generated on Tue, 04 Feb 2025 16:43:13 GMT
16
16
  */
17
17
  @property --vvd-size-density {
18
18
  syntax: "<integer>";
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Tue, 04 Feb 2025 08:59:25 GMT
3
+ * Generated on Tue, 04 Feb 2025 16:43:13 GMT
4
4
  */
5
5
  .vvd-root, ::part(vvd-root),
6
6
  .vvd-theme-alternate, ::part(vvd-theme-alternate) {