@vonage/vivid 5.23.1 → 5.25.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 (522) hide show
  1. package/README.md +1 -1
  2. package/accordion/index.cjs +1 -1
  3. package/accordion/index.js +1 -1
  4. package/accordion-item/index.cjs +1 -1
  5. package/accordion-item/index.js +1 -1
  6. package/audio-player/index.cjs +2 -2
  7. package/audio-player/index.js +3 -3
  8. package/avatar/index.cjs +10 -10
  9. package/avatar/index.js +4 -3
  10. package/badge/index.cjs +1 -1
  11. package/badge/index.js +1 -1
  12. package/breadcrumb-item/index.cjs +9 -5
  13. package/breadcrumb-item/index.js +11 -6
  14. package/bundled/affix.cjs +1 -1
  15. package/bundled/affix.js +1 -1
  16. package/bundled/definition10.cjs +2 -1
  17. package/bundled/definition10.js +3 -2
  18. package/bundled/definition11.cjs +4 -4
  19. package/bundled/definition11.js +4 -3
  20. package/bundled/definition12.cjs +1 -1
  21. package/bundled/definition12.js +1 -0
  22. package/bundled/definition15.cjs +8 -7
  23. package/bundled/definition15.js +27 -24
  24. package/bundled/definition17.cjs +7 -7
  25. package/bundled/definition17.js +22 -109
  26. package/bundled/definition18.cjs +12 -83
  27. package/bundled/definition18.js +20 -426
  28. package/bundled/definition19.cjs +87 -7
  29. package/bundled/definition19.js +433 -16
  30. package/bundled/definition20.cjs +7 -37
  31. package/bundled/definition20.js +17 -172
  32. package/bundled/definition21.cjs +35 -27
  33. package/bundled/definition21.js +155 -154
  34. package/bundled/definition22.cjs +29 -6
  35. package/bundled/definition22.js +172 -20
  36. package/bundled/definition23.cjs +6 -12
  37. package/bundled/definition23.js +17 -32
  38. package/bundled/definition24.cjs +12 -39
  39. package/bundled/definition24.js +33 -67
  40. package/bundled/definition25.cjs +44 -0
  41. package/bundled/definition25.js +81 -0
  42. package/bundled/definition3.cjs +5 -5
  43. package/bundled/definition3.js +10 -40
  44. package/bundled/definition4.cjs +6 -6
  45. package/bundled/definition4.js +4 -3
  46. package/bundled/definition6.cjs +11 -11
  47. package/bundled/definition6.js +4 -3
  48. package/bundled/definition9.cjs +12 -6
  49. package/bundled/definition9.js +66 -43
  50. package/bundled/extractOptions.cjs +1 -0
  51. package/bundled/extractOptions.js +11 -0
  52. package/bundled/icon.cjs +1 -0
  53. package/bundled/icon.js +34 -0
  54. package/bundled/listbox.cjs +1 -1
  55. package/bundled/listbox.js +28 -12
  56. package/bundled/mixins.cjs +8 -8
  57. package/bundled/mixins.js +4 -3
  58. package/bundled/optgroup.cjs +1 -0
  59. package/bundled/optgroup.js +27 -0
  60. package/bundled/option.cjs +1 -0
  61. package/bundled/option.js +93 -0
  62. package/bundled/render-in-light-dom.cjs +1 -1
  63. package/bundled/render-in-light-dom.js +16 -19
  64. package/bundled/vivid-element.cjs +1 -1
  65. package/bundled/vivid-element.js +9 -1
  66. package/card/index.cjs +22 -22
  67. package/card/index.js +4 -3
  68. package/color-picker/index.cjs +18 -18
  69. package/color-picker/index.js +4 -3
  70. package/combobox/definition.cjs +1 -1
  71. package/combobox/definition.js +1 -1
  72. package/combobox/index.cjs +7 -7
  73. package/combobox/index.js +31 -21
  74. package/country/definition.cjs +1 -1
  75. package/country/definition.js +1 -1
  76. package/country/index.cjs +1 -1
  77. package/country/index.js +1 -1
  78. package/country-group/definition.cjs +1 -1
  79. package/country-group/definition.js +1 -1
  80. package/country-group/index.cjs +1 -1
  81. package/country-group/index.js +2 -2
  82. package/custom-elements.json +8438 -7866
  83. package/data-grid/definition.cjs +1 -1
  84. package/data-grid/definition.js +1 -1
  85. package/data-grid/index.cjs +26 -26
  86. package/data-grid/index.js +9 -8
  87. package/date-picker/definition.cjs +1 -1
  88. package/date-picker/definition.js +1 -1
  89. package/date-picker/index.cjs +1 -1
  90. package/date-picker/index.js +1 -1
  91. package/date-range-picker/definition.cjs +1 -1
  92. package/date-range-picker/definition.js +1 -1
  93. package/date-range-picker/index.cjs +1 -1
  94. package/date-range-picker/index.js +1 -1
  95. package/date-time-picker/definition.cjs +1 -1
  96. package/date-time-picker/definition.js +1 -1
  97. package/date-time-picker/index.cjs +1 -1
  98. package/date-time-picker/index.js +1 -1
  99. package/dial-pad/definition.cjs +1 -1
  100. package/dial-pad/definition.js +1 -1
  101. package/dial-pad/index.cjs +7 -7
  102. package/dial-pad/index.js +124 -54
  103. package/dialog/definition.cjs +1 -1
  104. package/dialog/definition.js +1 -1
  105. package/dialog/index.cjs +14 -14
  106. package/dialog/index.js +4 -3
  107. package/divider/definition.cjs +1 -1
  108. package/divider/definition.js +1 -1
  109. package/divider/index.cjs +1 -1
  110. package/divider/index.js +1 -1
  111. package/empty-state/definition.cjs +1 -1
  112. package/empty-state/definition.js +1 -1
  113. package/empty-state/index.cjs +3 -3
  114. package/empty-state/index.js +4 -3
  115. package/fab/definition.cjs +1 -1
  116. package/fab/definition.js +1 -1
  117. package/file-picker/definition.cjs +1 -1
  118. package/file-picker/definition.js +1 -1
  119. package/file-picker/index.cjs +7 -7
  120. package/file-picker/index.js +4 -3
  121. package/flag/definition.cjs +1 -1
  122. package/flag/definition.js +1 -1
  123. package/header/definition.cjs +1 -1
  124. package/header/definition.js +1 -1
  125. package/header/index.cjs +3 -3
  126. package/header/index.js +3 -3
  127. package/icon/definition.cjs +2 -1
  128. package/icon/definition.js +2 -1
  129. package/index.cjs +209 -198
  130. package/index.js +59 -54
  131. package/kbd-key/definition.cjs +1 -1
  132. package/kbd-key/definition.js +1 -1
  133. package/kbd-shortcut/definition.cjs +1 -1
  134. package/kbd-shortcut/definition.js +1 -1
  135. package/layout/definition.cjs +1 -1
  136. package/layout/definition.js +1 -1
  137. package/lib/accordion-item/accordion-item.d.ts +3 -1
  138. package/lib/action-group/action-group.d.ts +1 -1
  139. package/lib/alert/alert.d.ts +2 -2
  140. package/lib/audio-player/audio-player.d.ts +1 -1
  141. package/lib/avatar/avatar.d.ts +1 -1
  142. package/lib/badge/badge.d.ts +1 -1
  143. package/lib/banner/banner.d.ts +3 -3
  144. package/lib/breadcrumb/breadcrumb.d.ts +1 -1
  145. package/lib/breadcrumb-item/breadcrumb-item.d.ts +1 -1
  146. package/lib/button/button.d.ts +3 -3
  147. package/lib/calendar-event/calendar-event.d.ts +1 -1
  148. package/lib/card/card.d.ts +1 -1
  149. package/lib/checkbox/checkbox.d.ts +6 -6
  150. package/lib/color-picker/color-picker.d.ts +7 -7
  151. package/lib/combobox/combobox.d.ts +8 -8
  152. package/lib/components.d.ts +2 -0
  153. package/lib/country-group/country-group.d.ts +2 -2
  154. package/lib/data-grid/data-grid-cell.d.ts +4 -3
  155. package/lib/data-grid/data-grid-row.d.ts +3 -2
  156. package/lib/data-grid/data-grid.options.d.ts +5 -0
  157. package/lib/date-picker/date-picker.d.ts +8 -8
  158. package/lib/date-range-picker/date-range-picker.d.ts +4 -4
  159. package/lib/date-time-picker/date-time-picker.d.ts +8 -8
  160. package/lib/dial-pad/dial-pad.d.ts +2 -2
  161. package/lib/dialog/dialog.d.ts +2 -2
  162. package/lib/divider/divider.d.ts +1 -1
  163. package/lib/fab/fab.d.ts +1 -1
  164. package/lib/file-picker/file-picker.d.ts +7 -7
  165. package/lib/header/header.d.ts +1 -1
  166. package/lib/listbox/definition.d.ts +3 -0
  167. package/lib/listbox/index.d.ts +1 -0
  168. package/lib/listbox/listbox.d.ts +1302 -0
  169. package/lib/listbox/listbox.template.d.ts +3 -0
  170. package/lib/listbox/variations.browser-spec.d.ts +1 -0
  171. package/lib/menu/menu.d.ts +2 -3
  172. package/lib/menu-item/menu-item.d.ts +3 -3
  173. package/lib/nav/nav.d.ts +1 -1
  174. package/lib/nav-disclosure/nav-disclosure.d.ts +2 -2
  175. package/lib/nav-item/nav-item.d.ts +2 -2
  176. package/lib/note/note.d.ts +1 -1
  177. package/lib/number-field/number-field.d.ts +9 -10
  178. package/lib/optgroup/definition.d.ts +3 -0
  179. package/lib/optgroup/index.d.ts +1 -0
  180. package/lib/optgroup/optgroup.d.ts +430 -0
  181. package/lib/optgroup/optgroup.template.d.ts +2 -0
  182. package/lib/optgroup/variations.browser-spec.d.ts +1 -0
  183. package/lib/option/option.d.ts +2 -2
  184. package/lib/pagination/pagination.d.ts +1 -1
  185. package/lib/popover/popover.d.ts +2 -2
  186. package/lib/progress/progress.d.ts +1 -1
  187. package/lib/progress-ring/progress-ring.d.ts +1 -1
  188. package/lib/radio/radio.d.ts +3 -3
  189. package/lib/radio-group/radio-group.d.ts +1 -1
  190. package/lib/range-slider/range-slider.d.ts +3 -3
  191. package/lib/rich-text-editor/rich-text-editor.d.ts +1 -1
  192. package/lib/rich-text-editor/rte/features/base.d.ts +1 -0
  193. package/lib/rich-text-editor/rte/utils/default-textblock.d.ts +2 -2
  194. package/lib/searchable-select/option-tag.d.ts +1 -1
  195. package/lib/searchable-select/searchable-select.d.ts +47 -47
  196. package/lib/select/select.d.ts +9 -9
  197. package/lib/selectable-box/selectable-box.d.ts +1 -1
  198. package/lib/simple-color-picker/simple-color-picker.d.ts +2 -2
  199. package/lib/slider/slider.d.ts +3 -3
  200. package/lib/split-button/split-button.d.ts +3 -3
  201. package/lib/status/status.d.ts +1 -1
  202. package/lib/switch/switch.d.ts +2 -2
  203. package/lib/tab/tab.d.ts +3 -3
  204. package/lib/tab-panel/tab-panel.d.ts +1 -1
  205. package/lib/table/table-cell.d.ts +1 -1
  206. package/lib/table/table-header-cell.d.ts +1 -1
  207. package/lib/table/table-row.d.ts +1 -1
  208. package/lib/table/table-sorting-button.d.ts +1 -1
  209. package/lib/tag/tag.d.ts +3 -3
  210. package/lib/tag-group/tag-group.d.ts +1 -1
  211. package/lib/tag-name-map.d.ts +3 -1
  212. package/lib/text-area/text-area.d.ts +8 -8
  213. package/lib/text-field/text-field.d.ts +10 -9
  214. package/lib/time-picker/time-picker.d.ts +4 -4
  215. package/lib/toggletip/toggletip.d.ts +3 -2
  216. package/lib/tooltip/tooltip.d.ts +3 -2
  217. package/lib/tree-item/tree-item.d.ts +2 -2
  218. package/lib/tree-view/tree-view.d.ts +1 -1
  219. package/lib/video-player/video-player.d.ts +1 -1
  220. package/listbox/definition.cjs +5 -0
  221. package/listbox/definition.js +2 -0
  222. package/listbox/index.cjs +11 -0
  223. package/listbox/index.js +540 -0
  224. package/menu/index.cjs +1 -1
  225. package/menu/index.js +1 -1
  226. package/menu-item/index.cjs +1 -1
  227. package/menu-item/index.js +1 -1
  228. package/nav/definition.cjs +1 -1
  229. package/nav/definition.js +1 -1
  230. package/nav-disclosure/definition.cjs +1 -1
  231. package/nav-disclosure/definition.js +1 -1
  232. package/nav-disclosure/index.cjs +4 -4
  233. package/nav-disclosure/index.js +4 -3
  234. package/nav-item/definition.cjs +1 -1
  235. package/nav-item/definition.js +1 -1
  236. package/note/definition.cjs +1 -1
  237. package/note/definition.js +1 -1
  238. package/number-field/definition.cjs +1 -1
  239. package/number-field/definition.js +1 -1
  240. package/number-field/index.cjs +1 -1
  241. package/number-field/index.js +1 -1
  242. package/optgroup/definition.cjs +6 -0
  243. package/optgroup/definition.js +3 -0
  244. package/optgroup/index.cjs +1 -0
  245. package/optgroup/index.js +4 -0
  246. package/option/definition.cjs +2 -1
  247. package/option/definition.js +2 -1
  248. package/package.json +9 -8
  249. package/pagination/definition.cjs +1 -1
  250. package/pagination/definition.js +1 -1
  251. package/platform-switch/definition.cjs +1 -1
  252. package/platform-switch/definition.js +1 -1
  253. package/popover/definition.cjs +1 -1
  254. package/popover/definition.js +1 -1
  255. package/popover/index.cjs +5 -5
  256. package/popover/index.js +4 -3
  257. package/progress/definition.cjs +1 -1
  258. package/progress/definition.js +1 -1
  259. package/radio/definition.cjs +1 -1
  260. package/radio/definition.js +1 -1
  261. package/radio-group/definition.cjs +1 -1
  262. package/radio-group/definition.js +1 -1
  263. package/range-slider/definition.cjs +1 -1
  264. package/range-slider/definition.js +1 -1
  265. package/rich-text-editor/definition.cjs +1 -1
  266. package/rich-text-editor/definition.js +1 -1
  267. package/rich-text-editor/index.cjs +13 -13
  268. package/rich-text-editor/index.js +26 -23
  269. package/rich-text-view/definition.cjs +1 -1
  270. package/rich-text-view/definition.js +1 -1
  271. package/searchable-select/definition.cjs +1 -1
  272. package/searchable-select/definition.js +1 -1
  273. package/searchable-select/index.cjs +23 -23
  274. package/searchable-select/index.js +67 -49
  275. package/select/definition.cjs +1 -1
  276. package/select/definition.js +1 -1
  277. package/select/index.cjs +1 -1
  278. package/select/index.js +1 -1
  279. package/selectable-box/definition.cjs +1 -1
  280. package/selectable-box/definition.js +1 -1
  281. package/shared/aria/delegates-aria.d.ts +1 -1
  282. package/shared/aria/host-semantics.d.ts +1 -1
  283. package/shared/color-picker/base-color-picker.d.ts +1 -1
  284. package/shared/feedback/feedback-message.d.ts +1 -1
  285. package/shared/feedback/mixins.d.ts +2 -2
  286. package/shared/foundation/button/button.d.ts +2 -2
  287. package/shared/foundation/form-associated/form-associated.d.ts +2 -2
  288. package/shared/foundation/listbox/extractOptions.d.ts +2 -0
  289. package/shared/foundation/listbox/listbox.d.ts +2 -0
  290. package/shared/listbox/commands.d.ts +17 -0
  291. package/shared/listbox/move.d.ts +6 -0
  292. package/shared/listbox/options.d.ts +12 -0
  293. package/shared/listbox/selection.d.ts +28 -0
  294. package/shared/listbox/state.d.ts +26 -0
  295. package/shared/listbox/typeahead.d.ts +8 -0
  296. package/shared/listbox/with-options-filter.d.ts +440 -0
  297. package/shared/listbox/with-options.d.ts +862 -0
  298. package/shared/patterns/affix.d.ts +2 -2
  299. package/shared/patterns/anchored.d.ts +2 -2
  300. package/shared/patterns/char-count/char-count.d.ts +1 -1
  301. package/shared/patterns/form-elements/form-element.d.ts +1 -1
  302. package/shared/patterns/form-elements/with-contextual-help.d.ts +1 -1
  303. package/shared/patterns/form-elements/with-error-text.d.ts +1 -1
  304. package/shared/patterns/form-elements/with-success-text.d.ts +1 -1
  305. package/shared/patterns/kbd-shortcut.d.ts +1 -1
  306. package/shared/patterns/linkable.d.ts +1 -1
  307. package/shared/patterns/localized.d.ts +2 -2
  308. package/shared/patterns/trapped-focus.d.ts +1 -1
  309. package/shared/picker-field/mixins/calendar-picker.d.ts +2 -2
  310. package/shared/picker-field/mixins/calendar-picker.template.d.ts +2 -2
  311. package/shared/picker-field/mixins/inline-time-picker/inline-time-picker.d.ts +1 -1
  312. package/shared/picker-field/mixins/min-max-calendar-picker.d.ts +2 -2
  313. package/shared/picker-field/mixins/single-date-picker.d.ts +2 -2
  314. package/shared/picker-field/mixins/single-value-picker.d.ts +2 -2
  315. package/shared/picker-field/mixins/time-selection-picker.d.ts +2 -2
  316. package/shared/picker-field/mixins/time-selection-picker.template.d.ts +4 -4
  317. package/shared/picker-field/picker-field.d.ts +7 -7
  318. package/side-drawer/definition.cjs +1 -1
  319. package/side-drawer/definition.js +1 -1
  320. package/simple-color-picker/definition.cjs +1 -1
  321. package/simple-color-picker/definition.js +1 -1
  322. package/simple-color-picker/index.cjs +6 -6
  323. package/simple-color-picker/index.js +4 -3
  324. package/split-button/definition.cjs +1 -1
  325. package/split-button/definition.js +1 -1
  326. package/split-button/index.cjs +1 -0
  327. package/split-button/index.js +1 -0
  328. package/status/definition.cjs +1 -1
  329. package/status/definition.js +1 -1
  330. package/switch/definition.cjs +1 -1
  331. package/switch/definition.js +1 -1
  332. package/switch/index.cjs +6 -5
  333. package/switch/index.js +16 -14
  334. package/tab/definition.cjs +1 -1
  335. package/tab/definition.js +1 -1
  336. package/tab-panel/definition.cjs +1 -1
  337. package/tab-panel/definition.js +1 -1
  338. package/table/definition.cjs +1 -1
  339. package/table/definition.js +1 -1
  340. package/table/index.cjs +13 -13
  341. package/table/index.js +4 -3
  342. package/tabs/definition.cjs +1 -1
  343. package/tabs/definition.js +1 -1
  344. package/tag/definition.cjs +1 -1
  345. package/tag/definition.js +1 -1
  346. package/tag/index.cjs +11 -11
  347. package/tag/index.js +4 -3
  348. package/tag-group/definition.cjs +1 -1
  349. package/tag-group/definition.js +1 -1
  350. package/text-area/definition.cjs +1 -1
  351. package/text-area/definition.js +1 -1
  352. package/time-picker/definition.cjs +1 -1
  353. package/time-picker/definition.js +1 -1
  354. package/tree-item/definition.cjs +1 -1
  355. package/tree-item/definition.js +1 -1
  356. package/tree-view/definition.cjs +1 -1
  357. package/tree-view/definition.js +1 -1
  358. package/unbundled/affix.cjs +2 -2
  359. package/unbundled/affix.js +1 -1
  360. package/unbundled/base-progress.cjs +1 -1
  361. package/unbundled/base-progress.js +1 -1
  362. package/unbundled/button.cjs +2 -2
  363. package/unbundled/button.js +2 -2
  364. package/unbundled/definition.cjs +2 -65
  365. package/unbundled/definition.js +4 -61
  366. package/unbundled/definition11.cjs +4 -3
  367. package/unbundled/definition11.js +3 -2
  368. package/unbundled/definition12.cjs +3 -2
  369. package/unbundled/definition12.js +3 -2
  370. package/unbundled/definition13.cjs +1 -1
  371. package/unbundled/definition13.js +1 -1
  372. package/unbundled/definition14.cjs +2 -1
  373. package/unbundled/definition14.js +2 -1
  374. package/unbundled/definition17.cjs +9 -4
  375. package/unbundled/definition17.js +9 -4
  376. package/unbundled/definition2.cjs +14 -3
  377. package/unbundled/definition2.js +15 -4
  378. package/unbundled/definition21.cjs +2 -1
  379. package/unbundled/definition21.js +2 -1
  380. package/unbundled/definition23.cjs +3 -1
  381. package/unbundled/definition23.js +4 -2
  382. package/unbundled/definition24.cjs +6 -4
  383. package/unbundled/definition24.js +6 -4
  384. package/unbundled/definition25.cjs +2 -1
  385. package/unbundled/definition25.js +2 -1
  386. package/unbundled/definition26.cjs +7 -4
  387. package/unbundled/definition26.js +7 -4
  388. package/unbundled/definition27.cjs +39 -5
  389. package/unbundled/definition27.js +40 -6
  390. package/unbundled/definition28.cjs +4 -3
  391. package/unbundled/definition28.js +4 -3
  392. package/unbundled/definition29.cjs +5 -168
  393. package/unbundled/definition29.js +11 -162
  394. package/unbundled/definition30.cjs +26 -506
  395. package/unbundled/definition30.js +24 -498
  396. package/unbundled/definition31.cjs +503 -39
  397. package/unbundled/definition31.js +501 -37
  398. package/unbundled/definition32.cjs +39 -239
  399. package/unbundled/definition32.js +36 -236
  400. package/unbundled/definition33.cjs +236 -74
  401. package/unbundled/definition33.js +233 -71
  402. package/unbundled/definition34.cjs +74 -1968
  403. package/unbundled/definition34.js +70 -1940
  404. package/unbundled/definition35.cjs +1993 -26
  405. package/unbundled/definition35.js +1965 -27
  406. package/unbundled/definition36.cjs +26 -111
  407. package/unbundled/definition36.js +23 -103
  408. package/unbundled/definition37.cjs +53 -294
  409. package/unbundled/definition37.js +50 -291
  410. package/unbundled/definition38.cjs +282 -132
  411. package/unbundled/definition38.js +279 -129
  412. package/unbundled/definition39.cjs +165 -339
  413. package/unbundled/definition39.js +163 -337
  414. package/unbundled/definition40.cjs +395 -227
  415. package/unbundled/definition40.js +393 -225
  416. package/unbundled/definition41.cjs +269 -47
  417. package/unbundled/definition41.js +264 -42
  418. package/unbundled/definition42.cjs +48 -67
  419. package/unbundled/definition42.js +45 -64
  420. package/unbundled/definition43.cjs +56 -383
  421. package/unbundled/definition43.js +55 -382
  422. package/unbundled/definition44.cjs +387 -44
  423. package/unbundled/definition44.js +383 -40
  424. package/unbundled/definition45.cjs +53 -45
  425. package/unbundled/definition45.js +49 -41
  426. package/unbundled/definition46.cjs +40 -164
  427. package/unbundled/definition46.js +36 -160
  428. package/unbundled/definition47.cjs +171 -31
  429. package/unbundled/definition47.js +168 -22
  430. package/unbundled/definition48.cjs +30 -89
  431. package/unbundled/definition48.js +22 -87
  432. package/unbundled/definition49.cjs +589 -48
  433. package/unbundled/definition49.js +587 -47
  434. package/unbundled/definition50.cjs +90 -21
  435. package/unbundled/definition50.js +88 -16
  436. package/unbundled/definition51.cjs +47 -32
  437. package/unbundled/definition51.js +44 -29
  438. package/unbundled/definition52.cjs +22 -323
  439. package/unbundled/definition52.js +16 -320
  440. package/unbundled/definition53.cjs +33 -212
  441. package/unbundled/definition53.js +29 -208
  442. package/unbundled/definition54.cjs +318 -41
  443. package/unbundled/definition54.js +314 -37
  444. package/unbundled/definition55.cjs +199 -253
  445. package/unbundled/definition55.js +193 -247
  446. package/unbundled/definition56.cjs +45 -53
  447. package/unbundled/definition56.js +42 -49
  448. package/unbundled/definition57.cjs +255 -133
  449. package/unbundled/definition57.js +253 -128
  450. package/unbundled/definition58.cjs +49 -245
  451. package/unbundled/definition58.js +47 -244
  452. package/unbundled/definition59.cjs +127 -444
  453. package/unbundled/definition59.js +124 -444
  454. package/unbundled/definition6.cjs +2 -1
  455. package/unbundled/definition6.js +2 -1
  456. package/unbundled/definition60.cjs +230 -3746
  457. package/unbundled/definition60.js +223 -3576
  458. package/unbundled/definition61.cjs +427 -739
  459. package/unbundled/definition61.js +425 -737
  460. package/unbundled/definition62.cjs +3762 -103
  461. package/unbundled/definition62.js +3593 -97
  462. package/unbundled/definition63.cjs +678 -886
  463. package/unbundled/definition63.js +672 -877
  464. package/unbundled/definition64.cjs +104 -108
  465. package/unbundled/definition64.js +100 -104
  466. package/unbundled/definition65.cjs +999 -65
  467. package/unbundled/definition65.js +995 -58
  468. package/unbundled/definition66.cjs +105 -155
  469. package/unbundled/definition66.js +101 -151
  470. package/unbundled/definition67.cjs +71 -121
  471. package/unbundled/definition67.js +63 -119
  472. package/unbundled/definition68.cjs +162 -51
  473. package/unbundled/definition68.js +158 -47
  474. package/unbundled/definition69.cjs +117 -75
  475. package/unbundled/definition69.js +116 -71
  476. package/unbundled/definition70.cjs +59 -21
  477. package/unbundled/definition70.js +56 -15
  478. package/unbundled/definition71.cjs +80 -75
  479. package/unbundled/definition71.js +76 -74
  480. package/unbundled/definition72.cjs +20 -305
  481. package/unbundled/definition72.js +14 -230
  482. package/unbundled/definition73.cjs +75 -315
  483. package/unbundled/definition73.js +74 -307
  484. package/unbundled/definition74.cjs +308 -30
  485. package/unbundled/definition74.js +231 -24
  486. package/unbundled/definition75.cjs +314 -109
  487. package/unbundled/definition75.js +304 -106
  488. package/unbundled/definition76.cjs +26 -250
  489. package/unbundled/definition76.js +21 -246
  490. package/unbundled/definition77.cjs +133 -27
  491. package/unbundled/definition77.js +124 -25
  492. package/unbundled/definition78.cjs +230 -116
  493. package/unbundled/definition78.js +227 -107
  494. package/unbundled/definition79.cjs +28 -203
  495. package/unbundled/definition79.js +26 -193
  496. package/unbundled/definition80.cjs +126 -477
  497. package/unbundled/definition80.js +118 -473
  498. package/unbundled/definition81.cjs +221 -0
  499. package/unbundled/definition81.js +202 -0
  500. package/unbundled/definition82.cjs +517 -0
  501. package/unbundled/definition82.js +497 -0
  502. package/unbundled/extractOptions.cjs +21 -0
  503. package/unbundled/extractOptions.js +16 -0
  504. package/unbundled/icon.cjs +67 -0
  505. package/unbundled/icon.js +61 -0
  506. package/unbundled/linkable.cjs +1 -1
  507. package/unbundled/linkable.js +1 -1
  508. package/unbundled/listbox.cjs +29 -7
  509. package/unbundled/listbox.js +29 -7
  510. package/unbundled/mixins.cjs +2 -1
  511. package/unbundled/mixins.js +2 -1
  512. package/unbundled/optgroup.cjs +66 -0
  513. package/unbundled/optgroup.js +54 -0
  514. package/unbundled/option.cjs +176 -0
  515. package/unbundled/option.js +164 -0
  516. package/unbundled/time-selection-picker.template.cjs +1 -1
  517. package/unbundled/time-selection-picker.template.js +1 -1
  518. package/unbundled/vivid-element.cjs +10 -1
  519. package/unbundled/vivid-element.js +10 -1
  520. package/video-player/definition.cjs +1 -1
  521. package/video-player/definition.js +1 -1
  522. package/vivid.api.json +568 -231
@@ -2,278 +2,82 @@ require("./chunk.cjs");
2
2
  const require_vivid_element = require("./vivid-element.cjs");
3
3
  const require_decorate = require("./decorate.cjs");
4
4
  const require_delegates_aria = require("./delegates-aria.cjs");
5
- const require_key_codes = require("./key-codes.cjs");
6
- const require_mixins = require("./mixins.cjs");
7
- const require_definition = require("./definition57.cjs");
5
+ const require_base_progress = require("./base-progress.cjs");
8
6
  let _microsoft_fast_element = require("@microsoft/fast-element");
9
7
  let _microsoft_fast_web_utilities = require("@microsoft/fast-web-utilities");
10
- //#region src/lib/radio-group/radio-group.scss?inline
11
- var radio_group_default = ".base{--_low-ink-color:var(--vvd-color-neutral-600);flex-direction:column;gap:8px;display:flex}.positioning-region{flex-wrap:wrap;gap:8px;display:flex}.positioning-region.vertical{flex-direction:column}fieldset{border:none;margin:0;padding:0;display:block}legend{color:var(--vvd-color-canvas-text);font:var(--vvd-typography-base);margin-block-end:8px;padding:0}";
8
+ //#region src/lib/progress/progress.scss?inline
9
+ var progress_default = ".base{outline:none;align-items:center;height:6px;margin:0}.base:not(.connotation-pacific).connotation-cta{--_connotation-color-primary:var(--vvd-progress-cta-primary,var(--vvd-color-cta-500));--_connotation-color-soft:var(--vvd-progress-cta-soft,var(--vvd-color-cta-100))}.base:not(.connotation-pacific).connotation-alert{--_connotation-color-primary:var(--vvd-progress-alert-primary,var(--vvd-color-alert-500));--_connotation-color-soft:var(--vvd-progress-alert-soft,var(--vvd-color-alert-100))}.base:not(.connotation-pacific).connotation-success{--_connotation-color-primary:var(--vvd-progress-success-primary,var(--vvd-color-success-500));--_connotation-color-soft:var(--vvd-progress-success-soft,var(--vvd-color-success-100))}.base:not(.connotation-pacific):not(.connotation-cta,.connotation-alert,.connotation-success){--_connotation-color-primary:var(--vvd-progress-accent-primary,var(--vvd-color-canvas-text));--_connotation-color-soft:var(--vvd-progress-accent-soft,var(--vvd-color-neutral-100))}.base:not(.connotation-pacific){--_appearance-color-text:var(--_connotation-color-contrast);--_appearance-color-fill:var(--_connotation-color-soft);--_appearance-color-outline:transparent}.base.connotation-pacific{--_connotation-color-primary:linear-gradient(to right, var(--vvd-color-information-200), var(--vvd-color-cta-600))}.progress{align-items:center;block-size:100%;inline-size:100%;display:flex;position:relative;overflow:hidden}.base:not(.connotation-pacific) .progress{background-color:var(--_appearance-color-fill)}.base.connotation-pacific .progress{background-color:var(--vvd-color-neutral-100)}.base:not(.shape-sharp) .progress{border-radius:4px}.indeterminate{border-radius:inherit;background-color:var(--_connotation-color-primary);block-size:100%;inline-size:100%;display:flex}.determinate{border-radius:inherit;background-color:var(--_connotation-color-primary);block-size:100%;transition:all .2s ease-in-out}.connotation-pacific .determinate{background-image:var(--_connotation-color-primary)}.reverse .determinate{position:absolute;right:0}.paused .determinate{background:var(--vvd-color-neutral-300)}.indicator-1{inline-size:30%;animation:2s infinite indeterminate-1}.indicator-2{inline-size:60%;animation:2s infinite indeterminate-2}.indicator-1,.indicator-2{background-color:var(--vvd-color-neutral-100);opacity:0;block-size:100%;animation-timing-function:cubic-bezier(.4,0,.6,1);position:absolute}.connotation-pacific .indicator-1,.connotation-pacific .indicator-2{background-image:var(--_connotation-color-primary)}.paused .indicator-1,.paused .indicator-2{background-color:var(--_connotation-color-primary);animation-play-state:paused}.reverse .indicator-1,.reverse .indicator-2{animation-direction:reverse}@keyframes indeterminate-1{0%{opacity:1;transform:translate(-100%)}70%{opacity:1;transform:translate(300%)}70.01%{opacity:0}to{opacity:0;transform:translate(300%)}}@keyframes indeterminate-2{0%{opacity:0;transform:translate(-150%)}29.99%{opacity:0}30%{opacity:1;transform:translate(-150%)}to{opacity:1;transform:translate(166.66%)}}";
12
10
  //#endregion
13
- //#region src/lib/radio-group/radio-group.ts
11
+ //#region src/lib/progress/progress.ts
14
12
  /**
15
13
  * @public
16
- * @component radio-group
17
- * @slot - Default slot.
18
- * @slot helper-text - Describes how to use the text-field. Alternative to the `helper-text` attribute.
19
- * @event {CustomEvent<undefined>} change - Fires a custom 'change' event when the value changes
20
- * @vueModel modelValue value change `event.currentTarget.value`
14
+ * @component progress
21
15
  */
22
- var RadioGroup = class extends require_mixins.WithFeedback(require_vivid_element.VividElement) {
16
+ var Progress = class extends require_delegates_aria.DelegatesAria(require_base_progress.BaseProgress) {
23
17
  constructor(..._args) {
24
18
  super(..._args);
25
- this.errorValidationMessage = "";
26
- this.orientation = _microsoft_fast_web_utilities.Orientation.horizontal;
27
- this.slottedRadioButtons = [];
28
- this.radioErrorHandler = (e) => {
29
- const radio = e.target;
30
- this.errorValidationMessage = radio.errorValidationMessage || "";
31
- };
32
- this.radioChangeHandler = (e) => {
33
- const changedRadio = e.target;
34
- if (changedRadio.checked) {
35
- this.slottedRadioButtons.forEach((radio) => {
36
- if (radio !== changedRadio) radio.checked = false;
37
- });
38
- this.value = changedRadio.value;
39
- this.#setTabRovingTarget(changedRadio);
40
- }
41
- e.stopPropagation();
42
- };
43
- this.moveToRadioByIndex = (group, index) => {
44
- const radio = group[index];
45
- if (!this.isInsideToolbar && !radio.readOnly) radio.checked = true;
46
- radio.focus();
47
- };
48
- this.moveRightOffGroup = () => {
49
- const next = this.nextElementSibling;
50
- if (next instanceof HTMLElement) next.focus();
51
- };
52
- this.moveLeftOffGroup = () => {
53
- const prev = this.previousElementSibling;
54
- if (prev instanceof HTMLElement) prev.focus();
55
- };
56
- this.moveRight = (e) => {
57
- const radio = e.target;
58
- const group = this.#focusableRadioButtons;
59
- let index = group.indexOf(radio) + 1;
60
- if (index === group.length && this.isInsideToolbar && e.key === "ArrowRight") {
61
- this.moveRightOffGroup();
62
- return;
63
- }
64
- if (index === group.length) index = 0;
65
- this.moveToRadioByIndex(group, index);
66
- };
67
- this.moveLeft = (e) => {
68
- const radio = e.target;
69
- const group = this.#focusableRadioButtons;
70
- let index = group.indexOf(radio) - 1;
71
- if (this.isInsideToolbar && e.key === "ArrowLeft" && index < 0) {
72
- this.moveLeftOffGroup();
73
- return;
74
- }
75
- index = index < 0 ? group.length - 1 : index;
76
- this.moveToRadioByIndex(group, index);
77
- };
78
- this.keydownHandler = (e) => {
79
- switch (e.key) {
80
- case _microsoft_fast_web_utilities.keyEnter:
81
- this.checkFocusedRadio(e.target);
82
- return;
83
- case require_key_codes.keyArrowRight:
84
- case _microsoft_fast_web_utilities.keyArrowDown:
85
- this.moveRight(e);
86
- return;
87
- case require_key_codes.keyArrowLeft:
88
- case _microsoft_fast_web_utilities.keyArrowUp:
89
- this.moveLeft(e);
90
- return;
91
- default: return true;
92
- }
93
- };
94
- }
95
- /** @internal */
96
- requiredChanged() {
97
- this.slottedRadioButtons.forEach((radio) => {
98
- if (this.required) radio.required = true;
99
- else radio.required = false;
100
- });
101
- }
102
- /** @internal */
103
- readOnlyChanged() {
104
- this.slottedRadioButtons.forEach((radio) => {
105
- if (this.readOnly) radio.readOnly = true;
106
- else radio.readOnly = false;
107
- });
108
- }
109
- /** @internal */
110
- disabledChanged() {
111
- this.slottedRadioButtons.forEach((radio) => {
112
- if (this.disabled) radio.disabled = true;
113
- else radio.disabled = false;
114
- });
115
- }
116
- nameChanged() {
117
- this.slottedRadioButtons.forEach((radio) => {
118
- radio.setAttribute("name", this.name);
119
- });
120
- }
121
- /** @internal */
122
- valueChanged() {
123
- this.slottedRadioButtons.forEach((radio) => {
124
- if (radio.value === this.value) radio.checked = true;
125
- });
126
- this.$emit("change");
127
- }
128
- /** @internal */
129
- handleSlotChange() {
130
- if (this.errorText) this.slottedRadioButtons.forEach((radio) => {
131
- radio.errorText = this.errorText;
132
- });
133
- }
134
- /** @internal */
135
- errorTextChanged(_, newErrorText) {
136
- if (newErrorText) this.errorValidationMessage = newErrorText;
137
- else this.errorValidationMessage = "";
138
- }
139
- get #focusableRadioButtons() {
140
- return this.slottedRadioButtons.filter((radio) => !radio.disabled);
141
- }
142
- /** @internal */
143
- slottedRadioButtonsChanged() {
144
- if (this.slottedRadioButtons.length > 0) this.setupRadioButtons();
145
- }
146
- get isInsideToolbar() {
147
- return !!this.closest("[role=\"toolbar\"]");
148
- }
149
- /** @internal */
150
- connectedCallback() {
151
- super.connectedCallback();
152
- this.setupRadioButtons();
153
- }
154
- disconnectedCallback() {
155
- this.slottedRadioButtons.forEach((radio) => {
156
- radio.removeEventListener("change", this.radioChangeHandler);
157
- radio.removeEventListener("invalid", this.radioErrorHandler);
158
- });
159
- }
160
- setupRadioButtons() {
161
- let foundMatchingVal = false;
162
- for (const radio of this.slottedRadioButtons) {
163
- if (this.name !== void 0) radio.setAttribute("name", this.name);
164
- if (this.disabled) radio.disabled = true;
165
- if (this.readOnly) radio.readOnly = true;
166
- if (this.required) radio.required = true;
167
- if (this.value && this.value === radio.value) {
168
- radio.checked = true;
169
- this.#setTabRovingTarget(radio);
170
- foundMatchingVal = true;
171
- } else radio.checked = false;
172
- radio.addEventListener("change", this.radioChangeHandler);
173
- radio.addEventListener("invalid", this.radioErrorHandler);
174
- }
175
- if (this.value === void 0 && this.slottedRadioButtons.length > 0) {
176
- const checkedRadios = this.slottedRadioButtons.filter((radio) => radio.hasAttribute("checked"));
177
- if (checkedRadios.length > 0 && !foundMatchingVal) {
178
- const lastCheckedRadio = checkedRadios[checkedRadios.length - 1];
179
- lastCheckedRadio.checked = true;
180
- this.#setTabRovingTarget(lastCheckedRadio);
181
- } else this.#setTabRovingTarget(this.slottedRadioButtons[0]);
182
- }
183
- }
184
- /** @internal */
185
- focusInHandler(e) {
186
- this.#setTabRovingTarget(e.target);
187
- }
188
- #setTabRovingTarget(radio) {
189
- radio.setAttribute("tabindex", "0");
190
- for (const slottedRadio of this.slottedRadioButtons) if (slottedRadio !== radio) slottedRadio.setAttribute("tabindex", "-1");
191
- }
192
- checkFocusedRadio(target) {
193
- if (!target.readOnly) target.checked = true;
19
+ this.reverse = false;
194
20
  }
195
21
  };
196
- require_decorate.__decorate([_microsoft_fast_element.attr], RadioGroup.prototype, "label", void 0);
197
- require_decorate.__decorate([(0, _microsoft_fast_element.attr)({
198
- attribute: "required",
199
- mode: "boolean"
200
- })], RadioGroup.prototype, "required", void 0);
201
- require_decorate.__decorate([(0, _microsoft_fast_element.attr)({
202
- attribute: "readonly",
203
- mode: "boolean"
204
- })], RadioGroup.prototype, "readOnly", void 0);
205
- require_decorate.__decorate([(0, _microsoft_fast_element.attr)({
206
- attribute: "disabled",
207
- mode: "boolean"
208
- })], RadioGroup.prototype, "disabled", void 0);
209
- require_decorate.__decorate([_microsoft_fast_element.attr], RadioGroup.prototype, "name", void 0);
210
- require_decorate.__decorate([_microsoft_fast_element.attr], RadioGroup.prototype, "value", void 0);
211
- require_decorate.__decorate([_microsoft_fast_element.observable], RadioGroup.prototype, "errorValidationMessage", void 0);
212
- require_decorate.__decorate([(0, _microsoft_fast_element.attr)({ attribute: "error-text" })], RadioGroup.prototype, "errorText", void 0);
213
- require_decorate.__decorate([_microsoft_fast_element.attr], RadioGroup.prototype, "orientation", void 0);
214
- require_decorate.__decorate([_microsoft_fast_element.observable], RadioGroup.prototype, "slottedRadioButtons", void 0);
22
+ require_decorate.__decorate([(0, _microsoft_fast_element.attr)()], Progress.prototype, "shape", void 0);
23
+ require_decorate.__decorate([(0, _microsoft_fast_element.attr)()], Progress.prototype, "connotation", void 0);
24
+ require_decorate.__decorate([(0, _microsoft_fast_element.attr)({ mode: "boolean" })], Progress.prototype, "reverse", void 0);
215
25
  //#endregion
216
- //#region src/lib/radio-group/radio-group.template.ts
217
- var RadioGroupTemplate = (context) => {
218
- const radioTagName = context.tagFor(require_definition.Radio, true);
219
- return _microsoft_fast_element.html`
220
- <template
221
- @keydown="${(x, c) => x.keydownHandler(c.event)}"
222
- @focusin="${(x, c) => x.focusInHandler(c.event)}"
223
- >
224
- <div class="base">
225
- <fieldset
226
- ${require_delegates_aria.delegateAria({
227
- role: "radiogroup",
228
- ariaDisabled: (x) => x.disabled,
229
- ariaReadOnly: (x) => x.readOnly,
230
- ariaOrientation: (x) => x.orientation,
231
- ariaInvalid: (x) => x.errorText ? "true" : "false",
232
- ariaLabelledBy: "label",
233
- ariaDescribedBy: (x) => x._feedbackDescribedBy
234
- })}
235
- class="control positioning-region ${(x) => x.orientation === _microsoft_fast_web_utilities.Orientation.horizontal ? "horizontal" : "vertical"}"
236
- >
237
- ${(0, _microsoft_fast_element.when)((x) => x.label, _microsoft_fast_element.html`<legend id="label">${(x) => x.label}</legend>`)}
238
- <slot
239
- ${(0, _microsoft_fast_element.slotted)({
240
- property: "slottedRadioButtons",
241
- filter: (0, _microsoft_fast_element.elements)(radioTagName)
242
- })}
243
- @slotchange="${(x) => x.handleSlotChange()}"
244
- ></slot>
245
- </fieldset>
246
- ${(x) => x._getFeedbackTemplate(context)}
247
- </div>
248
- </template>
249
- `;
250
- };
26
+ //#region src/lib/progress/progress.template.ts
27
+ function determinate() {
28
+ return _microsoft_fast_element.html` <span
29
+ class="determinate"
30
+ style="width: ${(x) => x.percentComplete}%"
31
+ ></span>`;
32
+ }
33
+ function indeterminate() {
34
+ return _microsoft_fast_element.html` <span class="indeterminate" name="indeterminate">
35
+ <span class="indicator-1"></span>
36
+ <span class="indicator-2"></span>
37
+ </span>`;
38
+ }
39
+ var ProgressTemplate = _microsoft_fast_element.html`<template>
40
+ <div
41
+ class="${(x) => (0, _microsoft_fast_web_utilities.classNames)("base", [`connotation-${x.connotation}`, Boolean(x.connotation)], [`shape-${x.shape}`, Boolean(x.shape)], ["reverse", x.reverse], ["paused", x.paused])}"
42
+ ${require_delegates_aria.delegateAria({
43
+ role: "progressbar",
44
+ ariaValueNow: (x) => x.value,
45
+ ariaValueMin: (x) => x.min,
46
+ ariaValueMax: (x) => x.max
47
+ })}
48
+ >
49
+ <div class="progress">
50
+ ${(0, _microsoft_fast_element.when)((x) => typeof x.value === "number", determinate())}
51
+ ${(0, _microsoft_fast_element.when)((x) => typeof x.value !== "number", indeterminate())}
52
+ </div>
53
+ </div>
54
+ </template>`;
251
55
  //#endregion
252
- //#region src/lib/radio-group/definition.ts
56
+ //#region src/lib/progress/definition.ts
253
57
  /** @internal */
254
- var radioGroupDefinition = require_vivid_element.defineVividComponent("radio-group", RadioGroup, RadioGroupTemplate, [require_definition.radioDefinition, require_mixins.feedbackMessageDefinition], { styles: radio_group_default });
58
+ var progressDefinition = require_vivid_element.defineVividComponent("progress", Progress, ProgressTemplate, [], { styles: progress_default });
255
59
  /**
256
- * Registers the radio-group elements with the design system.
60
+ * Registers the progress elements with the design system.
257
61
  *
258
62
  * @param prefix - the prefix to use for the component name
259
63
  */
260
- var registerRadioGroup = require_vivid_element.createRegisterFunction(radioGroupDefinition);
64
+ var registerProgress = require_vivid_element.createRegisterFunction(progressDefinition);
261
65
  //#endregion
262
- Object.defineProperty(exports, "RadioGroup", {
66
+ Object.defineProperty(exports, "Progress", {
263
67
  enumerable: true,
264
68
  get: function() {
265
- return RadioGroup;
69
+ return Progress;
266
70
  }
267
71
  });
268
- Object.defineProperty(exports, "radioGroupDefinition", {
72
+ Object.defineProperty(exports, "progressDefinition", {
269
73
  enumerable: true,
270
74
  get: function() {
271
- return radioGroupDefinition;
75
+ return progressDefinition;
272
76
  }
273
77
  });
274
- Object.defineProperty(exports, "registerRadioGroup", {
78
+ Object.defineProperty(exports, "registerProgress", {
275
79
  enumerable: true,
276
80
  get: function() {
277
- return registerRadioGroup;
81
+ return registerProgress;
278
82
  }
279
83
  });
@@ -1,261 +1,64 @@
1
- import { d as createRegisterFunction, t as VividElement, u as defineVividComponent } from "./vivid-element.js";
1
+ import { d as createRegisterFunction, u as defineVividComponent } from "./vivid-element.js";
2
2
  import { t as __decorate } from "./decorate.js";
3
- import { n as delegateAria } from "./delegates-aria.js";
4
- import { n as keyArrowRight$1, t as keyArrowLeft$1 } from "./key-codes.js";
5
- import { r as feedbackMessageDefinition, t as WithFeedback } from "./mixins.js";
6
- import { r as Radio, t as radioDefinition } from "./definition57.js";
7
- import { attr, elements, html, observable, slotted, when } from "@microsoft/fast-element";
8
- import { Orientation, keyArrowDown, keyArrowUp, keyEnter } from "@microsoft/fast-web-utilities";
9
- //#region src/lib/radio-group/radio-group.scss?inline
10
- var radio_group_default = ".base{--_low-ink-color:var(--vvd-color-neutral-600);flex-direction:column;gap:8px;display:flex}.positioning-region{flex-wrap:wrap;gap:8px;display:flex}.positioning-region.vertical{flex-direction:column}fieldset{border:none;margin:0;padding:0;display:block}legend{color:var(--vvd-color-canvas-text);font:var(--vvd-typography-base);margin-block-end:8px;padding:0}";
3
+ import { n as delegateAria, t as DelegatesAria } from "./delegates-aria.js";
4
+ import { t as BaseProgress } from "./base-progress.js";
5
+ import { attr, html, when } from "@microsoft/fast-element";
6
+ import { classNames } from "@microsoft/fast-web-utilities";
7
+ //#region src/lib/progress/progress.scss?inline
8
+ var progress_default = ".base{outline:none;align-items:center;height:6px;margin:0}.base:not(.connotation-pacific).connotation-cta{--_connotation-color-primary:var(--vvd-progress-cta-primary,var(--vvd-color-cta-500));--_connotation-color-soft:var(--vvd-progress-cta-soft,var(--vvd-color-cta-100))}.base:not(.connotation-pacific).connotation-alert{--_connotation-color-primary:var(--vvd-progress-alert-primary,var(--vvd-color-alert-500));--_connotation-color-soft:var(--vvd-progress-alert-soft,var(--vvd-color-alert-100))}.base:not(.connotation-pacific).connotation-success{--_connotation-color-primary:var(--vvd-progress-success-primary,var(--vvd-color-success-500));--_connotation-color-soft:var(--vvd-progress-success-soft,var(--vvd-color-success-100))}.base:not(.connotation-pacific):not(.connotation-cta,.connotation-alert,.connotation-success){--_connotation-color-primary:var(--vvd-progress-accent-primary,var(--vvd-color-canvas-text));--_connotation-color-soft:var(--vvd-progress-accent-soft,var(--vvd-color-neutral-100))}.base:not(.connotation-pacific){--_appearance-color-text:var(--_connotation-color-contrast);--_appearance-color-fill:var(--_connotation-color-soft);--_appearance-color-outline:transparent}.base.connotation-pacific{--_connotation-color-primary:linear-gradient(to right, var(--vvd-color-information-200), var(--vvd-color-cta-600))}.progress{align-items:center;block-size:100%;inline-size:100%;display:flex;position:relative;overflow:hidden}.base:not(.connotation-pacific) .progress{background-color:var(--_appearance-color-fill)}.base.connotation-pacific .progress{background-color:var(--vvd-color-neutral-100)}.base:not(.shape-sharp) .progress{border-radius:4px}.indeterminate{border-radius:inherit;background-color:var(--_connotation-color-primary);block-size:100%;inline-size:100%;display:flex}.determinate{border-radius:inherit;background-color:var(--_connotation-color-primary);block-size:100%;transition:all .2s ease-in-out}.connotation-pacific .determinate{background-image:var(--_connotation-color-primary)}.reverse .determinate{position:absolute;right:0}.paused .determinate{background:var(--vvd-color-neutral-300)}.indicator-1{inline-size:30%;animation:2s infinite indeterminate-1}.indicator-2{inline-size:60%;animation:2s infinite indeterminate-2}.indicator-1,.indicator-2{background-color:var(--vvd-color-neutral-100);opacity:0;block-size:100%;animation-timing-function:cubic-bezier(.4,0,.6,1);position:absolute}.connotation-pacific .indicator-1,.connotation-pacific .indicator-2{background-image:var(--_connotation-color-primary)}.paused .indicator-1,.paused .indicator-2{background-color:var(--_connotation-color-primary);animation-play-state:paused}.reverse .indicator-1,.reverse .indicator-2{animation-direction:reverse}@keyframes indeterminate-1{0%{opacity:1;transform:translate(-100%)}70%{opacity:1;transform:translate(300%)}70.01%{opacity:0}to{opacity:0;transform:translate(300%)}}@keyframes indeterminate-2{0%{opacity:0;transform:translate(-150%)}29.99%{opacity:0}30%{opacity:1;transform:translate(-150%)}to{opacity:1;transform:translate(166.66%)}}";
11
9
  //#endregion
12
- //#region src/lib/radio-group/radio-group.ts
10
+ //#region src/lib/progress/progress.ts
13
11
  /**
14
12
  * @public
15
- * @component radio-group
16
- * @slot - Default slot.
17
- * @slot helper-text - Describes how to use the text-field. Alternative to the `helper-text` attribute.
18
- * @event {CustomEvent<undefined>} change - Fires a custom 'change' event when the value changes
19
- * @vueModel modelValue value change `event.currentTarget.value`
13
+ * @component progress
20
14
  */
21
- var RadioGroup = class extends WithFeedback(VividElement) {
15
+ var Progress = class extends DelegatesAria(BaseProgress) {
22
16
  constructor(..._args) {
23
17
  super(..._args);
24
- this.errorValidationMessage = "";
25
- this.orientation = Orientation.horizontal;
26
- this.slottedRadioButtons = [];
27
- this.radioErrorHandler = (e) => {
28
- const radio = e.target;
29
- this.errorValidationMessage = radio.errorValidationMessage || "";
30
- };
31
- this.radioChangeHandler = (e) => {
32
- const changedRadio = e.target;
33
- if (changedRadio.checked) {
34
- this.slottedRadioButtons.forEach((radio) => {
35
- if (radio !== changedRadio) radio.checked = false;
36
- });
37
- this.value = changedRadio.value;
38
- this.#setTabRovingTarget(changedRadio);
39
- }
40
- e.stopPropagation();
41
- };
42
- this.moveToRadioByIndex = (group, index) => {
43
- const radio = group[index];
44
- if (!this.isInsideToolbar && !radio.readOnly) radio.checked = true;
45
- radio.focus();
46
- };
47
- this.moveRightOffGroup = () => {
48
- const next = this.nextElementSibling;
49
- if (next instanceof HTMLElement) next.focus();
50
- };
51
- this.moveLeftOffGroup = () => {
52
- const prev = this.previousElementSibling;
53
- if (prev instanceof HTMLElement) prev.focus();
54
- };
55
- this.moveRight = (e) => {
56
- const radio = e.target;
57
- const group = this.#focusableRadioButtons;
58
- let index = group.indexOf(radio) + 1;
59
- if (index === group.length && this.isInsideToolbar && e.key === "ArrowRight") {
60
- this.moveRightOffGroup();
61
- return;
62
- }
63
- if (index === group.length) index = 0;
64
- this.moveToRadioByIndex(group, index);
65
- };
66
- this.moveLeft = (e) => {
67
- const radio = e.target;
68
- const group = this.#focusableRadioButtons;
69
- let index = group.indexOf(radio) - 1;
70
- if (this.isInsideToolbar && e.key === "ArrowLeft" && index < 0) {
71
- this.moveLeftOffGroup();
72
- return;
73
- }
74
- index = index < 0 ? group.length - 1 : index;
75
- this.moveToRadioByIndex(group, index);
76
- };
77
- this.keydownHandler = (e) => {
78
- switch (e.key) {
79
- case keyEnter:
80
- this.checkFocusedRadio(e.target);
81
- return;
82
- case keyArrowRight$1:
83
- case keyArrowDown:
84
- this.moveRight(e);
85
- return;
86
- case keyArrowLeft$1:
87
- case keyArrowUp:
88
- this.moveLeft(e);
89
- return;
90
- default: return true;
91
- }
92
- };
93
- }
94
- /** @internal */
95
- requiredChanged() {
96
- this.slottedRadioButtons.forEach((radio) => {
97
- if (this.required) radio.required = true;
98
- else radio.required = false;
99
- });
100
- }
101
- /** @internal */
102
- readOnlyChanged() {
103
- this.slottedRadioButtons.forEach((radio) => {
104
- if (this.readOnly) radio.readOnly = true;
105
- else radio.readOnly = false;
106
- });
107
- }
108
- /** @internal */
109
- disabledChanged() {
110
- this.slottedRadioButtons.forEach((radio) => {
111
- if (this.disabled) radio.disabled = true;
112
- else radio.disabled = false;
113
- });
114
- }
115
- nameChanged() {
116
- this.slottedRadioButtons.forEach((radio) => {
117
- radio.setAttribute("name", this.name);
118
- });
119
- }
120
- /** @internal */
121
- valueChanged() {
122
- this.slottedRadioButtons.forEach((radio) => {
123
- if (radio.value === this.value) radio.checked = true;
124
- });
125
- this.$emit("change");
126
- }
127
- /** @internal */
128
- handleSlotChange() {
129
- if (this.errorText) this.slottedRadioButtons.forEach((radio) => {
130
- radio.errorText = this.errorText;
131
- });
132
- }
133
- /** @internal */
134
- errorTextChanged(_, newErrorText) {
135
- if (newErrorText) this.errorValidationMessage = newErrorText;
136
- else this.errorValidationMessage = "";
137
- }
138
- get #focusableRadioButtons() {
139
- return this.slottedRadioButtons.filter((radio) => !radio.disabled);
140
- }
141
- /** @internal */
142
- slottedRadioButtonsChanged() {
143
- if (this.slottedRadioButtons.length > 0) this.setupRadioButtons();
144
- }
145
- get isInsideToolbar() {
146
- return !!this.closest("[role=\"toolbar\"]");
147
- }
148
- /** @internal */
149
- connectedCallback() {
150
- super.connectedCallback();
151
- this.setupRadioButtons();
152
- }
153
- disconnectedCallback() {
154
- this.slottedRadioButtons.forEach((radio) => {
155
- radio.removeEventListener("change", this.radioChangeHandler);
156
- radio.removeEventListener("invalid", this.radioErrorHandler);
157
- });
158
- }
159
- setupRadioButtons() {
160
- let foundMatchingVal = false;
161
- for (const radio of this.slottedRadioButtons) {
162
- if (this.name !== void 0) radio.setAttribute("name", this.name);
163
- if (this.disabled) radio.disabled = true;
164
- if (this.readOnly) radio.readOnly = true;
165
- if (this.required) radio.required = true;
166
- if (this.value && this.value === radio.value) {
167
- radio.checked = true;
168
- this.#setTabRovingTarget(radio);
169
- foundMatchingVal = true;
170
- } else radio.checked = false;
171
- radio.addEventListener("change", this.radioChangeHandler);
172
- radio.addEventListener("invalid", this.radioErrorHandler);
173
- }
174
- if (this.value === void 0 && this.slottedRadioButtons.length > 0) {
175
- const checkedRadios = this.slottedRadioButtons.filter((radio) => radio.hasAttribute("checked"));
176
- if (checkedRadios.length > 0 && !foundMatchingVal) {
177
- const lastCheckedRadio = checkedRadios[checkedRadios.length - 1];
178
- lastCheckedRadio.checked = true;
179
- this.#setTabRovingTarget(lastCheckedRadio);
180
- } else this.#setTabRovingTarget(this.slottedRadioButtons[0]);
181
- }
182
- }
183
- /** @internal */
184
- focusInHandler(e) {
185
- this.#setTabRovingTarget(e.target);
186
- }
187
- #setTabRovingTarget(radio) {
188
- radio.setAttribute("tabindex", "0");
189
- for (const slottedRadio of this.slottedRadioButtons) if (slottedRadio !== radio) slottedRadio.setAttribute("tabindex", "-1");
190
- }
191
- checkFocusedRadio(target) {
192
- if (!target.readOnly) target.checked = true;
18
+ this.reverse = false;
193
19
  }
194
20
  };
195
- __decorate([attr], RadioGroup.prototype, "label", void 0);
196
- __decorate([attr({
197
- attribute: "required",
198
- mode: "boolean"
199
- })], RadioGroup.prototype, "required", void 0);
200
- __decorate([attr({
201
- attribute: "readonly",
202
- mode: "boolean"
203
- })], RadioGroup.prototype, "readOnly", void 0);
204
- __decorate([attr({
205
- attribute: "disabled",
206
- mode: "boolean"
207
- })], RadioGroup.prototype, "disabled", void 0);
208
- __decorate([attr], RadioGroup.prototype, "name", void 0);
209
- __decorate([attr], RadioGroup.prototype, "value", void 0);
210
- __decorate([observable], RadioGroup.prototype, "errorValidationMessage", void 0);
211
- __decorate([attr({ attribute: "error-text" })], RadioGroup.prototype, "errorText", void 0);
212
- __decorate([attr], RadioGroup.prototype, "orientation", void 0);
213
- __decorate([observable], RadioGroup.prototype, "slottedRadioButtons", void 0);
21
+ __decorate([attr()], Progress.prototype, "shape", void 0);
22
+ __decorate([attr()], Progress.prototype, "connotation", void 0);
23
+ __decorate([attr({ mode: "boolean" })], Progress.prototype, "reverse", void 0);
214
24
  //#endregion
215
- //#region src/lib/radio-group/radio-group.template.ts
216
- var RadioGroupTemplate = (context) => {
217
- const radioTagName = context.tagFor(Radio, true);
218
- return html`
219
- <template
220
- @keydown="${(x, c) => x.keydownHandler(c.event)}"
221
- @focusin="${(x, c) => x.focusInHandler(c.event)}"
222
- >
223
- <div class="base">
224
- <fieldset
225
- ${delegateAria({
226
- role: "radiogroup",
227
- ariaDisabled: (x) => x.disabled,
228
- ariaReadOnly: (x) => x.readOnly,
229
- ariaOrientation: (x) => x.orientation,
230
- ariaInvalid: (x) => x.errorText ? "true" : "false",
231
- ariaLabelledBy: "label",
232
- ariaDescribedBy: (x) => x._feedbackDescribedBy
233
- })}
234
- class="control positioning-region ${(x) => x.orientation === Orientation.horizontal ? "horizontal" : "vertical"}"
235
- >
236
- ${when((x) => x.label, html`<legend id="label">${(x) => x.label}</legend>`)}
237
- <slot
238
- ${slotted({
239
- property: "slottedRadioButtons",
240
- filter: elements(radioTagName)
241
- })}
242
- @slotchange="${(x) => x.handleSlotChange()}"
243
- ></slot>
244
- </fieldset>
245
- ${(x) => x._getFeedbackTemplate(context)}
246
- </div>
247
- </template>
248
- `;
249
- };
25
+ //#region src/lib/progress/progress.template.ts
26
+ function determinate() {
27
+ return html` <span
28
+ class="determinate"
29
+ style="width: ${(x) => x.percentComplete}%"
30
+ ></span>`;
31
+ }
32
+ function indeterminate() {
33
+ return html` <span class="indeterminate" name="indeterminate">
34
+ <span class="indicator-1"></span>
35
+ <span class="indicator-2"></span>
36
+ </span>`;
37
+ }
250
38
  //#endregion
251
- //#region src/lib/radio-group/definition.ts
39
+ //#region src/lib/progress/definition.ts
252
40
  /** @internal */
253
- var radioGroupDefinition = defineVividComponent("radio-group", RadioGroup, RadioGroupTemplate, [radioDefinition, feedbackMessageDefinition], { styles: radio_group_default });
41
+ var progressDefinition = defineVividComponent("progress", Progress, html`<template>
42
+ <div
43
+ class="${(x) => classNames("base", [`connotation-${x.connotation}`, Boolean(x.connotation)], [`shape-${x.shape}`, Boolean(x.shape)], ["reverse", x.reverse], ["paused", x.paused])}"
44
+ ${delegateAria({
45
+ role: "progressbar",
46
+ ariaValueNow: (x) => x.value,
47
+ ariaValueMin: (x) => x.min,
48
+ ariaValueMax: (x) => x.max
49
+ })}
50
+ >
51
+ <div class="progress">
52
+ ${when((x) => typeof x.value === "number", determinate())}
53
+ ${when((x) => typeof x.value !== "number", indeterminate())}
54
+ </div>
55
+ </div>
56
+ </template>`, [], { styles: progress_default });
254
57
  /**
255
- * Registers the radio-group elements with the design system.
58
+ * Registers the progress elements with the design system.
256
59
  *
257
60
  * @param prefix - the prefix to use for the component name
258
61
  */
259
- var registerRadioGroup = createRegisterFunction(radioGroupDefinition);
62
+ var registerProgress = createRegisterFunction(progressDefinition);
260
63
  //#endregion
261
- export { registerRadioGroup as n, RadioGroup as r, radioGroupDefinition as t };
64
+ export { registerProgress as n, Progress as r, progressDefinition as t };