@vonage/vivid 5.23.1 → 5.24.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 (406) hide show
  1. package/accordion/index.cjs +1 -1
  2. package/accordion/index.js +1 -1
  3. package/accordion-item/index.cjs +1 -1
  4. package/accordion-item/index.js +1 -1
  5. package/audio-player/index.cjs +2 -2
  6. package/audio-player/index.js +3 -3
  7. package/badge/index.cjs +1 -1
  8. package/badge/index.js +1 -1
  9. package/bundled/definition15.cjs +8 -7
  10. package/bundled/definition15.js +26 -24
  11. package/bundled/definition17.cjs +2 -2
  12. package/bundled/definition17.js +2 -2
  13. package/bundled/definition18.cjs +12 -83
  14. package/bundled/definition18.js +35 -419
  15. package/bundled/definition19.cjs +87 -7
  16. package/bundled/definition19.js +432 -16
  17. package/bundled/definition20.cjs +7 -37
  18. package/bundled/definition20.js +17 -172
  19. package/bundled/definition21.cjs +35 -27
  20. package/bundled/definition21.js +154 -154
  21. package/bundled/definition22.cjs +29 -6
  22. package/bundled/definition22.js +172 -20
  23. package/bundled/definition23.cjs +6 -12
  24. package/bundled/definition23.js +17 -32
  25. package/bundled/definition24.cjs +12 -39
  26. package/bundled/definition24.js +32 -67
  27. package/bundled/definition25.cjs +44 -0
  28. package/bundled/definition25.js +77 -0
  29. package/bundled/extractOptions.cjs +1 -0
  30. package/bundled/extractOptions.js +11 -0
  31. package/bundled/listbox.cjs +1 -1
  32. package/bundled/listbox.js +24 -11
  33. package/bundled/render-in-light-dom.cjs +1 -1
  34. package/bundled/render-in-light-dom.js +16 -19
  35. package/bundled/vivid-element.cjs +1 -1
  36. package/bundled/vivid-element.js +9 -1
  37. package/combobox/definition.cjs +1 -1
  38. package/combobox/definition.js +1 -1
  39. package/combobox/index.cjs +7 -7
  40. package/combobox/index.js +29 -21
  41. package/country/definition.cjs +1 -1
  42. package/country/definition.js +1 -1
  43. package/country/index.cjs +1 -1
  44. package/country/index.js +1 -1
  45. package/country-group/definition.cjs +1 -1
  46. package/country-group/definition.js +1 -1
  47. package/country-group/index.cjs +1 -1
  48. package/country-group/index.js +2 -2
  49. package/custom-elements.json +3102 -2842
  50. package/data-grid/definition.cjs +1 -1
  51. package/data-grid/definition.js +1 -1
  52. package/data-grid/index.cjs +4 -4
  53. package/data-grid/index.js +5 -5
  54. package/date-picker/definition.cjs +1 -1
  55. package/date-picker/definition.js +1 -1
  56. package/date-picker/index.cjs +1 -1
  57. package/date-picker/index.js +1 -1
  58. package/date-range-picker/definition.cjs +1 -1
  59. package/date-range-picker/definition.js +1 -1
  60. package/date-range-picker/index.cjs +1 -1
  61. package/date-range-picker/index.js +1 -1
  62. package/date-time-picker/definition.cjs +1 -1
  63. package/date-time-picker/definition.js +1 -1
  64. package/date-time-picker/index.cjs +1 -1
  65. package/date-time-picker/index.js +1 -1
  66. package/dial-pad/definition.cjs +1 -1
  67. package/dial-pad/definition.js +1 -1
  68. package/dial-pad/index.cjs +24 -24
  69. package/dial-pad/index.js +120 -51
  70. package/dialog/definition.cjs +1 -1
  71. package/dialog/definition.js +1 -1
  72. package/divider/definition.cjs +1 -1
  73. package/divider/definition.js +1 -1
  74. package/divider/index.cjs +1 -1
  75. package/divider/index.js +1 -1
  76. package/empty-state/definition.cjs +1 -1
  77. package/empty-state/definition.js +1 -1
  78. package/fab/definition.cjs +1 -1
  79. package/fab/definition.js +1 -1
  80. package/file-picker/definition.cjs +1 -1
  81. package/file-picker/definition.js +1 -1
  82. package/flag/definition.cjs +1 -1
  83. package/flag/definition.js +1 -1
  84. package/header/definition.cjs +1 -1
  85. package/header/definition.js +1 -1
  86. package/header/index.cjs +3 -3
  87. package/header/index.js +3 -3
  88. package/index.cjs +200 -196
  89. package/index.js +53 -52
  90. package/kbd-key/definition.cjs +1 -1
  91. package/kbd-key/definition.js +1 -1
  92. package/kbd-shortcut/definition.cjs +1 -1
  93. package/kbd-shortcut/definition.js +1 -1
  94. package/layout/definition.cjs +1 -1
  95. package/layout/definition.js +1 -1
  96. package/lib/accordion-item/accordion-item.d.ts +2 -1
  97. package/lib/action-group/action-group.d.ts +1 -1
  98. package/lib/alert/alert.d.ts +2 -2
  99. package/lib/audio-player/audio-player.d.ts +1 -1
  100. package/lib/avatar/avatar.d.ts +1 -1
  101. package/lib/badge/badge.d.ts +1 -1
  102. package/lib/banner/banner.d.ts +3 -3
  103. package/lib/breadcrumb/breadcrumb.d.ts +1 -1
  104. package/lib/breadcrumb-item/breadcrumb-item.d.ts +1 -1
  105. package/lib/button/button.d.ts +3 -3
  106. package/lib/calendar-event/calendar-event.d.ts +1 -1
  107. package/lib/card/card.d.ts +1 -1
  108. package/lib/checkbox/checkbox.d.ts +6 -6
  109. package/lib/color-picker/color-picker.d.ts +7 -7
  110. package/lib/combobox/combobox.d.ts +7 -7
  111. package/lib/components.d.ts +1 -0
  112. package/lib/country-group/country-group.d.ts +2 -2
  113. package/lib/data-grid/data-grid-cell.d.ts +4 -3
  114. package/lib/data-grid/data-grid-row.d.ts +3 -2
  115. package/lib/data-grid/data-grid.options.d.ts +5 -0
  116. package/lib/date-picker/date-picker.d.ts +8 -8
  117. package/lib/date-range-picker/date-range-picker.d.ts +4 -4
  118. package/lib/date-time-picker/date-time-picker.d.ts +8 -8
  119. package/lib/dial-pad/dial-pad.d.ts +2 -1
  120. package/lib/dialog/dialog.d.ts +2 -2
  121. package/lib/divider/divider.d.ts +1 -1
  122. package/lib/fab/fab.d.ts +1 -1
  123. package/lib/file-picker/file-picker.d.ts +7 -7
  124. package/lib/header/header.d.ts +1 -1
  125. package/lib/menu/menu.d.ts +2 -2
  126. package/lib/menu-item/menu-item.d.ts +3 -3
  127. package/lib/nav/nav.d.ts +1 -1
  128. package/lib/nav-disclosure/nav-disclosure.d.ts +2 -2
  129. package/lib/nav-item/nav-item.d.ts +2 -2
  130. package/lib/note/note.d.ts +1 -1
  131. package/lib/number-field/number-field.d.ts +9 -9
  132. package/lib/optgroup/definition.d.ts +3 -0
  133. package/lib/optgroup/index.d.ts +1 -0
  134. package/lib/optgroup/optgroup.d.ts +430 -0
  135. package/lib/optgroup/optgroup.template.d.ts +2 -0
  136. package/lib/optgroup/variations.browser-spec.d.ts +1 -0
  137. package/lib/option/option.d.ts +2 -2
  138. package/lib/pagination/pagination.d.ts +1 -1
  139. package/lib/popover/popover.d.ts +2 -2
  140. package/lib/progress/progress.d.ts +1 -1
  141. package/lib/progress-ring/progress-ring.d.ts +1 -1
  142. package/lib/radio/radio.d.ts +3 -3
  143. package/lib/radio-group/radio-group.d.ts +1 -1
  144. package/lib/range-slider/range-slider.d.ts +3 -3
  145. package/lib/rich-text-editor/rich-text-editor.d.ts +1 -1
  146. package/lib/searchable-select/option-tag.d.ts +1 -1
  147. package/lib/searchable-select/searchable-select.d.ts +47 -47
  148. package/lib/select/select.d.ts +9 -9
  149. package/lib/selectable-box/selectable-box.d.ts +1 -1
  150. package/lib/simple-color-picker/simple-color-picker.d.ts +2 -2
  151. package/lib/slider/slider.d.ts +3 -3
  152. package/lib/split-button/split-button.d.ts +3 -3
  153. package/lib/status/status.d.ts +1 -1
  154. package/lib/switch/switch.d.ts +2 -2
  155. package/lib/tab/tab.d.ts +3 -3
  156. package/lib/tab-panel/tab-panel.d.ts +1 -1
  157. package/lib/table/table-cell.d.ts +1 -1
  158. package/lib/table/table-header-cell.d.ts +1 -1
  159. package/lib/table/table-row.d.ts +1 -1
  160. package/lib/table/table-sorting-button.d.ts +1 -1
  161. package/lib/tag/tag.d.ts +3 -3
  162. package/lib/tag-group/tag-group.d.ts +1 -1
  163. package/lib/tag-name-map.d.ts +2 -1
  164. package/lib/text-area/text-area.d.ts +8 -8
  165. package/lib/text-field/text-field.d.ts +9 -9
  166. package/lib/time-picker/time-picker.d.ts +4 -4
  167. package/lib/toggletip/toggletip.d.ts +2 -2
  168. package/lib/tooltip/tooltip.d.ts +2 -2
  169. package/lib/tree-item/tree-item.d.ts +2 -2
  170. package/lib/tree-view/tree-view.d.ts +1 -1
  171. package/lib/video-player/video-player.d.ts +1 -1
  172. package/menu/index.cjs +1 -1
  173. package/menu/index.js +1 -1
  174. package/menu-item/index.cjs +1 -1
  175. package/menu-item/index.js +1 -1
  176. package/nav/definition.cjs +1 -1
  177. package/nav/definition.js +1 -1
  178. package/nav-disclosure/definition.cjs +1 -1
  179. package/nav-disclosure/definition.js +1 -1
  180. package/nav-item/definition.cjs +1 -1
  181. package/nav-item/definition.js +1 -1
  182. package/note/definition.cjs +1 -1
  183. package/note/definition.js +1 -1
  184. package/number-field/definition.cjs +1 -1
  185. package/number-field/definition.js +1 -1
  186. package/number-field/index.cjs +1 -1
  187. package/number-field/index.js +1 -1
  188. package/optgroup/definition.cjs +5 -0
  189. package/optgroup/definition.js +2 -0
  190. package/optgroup/index.cjs +1 -0
  191. package/optgroup/index.js +4 -0
  192. package/package.json +6 -6
  193. package/pagination/definition.cjs +1 -1
  194. package/pagination/definition.js +1 -1
  195. package/platform-switch/definition.cjs +1 -1
  196. package/platform-switch/definition.js +1 -1
  197. package/popover/definition.cjs +1 -1
  198. package/popover/definition.js +1 -1
  199. package/progress/definition.cjs +1 -1
  200. package/progress/definition.js +1 -1
  201. package/radio/definition.cjs +1 -1
  202. package/radio/definition.js +1 -1
  203. package/radio-group/definition.cjs +1 -1
  204. package/radio-group/definition.js +1 -1
  205. package/range-slider/definition.cjs +1 -1
  206. package/range-slider/definition.js +1 -1
  207. package/rich-text-editor/definition.cjs +1 -1
  208. package/rich-text-editor/definition.js +1 -1
  209. package/rich-text-editor/index.cjs +1 -1
  210. package/rich-text-editor/index.js +4 -4
  211. package/rich-text-view/definition.cjs +1 -1
  212. package/rich-text-view/definition.js +1 -1
  213. package/searchable-select/definition.cjs +1 -1
  214. package/searchable-select/definition.js +1 -1
  215. package/searchable-select/index.cjs +19 -19
  216. package/searchable-select/index.js +60 -45
  217. package/select/definition.cjs +1 -1
  218. package/select/definition.js +1 -1
  219. package/select/index.cjs +1 -1
  220. package/select/index.js +1 -1
  221. package/selectable-box/definition.cjs +1 -1
  222. package/selectable-box/definition.js +1 -1
  223. package/shared/aria/delegates-aria.d.ts +1 -1
  224. package/shared/aria/host-semantics.d.ts +1 -1
  225. package/shared/color-picker/base-color-picker.d.ts +1 -1
  226. package/shared/feedback/feedback-message.d.ts +1 -1
  227. package/shared/feedback/mixins.d.ts +2 -2
  228. package/shared/foundation/button/button.d.ts +2 -2
  229. package/shared/foundation/form-associated/form-associated.d.ts +2 -2
  230. package/shared/foundation/listbox/extractOptions.d.ts +2 -0
  231. package/shared/foundation/listbox/listbox.d.ts +2 -0
  232. package/shared/patterns/affix.d.ts +2 -2
  233. package/shared/patterns/anchored.d.ts +2 -2
  234. package/shared/patterns/char-count/char-count.d.ts +1 -1
  235. package/shared/patterns/form-elements/form-element.d.ts +1 -1
  236. package/shared/patterns/form-elements/with-contextual-help.d.ts +1 -1
  237. package/shared/patterns/form-elements/with-error-text.d.ts +1 -1
  238. package/shared/patterns/form-elements/with-success-text.d.ts +1 -1
  239. package/shared/patterns/kbd-shortcut.d.ts +1 -1
  240. package/shared/patterns/linkable.d.ts +1 -1
  241. package/shared/patterns/localized.d.ts +2 -2
  242. package/shared/patterns/trapped-focus.d.ts +1 -1
  243. package/shared/picker-field/mixins/calendar-picker.d.ts +2 -2
  244. package/shared/picker-field/mixins/calendar-picker.template.d.ts +2 -2
  245. package/shared/picker-field/mixins/inline-time-picker/inline-time-picker.d.ts +1 -1
  246. package/shared/picker-field/mixins/min-max-calendar-picker.d.ts +2 -2
  247. package/shared/picker-field/mixins/single-date-picker.d.ts +2 -2
  248. package/shared/picker-field/mixins/single-value-picker.d.ts +2 -2
  249. package/shared/picker-field/mixins/time-selection-picker.d.ts +2 -2
  250. package/shared/picker-field/mixins/time-selection-picker.template.d.ts +4 -4
  251. package/shared/picker-field/picker-field.d.ts +7 -7
  252. package/side-drawer/definition.cjs +1 -1
  253. package/side-drawer/definition.js +1 -1
  254. package/simple-color-picker/definition.cjs +1 -1
  255. package/simple-color-picker/definition.js +1 -1
  256. package/split-button/definition.cjs +1 -1
  257. package/split-button/definition.js +1 -1
  258. package/split-button/index.cjs +1 -0
  259. package/split-button/index.js +1 -0
  260. package/status/definition.cjs +1 -1
  261. package/status/definition.js +1 -1
  262. package/switch/definition.cjs +1 -1
  263. package/switch/definition.js +1 -1
  264. package/switch/index.cjs +6 -5
  265. package/switch/index.js +16 -14
  266. package/tab/definition.cjs +1 -1
  267. package/tab/definition.js +1 -1
  268. package/tab-panel/definition.cjs +1 -1
  269. package/tab-panel/definition.js +1 -1
  270. package/table/definition.cjs +1 -1
  271. package/table/definition.js +1 -1
  272. package/tabs/definition.cjs +1 -1
  273. package/tabs/definition.js +1 -1
  274. package/tag/definition.cjs +1 -1
  275. package/tag/definition.js +1 -1
  276. package/tag-group/definition.cjs +1 -1
  277. package/tag-group/definition.js +1 -1
  278. package/text-area/definition.cjs +1 -1
  279. package/text-area/definition.js +1 -1
  280. package/time-picker/definition.cjs +1 -1
  281. package/time-picker/definition.js +1 -1
  282. package/tree-item/definition.cjs +1 -1
  283. package/tree-item/definition.js +1 -1
  284. package/tree-view/definition.cjs +1 -1
  285. package/tree-view/definition.js +1 -1
  286. package/unbundled/definition13.cjs +1 -1
  287. package/unbundled/definition13.js +1 -1
  288. package/unbundled/definition2.cjs +9 -3
  289. package/unbundled/definition2.js +9 -3
  290. package/unbundled/definition23.cjs +1 -0
  291. package/unbundled/definition23.js +2 -1
  292. package/unbundled/definition29.cjs +2 -2
  293. package/unbundled/definition29.js +2 -2
  294. package/unbundled/definition30.cjs +65 -484
  295. package/unbundled/definition30.js +57 -482
  296. package/unbundled/definition31.cjs +501 -39
  297. package/unbundled/definition31.js +499 -37
  298. package/unbundled/definition32.cjs +38 -239
  299. package/unbundled/definition32.js +35 -236
  300. package/unbundled/definition33.cjs +236 -74
  301. package/unbundled/definition33.js +233 -71
  302. package/unbundled/definition34.cjs +74 -1968
  303. package/unbundled/definition34.js +70 -1940
  304. package/unbundled/definition35.cjs +1992 -26
  305. package/unbundled/definition35.js +1964 -27
  306. package/unbundled/definition36.cjs +26 -111
  307. package/unbundled/definition36.js +23 -103
  308. package/unbundled/definition37.cjs +53 -294
  309. package/unbundled/definition37.js +50 -291
  310. package/unbundled/definition38.cjs +282 -132
  311. package/unbundled/definition38.js +279 -129
  312. package/unbundled/definition39.cjs +165 -339
  313. package/unbundled/definition39.js +163 -337
  314. package/unbundled/definition40.cjs +394 -228
  315. package/unbundled/definition40.js +391 -225
  316. package/unbundled/definition41.cjs +263 -46
  317. package/unbundled/definition41.js +258 -41
  318. package/unbundled/definition42.cjs +47 -67
  319. package/unbundled/definition42.js +45 -65
  320. package/unbundled/definition43.cjs +56 -383
  321. package/unbundled/definition43.js +55 -382
  322. package/unbundled/definition44.cjs +386 -44
  323. package/unbundled/definition44.js +382 -40
  324. package/unbundled/definition45.cjs +53 -45
  325. package/unbundled/definition45.js +49 -41
  326. package/unbundled/definition46.cjs +40 -164
  327. package/unbundled/definition46.js +36 -160
  328. package/unbundled/definition47.cjs +171 -31
  329. package/unbundled/definition47.js +168 -22
  330. package/unbundled/definition48.cjs +30 -89
  331. package/unbundled/definition48.js +22 -87
  332. package/unbundled/definition49.cjs +70 -33
  333. package/unbundled/definition49.js +67 -30
  334. package/unbundled/definition50.cjs +54 -23
  335. package/unbundled/definition50.js +52 -18
  336. package/unbundled/definition51.cjs +23 -39
  337. package/unbundled/definition51.js +17 -36
  338. package/unbundled/definition52.cjs +29 -314
  339. package/unbundled/definition52.js +27 -312
  340. package/unbundled/definition53.cjs +301 -195
  341. package/unbundled/definition53.js +297 -191
  342. package/unbundled/definition54.cjs +210 -40
  343. package/unbundled/definition54.js +206 -36
  344. package/unbundled/definition55.cjs +42 -266
  345. package/unbundled/definition55.js +38 -262
  346. package/unbundled/definition56.cjs +266 -50
  347. package/unbundled/definition56.js +263 -46
  348. package/unbundled/definition57.cjs +48 -146
  349. package/unbundled/definition57.js +47 -143
  350. package/unbundled/definition58.cjs +127 -225
  351. package/unbundled/definition58.js +122 -223
  352. package/unbundled/definition59.cjs +199 -418
  353. package/unbundled/definition59.js +196 -415
  354. package/unbundled/definition60.cjs +441 -3738
  355. package/unbundled/definition60.js +431 -3565
  356. package/unbundled/definition61.cjs +3712 -728
  357. package/unbundled/definition61.js +3538 -717
  358. package/unbundled/definition62.cjs +769 -97
  359. package/unbundled/definition62.js +766 -94
  360. package/unbundled/definition63.cjs +100 -981
  361. package/unbundled/definition63.js +98 -976
  362. package/unbundled/definition64.cjs +988 -93
  363. package/unbundled/definition64.js +982 -90
  364. package/unbundled/definition65.cjs +109 -73
  365. package/unbundled/definition65.js +105 -63
  366. package/unbundled/definition66.cjs +69 -155
  367. package/unbundled/definition66.js +60 -152
  368. package/unbundled/definition67.cjs +154 -118
  369. package/unbundled/definition67.js +151 -115
  370. package/unbundled/definition68.cjs +124 -49
  371. package/unbundled/definition68.js +120 -45
  372. package/unbundled/definition69.cjs +51 -84
  373. package/unbundled/definition69.js +50 -80
  374. package/unbundled/definition70.cjs +91 -19
  375. package/unbundled/definition70.js +86 -14
  376. package/unbundled/definition71.cjs +20 -87
  377. package/unbundled/definition71.js +14 -84
  378. package/unbundled/definition72.cjs +76 -294
  379. package/unbundled/definition72.js +71 -217
  380. package/unbundled/definition73.cjs +288 -311
  381. package/unbundled/definition73.js +218 -306
  382. package/unbundled/definition74.cjs +326 -26
  383. package/unbundled/definition74.js +317 -23
  384. package/unbundled/definition75.cjs +27 -122
  385. package/unbundled/definition75.js +22 -118
  386. package/unbundled/definition76.cjs +103 -232
  387. package/unbundled/definition76.js +99 -228
  388. package/unbundled/definition77.cjs +259 -26
  389. package/unbundled/definition77.js +249 -23
  390. package/unbundled/definition78.cjs +29 -148
  391. package/unbundled/definition78.js +27 -133
  392. package/unbundled/definition79.cjs +117 -173
  393. package/unbundled/definition79.js +108 -169
  394. package/unbundled/definition80.cjs +181 -477
  395. package/unbundled/definition80.js +176 -471
  396. package/unbundled/definition81.cjs +517 -0
  397. package/unbundled/definition81.js +497 -0
  398. package/unbundled/extractOptions.cjs +21 -0
  399. package/unbundled/extractOptions.js +16 -0
  400. package/unbundled/listbox.cjs +23 -6
  401. package/unbundled/listbox.js +23 -6
  402. package/unbundled/vivid-element.cjs +10 -1
  403. package/unbundled/vivid-element.js +10 -1
  404. package/video-player/definition.cjs +1 -1
  405. package/video-player/definition.js +1 -1
  406. package/vivid.api.json +194 -0
@@ -2,75 +2,537 @@ 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_definition$3 = require("./definition29.cjs");
17
+ const require_definition$4 = require("./definition30.cjs");
18
+ const require_listbox = require("./listbox.cjs");
6
19
  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)}";
20
+ let _microsoft_fast_web_utilities = require("@microsoft/fast-web-utilities");
21
+ //#region src/lib/combobox/combobox.scss?inline
22
+ 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
23
  //#endregion
10
- //#region src/lib/country/country.ts
24
+ //#region src/lib/combobox/combobox.options.ts
25
+ /** Autocomplete values for combobox. */
26
+ var ComboboxAutocomplete = {
27
+ inline: "inline",
28
+ list: "list",
29
+ both: "both",
30
+ none: "none"
31
+ };
32
+ //#endregion
33
+ //#region src/lib/combobox/combobox.ts
11
34
  /**
12
35
  * @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.
36
+ * @component combobox
37
+ * @slot - Default slot.
38
+ * @slot icon - The preferred way to add an icon to the combobox control.
39
+ * @slot meta - Slot to add meta content to the combobox control.
40
+ * @slot helper-text - Describes how to use the combobox. Alternative to the `helper-text` attribute.
41
+ * @event {CustomEvent<undefined>} change - Fires a custom 'change' event when the value updates
42
+ * @vueModel modelValue value change `event.currentTarget.value`
43
+ * @testAction fill comboboxFill
44
+ * @testAction clear comboboxClear
45
+ * @testAction selectOptionByText selectOptionByText
46
+ * @testAction selectOptionByValue selectOptionByValue
47
+ * @testRef control shadow input.control
15
48
  */
16
- var Country = class extends require_vivid_element.VividElement {
49
+ 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))))))) {
50
+ constructor(..._args) {
51
+ super(..._args);
52
+ this.filteredOptions = [];
53
+ this.filter = "";
54
+ this._isNavigatingWithKeyboard = false;
55
+ this.fixedDropdown = false;
56
+ this.listboxId = (0, _microsoft_fast_web_utilities.uniqueId)("listbox-");
57
+ this.maxHeight = 0;
58
+ this.open = false;
59
+ this.proxy = document.createElement("input");
60
+ }
61
+ /** @internal */
62
+ formResetCallback() {
63
+ super.formResetCallback();
64
+ this.selectedIndex = this._newDefaultSelectedIndex([], this.options, -1) ?? -1;
65
+ this.value = this.firstSelectedOption?.text || "";
66
+ }
67
+ /** {@inheritDoc (FormAssociated:interface).validate} */
68
+ validate() {
69
+ super.validate(this.control);
70
+ }
71
+ get isAutocompleteInline() {
72
+ return this.autocomplete === ComboboxAutocomplete.inline || this.isAutocompleteBoth;
73
+ }
74
+ get isAutocompleteList() {
75
+ return this.autocomplete === ComboboxAutocomplete.list || this.isAutocompleteBoth;
76
+ }
77
+ get isAutocompleteBoth() {
78
+ return this.autocomplete === ComboboxAutocomplete.both;
79
+ }
80
+ /** @internal */
81
+ openChanged() {
82
+ if (this.open) this.enqueueScrollSelectedOptionIntoViewIfNeeded();
83
+ }
84
+ /** A read-only list of options. */
85
+ get options() {
86
+ _microsoft_fast_element.Observable.track(this, "options");
87
+ return this.filteredOptions.length ? this.filteredOptions : this._options;
88
+ }
89
+ set options(value) {
90
+ super.options = value;
91
+ }
92
+ /**
93
+ * Updates the placeholder on the proxy element.
94
+ * @internal
95
+ */
96
+ placeholderChanged() {
97
+ /* v8 ignore if -- @preserve */
98
+ if (this.proxy instanceof HTMLInputElement) this.proxy.placeholder = this.placeholder;
99
+ }
17
100
  /** @internal */
18
- get flagIconName() {
19
- return require_utils.getFlagIconName(this.code);
101
+ valueChanged(prev, next) {
102
+ if (this.$fastController.isConnected && this.options) {
103
+ const selectedIndex = this.options.findIndex((el) => el.text.toLowerCase() === next.toLowerCase());
104
+ const prevSelectedValue = this.options[this.selectedIndex]?.text;
105
+ const nextSelectedValue = this.options[selectedIndex]?.text;
106
+ this.selectedIndex = prevSelectedValue !== nextSelectedValue ? selectedIndex : this.selectedIndex;
107
+ }
108
+ super.valueChanged(prev, next);
109
+ }
110
+ /**
111
+ * Handle opening and closing the listbox when the combobox is clicked.
112
+ *
113
+ * @param e - the mouse event
114
+ * @internal
115
+ */
116
+ clickHandler(e) {
117
+ if (this.disabled || this._isFromContextualHelp(e)) return;
118
+ if (this.open) {
119
+ const capturedOption = e.target.closest(`option,[role=option],[data-vvd-component=option]`);
120
+ if (!capturedOption || capturedOption.disabled) return;
121
+ this.selectedOptions = [capturedOption];
122
+ this.control.value = capturedOption.text;
123
+ this.clearSelectionRange();
124
+ this.updateValue(true);
125
+ }
126
+ this.open = !this.open;
127
+ if (this.open) this.control.focus();
128
+ return true;
129
+ }
130
+ /**
131
+ * Handle closing the listbox when the combobox is open and the chevron icon is clicked.
132
+ *
133
+ * @param e - the mouse event
134
+ * @internal
135
+ */
136
+ _chevronIconClickHandler(e) {
137
+ if (!this.open) return;
138
+ e.stopPropagation();
139
+ this.open = false;
140
+ }
141
+ connectedCallback() {
142
+ super.connectedCallback();
143
+ if (this.value) this.initialValue = this.value;
144
+ this._popup.anchor = this._anchor;
145
+ }
146
+ /** Filter available options by text value. */
147
+ filterOptions() {
148
+ if (!this.autocomplete || this.autocomplete === ComboboxAutocomplete.none) this.filter = "";
149
+ this.filteredOptions = this._options.filter((o) => o.text.toLowerCase().startsWith(this.filter.toLowerCase()));
150
+ if (this.isAutocompleteList) {
151
+ this._options.forEach((o) => {
152
+ o.hidden = !this.filteredOptions.includes(o);
153
+ });
154
+ for (const el of Array.from(this.children)) if (require_definition$4.isOptgroup(el)) {
155
+ const hasVisibleOption = Array.from(el.children).some((child) => require_definition$3.isListboxOption(child) && !child.hidden);
156
+ el.style.display = hasVisibleOption ? "" : "none";
157
+ }
158
+ }
159
+ }
160
+ /**
161
+ * Focus the control and scroll the first selected option into view.
162
+ *
163
+ * @internal
164
+ */
165
+ focusAndScrollOptionIntoView() {
166
+ if (this.contains(document.activeElement)) {
167
+ this.control.focus();
168
+ this.enqueueScrollSelectedOptionIntoViewIfNeeded();
169
+ }
20
170
  }
21
171
  /** @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;
172
+ enqueueScrollSelectedOptionIntoViewIfNeeded() {
173
+ const firstSelectedOption = this.firstSelectedOption;
174
+ /* v8 ignore else -- @preserve */
175
+ if (firstSelectedOption) requestAnimationFrame(() => {
176
+ firstSelectedOption.scrollIntoView({ block: "nearest" });
177
+ });
178
+ }
179
+ /**
180
+ * Handle focus state when the element or its children lose focus.
181
+ *
182
+ * @param e - The focus event
183
+ * @internal
184
+ */
185
+ focusoutHandler(e) {
186
+ this.syncValue();
187
+ if (!this.open) return true;
188
+ const focusTarget = e.relatedTarget;
189
+ if (this.isSameNode(focusTarget)) {
190
+ this.focus();
191
+ return;
192
+ }
193
+ this.open = false;
194
+ }
195
+ /**
196
+ * Handle content changes on the control input.
197
+ *
198
+ * @param e - the input event
199
+ * @internal
200
+ */
201
+ inputHandler(e) {
202
+ this.filter = this.control.value;
203
+ this.filterOptions();
204
+ if (!this.isAutocompleteInline) this.selectedIndex = this.options.map((option) => option.text).indexOf(this.control.value);
205
+ if (e.inputType.includes("deleteContent") || !this.filter.length) return true;
206
+ if (this.isAutocompleteList && !this.open) this.open = true;
207
+ if (this.isAutocompleteInline) if (this.filteredOptions.length) {
208
+ this.selectedOptions = [this.filteredOptions[0]];
209
+ this.selectedIndex = this.options.indexOf(this.firstSelectedOption);
210
+ this.setInlineSelection();
211
+ } else this.selectedIndex = -1;
212
+ }
213
+ /**
214
+ * Handle keydown actions for listbox navigation.
215
+ *
216
+ * @param e - the keyboard event
217
+ * @internal
218
+ */
219
+ keydownHandler(e) {
220
+ const key = e.key;
221
+ if (e.ctrlKey || e.shiftKey) return true;
222
+ switch (key) {
223
+ case "Enter":
224
+ this.syncValue();
225
+ /* v8 ignore else -- @preserve */
226
+ if (this.isAutocompleteInline) this.filter = this.value;
227
+ this.open = false;
228
+ this.clearSelectionRange();
229
+ return;
230
+ case "Escape":
231
+ /* v8 ignore else -- @preserve */
232
+ if (!this.isAutocompleteInline) this.selectedIndex = -1;
233
+ if (this.open) {
234
+ this.open = false;
235
+ return;
236
+ }
237
+ this.value = "";
238
+ this.control.value = "";
239
+ this.filter = "";
240
+ this.filterOptions();
241
+ return;
242
+ case "Tab":
243
+ this.setInputToSelection();
244
+ if (!this.open) return true;
245
+ e.preventDefault();
246
+ this.open = false;
247
+ return;
248
+ case "ArrowUp":
249
+ case "ArrowDown":
250
+ this.filterOptions();
251
+ if (!this.open) {
252
+ this.open = true;
253
+ return;
254
+ }
255
+ /* v8 ignore else -- @preserve */
256
+ if (this.filteredOptions.length > 0) {
257
+ this._isNavigatingWithKeyboard = true;
258
+ super.keydownHandler(e);
259
+ this._isNavigatingWithKeyboard = false;
260
+ }
261
+ if (this.isAutocompleteInline) this.setInlineSelection();
262
+ return;
263
+ default: return true;
264
+ }
265
+ }
266
+ /** @internal */
267
+ setSelectedOptions() {
268
+ super.setSelectedOptions();
269
+ if (!this._isNavigatingWithKeyboard) this._activeDescendant = "";
270
+ }
271
+ /**
272
+ * Ensure that the selectedIndex is within the current allowable filtered range.
273
+ *
274
+ * @param prev - the previous selected index value
275
+ * @param next - the current selected index value
276
+ *
277
+ * @internal
278
+ */
279
+ selectedIndexChanged(prev, next) {
280
+ if (this.$fastController.isConnected) {
281
+ next = (0, _microsoft_fast_web_utilities.limit)(-1, this.options.length - 1, next);
282
+ if (next !== this.selectedIndex) {
283
+ this.selectedIndex = next;
284
+ return;
285
+ }
286
+ super.selectedIndexChanged(prev, next);
287
+ }
288
+ }
289
+ /**
290
+ * Move focus to the previous selectable option.
291
+ *
292
+ * @internal
293
+ */
294
+ selectPreviousOption() {
295
+ if (!this.disabled && this.selectedIndex >= 0) this.selectedIndex = this.selectedIndex - 1;
296
+ }
297
+ _isDefaultSelected(option) {
298
+ return super._isDefaultSelected(option) || option.text !== "" && option.text === this.initialValue;
299
+ }
300
+ /**
301
+ * Focus and set the content of the control based on the first selected option.
302
+ *
303
+ * @internal
304
+ */
305
+ setInputToSelection() {
306
+ if (this.firstSelectedOption) {
307
+ this.control.value = this.firstSelectedOption.text;
308
+ this.control.focus();
309
+ }
310
+ }
311
+ /**
312
+ * Focus, set and select the content of the control based on the first selected option.
313
+ *
314
+ * @internal
315
+ */
316
+ setInlineSelection() {
317
+ /* v8 ignore else -- @preserve */
318
+ if (this.firstSelectedOption) {
319
+ this.setInputToSelection();
320
+ this.control.setSelectionRange(this.filter.length, this.control.value.length, "backward");
321
+ }
322
+ }
323
+ /**
324
+ * Determines if a value update should involve emitting a change event, then updates the value.
325
+ *
326
+ * @internal
327
+ */
328
+ syncValue() {
329
+ const newValue = this.firstSelectedOption?.text ?? this.control.value;
330
+ this.updateValue(this.value !== newValue);
331
+ }
332
+ /**
333
+ * Ensure that the entire list of options is used when setting the selected property.
334
+ *
335
+ * @param prev - the previous list of selected options
336
+ * @param next - the current list of selected options
337
+ *
338
+ * @internal
339
+ */
340
+ selectedOptionsChanged(_prev, next) {
341
+ if (this.$fastController.isConnected) this._options.forEach((o) => {
342
+ o.selected = next.includes(o);
343
+ });
344
+ }
345
+ /**
346
+ * Synchronize the form-associated proxy and update the value property of the element.
347
+ *
348
+ * @param prev - the previous collection of slotted option elements
349
+ * @param next - the next collection of slotted option elements
350
+ *
351
+ * @internal
352
+ */
353
+ slottedOptionsChanged(prev, next) {
354
+ super.slottedOptionsChanged(prev, next);
355
+ this.updateValue();
356
+ const scale = this.getAttribute("scale") || this.scale;
357
+ next.forEach((element) => {
358
+ if (scale) {
359
+ element.setAttribute("scale", scale);
360
+ element.scale = scale;
361
+ }
362
+ });
363
+ }
364
+ /**
365
+ * Sets the value and to match the first selected option.
366
+ *
367
+ * @param shouldEmit - if true, the change event will be emitted
368
+ *
369
+ * @internal
370
+ */
371
+ updateValue(shouldEmit) {
372
+ if (this.$fastController.isConnected) this.value = this.firstSelectedOption?.text || this.control.value;
373
+ if (shouldEmit) this.$emit("change");
374
+ }
375
+ /** @internal */
376
+ clearSelectionRange() {
377
+ const controlValueLength = this.control.value.length;
378
+ this.control.setSelectionRange(controlValueLength, controlValueLength);
27
379
  }
28
380
  };
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);
381
+ require_decorate.__decorate([(0, _microsoft_fast_element.attr)({
382
+ attribute: "autocomplete",
383
+ mode: "fromView"
384
+ })], Combobox.prototype, "autocomplete", void 0);
385
+ require_decorate.__decorate([_microsoft_fast_element.attr], Combobox.prototype, "appearance", void 0);
386
+ require_decorate.__decorate([_microsoft_fast_element.attr], Combobox.prototype, "shape", void 0);
387
+ require_decorate.__decorate([(0, _microsoft_fast_element.attr)()], Combobox.prototype, "scale", void 0);
388
+ require_decorate.__decorate([_microsoft_fast_element.attr], Combobox.prototype, "placement", void 0);
389
+ require_decorate.__decorate([(0, _microsoft_fast_element.attr)({
390
+ mode: "boolean",
391
+ attribute: "fixed-dropdown"
392
+ })], Combobox.prototype, "fixedDropdown", void 0);
393
+ require_decorate.__decorate([_microsoft_fast_element.observable], Combobox.prototype, "metaSlottedContent", void 0);
394
+ require_decorate.__decorate([_microsoft_fast_element.observable], Combobox.prototype, "maxHeight", void 0);
395
+ require_decorate.__decorate([(0, _microsoft_fast_element.attr)({
396
+ attribute: "open",
397
+ mode: "boolean"
398
+ })], Combobox.prototype, "open", void 0);
399
+ require_decorate.__decorate([_microsoft_fast_element.attr], Combobox.prototype, "placeholder", void 0);
31
400
  //#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>`)}
401
+ //#region src/lib/combobox/combobox.template.ts
402
+ function renderLabel() {
403
+ return _microsoft_fast_element.html` <label for="control" class="label">
404
+ ${(x) => x.label}
405
+ </label>`;
406
+ }
407
+ function setFixedDropdownVarWidth(x) {
408
+ return x.open && x.fixedDropdown ? `--_combobox-fixed-width: ${Math.round(x.getBoundingClientRect().width)}px` : null;
409
+ }
410
+ function renderInput(context) {
411
+ const affixIconTemplate = require_affix.affixIconTemplateFactory(context);
412
+ const chevronTemplate = require_definition$1.chevronTemplateFactory(context);
413
+ return _microsoft_fast_element.html` <div
414
+ 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])}"
415
+ ${(0, _microsoft_fast_element.ref)("_anchor")}
416
+ >
417
+ <div
418
+ class="label-wrapper"
419
+ ?hidden=${(x) => !x.label && !x._hasContextualHelp}
420
+ >
421
+ ${(0, _microsoft_fast_element.when)((x) => x.label, renderLabel())}
422
+ <slot
423
+ name="contextual-help"
424
+ ${(0, _microsoft_fast_element.slotted)("_contextualHelpSlottedContent")}
425
+ ></slot>
426
+ </div>
427
+ <div class="fieldset">
428
+ ${(x) => affixIconTemplate(x.icon, require_affix.IconWrapper.Slot)}
429
+ <div class="wrapper">
430
+ <input
431
+ id="control"
432
+ autocomplete="off"
433
+ class="control"
434
+ aria-activedescendant="${(x) => x.open ? x._activeDescendant : null}"
435
+ aria-autocomplete="${(x) => x.autocomplete}"
436
+ aria-controls="${(x) => x.listboxId}"
437
+ aria-expanded="${(x) => x.open}"
438
+ aria-haspopup="listbox"
439
+ aria-describedby="${(x) => x._feedbackDescribedBy}"
440
+ placeholder="${(x) => x.placeholder}"
441
+ role="combobox"
442
+ type="text"
443
+ ?disabled="${(x) => x.disabled}"
444
+ :value="${(x) => x.value}"
445
+ @input="${(x, c) => x.inputHandler(c.event)}"
446
+ ${(0, _microsoft_fast_element.ref)("control")}
447
+ />
448
+ </div>
449
+ <div class="leading-items-wrapper">
450
+ <slot name="meta" ${(0, _microsoft_fast_element.slotted)("metaSlottedContent")}></slot>
451
+ <div
452
+ @click="${(x, c) => x._chevronIconClickHandler(c.event)}"
453
+ >
454
+ ${chevronTemplate}
455
+ </div>
456
+ </div>
45
457
  </div>
458
+ </div>`;
459
+ }
460
+ var comboboxTemplate = (context) => {
461
+ const popupTag = context.tagFor(require_definition$2.Popup);
462
+ return _microsoft_fast_element.html`
463
+ <template
464
+ tabindex="${(x) => !x.disabled ? "0" : null}"
465
+ class="${(x) => (0, _microsoft_fast_web_utilities.classNames)(["has-activedescendant", Boolean(x._activeDescendant) && x.open])}"
466
+ @click="${(x, c) => x.clickHandler(c.event)}"
467
+ @focusout="${(x, c) => x.focusoutHandler(c.event)}"
468
+ @keydown="${(x, { event }) => {
469
+ if (x.open) require_dialog.handleEscapeKeyAndStopPropogation(event);
470
+ return x.keydownHandler(event);
471
+ }}"
472
+ >
473
+ <div class="control-wrapper">
474
+ ${() => renderInput(context)}
475
+ <${popupTag} class="popup"
476
+ style="${setFixedDropdownVarWidth}"
477
+ ?open="${(x) => x.open}"
478
+ placement="${(x) => x.placement ?? "bottom-start"}"
479
+ strategy="${(x) => x.fixedDropdown ? "fixed" : "absolute"}"
480
+ ${(0, _microsoft_fast_element.ref)("_popup")}>
481
+ <div id="${(x) => x.listboxId}"
482
+ class="listbox"
483
+ role="listbox"
484
+ ?disabled="${(x) => x.disabled}"
485
+ ${(0, _microsoft_fast_element.ref)("listbox")}>
486
+ <slot ${(0, _microsoft_fast_element.slotted)({
487
+ filter: require_listbox.Listbox.slottedOptionFilter,
488
+ flatten: true,
489
+ property: "slottedOptions"
490
+ })}>
491
+ </slot>
492
+ </div>
493
+ </${popupTag}>
494
+ </div>
495
+ <div class="feedback-wrapper" @click="${(_, c) => c.event.stopPropagation()}">
496
+ ${(x) => x._getFeedbackTemplate(context)}
497
+ </div>
498
+ </template>
46
499
  `;
47
500
  };
48
501
  //#endregion
49
- //#region src/lib/country/definition.ts
502
+ //#region src/lib/combobox/definition.ts
50
503
  /** @internal */
51
- var countryDefinition = require_vivid_element.defineVividComponent("country", Country, CountryTemplate, [require_definition.iconDefinition], { styles: country_default });
504
+ var comboboxDefinition = require_vivid_element.defineVividComponent("combobox", Combobox, comboboxTemplate, [
505
+ require_definition.iconDefinition,
506
+ require_definition$2.popupDefinition,
507
+ require_definition$3.listboxOptionDefinition,
508
+ require_definition$4.optgroupDefinition,
509
+ require_mixins.feedbackMessageDefinition
510
+ ], {
511
+ styles: [require_text_field.text_field_default, combobox_default],
512
+ shadowOptions: { delegatesFocus: true }
513
+ });
52
514
  /**
53
- * Registers the country element with the design system.
515
+ * Registers the combobox elements with the design system.
54
516
  *
55
517
  * @param prefix - the prefix to use for the component name
56
518
  */
57
- var registerCountry = require_vivid_element.createRegisterFunction(countryDefinition);
519
+ var registerCombobox = require_vivid_element.createRegisterFunction(comboboxDefinition);
58
520
  //#endregion
59
- Object.defineProperty(exports, "Country", {
521
+ Object.defineProperty(exports, "Combobox", {
60
522
  enumerable: true,
61
523
  get: function() {
62
- return Country;
524
+ return Combobox;
63
525
  }
64
526
  });
65
- Object.defineProperty(exports, "countryDefinition", {
527
+ Object.defineProperty(exports, "comboboxDefinition", {
66
528
  enumerable: true,
67
529
  get: function() {
68
- return countryDefinition;
530
+ return comboboxDefinition;
69
531
  }
70
532
  });
71
- Object.defineProperty(exports, "registerCountry", {
533
+ Object.defineProperty(exports, "registerCombobox", {
72
534
  enumerable: true,
73
535
  get: function() {
74
- return registerCountry;
536
+ return registerCombobox;
75
537
  }
76
538
  });