@vonage/vivid 3.0.0-next.11 → 3.0.0-next.110

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 (209) hide show
  1. package/README.md +165 -4
  2. package/accordion/index.js +5 -14
  3. package/accordion-item/index.js +34 -41
  4. package/action-group/index.js +37 -0
  5. package/avatar/index.js +61 -0
  6. package/badge/index.js +23 -35
  7. package/banner/index.js +20 -115
  8. package/breadcrumb/index.js +22 -19
  9. package/breadcrumb-item/index.js +28 -25
  10. package/button/index.js +29 -690
  11. package/calendar/index.js +70 -69
  12. package/calendar-event/index.js +109 -0
  13. package/card/index.js +112 -0
  14. package/checkbox/index.js +178 -0
  15. package/custom-elements.json +3941 -0
  16. package/dialog/index.js +214 -0
  17. package/divider/index.js +27 -0
  18. package/elevation/index.js +10 -16
  19. package/fab/index.js +98 -0
  20. package/focus/index.js +18 -3
  21. package/header/index.js +63 -0
  22. package/icon/index.js +9 -12
  23. package/index.js +68 -22
  24. package/layout/index.js +6 -16
  25. package/lib/accordion-item/accordion-item.d.ts +2 -2
  26. package/lib/accordion-item/index.d.ts +0 -1
  27. package/lib/action-group/action-group.d.ts +10 -0
  28. package/lib/{sidenav-item/sidenav-item.template.d.ts → action-group/action-group.template.d.ts} +2 -2
  29. package/lib/{sidenav-item → action-group}/index.d.ts +1 -2
  30. package/lib/avatar/avatar.d.ts +15 -0
  31. package/lib/avatar/avatar.template.d.ts +4 -0
  32. package/lib/avatar/index.d.ts +2 -0
  33. package/lib/badge/badge.d.ts +3 -5
  34. package/lib/badge/index.d.ts +1 -2
  35. package/lib/banner/banner.d.ts +1 -1
  36. package/lib/banner/banner.template.d.ts +0 -2
  37. package/lib/breadcrumb/breadcrumb.template.d.ts +4 -0
  38. package/lib/breadcrumb-item/breadcrumb-item.d.ts +1 -1
  39. package/lib/breadcrumb-item/index.d.ts +0 -1
  40. package/lib/button/button.d.ts +4 -3
  41. package/lib/button/index.d.ts +1 -21
  42. package/lib/calendar/calendar.d.ts +3 -1
  43. package/lib/calendar/index.d.ts +0 -1
  44. package/lib/calendar-event/calendar-event.d.ts +14 -0
  45. package/lib/calendar-event/calendar-event.template.d.ts +4 -0
  46. package/lib/calendar-event/index.d.ts +2 -0
  47. package/lib/card/card.d.ts +10 -0
  48. package/lib/{text/text.template.d.ts → card/card.template.d.ts} +2 -2
  49. package/lib/{text → card}/index.d.ts +1 -1
  50. package/lib/checkbox/checkbox.d.ts +5 -0
  51. package/lib/checkbox/checkbox.template.d.ts +4 -0
  52. package/lib/checkbox/index.d.ts +2 -0
  53. package/lib/components.d.ts +32 -10
  54. package/lib/dialog/dialog.d.ts +20 -0
  55. package/lib/dialog/dialog.template.d.ts +4 -0
  56. package/lib/dialog/index.d.ts +2 -0
  57. package/lib/divider/divider.d.ts +3 -0
  58. package/lib/divider/divider.template.d.ts +4 -0
  59. package/lib/divider/index.d.ts +2 -0
  60. package/lib/elevation/elevation.d.ts +1 -0
  61. package/lib/elevation/index.d.ts +1 -1
  62. package/lib/enums.d.ts +19 -6
  63. package/lib/fab/fab.d.ts +13 -0
  64. package/lib/fab/fab.template.d.ts +4 -0
  65. package/lib/fab/index.d.ts +2 -0
  66. package/lib/focus/index.d.ts +1 -1
  67. package/lib/header/header.d.ts +5 -0
  68. package/lib/header/header.template.d.ts +4 -0
  69. package/lib/header/index.d.ts +2 -0
  70. package/lib/icon/icon.d.ts +5 -6
  71. package/lib/layout/index.d.ts +1 -1
  72. package/lib/layout/layout.d.ts +4 -4
  73. package/lib/listbox/index.d.ts +1 -0
  74. package/lib/listbox/listbox.d.ts +9 -0
  75. package/lib/listbox/listbox.template.d.ts +4 -0
  76. package/lib/menu/index.d.ts +10 -0
  77. package/lib/menu/menu.d.ts +10 -0
  78. package/lib/menu/menu.template.d.ts +3 -0
  79. package/lib/menu-item/index.d.ts +2 -0
  80. package/lib/menu-item/menu-item.d.ts +7 -0
  81. package/lib/menu-item/menu-item.template.d.ts +5 -0
  82. package/lib/nav/index.d.ts +2 -0
  83. package/lib/nav/nav.d.ts +3 -0
  84. package/lib/nav/nav.template.d.ts +4 -0
  85. package/lib/nav-disclosure/index.d.ts +2 -0
  86. package/lib/nav-disclosure/nav-disclosure.d.ts +10 -0
  87. package/lib/nav-disclosure/nav-disclosure.template.d.ts +4 -0
  88. package/lib/nav-item/index.d.ts +2 -0
  89. package/lib/{sidenav-item/sidenav-item.d.ts → nav-item/nav-item.d.ts} +2 -2
  90. package/lib/nav-item/nav-item.template.d.ts +4 -0
  91. package/lib/note/index.d.ts +2 -0
  92. package/lib/note/note.d.ts +10 -0
  93. package/lib/note/note.template.d.ts +4 -0
  94. package/lib/number-field/index.d.ts +2 -0
  95. package/lib/number-field/number-field.d.ts +14 -0
  96. package/lib/number-field/number-field.template.d.ts +4 -0
  97. package/lib/option/index.d.ts +2 -0
  98. package/lib/option/option.d.ts +9 -0
  99. package/lib/option/option.template.d.ts +4 -0
  100. package/lib/popup/index.d.ts +1 -3
  101. package/lib/popup/popup.d.ts +3 -2
  102. package/lib/progress/progress.d.ts +1 -1
  103. package/lib/progress-ring/progress-ring.d.ts +2 -1
  104. package/lib/radio/index.d.ts +2 -0
  105. package/lib/radio/radio.d.ts +4 -0
  106. package/lib/radio/radio.template.d.ts +4 -0
  107. package/lib/radio-group/index.d.ts +10 -0
  108. package/lib/radio-group/radio-group.d.ts +4 -0
  109. package/lib/radio-group/radio-group.template.d.ts +4 -0
  110. package/lib/side-drawer/index.d.ts +1 -1
  111. package/lib/side-drawer/side-drawer.d.ts +3 -2
  112. package/lib/slider/index.d.ts +2 -0
  113. package/lib/slider/slider.d.ts +4 -0
  114. package/lib/slider/slider.template.d.ts +4 -0
  115. package/lib/switch/index.d.ts +2 -0
  116. package/lib/switch/switch.d.ts +7 -0
  117. package/lib/switch/switch.template.d.ts +4 -0
  118. package/lib/text-anchor/text-anchor.d.ts +1 -1
  119. package/lib/text-area/index.d.ts +2 -0
  120. package/lib/text-area/text-area.d.ts +9 -0
  121. package/lib/text-area/text-area.template.d.ts +4 -0
  122. package/lib/text-field/index.d.ts +2 -0
  123. package/lib/text-field/text-field.d.ts +14 -0
  124. package/lib/text-field/text-field.template.d.ts +4 -0
  125. package/lib/tooltip/index.d.ts +0 -1
  126. package/lib/tooltip/tooltip.d.ts +7 -7
  127. package/listbox/index.js +1086 -0
  128. package/menu/index.js +357 -0
  129. package/menu-item/index.js +90 -0
  130. package/nav/index.js +17 -0
  131. package/nav-disclosure/index.js +80 -0
  132. package/nav-item/index.js +44 -0
  133. package/note/index.js +59 -0
  134. package/number-field/index.js +460 -0
  135. package/option/index.js +75 -0
  136. package/package.json +62 -10
  137. package/popup/index.js +35 -2036
  138. package/progress/index.js +33 -38
  139. package/progress-ring/index.js +13 -13
  140. package/radio/index.js +52 -0
  141. package/radio-group/index.js +435 -0
  142. package/shared/affix.js +2 -8
  143. package/shared/anchor.js +11 -3
  144. package/shared/apply-mixins.js +5 -4
  145. package/shared/aria-global.js +2 -86
  146. package/shared/aria.js +9 -0
  147. package/shared/base-progress.js +6 -1
  148. package/shared/breadcrumb-item.js +2 -2
  149. package/shared/button.js +23 -0
  150. package/shared/button2.js +200 -0
  151. package/shared/calendar-event.js +19 -0
  152. package/shared/design-system/index.d.ts +1 -1
  153. package/shared/dialog-polyfill.esm.js +858 -0
  154. package/shared/direction.js +20 -0
  155. package/shared/divider.js +55 -0
  156. package/shared/dom.js +8 -0
  157. package/shared/elevation.js +10 -0
  158. package/shared/enums.js +70 -0
  159. package/shared/es.object.assign.js +2 -59
  160. package/shared/es.promise.resolve.js +944 -0
  161. package/shared/es.regexp.to-string.js +58 -0
  162. package/shared/focus.js +11 -0
  163. package/shared/focus2.js +5 -0
  164. package/shared/form-associated.js +466 -0
  165. package/shared/form-elements.js +343 -0
  166. package/shared/icon.js +32 -1153
  167. package/shared/index.js +3780 -83
  168. package/shared/index2.js +7 -19
  169. package/shared/key-codes.js +97 -0
  170. package/shared/listbox-option.js +201 -0
  171. package/shared/menu-item.js +277 -0
  172. package/shared/numbers.js +25 -0
  173. package/shared/patterns/focus.d.ts +3 -0
  174. package/shared/patterns/form-elements/form-elements.d.ts +31 -0
  175. package/shared/patterns/form-elements/index.d.ts +1 -0
  176. package/shared/patterns/index.d.ts +2 -0
  177. package/shared/popup.js +1484 -0
  178. package/shared/radio.js +127 -0
  179. package/shared/ref.js +41 -0
  180. package/shared/slotted.js +1 -1
  181. package/shared/start-end.js +50 -0
  182. package/shared/string-trim.js +39 -0
  183. package/shared/text-anchor.js +2 -13
  184. package/shared/text-anchor.template.js +6 -5
  185. package/shared/utils/index.d.ts +1 -0
  186. package/side-drawer/index.js +38 -34
  187. package/slider/index.js +596 -0
  188. package/styles/core/all.css +86 -0
  189. package/styles/core/theme.css +11 -0
  190. package/styles/core/typography.css +80 -0
  191. package/styles/fonts/SpeziaCompleteVariableItalicWeb.woff2 +0 -0
  192. package/styles/fonts/SpeziaCompleteVariableUprightWeb.woff2 +0 -0
  193. package/styles/fonts/SpeziaMonoCompleteVariableWeb.woff2 +0 -0
  194. package/styles/fonts/spezia.css +9 -12
  195. package/styles/tokens/theme-dark.css +230 -0
  196. package/styles/tokens/theme-light.css +230 -0
  197. package/switch/index.js +153 -0
  198. package/text-anchor/index.js +8 -3
  199. package/text-area/index.js +288 -0
  200. package/text-field/index.js +129 -0
  201. package/tooltip/index.js +59 -43
  202. package/vivid.api.json +2979 -0
  203. package/lib/text/text.d.ts +0 -10
  204. package/shared/style-inject.es.js +0 -28
  205. package/shared/web.dom-collections.iterator.js +0 -1479
  206. package/sidenav-item/index.js +0 -38
  207. package/styles/themes/dark.css +0 -205
  208. package/styles/themes/light.css +0 -205
  209. package/text/index.js +0 -45
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Expose ltr and rtl strings
3
+ */
4
+ var Direction;
5
+ (function (Direction) {
6
+ Direction["ltr"] = "ltr";
7
+ Direction["rtl"] = "rtl";
8
+ })(Direction || (Direction = {}));
9
+
10
+ /**
11
+ * a method to determine the current localization direction of the view
12
+ * @param rootNode - the HTMLElement to begin the query from, usually "this" when used in a component controller
13
+ * @public
14
+ */
15
+ const getDirection = (rootNode) => {
16
+ const dirNode = rootNode.closest("[dir]");
17
+ return dirNode !== null && dirNode.dir === "rtl" ? Direction.rtl : Direction.ltr;
18
+ };
19
+
20
+ export { Direction as D, getDirection as g };
@@ -0,0 +1,55 @@
1
+ import { F as FoundationElement, _ as __decorate, a as attr } from './index.js';
2
+ import { O as Orientation } from './aria.js';
3
+
4
+ /**
5
+ * Divider roles
6
+ * @public
7
+ */
8
+ const DividerRole = {
9
+ /**
10
+ * The divider semantically separates content
11
+ */
12
+ separator: "separator",
13
+ /**
14
+ * The divider has no semantic value and is for visual presentation only.
15
+ */
16
+ presentation: "presentation",
17
+ };
18
+
19
+ /**
20
+ * A Divider Custom HTML Element.
21
+ * Implements the {@link https://www.w3.org/TR/wai-aria-1.1/#separator | ARIA separator } or {@link https://www.w3.org/TR/wai-aria-1.1/#presentation | ARIA presentation}.
22
+ *
23
+ * @public
24
+ */
25
+ class Divider$1 extends FoundationElement {
26
+ constructor() {
27
+ super(...arguments);
28
+ /**
29
+ * The role of the element.
30
+ *
31
+ * @public
32
+ * @remarks
33
+ * HTML Attribute: role
34
+ */
35
+ this.role = DividerRole.separator;
36
+ /**
37
+ * The orientation of the divider.
38
+ *
39
+ * @public
40
+ * @remarks
41
+ * HTML Attribute: orientation
42
+ */
43
+ this.orientation = Orientation.horizontal;
44
+ }
45
+ }
46
+ __decorate([
47
+ attr
48
+ ], Divider$1.prototype, "role", void 0);
49
+ __decorate([
50
+ attr
51
+ ], Divider$1.prototype, "orientation", void 0);
52
+
53
+ class Divider extends Divider$1 {}
54
+
55
+ export { Divider as D };
package/shared/dom.js ADDED
@@ -0,0 +1,8 @@
1
+ /**
2
+ * A test that ensures that all arguments are HTML Elements
3
+ */
4
+ function isHTMLElement(...args) {
5
+ return args.every((arg) => arg instanceof HTMLElement);
6
+ }
7
+
8
+ export { isHTMLElement as i };
@@ -0,0 +1,10 @@
1
+ import { F as FoundationElement, _ as __decorate, a as attr, b as __metadata } from './index.js';
2
+
3
+ class Elevation extends FoundationElement {}
4
+ __decorate([attr, __metadata("design:type", Number)], Elevation.prototype, "dp", void 0);
5
+ __decorate([attr({
6
+ attribute: 'no-shadow',
7
+ mode: 'boolean'
8
+ }), __metadata("design:type", Boolean)], Elevation.prototype, "noShadow", void 0);
9
+
10
+ export { Elevation as E };
@@ -0,0 +1,70 @@
1
+ var Connotation;
2
+ (function (Connotation) {
3
+ Connotation["Accent"] = "accent";
4
+ Connotation["CTA"] = "cta";
5
+ Connotation["Success"] = "success";
6
+ Connotation["Alert"] = "alert";
7
+ Connotation["Warning"] = "warning";
8
+ Connotation["Information"] = "information";
9
+ Connotation["Announcement"] = "announcement";
10
+ })(Connotation || (Connotation = {}));
11
+ var ConnotationDecorative;
12
+ (function (ConnotationDecorative) {
13
+ ConnotationDecorative["Pacific"] = "pacific";
14
+ })(ConnotationDecorative || (ConnotationDecorative = {}));
15
+ var Shape;
16
+ (function (Shape) {
17
+ Shape["Rounded"] = "rounded";
18
+ Shape["Pill"] = "pill";
19
+ Shape["Circled"] = "circled";
20
+ Shape["Sharp"] = "sharp";
21
+ })(Shape || (Shape = {}));
22
+ var Appearance;
23
+ (function (Appearance) {
24
+ Appearance["Filled"] = "filled";
25
+ Appearance["Outlined"] = "outlined";
26
+ Appearance["Duotone"] = "duotone";
27
+ Appearance["Fieldset"] = "fieldset";
28
+ Appearance["Subtle"] = "subtle";
29
+ Appearance["Ghost"] = "ghost";
30
+ })(Appearance || (Appearance = {}));
31
+ var Size;
32
+ (function (Size) {
33
+ Size["UltraCondensed"] = "ultraCondensed";
34
+ Size["SuperCondensed"] = "superCondensed";
35
+ Size["ExtraCondensed"] = "extraCondensed";
36
+ Size["SemiCondensed"] = "semiCondensed";
37
+ Size["Condensed"] = "condensed";
38
+ Size["Normal"] = "normal";
39
+ Size["SemiExpanded"] = "semiExpanded";
40
+ Size["Expanded"] = "expanded";
41
+ Size["ExtraExpanded"] = "extraExpanded";
42
+ Size["SuperExpanded"] = "superExpanded";
43
+ Size["UltraExpanded"] = "ultraExpanded";
44
+ })(Size || (Size = {}));
45
+ var LayoutSize;
46
+ (function (LayoutSize) {
47
+ LayoutSize["Small"] = "small";
48
+ LayoutSize["Medium"] = "medium";
49
+ LayoutSize["Large"] = "large";
50
+ })(LayoutSize || (LayoutSize = {}));
51
+ var Position;
52
+ (function (Position) {
53
+ Position["Top"] = "TOP";
54
+ Position["Bottom"] = "BOTTOM";
55
+ Position["Start"] = "START";
56
+ Position["Center"] = "CENTER";
57
+ Position["End"] = "END";
58
+ })(Position || (Position = {}));
59
+ var Role;
60
+ (function (Role) {
61
+ Role["Status"] = "status";
62
+ Role["Alert"] = "alert";
63
+ })(Role || (Role = {}));
64
+ var AriaLive;
65
+ (function (AriaLive) {
66
+ AriaLive["Polite"] = "polite";
67
+ AriaLive["Assertive"] = "assertive";
68
+ })(AriaLive || (AriaLive = {}));
69
+
70
+ export { Connotation as C, Shape as S };
@@ -1,61 +1,4 @@
1
- import { d as descriptors, f as functionUncurryThis, l as functionCall, p as fails$1, H as objectKeys$1, I as toObject$1, J as indexedObject, K as objectGetOwnPropertySymbols, L as objectPropertyIsEnumerable, _ as _export } from './web.dom-collections.iterator.js';
2
-
3
- var DESCRIPTORS = descriptors;
4
- var uncurryThis = functionUncurryThis;
5
- var call = functionCall;
6
- var fails = fails$1;
7
- var objectKeys = objectKeys$1;
8
- var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
9
- var propertyIsEnumerableModule = objectPropertyIsEnumerable;
10
- var toObject = toObject$1;
11
- var IndexedObject = indexedObject;
12
-
13
- // eslint-disable-next-line es/no-object-assign -- safe
14
- var $assign = Object.assign;
15
- // eslint-disable-next-line es/no-object-defineproperty -- required for testing
16
- var defineProperty = Object.defineProperty;
17
- var concat = uncurryThis([].concat);
18
-
19
- // `Object.assign` method
20
- // https://tc39.es/ecma262/#sec-object.assign
21
- var objectAssign = !$assign || fails(function () {
22
- // should have correct order of operations (Edge bug)
23
- if (DESCRIPTORS && $assign({ b: 1 }, $assign(defineProperty({}, 'a', {
24
- enumerable: true,
25
- get: function () {
26
- defineProperty(this, 'b', {
27
- value: 3,
28
- enumerable: false
29
- });
30
- }
31
- }), { b: 2 })).b !== 1) return true;
32
- // should work with symbols and should have deterministic property order (V8 bug)
33
- var A = {};
34
- var B = {};
35
- // eslint-disable-next-line es/no-symbol -- safe
36
- var symbol = Symbol();
37
- var alphabet = 'abcdefghijklmnopqrst';
38
- A[symbol] = 7;
39
- alphabet.split('').forEach(function (chr) { B[chr] = chr; });
40
- return $assign({}, A)[symbol] != 7 || objectKeys($assign({}, B)).join('') != alphabet;
41
- }) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`
42
- var T = toObject(target);
43
- var argumentsLength = arguments.length;
44
- var index = 1;
45
- var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
46
- var propertyIsEnumerable = propertyIsEnumerableModule.f;
47
- while (argumentsLength > index) {
48
- var S = IndexedObject(arguments[index++]);
49
- var keys = getOwnPropertySymbols ? concat(objectKeys(S), getOwnPropertySymbols(S)) : objectKeys(S);
50
- var length = keys.length;
51
- var j = 0;
52
- var key;
53
- while (length > j) {
54
- key = keys[j++];
55
- if (!DESCRIPTORS || call(propertyIsEnumerable, S, key)) T[key] = S[key];
56
- }
57
- } return T;
58
- } : $assign;
1
+ import { E as _export, a7 as objectAssign } from './index.js';
59
2
 
60
3
  var $ = _export;
61
4
  var assign = objectAssign;
@@ -63,6 +6,6 @@ var assign = objectAssign;
63
6
  // `Object.assign` method
64
7
  // https://tc39.es/ecma262/#sec-object.assign
65
8
  // eslint-disable-next-line es/no-object-assign -- required for testing
66
- $({ target: 'Object', stat: true, forced: Object.assign !== assign }, {
9
+ $({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }, {
67
10
  assign: assign
68
11
  });