@vonage/vivid 3.53.0 → 3.55.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 (311) hide show
  1. package/accordion/index.cjs +0 -14
  2. package/accordion/index.js +0 -14
  3. package/accordion-item/index.cjs +0 -11
  4. package/accordion-item/index.js +0 -11
  5. package/action-group/index.cjs +0 -2
  6. package/action-group/index.js +0 -2
  7. package/alert/index.cjs +0 -23
  8. package/alert/index.js +0 -23
  9. package/appearance-ui/index.cjs +11 -12
  10. package/appearance-ui/index.js +11 -12
  11. package/audio-player/index.cjs +0 -28
  12. package/audio-player/index.js +0 -28
  13. package/avatar/index.cjs +0 -6
  14. package/avatar/index.js +0 -6
  15. package/badge/index.cjs +0 -9
  16. package/badge/index.js +0 -9
  17. package/banner/index.cjs +0 -22
  18. package/banner/index.js +0 -22
  19. package/breadcrumb/index.cjs +0 -8
  20. package/breadcrumb/index.js +0 -8
  21. package/breadcrumb-item/index.cjs +0 -15
  22. package/breadcrumb-item/index.js +0 -15
  23. package/button/index.cjs +0 -18
  24. package/button/index.js +0 -18
  25. package/calendar/index.cjs +0 -4
  26. package/calendar/index.js +0 -4
  27. package/calendar-event/index.cjs +0 -4
  28. package/calendar-event/index.js +0 -4
  29. package/card/index.cjs +0 -9
  30. package/card/index.js +0 -9
  31. package/checkbox/index.cjs +0 -14
  32. package/checkbox/index.js +0 -14
  33. package/combobox/index.cjs +0 -31
  34. package/combobox/index.js +0 -31
  35. package/custom-elements.json +396 -55
  36. package/data-grid/index.cjs +0 -11
  37. package/data-grid/index.js +0 -11
  38. package/date-picker/index.cjs +0 -34
  39. package/date-picker/index.js +0 -34
  40. package/date-range-picker/index.cjs +0 -34
  41. package/date-range-picker/index.js +0 -34
  42. package/dial-pad/index.cjs +0 -28
  43. package/dial-pad/index.js +0 -28
  44. package/dialog/index.cjs +0 -23
  45. package/dialog/index.js +0 -23
  46. package/divider/index.cjs +0 -3
  47. package/divider/index.js +0 -3
  48. package/elevation/index.cjs +0 -2
  49. package/elevation/index.js +0 -2
  50. package/empty-state/index.cjs +0 -7
  51. package/empty-state/index.js +0 -7
  52. package/fab/index.cjs +0 -15
  53. package/fab/index.js +0 -15
  54. package/file-picker/index.cjs +0 -23
  55. package/file-picker/index.js +0 -23
  56. package/header/index.cjs +0 -3
  57. package/header/index.js +0 -3
  58. package/icon/index.cjs +0 -5
  59. package/icon/index.js +0 -5
  60. package/index.cjs +0 -44
  61. package/index.js +0 -44
  62. package/layout/index.cjs +0 -2
  63. package/layout/index.js +0 -2
  64. package/lib/appearance-ui/appearance-ui.d.ts +1 -1
  65. package/lib/audio-player/audio-player.d.ts +4 -0
  66. package/lib/audio-player/locale.d.ts +2 -0
  67. package/lib/combobox/combobox.d.ts +1 -0
  68. package/lib/dial-pad/dial-pad.d.ts +4 -0
  69. package/lib/enums.d.ts +1 -0
  70. package/lib/menu/menu.d.ts +2 -3
  71. package/lib/nav-disclosure/nav-disclosure.d.ts +5 -0
  72. package/lib/text-anchor/text-anchor.d.ts +1 -1
  73. package/lib/video-player/vivid-video-svg.d.ts +1 -0
  74. package/listbox/index.cjs +1 -15
  75. package/listbox/index.js +1 -15
  76. package/locales/en-GB.cjs +3 -1
  77. package/locales/en-GB.js +3 -1
  78. package/locales/en-US.cjs +3 -1
  79. package/locales/en-US.js +3 -1
  80. package/locales/ja-JP.cjs +3 -1
  81. package/locales/ja-JP.js +3 -1
  82. package/locales/zh-CN.cjs +3 -1
  83. package/locales/zh-CN.js +3 -1
  84. package/menu/index.cjs +0 -25
  85. package/menu/index.js +0 -25
  86. package/menu-item/index.cjs +0 -15
  87. package/menu-item/index.js +0 -15
  88. package/nav/index.cjs +0 -1
  89. package/nav/index.js +0 -1
  90. package/nav-disclosure/index.cjs +0 -10
  91. package/nav-disclosure/index.js +0 -10
  92. package/nav-item/index.cjs +0 -15
  93. package/nav-item/index.js +0 -15
  94. package/note/index.cjs +0 -11
  95. package/note/index.js +0 -11
  96. package/number-field/index.cjs +0 -26
  97. package/number-field/index.js +0 -26
  98. package/option/index.cjs +0 -13
  99. package/option/index.js +0 -13
  100. package/package.json +1 -1
  101. package/pagination/index.cjs +0 -21
  102. package/pagination/index.js +0 -21
  103. package/popup/index.cjs +0 -20
  104. package/popup/index.js +0 -20
  105. package/progress/index.cjs +0 -4
  106. package/progress/index.js +0 -4
  107. package/progress-ring/index.cjs +0 -4
  108. package/progress-ring/index.js +0 -4
  109. package/radio/index.cjs +0 -6
  110. package/radio/index.js +0 -6
  111. package/radio-group/index.cjs +0 -9
  112. package/radio-group/index.js +0 -9
  113. package/range-slider/index.cjs +0 -17
  114. package/range-slider/index.js +0 -17
  115. package/select/index.cjs +0 -31
  116. package/select/index.js +0 -31
  117. package/selectable-box/index.cjs +0 -18
  118. package/selectable-box/index.js +0 -18
  119. package/shared/affix.cjs +6 -7
  120. package/shared/affix.js +6 -7
  121. package/shared/anchored.cjs +39 -46
  122. package/shared/anchored.js +39 -46
  123. package/shared/calendar-event.cjs +10 -11
  124. package/shared/calendar-event.js +10 -11
  125. package/shared/definition.cjs +8 -9
  126. package/shared/definition.js +8 -9
  127. package/shared/definition10.cjs +1 -1
  128. package/shared/definition10.js +1 -1
  129. package/shared/definition11.cjs +20 -21
  130. package/shared/definition11.js +20 -21
  131. package/shared/definition12.cjs +1 -1
  132. package/shared/definition12.js +1 -1
  133. package/shared/definition13.cjs +9 -14
  134. package/shared/definition13.js +9 -14
  135. package/shared/definition14.cjs +13 -14
  136. package/shared/definition14.js +13 -14
  137. package/shared/definition15.cjs +1 -1
  138. package/shared/definition15.js +1 -1
  139. package/shared/definition16.cjs +16 -3
  140. package/shared/definition16.js +16 -3
  141. package/shared/definition17.cjs +155 -166
  142. package/shared/definition17.js +155 -166
  143. package/shared/definition19.cjs +2 -2
  144. package/shared/definition19.js +2 -2
  145. package/shared/definition2.cjs +1 -1
  146. package/shared/definition2.js +1 -1
  147. package/shared/definition20.cjs +34 -18
  148. package/shared/definition20.js +34 -18
  149. package/shared/definition21.cjs +17 -18
  150. package/shared/definition21.js +17 -18
  151. package/shared/definition22.cjs +2 -2
  152. package/shared/definition22.js +2 -2
  153. package/shared/definition23.cjs +7 -8
  154. package/shared/definition23.js +7 -8
  155. package/shared/definition24.cjs +7 -8
  156. package/shared/definition24.js +7 -8
  157. package/shared/definition25.cjs +2 -2
  158. package/shared/definition25.js +2 -2
  159. package/shared/definition26.cjs +6 -7
  160. package/shared/definition26.js +6 -7
  161. package/shared/definition27.cjs +3 -3
  162. package/shared/definition27.js +3 -3
  163. package/shared/definition28.cjs +9 -10
  164. package/shared/definition28.js +9 -10
  165. package/shared/definition29.cjs +60 -57
  166. package/shared/definition29.js +60 -57
  167. package/shared/definition3.cjs +9 -10
  168. package/shared/definition3.js +9 -10
  169. package/shared/definition30.cjs +4 -2
  170. package/shared/definition30.js +4 -2
  171. package/shared/definition31.cjs +20 -9
  172. package/shared/definition31.js +20 -9
  173. package/shared/definition32.cjs +1 -1
  174. package/shared/definition32.js +1 -1
  175. package/shared/definition33.cjs +1 -1
  176. package/shared/definition33.js +1 -1
  177. package/shared/definition34.cjs +6 -7
  178. package/shared/definition34.js +6 -7
  179. package/shared/definition35.cjs +1 -1
  180. package/shared/definition35.js +1 -1
  181. package/shared/definition36.cjs +6 -7
  182. package/shared/definition36.js +6 -7
  183. package/shared/definition37.cjs +1 -1
  184. package/shared/definition37.js +1 -1
  185. package/shared/definition38.cjs +7 -8
  186. package/shared/definition38.js +7 -8
  187. package/shared/definition39.cjs +8 -9
  188. package/shared/definition39.js +8 -9
  189. package/shared/definition4.cjs +14 -15
  190. package/shared/definition4.js +14 -15
  191. package/shared/definition40.cjs +7 -8
  192. package/shared/definition40.js +7 -8
  193. package/shared/definition41.cjs +1 -1
  194. package/shared/definition41.js +1 -1
  195. package/shared/definition42.cjs +3 -3
  196. package/shared/definition42.js +3 -3
  197. package/shared/definition43.cjs +1 -1
  198. package/shared/definition43.js +1 -1
  199. package/shared/definition44.cjs +11 -12
  200. package/shared/definition44.js +11 -12
  201. package/shared/definition45.cjs +8 -9
  202. package/shared/definition45.js +8 -9
  203. package/shared/definition46.cjs +9 -10
  204. package/shared/definition46.js +9 -10
  205. package/shared/definition47.cjs +15 -16
  206. package/shared/definition47.js +15 -16
  207. package/shared/definition48.cjs +6 -7
  208. package/shared/definition48.js +6 -7
  209. package/shared/definition5.cjs +113 -33
  210. package/shared/definition5.js +113 -33
  211. package/shared/definition50.cjs +9 -10
  212. package/shared/definition50.js +9 -10
  213. package/shared/definition51.cjs +8 -9
  214. package/shared/definition51.js +8 -9
  215. package/shared/definition52.cjs +5 -6
  216. package/shared/definition52.js +5 -6
  217. package/shared/definition53.cjs +12 -13
  218. package/shared/definition53.js +12 -13
  219. package/shared/definition54.cjs +2 -2
  220. package/shared/definition54.js +2 -2
  221. package/shared/definition55.cjs +121 -63
  222. package/shared/definition55.js +121 -63
  223. package/shared/definition56.cjs +1 -1
  224. package/shared/definition56.js +1 -1
  225. package/shared/definition57.cjs +1 -1
  226. package/shared/definition57.js +1 -1
  227. package/shared/definition58.cjs +1 -1
  228. package/shared/definition58.js +1 -1
  229. package/shared/definition59.cjs +5 -6
  230. package/shared/definition59.js +5 -6
  231. package/shared/definition6.cjs +10 -11
  232. package/shared/definition6.js +10 -11
  233. package/shared/definition60.cjs +1 -1
  234. package/shared/definition60.js +1 -1
  235. package/shared/definition61.cjs +317 -15
  236. package/shared/definition61.js +317 -15
  237. package/shared/definition62.cjs +6 -7
  238. package/shared/definition62.js +6 -7
  239. package/shared/definition63.cjs +11 -15
  240. package/shared/definition63.js +11 -15
  241. package/shared/definition7.cjs +8 -9
  242. package/shared/definition7.js +8 -9
  243. package/shared/definition8.cjs +13 -14
  244. package/shared/definition8.js +13 -14
  245. package/shared/definition9.cjs +5 -6
  246. package/shared/definition9.js +5 -6
  247. package/shared/enums.cjs +1 -0
  248. package/shared/enums.js +1 -0
  249. package/shared/icon.cjs +23 -9
  250. package/shared/icon.js +24 -10
  251. package/shared/index.cjs +38 -19
  252. package/shared/index.js +38 -19
  253. package/shared/index2.cjs +30 -26
  254. package/shared/index2.js +30 -26
  255. package/shared/listbox.cjs +6 -7
  256. package/shared/listbox.js +6 -7
  257. package/shared/presentationDate.cjs +40 -50
  258. package/shared/presentationDate.js +40 -50
  259. package/shared/radio.cjs +6 -7
  260. package/shared/radio.js +6 -7
  261. package/shared/slider.template.cjs +1 -1
  262. package/shared/slider.template.js +1 -1
  263. package/shared/text-anchor.cjs +6 -7
  264. package/shared/text-anchor.js +6 -7
  265. package/shared/text-field.cjs +1 -1
  266. package/shared/text-field.js +1 -1
  267. package/shared/utils/numberConverter.d.ts +2 -0
  268. package/side-drawer/index.cjs +0 -3
  269. package/side-drawer/index.js +0 -3
  270. package/slider/index.cjs +0 -10
  271. package/slider/index.js +0 -10
  272. package/split-button/index.cjs +0 -13
  273. package/split-button/index.js +0 -13
  274. package/styles/core/all.css +1 -1
  275. package/styles/core/theme.css +1 -1
  276. package/styles/core/typography.css +1 -1
  277. package/styles/tokens/theme-dark.css +4 -4
  278. package/styles/tokens/theme-light.css +4 -4
  279. package/styles/tokens/vivid-2-compat.css +1 -1
  280. package/switch/index.cjs +0 -8
  281. package/switch/index.js +0 -8
  282. package/tab/index.cjs +0 -9
  283. package/tab/index.js +0 -9
  284. package/tab-panel/index.cjs +0 -1
  285. package/tab-panel/index.js +0 -1
  286. package/tabs/index.cjs +0 -16
  287. package/tabs/index.js +0 -16
  288. package/tag/index.cjs +0 -9
  289. package/tag/index.js +0 -9
  290. package/tag-group/index.cjs +0 -2
  291. package/tag-group/index.js +0 -2
  292. package/text-anchor/index.cjs +0 -10
  293. package/text-anchor/index.js +0 -10
  294. package/text-area/index.cjs +0 -19
  295. package/text-area/index.js +0 -19
  296. package/text-field/index.cjs +0 -20
  297. package/text-field/index.js +0 -20
  298. package/time-picker/index.cjs +0 -31
  299. package/time-picker/index.js +0 -31
  300. package/toggletip/index.cjs +0 -22
  301. package/toggletip/index.js +0 -22
  302. package/tooltip/index.cjs +0 -22
  303. package/tooltip/index.js +0 -22
  304. package/tree-item/index.cjs +0 -14
  305. package/tree-item/index.js +0 -14
  306. package/tree-view/index.cjs +0 -9
  307. package/tree-view/index.js +0 -9
  308. package/video-player/index.cjs +0 -12
  309. package/video-player/index.js +0 -12
  310. package/vivid.api.json +21 -0
  311. package/style.css +0 -1
package/shared/icon.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { _ as _curry1, a as _curry2, b as _has } from './_has.js';
2
- import { F as FoundationElement, a as attr, o as observable, v as volatile } from './index.js';
2
+ import { a as attr, F as FoundationElement, o as observable, v as volatile } from './index.js';
3
3
 
4
4
  function _arity(n, fn) {
5
5
  /* eslint-disable no-unused-vars */
@@ -92,8 +92,6 @@ var identity =
92
92
  /*#__PURE__*/
93
93
  _curry1(_identity);
94
94
 
95
- const identity$1 = identity;
96
-
97
95
  /**
98
96
  * Creates a new function that, when invoked, caches the result of calling `fn`
99
97
  * for a given argument set and returns the result. Subsequent calls to the
@@ -140,10 +138,26 @@ _curry2(function memoizeWith(mFn, fn) {
140
138
  });
141
139
  });
142
140
 
143
- const memoizeWith$1 = memoizeWith;
144
-
145
141
  const ICONS_BASE_URL = "https://icon.resources.vonage.com";
146
- const ICONS_VERSION = "4.5.3";
142
+ const ICONS_VERSION = "4.5.6";
143
+
144
+ const numberConverter = {
145
+ toView(value) {
146
+ if (value === void 0) {
147
+ return null;
148
+ }
149
+ return value.toString();
150
+ },
151
+ fromView(value) {
152
+ if (typeof value === "string") {
153
+ value = parseFloat(value.toString());
154
+ }
155
+ if (typeof value !== "number") {
156
+ return void 0;
157
+ }
158
+ return isNaN(value) || !isFinite(value) ? void 0 : value;
159
+ }
160
+ };
147
161
 
148
162
  const PLACEHOLDER_ICON = `<svg width="80%" height="80%" viewBox="0 0 64 64">
149
163
  <g>
@@ -184,8 +198,8 @@ const extractSvg = (response) => {
184
198
  const loadSvg = (iconId) => fetch(baseUrlTemplate([iconId, "svg"].join("."), ICONS_VERSION)).then(
185
199
  extractSvg
186
200
  );
187
- const resolveIcon = memoizeWith$1(
188
- identity$1,
201
+ const resolveIcon = memoizeWith(
202
+ identity,
189
203
  (iconId = "") => iconId.trim() ? loadSvg(iconId) : Promise.resolve("")
190
204
  );
191
205
  class Icon extends FoundationElement {
@@ -221,7 +235,7 @@ __decorateClass([
221
235
  attr
222
236
  ], Icon.prototype, "connotation", 2);
223
237
  __decorateClass([
224
- attr
238
+ attr({ converter: numberConverter })
225
239
  ], Icon.prototype, "size", 2);
226
240
  __decorateClass([
227
241
  observable
@@ -236,4 +250,4 @@ __decorateClass([
236
250
  volatile
237
251
  ], Icon.prototype, "iconUrl", 1);
238
252
 
239
- export { Icon as I, memoizeWith$1 as m };
253
+ export { Icon as I, memoizeWith as m };
package/shared/index.cjs CHANGED
@@ -1685,8 +1685,20 @@ function reduceBehaviors(styles) {
1685
1685
  return prev.concat(curr);
1686
1686
  }, null);
1687
1687
  }
1688
+ /**
1689
+ * A Symbol that can be added to a CSSStyleSheet to cause it to be prepended (rather than appended) to adoptedStyleSheets.
1690
+ * @public
1691
+ */
1692
+ const prependToAdoptedStyleSheetsSymbol = Symbol("prependToAdoptedStyleSheets");
1693
+ function separateSheetsToPrepend(sheets) {
1694
+ const prepend = [];
1695
+ const append = [];
1696
+ sheets.forEach(x => (x[prependToAdoptedStyleSheetsSymbol] ? prepend : append).push(x));
1697
+ return { prepend, append };
1698
+ }
1688
1699
  let addAdoptedStyleSheets = (target, sheets) => {
1689
- target.adoptedStyleSheets = [...target.adoptedStyleSheets, ...sheets];
1700
+ const { prepend, append } = separateSheetsToPrepend(sheets);
1701
+ target.adoptedStyleSheets = [...prepend, ...target.adoptedStyleSheets, ...append];
1690
1702
  };
1691
1703
  let removeAdoptedStyleSheets = (target, sheets) => {
1692
1704
  target.adoptedStyleSheets = target.adoptedStyleSheets.filter((x) => sheets.indexOf(x) === -1);
@@ -1701,7 +1713,9 @@ if (DOM.supportsAdoptedStyleSheets) {
1701
1713
  document.adoptedStyleSheets.push();
1702
1714
  document.adoptedStyleSheets.splice();
1703
1715
  addAdoptedStyleSheets = (target, sheets) => {
1704
- target.adoptedStyleSheets.push(...sheets);
1716
+ const { prepend, append } = separateSheetsToPrepend(sheets);
1717
+ target.adoptedStyleSheets.splice(0, 0, ...prepend);
1718
+ target.adoptedStyleSheets.push(...append);
1705
1719
  };
1706
1720
  removeAdoptedStyleSheets = (target, sheets) => {
1707
1721
  for (const sheet of sheets) {
@@ -4011,6 +4025,7 @@ class ConstructableStyleSheetTarget extends QueuedStyleSheetTarget {
4011
4025
  constructor(source) {
4012
4026
  super();
4013
4027
  const sheet = new CSSStyleSheet();
4028
+ sheet[prependToAdoptedStyleSheetsSymbol] = true;
4014
4029
  this.target = sheet.cssRules[sheet.insertRule(":host{}")].style;
4015
4030
  source.$fastController.addStyles(ElementStyles.create([sheet]));
4016
4031
  }
@@ -4447,23 +4462,7 @@ class DesignTokenNode {
4447
4462
  if (token) {
4448
4463
  // Notify any token subscribers
4449
4464
  token.notify(this.target);
4450
- if (DesignTokenImpl.isCSSDesignToken(token)) {
4451
- const parent = this.parent;
4452
- const reflecting = this.isReflecting(token);
4453
- if (parent) {
4454
- const parentValue = parent.get(token);
4455
- const sourceValue = source.get(token);
4456
- if (parentValue !== sourceValue && !reflecting) {
4457
- this.reflectToCSS(token);
4458
- }
4459
- else if (parentValue === sourceValue && reflecting) {
4460
- this.stopReflectToCSS(token);
4461
- }
4462
- }
4463
- else if (!reflecting) {
4464
- this.reflectToCSS(token);
4465
- }
4466
- }
4465
+ this.updateCSSTokenReflection(source, token);
4467
4466
  }
4468
4467
  },
4469
4468
  };
@@ -4537,6 +4536,25 @@ class DesignTokenNode {
4537
4536
  get parent() {
4538
4537
  return childToParent.get(this) || null;
4539
4538
  }
4539
+ updateCSSTokenReflection(source, token) {
4540
+ if (DesignTokenImpl.isCSSDesignToken(token)) {
4541
+ const parent = this.parent;
4542
+ const reflecting = this.isReflecting(token);
4543
+ if (parent) {
4544
+ const parentValue = parent.get(token);
4545
+ const sourceValue = source.get(token);
4546
+ if (parentValue !== sourceValue && !reflecting) {
4547
+ this.reflectToCSS(token);
4548
+ }
4549
+ else if (parentValue === sourceValue && reflecting) {
4550
+ this.stopReflectToCSS(token);
4551
+ }
4552
+ }
4553
+ else if (!reflecting) {
4554
+ this.reflectToCSS(token);
4555
+ }
4556
+ }
4557
+ }
4540
4558
  /**
4541
4559
  * Checks if a token has been assigned an explicit value the node.
4542
4560
  * @param token - the token to check.
@@ -4702,6 +4720,7 @@ class DesignTokenNode {
4702
4720
  return;
4703
4721
  }
4704
4722
  this.hydrate(token, this.getRaw(token));
4723
+ this.updateCSSTokenReflection(this.store, token);
4705
4724
  }
4706
4725
  /**
4707
4726
  * Hydrates a token with a DesignTokenValue, making retrieval available.
package/shared/index.js CHANGED
@@ -1683,8 +1683,20 @@ function reduceBehaviors(styles) {
1683
1683
  return prev.concat(curr);
1684
1684
  }, null);
1685
1685
  }
1686
+ /**
1687
+ * A Symbol that can be added to a CSSStyleSheet to cause it to be prepended (rather than appended) to adoptedStyleSheets.
1688
+ * @public
1689
+ */
1690
+ const prependToAdoptedStyleSheetsSymbol = Symbol("prependToAdoptedStyleSheets");
1691
+ function separateSheetsToPrepend(sheets) {
1692
+ const prepend = [];
1693
+ const append = [];
1694
+ sheets.forEach(x => (x[prependToAdoptedStyleSheetsSymbol] ? prepend : append).push(x));
1695
+ return { prepend, append };
1696
+ }
1686
1697
  let addAdoptedStyleSheets = (target, sheets) => {
1687
- target.adoptedStyleSheets = [...target.adoptedStyleSheets, ...sheets];
1698
+ const { prepend, append } = separateSheetsToPrepend(sheets);
1699
+ target.adoptedStyleSheets = [...prepend, ...target.adoptedStyleSheets, ...append];
1688
1700
  };
1689
1701
  let removeAdoptedStyleSheets = (target, sheets) => {
1690
1702
  target.adoptedStyleSheets = target.adoptedStyleSheets.filter((x) => sheets.indexOf(x) === -1);
@@ -1699,7 +1711,9 @@ if (DOM.supportsAdoptedStyleSheets) {
1699
1711
  document.adoptedStyleSheets.push();
1700
1712
  document.adoptedStyleSheets.splice();
1701
1713
  addAdoptedStyleSheets = (target, sheets) => {
1702
- target.adoptedStyleSheets.push(...sheets);
1714
+ const { prepend, append } = separateSheetsToPrepend(sheets);
1715
+ target.adoptedStyleSheets.splice(0, 0, ...prepend);
1716
+ target.adoptedStyleSheets.push(...append);
1703
1717
  };
1704
1718
  removeAdoptedStyleSheets = (target, sheets) => {
1705
1719
  for (const sheet of sheets) {
@@ -4009,6 +4023,7 @@ class ConstructableStyleSheetTarget extends QueuedStyleSheetTarget {
4009
4023
  constructor(source) {
4010
4024
  super();
4011
4025
  const sheet = new CSSStyleSheet();
4026
+ sheet[prependToAdoptedStyleSheetsSymbol] = true;
4012
4027
  this.target = sheet.cssRules[sheet.insertRule(":host{}")].style;
4013
4028
  source.$fastController.addStyles(ElementStyles.create([sheet]));
4014
4029
  }
@@ -4445,23 +4460,7 @@ class DesignTokenNode {
4445
4460
  if (token) {
4446
4461
  // Notify any token subscribers
4447
4462
  token.notify(this.target);
4448
- if (DesignTokenImpl.isCSSDesignToken(token)) {
4449
- const parent = this.parent;
4450
- const reflecting = this.isReflecting(token);
4451
- if (parent) {
4452
- const parentValue = parent.get(token);
4453
- const sourceValue = source.get(token);
4454
- if (parentValue !== sourceValue && !reflecting) {
4455
- this.reflectToCSS(token);
4456
- }
4457
- else if (parentValue === sourceValue && reflecting) {
4458
- this.stopReflectToCSS(token);
4459
- }
4460
- }
4461
- else if (!reflecting) {
4462
- this.reflectToCSS(token);
4463
- }
4464
- }
4463
+ this.updateCSSTokenReflection(source, token);
4465
4464
  }
4466
4465
  },
4467
4466
  };
@@ -4535,6 +4534,25 @@ class DesignTokenNode {
4535
4534
  get parent() {
4536
4535
  return childToParent.get(this) || null;
4537
4536
  }
4537
+ updateCSSTokenReflection(source, token) {
4538
+ if (DesignTokenImpl.isCSSDesignToken(token)) {
4539
+ const parent = this.parent;
4540
+ const reflecting = this.isReflecting(token);
4541
+ if (parent) {
4542
+ const parentValue = parent.get(token);
4543
+ const sourceValue = source.get(token);
4544
+ if (parentValue !== sourceValue && !reflecting) {
4545
+ this.reflectToCSS(token);
4546
+ }
4547
+ else if (parentValue === sourceValue && reflecting) {
4548
+ this.stopReflectToCSS(token);
4549
+ }
4550
+ }
4551
+ else if (!reflecting) {
4552
+ this.reflectToCSS(token);
4553
+ }
4554
+ }
4555
+ }
4538
4556
  /**
4539
4557
  * Checks if a token has been assigned an explicit value the node.
4540
4558
  * @param token - the token to check.
@@ -4700,6 +4718,7 @@ class DesignTokenNode {
4700
4718
  return;
4701
4719
  }
4702
4720
  this.hydrate(token, this.getRaw(token));
4721
+ this.updateCSSTokenReflection(this.store, token);
4703
4722
  }
4704
4723
  /**
4705
4724
  * Hydrates a token with a DesignTokenValue, making retrieval available.
package/shared/index2.cjs CHANGED
@@ -7,16 +7,15 @@ const classNames = require('./class-names.cjs');
7
7
  const when = require('./when.cjs');
8
8
  const locales_enUS = require('../locales/en-US.cjs');
9
9
 
10
- const messageStyles = ".message{display:none;contain:inline-size;font:var(--vvd-typography-base-condensed);gap:4px;grid-column:1/-1}.message--visible{display:flex}.message-text{color:var(--vvd-color-canvas-text)}.helper-message .message-text{color:var(--_low-ink-color)}.message-icon{font-size:16px}.success-message .message-icon{color:var(--vvd-color-success-500)}.error-message .message-icon{color:var(--vvd-color-alert-500)}\n";
10
+ const messageStyles = ".sr-only{position:absolute;overflow:hidden;width:1px;height:1px;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap}.message{display:none;contain:inline-size;font:var(--vvd-typography-base-condensed);gap:4px;grid-column:1/-1}.message--visible{display:flex}.message-text{color:var(--vvd-color-canvas-text)}.helper-message .message-text{color:var(--_low-ink-color)}.message-icon{font-size:16px}.success-message .message-icon{color:var(--vvd-color-success-500)}.error-message .message-icon{color:var(--vvd-color-alert-500)}";
11
11
 
12
12
  var __defProp$1 = Object.defineProperty;
13
- var __getOwnPropDesc$1 = Object.getOwnPropertyDescriptor;
14
13
  var __decorateClass$1 = (decorators, target, key, kind) => {
15
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$1(target, key) : target;
14
+ var result = void 0 ;
16
15
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
17
16
  if (decorator = decorators[i])
18
- result = (kind ? decorator(target, key, result) : decorator(result)) || result;
19
- if (kind && result)
17
+ result = (decorator(target, key, result) ) || result;
18
+ if (result)
20
19
  __defProp$1(target, key, result);
21
20
  return result;
22
21
  };
@@ -24,15 +23,15 @@ class FormElementHelperText {
24
23
  }
25
24
  __decorateClass$1([
26
25
  index.attr({ attribute: "helper-text" })
27
- ], FormElementHelperText.prototype, "helperText", 2);
26
+ ], FormElementHelperText.prototype, "helperText");
28
27
  __decorateClass$1([
29
28
  index.observable
30
- ], FormElementHelperText.prototype, "_helperTextSlottedContent", 2);
29
+ ], FormElementHelperText.prototype, "_helperTextSlottedContent");
31
30
  class FormElementSuccessText {
32
31
  }
33
32
  __decorateClass$1([
34
33
  index.attr({ attribute: "success-text" })
35
- ], FormElementSuccessText.prototype, "successText", 2);
34
+ ], FormElementSuccessText.prototype, "successText");
36
35
  class FormElementCharCount {
37
36
  constructor() {
38
37
  this.charCount = false;
@@ -43,7 +42,7 @@ __decorateClass$1([
43
42
  attribute: "char-count",
44
43
  mode: "boolean"
45
44
  })
46
- ], FormElementCharCount.prototype, "charCount", 2);
45
+ ], FormElementCharCount.prototype, "charCount");
47
46
  function formElements(constructor) {
48
47
  let currentPrototype = constructor.prototype;
49
48
  while (currentPrototype) {
@@ -118,10 +117,10 @@ function formElements(constructor) {
118
117
  }
119
118
  __decorateClass$1([
120
119
  index.attr
121
- ], Decorated.prototype, "label", 2);
120
+ ], Decorated.prototype, "label");
122
121
  __decorateClass$1([
123
122
  index.observable
124
- ], Decorated.prototype, "errorValidationMessage", 2);
123
+ ], Decorated.prototype, "errorValidationMessage");
125
124
  return Decorated;
126
125
  }
127
126
  const feedback = {
@@ -131,17 +130,20 @@ const feedback = {
131
130
  slot: {
132
131
  name: "helper-text",
133
132
  slottedContentProperty: "_helperTextSlottedContent"
134
- }
133
+ },
134
+ role: "none"
135
135
  },
136
136
  error: {
137
137
  messageProperty: "errorValidationMessage",
138
138
  className: "error",
139
- iconType: "info-line"
139
+ iconType: "info-line",
140
+ role: "status"
140
141
  },
141
142
  success: {
142
143
  messageProperty: "successText",
143
144
  className: "success",
144
- iconType: "check-circle-line"
145
+ iconType: "check-circle-line",
146
+ role: "none"
145
147
  }
146
148
  };
147
149
  const isFeedbackAvailable = (config, x) => Boolean(
@@ -178,10 +180,14 @@ function getFeedbackTypeTemplate(context, config, shouldShow) {
178
180
  >${messageTemplate}</slot
179
181
  >` : messageTemplate;
180
182
  return index.html`<div
181
- class="${(x) => classNames.classNames("message", `${config.className}-message`, [
182
- "message--visible",
183
- shouldShow(x)
184
- ])}"
183
+ class="${(x) => classNames.classNames(
184
+ "message",
185
+ `${config.className}-message`,
186
+ ["message--visible", config.role === "status" || shouldShow(x)],
187
+ ["sr-only", !shouldShow(x)]
188
+ )}"
189
+ role="${config.role}"
190
+ aria-atomic="false"
185
191
  >
186
192
  ${when.when(
187
193
  (x) => shouldShow(x) && config.iconType,
@@ -192,16 +198,15 @@ function getFeedbackTypeTemplate(context, config, shouldShow) {
192
198
  }
193
199
  function errorText(constructor) {
194
200
  class Decorated extends constructor {
201
+ #blockValidateCalls = false;
195
202
  constructor(...args) {
196
203
  super(...args);
197
- this.#blockValidateCalls = false;
198
204
  this._validate = this.validate;
199
205
  this.validate = () => {
200
206
  if (!this.#blockValidateCalls)
201
207
  this._validate();
202
208
  };
203
209
  }
204
- #blockValidateCalls;
205
210
  errorTextChanged(_, newErrorText) {
206
211
  if (newErrorText) {
207
212
  this.#forceCustomError(newErrorText);
@@ -222,18 +227,17 @@ function errorText(constructor) {
222
227
  }
223
228
  __decorateClass$1([
224
229
  index.attr({ attribute: "error-text" })
225
- ], Decorated.prototype, "errorText", 2);
230
+ ], Decorated.prototype, "errorText");
226
231
  return Decorated;
227
232
  }
228
233
 
229
234
  var __defProp = Object.defineProperty;
230
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
231
235
  var __decorateClass = (decorators, target, key, kind) => {
232
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
236
+ var result = void 0 ;
233
237
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
234
238
  if (decorator = decorators[i])
235
- result = (kind ? decorator(target, key, result) : decorator(result)) || result;
236
- if (kind && result)
239
+ result = (decorator(target, key, result) ) || result;
240
+ if (result)
237
241
  __defProp(target, key, result);
238
242
  return result;
239
243
  };
@@ -244,7 +248,7 @@ class CurrentLocale {
244
248
  }
245
249
  __decorateClass([
246
250
  index.observable
247
- ], CurrentLocale.prototype, "locale", 2);
251
+ ], CurrentLocale.prototype, "locale");
248
252
  const currentLocale = new CurrentLocale();
249
253
  const setLocale = (locale) => {
250
254
  currentLocale.locale = locale;
package/shared/index2.js CHANGED
@@ -5,16 +5,15 @@ import { c as classNames } from './class-names.js';
5
5
  import { w as when } from './when.js';
6
6
  import enUS from '../locales/en-US.js';
7
7
 
8
- const messageStyles = ".message{display:none;contain:inline-size;font:var(--vvd-typography-base-condensed);gap:4px;grid-column:1/-1}.message--visible{display:flex}.message-text{color:var(--vvd-color-canvas-text)}.helper-message .message-text{color:var(--_low-ink-color)}.message-icon{font-size:16px}.success-message .message-icon{color:var(--vvd-color-success-500)}.error-message .message-icon{color:var(--vvd-color-alert-500)}\n";
8
+ const messageStyles = ".sr-only{position:absolute;overflow:hidden;width:1px;height:1px;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap}.message{display:none;contain:inline-size;font:var(--vvd-typography-base-condensed);gap:4px;grid-column:1/-1}.message--visible{display:flex}.message-text{color:var(--vvd-color-canvas-text)}.helper-message .message-text{color:var(--_low-ink-color)}.message-icon{font-size:16px}.success-message .message-icon{color:var(--vvd-color-success-500)}.error-message .message-icon{color:var(--vvd-color-alert-500)}";
9
9
 
10
10
  var __defProp$1 = Object.defineProperty;
11
- var __getOwnPropDesc$1 = Object.getOwnPropertyDescriptor;
12
11
  var __decorateClass$1 = (decorators, target, key, kind) => {
13
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$1(target, key) : target;
12
+ var result = void 0 ;
14
13
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
15
14
  if (decorator = decorators[i])
16
- result = (kind ? decorator(target, key, result) : decorator(result)) || result;
17
- if (kind && result)
15
+ result = (decorator(target, key, result) ) || result;
16
+ if (result)
18
17
  __defProp$1(target, key, result);
19
18
  return result;
20
19
  };
@@ -22,15 +21,15 @@ class FormElementHelperText {
22
21
  }
23
22
  __decorateClass$1([
24
23
  attr({ attribute: "helper-text" })
25
- ], FormElementHelperText.prototype, "helperText", 2);
24
+ ], FormElementHelperText.prototype, "helperText");
26
25
  __decorateClass$1([
27
26
  observable
28
- ], FormElementHelperText.prototype, "_helperTextSlottedContent", 2);
27
+ ], FormElementHelperText.prototype, "_helperTextSlottedContent");
29
28
  class FormElementSuccessText {
30
29
  }
31
30
  __decorateClass$1([
32
31
  attr({ attribute: "success-text" })
33
- ], FormElementSuccessText.prototype, "successText", 2);
32
+ ], FormElementSuccessText.prototype, "successText");
34
33
  class FormElementCharCount {
35
34
  constructor() {
36
35
  this.charCount = false;
@@ -41,7 +40,7 @@ __decorateClass$1([
41
40
  attribute: "char-count",
42
41
  mode: "boolean"
43
42
  })
44
- ], FormElementCharCount.prototype, "charCount", 2);
43
+ ], FormElementCharCount.prototype, "charCount");
45
44
  function formElements(constructor) {
46
45
  let currentPrototype = constructor.prototype;
47
46
  while (currentPrototype) {
@@ -116,10 +115,10 @@ function formElements(constructor) {
116
115
  }
117
116
  __decorateClass$1([
118
117
  attr
119
- ], Decorated.prototype, "label", 2);
118
+ ], Decorated.prototype, "label");
120
119
  __decorateClass$1([
121
120
  observable
122
- ], Decorated.prototype, "errorValidationMessage", 2);
121
+ ], Decorated.prototype, "errorValidationMessage");
123
122
  return Decorated;
124
123
  }
125
124
  const feedback = {
@@ -129,17 +128,20 @@ const feedback = {
129
128
  slot: {
130
129
  name: "helper-text",
131
130
  slottedContentProperty: "_helperTextSlottedContent"
132
- }
131
+ },
132
+ role: "none"
133
133
  },
134
134
  error: {
135
135
  messageProperty: "errorValidationMessage",
136
136
  className: "error",
137
- iconType: "info-line"
137
+ iconType: "info-line",
138
+ role: "status"
138
139
  },
139
140
  success: {
140
141
  messageProperty: "successText",
141
142
  className: "success",
142
- iconType: "check-circle-line"
143
+ iconType: "check-circle-line",
144
+ role: "none"
143
145
  }
144
146
  };
145
147
  const isFeedbackAvailable = (config, x) => Boolean(
@@ -176,10 +178,14 @@ function getFeedbackTypeTemplate(context, config, shouldShow) {
176
178
  >${messageTemplate}</slot
177
179
  >` : messageTemplate;
178
180
  return html`<div
179
- class="${(x) => classNames("message", `${config.className}-message`, [
180
- "message--visible",
181
- shouldShow(x)
182
- ])}"
181
+ class="${(x) => classNames(
182
+ "message",
183
+ `${config.className}-message`,
184
+ ["message--visible", config.role === "status" || shouldShow(x)],
185
+ ["sr-only", !shouldShow(x)]
186
+ )}"
187
+ role="${config.role}"
188
+ aria-atomic="false"
183
189
  >
184
190
  ${when(
185
191
  (x) => shouldShow(x) && config.iconType,
@@ -190,16 +196,15 @@ function getFeedbackTypeTemplate(context, config, shouldShow) {
190
196
  }
191
197
  function errorText(constructor) {
192
198
  class Decorated extends constructor {
199
+ #blockValidateCalls = false;
193
200
  constructor(...args) {
194
201
  super(...args);
195
- this.#blockValidateCalls = false;
196
202
  this._validate = this.validate;
197
203
  this.validate = () => {
198
204
  if (!this.#blockValidateCalls)
199
205
  this._validate();
200
206
  };
201
207
  }
202
- #blockValidateCalls;
203
208
  errorTextChanged(_, newErrorText) {
204
209
  if (newErrorText) {
205
210
  this.#forceCustomError(newErrorText);
@@ -220,18 +225,17 @@ function errorText(constructor) {
220
225
  }
221
226
  __decorateClass$1([
222
227
  attr({ attribute: "error-text" })
223
- ], Decorated.prototype, "errorText", 2);
228
+ ], Decorated.prototype, "errorText");
224
229
  return Decorated;
225
230
  }
226
231
 
227
232
  var __defProp = Object.defineProperty;
228
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
229
233
  var __decorateClass = (decorators, target, key, kind) => {
230
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
234
+ var result = void 0 ;
231
235
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
232
236
  if (decorator = decorators[i])
233
- result = (kind ? decorator(target, key, result) : decorator(result)) || result;
234
- if (kind && result)
237
+ result = (decorator(target, key, result) ) || result;
238
+ if (result)
235
239
  __defProp(target, key, result);
236
240
  return result;
237
241
  };
@@ -242,7 +246,7 @@ class CurrentLocale {
242
246
  }
243
247
  __decorateClass([
244
248
  observable
245
- ], CurrentLocale.prototype, "locale", 2);
249
+ ], CurrentLocale.prototype, "locale");
246
250
  const currentLocale = new CurrentLocale();
247
251
  const setLocale = (locale) => {
248
252
  currentLocale.locale = locale;
@@ -993,13 +993,12 @@ index.__decorate([
993
993
  ], ListboxElement.prototype, "size", void 0);
994
994
 
995
995
  var __defProp = Object.defineProperty;
996
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
997
996
  var __decorateClass = (decorators, target, key, kind) => {
998
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
997
+ var result = void 0 ;
999
998
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
1000
999
  if (decorator = decorators[i])
1001
- result = (kind ? decorator(target, key, result) : decorator(result)) || result;
1002
- if (kind && result)
1000
+ result = (decorator(target, key, result) ) || result;
1001
+ if (result)
1003
1002
  __defProp(target, key, result);
1004
1003
  return result;
1005
1004
  };
@@ -1058,13 +1057,13 @@ class Listbox extends ListboxElement {
1058
1057
  }
1059
1058
  __decorateClass([
1060
1059
  index.attr
1061
- ], Listbox.prototype, "appearance", 2);
1060
+ ], Listbox.prototype, "appearance");
1062
1061
  __decorateClass([
1063
1062
  index.attr
1064
- ], Listbox.prototype, "orientation", 2);
1063
+ ], Listbox.prototype, "orientation");
1065
1064
  __decorateClass([
1066
1065
  index.attr
1067
- ], Listbox.prototype, "shape", 2);
1066
+ ], Listbox.prototype, "shape");
1068
1067
 
1069
1068
  exports.DelegatesARIAListbox = DelegatesARIAListbox;
1070
1069
  exports.Listbox = Listbox;
package/shared/listbox.js CHANGED
@@ -991,13 +991,12 @@ __decorate([
991
991
  ], ListboxElement.prototype, "size", void 0);
992
992
 
993
993
  var __defProp = Object.defineProperty;
994
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
995
994
  var __decorateClass = (decorators, target, key, kind) => {
996
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
995
+ var result = void 0 ;
997
996
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
998
997
  if (decorator = decorators[i])
999
- result = (kind ? decorator(target, key, result) : decorator(result)) || result;
1000
- if (kind && result)
998
+ result = (decorator(target, key, result) ) || result;
999
+ if (result)
1001
1000
  __defProp(target, key, result);
1002
1001
  return result;
1003
1002
  };
@@ -1056,12 +1055,12 @@ class Listbox extends ListboxElement {
1056
1055
  }
1057
1056
  __decorateClass([
1058
1057
  attr
1059
- ], Listbox.prototype, "appearance", 2);
1058
+ ], Listbox.prototype, "appearance");
1060
1059
  __decorateClass([
1061
1060
  attr
1062
- ], Listbox.prototype, "orientation", 2);
1061
+ ], Listbox.prototype, "orientation");
1063
1062
  __decorateClass([
1064
1063
  attr
1065
- ], Listbox.prototype, "shape", 2);
1064
+ ], Listbox.prototype, "shape");
1066
1065
 
1067
1066
  export { DelegatesARIAListbox as D, ListboxElement as L, Listbox as a, Listbox$1 as b };