@vonage/vivid 4.10.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 (90) hide show
  1. package/custom-elements.json +9103 -6572
  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 +5 -3
  6. package/lib/checkbox/checkbox.form-associated.d.ts +10 -0
  7. package/lib/enums.d.ts +1 -0
  8. package/lib/fab/fab.d.ts +1 -1
  9. package/lib/file-picker/file-picker.d.ts +3 -0
  10. package/lib/slider/slider.d.ts +30 -6
  11. package/lib/slider/slider.form-associated.d.ts +10 -0
  12. package/lib/split-button/split-button.d.ts +1 -1
  13. package/lib/tabs/tabs.d.ts +1 -0
  14. package/package.json +1 -1
  15. package/shared/aria-global2.cjs +93 -0
  16. package/shared/aria-global2.js +91 -0
  17. package/shared/breadcrumb-item.cjs +2 -89
  18. package/shared/breadcrumb-item.js +1 -88
  19. package/shared/definition11.cjs +200 -4
  20. package/shared/definition11.js +198 -3
  21. package/shared/definition15.cjs +34 -91
  22. package/shared/definition15.js +35 -92
  23. package/shared/definition16.cjs +9 -7
  24. package/shared/definition16.js +9 -7
  25. package/shared/definition20.cjs +1 -1
  26. package/shared/definition20.js +1 -1
  27. package/shared/definition21.cjs +1 -1
  28. package/shared/definition21.js +1 -1
  29. package/shared/definition24.cjs +156 -2
  30. package/shared/definition24.js +157 -3
  31. package/shared/definition25.cjs +106 -56
  32. package/shared/definition25.js +106 -56
  33. package/shared/definition35.cjs +2 -2
  34. package/shared/definition35.js +2 -2
  35. package/shared/definition37.cjs +1 -1
  36. package/shared/definition37.js +1 -1
  37. package/shared/definition4.cjs +5 -6
  38. package/shared/definition4.js +1 -2
  39. package/shared/definition40.cjs +11 -4
  40. package/shared/definition40.js +8 -1
  41. package/shared/definition42.cjs +3 -22
  42. package/shared/definition42.js +2 -21
  43. package/shared/definition43.cjs +1 -2
  44. package/shared/definition43.js +1 -2
  45. package/shared/definition44.js +1 -1
  46. package/shared/definition47.cjs +369 -502
  47. package/shared/definition47.js +370 -503
  48. package/shared/definition5.cjs +4 -4
  49. package/shared/definition5.js +1 -1
  50. package/shared/definition51.cjs +1 -1
  51. package/shared/definition51.js +1 -1
  52. package/shared/definition52.cjs +63 -26
  53. package/shared/definition52.js +63 -26
  54. package/shared/definition56.cjs +41 -43
  55. package/shared/definition56.js +41 -43
  56. package/shared/definition57.cjs +1 -1
  57. package/shared/definition57.js +1 -1
  58. package/shared/definition64.cjs +242 -79
  59. package/shared/definition64.js +242 -79
  60. package/shared/definition7.cjs +1 -1
  61. package/shared/definition7.js +1 -1
  62. package/shared/definition8.cjs +1 -1
  63. package/shared/definition8.js +1 -1
  64. package/shared/enums.cjs +1 -0
  65. package/shared/enums.js +1 -0
  66. package/shared/form-associated.js +1 -1
  67. package/shared/{patterns → foundation/anchor}/anchor.d.ts +1 -1
  68. package/shared/foundation/button/button.d.ts +27 -0
  69. package/shared/foundation/button/button.template.d.ts +4 -0
  70. package/shared/foundation/button/index.d.ts +2 -0
  71. package/shared/foundation/patterns/index.d.ts +1 -0
  72. package/shared/index.cjs +22 -2
  73. package/shared/index.js +22 -2
  74. package/shared/key-codes2.js +1 -1
  75. package/shared/presentationDate.cjs +4328 -4042
  76. package/shared/presentationDate.js +4327 -4041
  77. package/shared/slider.template.cjs +23 -1
  78. package/shared/slider.template.js +21 -2
  79. package/styles/core/all.css +1 -1
  80. package/styles/core/theme.css +1 -1
  81. package/styles/core/typography.css +1 -1
  82. package/styles/tokens/theme-dark.css +4 -4
  83. package/styles/tokens/theme-light.css +4 -4
  84. package/styles/tokens/vivid-2-compat.css +1 -1
  85. package/vivid.api.json +52 -4
  86. package/shared/aria2.cjs +0 -11
  87. package/shared/aria2.js +0 -9
  88. package/shared/button.cjs +0 -202
  89. package/shared/button.js +0 -200
  90. /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();
@@ -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';