@vonage/vivid 3.0.0-next.119 → 3.0.0-next.120

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 (201) hide show
  1. package/README.md +11 -6
  2. package/accordion/index.js +4 -51
  3. package/accordion-item/index.js +11 -109
  4. package/action-group/index.js +4 -36
  5. package/avatar/index.js +8 -64
  6. package/badge/index.js +9 -48
  7. package/banner/index.js +15 -117
  8. package/breadcrumb/index.js +5 -97
  9. package/breadcrumb-item/index.js +14 -53
  10. package/button/index.js +14 -92
  11. package/calendar/index.js +5 -1520
  12. package/calendar-event/index.js +7 -107
  13. package/card/index.js +10 -117
  14. package/checkbox/index.js +13 -175
  15. package/custom-elements.json +1827 -8
  16. package/dialog/index.js +14 -227
  17. package/divider/index.js +4 -25
  18. package/elevation/index.js +4 -24
  19. package/fab/index.js +13 -89
  20. package/focus/index.js +4 -17
  21. package/header/index.js +7 -12
  22. package/icon/index.js +7 -28
  23. package/index.js +49 -55
  24. package/layout/index.js +4 -42
  25. package/lib/accordion/definition.d.ts +3 -0
  26. package/lib/accordion/index.d.ts +1 -2
  27. package/lib/accordion-item/definition.d.ts +3 -0
  28. package/lib/accordion-item/index.d.ts +1 -2
  29. package/lib/action-group/definition.d.ts +3 -0
  30. package/lib/action-group/index.d.ts +1 -2
  31. package/lib/avatar/definition.d.ts +3 -0
  32. package/lib/avatar/index.d.ts +1 -2
  33. package/lib/badge/definition.d.ts +3 -0
  34. package/lib/badge/index.d.ts +1 -2
  35. package/lib/banner/definition.d.ts +3 -0
  36. package/lib/banner/index.d.ts +1 -2
  37. package/lib/breadcrumb/definition.d.ts +3 -0
  38. package/lib/breadcrumb/index.d.ts +1 -2
  39. package/lib/breadcrumb-item/definition.d.ts +3 -0
  40. package/lib/breadcrumb-item/index.d.ts +1 -2
  41. package/lib/button/definition.d.ts +3 -0
  42. package/lib/calendar/definition.d.ts +3 -0
  43. package/lib/calendar/index.d.ts +1 -2
  44. package/lib/calendar-event/definition.d.ts +3 -0
  45. package/lib/calendar-event/index.d.ts +1 -2
  46. package/lib/card/definition.d.ts +3 -0
  47. package/lib/card/index.d.ts +1 -2
  48. package/lib/checkbox/definition.d.ts +3 -0
  49. package/lib/checkbox/index.d.ts +1 -2
  50. package/lib/components.d.ts +38 -38
  51. package/lib/dialog/definition.d.ts +3 -0
  52. package/lib/dialog/index.d.ts +1 -2
  53. package/lib/divider/definition.d.ts +3 -0
  54. package/lib/divider/index.d.ts +1 -2
  55. package/lib/elevation/definition.d.ts +3 -0
  56. package/lib/elevation/index.d.ts +1 -2
  57. package/lib/fab/definition.d.ts +3 -0
  58. package/lib/fab/index.d.ts +1 -2
  59. package/lib/focus/definition.d.ts +3 -0
  60. package/lib/focus/index.d.ts +1 -2
  61. package/lib/header/definition.d.ts +3 -0
  62. package/lib/header/index.d.ts +1 -2
  63. package/lib/icon/definition.d.ts +3 -0
  64. package/lib/icon/index.d.ts +1 -2
  65. package/lib/layout/definition.d.ts +3 -0
  66. package/lib/layout/index.d.ts +1 -2
  67. package/lib/listbox/definition.d.ts +3 -0
  68. package/lib/menu/definition.d.ts +7 -0
  69. package/lib/menu/index.d.ts +1 -10
  70. package/lib/menu-item/definition.d.ts +3 -0
  71. package/lib/menu-item/index.d.ts +1 -2
  72. package/lib/nav/definition.d.ts +3 -0
  73. package/lib/nav/index.d.ts +1 -2
  74. package/lib/nav-disclosure/definition.d.ts +3 -0
  75. package/lib/nav-disclosure/index.d.ts +1 -2
  76. package/lib/nav-item/definition.d.ts +3 -0
  77. package/lib/nav-item/index.d.ts +1 -2
  78. package/lib/note/definition.d.ts +3 -0
  79. package/lib/note/index.d.ts +1 -2
  80. package/lib/number-field/definition.d.ts +3 -0
  81. package/lib/number-field/index.d.ts +1 -2
  82. package/lib/option/definition.d.ts +3 -0
  83. package/lib/option/index.d.ts +1 -2
  84. package/lib/popup/definition.d.ts +4 -0
  85. package/lib/popup/index.d.ts +1 -2
  86. package/lib/progress/definition.d.ts +3 -0
  87. package/lib/progress/index.d.ts +1 -2
  88. package/lib/progress-ring/definition.d.ts +3 -0
  89. package/lib/progress-ring/index.d.ts +1 -2
  90. package/lib/radio/definition.d.ts +3 -0
  91. package/lib/radio/index.d.ts +1 -2
  92. package/lib/radio-group/definition.d.ts +7 -0
  93. package/lib/radio-group/index.d.ts +1 -10
  94. package/lib/side-drawer/definition.d.ts +3 -0
  95. package/lib/side-drawer/index.d.ts +1 -2
  96. package/lib/slider/definition.d.ts +3 -0
  97. package/lib/slider/index.d.ts +1 -2
  98. package/lib/switch/definition.d.ts +3 -0
  99. package/lib/switch/index.d.ts +1 -2
  100. package/lib/text-anchor/definition.d.ts +3 -0
  101. package/lib/text-anchor/index.d.ts +1 -2
  102. package/lib/text-area/definition.d.ts +3 -0
  103. package/lib/text-area/index.d.ts +1 -2
  104. package/lib/text-field/definition.d.ts +3 -0
  105. package/lib/text-field/index.d.ts +1 -2
  106. package/lib/tooltip/definition.d.ts +3 -0
  107. package/lib/tooltip/index.d.ts +1 -2
  108. package/listbox/index.js +18 -1080
  109. package/menu/index.js +27 -354
  110. package/menu-item/index.js +11 -81
  111. package/nav/index.js +3 -16
  112. package/nav-disclosure/index.js +13 -77
  113. package/nav-item/index.js +13 -35
  114. package/note/index.js +13 -60
  115. package/number-field/index.js +14 -16
  116. package/option/index.js +13 -68
  117. package/package.json +2 -2
  118. package/popup/index.js +17 -55
  119. package/progress/index.js +6 -92
  120. package/progress-ring/index.js +6 -75
  121. package/radio/index.js +8 -48
  122. package/radio-group/index.js +9 -433
  123. package/shared/anchor.js +1 -1
  124. package/shared/apply-mixins.js +1 -1
  125. package/shared/base-progress.js +1 -1
  126. package/shared/breadcrumb-item.js +1 -1
  127. package/shared/button.js +195 -18
  128. package/shared/calendar-event.js +1 -1
  129. package/shared/definition.js +53 -0
  130. package/shared/definition10.js +99 -0
  131. package/shared/definition11.js +48 -0
  132. package/shared/definition12.js +1523 -0
  133. package/shared/definition13.js +111 -0
  134. package/shared/definition14.js +114 -0
  135. package/shared/definition15.js +32 -0
  136. package/shared/definition16.js +172 -0
  137. package/shared/definition17.js +223 -0
  138. package/shared/{divider.js → definition18.js} +25 -2
  139. package/shared/definition19.js +87 -0
  140. package/shared/definition2.js +106 -0
  141. package/shared/definition20.js +44 -0
  142. package/shared/definition21.js +1078 -0
  143. package/shared/{listbox-option.js → definition22.js} +71 -11
  144. package/shared/definition23.js +348 -0
  145. package/shared/{popup.js → definition24.js} +46 -3
  146. package/shared/{menu-item.js → definition25.js} +87 -13
  147. package/shared/definition26.js +18 -0
  148. package/shared/definition27.js +75 -0
  149. package/shared/definition28.js +31 -0
  150. package/shared/definition29.js +56 -0
  151. package/shared/definition3.js +29 -0
  152. package/shared/definition30.js +94 -0
  153. package/shared/definition31.js +77 -0
  154. package/shared/definition32.js +45 -0
  155. package/shared/definition33.js +435 -0
  156. package/shared/definition34.js +86 -0
  157. package/shared/definition35.js +592 -0
  158. package/shared/definition36.js +147 -0
  159. package/shared/definition37.js +279 -0
  160. package/shared/definition38.js +119 -0
  161. package/shared/definition39.js +77 -0
  162. package/shared/definition4.js +19 -0
  163. package/shared/definition5.js +38 -0
  164. package/shared/definition6.js +60 -0
  165. package/shared/definition7.js +45 -0
  166. package/shared/definition8.js +113 -0
  167. package/shared/definition9.js +107 -0
  168. package/shared/design-system/index.d.ts +1 -2
  169. package/shared/es.object.assign.js +58 -1
  170. package/shared/es.regexp.to-string.js +2 -1
  171. package/shared/focus.js +3 -9
  172. package/shared/focus2.js +9 -3
  173. package/shared/form-associated.js +1 -1
  174. package/shared/form-elements.js +2 -2
  175. package/shared/icon.js +1096 -9
  176. package/shared/index.js +385 -2501
  177. package/shared/patterns/form-elements/form-elements.d.ts +2 -2
  178. package/shared/radio.js +1 -1
  179. package/shared/ref.js +1 -1
  180. package/shared/slotted.js +1 -1
  181. package/shared/string-trim.js +2 -1
  182. package/shared/text-anchor.template.js +1 -1
  183. package/shared/to-string.js +51 -0
  184. package/side-drawer/index.js +5 -84
  185. package/slider/index.js +14 -593
  186. package/styles/core/all.css +1 -1
  187. package/styles/core/theme.css +1 -1
  188. package/styles/core/typography.css +1 -1
  189. package/styles/tokens/theme-dark.css +4 -4
  190. package/styles/tokens/theme-light.css +4 -4
  191. package/switch/index.js +13 -149
  192. package/text-anchor/index.js +8 -7
  193. package/text-area/index.js +16 -282
  194. package/text-field/index.js +14 -121
  195. package/tooltip/index.js +24 -82
  196. package/vivid.api.json +1640 -850
  197. package/shared/button2.js +0 -200
  198. package/shared/elevation.js +0 -10
  199. package/shared/es.promise.resolve.js +0 -944
  200. package/shared/index2.js +0 -9
  201. package/shared/utils/index.d.ts +0 -1
@@ -18,10 +18,10 @@ export declare function formElements<T extends {
18
18
  successText?: string | undefined;
19
19
  charCount: boolean;
20
20
  userValid: boolean;
21
- "__#7291@#blurred": boolean;
21
+ "__#7518@#blurred": boolean;
22
22
  readonly errorValidationMessage: any;
23
23
  connectedCallback(): void;
24
- "__#7291@#handleInvalidEvent": () => void;
24
+ "__#7518@#handleInvalidEvent": () => void;
25
25
  disconnectedCallback(): void;
26
26
  validate: () => void;
27
27
  };
package/shared/radio.js CHANGED
@@ -1,4 +1,4 @@
1
- import { F as FoundationElement, _ as __decorate, a as attr, V as observable, b as __metadata } from './index.js';
1
+ import { F as FoundationElement, _ as __decorate, a as attr, N as observable, b as __metadata } from './index.js';
2
2
  import { C as CheckableFormAssociated } from './form-associated.js';
3
3
  import { a as keySpace } from './key-codes.js';
4
4
 
package/shared/ref.js CHANGED
@@ -1,4 +1,4 @@
1
- import { a1 as AttachedBehaviorHTMLDirective } from './index.js';
1
+ import { R as AttachedBehaviorHTMLDirective } from './index.js';
2
2
 
3
3
  /**
4
4
  * The runtime behavior for template references.
package/shared/slotted.js CHANGED
@@ -1,4 +1,4 @@
1
- import { a2 as Observable, $ as emptyArray, a1 as AttachedBehaviorHTMLDirective } from './index.js';
1
+ import { V as Observable, T as emptyArray, R as AttachedBehaviorHTMLDirective } from './index.js';
2
2
 
3
3
  /**
4
4
  * Creates a function that can be used to filter a Node array, selecting only elements.
@@ -1,4 +1,5 @@
1
- import { n as functionUncurryThis, W as requireObjectCoercible$1, X as toString$1 } from './index.js';
1
+ import { i as functionUncurryThis, P as requireObjectCoercible$1 } from './index.js';
2
+ import { t as toString$1 } from './to-string.js';
2
3
 
3
4
  // a string of all valid unicode whitespaces
4
5
  var whitespaces$1 = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002' +
@@ -1,5 +1,5 @@
1
1
  import { a as affixIconTemplateFactory } from './affix.js';
2
- import { f as focusTemplateFactory } from './focus.js';
2
+ import { f as focusTemplateFactory } from './focus2.js';
3
3
  import { h as html } from './index.js';
4
4
  import { r as ref } from './ref.js';
5
5
  import { c as classNames } from './class-names.js';
@@ -0,0 +1,51 @@
1
+ import { w as wellKnownSymbol$2, c as classofRaw$1, k as isCallable$1 } from './index.js';
2
+
3
+ var wellKnownSymbol$1 = wellKnownSymbol$2;
4
+
5
+ var TO_STRING_TAG$1 = wellKnownSymbol$1('toStringTag');
6
+ var test = {};
7
+
8
+ test[TO_STRING_TAG$1] = 'z';
9
+
10
+ var toStringTagSupport = String(test) === '[object z]';
11
+
12
+ var TO_STRING_TAG_SUPPORT = toStringTagSupport;
13
+ var isCallable = isCallable$1;
14
+ var classofRaw = classofRaw$1;
15
+ var wellKnownSymbol = wellKnownSymbol$2;
16
+
17
+ var TO_STRING_TAG = wellKnownSymbol('toStringTag');
18
+ var $Object = Object;
19
+
20
+ // ES3 wrong here
21
+ var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
22
+
23
+ // fallback for IE11 Script Access Denied error
24
+ var tryGet = function (it, key) {
25
+ try {
26
+ return it[key];
27
+ } catch (error) { /* empty */ }
28
+ };
29
+
30
+ // getting tag from ES6+ `Object.prototype.toString`
31
+ var classof$1 = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {
32
+ var O, tag, result;
33
+ return it === undefined ? 'Undefined' : it === null ? 'Null'
34
+ // @@toStringTag case
35
+ : typeof (tag = tryGet(O = $Object(it), TO_STRING_TAG)) == 'string' ? tag
36
+ // builtinTag case
37
+ : CORRECT_ARGUMENTS ? classofRaw(O)
38
+ // ES3 arguments fallback
39
+ : (result = classofRaw(O)) == 'Object' && isCallable(O.callee) ? 'Arguments' : result;
40
+ };
41
+
42
+ var classof = classof$1;
43
+
44
+ var $String = String;
45
+
46
+ var toString = function (argument) {
47
+ if (classof(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string');
48
+ return $String(argument);
49
+ };
50
+
51
+ export { classof$1 as c, toString as t };
@@ -1,85 +1,6 @@
1
- import { F as FoundationElement, Y as __classPrivateFieldGet, _ as __decorate, a as attr, b as __metadata, h as html, d as designSystem, g as getPrefix } from '../shared/index.js';
2
- import { w as when } from '../shared/when.js';
3
- import { c as classNames } from '../shared/class-names.js';
1
+ import { r as registerSideDrawer } from '../shared/definition34.js';
2
+ import '../shared/index.js';
3
+ import '../shared/when.js';
4
+ import '../shared/class-names.js';
4
5
 
5
- var _SideDrawer_instances, _SideDrawer_close, _SideDrawer_open;
6
- class SideDrawer extends FoundationElement {
7
- constructor() {
8
- super(...arguments);
9
- _SideDrawer_instances.add(this);
10
- this.alternate = false;
11
- this.modal = false;
12
- this.open = false;
13
- this.trailing = false;
14
- }
15
- attributeChangedCallback(name, oldValue, newValue) {
16
- super.attributeChangedCallback(name, oldValue, newValue);
17
- switch (name) {
18
- case 'open':
19
- {
20
- this.open ? __classPrivateFieldGet(this, _SideDrawer_instances, "m", _SideDrawer_open).call(this) : __classPrivateFieldGet(this, _SideDrawer_instances, "m", _SideDrawer_close).call(this);
21
- }
22
- }
23
- }
24
- }
25
- _SideDrawer_instances = new WeakSet(), _SideDrawer_close = function _SideDrawer_close() {
26
- this.$emit('close');
27
- }, _SideDrawer_open = function _SideDrawer_open() {
28
- this.$emit('open');
29
- };
30
- __decorate([attr({
31
- mode: 'boolean'
32
- }), __metadata("design:type", Object)], SideDrawer.prototype, "alternate", void 0);
33
- __decorate([attr({
34
- mode: 'boolean'
35
- }), __metadata("design:type", Object)], SideDrawer.prototype, "modal", void 0);
36
- __decorate([attr({
37
- mode: 'boolean'
38
- }), __metadata("design:type", Object)], SideDrawer.prototype, "open", void 0);
39
- __decorate([attr({
40
- mode: 'boolean'
41
- }), __metadata("design:type", Object)], SideDrawer.prototype, "trailing", void 0);
42
-
43
- var css_248z = "/**\n * Do not edit directly\n * Generated on Wed, 14 Dec 2022 14:20:57 GMT\n */\n.control {\n position: fixed;\n z-index: 1;\n background-color: var(--vvd-color-canvas);\n color: var(--vvd-color-canvas-text);\n inline-size: 280px;\n inset-block: 0;\n overflow-y: auto;\n}\n.control[part~=vvd-theme-alternate] {\n background-color: var(--vvd-color-canvas);\n color: var(--vvd-color-canvas-text);\n color-scheme: var(--vvd-color-scheme);\n}\n.control.trailing {\n inset-inline-end: 0;\n}\n.control:not(.open).trailing {\n transform: translateX(100%);\n}\n.control:not(.open):not(.trailing) {\n transform: translateX(-100%);\n}\n.control.open:not(.modal).trailing + .side-drawer-app-content {\n margin-inline-end: var(--side-drawer-app-content-offset, 280px);\n}\n.control.open:not(.modal):not(.trailing) + .side-drawer-app-content {\n margin-inline-start: var(--side-drawer-app-content-offset, 280px);\n}\n@media (prefers-reduced-motion: no-preference) {\n .control {\n transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);\n }\n}\n\n.scrim {\n background-color: var(--vvd-color-canvas-text);\n opacity: 0.5;\n position: fixed;\n inset: 0;\n}\n.scrim:not(.open) {\n display: none;\n}";
44
-
45
- let _ = t => t,
46
- _t,
47
- _t2;
48
- const getClasses = ({
49
- modal,
50
- open,
51
- trailing
52
- }) => classNames('control', ['modal', modal], ['open', open], ['trailing', trailing]);
53
- const getScrimClasses = ({
54
- open
55
- }) => classNames('scrim', ['open', open]);
56
- const sideDrawerTemplate = () => html(_t || (_t = _`
57
- <aside class="${0}" part="base ${0}"
58
- @keydown="${0}">
59
- <slot></slot>
60
- </aside>
61
-
62
- <div class="side-drawer-app-content" ?inert="${0}">
63
- <slot name="app-content"></slot>
64
- </div>
65
-
66
- ${0}
67
- `), getClasses, x => x.alternate ? 'vvd-theme-alternate' : '', (x, c) => handleKeydown(x, c.event), x => x.open && x.modal, when(x => x.modal, html(_t2 || (_t2 = _`<div class="${0}" @click="${0}"></div>`), getScrimClasses, x => x.open = false)));
68
- const handleKeydown = (x, {
69
- key
70
- }) => {
71
- if (key === 'Escape') {
72
- x.open = false;
73
- } else {
74
- return true;
75
- }
76
- };
77
-
78
- const vividSideDrawer = SideDrawer.compose({
79
- baseName: 'side-drawer',
80
- template: sideDrawerTemplate,
81
- styles: css_248z
82
- });
83
- designSystem.withPrefix(getPrefix(import.meta.url)).register(vividSideDrawer());
84
-
85
- export { vividSideDrawer };
6
+ registerSideDrawer();