@vonage/vivid 4.9.0 → 4.11.0

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 (103) hide show
  1. package/custom-elements.json +2792 -83
  2. package/lib/badge/badge.d.ts +1 -1
  3. package/lib/breadcrumb-item/breadcrumb-item.d.ts +1 -1
  4. package/lib/button/button.d.ts +1 -1
  5. package/lib/checkbox/checkbox.d.ts +8 -2
  6. package/lib/checkbox/checkbox.form-associated.d.ts +10 -0
  7. package/lib/dialog/dialog.d.ts +4 -0
  8. package/lib/divider/divider.d.ts +11 -2
  9. package/lib/enums.d.ts +1 -0
  10. package/lib/fab/fab.d.ts +1 -1
  11. package/lib/file-picker/file-picker.d.ts +3 -0
  12. package/lib/icon/icon.d.ts +2 -1
  13. package/lib/slider/slider.d.ts +30 -6
  14. package/lib/slider/slider.form-associated.d.ts +10 -0
  15. package/lib/split-button/split-button.d.ts +1 -1
  16. package/lib/tabs/tabs.d.ts +1 -0
  17. package/lib/text-field/text-field.d.ts +1 -0
  18. package/package.json +1 -1
  19. package/shared/aria-global2.cjs +93 -0
  20. package/shared/aria-global2.js +91 -0
  21. package/shared/breadcrumb-item.cjs +2 -89
  22. package/shared/breadcrumb-item.js +1 -88
  23. package/shared/definition11.cjs +201 -5
  24. package/shared/definition11.js +199 -4
  25. package/shared/definition15.cjs +49 -90
  26. package/shared/definition15.js +50 -91
  27. package/shared/definition16.cjs +9 -7
  28. package/shared/definition16.js +9 -7
  29. package/shared/definition20.cjs +16 -11
  30. package/shared/definition20.js +16 -11
  31. package/shared/definition21.cjs +34 -4
  32. package/shared/definition21.js +34 -4
  33. package/shared/definition22.cjs +32 -51
  34. package/shared/definition22.js +33 -52
  35. package/shared/definition24.cjs +156 -2
  36. package/shared/definition24.js +157 -3
  37. package/shared/definition25.cjs +106 -56
  38. package/shared/definition25.js +106 -56
  39. package/shared/definition29.cjs +1 -1
  40. package/shared/definition29.js +1 -1
  41. package/shared/definition30.cjs +1 -1
  42. package/shared/definition30.js +1 -1
  43. package/shared/definition35.cjs +2 -2
  44. package/shared/definition35.js +2 -2
  45. package/shared/definition37.cjs +1 -1
  46. package/shared/definition37.js +1 -1
  47. package/shared/definition4.cjs +5 -6
  48. package/shared/definition4.js +1 -2
  49. package/shared/definition40.cjs +11 -4
  50. package/shared/definition40.js +8 -1
  51. package/shared/definition42.cjs +3 -22
  52. package/shared/definition42.js +2 -21
  53. package/shared/definition43.cjs +1 -2
  54. package/shared/definition43.js +1 -2
  55. package/shared/definition44.js +1 -1
  56. package/shared/definition47.cjs +369 -502
  57. package/shared/definition47.js +370 -503
  58. package/shared/definition5.cjs +5 -5
  59. package/shared/definition5.js +2 -2
  60. package/shared/definition51.cjs +1 -1
  61. package/shared/definition51.js +1 -1
  62. package/shared/definition52.cjs +63 -26
  63. package/shared/definition52.js +63 -26
  64. package/shared/definition56.cjs +45 -43
  65. package/shared/definition56.js +45 -43
  66. package/shared/definition57.cjs +1 -1
  67. package/shared/definition57.js +1 -1
  68. package/shared/definition64.cjs +242 -79
  69. package/shared/definition64.js +242 -79
  70. package/shared/definition7.cjs +1 -1
  71. package/shared/definition7.js +1 -1
  72. package/shared/definition8.cjs +1 -1
  73. package/shared/definition8.js +1 -1
  74. package/shared/enums.cjs +1 -0
  75. package/shared/enums.js +1 -0
  76. package/shared/form-associated.js +1 -1
  77. package/shared/{patterns → foundation/anchor}/anchor.d.ts +1 -1
  78. package/shared/foundation/button/button.d.ts +27 -0
  79. package/shared/foundation/button/button.template.d.ts +4 -0
  80. package/shared/foundation/button/index.d.ts +2 -0
  81. package/shared/foundation/patterns/index.d.ts +1 -0
  82. package/shared/icon.cjs +11 -5
  83. package/shared/icon.js +11 -5
  84. package/shared/index.cjs +22 -2
  85. package/shared/index.js +22 -2
  86. package/shared/key-codes2.js +1 -1
  87. package/shared/patterns/form-elements/form-elements.d.ts +6 -6
  88. package/shared/presentationDate.cjs +4328 -4042
  89. package/shared/presentationDate.js +4327 -4041
  90. package/shared/slider.template.cjs +23 -1
  91. package/shared/slider.template.js +21 -2
  92. package/styles/core/all.css +1 -1
  93. package/styles/core/theme.css +1 -1
  94. package/styles/core/typography.css +1 -1
  95. package/styles/tokens/theme-dark.css +35 -14
  96. package/styles/tokens/theme-light.css +35 -14
  97. package/styles/tokens/vivid-2-compat.css +1 -1
  98. package/vivid.api.json +62 -5
  99. package/shared/aria2.cjs +0 -11
  100. package/shared/aria2.js +0 -9
  101. package/shared/button.cjs +0 -202
  102. package/shared/button.js +0 -200
  103. /package/shared/{patterns → foundation/patterns}/aria-global.d.ts +0 -0
@@ -11,59 +11,57 @@ import { w as when } from './when.js';
11
11
  import { s as slotted } from './slotted.js';
12
12
  import { c as classNames } from './class-names.js';
13
13
 
14
- // Unique ID creation requires a high quality random # generator. In the browser we therefore
15
- // require the crypto API and do not support built-in fallback to lower quality random number
16
- // generators (like Math.random()).
14
+ const byteToHex = [];
15
+ for (let i = 0; i < 256; ++i) {
16
+ byteToHex.push((i + 0x100).toString(16).slice(1));
17
+ }
18
+ function unsafeStringify(arr, offset = 0) {
19
+ return (byteToHex[arr[offset + 0]] +
20
+ byteToHex[arr[offset + 1]] +
21
+ byteToHex[arr[offset + 2]] +
22
+ byteToHex[arr[offset + 3]] +
23
+ '-' +
24
+ byteToHex[arr[offset + 4]] +
25
+ byteToHex[arr[offset + 5]] +
26
+ '-' +
27
+ byteToHex[arr[offset + 6]] +
28
+ byteToHex[arr[offset + 7]] +
29
+ '-' +
30
+ byteToHex[arr[offset + 8]] +
31
+ byteToHex[arr[offset + 9]] +
32
+ '-' +
33
+ byteToHex[arr[offset + 10]] +
34
+ byteToHex[arr[offset + 11]] +
35
+ byteToHex[arr[offset + 12]] +
36
+ byteToHex[arr[offset + 13]] +
37
+ byteToHex[arr[offset + 14]] +
38
+ byteToHex[arr[offset + 15]]).toLowerCase();
39
+ }
40
+
17
41
  let getRandomValues;
18
42
  const rnds8 = new Uint8Array(16);
19
43
  function rng() {
20
- // lazy load so that environments that need to polyfill have a chance to do so
21
- if (!getRandomValues) {
22
- // getRandomValues needs to be invoked in a context where "this" is a Crypto implementation.
23
- getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto);
24
-
25
44
  if (!getRandomValues) {
26
- throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');
45
+ if (typeof crypto === 'undefined' || !crypto.getRandomValues) {
46
+ throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');
47
+ }
48
+ getRandomValues = crypto.getRandomValues.bind(crypto);
27
49
  }
28
- }
29
-
30
- return getRandomValues(rnds8);
31
- }
32
-
33
- /**
34
- * Convert array of 16 byte values to UUID string format of the form:
35
- * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
36
- */
37
-
38
- const byteToHex = [];
39
-
40
- for (let i = 0; i < 256; ++i) {
41
- byteToHex.push((i + 0x100).toString(16).slice(1));
42
- }
43
-
44
- function unsafeStringify(arr, offset = 0) {
45
- // Note: Be careful editing this code! It's been tuned for performance
46
- // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434
47
- return byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]];
50
+ return getRandomValues(rnds8);
48
51
  }
49
52
 
50
53
  const randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto);
51
- const native = {
52
- randomUUID
53
- };
54
+ const native = { randomUUID };
54
55
 
55
56
  function v4(options, buf, offset) {
56
- if (native.randomUUID && !buf && !options) {
57
- return native.randomUUID();
58
- }
59
-
60
- options = options || {};
61
- const rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
62
-
63
- rnds[6] = rnds[6] & 0x0f | 0x40;
64
- rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided
65
-
66
- return unsafeStringify(rnds);
57
+ if (native.randomUUID && !buf && !options) {
58
+ return native.randomUUID();
59
+ }
60
+ options = options || {};
61
+ const rnds = options.random || (options.rng || rng)();
62
+ rnds[6] = (rnds[6] & 0x0f) | 0x40;
63
+ rnds[8] = (rnds[8] & 0x3f) | 0x80;
64
+ return unsafeStringify(rnds);
67
65
  }
68
66
 
69
67
  const generateRandomId = () => v4();
@@ -187,6 +185,7 @@ let TextField = class extends TextField$1 {
187
185
  __privateGet(this, _reflectToInput).attribute("size", "size");
188
186
  __privateGet(this, _reflectToInput).attribute("autoComplete", "autocomplete");
189
187
  __privateGet(this, _reflectToInput).attribute("type", "type");
188
+ __privateGet(this, _reflectToInput).attribute("inputMode", "inputmode");
190
189
  __privateGet(this, _reflectToInput).attribute("ariaAtomic", "aria-atomic");
191
190
  __privateGet(this, _reflectToInput).attribute("ariaBusy", "aria-busy");
192
191
  __privateGet(this, _reflectToInput).attribute("ariaCurrent", "aria-current");
@@ -292,6 +291,9 @@ __decorateClass([
292
291
  __decorateClass([
293
292
  attr()
294
293
  ], TextField.prototype, "scale", 2);
294
+ __decorateClass([
295
+ attr({ attribute: "inputmode" })
296
+ ], TextField.prototype, "inputMode", 2);
295
297
  __decorateClass([
296
298
  observable
297
299
  ], TextField.prototype, "actionItemsSlottedContent", 2);
@@ -746,7 +746,7 @@ const renderPicker = (id, getLabel, getSelected, setSelected, getOptions) => {
746
746
  const TimePickerTemplate = (context, _) => {
747
747
  const popupTag = context.tagFor(definition.Popup);
748
748
  const textFieldTag = context.tagFor(definition$1.TextField);
749
- const buttonTag = context.tagFor(definition$2.Button);
749
+ const buttonTag = context.tagFor(definition$2.Button$1);
750
750
  return index.html`<div class="base" @keydown="${(x, { event }) => x._onBaseKeyDown(event)}">
751
751
  <${textFieldTag} id="text-field"
752
752
  ${ref.ref("_textFieldEl")}
@@ -1,7 +1,7 @@
1
1
  import { F as FoundationElement, D as DOM, a as attr, n as nullableNumberConverter, o as observable, h as html, r as registerFactory } from './index.js';
2
2
  import { T as TextField, a as textFieldRegistries } from './definition56.js';
3
3
  import { P as Popup, p as popupRegistries } from './definition64.js';
4
- import { B as Button, a as buttonRegistries } from './definition11.js';
4
+ import { c as Button, a as buttonRegistries } from './definition11.js';
5
5
  import { a as applyMixinsWithObservables } from './applyMixinsWithObservables.js';
6
6
  import { h as handleEscapeKeyAndStopPropogation } from './index2.js';
7
7
  import { s as scrollIntoView } from './scrollIntoView.js';