@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
@@ -1,12 +1,19 @@
1
1
  import { F as FoundationElement, _ as __decorate, a as attr, o as observable, h as html, r as registerFactory } from './index.js';
2
2
  import { D as Direction, g as getDirection } from './direction.js';
3
3
  import { h as keyArrowRight, i as keyArrowLeft, A as ArrowKeys, e as keyArrowUp, f as keyArrowDown, k as keyEnter } from './key-codes.js';
4
- import { O as Orientation } from './aria2.js';
5
4
  import { R as Radio } from './radio.js';
6
5
  import { s as slotted, e as elements } from './slotted.js';
7
6
  import { w as when } from './when.js';
8
7
  import { O as Orientation$1 } from './aria.js';
9
8
 
9
+ /**
10
+ * Standard orientation values
11
+ */
12
+ const Orientation = {
13
+ horizontal: "horizontal",
14
+ vertical: "vertical",
15
+ };
16
+
10
17
  /**
11
18
  * An Radio Group Custom HTML Element.
12
19
  * Implements the {@link https://www.w3.org/TR/wai-aria-1.1/#radiogroup | ARIA radiogroup }.
@@ -24,25 +24,6 @@ class FormAssociatedRangeSlider extends formAssociated.FormAssociated(_RangeSlid
24
24
  }
25
25
  }
26
26
 
27
- const getDecimalPlaces = (num) => {
28
- const match = num.toString().match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);
29
- return Math.max(
30
- 0,
31
- // Number of digits right of decimal point.
32
- (match[1] ? match[1].length : 0) - // Adjust for scientific notation.
33
- (match[2] ? +match[2] : 0)
34
- );
35
- };
36
- const roundToStepValue = (value, step) => {
37
- const decimalPlaces = getDecimalPlaces(step);
38
- const factor = Math.pow(10, decimalPlaces);
39
- const roundedValue = Math.round(value / step) * step;
40
- return Math.round(roundedValue * factor) / factor;
41
- };
42
-
43
- const lerp = (a, b, value) => a + (b - a) * value;
44
- const inverseLerp = (a, b, value) => slider_template.limit(0, 1, (value - a) / (b - a));
45
-
46
27
  var __defProp = Object.defineProperty;
47
28
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
48
29
  var __typeError = (msg) => {
@@ -385,7 +366,7 @@ updateThumbPositions_fn = function() {
385
366
  this._selectedRangeCss = `${dirProp}: ${endOffsetPct}%; ${dimProp}: ${startOffsetPct - endOffsetPct}%; ${transition}`;
386
367
  };
387
368
  thumbTrackEndOffset_fn = function(value) {
388
- return (1 - inverseLerp(this.min, this.max, value)) * 100;
369
+ return (1 - slider_template.inverseLerp(this.min, this.max, value)) * 100;
389
370
  };
390
371
  calculateValueFromMouseEvent_fn = function(e) {
391
372
  const trackClientRect = this._trackEl.getBoundingClientRect();
@@ -398,13 +379,13 @@ calculateValueFromMouseEvent_fn = function(e) {
398
379
  trackClientRect.bottom,
399
380
  e.pageY - document.documentElement.scrollTop
400
381
  ];
401
- return lerp(this.min, this.max, inverseLerp(minPos, maxPos, valuePos));
382
+ return slider_template.lerp(this.min, this.max, slider_template.inverseLerp(minPos, maxPos, valuePos));
402
383
  };
403
384
  roundToNearestStep_fn = function(thumb, value) {
404
385
  return slider_template.limit(
405
386
  __privateGet(this, _RangeSlider_instances, thumbConstraints_get)[thumb].min,
406
387
  __privateGet(this, _RangeSlider_instances, thumbConstraints_get)[thumb].max,
407
- roundToStepValue(value - this.min, this.step) + this.min
388
+ slider_template.roundToStepValue(value - this.min, this.step) + this.min
408
389
  );
409
390
  };
410
391
  _isNonVisibleFocus = new WeakMap();
@@ -1,8 +1,8 @@
1
1
  import { F as FoundationElement, o as observable, a as attr, n as nullableNumberConverter, h as html, r as registerFactory } from './index.js';
2
2
  import { P as Popup, a as PlacementStrategy, p as popupRegistries } from './definition64.js';
3
- import { e as keyHome, f as keyEnd, d as keyArrowUp, k as keyArrowLeft, c as keyArrowDown, a as keyArrowRight } from './key-codes2.js';
3
+ import { c as keyHome, d as keyEnd, f as keyArrowUp, k as keyArrowLeft, e as keyArrowDown, a as keyArrowRight } from './key-codes2.js';
4
4
  import { F as FormAssociated } from './form-associated.js';
5
- import { l as limit, g as getMarkersTemplate } from './slider.template.js';
5
+ import { i as inverseLerp, l as lerp, a as limit, r as roundToStepValue, g as getMarkersTemplate } from './slider.template.js';
6
6
  import { O as Orientation } from './aria.js';
7
7
  import { a as applyMixins } from './apply-mixins.js';
8
8
  import { L as Localized } from './localized.js';
@@ -22,25 +22,6 @@ class FormAssociatedRangeSlider extends FormAssociated(_RangeSlider) {
22
22
  }
23
23
  }
24
24
 
25
- const getDecimalPlaces = (num) => {
26
- const match = num.toString().match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);
27
- return Math.max(
28
- 0,
29
- // Number of digits right of decimal point.
30
- (match[1] ? match[1].length : 0) - // Adjust for scientific notation.
31
- (match[2] ? +match[2] : 0)
32
- );
33
- };
34
- const roundToStepValue = (value, step) => {
35
- const decimalPlaces = getDecimalPlaces(step);
36
- const factor = Math.pow(10, decimalPlaces);
37
- const roundedValue = Math.round(value / step) * step;
38
- return Math.round(roundedValue * factor) / factor;
39
- };
40
-
41
- const lerp = (a, b, value) => a + (b - a) * value;
42
- const inverseLerp = (a, b, value) => limit(0, 1, (value - a) / (b - a));
43
-
44
25
  var __defProp = Object.defineProperty;
45
26
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
46
27
  var __typeError = (msg) => {
@@ -15,7 +15,6 @@ const applyMixins = require('./apply-mixins.cjs');
15
15
  const when = require('./when.cjs');
16
16
  const ref = require('./ref.cjs');
17
17
  const slotted = require('./slotted.cjs');
18
- const button = require('./button.cjs');
19
18
  const repeat = require('./repeat.cjs');
20
19
  const classNames = require('./class-names.cjs');
21
20
  const icon = require('./icon.cjs');
@@ -907,7 +906,7 @@ const elidedTagTemplateFactory = (context, getComponent) => {
907
906
  `;
908
907
  };
909
908
  function renderFieldset(context) {
910
- const buttonTag = context.tagFor(button.Button);
909
+ const buttonTag = context.tagFor(definition$1.Button);
911
910
  const affixIconTemplate = affix.affixIconTemplateFactory(context);
912
911
  const chevronTemplate = definition$1.chevronTemplateFactory(context);
913
912
  const tagTemplate = tagTemplateFactory(context, (c) => c.parent);
@@ -1,5 +1,5 @@
1
1
  import { F as FoundationElement, O as Observable, D as DOM, a as attr, n as nullableNumberConverter, o as observable, h as html, r as registerFactory } from './index.js';
2
- import { c as chevronTemplateFactory, a as buttonRegistries } from './definition11.js';
2
+ import { B as Button$1, d as chevronTemplateFactory, a as buttonRegistries } from './definition11.js';
3
3
  import { P as Popup, p as popupRegistries } from './definition64.js';
4
4
  import { a as iconRegistries } from './definition27.js';
5
5
  import { a as applyMixinsWithObservables } from './applyMixinsWithObservables.js';
@@ -13,7 +13,6 @@ import { a as applyMixins } from './apply-mixins.js';
13
13
  import { w as when } from './when.js';
14
14
  import { r as ref } from './ref.js';
15
15
  import { s as slotted } from './slotted.js';
16
- import { B as Button$1 } from './button.js';
17
16
  import { r as repeat } from './repeat.js';
18
17
  import { c as classNames } from './class-names.js';
19
18
  import { I as Icon } from './icon.js';
@@ -12,7 +12,7 @@ import { u as uniqueId } from './strings.js';
12
12
  import { c as keyTab, b as keyEscape, k as keyEnter, d as keyEnd, g as keyHome, a as keySpace, f as keyArrowDown, e as keyArrowUp } from './key-codes.js';
13
13
  import { e as errorText, f as formElements, F as FormElementSuccessText, a as FormElementHelperText, g as getFeedbackTemplate } from './form-elements.js';
14
14
  import { b as AffixIconWithTrailing, a as affixIconTemplateFactory, I as IconWrapper } from './affix.js';
15
- import { c as chevronTemplateFactory } from './definition11.js';
15
+ import { d as chevronTemplateFactory } from './definition11.js';
16
16
  import { h as handleEscapeKeyAndStopPropogation } from './index2.js';
17
17
  import { r as ref } from './ref.js';
18
18
  import { w as when } from './when.js';