@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,75 +2,539 @@ require("./chunk.cjs");
2
2
  const require_vivid_element = require("./vivid-element.cjs");
3
3
  const require_definition = require("./definition.cjs");
4
4
  const require_decorate = require("./decorate.cjs");
5
- const require_utils = require("./utils.cjs");
5
+ const require_affix = require("./affix.cjs");
6
+ const require_form_associated = require("./form-associated.cjs");
7
+ const require_definition$1 = require("./definition6.cjs");
8
+ const require_dialog = require("./dialog.cjs");
9
+ const require_definition$2 = require("./definition9.cjs");
10
+ const require_mixins = require("./mixins.cjs");
11
+ const require_form_element = require("./form-element.cjs");
12
+ const require_with_error_text = require("./with-error-text.cjs");
13
+ const require_with_success_text = require("./with-success-text.cjs");
14
+ const require_with_contextual_help = require("./with-contextual-help.cjs");
15
+ const require_text_field = require("./text-field.cjs");
16
+ const require_option = require("./option.cjs");
17
+ const require_definition$3 = require("./definition29.cjs");
18
+ const require_optgroup = require("./optgroup.cjs");
19
+ const require_definition$4 = require("./definition30.cjs");
20
+ const require_listbox = require("./listbox.cjs");
6
21
  let _microsoft_fast_element = require("@microsoft/fast-element");
7
- //#region src/lib/country/country.scss?inline
8
- var country_default = ":host{display:inline-flex}.base{align-items:center;column-gap:8px;display:inline-flex}.icon{align-items:center;display:inline-flex}.icon [data-vvd-component=icon]{block-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) - 16));flex-shrink:0;inline-size:auto}.icon ::slotted(*){block-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) - 16));object-fit:contain;border-radius:2px;inline-size:auto;display:block}.text{color:var(--vvd-color-canvas-text);font:var(--vvd-typography-base)}";
22
+ let _microsoft_fast_web_utilities = require("@microsoft/fast-web-utilities");
23
+ //#region src/lib/combobox/combobox.scss?inline
24
+ var combobox_default = ".label-wrapper{align-items:center;gap:var(--label-wrapper-gap,4px);flex-direction:row;display:flex}.label-wrapper[hidden]{display:none}.label:not(slot),.label::slotted(label){flex:0 auto}.chevron{font:var(--vvd-typography-base-extended);flex-shrink:0;display:flex;transform:rotate(0)}@media (prefers-reduced-motion:no-preference){.chevron{transition:transform .2s}}:host([data-expanded=true]) .chevron,:host([open]) .chevron{transform:rotate(180deg)}:not(.disabled) .chevron{cursor:pointer}.disabled .chevron{color:var(--_low-ink-color);cursor:not-allowed}:host{--_low-ink-color:var(--vvd-color-neutral-600);flex-direction:column;gap:4px;display:inline-flex;position:relative}:host([disabled]){--_low-ink-color:var(--vvd-color-neutral-400);cursor:not-allowed}.base{--_text-field-gutter-end:8px;--_appearance-color-text:var(--vvd-color-canvas-text);--_appearance-color-fill:var(--vvd-color-canvas);--_appearance-color-outline:var(--vvd-color-neutral-500)}.base.appearance-ghost{--_appearance-color-text:var(--_connotation-color-firm);--_appearance-color-fill:transparent;--_appearance-color-outline:transparent}@media (hover:hover){.base:hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text:var(--vvd-color-canvas-text);--_appearance-color-fill:var(--vvd-color-canvas);--_appearance-color-outline:var(--vvd-color-neutral-700)}.base:hover:where(:not(.disabled,:disabled,.readonly)).appearance-ghost{--_appearance-color-text:var(--_connotation-color-firm);--_appearance-color-fill:var(--_connotation-color-faint);--_appearance-color-outline:transparent}}.base.hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text:var(--vvd-color-canvas-text);--_appearance-color-fill:var(--vvd-color-canvas);--_appearance-color-outline:var(--vvd-color-neutral-700)}.base.hover:where(:not(.disabled,:disabled,.readonly)).appearance-ghost{--_appearance-color-text:var(--_connotation-color-firm);--_appearance-color-fill:var(--_connotation-color-faint);--_appearance-color-outline:transparent}.base:disabled{--_appearance-color-text:var(--vvd-color-neutral-600);--_appearance-color-fill:var(--vvd-color-neutral-100);--_appearance-color-outline:var(--vvd-color-neutral-300)}.base:disabled.appearance-ghost{--_appearance-color-text:var(--vvd-color-neutral-300);--_appearance-color-fill:transparent;--_appearance-color-outline:transparent}.base.disabled{--_appearance-color-text:var(--vvd-color-neutral-600);--_appearance-color-fill:var(--vvd-color-neutral-100);--_appearance-color-outline:var(--vvd-color-neutral-300)}.base.disabled.appearance-ghost{--_appearance-color-text:var(--vvd-color-neutral-300);--_appearance-color-fill:transparent;--_appearance-color-outline:transparent}.base.readonly:where(:not(.disabled,:disabled)){--_appearance-color-text:var(--vvd-color-canvas-text);--_appearance-color-fill:var(--vvd-color-neutral-200);--_appearance-color-outline:var(--vvd-color-neutral-400)}.base.readonly:where(:not(.disabled,:disabled)).appearance-ghost{--_appearance-color-text:var(--vvd-color-neutral-600);--_appearance-color-fill:transparent;--_appearance-color-outline:transparent}.base.error:where(:not(.disabled,:disabled)){--_appearance-color-text:notset;--_appearance-color-fill:var(--vvd-color-alert-50);--_appearance-color-outline:var(--vvd-color-alert-500)}.base.error:where(:not(.disabled,:disabled)).appearance-ghost{--_appearance-color-text:notset;--_appearance-color-fill:var(--vvd-color-alert-50);--_appearance-color-outline:transparent}.base.success:where(:not(.disabled,:disabled)){--_appearance-color-text:notset;--_appearance-color-fill:var(--vvd-color-success-50);--_appearance-color-outline:var(--vvd-color-success-500)}.base.success:where(:not(.disabled,:disabled)).appearance-ghost{--_appearance-color-text:notset;--_appearance-color-fill:var(--vvd-color-success-50);--_appearance-color-outline:transparent}.base:not(.shape-pill) .base{border-radius:var(--_text-field-border-radius)}.base.shape-pill .base{border-radius:var(--_text-field-pill-border-radius)}.base slot[name=icon]{z-index:1;color:var(--_low-ink-color);font-size:var(--_text-field-icon-size);pointer-events:none;line-height:1;display:inline-block;position:absolute;inset-block-start:50%;inset-inline-start:var(--_text-field-gutter-start);transform:translateY(-50%)}.base.has-meta{padding-inline-end:16px}.control{text-overflow:ellipsis;white-space:nowrap}.fieldset .leading-items-wrapper{flex-shrink:0;align-items:center;gap:8px;padding-inline-end:16px;display:flex;position:relative}.listbox{max-height:var(--combobox-height,408px);contain:paint;border-radius:8px;flex-direction:column;gap:2px;padding:4px;display:flex;overflow-y:auto}::part(popup-base){inline-size:max-content;min-inline-size:var(--_combobox-fixed-width,100%)}@supports selector(:has(*)){.base:not(.has-activedescendant) .fieldset:has(.control:focus-within):after{--focus-stroke-gap-color:transparent;box-shadow:0 0 0 4px color-mix(in sRGB, var(--focus-stroke-color,var(--vvd-color-cta-500)), transparent 85%), inset 0 0 0 3px var(--focus-stroke-gap-color,currentColor);outline:1px solid var(--focus-stroke-color,var(--vvd-color-cta-500));outline-offset:calc(-1px - var(--focus-inset,0px))}}@supports not selector(:has(*)){.base:not(.has-activedescendant) .fieldset:focus-within:after{box-shadow:0 0 0 4px color-mix(in sRGB, var(--focus-stroke-color,var(--vvd-color-cta-500)), transparent 85%), inset 0 0 0 3px var(--focus-stroke-gap-color,currentColor);outline:1px solid var(--focus-stroke-color,var(--vvd-color-cta-500));outline-offset:calc(-1px - var(--focus-inset,0px));--focus-stroke-gap-color:transparent;z-index:1;border-radius:inherit;content:\"\";pointer-events:none;display:block;position:absolute;inset:0}}:host(:not(.has-activedescendant)){--_suppressable-focus-shadow:none;--_suppressable-focus-outline:none;--_suppressable-focus-outline-offset:0}";
9
25
  //#endregion
10
- //#region src/lib/country/country.ts
26
+ //#region src/lib/combobox/combobox.options.ts
27
+ /** Autocomplete values for combobox. */
28
+ var ComboboxAutocomplete = {
29
+ inline: "inline",
30
+ list: "list",
31
+ both: "both",
32
+ none: "none"
33
+ };
34
+ //#endregion
35
+ //#region src/lib/combobox/combobox.ts
11
36
  /**
12
37
  * @public
13
- * @component country
14
- * @slot icon - Optional custom flag or graphic. When `code` is set and no content is slotted, a default flag icon (Vivid/Vonage icon set) is shown.
38
+ * @component combobox
39
+ * @slot - Default slot.
40
+ * @slot icon - The preferred way to add an icon to the combobox control.
41
+ * @slot meta - Slot to add meta content to the combobox control.
42
+ * @slot helper-text - Describes how to use the combobox. Alternative to the `helper-text` attribute.
43
+ * @event {CustomEvent<undefined>} change - Fires a custom 'change' event when the value updates
44
+ * @vueModel modelValue value change `event.currentTarget.value`
45
+ * @testAction fill comboboxFill
46
+ * @testAction clear comboboxClear
47
+ * @testAction selectOptionByText selectOptionByText
48
+ * @testAction selectOptionByValue selectOptionByValue
49
+ * @testRef control shadow input.control
15
50
  */
16
- var Country = class extends require_vivid_element.VividElement {
51
+ var Combobox = class extends require_with_contextual_help.WithContextualHelp(require_mixins.WithFeedback(require_with_error_text.WithErrorText(require_with_success_text.WithSuccessText(require_form_element.FormElement(require_affix.AffixIcon(require_form_associated.FormAssociated(require_listbox.Listbox))))))) {
52
+ constructor(..._args) {
53
+ super(..._args);
54
+ this.filteredOptions = [];
55
+ this.filter = "";
56
+ this._isNavigatingWithKeyboard = false;
57
+ this.fixedDropdown = false;
58
+ this.listboxId = (0, _microsoft_fast_web_utilities.uniqueId)("listbox-");
59
+ this.maxHeight = 0;
60
+ this.open = false;
61
+ this.proxy = document.createElement("input");
62
+ }
63
+ /** @internal */
64
+ formResetCallback() {
65
+ super.formResetCallback();
66
+ this.selectedIndex = this._newDefaultSelectedIndex([], this.options, -1) ?? -1;
67
+ this.value = this.firstSelectedOption?.text || "";
68
+ }
69
+ /** Validates the element against its constraints (e.g. `required`) and updates its validity state. */
70
+ validate() {
71
+ super.validate(this.control);
72
+ }
73
+ get isAutocompleteInline() {
74
+ return this.autocomplete === ComboboxAutocomplete.inline || this.isAutocompleteBoth;
75
+ }
76
+ get isAutocompleteList() {
77
+ return this.autocomplete === ComboboxAutocomplete.list || this.isAutocompleteBoth;
78
+ }
79
+ get isAutocompleteBoth() {
80
+ return this.autocomplete === ComboboxAutocomplete.both;
81
+ }
82
+ /** @internal */
83
+ openChanged() {
84
+ if (this.open) this.enqueueScrollSelectedOptionIntoViewIfNeeded();
85
+ }
86
+ /** A read-only list of options. */
87
+ get options() {
88
+ _microsoft_fast_element.Observable.track(this, "options");
89
+ return this.filteredOptions.length ? this.filteredOptions : this._options;
90
+ }
91
+ set options(value) {
92
+ super.options = value;
93
+ }
94
+ /**
95
+ * Updates the placeholder on the proxy element.
96
+ * @internal
97
+ */
98
+ placeholderChanged() {
99
+ /* v8 ignore if -- @preserve */
100
+ if (this.proxy instanceof HTMLInputElement) this.proxy.placeholder = this.placeholder;
101
+ }
17
102
  /** @internal */
18
- get flagIconName() {
19
- return require_utils.getFlagIconName(this.code);
103
+ valueChanged(prev, next) {
104
+ if (this.$fastController.isConnected && this.options) {
105
+ const selectedIndex = this.options.findIndex((el) => el.text.toLowerCase() === next.toLowerCase());
106
+ const prevSelectedValue = this.options[this.selectedIndex]?.text;
107
+ const nextSelectedValue = this.options[selectedIndex]?.text;
108
+ this.selectedIndex = prevSelectedValue !== nextSelectedValue ? selectedIndex : this.selectedIndex;
109
+ }
110
+ super.valueChanged(prev, next);
111
+ }
112
+ /**
113
+ * Handle opening and closing the listbox when the combobox is clicked.
114
+ *
115
+ * @param e - the mouse event
116
+ * @internal
117
+ */
118
+ clickHandler(e) {
119
+ if (this.disabled || this._isFromContextualHelp(e)) return;
120
+ if (this.open) {
121
+ const capturedOption = e.target.closest(`option,[role=option],[data-vvd-component=option]`);
122
+ if (!capturedOption || capturedOption.disabled) return;
123
+ this.selectedOptions = [capturedOption];
124
+ this.control.value = capturedOption.text;
125
+ this.clearSelectionRange();
126
+ this.updateValue(true);
127
+ }
128
+ this.open = !this.open;
129
+ if (this.open) this.control.focus();
130
+ return true;
131
+ }
132
+ /**
133
+ * Handle closing the listbox when the combobox is open and the chevron icon is clicked.
134
+ *
135
+ * @param e - the mouse event
136
+ * @internal
137
+ */
138
+ _chevronIconClickHandler(e) {
139
+ if (!this.open) return;
140
+ e.stopPropagation();
141
+ this.open = false;
142
+ }
143
+ connectedCallback() {
144
+ super.connectedCallback();
145
+ if (this.value) this.initialValue = this.value;
146
+ this._popup.anchor = this._anchor;
147
+ }
148
+ /** Filter available options by text value. */
149
+ filterOptions() {
150
+ if (!this.autocomplete || this.autocomplete === ComboboxAutocomplete.none) this.filter = "";
151
+ this.filteredOptions = this._options.filter((o) => o.text.toLowerCase().startsWith(this.filter.toLowerCase()));
152
+ if (this.isAutocompleteList) {
153
+ this._options.forEach((o) => {
154
+ o.hidden = !this.filteredOptions.includes(o);
155
+ });
156
+ for (const el of Array.from(this.children)) if (require_optgroup.isOptgroup(el)) {
157
+ const hasVisibleOption = Array.from(el.children).some((child) => require_option.isListboxOption(child) && !child.hidden);
158
+ el.style.display = hasVisibleOption ? "" : "none";
159
+ }
160
+ }
161
+ }
162
+ /**
163
+ * Focus the control and scroll the first selected option into view.
164
+ *
165
+ * @internal
166
+ */
167
+ focusAndScrollOptionIntoView() {
168
+ if (this.contains(document.activeElement)) {
169
+ this.control.focus();
170
+ this.enqueueScrollSelectedOptionIntoViewIfNeeded();
171
+ }
20
172
  }
21
173
  /** @internal */
22
- get displayText() {
23
- const customLabel = this.label?.trim();
24
- if (customLabel) return customLabel;
25
- const codeValue = this.code?.trim();
26
- return codeValue ? codeValue.toUpperCase() : void 0;
174
+ enqueueScrollSelectedOptionIntoViewIfNeeded() {
175
+ const firstSelectedOption = this.firstSelectedOption;
176
+ /* v8 ignore else -- @preserve */
177
+ if (firstSelectedOption) requestAnimationFrame(() => {
178
+ firstSelectedOption.scrollIntoView({ block: "nearest" });
179
+ });
180
+ }
181
+ /**
182
+ * Handle focus state when the element or its children lose focus.
183
+ *
184
+ * @param e - The focus event
185
+ * @internal
186
+ */
187
+ focusoutHandler(e) {
188
+ this.syncValue();
189
+ if (!this.open) return true;
190
+ const focusTarget = e.relatedTarget;
191
+ if (this.isSameNode(focusTarget)) {
192
+ this.focus();
193
+ return;
194
+ }
195
+ this.open = false;
196
+ }
197
+ /**
198
+ * Handle content changes on the control input.
199
+ *
200
+ * @param e - the input event
201
+ * @internal
202
+ */
203
+ inputHandler(e) {
204
+ this.filter = this.control.value;
205
+ this.filterOptions();
206
+ if (!this.isAutocompleteInline) this.selectedIndex = this.options.map((option) => option.text).indexOf(this.control.value);
207
+ if (e.inputType.includes("deleteContent") || !this.filter.length) return true;
208
+ if (this.isAutocompleteList && !this.open) this.open = true;
209
+ if (this.isAutocompleteInline) if (this.filteredOptions.length) {
210
+ this.selectedOptions = [this.filteredOptions[0]];
211
+ this.selectedIndex = this.options.indexOf(this.firstSelectedOption);
212
+ this.setInlineSelection();
213
+ } else this.selectedIndex = -1;
214
+ }
215
+ /**
216
+ * Handle keydown actions for listbox navigation.
217
+ *
218
+ * @param e - the keyboard event
219
+ * @internal
220
+ */
221
+ keydownHandler(e) {
222
+ const key = e.key;
223
+ if (e.ctrlKey || e.shiftKey) return true;
224
+ switch (key) {
225
+ case "Enter":
226
+ this.syncValue();
227
+ /* v8 ignore else -- @preserve */
228
+ if (this.isAutocompleteInline) this.filter = this.value;
229
+ this.open = false;
230
+ this.clearSelectionRange();
231
+ return;
232
+ case "Escape":
233
+ /* v8 ignore else -- @preserve */
234
+ if (!this.isAutocompleteInline) this.selectedIndex = -1;
235
+ if (this.open) {
236
+ this.open = false;
237
+ return;
238
+ }
239
+ this.value = "";
240
+ this.control.value = "";
241
+ this.filter = "";
242
+ this.filterOptions();
243
+ return;
244
+ case "Tab":
245
+ this.setInputToSelection();
246
+ if (!this.open) return true;
247
+ e.preventDefault();
248
+ this.open = false;
249
+ return;
250
+ case "ArrowUp":
251
+ case "ArrowDown":
252
+ this.filterOptions();
253
+ if (!this.open) {
254
+ this.open = true;
255
+ return;
256
+ }
257
+ /* v8 ignore else -- @preserve */
258
+ if (this.filteredOptions.length > 0) {
259
+ this._isNavigatingWithKeyboard = true;
260
+ super.keydownHandler(e);
261
+ this._isNavigatingWithKeyboard = false;
262
+ }
263
+ if (this.isAutocompleteInline) this.setInlineSelection();
264
+ return;
265
+ default: return true;
266
+ }
267
+ }
268
+ /** @internal */
269
+ setSelectedOptions() {
270
+ super.setSelectedOptions();
271
+ if (!this._isNavigatingWithKeyboard) this._activeDescendant = "";
272
+ }
273
+ /**
274
+ * Ensure that the selectedIndex is within the current allowable filtered range.
275
+ *
276
+ * @param prev - the previous selected index value
277
+ * @param next - the current selected index value
278
+ *
279
+ * @internal
280
+ */
281
+ selectedIndexChanged(prev, next) {
282
+ if (this.$fastController.isConnected) {
283
+ next = (0, _microsoft_fast_web_utilities.limit)(-1, this.options.length - 1, next);
284
+ if (next !== this.selectedIndex) {
285
+ this.selectedIndex = next;
286
+ return;
287
+ }
288
+ super.selectedIndexChanged(prev, next);
289
+ }
290
+ }
291
+ /**
292
+ * Move focus to the previous selectable option.
293
+ *
294
+ * @internal
295
+ */
296
+ selectPreviousOption() {
297
+ if (!this.disabled && this.selectedIndex >= 0) this.selectedIndex = this.selectedIndex - 1;
298
+ }
299
+ _isDefaultSelected(option) {
300
+ return super._isDefaultSelected(option) || option.text !== "" && option.text === this.initialValue;
301
+ }
302
+ /**
303
+ * Focus and set the content of the control based on the first selected option.
304
+ *
305
+ * @internal
306
+ */
307
+ setInputToSelection() {
308
+ if (this.firstSelectedOption) {
309
+ this.control.value = this.firstSelectedOption.text;
310
+ this.control.focus();
311
+ }
312
+ }
313
+ /**
314
+ * Focus, set and select the content of the control based on the first selected option.
315
+ *
316
+ * @internal
317
+ */
318
+ setInlineSelection() {
319
+ /* v8 ignore else -- @preserve */
320
+ if (this.firstSelectedOption) {
321
+ this.setInputToSelection();
322
+ this.control.setSelectionRange(this.filter.length, this.control.value.length, "backward");
323
+ }
324
+ }
325
+ /**
326
+ * Determines if a value update should involve emitting a change event, then updates the value.
327
+ *
328
+ * @internal
329
+ */
330
+ syncValue() {
331
+ const newValue = this.firstSelectedOption?.text ?? this.control.value;
332
+ this.updateValue(this.value !== newValue);
333
+ }
334
+ /**
335
+ * Ensure that the entire list of options is used when setting the selected property.
336
+ *
337
+ * @param prev - the previous list of selected options
338
+ * @param next - the current list of selected options
339
+ *
340
+ * @internal
341
+ */
342
+ selectedOptionsChanged(_prev, next) {
343
+ if (this.$fastController.isConnected) this._options.forEach((o) => {
344
+ o.selected = next.includes(o);
345
+ });
346
+ }
347
+ /**
348
+ * Synchronize the form-associated proxy and update the value property of the element.
349
+ *
350
+ * @param prev - the previous collection of slotted option elements
351
+ * @param next - the next collection of slotted option elements
352
+ *
353
+ * @internal
354
+ */
355
+ slottedOptionsChanged(prev, next) {
356
+ super.slottedOptionsChanged(prev, next);
357
+ this.updateValue();
358
+ const scale = this.getAttribute("scale") || this.scale;
359
+ next.forEach((element) => {
360
+ if (scale) {
361
+ element.setAttribute("scale", scale);
362
+ element.scale = scale;
363
+ }
364
+ });
365
+ }
366
+ /**
367
+ * Sets the value and to match the first selected option.
368
+ *
369
+ * @param shouldEmit - if true, the change event will be emitted
370
+ *
371
+ * @internal
372
+ */
373
+ updateValue(shouldEmit) {
374
+ if (this.$fastController.isConnected) this.value = this.firstSelectedOption?.text || this.control.value;
375
+ if (shouldEmit) this.$emit("change");
376
+ }
377
+ /** @internal */
378
+ clearSelectionRange() {
379
+ const controlValueLength = this.control.value.length;
380
+ this.control.setSelectionRange(controlValueLength, controlValueLength);
27
381
  }
28
382
  };
29
- require_decorate.__decorate([_microsoft_fast_element.attr], Country.prototype, "code", void 0);
30
- require_decorate.__decorate([_microsoft_fast_element.attr], Country.prototype, "label", void 0);
383
+ require_decorate.__decorate([(0, _microsoft_fast_element.attr)({
384
+ attribute: "autocomplete",
385
+ mode: "fromView"
386
+ })], Combobox.prototype, "autocomplete", void 0);
387
+ require_decorate.__decorate([_microsoft_fast_element.attr], Combobox.prototype, "appearance", void 0);
388
+ require_decorate.__decorate([_microsoft_fast_element.attr], Combobox.prototype, "shape", void 0);
389
+ require_decorate.__decorate([(0, _microsoft_fast_element.attr)()], Combobox.prototype, "scale", void 0);
390
+ require_decorate.__decorate([_microsoft_fast_element.attr], Combobox.prototype, "placement", void 0);
391
+ require_decorate.__decorate([(0, _microsoft_fast_element.attr)({
392
+ mode: "boolean",
393
+ attribute: "fixed-dropdown"
394
+ })], Combobox.prototype, "fixedDropdown", void 0);
395
+ require_decorate.__decorate([_microsoft_fast_element.observable], Combobox.prototype, "metaSlottedContent", void 0);
396
+ require_decorate.__decorate([_microsoft_fast_element.observable], Combobox.prototype, "maxHeight", void 0);
397
+ require_decorate.__decorate([(0, _microsoft_fast_element.attr)({
398
+ attribute: "open",
399
+ mode: "boolean"
400
+ })], Combobox.prototype, "open", void 0);
401
+ require_decorate.__decorate([_microsoft_fast_element.attr], Combobox.prototype, "placeholder", void 0);
31
402
  //#endregion
32
- //#region src/lib/country/country.template.ts
33
- var CountryTemplate = (context) => {
34
- const iconTag = context.tagFor(require_definition.Icon);
35
- return _microsoft_fast_element.html`
36
- <div class="base">
37
- <slot name="icon" class="icon">
38
- ${(0, _microsoft_fast_element.when)((x) => x.flagIconName, _microsoft_fast_element.html`<${iconTag}
39
- size="-4"
40
- name="${(x) => x.flagIconName}"
41
- aria-hidden="true"
42
- ></${iconTag}>`)}
43
- </slot>
44
- ${(0, _microsoft_fast_element.when)((x) => x.displayText, _microsoft_fast_element.html`<span class="text">${(x) => x.displayText}</span>`)}
403
+ //#region src/lib/combobox/combobox.template.ts
404
+ function renderLabel() {
405
+ return _microsoft_fast_element.html` <label for="control" class="label">
406
+ ${(x) => x.label}
407
+ </label>`;
408
+ }
409
+ function setFixedDropdownVarWidth(x) {
410
+ return x.open && x.fixedDropdown ? `--_combobox-fixed-width: ${Math.round(x.getBoundingClientRect().width)}px` : null;
411
+ }
412
+ function renderInput(context) {
413
+ const affixIconTemplate = require_affix.affixIconTemplateFactory(context);
414
+ const chevronTemplate = require_definition$1.chevronTemplateFactory(context);
415
+ return _microsoft_fast_element.html` <div
416
+ class="${(x) => (0, _microsoft_fast_web_utilities.classNames)("base", ["disabled", x.disabled], [`shape-${x.shape}`, Boolean(x.shape)], [`size-${x.scale}`, Boolean(x.scale)], ["placeholder", Boolean(x.placeholder)], [`appearance-${x.appearance}`, Boolean(x.appearance)], ["no-label", !x.label], ["has-icon", !!x.icon || Boolean(x.iconSlottedContent?.length)], ["has-meta", Boolean(x.metaSlottedContent?.length)], ["has-activedescendant", Boolean(x._activeDescendant) && x.open], ["error", Boolean(x.errorValidationMessage)], ["success", !!x.successText])}"
417
+ ${(0, _microsoft_fast_element.ref)("_anchor")}
418
+ >
419
+ <div
420
+ class="label-wrapper"
421
+ ?hidden=${(x) => !x.label && !x._hasContextualHelp}
422
+ >
423
+ ${(0, _microsoft_fast_element.when)((x) => x.label, renderLabel())}
424
+ <slot
425
+ name="contextual-help"
426
+ ${(0, _microsoft_fast_element.slotted)("_contextualHelpSlottedContent")}
427
+ ></slot>
428
+ </div>
429
+ <div class="fieldset">
430
+ ${(x) => affixIconTemplate(x.icon, require_affix.IconWrapper.Slot)}
431
+ <div class="wrapper">
432
+ <input
433
+ id="control"
434
+ autocomplete="off"
435
+ class="control"
436
+ aria-activedescendant="${(x) => x.open ? x._activeDescendant : null}"
437
+ aria-autocomplete="${(x) => x.autocomplete}"
438
+ aria-controls="${(x) => x.listboxId}"
439
+ aria-expanded="${(x) => x.open}"
440
+ aria-haspopup="listbox"
441
+ aria-describedby="${(x) => x._feedbackDescribedBy}"
442
+ placeholder="${(x) => x.placeholder}"
443
+ role="combobox"
444
+ type="text"
445
+ ?disabled="${(x) => x.disabled}"
446
+ :value="${(x) => x.value}"
447
+ @input="${(x, c) => x.inputHandler(c.event)}"
448
+ ${(0, _microsoft_fast_element.ref)("control")}
449
+ />
450
+ </div>
451
+ <div class="leading-items-wrapper">
452
+ <slot name="meta" ${(0, _microsoft_fast_element.slotted)("metaSlottedContent")}></slot>
453
+ <div
454
+ @click="${(x, c) => x._chevronIconClickHandler(c.event)}"
455
+ >
456
+ ${chevronTemplate}
457
+ </div>
458
+ </div>
45
459
  </div>
460
+ </div>`;
461
+ }
462
+ var comboboxTemplate = (context) => {
463
+ const popupTag = context.tagFor(require_definition$2.Popup);
464
+ return _microsoft_fast_element.html`
465
+ <template
466
+ tabindex="${(x) => !x.disabled ? "0" : null}"
467
+ class="${(x) => (0, _microsoft_fast_web_utilities.classNames)(["has-activedescendant", Boolean(x._activeDescendant) && x.open])}"
468
+ @click="${(x, c) => x.clickHandler(c.event)}"
469
+ @focusout="${(x, c) => x.focusoutHandler(c.event)}"
470
+ @keydown="${(x, { event }) => {
471
+ if (x.open) require_dialog.handleEscapeKeyAndStopPropogation(event);
472
+ return x.keydownHandler(event);
473
+ }}"
474
+ >
475
+ <div class="control-wrapper">
476
+ ${() => renderInput(context)}
477
+ <${popupTag} class="popup"
478
+ style="${setFixedDropdownVarWidth}"
479
+ ?open="${(x) => x.open}"
480
+ placement="${(x) => x.placement ?? "bottom-start"}"
481
+ strategy="${(x) => x.fixedDropdown ? "fixed" : "absolute"}"
482
+ ${(0, _microsoft_fast_element.ref)("_popup")}>
483
+ <div id="${(x) => x.listboxId}"
484
+ class="listbox"
485
+ role="listbox"
486
+ ?disabled="${(x) => x.disabled}"
487
+ ${(0, _microsoft_fast_element.ref)("listbox")}>
488
+ <slot ${(0, _microsoft_fast_element.slotted)({
489
+ filter: require_listbox.Listbox.slottedOptionFilter,
490
+ flatten: true,
491
+ property: "slottedOptions"
492
+ })}>
493
+ </slot>
494
+ </div>
495
+ </${popupTag}>
496
+ </div>
497
+ <div class="feedback-wrapper" @click="${(_, c) => c.event.stopPropagation()}">
498
+ ${(x) => x._getFeedbackTemplate(context)}
499
+ </div>
500
+ </template>
46
501
  `;
47
502
  };
48
503
  //#endregion
49
- //#region src/lib/country/definition.ts
504
+ //#region src/lib/combobox/definition.ts
50
505
  /** @internal */
51
- var countryDefinition = require_vivid_element.defineVividComponent("country", Country, CountryTemplate, [require_definition.iconDefinition], { styles: country_default });
506
+ var comboboxDefinition = require_vivid_element.defineVividComponent("combobox", Combobox, comboboxTemplate, [
507
+ require_definition.iconDefinition,
508
+ require_definition$2.popupDefinition,
509
+ require_definition$3.listboxOptionDefinition,
510
+ require_definition$4.optgroupDefinition,
511
+ require_mixins.feedbackMessageDefinition
512
+ ], {
513
+ styles: [require_text_field.text_field_default, combobox_default],
514
+ shadowOptions: { delegatesFocus: true }
515
+ });
52
516
  /**
53
- * Registers the country element with the design system.
517
+ * Registers the combobox elements with the design system.
54
518
  *
55
519
  * @param prefix - the prefix to use for the component name
56
520
  */
57
- var registerCountry = require_vivid_element.createRegisterFunction(countryDefinition);
521
+ var registerCombobox = require_vivid_element.createRegisterFunction(comboboxDefinition);
58
522
  //#endregion
59
- Object.defineProperty(exports, "Country", {
523
+ Object.defineProperty(exports, "Combobox", {
60
524
  enumerable: true,
61
525
  get: function() {
62
- return Country;
526
+ return Combobox;
63
527
  }
64
528
  });
65
- Object.defineProperty(exports, "countryDefinition", {
529
+ Object.defineProperty(exports, "comboboxDefinition", {
66
530
  enumerable: true,
67
531
  get: function() {
68
- return countryDefinition;
532
+ return comboboxDefinition;
69
533
  }
70
534
  });
71
- Object.defineProperty(exports, "registerCountry", {
535
+ Object.defineProperty(exports, "registerCombobox", {
72
536
  enumerable: true,
73
537
  get: function() {
74
- return registerCountry;
538
+ return registerCombobox;
75
539
  }
76
540
  });