@vonage/vivid 3.47.0 → 3.49.0-preview.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 (216) hide show
  1. package/README.md +3 -403
  2. package/accordion/index.cjs +21 -0
  3. package/accordion-item/index.cjs +18 -0
  4. package/action-group/index.cjs +7 -0
  5. package/alert/index.cjs +30 -0
  6. package/alert/index.js +0 -1
  7. package/appearance-ui/index.cjs +96 -0
  8. package/audio-player/index.cjs +34 -0
  9. package/audio-player/index.js +0 -1
  10. package/avatar/index.cjs +11 -0
  11. package/badge/index.cjs +14 -0
  12. package/banner/index.cjs +29 -0
  13. package/banner/index.js +0 -1
  14. package/breadcrumb/index.cjs +13 -0
  15. package/breadcrumb-item/index.cjs +22 -0
  16. package/button/index.cjs +25 -0
  17. package/button/index.js +0 -1
  18. package/calendar/index.cjs +9 -0
  19. package/calendar-event/index.cjs +9 -0
  20. package/card/index.cjs +14 -0
  21. package/checkbox/index.cjs +21 -0
  22. package/combobox/index.cjs +39 -0
  23. package/combobox/index.js +1 -1
  24. package/custom-elements.json +30 -35
  25. package/data-grid/index.cjs +18 -0
  26. package/date-picker/index.cjs +40 -0
  27. package/date-picker/index.js +1 -1
  28. package/date-range-picker/index.cjs +40 -0
  29. package/date-range-picker/index.js +1 -1
  30. package/dialog/index.cjs +31 -0
  31. package/dialog/index.js +1 -1
  32. package/divider/index.cjs +8 -0
  33. package/elevation/index.cjs +7 -0
  34. package/empty-state/index.cjs +12 -0
  35. package/fab/index.cjs +22 -0
  36. package/file-picker/index.cjs +30 -0
  37. package/file-picker/index.js +1 -1
  38. package/focus/index.cjs +7 -0
  39. package/header/index.cjs +8 -0
  40. package/icon/index.cjs +10 -0
  41. package/index.cjs +296 -0
  42. package/index.js +1 -1
  43. package/layout/index.cjs +7 -0
  44. package/lib/menu-item/menu-item.d.ts +1 -0
  45. package/lib/tabs/tabs.d.ts +1 -0
  46. package/listbox/index.cjs +77 -0
  47. package/locales/en-GB.cjs +106 -0
  48. package/locales/en-US.cjs +106 -0
  49. package/locales/ja-JP.cjs +106 -0
  50. package/locales/zh-CN.cjs +106 -0
  51. package/menu/index.cjs +32 -0
  52. package/menu/index.js +0 -1
  53. package/menu-item/index.cjs +22 -0
  54. package/menu-item/index.js +0 -1
  55. package/nav/index.cjs +6 -0
  56. package/nav-disclosure/index.cjs +17 -0
  57. package/nav-disclosure/index.js +0 -1
  58. package/nav-item/index.cjs +22 -0
  59. package/note/index.cjs +16 -0
  60. package/number-field/index.cjs +33 -0
  61. package/number-field/index.js +1 -1
  62. package/option/index.cjs +23 -0
  63. package/package.json +20 -2
  64. package/pagination/index.cjs +28 -0
  65. package/pagination/index.js +0 -1
  66. package/popup/index.cjs +27 -0
  67. package/popup/index.js +0 -1
  68. package/progress/index.cjs +9 -0
  69. package/progress-ring/index.cjs +9 -0
  70. package/radio/index.cjs +14 -0
  71. package/radio-group/index.cjs +14 -0
  72. package/select/index.cjs +38 -0
  73. package/select/index.js +1 -1
  74. package/selectable-box/index.cjs +25 -0
  75. package/shared/Reflector.cjs +67 -0
  76. package/shared/_has.cjs +62 -0
  77. package/shared/affix.cjs +64 -0
  78. package/shared/affix.js +8 -4
  79. package/shared/anchor.cjs +90 -0
  80. package/shared/anchored.cjs +78 -0
  81. package/shared/apply-mixins.cjs +25 -0
  82. package/shared/aria-global.cjs +74 -0
  83. package/shared/aria.cjs +11 -0
  84. package/shared/aria2.cjs +11 -0
  85. package/shared/base-progress.cjs +72 -0
  86. package/shared/breadcrumb-item.cjs +27 -0
  87. package/shared/button.cjs +202 -0
  88. package/shared/calendar-event.cjs +41 -0
  89. package/shared/children.cjs +61 -0
  90. package/shared/class-names.cjs +17 -0
  91. package/shared/definition.cjs +165 -0
  92. package/shared/definition10.cjs +102 -0
  93. package/shared/definition11.cjs +164 -0
  94. package/shared/definition11.js +39 -42
  95. package/shared/definition12.cjs +50 -0
  96. package/shared/definition13.cjs +779 -0
  97. package/shared/definition14.cjs +157 -0
  98. package/shared/definition15.cjs +249 -0
  99. package/shared/definition16.cjs +746 -0
  100. package/shared/definition17.cjs +1372 -0
  101. package/shared/definition18.cjs +175 -0
  102. package/shared/definition19.cjs +416 -0
  103. package/shared/definition2.cjs +232 -0
  104. package/shared/definition20.cjs +278 -0
  105. package/shared/definition21.cjs +83 -0
  106. package/shared/definition22.cjs +74 -0
  107. package/shared/definition23.cjs +106 -0
  108. package/shared/definition24.cjs +2392 -0
  109. package/shared/definition25.cjs +75 -0
  110. package/shared/definition26.cjs +39 -0
  111. package/shared/definition27.cjs +66 -0
  112. package/shared/definition28.cjs +849 -0
  113. package/shared/definition28.js +5 -4
  114. package/shared/definition29.cjs +72 -0
  115. package/shared/definition29.js +1 -1
  116. package/shared/definition3.cjs +72 -0
  117. package/shared/definition30.cjs +98 -0
  118. package/shared/definition30.js +1 -4
  119. package/shared/definition31.cjs +37 -0
  120. package/shared/definition32.cjs +24 -0
  121. package/shared/definition33.cjs +64 -0
  122. package/shared/definition34.cjs +533 -0
  123. package/shared/definition35.cjs +295 -0
  124. package/shared/definition36.cjs +219 -0
  125. package/shared/definition37.cjs +109 -0
  126. package/shared/definition38.cjs +92 -0
  127. package/shared/definition39.cjs +448 -0
  128. package/shared/definition4.cjs +198 -0
  129. package/shared/definition40.cjs +49 -0
  130. package/shared/definition41.cjs +694 -0
  131. package/shared/definition41.js +1 -6
  132. package/shared/definition42.cjs +152 -0
  133. package/shared/definition43.cjs +113 -0
  134. package/shared/definition44.cjs +607 -0
  135. package/shared/definition45.cjs +152 -0
  136. package/shared/definition45.js +1 -6
  137. package/shared/definition46.cjs +166 -0
  138. package/shared/definition46.js +2 -7
  139. package/shared/definition47.cjs +35 -0
  140. package/shared/definition48.cjs +98 -0
  141. package/shared/definition49.cjs +543 -0
  142. package/shared/definition49.js +12 -3
  143. package/shared/definition5.cjs +199 -0
  144. package/shared/definition50.cjs +52 -0
  145. package/shared/definition51.cjs +150 -0
  146. package/shared/definition52.cjs +304 -0
  147. package/shared/definition53.cjs +309 -0
  148. package/shared/definition54.cjs +146 -0
  149. package/shared/definition55.cjs +128 -0
  150. package/shared/definition56.cjs +99 -0
  151. package/shared/definition57.cjs +310 -0
  152. package/shared/definition58.cjs +20 -0
  153. package/shared/definition59.cjs +51 -0
  154. package/shared/definition6.cjs +83 -0
  155. package/shared/definition60.cjs +1810 -0
  156. package/shared/definition7.cjs +72 -0
  157. package/shared/definition8.cjs +152 -0
  158. package/shared/definition9.cjs +69 -0
  159. package/shared/dialog-polyfill.esm.cjs +862 -0
  160. package/shared/direction.cjs +22 -0
  161. package/shared/dom.cjs +23 -0
  162. package/shared/enums.cjs +87 -0
  163. package/shared/focus.cjs +8 -0
  164. package/shared/focus2.cjs +11 -0
  165. package/shared/form-associated.cjs +470 -0
  166. package/shared/icon.cjs +237 -0
  167. package/shared/index.cjs +5061 -0
  168. package/shared/index2.cjs +231 -0
  169. package/shared/key-codes.cjs +115 -0
  170. package/shared/key-codes2.cjs +14 -0
  171. package/shared/listbox.cjs +1072 -0
  172. package/shared/localized.cjs +11 -0
  173. package/shared/numbers.cjs +38 -0
  174. package/shared/patterns/affix.d.ts +5 -1
  175. package/shared/presentationDate.cjs +6192 -0
  176. package/shared/presentationDate.js +1 -6
  177. package/shared/radio.cjs +153 -0
  178. package/shared/ref.cjs +43 -0
  179. package/shared/repeat.cjs +767 -0
  180. package/shared/select.options.cjs +12 -0
  181. package/shared/slotted.cjs +123 -0
  182. package/shared/start-end.cjs +52 -0
  183. package/shared/strings.cjs +11 -0
  184. package/shared/text-anchor.cjs +33 -0
  185. package/shared/text-anchor.template.cjs +48 -0
  186. package/shared/text-field.cjs +5 -0
  187. package/shared/text-field2.cjs +228 -0
  188. package/shared/tree-item.cjs +154 -0
  189. package/shared/when.cjs +31 -0
  190. package/side-drawer/index.cjs +8 -0
  191. package/slider/index.cjs +16 -0
  192. package/split-button/index.cjs +20 -0
  193. package/split-button/index.js +0 -1
  194. package/style.css +1 -1
  195. package/styles/core/all.css +1 -1
  196. package/styles/core/theme.css +1 -1
  197. package/styles/core/typography.css +1 -1
  198. package/styles/tokens/theme-dark.css +4 -4
  199. package/styles/tokens/theme-light.css +4 -4
  200. package/styles/tokens/vivid-2-compat.css +1 -1
  201. package/switch/index.cjs +15 -0
  202. package/switch/index.js +0 -5
  203. package/tab/index.cjs +17 -0
  204. package/tab-panel/index.cjs +6 -0
  205. package/tabs/index.cjs +24 -0
  206. package/tag/index.cjs +17 -0
  207. package/tag-group/index.cjs +7 -0
  208. package/text-anchor/index.cjs +24 -0
  209. package/text-area/index.cjs +25 -0
  210. package/text-field/index.cjs +27 -0
  211. package/toggletip/index.cjs +29 -0
  212. package/toggletip/index.js +0 -1
  213. package/tooltip/index.cjs +29 -0
  214. package/tooltip/index.js +0 -1
  215. package/tree-item/index.cjs +22 -0
  216. package/tree-view/index.cjs +14 -0
@@ -0,0 +1,20 @@
1
+ 'use strict';
2
+
3
+ const index = require('./index.cjs');
4
+ const focus = require('./focus.cjs');
5
+
6
+ const styles = ":host{display:contents;border-radius:inherit}.control{position:absolute;z-index:1;box-sizing:border-box;border-radius:inherit;box-shadow:inset 0 0 0 3px var(--focus-stroke-gap-color, currentColor);inset:var(--focus-inset, 0);outline:2px solid var(--focus-stroke-color, var(--vvd-color-canvas-text));outline-offset:-2px}\n";
7
+
8
+ const focusTemplate = () => index.html`
9
+ <span class="control"></span>`;
10
+
11
+ const focusDefinition = focus.Focus.compose({
12
+ baseName: "focus",
13
+ template: focusTemplate,
14
+ styles
15
+ });
16
+ const focusRegistries = [focusDefinition()];
17
+ const registerFocus = index.registerFactory(focusRegistries);
18
+
19
+ exports.focusRegistries = focusRegistries;
20
+ exports.registerFocus = registerFocus;
@@ -0,0 +1,51 @@
1
+ 'use strict';
2
+
3
+ const index = require('./index.cjs');
4
+ const classNames = require('./class-names.cjs');
5
+
6
+ var __defProp = Object.defineProperty;
7
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
8
+ var __decorateClass = (decorators, target, key, kind) => {
9
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
10
+ for (var i = decorators.length - 1, decorator; i >= 0; i--)
11
+ if (decorator = decorators[i])
12
+ result = (kind ? decorator(target, key, result) : decorator(result)) || result;
13
+ if (kind && result)
14
+ __defProp(target, key, result);
15
+ return result;
16
+ };
17
+ class Elevation extends index.FoundationElement {
18
+ }
19
+ __decorateClass([
20
+ index.attr
21
+ ], Elevation.prototype, "dp", 2);
22
+ __decorateClass([
23
+ index.attr({ attribute: "no-shadow", mode: "boolean" })
24
+ ], Elevation.prototype, "noShadow", 2);
25
+
26
+ const styles = ":host{display:contents}.control{display:contents}.control.dp-0{--_elevation-fill: var(--vvd-color-surface-0dp);--_elevation-shadow: var(--vvd-shadow-surface-0dp)}.control.dp-4{--_elevation-fill: var(--vvd-color-surface-4dp);--_elevation-shadow: var(--vvd-shadow-surface-4dp)}.control.dp-8{--_elevation-fill: var(--vvd-color-surface-8dp);--_elevation-shadow: var(--vvd-shadow-surface-8dp)}.control.dp-12{--_elevation-fill: var(--vvd-color-surface-12dp);--_elevation-shadow: var(--vvd-shadow-surface-12dp)}.control.dp-16{--_elevation-fill: var(--vvd-color-surface-16dp);--_elevation-shadow: var(--vvd-shadow-surface-16dp)}.control.dp-24{--_elevation-fill: var(--vvd-color-surface-24dp);--_elevation-shadow: var(--vvd-shadow-surface-24dp)}.control:not(.dp-0,.dp-4,.dp-8,.dp-12,.dp-16,.dp-24){--_elevation-fill: var(--vvd-color-surface-2dp);--_elevation-shadow: var(--vvd-shadow-surface-2dp)}.control ::slotted(*){position:relative;isolation:isolate}.control ::slotted(*):before{position:absolute;z-index:-1;background:var(--_elevation-fill);block-size:100%;border-radius:inherit;content:\"\";filter:var(--_elevation-shadow);inline-size:100%;inset-block-start:0;inset-inline-start:0;transition:background-color .15s linear,filter .15s linear}.control.no-shadow ::slotted(*):before{filter:none}\n";
27
+
28
+ const getClasses = ({
29
+ dp,
30
+ noShadow
31
+ }) => classNames.classNames(
32
+ "control",
33
+ [`dp-${dp}`, Boolean(dp)],
34
+ ["no-shadow", Boolean(noShadow)]
35
+ );
36
+ const elevationTemplate = () => index.html`
37
+ <div class="${getClasses}" part="base">
38
+ <slot></slot>
39
+ </div>`;
40
+
41
+ const elevationDefinition = Elevation.compose({
42
+ baseName: "elevation",
43
+ template: elevationTemplate,
44
+ styles
45
+ });
46
+ const elevationRegistries = [elevationDefinition()];
47
+ const registerElevation = index.registerFactory(elevationRegistries);
48
+
49
+ exports.Elevation = Elevation;
50
+ exports.elevationRegistries = elevationRegistries;
51
+ exports.registerElevation = registerElevation;
@@ -0,0 +1,83 @@
1
+ 'use strict';
2
+
3
+ const index = require('./index.cjs');
4
+ const definition = require('./definition26.cjs');
5
+ const icon = require('./icon.cjs');
6
+ const when = require('./when.cjs');
7
+ const classNames = require('./class-names.cjs');
8
+
9
+ const styles = ".base{display:inline-flex;overflow:hidden;align-items:center;justify-content:center;background-color:var(--_appearance-color-fill);block-size:var(--_size);border-radius:var(--_avatar-border-radius);box-shadow:inset 0 0 0 1px var(--_appearance-color-outline);color:var(--_appearance-color-text);inline-size:var(--_size);vertical-align:middle}.base.connotation-cta{--_connotation-color-primary: var(--vvd-avatar-cta-primary, var(--vvd-color-cta-500));--_connotation-color-primary-text: var(--vvd-avatar-cta-primary-text, var(--vvd-color-canvas));--_connotation-color-firm: var(--vvd-avatar-cta-firm, var(--vvd-color-cta-600));--_connotation-color-fierce: var(--vvd-avatar-cta-fierce, var(--vvd-color-cta-700));--_connotation-color-pale: var(--vvd-avatar-cta-pale, var(--vvd-color-cta-300));--_connotation-color-soft: var(--vvd-avatar-cta-soft, var(--vvd-color-cta-100));--_connotation-color-contrast: var(--vvd-avatar-cta-contrast, var(--vvd-color-cta-800))}.base:not(.connotation-cta){--_connotation-color-primary: var(--vvd-avatar-accent-primary, var(--vvd-color-canvas-text));--_connotation-color-primary-text: var(--vvd-avatar-accent-primary-text, var(--vvd-color-canvas));--_connotation-color-firm: var(--vvd-avatar-accent-firm, var(--vvd-color-canvas-text));--_connotation-color-fierce: var(--vvd-avatar-accent-fierce, var(--vvd-color-neutral-700));--_connotation-color-pale: var(--vvd-avatar-accent-pale, var(--vvd-color-neutral-300));--_connotation-color-soft: var(--vvd-avatar-accent-soft, var(--vvd-color-neutral-100));--_connotation-color-contrast: var(--vvd-avatar-accent-contrast, var(--vvd-color-neutral-800))}.base{--_appearance-color-text: var(--_connotation-color-primary-text);--_appearance-color-fill: var(--_connotation-color-primary);--_appearance-color-outline: transparent}.base.appearance-outlined{--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: transparent;--_appearance-color-outline: var(--_connotation-color-firm)}.base.appearance-duotone{--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: transparent;--_appearance-color-outline: var(--_connotation-color-pale)}.base.appearance-subtle{--_appearance-color-text: var(--_connotation-color-contrast);--_appearance-color-fill: var(--_connotation-color-soft);--_appearance-color-outline: transparent}.base.size-condensed{--_size:calc(1px*(32 + 4*clamp(-1, var(--vvd-size-density, 0), 2)))}.base.size-condensed .initials{font:var(--vvd-typography-base-condensed-bold)}.base.size-condensed .icon{font-size:calc(1px*(32 + 4*clamp(-1,var(--vvd-size-density, 0),2))/2);line-height:1}.base.size-expanded{--_size:calc(1px*(48 + 4*clamp(-1, var(--vvd-size-density, 0), 2)))}.base.size-expanded .initials{font:var(--vvd-typography-heading-4)}.base.size-expanded .icon{font-size:calc(1px*(48 + 4*clamp(-1,var(--vvd-size-density, 0),2))/2);line-height:1}.base:not(.size-condensed,.size-expanded){--_size:calc(1px*(40 + 4*clamp(-1, var(--vvd-size-density, 0), 2)))}.base:not(.size-condensed,.size-expanded) .initials{font:var(--vvd-typography-base-extended-bold)}.base:not(.size-condensed,.size-expanded) .icon{font-size:calc(1px*(40 + 4*clamp(-1,var(--vvd-size-density, 0),2))/2);line-height:1}.base:not(.shape-pill){--_avatar-border-radius: 8px}.base:not(.shape-pill).size-condensed{--_avatar-border-radius: 4px}.base.shape-pill{--_avatar-border-radius: 50%}.base .initials{text-transform:uppercase}.base ::slotted(*){block-size:100%;inline-size:100%;object-fit:cover}\n";
10
+
11
+ var __defProp = Object.defineProperty;
12
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
13
+ var __decorateClass = (decorators, target, key, kind) => {
14
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
15
+ for (var i = decorators.length - 1, decorator; i >= 0; i--)
16
+ if (decorator = decorators[i])
17
+ result = (kind ? decorator(target, key, result) : decorator(result)) || result;
18
+ if (kind && result)
19
+ __defProp(target, key, result);
20
+ return result;
21
+ };
22
+ class Avatar extends index.FoundationElement {
23
+ }
24
+ __decorateClass([
25
+ index.attr
26
+ ], Avatar.prototype, "connotation", 2);
27
+ __decorateClass([
28
+ index.attr
29
+ ], Avatar.prototype, "shape", 2);
30
+ __decorateClass([
31
+ index.attr
32
+ ], Avatar.prototype, "appearance", 2);
33
+ __decorateClass([
34
+ index.attr
35
+ ], Avatar.prototype, "size", 2);
36
+ __decorateClass([
37
+ index.attr
38
+ ], Avatar.prototype, "icon", 2);
39
+ __decorateClass([
40
+ index.attr
41
+ ], Avatar.prototype, "initials", 2);
42
+
43
+ const getClasses = ({ appearance, connotation, shape, size }) => classNames.classNames(
44
+ "base",
45
+ [`connotation-${connotation}`, Boolean(connotation)],
46
+ [`appearance-${appearance}`, Boolean(appearance)],
47
+ [`shape-${shape}`, Boolean(shape)],
48
+ [`size-${size}`, Boolean(size)]
49
+ );
50
+ function renderIcon(iconTag) {
51
+ return index.html`
52
+ <span class="icon">
53
+ <${iconTag} name="${(x) => x.icon ? `${x.icon}` : "user-line"}"></${iconTag}>
54
+ </span>
55
+ `;
56
+ }
57
+ function renderInitials() {
58
+ return index.html`
59
+ <span class="initials">${({ initials }) => initials.substring(0, 2)}</span>
60
+ `;
61
+ }
62
+ const AvatarTemplate = (context) => {
63
+ const iconTag = context.tagFor(icon.Icon);
64
+ return index.html`
65
+ <span class="${getClasses}">
66
+ <slot name="graphic">
67
+ ${when.when((x) => x.initials, renderInitials())}
68
+ ${when.when((x) => !x.initials, renderIcon(iconTag))}
69
+ </slot>
70
+ </span>`;
71
+ };
72
+
73
+ const avatarDefinition = Avatar.compose({
74
+ baseName: "avatar",
75
+ template: AvatarTemplate,
76
+ styles
77
+ });
78
+ const avatarRegistries = [avatarDefinition(), ...definition.iconRegistries];
79
+ const registerAvatar = index.registerFactory(avatarRegistries);
80
+
81
+ exports.avatarDefinition = avatarDefinition;
82
+ exports.avatarRegistries = avatarRegistries;
83
+ exports.registerAvatar = registerAvatar;