@vonage/vivid 2.36.3 → 3.0.0-next.100

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 (237) hide show
  1. package/README.md +144 -0
  2. package/accordion/index.js +52 -0
  3. package/accordion-item/index.js +118 -0
  4. package/action-group/index.js +41 -0
  5. package/avatar/index.js +61 -0
  6. package/badge/index.js +51 -0
  7. package/banner/index.js +128 -0
  8. package/breadcrumb/index.js +103 -0
  9. package/breadcrumb-item/index.js +59 -0
  10. package/button/index.js +24 -0
  11. package/calendar/index.js +1526 -0
  12. package/calendar-event/index.js +112 -0
  13. package/card/index.js +114 -0
  14. package/checkbox/index.js +179 -0
  15. package/dialog/index.js +230 -0
  16. package/divider/index.js +4 -0
  17. package/elevation/index.js +3 -0
  18. package/fab/index.js +100 -0
  19. package/focus/index.js +18 -0
  20. package/header/index.js +61 -0
  21. package/icon/index.js +36 -0
  22. package/index.d.ts +2 -0
  23. package/index.js +76 -64
  24. package/layout/index.js +43 -0
  25. package/lib/accordion/accordion.d.ts +9 -0
  26. package/lib/accordion/accordion.template.d.ts +4 -0
  27. package/lib/accordion/index.d.ts +2 -0
  28. package/lib/accordion-item/accordion-item.d.ts +13 -0
  29. package/lib/accordion-item/accordion-item.template.d.ts +4 -0
  30. package/lib/accordion-item/index.d.ts +4 -0
  31. package/lib/action-group/action-group.d.ts +10 -0
  32. package/lib/action-group/action-group.template.d.ts +4 -0
  33. package/lib/action-group/index.d.ts +2 -0
  34. package/lib/avatar/avatar.d.ts +15 -0
  35. package/lib/avatar/avatar.template.d.ts +4 -0
  36. package/lib/avatar/index.d.ts +3 -0
  37. package/lib/badge/badge.d.ts +15 -0
  38. package/lib/badge/badge.template.d.ts +4 -0
  39. package/lib/badge/index.d.ts +3 -0
  40. package/lib/banner/banner.d.ts +20 -0
  41. package/lib/banner/banner.template.d.ts +4 -0
  42. package/lib/banner/index.d.ts +3 -0
  43. package/lib/breadcrumb/breadcrumb.d.ts +3 -0
  44. package/lib/breadcrumb/breadcrumb.template.d.ts +4 -0
  45. package/lib/breadcrumb/index.d.ts +2 -0
  46. package/lib/breadcrumb-item/breadcrumb-item.d.ts +5 -0
  47. package/lib/breadcrumb-item/breadcrumb-item.template.d.ts +4 -0
  48. package/lib/breadcrumb-item/index.d.ts +4 -0
  49. package/lib/button/button.d.ts +18 -0
  50. package/lib/button/button.template.d.ts +4 -0
  51. package/lib/button/index.d.ts +4 -0
  52. package/lib/calendar/calendar.d.ts +13 -0
  53. package/lib/calendar/calendar.template.d.ts +4 -0
  54. package/lib/calendar/helpers/calendar.date-functions.d.ts +2 -0
  55. package/lib/calendar/helpers/calendar.event-context.d.ts +6 -0
  56. package/lib/calendar/helpers/calendar.keyboard-interactions.d.ts +9 -0
  57. package/lib/calendar/index.d.ts +2 -0
  58. package/lib/calendar-event/calendar-event.d.ts +14 -0
  59. package/lib/calendar-event/calendar-event.template.d.ts +4 -0
  60. package/lib/calendar-event/index.d.ts +2 -0
  61. package/lib/card/card.d.ts +10 -0
  62. package/lib/card/card.template.d.ts +4 -0
  63. package/lib/card/index.d.ts +4 -0
  64. package/lib/checkbox/checkbox.d.ts +5 -0
  65. package/lib/checkbox/checkbox.template.d.ts +4 -0
  66. package/lib/checkbox/index.d.ts +4 -0
  67. package/lib/components.d.ts +38 -0
  68. package/lib/dialog/dialog.d.ts +20 -0
  69. package/lib/dialog/dialog.template.d.ts +4 -0
  70. package/lib/dialog/index.d.ts +5 -0
  71. package/lib/divider/divider.d.ts +3 -0
  72. package/lib/divider/divider.template.d.ts +4 -0
  73. package/lib/divider/index.d.ts +2 -0
  74. package/lib/elevation/elevation.d.ts +5 -0
  75. package/lib/elevation/elevation.template.d.ts +4 -0
  76. package/lib/elevation/index.d.ts +2 -0
  77. package/lib/enums.d.ts +59 -0
  78. package/lib/fab/fab.d.ts +13 -0
  79. package/lib/fab/fab.template.d.ts +4 -0
  80. package/lib/fab/index.d.ts +4 -0
  81. package/lib/focus/focus.d.ts +3 -0
  82. package/lib/focus/focus.template.d.ts +4 -0
  83. package/lib/focus/index.d.ts +2 -0
  84. package/lib/header/header.d.ts +5 -0
  85. package/lib/header/header.template.d.ts +4 -0
  86. package/lib/header/index.d.ts +3 -0
  87. package/lib/icon/icon.d.ts +12 -0
  88. package/lib/icon/icon.placeholder.d.ts +1 -0
  89. package/lib/icon/icon.template.d.ts +4 -0
  90. package/lib/icon/index.d.ts +2 -0
  91. package/lib/layout/index.d.ts +2 -0
  92. package/lib/layout/layout.d.ts +16 -0
  93. package/lib/layout/layout.template.d.ts +4 -0
  94. package/lib/listbox/index.d.ts +4 -0
  95. package/lib/listbox/listbox.d.ts +9 -0
  96. package/lib/listbox/listbox.template.d.ts +4 -0
  97. package/lib/listbox-option/index.d.ts +4 -0
  98. package/lib/listbox-option/listbox-option.d.ts +9 -0
  99. package/lib/listbox-option/listbox-option.template.d.ts +4 -0
  100. package/lib/menu/index.d.ts +12 -0
  101. package/lib/menu/menu.d.ts +10 -0
  102. package/lib/menu/menu.template.d.ts +3 -0
  103. package/lib/menu-item/index.d.ts +3 -0
  104. package/lib/menu-item/menu-item.d.ts +7 -0
  105. package/lib/menu-item/menu-item.template.d.ts +5 -0
  106. package/lib/nav/index.d.ts +2 -0
  107. package/lib/nav/nav.d.ts +3 -0
  108. package/lib/nav/nav.template.d.ts +4 -0
  109. package/lib/nav-disclosure/index.d.ts +4 -0
  110. package/lib/nav-disclosure/nav-disclosure.d.ts +10 -0
  111. package/lib/nav-disclosure/nav-disclosure.template.d.ts +4 -0
  112. package/lib/nav-item/index.d.ts +4 -0
  113. package/lib/nav-item/nav-item.d.ts +6 -0
  114. package/lib/nav-item/nav-item.template.d.ts +4 -0
  115. package/lib/note/index.d.ts +2 -0
  116. package/lib/note/note.d.ts +10 -0
  117. package/lib/note/note.template.d.ts +5 -0
  118. package/lib/number-field/index.d.ts +4 -0
  119. package/lib/number-field/number-field.d.ts +14 -0
  120. package/lib/number-field/number-field.template.d.ts +4 -0
  121. package/lib/popup/index.d.ts +4 -0
  122. package/lib/popup/popup.d.ts +18 -0
  123. package/lib/popup/popup.template.d.ts +4 -0
  124. package/lib/progress/index.d.ts +2 -0
  125. package/lib/progress/progress.d.ts +9 -0
  126. package/lib/progress/progress.template.d.ts +5 -0
  127. package/lib/progress-ring/index.d.ts +2 -0
  128. package/lib/progress-ring/progress-ring.d.ts +7 -0
  129. package/lib/progress-ring/progress-ring.template.d.ts +4 -0
  130. package/lib/radio/index.d.ts +3 -0
  131. package/lib/radio/radio.d.ts +4 -0
  132. package/lib/radio/radio.template.d.ts +4 -0
  133. package/lib/radio-group/index.d.ts +10 -0
  134. package/lib/radio-group/radio-group.d.ts +4 -0
  135. package/lib/radio-group/radio-group.template.d.ts +4 -0
  136. package/lib/side-drawer/index.d.ts +2 -0
  137. package/lib/side-drawer/side-drawer.d.ts +9 -0
  138. package/lib/side-drawer/side-drawer.template.d.ts +4 -0
  139. package/lib/slider/index.d.ts +3 -0
  140. package/lib/slider/slider.d.ts +4 -0
  141. package/lib/slider/slider.template.d.ts +4 -0
  142. package/lib/switch/index.d.ts +4 -0
  143. package/lib/switch/switch.d.ts +7 -0
  144. package/lib/switch/switch.template.d.ts +4 -0
  145. package/lib/text-anchor/index.d.ts +2 -0
  146. package/lib/text-anchor/text-anchor.d.ts +7 -0
  147. package/lib/text-anchor/text-anchor.template.d.ts +4 -0
  148. package/lib/text-area/index.d.ts +4 -0
  149. package/lib/text-area/text-area.d.ts +9 -0
  150. package/lib/text-area/text-area.template.d.ts +4 -0
  151. package/lib/text-field/index.d.ts +4 -0
  152. package/lib/text-field/text-field.d.ts +14 -0
  153. package/lib/text-field/text-field.template.d.ts +5 -0
  154. package/lib/tooltip/index.d.ts +3 -0
  155. package/lib/tooltip/tooltip.d.ts +8 -0
  156. package/lib/tooltip/tooltip.template.d.ts +4 -0
  157. package/listbox/index.js +1090 -0
  158. package/listbox-option/index.js +22 -0
  159. package/menu/index.js +371 -0
  160. package/menu-item/index.js +21 -0
  161. package/nav/index.js +17 -0
  162. package/nav-disclosure/index.js +82 -0
  163. package/nav-item/index.js +46 -0
  164. package/note/index.js +59 -0
  165. package/number-field/index.js +461 -0
  166. package/package.json +65 -323
  167. package/popup/index.js +27 -0
  168. package/progress/index.js +97 -0
  169. package/progress-ring/index.js +76 -0
  170. package/radio/index.js +47 -0
  171. package/radio-group/index.js +435 -0
  172. package/shared/_has.js +58 -0
  173. package/shared/affix.js +24 -0
  174. package/shared/anchor.js +86 -0
  175. package/shared/apply-mixins.js +23 -0
  176. package/shared/aria-global.js +72 -0
  177. package/shared/aria.js +9 -0
  178. package/shared/base-progress.js +70 -0
  179. package/shared/breadcrumb-item.js +25 -0
  180. package/shared/button.js +200 -0
  181. package/shared/calendar-event.js +19 -0
  182. package/shared/class-names.js +15 -0
  183. package/shared/design-system/index.d.ts +3 -0
  184. package/shared/dialog-polyfill.esm.js +858 -0
  185. package/shared/direction.js +20 -0
  186. package/shared/dom.js +8 -0
  187. package/shared/enums.js +70 -0
  188. package/shared/es.object.assign.js +69 -0
  189. package/shared/es.regexp.to-string.js +59 -0
  190. package/shared/export.js +1017 -0
  191. package/shared/focus.js +5 -0
  192. package/shared/focus2.js +11 -0
  193. package/shared/form-associated.js +466 -0
  194. package/shared/form-elements.js +331 -0
  195. package/shared/icon.js +1361 -0
  196. package/shared/index.js +5027 -0
  197. package/shared/index2.js +107 -0
  198. package/shared/index3.js +31 -0
  199. package/shared/index4.js +77 -0
  200. package/shared/index5.js +261 -0
  201. package/shared/index6.js +1525 -0
  202. package/shared/index7.js +349 -0
  203. package/shared/iterators.js +61 -0
  204. package/shared/key-codes.js +97 -0
  205. package/shared/numbers.js +25 -0
  206. package/shared/object-keys.js +13 -0
  207. package/shared/patterns/affix.d.ts +9 -0
  208. package/shared/patterns/focus.d.ts +3 -0
  209. package/shared/patterns/form-elements/form-elements.d.ts +28 -0
  210. package/shared/patterns/form-elements/index.d.ts +1 -0
  211. package/shared/patterns/index.d.ts +3 -0
  212. package/shared/radio.js +127 -0
  213. package/shared/ref.js +41 -0
  214. package/shared/slotted.js +119 -0
  215. package/shared/start-end.js +50 -0
  216. package/shared/string-trim.js +40 -0
  217. package/shared/text-anchor.js +10 -0
  218. package/shared/text-anchor.template.js +55 -0
  219. package/shared/to-string.js +51 -0
  220. package/shared/web.dom-collections.iterator.js +472 -0
  221. package/shared/when.js +15 -0
  222. package/side-drawer/index.js +89 -0
  223. package/slider/index.js +596 -0
  224. package/styles/core/all.css +75 -0
  225. package/styles/core/theme.css +11 -0
  226. package/styles/core/typography.css +69 -0
  227. package/styles/fonts/SpeziaCompleteVariableItalicWeb.woff2 +0 -0
  228. package/styles/fonts/SpeziaCompleteVariableUprightWeb.woff2 +0 -0
  229. package/styles/fonts/SpeziaMonoCompleteVariableWeb.woff2 +0 -0
  230. package/styles/fonts/spezia.css +20 -0
  231. package/styles/tokens/theme-dark.css +230 -0
  232. package/styles/tokens/theme-light.css +230 -0
  233. package/switch/index.js +153 -0
  234. package/text-anchor/index.js +28 -0
  235. package/text-area/index.js +289 -0
  236. package/text-field/index.js +130 -0
  237. package/tooltip/index.js +65 -0
@@ -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 };
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,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 };
@@ -0,0 +1,69 @@
1
+ import { d as descriptors, f as functionUncurryThis, x as functionCall, e as fails$1, I as toObject$1, N as indexedObject, O as objectGetOwnPropertySymbols, P as objectPropertyIsEnumerable, _ as _export } from './export.js';
2
+ import { o as objectKeys$1 } from './object-keys.js';
3
+
4
+ var DESCRIPTORS = descriptors;
5
+ var uncurryThis = functionUncurryThis;
6
+ var call = functionCall;
7
+ var fails = fails$1;
8
+ var objectKeys = objectKeys$1;
9
+ var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
10
+ var propertyIsEnumerableModule = objectPropertyIsEnumerable;
11
+ var toObject = toObject$1;
12
+ var IndexedObject = indexedObject;
13
+
14
+ // eslint-disable-next-line es/no-object-assign -- safe
15
+ var $assign = Object.assign;
16
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
17
+ var defineProperty = Object.defineProperty;
18
+ var concat = uncurryThis([].concat);
19
+
20
+ // `Object.assign` method
21
+ // https://tc39.es/ecma262/#sec-object.assign
22
+ var objectAssign = !$assign || fails(function () {
23
+ // should have correct order of operations (Edge bug)
24
+ if (DESCRIPTORS && $assign({ b: 1 }, $assign(defineProperty({}, 'a', {
25
+ enumerable: true,
26
+ get: function () {
27
+ defineProperty(this, 'b', {
28
+ value: 3,
29
+ enumerable: false
30
+ });
31
+ }
32
+ }), { b: 2 })).b !== 1) return true;
33
+ // should work with symbols and should have deterministic property order (V8 bug)
34
+ var A = {};
35
+ var B = {};
36
+ // eslint-disable-next-line es/no-symbol -- safe
37
+ var symbol = Symbol();
38
+ var alphabet = 'abcdefghijklmnopqrst';
39
+ A[symbol] = 7;
40
+ alphabet.split('').forEach(function (chr) { B[chr] = chr; });
41
+ return $assign({}, A)[symbol] != 7 || objectKeys($assign({}, B)).join('') != alphabet;
42
+ }) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`
43
+ var T = toObject(target);
44
+ var argumentsLength = arguments.length;
45
+ var index = 1;
46
+ var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
47
+ var propertyIsEnumerable = propertyIsEnumerableModule.f;
48
+ while (argumentsLength > index) {
49
+ var S = IndexedObject(arguments[index++]);
50
+ var keys = getOwnPropertySymbols ? concat(objectKeys(S), getOwnPropertySymbols(S)) : objectKeys(S);
51
+ var length = keys.length;
52
+ var j = 0;
53
+ var key;
54
+ while (length > j) {
55
+ key = keys[j++];
56
+ if (!DESCRIPTORS || call(propertyIsEnumerable, S, key)) T[key] = S[key];
57
+ }
58
+ } return T;
59
+ } : $assign;
60
+
61
+ var $ = _export;
62
+ var assign = objectAssign;
63
+
64
+ // `Object.assign` method
65
+ // https://tc39.es/ecma262/#sec-object.assign
66
+ // eslint-disable-next-line es/no-object-assign -- required for testing
67
+ $({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }, {
68
+ assign: assign
69
+ });
@@ -0,0 +1,59 @@
1
+ import { j as anObject$2, x as functionCall, q as hasOwnProperty_1, b as objectIsPrototypeOf, C as functionName, v as defineBuiltIn$1, e as fails$1 } from './export.js';
2
+ import { t as toString } from './to-string.js';
3
+
4
+ var anObject$1 = anObject$2;
5
+
6
+ // `RegExp.prototype.flags` getter implementation
7
+ // https://tc39.es/ecma262/#sec-get-regexp.prototype.flags
8
+ var regexpFlags = function () {
9
+ var that = anObject$1(this);
10
+ var result = '';
11
+ if (that.hasIndices) result += 'd';
12
+ if (that.global) result += 'g';
13
+ if (that.ignoreCase) result += 'i';
14
+ if (that.multiline) result += 'm';
15
+ if (that.dotAll) result += 's';
16
+ if (that.unicode) result += 'u';
17
+ if (that.unicodeSets) result += 'v';
18
+ if (that.sticky) result += 'y';
19
+ return result;
20
+ };
21
+
22
+ var call = functionCall;
23
+ var hasOwn = hasOwnProperty_1;
24
+ var isPrototypeOf = objectIsPrototypeOf;
25
+ var regExpFlags = regexpFlags;
26
+
27
+ var RegExpPrototype$1 = RegExp.prototype;
28
+
29
+ var regexpGetFlags = function (R) {
30
+ var flags = R.flags;
31
+ return flags === undefined && !('flags' in RegExpPrototype$1) && !hasOwn(R, 'flags') && isPrototypeOf(RegExpPrototype$1, R)
32
+ ? call(regExpFlags, R) : flags;
33
+ };
34
+
35
+ var PROPER_FUNCTION_NAME = functionName.PROPER;
36
+ var defineBuiltIn = defineBuiltIn$1;
37
+ var anObject = anObject$2;
38
+ var $toString = toString;
39
+ var fails = fails$1;
40
+ var getRegExpFlags = regexpGetFlags;
41
+
42
+ var TO_STRING = 'toString';
43
+ var RegExpPrototype = RegExp.prototype;
44
+ var nativeToString = RegExpPrototype[TO_STRING];
45
+
46
+ var NOT_GENERIC = fails(function () { return nativeToString.call({ source: 'a', flags: 'b' }) != '/a/b'; });
47
+ // FF44- RegExp#toString has a wrong name
48
+ var INCORRECT_NAME = PROPER_FUNCTION_NAME && nativeToString.name != TO_STRING;
49
+
50
+ // `RegExp.prototype.toString` method
51
+ // https://tc39.es/ecma262/#sec-regexp.prototype.tostring
52
+ if (NOT_GENERIC || INCORRECT_NAME) {
53
+ defineBuiltIn(RegExp.prototype, TO_STRING, function toString() {
54
+ var R = anObject(this);
55
+ var pattern = $toString(R.source);
56
+ var flags = $toString(getRegExpFlags(R));
57
+ return '/' + pattern + '/' + flags;
58
+ }, { unsafe: true });
59
+ }