@vonage/vivid 5.23.1-preview.0 → 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 (746) 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/action-group/index.cjs +1 -1
  6. package/action-group/index.js +1 -1
  7. package/alert/definition.cjs +1 -1
  8. package/alert/definition.js +1 -1
  9. package/alert/index.cjs +7 -7
  10. package/alert/index.js +13 -14
  11. package/audio-player/definition.cjs +1 -1
  12. package/audio-player/definition.js +1 -1
  13. package/audio-player/index.cjs +19 -17
  14. package/audio-player/index.js +24 -22
  15. package/avatar/definition.cjs +1 -1
  16. package/avatar/definition.js +1 -1
  17. package/avatar/index.cjs +4 -4
  18. package/avatar/index.js +6 -6
  19. package/badge/definition.cjs +1 -1
  20. package/badge/definition.js +1 -1
  21. package/badge/index.cjs +1 -1
  22. package/badge/index.js +1 -1
  23. package/banner/definition.cjs +1 -1
  24. package/banner/definition.js +1 -1
  25. package/banner/index.cjs +3 -3
  26. package/banner/index.js +8 -8
  27. package/breadcrumb/definition.cjs +1 -1
  28. package/breadcrumb/definition.js +1 -1
  29. package/breadcrumb-item/definition.cjs +1 -1
  30. package/breadcrumb-item/definition.js +1 -1
  31. package/breadcrumb-item/index.cjs +2 -2
  32. package/breadcrumb-item/index.js +5 -5
  33. package/bundled/affix.cjs +1 -1
  34. package/bundled/affix.js +1 -1
  35. package/bundled/base-color-picker.cjs +2 -2
  36. package/bundled/base-color-picker.js +5 -5
  37. package/bundled/calendar-picker.template.cjs +1 -1
  38. package/bundled/calendar-picker.template.js +1 -1
  39. package/bundled/definition11.cjs +4 -4
  40. package/bundled/definition11.js +5 -5
  41. package/bundled/definition12.cjs +9 -7
  42. package/bundled/definition12.js +28 -26
  43. package/bundled/definition13.cjs +9 -7
  44. package/bundled/definition13.js +16 -15
  45. package/bundled/definition15.cjs +8 -7
  46. package/bundled/definition15.js +26 -24
  47. package/bundled/definition16.cjs +4 -2
  48. package/bundled/definition16.js +8 -6
  49. package/bundled/definition17.cjs +8 -6
  50. package/bundled/definition17.js +15 -14
  51. package/bundled/definition18.cjs +12 -83
  52. package/bundled/definition18.js +35 -420
  53. package/bundled/definition19.cjs +87 -5
  54. package/bundled/definition19.js +432 -14
  55. package/bundled/definition2.cjs +1 -13
  56. package/bundled/definition2.js +181 -48
  57. package/bundled/definition20.cjs +7 -35
  58. package/bundled/definition20.js +17 -170
  59. package/bundled/definition21.cjs +35 -27
  60. package/bundled/definition21.js +154 -155
  61. package/bundled/definition22.cjs +29 -4
  62. package/bundled/definition22.js +171 -17
  63. package/bundled/definition23.cjs +6 -12
  64. package/bundled/definition23.js +17 -32
  65. package/bundled/definition24.cjs +12 -39
  66. package/bundled/definition24.js +32 -67
  67. package/bundled/definition25.cjs +44 -0
  68. package/bundled/definition25.js +77 -0
  69. package/bundled/definition3.cjs +13 -1
  70. package/bundled/definition3.js +48 -181
  71. package/bundled/definition4.cjs +9 -7
  72. package/bundled/definition4.js +18 -16
  73. package/bundled/definition5.cjs +5 -5
  74. package/bundled/definition5.js +9 -9
  75. package/bundled/definition6.cjs +3 -3
  76. package/bundled/definition6.js +16 -16
  77. package/bundled/definition7.cjs +1 -1
  78. package/bundled/definition7.js +1 -1
  79. package/bundled/definition8.cjs +7 -7
  80. package/bundled/definition8.js +9 -7
  81. package/bundled/definition9.cjs +4 -4
  82. package/bundled/definition9.js +12 -12
  83. package/bundled/extractOptions.cjs +1 -0
  84. package/bundled/extractOptions.js +11 -0
  85. package/bundled/listbox.cjs +1 -1
  86. package/bundled/listbox.js +24 -11
  87. package/bundled/mixins.cjs +3 -3
  88. package/bundled/mixins.js +5 -5
  89. package/bundled/numberConverter.cjs +1 -1
  90. package/bundled/numberConverter.js +36 -1
  91. package/bundled/picker-field.template.cjs +13 -13
  92. package/bundled/picker-field.template.js +16 -16
  93. package/bundled/render-in-light-dom.cjs +1 -1
  94. package/bundled/render-in-light-dom.js +16 -19
  95. package/bundled/slider.template.cjs +8 -8
  96. package/bundled/slider.template.js +9 -9
  97. package/bundled/text-field.cjs +1 -1
  98. package/bundled/text-field.js +1 -1
  99. package/bundled/time-selection-picker.template.cjs +3 -3
  100. package/bundled/time-selection-picker.template.js +9 -9
  101. package/bundled/vivid-element.cjs +1 -1
  102. package/bundled/vivid-element.js +9 -1
  103. package/button/definition.cjs +1 -1
  104. package/button/definition.js +1 -1
  105. package/calendar/definition.cjs +1 -1
  106. package/calendar/definition.js +1 -1
  107. package/calendar/index.cjs +9 -9
  108. package/calendar/index.js +7 -7
  109. package/calendar-event/definition.cjs +1 -1
  110. package/calendar-event/definition.js +1 -1
  111. package/calendar-event/index.cjs +2 -2
  112. package/calendar-event/index.js +2 -2
  113. package/card/definition.cjs +1 -1
  114. package/card/definition.js +1 -1
  115. package/card/index.cjs +3 -3
  116. package/card/index.js +6 -6
  117. package/color-picker/index.cjs +10 -10
  118. package/color-picker/index.js +52 -52
  119. package/combobox/definition.cjs +1 -1
  120. package/combobox/definition.js +1 -1
  121. package/combobox/index.cjs +11 -8
  122. package/combobox/index.js +59 -49
  123. package/country/definition.cjs +1 -1
  124. package/country/definition.js +1 -1
  125. package/country/index.cjs +1 -1
  126. package/country/index.js +1 -1
  127. package/country-group/definition.cjs +1 -1
  128. package/country-group/definition.js +1 -1
  129. package/country-group/index.cjs +1 -1
  130. package/country-group/index.js +2 -2
  131. package/custom-elements.json +837 -1225
  132. package/data-grid/definition.cjs +1 -1
  133. package/data-grid/definition.js +1 -1
  134. package/data-grid/index.cjs +8 -6
  135. package/data-grid/index.js +22 -20
  136. package/date-picker/definition.cjs +1 -1
  137. package/date-picker/definition.js +1 -1
  138. package/date-picker/index.cjs +1 -1
  139. package/date-picker/index.js +1 -1
  140. package/date-range-picker/definition.cjs +1 -1
  141. package/date-range-picker/definition.js +1 -1
  142. package/date-range-picker/index.cjs +1 -1
  143. package/date-range-picker/index.js +1 -1
  144. package/date-time-picker/definition.cjs +1 -1
  145. package/date-time-picker/definition.js +1 -1
  146. package/date-time-picker/index.cjs +1 -1
  147. package/date-time-picker/index.js +1 -1
  148. package/dial-pad/definition.cjs +1 -1
  149. package/dial-pad/definition.js +1 -1
  150. package/dial-pad/index.cjs +25 -23
  151. package/dial-pad/index.js +127 -56
  152. package/dialog/definition.cjs +1 -1
  153. package/dialog/definition.js +1 -1
  154. package/dialog/index.cjs +14 -14
  155. package/dialog/index.js +17 -18
  156. package/divider/definition.cjs +1 -1
  157. package/divider/definition.js +1 -1
  158. package/divider/index.cjs +1 -1
  159. package/divider/index.js +1 -1
  160. package/elevation/definition.cjs +1 -1
  161. package/elevation/definition.js +1 -1
  162. package/empty-state/definition.cjs +1 -1
  163. package/empty-state/definition.js +1 -1
  164. package/empty-state/index.cjs +4 -4
  165. package/empty-state/index.js +7 -11
  166. package/fab/definition.cjs +1 -1
  167. package/fab/definition.js +1 -1
  168. package/fab/index.cjs +4 -4
  169. package/fab/index.js +9 -13
  170. package/file-picker/definition.cjs +1 -1
  171. package/file-picker/definition.js +1 -1
  172. package/file-picker/index.cjs +8 -8
  173. package/file-picker/index.js +19 -19
  174. package/flag/definition.cjs +1 -1
  175. package/flag/definition.js +1 -1
  176. package/flag/index.cjs +5 -5
  177. package/flag/index.js +8 -12
  178. package/header/definition.cjs +1 -1
  179. package/header/definition.js +1 -1
  180. package/header/index.cjs +7 -7
  181. package/header/index.js +6 -10
  182. package/icon/index.cjs +1 -1
  183. package/icon/index.js +1 -1
  184. package/index.cjs +214 -209
  185. package/index.js +67 -66
  186. package/kbd-key/definition.cjs +1 -1
  187. package/kbd-key/definition.js +1 -1
  188. package/kbd-key/index.cjs +3 -3
  189. package/kbd-key/index.js +2 -6
  190. package/kbd-shortcut/definition.cjs +1 -1
  191. package/kbd-shortcut/definition.js +1 -1
  192. package/layout/definition.cjs +1 -1
  193. package/layout/definition.js +1 -1
  194. package/layout/index.cjs +3 -1
  195. package/layout/index.js +3 -1
  196. package/lib/accordion/variations.browser-spec.d.ts +1 -0
  197. package/lib/accordion-item/accordion-item.d.ts +2 -1
  198. package/lib/accordion-item/variations.browser-spec.d.ts +1 -0
  199. package/lib/action-group/action-group.d.ts +1 -1
  200. package/lib/action-group/variations.browser-spec.d.ts +1 -0
  201. package/lib/alert/alert.d.ts +2 -2
  202. package/lib/alert/variations.browser-spec.d.ts +1 -0
  203. package/lib/audio-player/audio-player.d.ts +1 -1
  204. package/lib/audio-player/variations.browser-spec.d.ts +1 -0
  205. package/lib/avatar/avatar.d.ts +1 -1
  206. package/lib/avatar/variations.browser-spec.d.ts +1 -0
  207. package/lib/badge/badge.d.ts +5 -5
  208. package/lib/badge/badge.template.d.ts +1 -2
  209. package/lib/badge/variations.browser-spec.d.ts +1 -0
  210. package/lib/banner/banner.d.ts +3 -3
  211. package/lib/banner/variations.browser-spec.d.ts +1 -0
  212. package/lib/breadcrumb/breadcrumb.d.ts +1 -1
  213. package/lib/breadcrumb-item/breadcrumb-item.d.ts +1 -1
  214. package/lib/breadcrumb-item/variations.browser-spec.d.ts +1 -0
  215. package/lib/button/button.d.ts +3 -3
  216. package/lib/button/variations.browser-spec.d.ts +1 -0
  217. package/lib/calendar/variations.browser-spec.d.ts +1 -0
  218. package/lib/calendar-event/calendar-event.d.ts +1 -1
  219. package/lib/calendar-event/variations.browser-spec.d.ts +1 -0
  220. package/lib/card/card.d.ts +5 -5
  221. package/lib/card/variations.browser-spec.d.ts +1 -0
  222. package/lib/checkbox/checkbox.d.ts +6 -6
  223. package/lib/checkbox/variations.browser-spec.d.ts +1 -0
  224. package/lib/color-picker/color-picker.d.ts +8 -8
  225. package/lib/color-picker/variations.browser-spec.d.ts +1 -0
  226. package/lib/combobox/combobox.d.ts +7 -7
  227. package/lib/combobox/variations.browser-spec.d.ts +1 -0
  228. package/lib/components.d.ts +1 -0
  229. package/lib/contextual-help/variations.browser-spec.d.ts +1 -0
  230. package/lib/country/variations.browser-spec.d.ts +1 -0
  231. package/lib/country-group/country-group.d.ts +2 -2
  232. package/lib/data-grid/data-grid-cell.d.ts +4 -3
  233. package/lib/data-grid/data-grid-row.d.ts +3 -2
  234. package/lib/data-grid/data-grid.options.d.ts +5 -0
  235. package/lib/data-grid/variations.browser-spec.d.ts +1 -0
  236. package/lib/date-picker/date-picker.d.ts +8 -8
  237. package/lib/date-picker/variations.browser-spec.d.ts +1 -0
  238. package/lib/date-range-picker/date-range-picker.d.ts +4 -4
  239. package/lib/date-range-picker/variations.browser-spec.d.ts +1 -0
  240. package/lib/date-time-picker/date-time-picker.d.ts +8 -8
  241. package/lib/date-time-picker/variations.browser-spec.d.ts +1 -0
  242. package/lib/dial-pad/dial-pad.d.ts +2 -1
  243. package/lib/dial-pad/variations.browser-spec.d.ts +1 -0
  244. package/lib/dialog/dialog.d.ts +2 -2
  245. package/lib/dialog/variations.browser-spec.d.ts +1 -0
  246. package/lib/divider/divider.d.ts +1 -1
  247. package/lib/divider/variations.browser-spec.d.ts +1 -0
  248. package/lib/empty-state/variations.browser-spec.d.ts +1 -0
  249. package/lib/fab/fab.d.ts +6 -6
  250. package/lib/fab/variations.browser-spec.d.ts +1 -0
  251. package/lib/file-picker/file-picker.d.ts +7 -7
  252. package/lib/file-picker/variations.browser-spec.d.ts +1 -0
  253. package/lib/flag/variations.browser-spec.d.ts +1 -0
  254. package/lib/header/header.d.ts +1 -1
  255. package/lib/header/variations.browser-spec.d.ts +1 -0
  256. package/lib/icon/variations.browser-spec.d.ts +1 -0
  257. package/lib/kbd-key/variations.browser-spec.d.ts +1 -0
  258. package/lib/kbd-shortcut/variations.browser-spec.d.ts +1 -0
  259. package/lib/layout/variations.browser-spec.d.ts +1 -0
  260. package/lib/menu/menu.d.ts +2 -2
  261. package/lib/menu/variations.browser-spec.d.ts +1 -0
  262. package/lib/menu-item/menu-item.d.ts +3 -3
  263. package/lib/menu-item/variations.browser-spec.d.ts +1 -0
  264. package/lib/nav/nav.d.ts +1 -1
  265. package/lib/nav/variations.browser-spec.d.ts +1 -0
  266. package/lib/nav-disclosure/nav-disclosure.d.ts +2 -2
  267. package/lib/nav-disclosure/variations.browser-spec.d.ts +1 -0
  268. package/lib/nav-item/nav-item.d.ts +2 -2
  269. package/lib/nav-item/variations.browser-spec.d.ts +1 -0
  270. package/lib/note/note.d.ts +1 -1
  271. package/lib/note/variations.browser-spec.d.ts +1 -0
  272. package/lib/number-field/number-field.d.ts +9 -9
  273. package/lib/number-field/variations.browser-spec.d.ts +1 -0
  274. package/lib/optgroup/definition.d.ts +3 -0
  275. package/lib/optgroup/index.d.ts +1 -0
  276. package/lib/optgroup/optgroup.d.ts +430 -0
  277. package/lib/optgroup/optgroup.template.d.ts +2 -0
  278. package/lib/optgroup/variations.browser-spec.d.ts +1 -0
  279. package/lib/option/option.d.ts +2 -2
  280. package/lib/option/variations.browser-spec.d.ts +1 -0
  281. package/lib/pagination/pagination.d.ts +1 -1
  282. package/lib/pagination/variations.browser-spec.d.ts +1 -0
  283. package/lib/popover/popover.d.ts +2 -2
  284. package/lib/popover/variations.browser-spec.d.ts +1 -0
  285. package/lib/progress/progress.d.ts +1 -1
  286. package/lib/progress/variations.browser-spec.d.ts +1 -0
  287. package/lib/progress-ring/progress-ring.d.ts +1 -1
  288. package/lib/progress-ring/variations.browser-spec.d.ts +1 -0
  289. package/lib/radio/radio.d.ts +3 -3
  290. package/lib/radio/variations.browser-spec.d.ts +1 -0
  291. package/lib/radio-group/radio-group.d.ts +1 -1
  292. package/lib/radio-group/variations.browser-spec.d.ts +1 -0
  293. package/lib/range-slider/range-slider.d.ts +3 -3
  294. package/lib/range-slider/variations.browser-spec.d.ts +1 -0
  295. package/lib/rich-text-editor/rich-text-editor.d.ts +1 -1
  296. package/lib/rich-text-editor/rte/features/internal/cursor-fix.d.ts +6 -1
  297. package/lib/rich-text-editor/variations.browser-spec.d.ts +1 -0
  298. package/lib/rich-text-view/variations.browser-spec.d.ts +1 -0
  299. package/lib/searchable-select/option-tag.d.ts +1 -1
  300. package/lib/searchable-select/searchable-select.d.ts +47 -47
  301. package/lib/searchable-select/variations.browser-spec.d.ts +1 -0
  302. package/lib/select/select.d.ts +9 -9
  303. package/lib/select/variations.browser-spec.d.ts +1 -0
  304. package/lib/selectable-box/selectable-box.d.ts +1 -1
  305. package/lib/selectable-box/variations.browser-spec.d.ts +1 -0
  306. package/lib/side-drawer/variations.browser-spec.d.ts +1 -0
  307. package/lib/simple-color-picker/simple-color-picker.d.ts +4 -4
  308. package/lib/simple-color-picker/variations.browser-spec.d.ts +1 -0
  309. package/lib/slider/slider.d.ts +3 -3
  310. package/lib/slider/variations.browser-spec.d.ts +1 -0
  311. package/lib/split-button/split-button.d.ts +3 -3
  312. package/lib/split-button/variations.browser-spec.d.ts +1 -0
  313. package/lib/status/status.d.ts +1 -1
  314. package/lib/status/variations.browser-spec.d.ts +1 -0
  315. package/lib/switch/switch.d.ts +2 -2
  316. package/lib/switch/variations.browser-spec.d.ts +1 -0
  317. package/lib/tab/tab.d.ts +15 -15
  318. package/lib/tab-panel/tab-panel.d.ts +1 -1
  319. package/lib/table/table-cell.d.ts +1 -1
  320. package/lib/table/table-header-cell.d.ts +1 -1
  321. package/lib/table/table-row.d.ts +1 -1
  322. package/lib/table/table-sorting-button.d.ts +1 -1
  323. package/lib/table/variations.browser-spec.d.ts +1 -0
  324. package/lib/tabs/variations.browser-spec.d.ts +1 -0
  325. package/lib/tag/tag.d.ts +15 -15
  326. package/lib/tag/variations.browser-spec.d.ts +1 -0
  327. package/lib/tag-group/tag-group.d.ts +1 -1
  328. package/lib/tag-name-map.d.ts +2 -1
  329. package/lib/text-area/text-area.d.ts +8 -8
  330. package/lib/text-area/text-area.template.d.ts +1 -2
  331. package/lib/text-area/variations.browser-spec.d.ts +1 -0
  332. package/lib/text-field/text-field.d.ts +9 -9
  333. package/lib/text-field/variations.browser-spec.d.ts +1 -0
  334. package/lib/time-picker/time-picker.d.ts +4 -4
  335. package/lib/time-picker/variations.browser-spec.d.ts +1 -0
  336. package/lib/toggletip/toggletip.d.ts +2 -2
  337. package/lib/toggletip/variations.browser-spec.d.ts +1 -0
  338. package/lib/tooltip/tooltip.d.ts +2 -2
  339. package/lib/tooltip/variations.browser-spec.d.ts +1 -0
  340. package/lib/tree-item/tree-item.d.ts +2 -2
  341. package/lib/tree-item/variations.browser-spec.d.ts +1 -0
  342. package/lib/tree-view/tree-view.d.ts +1 -1
  343. package/lib/video-player/variations.browser-spec.d.ts +1 -0
  344. package/lib/video-player/video-player.d.ts +1 -1
  345. package/menu/definition.cjs +1 -1
  346. package/menu/definition.js +1 -1
  347. package/menu/index.cjs +1 -1
  348. package/menu/index.js +1 -1
  349. package/menu-item/definition.cjs +1 -1
  350. package/menu-item/definition.js +1 -1
  351. package/menu-item/index.cjs +1 -1
  352. package/menu-item/index.js +1 -1
  353. package/nav/definition.cjs +1 -1
  354. package/nav/definition.js +1 -1
  355. package/nav-disclosure/definition.cjs +1 -1
  356. package/nav-disclosure/definition.js +1 -1
  357. package/nav-disclosure/index.cjs +6 -6
  358. package/nav-disclosure/index.js +11 -15
  359. package/nav-item/definition.cjs +1 -1
  360. package/nav-item/definition.js +1 -1
  361. package/nav-item/index.cjs +2 -2
  362. package/nav-item/index.js +11 -15
  363. package/note/definition.cjs +1 -1
  364. package/note/definition.js +1 -1
  365. package/note/index.cjs +5 -5
  366. package/note/index.js +10 -11
  367. package/number-field/definition.cjs +1 -1
  368. package/number-field/definition.js +1 -1
  369. package/number-field/index.cjs +12 -12
  370. package/number-field/index.js +35 -36
  371. package/optgroup/definition.cjs +5 -0
  372. package/optgroup/definition.js +2 -0
  373. package/optgroup/index.cjs +1 -0
  374. package/optgroup/index.js +4 -0
  375. package/package.json +15 -6
  376. package/pagination/definition.cjs +1 -1
  377. package/pagination/definition.js +1 -1
  378. package/platform-switch/definition.cjs +1 -1
  379. package/platform-switch/definition.js +1 -1
  380. package/popover/definition.cjs +1 -1
  381. package/popover/definition.js +1 -1
  382. package/popover/index.cjs +8 -8
  383. package/popover/index.js +11 -15
  384. package/popup/definition.cjs +1 -1
  385. package/popup/definition.js +1 -1
  386. package/progress/definition.cjs +1 -1
  387. package/progress/definition.js +1 -1
  388. package/progress/index.cjs +8 -8
  389. package/progress/index.js +9 -10
  390. package/radio/definition.cjs +1 -1
  391. package/radio/definition.js +1 -1
  392. package/radio-group/definition.cjs +1 -1
  393. package/radio-group/definition.js +1 -1
  394. package/range-slider/definition.cjs +1 -1
  395. package/range-slider/definition.js +1 -1
  396. package/range-slider/index.cjs +10 -8
  397. package/range-slider/index.js +26 -24
  398. package/rich-text-editor/definition.cjs +1 -1
  399. package/rich-text-editor/definition.js +1 -1
  400. package/rich-text-editor/index.cjs +3 -3
  401. package/rich-text-editor/index.js +762 -751
  402. package/rich-text-view/definition.cjs +1 -1
  403. package/rich-text-view/definition.js +1 -1
  404. package/searchable-select/definition.cjs +2 -1
  405. package/searchable-select/definition.js +2 -2
  406. package/searchable-select/index.cjs +30 -27
  407. package/searchable-select/index.js +104 -85
  408. package/select/definition.cjs +1 -1
  409. package/select/definition.js +1 -1
  410. package/select/index.cjs +1 -1
  411. package/select/index.js +1 -1
  412. package/selectable-box/definition.cjs +1 -1
  413. package/selectable-box/definition.js +1 -1
  414. package/selectable-box/index.cjs +8 -8
  415. package/selectable-box/index.js +8 -9
  416. package/shared/aria/delegates-aria.d.ts +1 -1
  417. package/shared/aria/host-semantics.d.ts +1 -1
  418. package/shared/color-picker/base-color-picker.d.ts +1 -1
  419. package/shared/feedback/feedback-message.d.ts +1 -1
  420. package/shared/feedback/mixins.d.ts +2 -2
  421. package/shared/foundation/button/button.d.ts +2 -2
  422. package/shared/foundation/form-associated/form-associated.d.ts +2 -2
  423. package/shared/foundation/listbox/extractOptions.d.ts +2 -0
  424. package/shared/foundation/listbox/listbox.d.ts +2 -0
  425. package/shared/patterns/affix.d.ts +2 -2
  426. package/shared/patterns/anchored.d.ts +2 -2
  427. package/shared/patterns/char-count/char-count.d.ts +1 -1
  428. package/shared/patterns/form-elements/form-element.d.ts +1 -1
  429. package/shared/patterns/form-elements/with-contextual-help.d.ts +1 -1
  430. package/shared/patterns/form-elements/with-error-text.d.ts +1 -1
  431. package/shared/patterns/form-elements/with-success-text.d.ts +1 -1
  432. package/shared/patterns/kbd-shortcut.d.ts +1 -1
  433. package/shared/patterns/linkable.d.ts +1 -1
  434. package/shared/patterns/localized.d.ts +2 -2
  435. package/shared/patterns/trapped-focus.d.ts +1 -1
  436. package/shared/picker-field/mixins/calendar-picker.d.ts +2 -2
  437. package/shared/picker-field/mixins/calendar-picker.template.d.ts +2 -2
  438. package/shared/picker-field/mixins/inline-time-picker/inline-time-picker.d.ts +1 -1
  439. package/shared/picker-field/mixins/min-max-calendar-picker.d.ts +2 -2
  440. package/shared/picker-field/mixins/single-date-picker.d.ts +2 -2
  441. package/shared/picker-field/mixins/single-value-picker.d.ts +2 -2
  442. package/shared/picker-field/mixins/time-selection-picker.d.ts +2 -2
  443. package/shared/picker-field/mixins/time-selection-picker.template.d.ts +4 -4
  444. package/shared/picker-field/picker-field.d.ts +7 -7
  445. package/side-drawer/definition.cjs +1 -1
  446. package/side-drawer/definition.js +1 -1
  447. package/side-drawer/index.cjs +3 -3
  448. package/side-drawer/index.js +3 -3
  449. package/simple-color-picker/definition.cjs +1 -1
  450. package/simple-color-picker/definition.js +1 -1
  451. package/simple-color-picker/index.cjs +4 -4
  452. package/simple-color-picker/index.js +6 -6
  453. package/slider/definition.cjs +1 -1
  454. package/slider/definition.js +1 -1
  455. package/slider/index.cjs +1 -1
  456. package/slider/index.js +1 -1
  457. package/split-button/definition.cjs +1 -1
  458. package/split-button/definition.js +1 -1
  459. package/split-button/index.cjs +5 -4
  460. package/split-button/index.js +10 -9
  461. package/status/definition.cjs +1 -1
  462. package/status/definition.js +1 -1
  463. package/status/index.cjs +7 -5
  464. package/status/index.js +14 -12
  465. package/styles/core/all.css +5 -7
  466. package/styles/core/theme.css +5 -7
  467. package/styles/core/typography.css +0 -3
  468. package/styles/tokens/vivid-2-compat.css +1 -6
  469. package/switch/definition.cjs +1 -1
  470. package/switch/definition.js +1 -1
  471. package/switch/index.cjs +5 -4
  472. package/switch/index.js +14 -12
  473. package/tab/definition.cjs +1 -1
  474. package/tab/definition.js +1 -1
  475. package/tab-panel/definition.cjs +1 -1
  476. package/tab-panel/definition.js +1 -1
  477. package/table/definition.cjs +1 -1
  478. package/table/definition.js +1 -1
  479. package/table/index.cjs +10 -10
  480. package/table/index.js +12 -12
  481. package/tabs/definition.cjs +1 -1
  482. package/tabs/definition.js +1 -1
  483. package/tabs/index.cjs +6 -4
  484. package/tabs/index.js +10 -9
  485. package/tag/definition.cjs +1 -1
  486. package/tag/definition.js +1 -1
  487. package/tag/index.cjs +6 -6
  488. package/tag/index.js +8 -8
  489. package/tag-group/definition.cjs +1 -1
  490. package/tag-group/definition.js +1 -1
  491. package/text-area/definition.cjs +1 -1
  492. package/text-area/definition.js +1 -1
  493. package/text-area/index.cjs +8 -6
  494. package/text-area/index.js +20 -19
  495. package/time-picker/definition.cjs +1 -1
  496. package/time-picker/definition.js +1 -1
  497. package/tree-item/definition.cjs +1 -1
  498. package/tree-item/definition.js +1 -1
  499. package/tree-view/definition.cjs +1 -1
  500. package/tree-view/definition.js +1 -1
  501. package/unbundled/affix.cjs +2 -7
  502. package/unbundled/affix.js +2 -7
  503. package/unbundled/anchored.cjs +2 -6
  504. package/unbundled/anchored.js +2 -6
  505. package/unbundled/aria-binding-directive.cjs +1 -3
  506. package/unbundled/aria-binding-directive.js +1 -3
  507. package/unbundled/base-color-picker.cjs +18 -52
  508. package/unbundled/base-color-picker.js +18 -52
  509. package/unbundled/base-progress.cjs +4 -14
  510. package/unbundled/base-progress.js +4 -14
  511. package/unbundled/button.cjs +2 -8
  512. package/unbundled/button.js +2 -8
  513. package/unbundled/calendar-picker.template.cjs +31 -85
  514. package/unbundled/calendar-picker.template.js +30 -84
  515. package/unbundled/char-count.cjs +2 -4
  516. package/unbundled/char-count.js +2 -4
  517. package/unbundled/data-grid.options.cjs +3 -19
  518. package/unbundled/data-grid.options.js +3 -19
  519. package/unbundled/definition.cjs +3 -8
  520. package/unbundled/definition.js +3 -8
  521. package/unbundled/definition10.cjs +316 -211
  522. package/unbundled/definition10.js +313 -202
  523. package/unbundled/definition11.cjs +262 -356
  524. package/unbundled/definition11.js +248 -354
  525. package/unbundled/definition12.cjs +243 -274
  526. package/unbundled/definition12.js +241 -260
  527. package/unbundled/definition13.cjs +341 -255
  528. package/unbundled/definition13.js +338 -252
  529. package/unbundled/definition14.cjs +61 -371
  530. package/unbundled/definition14.js +57 -367
  531. package/unbundled/definition15.cjs +32 -77
  532. package/unbundled/definition15.js +28 -73
  533. package/unbundled/definition16.cjs +120 -32
  534. package/unbundled/definition16.js +117 -29
  535. package/unbundled/definition17.cjs +24 -132
  536. package/unbundled/definition17.js +24 -126
  537. package/unbundled/definition18.cjs +74 -26
  538. package/unbundled/definition18.js +67 -25
  539. package/unbundled/definition19.cjs +33 -79
  540. package/unbundled/definition19.js +32 -73
  541. package/unbundled/definition2.cjs +11 -8
  542. package/unbundled/definition2.js +11 -8
  543. package/unbundled/definition20.cjs +272 -29
  544. package/unbundled/definition20.js +264 -27
  545. package/unbundled/definition21.cjs +135 -263
  546. package/unbundled/definition21.js +133 -260
  547. package/unbundled/definition22.cjs +17 -155
  548. package/unbundled/definition22.js +13 -151
  549. package/unbundled/definition23.cjs +9 -17
  550. package/unbundled/definition23.js +10 -18
  551. package/unbundled/definition24.cjs +4 -10
  552. package/unbundled/definition24.js +4 -10
  553. package/unbundled/definition25.cjs +2 -10
  554. package/unbundled/definition25.js +2 -10
  555. package/unbundled/definition26.cjs +28 -70
  556. package/unbundled/definition26.js +28 -70
  557. package/unbundled/definition27.cjs +6 -13
  558. package/unbundled/definition27.js +6 -13
  559. package/unbundled/definition28.cjs +30 -77
  560. package/unbundled/definition28.js +30 -77
  561. package/unbundled/definition29.cjs +7 -14
  562. package/unbundled/definition29.js +7 -14
  563. package/unbundled/definition3.cjs +5 -16
  564. package/unbundled/definition3.js +5 -16
  565. package/unbundled/definition30.cjs +66 -516
  566. package/unbundled/definition30.js +58 -514
  567. package/unbundled/definition31.cjs +502 -42
  568. package/unbundled/definition31.js +500 -40
  569. package/unbundled/definition32.cjs +42 -253
  570. package/unbundled/definition32.js +39 -250
  571. package/unbundled/definition33.cjs +238 -81
  572. package/unbundled/definition33.js +235 -78
  573. package/unbundled/definition34.cjs +75 -2059
  574. package/unbundled/definition34.js +72 -2032
  575. package/unbundled/definition35.cjs +1990 -25
  576. package/unbundled/definition35.js +1960 -24
  577. package/unbundled/definition36.cjs +27 -134
  578. package/unbundled/definition36.js +24 -126
  579. package/unbundled/definition37.cjs +71 -368
  580. package/unbundled/definition37.js +66 -363
  581. package/unbundled/definition38.cjs +300 -176
  582. package/unbundled/definition38.js +295 -171
  583. package/unbundled/definition39.cjs +184 -374
  584. package/unbundled/definition39.js +180 -370
  585. package/unbundled/definition4.cjs +2 -11
  586. package/unbundled/definition4.js +2 -7
  587. package/unbundled/definition40.cjs +392 -237
  588. package/unbundled/definition40.js +389 -234
  589. package/unbundled/definition41.cjs +264 -50
  590. package/unbundled/definition41.js +259 -45
  591. package/unbundled/definition42.cjs +48 -71
  592. package/unbundled/definition42.js +46 -69
  593. package/unbundled/definition43.cjs +56 -426
  594. package/unbundled/definition43.js +55 -425
  595. package/unbundled/definition44.cjs +387 -48
  596. package/unbundled/definition44.js +383 -44
  597. package/unbundled/definition45.cjs +54 -48
  598. package/unbundled/definition45.js +50 -44
  599. package/unbundled/definition46.cjs +40 -173
  600. package/unbundled/definition46.js +36 -169
  601. package/unbundled/definition47.cjs +172 -33
  602. package/unbundled/definition47.js +168 -28
  603. package/unbundled/definition48.cjs +31 -97
  604. package/unbundled/definition48.js +23 -95
  605. package/unbundled/definition49.cjs +71 -38
  606. package/unbundled/definition49.js +68 -35
  607. package/unbundled/definition5.cjs +2 -5
  608. package/unbundled/definition5.js +2 -5
  609. package/unbundled/definition50.cjs +55 -26
  610. package/unbundled/definition50.js +53 -21
  611. package/unbundled/definition51.cjs +24 -43
  612. package/unbundled/definition51.js +18 -40
  613. package/unbundled/definition52.cjs +30 -340
  614. package/unbundled/definition52.js +28 -338
  615. package/unbundled/definition53.cjs +295 -197
  616. package/unbundled/definition53.js +292 -194
  617. package/unbundled/definition54.cjs +211 -45
  618. package/unbundled/definition54.js +207 -41
  619. package/unbundled/definition55.cjs +42 -308
  620. package/unbundled/definition55.js +38 -304
  621. package/unbundled/definition56.cjs +266 -53
  622. package/unbundled/definition56.js +263 -49
  623. package/unbundled/definition57.cjs +51 -162
  624. package/unbundled/definition57.js +49 -160
  625. package/unbundled/definition58.cjs +135 -253
  626. package/unbundled/definition58.js +130 -251
  627. package/unbundled/definition59.cjs +209 -457
  628. package/unbundled/definition59.js +206 -454
  629. package/unbundled/definition6.cjs +179 -17
  630. package/unbundled/definition6.js +170 -14
  631. package/unbundled/definition60.cjs +441 -3722
  632. package/unbundled/definition60.js +435 -3553
  633. package/unbundled/definition61.cjs +3713 -761
  634. package/unbundled/definition61.js +3540 -751
  635. package/unbundled/definition62.cjs +761 -95
  636. package/unbundled/definition62.js +758 -92
  637. package/unbundled/definition63.cjs +106 -1055
  638. package/unbundled/definition63.js +98 -1047
  639. package/unbundled/definition64.cjs +991 -103
  640. package/unbundled/definition64.js +986 -101
  641. package/unbundled/definition65.cjs +111 -83
  642. package/unbundled/definition65.js +106 -77
  643. package/unbundled/definition66.cjs +71 -179
  644. package/unbundled/definition66.js +62 -176
  645. package/unbundled/definition67.cjs +154 -120
  646. package/unbundled/definition67.js +151 -117
  647. package/unbundled/definition68.cjs +126 -52
  648. package/unbundled/definition68.js +122 -48
  649. package/unbundled/definition69.cjs +52 -94
  650. package/unbundled/definition69.js +50 -91
  651. package/unbundled/definition7.cjs +31 -177
  652. package/unbundled/definition7.js +24 -170
  653. package/unbundled/definition70.cjs +92 -22
  654. package/unbundled/definition70.js +87 -17
  655. package/unbundled/definition71.cjs +21 -93
  656. package/unbundled/definition71.js +15 -90
  657. package/unbundled/definition72.cjs +77 -309
  658. package/unbundled/definition72.js +72 -232
  659. package/unbundled/definition73.cjs +288 -335
  660. package/unbundled/definition73.js +217 -329
  661. package/unbundled/definition74.cjs +327 -29
  662. package/unbundled/definition74.js +318 -26
  663. package/unbundled/definition75.cjs +28 -129
  664. package/unbundled/definition75.js +23 -125
  665. package/unbundled/definition76.cjs +107 -271
  666. package/unbundled/definition76.js +103 -267
  667. package/unbundled/definition77.cjs +258 -27
  668. package/unbundled/definition77.js +249 -25
  669. package/unbundled/definition78.cjs +30 -155
  670. package/unbundled/definition78.js +28 -140
  671. package/unbundled/definition79.cjs +117 -183
  672. package/unbundled/definition79.js +108 -179
  673. package/unbundled/definition8.cjs +152 -36
  674. package/unbundled/definition8.js +148 -31
  675. package/unbundled/definition80.cjs +180 -492
  676. package/unbundled/definition80.js +175 -486
  677. package/unbundled/definition81.cjs +517 -0
  678. package/unbundled/definition81.js +497 -0
  679. package/unbundled/definition9.cjs +200 -135
  680. package/unbundled/definition9.js +189 -130
  681. package/unbundled/delegates-aria.cjs +1 -3
  682. package/unbundled/delegates-aria.js +1 -3
  683. package/unbundled/divider.cjs +2 -7
  684. package/unbundled/divider.js +2 -7
  685. package/unbundled/extractOptions.cjs +21 -0
  686. package/unbundled/extractOptions.js +16 -0
  687. package/unbundled/form-associated.cjs +20 -60
  688. package/unbundled/form-associated.js +20 -60
  689. package/unbundled/form-element.cjs +5 -15
  690. package/unbundled/form-element.js +5 -15
  691. package/unbundled/host-semantics.cjs +1 -3
  692. package/unbundled/host-semantics.js +1 -3
  693. package/unbundled/kbd-shortcut.cjs +1 -3
  694. package/unbundled/kbd-shortcut.js +1 -3
  695. package/unbundled/linkable.cjs +1 -3
  696. package/unbundled/linkable.js +1 -3
  697. package/unbundled/listbox.cjs +29 -26
  698. package/unbundled/listbox.js +29 -26
  699. package/unbundled/localized.cjs +3 -9
  700. package/unbundled/localized.js +3 -9
  701. package/unbundled/mixins.cjs +9 -25
  702. package/unbundled/mixins.js +9 -25
  703. package/unbundled/numberConverter.cjs +39 -9
  704. package/unbundled/numberConverter.js +39 -9
  705. package/unbundled/picker-field.template.cjs +16 -36
  706. package/unbundled/picker-field.template.js +16 -36
  707. package/unbundled/platform.cjs +1 -3
  708. package/unbundled/platform.js +1 -3
  709. package/unbundled/playbackRates.cjs +1 -3
  710. package/unbundled/playbackRates.js +1 -3
  711. package/unbundled/randomId.cjs +1 -3
  712. package/unbundled/randomId.js +1 -3
  713. package/unbundled/single-date-picker.cjs +6 -18
  714. package/unbundled/single-date-picker.js +6 -18
  715. package/unbundled/single-value-picker.cjs +7 -21
  716. package/unbundled/single-value-picker.js +7 -21
  717. package/unbundled/slider.template.cjs +6 -14
  718. package/unbundled/slider.template.js +6 -14
  719. package/unbundled/slottable-request.cjs +2 -6
  720. package/unbundled/slottable-request.js +2 -6
  721. package/unbundled/text-field.cjs +1 -1
  722. package/unbundled/text-field.js +1 -1
  723. package/unbundled/time-selection-picker.template.cjs +27 -79
  724. package/unbundled/time-selection-picker.template.js +27 -79
  725. package/unbundled/trapped-focus.cjs +1 -3
  726. package/unbundled/trapped-focus.js +1 -3
  727. package/unbundled/vivid-element.cjs +16 -19
  728. package/unbundled/vivid-element.js +16 -19
  729. package/unbundled/with-contextual-help.cjs +4 -13
  730. package/unbundled/with-contextual-help.js +4 -13
  731. package/unbundled/with-error-text.cjs +2 -6
  732. package/unbundled/with-error-text.js +2 -6
  733. package/unbundled/with-success-text.cjs +1 -3
  734. package/unbundled/with-success-text.js +1 -3
  735. package/video-player/definition.cjs +1 -1
  736. package/video-player/definition.js +1 -1
  737. package/video-player/index.cjs +3 -3
  738. package/video-player/index.js +5 -5
  739. package/visually-hidden/definition.cjs +1 -1
  740. package/visually-hidden/definition.js +1 -1
  741. package/vivid.api.json +194 -0
  742. package/shared/color-picker/index.d.ts +0 -3
  743. package/shared/foundation/button/index.d.ts +0 -2
  744. package/shared/patterns/char-count/index.d.ts +0 -1
  745. package/shared/patterns/form-elements/index.d.ts +0 -4
  746. package/shared/patterns/index.d.ts +0 -7
@@ -1,147 +1,813 @@
1
1
  require("./chunk.cjs");
2
2
  const require_vivid_element = require("./vivid-element.cjs");
3
+ const require_definition = require("./definition.cjs");
3
4
  const require_decorate = require("./decorate.cjs");
4
- const require_slottable_request = require("./slottable-request.cjs");
5
+ const require_affix = require("./affix.cjs");
6
+ const require_form_associated = require("./form-associated.cjs");
7
+ const require_localized = require("./localized.cjs");
8
+ const require_definition$1 = require("./definition6.cjs");
9
+ const require_dialog = require("./dialog.cjs");
10
+ const require_definition$2 = require("./definition9.cjs");
11
+ const require_host_semantics = require("./host-semantics.cjs");
12
+ const require_mixins = require("./mixins.cjs");
13
+ const require_form_element = require("./form-element.cjs");
14
+ const require_with_error_text = require("./with-error-text.cjs");
15
+ const require_with_success_text = require("./with-success-text.cjs");
16
+ const require_with_contextual_help = require("./with-contextual-help.cjs");
17
+ const require_definition$3 = require("./definition29.cjs");
18
+ const require_definition$4 = require("./definition30.cjs");
19
+ const require_listbox = require("./listbox.cjs");
5
20
  let _microsoft_fast_element = require("@microsoft/fast-element");
6
- let prosemirror_model = require("prosemirror-model");
7
- //#region src/lib/rich-text-view/rich-text-view.scss?inline
8
- var rich_text_view_default = ":host{display:contents}.content{overflow-wrap:break-word;white-space:break-spaces;display:contents}";
21
+ let _microsoft_fast_web_utilities = require("@microsoft/fast-web-utilities");
22
+ //#region src/lib/select/select.scss?inline
23
+ var select_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)}:host(:focus-visible){outline:none}:host{--_low-ink-color:var(--vvd-color-neutral-600);--focus-stroke-gap-color:transparent;flex-direction:column;gap:4px;display:inline-flex}:host([disabled]){--_low-ink-color:var(--vvd-color-neutral-600);cursor:not-allowed}.label{color:var(--vvd-color-canvas-text);font:var(--vvd-typography-base)}.control{--_appearance-color-text:var(--vvd-color-canvas-text);--_appearance-color-fill:var(--vvd-color-canvas);--_appearance-color-outline:var(--vvd-color-neutral-500)}.control.appearance-ghost{--_appearance-color-text:var(--_connotation-color-firm);--_appearance-color-fill:transparent;--_appearance-color-outline:transparent}@media (hover:hover){.control: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)}.control: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}}.control.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)}.control.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}.control: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)}.control:disabled.appearance-ghost{--_appearance-color-text:var(--vvd-color-neutral-300);--_appearance-color-fill:transparent;--_appearance-color-outline:transparent}.control.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)}.control.disabled.appearance-ghost{--_appearance-color-text:var(--vvd-color-neutral-300);--_appearance-color-fill:transparent;--_appearance-color-outline:transparent}.control.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)}.control.readonly:where(:not(.disabled,:disabled)).appearance-ghost{--_appearance-color-text:var(--vvd-color-neutral-600);--_appearance-color-fill:transparent;--_appearance-color-outline:transparent}.control.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)}.control.error:where(:not(.disabled,:disabled)).appearance-ghost{--_appearance-color-text:notset;--_appearance-color-fill:var(--vvd-color-alert-50);--_appearance-color-outline:transparent}.control.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)}.control.success:where(:not(.disabled,:disabled)).appearance-ghost{--_appearance-color-text:notset;--_appearance-color-fill:var(--vvd-color-success-50);--_appearance-color-outline:transparent}.control{--_connotation-color-primary:var(--vvd-select-accent-primary,var(--vvd-color-canvas-text));--_connotation-color-primary-text:var(--vvd-select-accent-primary-text,var(--vvd-color-canvas));--_connotation-color-primary-increment:var(--vvd-select-accent-primary-increment,var(--vvd-color-neutral-800));--_connotation-color-intermediate:var(--vvd-select-accent-intermediate,var(--vvd-color-neutral-500));--_connotation-color-faint:var(--vvd-select-accent-faint,var(--vvd-color-neutral-50));--_connotation-color-soft:var(--vvd-select-accent-soft,var(--vvd-color-neutral-100));--_connotation-color-firm:var(--vvd-select-accent-firm,var(--vvd-color-canvas-text));--_connotation-color-fierce:var(--vvd-select-accent-fierce,var(--vvd-color-neutral-700));border-radius:var(--_select-control-border-radius);block-size:var(--_select-block-size);padding-inline:var(--_select-padding-inline);--_select-icon-size:calc(calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2))) / 2);--_select-block-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2)));--_select-padding-inline:calc(calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2))) / 2.5);background-color:var(--_appearance-color-fill);box-shadow:inset 0 0 0 1px var(--_appearance-color-outline);color:var(--_appearance-color-text);font:var(--vvd-typography-base);justify-content:space-between;align-items:center;gap:8px;transition:box-shadow .2s,background-color .2s;display:flex}.control.size-condensed{--_select-icon-size:calc(calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2))) / 2.5);--_select-block-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) - 8));--_select-padding-inline:calc(calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) - 16)) / 2)}.control.size-condensed:not(.shape-pill){--_select-control-border-radius:4px}.control-wrapper{position:relative}.control:not(.disabled){cursor:pointer}.control.disabled{pointer-events:none}.control:not(.shape-pill){--_select-control-border-radius:8px}.control.shape-pill{--_select-control-border-radius:24px}.listbox{max-height:var(--select-height,408px);flex-direction:column;gap:2px;padding:4px;display:flex;overflow-y:auto}:host([multiple]:focus-visible) .listbox{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));border-radius:8px}.selected-value{white-space:nowrap;flex-grow:1;align-items:center;column-gap:12px;display:flex;overflow:hidden}.selected-value .text{text-overflow:ellipsis;max-inline-size:100%;overflow:hidden}.control.shows-placeholder .selected-value .text{color:var(--vvd-color-neutral-600)}.selected-value slot[name=icon]{flex:0 0 var(--_select-icon-size);font-size:var(--_select-icon-size);line-height:1}.control.has-meta .selected-value{padding-inline-end:8px}.feedback-wrapper{display:contents}::part(popup-base){inline-size:max-content;min-inline-size:var(--_select-fixed-width,100%)}:host([multiple]) ::part(popup-base){position:static}@supports selector(:has(*)){:host(:focus-within) .control:not(.has-activedescendant,:has(.clear-button:focus)){--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(*)){:host(:focus-within) .control:not(.has-activedescendant){--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))}}:host([multiple]),:host(:not(:focus-visible)){--_suppressable-focus-shadow:none;--_suppressable-focus-outline:none;--_suppressable-focus-outline-offset:0}:host([multiple]) .clear-button{margin-inline-start:auto}:host([multiple][clearable]) .label-wrapper{min-block-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) - 16))}";
9
24
  //#endregion
10
- //#region src/lib/rich-text-view/rich-text-view.ts
25
+ //#region src/lib/select/select.ts
11
26
  /**
12
27
  * @public
13
- * @component rich-text-view
14
- * @dynamicSlot `@vonage/vivid#RteChildSlotProps` child - Used for custom rendered children.
28
+ * @component select
29
+ * @slot - Default slot.
30
+ * @slot icon - The preferred way to add an icon to the select control.
31
+ * @slot meta - Slot to add meta content to the select control.
32
+ * @slot helper-text - Describes how to use the select. Alternative to the `helper-text` attribute.
33
+ * @event {CustomEvent<undefined>} input - Fires a custom 'input' event when the value updates
34
+ * @event {CustomEvent<HTMLElement>} change - Fires a custom 'change' event when the value updates
35
+ * @vueModel modelValue value input,@lazy:change `event.currentTarget.value`
36
+ * @testAction selectOptionByValue selectOptionByValue
37
+ * @testAction selectOptionByText selectOptionByText
15
38
  */
16
- var RichTextView = class extends require_vivid_element.VividElement {
39
+ var Select = class extends require_mixins.WithLightDOMFeedback(require_with_contextual_help.WithContextualHelp(require_with_error_text.WithErrorText(require_with_success_text.WithSuccessText(require_localized.Localized(require_form_element.FormElement(require_host_semantics.HostSemantics(require_affix.AffixIconWithTrailing(require_form_associated.FormAssociated(require_listbox.Listbox))))))))) {
17
40
  constructor(..._args) {
18
41
  super(..._args);
19
- this._slotCounter = 0;
20
- this._slottedChildren = /* @__PURE__ */ new Set();
21
- this._slotRequests = /* @__PURE__ */ new Set();
22
- this._contentElement = null;
42
+ this.proxy = document.createElement("select");
43
+ this.activeIndex = -1;
44
+ this.rangeStartIndex = -1;
45
+ this.open = false;
46
+ this.listboxId = (0, _microsoft_fast_web_utilities.uniqueId)("listbox-");
47
+ this.maxHeight = 0;
48
+ this.fixedDropdown = false;
49
+ this._feedbackWrapper = null;
50
+ this._isResetting = false;
51
+ this.clearable = false;
52
+ this._isClearButtonFocused = false;
23
53
  }
24
54
  /**
55
+ * Returns the last checked option.
56
+ *
25
57
  * @internal
26
58
  */
27
- viewChanged(oldView, newView) {
28
- if (oldView) this._removeStyles();
29
- if (newView) this._addStyles(newView);
30
- this._updateView();
59
+ get activeOption() {
60
+ return this.options[this.activeIndex];
31
61
  }
32
- _addStyles(view) {
33
- const config = view[require_slottable_request.impl].config[require_slottable_request.impl];
34
- this._styles = new _microsoft_fast_element.ElementStyles(require_slottable_request.sortedContributions(config.features.flatMap((f) => f.getStyles())));
35
- this._styles.addStylesTo(this.shadowRoot);
62
+ /**
63
+ * Returns the list of checked options.
64
+ *
65
+ * @internal
66
+ */
67
+ get checkedOptions() {
68
+ return this.options.filter((o) => o.checked);
69
+ }
70
+ /**
71
+ * Returns the index of the first selected option.
72
+ *
73
+ * @internal
74
+ */
75
+ get firstSelectedOptionIndex() {
76
+ return this.options.indexOf(this.firstSelectedOption);
77
+ }
78
+ /**
79
+ * Updates the `ariaActiveDescendant` property when the active index changes.
80
+ *
81
+ * @internal
82
+ */
83
+ activeIndexChanged(_, next) {
84
+ this._activeDescendant = this.options[next]?.id ?? "";
85
+ this.focusAndScrollOptionIntoView();
86
+ }
87
+ /**
88
+ * Toggles the checked state for the currently active option.
89
+ *
90
+ * @remarks
91
+ * Multiple-selection mode only.
92
+ *
93
+ * @internal
94
+ */
95
+ checkActiveIndex() {
96
+ const activeItem = this.activeOption;
97
+ /* v8 ignore else -- @preserve */
98
+ if (activeItem) activeItem.checked = true;
99
+ }
100
+ /**
101
+ * Sets the active index to the first option and marks it as checked.
102
+ *
103
+ * @remarks
104
+ * Multi-selection mode only.
105
+ *
106
+ * @param preserveChecked - mark all options unchecked before changing the active index
107
+ *
108
+ * @internal
109
+ */
110
+ checkFirstOption(preserveChecked) {
111
+ const firstSelectableIndex = this.getNextSelectableIndex(0);
112
+ if (firstSelectableIndex === -1) return;
113
+ if (preserveChecked) {
114
+ if (this.rangeStartIndex === -1) this.rangeStartIndex = this.activeIndex;
115
+ this.options.forEach((o, i) => {
116
+ o.checked = (0, _microsoft_fast_web_utilities.inRange)(i, firstSelectableIndex, this.rangeStartIndex + 1) && !o.disabled;
117
+ });
118
+ } else this.uncheckAllOptions();
119
+ this.activeIndex = firstSelectableIndex;
120
+ this.checkActiveIndex();
121
+ }
122
+ /**
123
+ * Decrements the active index and sets the matching option as checked.
124
+ *
125
+ * @remarks
126
+ * Multi-selection mode only.
127
+ *
128
+ * @param preserveChecked - mark all options unchecked before changing the active index
129
+ *
130
+ * @internal
131
+ */
132
+ checkLastOption(preserveChecked) {
133
+ const lastSelectableIndex = this.getPreviousSelectableIndex(this.length - 1);
134
+ if (lastSelectableIndex === -1) return;
135
+ if (preserveChecked) {
136
+ if (this.rangeStartIndex === -1) this.rangeStartIndex = this.activeIndex;
137
+ this.options.forEach((o, i) => {
138
+ o.checked = (0, _microsoft_fast_web_utilities.inRange)(i, this.rangeStartIndex, lastSelectableIndex + 1) && !o.disabled;
139
+ });
140
+ } else this.uncheckAllOptions();
141
+ this.activeIndex = lastSelectableIndex;
142
+ this.checkActiveIndex();
143
+ }
144
+ /**
145
+ * Increments the active index and marks the matching option as checked.
146
+ *
147
+ * @remarks
148
+ * Multiple-selection mode only.
149
+ *
150
+ * @param preserveChecked - mark all options unchecked before changing the active index
151
+ *
152
+ * @internal
153
+ */
154
+ checkNextOption(preserveChecked) {
155
+ const nextIndex = this.getNextSelectableIndex(this.activeIndex + 1);
156
+ if (nextIndex === -1) return;
157
+ if (preserveChecked) {
158
+ if (this.rangeStartIndex === -1) this.rangeStartIndex = this.activeIndex;
159
+ this.options.forEach((o, i) => {
160
+ o.checked = (0, _microsoft_fast_web_utilities.inRange)(i, this.rangeStartIndex, nextIndex + 1) && !o.disabled;
161
+ });
162
+ } else this.uncheckAllOptions();
163
+ this.activeIndex = nextIndex;
164
+ this.checkActiveIndex();
165
+ }
166
+ /**
167
+ * Decrements the active index and marks the matching option as checked.
168
+ *
169
+ * @remarks
170
+ * Multiple-selection mode only.
171
+ *
172
+ * @param preserveChecked - mark all options unchecked before changing the active index
173
+ *
174
+ * @internal
175
+ */
176
+ checkPreviousOption(preserveChecked) {
177
+ const previousIndex = this.getPreviousSelectableIndex(this.activeIndex - 1);
178
+ if (previousIndex === -1) return;
179
+ if (preserveChecked) {
180
+ if (this.rangeStartIndex === -1) this.rangeStartIndex = this.activeIndex;
181
+ if (this.checkedOptions.length === 1) this.rangeStartIndex += 1;
182
+ this.options.forEach((o, i) => {
183
+ o.checked = (0, _microsoft_fast_web_utilities.inRange)(i, previousIndex, this.rangeStartIndex + 1) && !o.disabled;
184
+ });
185
+ } else this.uncheckAllOptions();
186
+ this.activeIndex = previousIndex;
187
+ this.checkActiveIndex();
36
188
  }
37
- _removeStyles() {
38
- if (this._styles) {
39
- this._styles.removeStylesFrom(this.shadowRoot);
40
- this._styles = void 0;
189
+ /** @internal */
190
+ focusAndScrollOptionIntoView() {
191
+ super.focusAndScrollOptionIntoView(this.activeOption);
192
+ }
193
+ /**
194
+ * In multiple-selection mode:
195
+ * If any options are selected, the first selected option is checked when
196
+ * the listbox receives focus. If no options are selected, the first
197
+ * selectable option is checked.
198
+ *
199
+ * @internal
200
+ */
201
+ focusinHandler(e) {
202
+ if (!this.multiple) {
203
+ super.focusinHandler(e);
204
+ return;
41
205
  }
206
+ /* v8 ignore else -- @preserve */
207
+ if (!this.shouldSkipFocus && e.target === e.currentTarget) {
208
+ this.uncheckAllOptions();
209
+ if (this.activeIndex === -1) this.activeIndex = this.firstSelectedOptionIndex !== -1 ? this.firstSelectedOptionIndex : 0;
210
+ this.checkActiveIndex();
211
+ this.setSelectedOptions();
212
+ this.focusAndScrollOptionIntoView();
213
+ }
214
+ this.shouldSkipFocus = false;
42
215
  }
43
- _cleanupLightDom() {
44
- for (const el of this._slottedChildren) this.removeChild(el);
45
- for (const slotName of this._slotRequests) require_slottable_request.dispatchSlottableRequest(this, "child", slotName, require_slottable_request.removeSymbol);
46
- this._slottedChildren.clear();
47
- this._slotRequests.clear();
48
- this._slotCounter = 0;
49
- }
50
- _updateView() {
51
- if (!this._contentElement) return;
52
- this._contentElement.innerHTML = "";
53
- this._cleanupLightDom();
54
- if (this.view) this._contentElement.appendChild(this._renderView(this.view));
55
- }
56
- _renderView(rteView) {
57
- const ctx = rteView[require_slottable_request.impl];
58
- if (rteView.type === "node" && rteView.node.type === "doc") rteView = rteView.children;
59
- if (rteView.type === "fragment") {
60
- const frag = document.createDocumentFragment();
61
- for (const child of rteView.content) frag.appendChild(this._renderView(child));
62
- return frag;
216
+ /** Sets an option as selected and gives it focus. */
217
+ setSelectedOptions() {
218
+ if (!this.multiple) {
219
+ super.setSelectedOptions();
220
+ return;
63
221
  }
64
- const customRenderedView = ctx.options.renderChildView?.(rteView) ?? false;
65
- if (customRenderedView) return this._handleCustomRender(rteView, customRenderedView);
66
- else return this._renderDefault(rteView);
67
- }
68
- _handleCustomRender(rteView, customResult) {
69
- const slotName = `child-view-${this._slotCounter++}`;
70
- const slot = document.createElement("slot");
71
- slot.setAttribute("name", slotName);
72
- if (customResult === true) {
73
- this._slotRequests.add(slotName);
74
- require_slottable_request.dispatchSlottableRequest(this, "child", slotName, { view: rteView });
75
- } else {
76
- const { dom, contentDom = dom } = customResult;
77
- const nestedView = document.createElement(this.tagName);
78
- nestedView.view = rteView.children;
79
- contentDom.appendChild(nestedView);
80
- dom.setAttribute("slot", slotName);
81
- this.appendChild(dom);
82
- this._slottedChildren.add(dom);
222
+ /* v8 ignore else -- @preserve */
223
+ if (this.$fastController.isConnected && this.options) {
224
+ this.selectedOptions = this.options.filter((o) => o.selected);
225
+ this.focusAndScrollOptionIntoView();
83
226
  }
84
- return slot;
85
227
  }
86
- _renderDefault(view) {
87
- const schema = view[require_slottable_request.impl].config[require_slottable_request.impl].schema;
88
- if (view.type === "node" && view.node.type === "text") return document.createTextNode(view.node.text);
89
- const item = view.type === "node" ? view.node : view.mark;
90
- const pmItem = view.type === "node" ? prosemirror_model.Node.fromJSON(schema, item) : prosemirror_model.Mark.fromJSON(schema, item);
91
- const spec = pmItem instanceof prosemirror_model.Node ? pmItem.type.spec.toDOM(pmItem) : pmItem.type.spec.toDOM(pmItem, true);
92
- const { dom, contentDOM = dom } = prosemirror_model.DOMSerializer.renderSpec(document, spec);
93
- const childrenRendered = this._renderView(view.children);
94
- contentDOM.appendChild(childrenRendered);
95
- return dom;
228
+ /**
229
+ * Toggles the selected state of the provided options. If any provided items
230
+ * are in an unselected state, all items are set to selected. If every
231
+ * provided item is selected, they are all unselected.
232
+ *
233
+ * @internal
234
+ */
235
+ toggleSelectedForAllCheckedOptions() {
236
+ const enabledCheckedOptions = this.checkedOptions.filter((o) => !o.disabled);
237
+ const force = !enabledCheckedOptions.every((o) => o.selected);
238
+ enabledCheckedOptions.forEach((o) => o.selected = force);
239
+ this.selectedIndex = this.options.indexOf(enabledCheckedOptions[enabledCheckedOptions.length - 1]);
240
+ this.setSelectedOptions();
241
+ this.updateValue(true);
242
+ }
243
+ /** @internal */
244
+ typeaheadBufferChanged(prev, next) {
245
+ if (!this.multiple) {
246
+ super.typeaheadBufferChanged(prev, next);
247
+ return;
248
+ }
249
+ /* v8 ignore if -- @preserve */
250
+ if (this.$fastController.isConnected) {
251
+ const typeaheadMatches = this.getTypeaheadMatches();
252
+ const activeIndex = this.options.indexOf(typeaheadMatches[0]);
253
+ if (activeIndex > -1) {
254
+ this.activeIndex = activeIndex;
255
+ this.uncheckAllOptions();
256
+ this.checkActiveIndex();
257
+ }
258
+ this.typeaheadExpired = false;
259
+ }
96
260
  }
97
261
  /**
262
+ * Unchecks all options.
263
+ *
264
+ * @remarks
265
+ * Multiple-selection mode only.
266
+ *
267
+ * @param preserveChecked - reset the rangeStartIndex
268
+ *
98
269
  * @internal
99
270
  */
100
- connectedCallback() {
101
- super.connectedCallback();
102
- this._updateView();
271
+ uncheckAllOptions(preserveChecked = false) {
272
+ this.options.forEach((o) => o.checked = false);
273
+ /* v8 ignore else -- @preserve */
274
+ if (!preserveChecked) this.rangeStartIndex = -1;
275
+ }
276
+ /**
277
+ * Sets focus when the open property changes.
278
+ *
279
+ * @internal
280
+ */
281
+ openChanged(prev, next) {
282
+ if (!this.collapsible) return;
283
+ if (this.open) {
284
+ this.focusAndScrollOptionIntoView();
285
+ this.indexWhenOpened = this.selectedIndex;
286
+ _microsoft_fast_element.Updates.enqueue(() => this.focus());
287
+ return;
288
+ }
289
+ const didClose = prev && !next;
290
+ const selectionChangedWhileOpen = this.indexWhenOpened !== this.selectedIndex;
291
+ if (didClose && selectionChangedWhileOpen) this.updateValue(true);
292
+ }
293
+ /**
294
+ * The component is collapsible when in single-selection mode.
295
+ *
296
+ * @internal
297
+ */
298
+ get collapsible() {
299
+ return !this.multiple;
300
+ }
301
+ /** @internal */
302
+ valueChanged(prev, next) {
303
+ const nextSelectedIndex = this.options.findIndex((el) => el.value === next);
304
+ const validNextSelectedIndex = this._validSelectedIndex(nextSelectedIndex);
305
+ const nextValue = this.options[validNextSelectedIndex]?.value ?? "";
306
+ if (this.selectedIndex !== validNextSelectedIndex) this.selectedIndex = validNextSelectedIndex;
307
+ if (next !== nextValue) return;
308
+ super.valueChanged(prev, next);
309
+ this.updateDisplayValue();
310
+ }
311
+ /**
312
+ * Sets the value and display value to match the first selected option.
313
+ *
314
+ * @param shouldEmit - if true, the input and change events will be emitted
315
+ *
316
+ * @internal
317
+ */
318
+ updateValue(shouldEmit) {
319
+ if (this.$fastController.isConnected) this.value = this.firstSelectedOption?.value ?? "";
320
+ if (shouldEmit) {
321
+ this.$emit("input");
322
+ this.$emit("change", this, {
323
+ bubbles: true,
324
+ composed: void 0
325
+ });
326
+ }
327
+ }
328
+ /**
329
+ * Updates the proxy value when the selected index changes.
330
+ *
331
+ * @param prev - the previous selected index
332
+ * @param next - the next selected index
333
+ *
334
+ * @internal
335
+ */
336
+ selectedIndexChanged(prev, next) {
337
+ super.selectedIndexChanged(prev, next);
338
+ this.updateValue();
339
+ }
340
+ /**
341
+ * Handle opening and closing the listbox when the select is clicked.
342
+ *
343
+ * @param e - the mouse event
344
+ * @internal
345
+ */
346
+ clickHandler(e) {
347
+ if (this.disabled || this._isFromContextualHelp(e)) return;
348
+ const clickedOption = e.target.closest(`option,[role=option],[data-vvd-component=option]`);
349
+ if (clickedOption && clickedOption.disabled) return;
350
+ if (this.multiple) {
351
+ this.uncheckAllOptions();
352
+ this.activeIndex = this.options.indexOf(clickedOption);
353
+ this.checkActiveIndex();
354
+ this.toggleSelectedForAllCheckedOptions();
355
+ } else super.clickHandler(e);
356
+ if (this.collapsible) this.open = !this.open;
357
+ return true;
358
+ }
359
+ /**
360
+ * Handles focus state when the element or its children lose focus.
361
+ *
362
+ * @param e - The focus event
363
+ * @internal
364
+ */
365
+ focusoutHandler(e) {
366
+ if (this.multiple) this.uncheckAllOptions();
367
+ if (!this.open) return true;
368
+ const focusTarget = e.relatedTarget;
369
+ if (this.isSameNode(focusTarget)) {
370
+ this.focus();
371
+ return;
372
+ }
373
+ /* v8 ignore else -- @preserve */
374
+ if (!this.options.includes(focusTarget)) {
375
+ this.open = false;
376
+ if (this.indexWhenOpened !== this.selectedIndex) this.updateValue(true);
377
+ }
378
+ }
379
+ /**
380
+ * Updates the value when an option's value changes.
381
+ *
382
+ * @param source - the source object
383
+ * @param propertyName - the property to evaluate
384
+ *
385
+ * @internal
386
+ */
387
+ handleChange(source, propertyName) {
388
+ super.handleChange(source, propertyName);
389
+ if (propertyName === "value") this.updateValue();
390
+ }
391
+ /**
392
+ * Prevents focus when a scrollbar is clicked.
393
+ *
394
+ * @param e - the mouse event object
395
+ *
396
+ * @internal
397
+ */
398
+ mousedownHandler(e) {
399
+ if (e.offsetX >= 0 && e.offsetX <= this.listbox.scrollWidth) return super.mousedownHandler(e);
400
+ return this.collapsible;
401
+ }
402
+ /** @internal */
403
+ multipleChanged(_, next) {
404
+ this.options.forEach((o) => {
405
+ o.checked = next ? false : void 0;
406
+ });
407
+ this.setSelectedOptions();
408
+ /* v8 ignore if -- @preserve */
409
+ if (this.proxy) this.proxy.multiple = next;
410
+ }
411
+ /**
412
+ * Updates the selectedness of each option when the list of selected options changes.
413
+ *
414
+ * @param prev - the previous list of selected options
415
+ * @param next - the current list of selected options
416
+ *
417
+ * @internal
418
+ */
419
+ selectedOptionsChanged(prev, next) {
420
+ super.selectedOptionsChanged(prev, next);
421
+ this.options.forEach((o, i) => {
422
+ const proxyOption = this.proxy.options.item(i);
423
+ if (proxyOption) proxyOption.selected = o.selected;
424
+ });
425
+ }
426
+ /**
427
+ * Resets and fills the proxy to match the component's options.
428
+ *
429
+ * @internal
430
+ */
431
+ setProxyOptions() {
432
+ /* v8 ignore else -- @preserve */
433
+ if (this.proxy instanceof HTMLSelectElement && this.options) {
434
+ this.proxy.length = 0;
435
+ this.options.forEach((option) => {
436
+ const proxyOption = option.proxy || (option instanceof HTMLOptionElement ? option.cloneNode() : null);
437
+ if (proxyOption) this.proxy.options.add(proxyOption);
438
+ });
439
+ }
103
440
  }
104
441
  /**
442
+ * Handles keydown actions when the select is in multiple selection mode.
443
+ *
105
444
  * @internal
106
445
  */
446
+ multipleKeydownHandler(e) {
447
+ if (this.disabled) return;
448
+ const { key, shiftKey } = e;
449
+ this.shouldSkipFocus = false;
450
+ switch (key) {
451
+ case _microsoft_fast_web_utilities.keyHome:
452
+ this.checkFirstOption(shiftKey);
453
+ return;
454
+ case _microsoft_fast_web_utilities.keyArrowDown:
455
+ this.checkNextOption(shiftKey);
456
+ return;
457
+ case _microsoft_fast_web_utilities.keyArrowUp:
458
+ this.checkPreviousOption(shiftKey);
459
+ return;
460
+ case _microsoft_fast_web_utilities.keyEnd:
461
+ this.checkLastOption(shiftKey);
462
+ return;
463
+ case _microsoft_fast_web_utilities.keyTab:
464
+ this.focusAndScrollOptionIntoView();
465
+ return;
466
+ case _microsoft_fast_web_utilities.keyEscape:
467
+ this.uncheckAllOptions();
468
+ this.checkActiveIndex();
469
+ return;
470
+ case _microsoft_fast_web_utilities.keySpace:
471
+ e.preventDefault();
472
+ /* v8 ignore else -- @preserve */
473
+ if (this.typeaheadExpired) {
474
+ this.toggleSelectedForAllCheckedOptions();
475
+ return;
476
+ }
477
+ default:
478
+ /* v8 ignore else -- @preserve */
479
+ if (key.length === 1) this.handleTypeAhead(key);
480
+ return;
481
+ }
482
+ }
483
+ /**
484
+ * Handle keyboard interaction for the select.
485
+ *
486
+ * @param e - the keyboard event
487
+ * @internal
488
+ */
489
+ keydownHandler(e) {
490
+ const selectedIndexBefore = this.selectedIndex;
491
+ if (this.multiple) this.multipleKeydownHandler(e);
492
+ else super.keydownHandler(e);
493
+ switch (e.key) {
494
+ case _microsoft_fast_web_utilities.keySpace:
495
+ e.preventDefault();
496
+ if (this.collapsible && this.typeaheadExpired) this.open = !this.open;
497
+ break;
498
+ case _microsoft_fast_web_utilities.keyHome:
499
+ case _microsoft_fast_web_utilities.keyEnd:
500
+ e.preventDefault();
501
+ break;
502
+ case _microsoft_fast_web_utilities.keyEnter:
503
+ e.preventDefault();
504
+ this.open = !this.open;
505
+ break;
506
+ case _microsoft_fast_web_utilities.keyEscape:
507
+ if (this.collapsible && this.open) {
508
+ e.preventDefault();
509
+ this.open = false;
510
+ }
511
+ break;
512
+ case _microsoft_fast_web_utilities.keyTab:
513
+ if (this.collapsible && this.open) {
514
+ e.preventDefault();
515
+ this.open = false;
516
+ }
517
+ return true;
518
+ }
519
+ if (this.collapsible && !this.open && this.selectedIndex !== selectedIndexBefore) this.updateValue(true);
520
+ return !(e.key === _microsoft_fast_web_utilities.keyArrowDown || e.key === _microsoft_fast_web_utilities.keyArrowUp);
521
+ }
522
+ connectedCallback() {
523
+ super.connectedCallback();
524
+ this.addEventListener("focusout", this.focusoutHandler);
525
+ this.addEventListener("contentchange", this.updateDisplayValue);
526
+ }
107
527
  disconnectedCallback() {
528
+ this.removeEventListener("focusout", this.focusoutHandler);
529
+ this.removeEventListener("contentchange", this.updateDisplayValue);
108
530
  super.disconnectedCallback();
109
- this._removeStyles();
110
- this._cleanupLightDom();
531
+ }
532
+ /** @internal */
533
+ updateDisplayValue() {
534
+ if (this.collapsible) _microsoft_fast_element.Observable.notify(this, "displayValue");
535
+ }
536
+ get displayValue() {
537
+ _microsoft_fast_element.Observable.track(this, "displayValue");
538
+ return this.firstSelectedOption?.getAttribute("label") ?? this.firstSelectedOption?.text ?? this.placeholder ?? "";
539
+ }
540
+ _newDefaultSelectedIndex(prev, next, currentSelectIndex) {
541
+ const defaultSelectedIndex = super._newDefaultSelectedIndex(prev, next, currentSelectIndex);
542
+ if (defaultSelectedIndex === null && currentSelectIndex === -1 && !this.placeholder) {
543
+ const firstSelectableIndex = this.getNextSelectableIndex(0);
544
+ if (firstSelectableIndex !== -1) return firstSelectableIndex;
545
+ }
546
+ return defaultSelectedIndex;
547
+ }
548
+ _isDefaultSelected(option) {
549
+ return super._isDefaultSelected(option) || option.value === this.initialValue || !this._isResetting && option.value === this.value;
550
+ }
551
+ slottedOptionsChanged(prev, next) {
552
+ this.options.forEach((o) => {
553
+ _microsoft_fast_element.Observable.getNotifier(o).unsubscribe(this, "value");
554
+ });
555
+ super.slottedOptionsChanged(prev, next);
556
+ this.options.forEach((o) => {
557
+ _microsoft_fast_element.Observable.getNotifier(o).subscribe(this, "value");
558
+ });
559
+ this.setProxyOptions();
560
+ this.updateValue();
561
+ const scale = this.getAttribute("scale") || this.scale;
562
+ next.forEach((element) => {
563
+ if (scale) {
564
+ element.setAttribute("scale", scale);
565
+ element.scale = scale;
566
+ }
567
+ });
568
+ this.proxy.value = this.value;
569
+ this.validate();
570
+ }
571
+ formResetCallback() {
572
+ this.setProxyOptions();
573
+ this._isResetting = true;
574
+ this.selectedIndex = this._newDefaultSelectedIndex([], this.options, -1) ?? -1;
575
+ this._isResetting = false;
576
+ }
577
+ /** @internal */
578
+ get _shouldShowClearButton() {
579
+ if (!this.clearable) return false;
580
+ if (this.multiple) return this.selectedOptions?.length > 0;
581
+ return this.value !== "";
582
+ }
583
+ /** @internal */
584
+ _onClearButtonFocus() {
585
+ this._isClearButtonFocused = true;
586
+ this.activeIndex = -1;
587
+ this.uncheckAllOptions();
588
+ }
589
+ /** @internal */
590
+ _onClearButtonBlur() {
591
+ this._isClearButtonFocused = false;
592
+ }
593
+ /** @internal */
594
+ get _shouldShowLabelWrapper() {
595
+ return Boolean(this.label || this._hasContextualHelp || this.multiple && this._shouldShowClearButton);
596
+ }
597
+ /** @internal */
598
+ _onClearButtonClick() {
599
+ if (this.multiple) this.selectedOptions.forEach((o) => {
600
+ /* v8 ignore else -- @preserve */
601
+ if (!o.disabled) o.selected = false;
602
+ });
603
+ else this.selectedIndex = -1;
604
+ this.updateValue(true);
111
605
  }
112
606
  };
113
- require_decorate.__decorate([_microsoft_fast_element.observable], RichTextView.prototype, "view", void 0);
607
+ require_decorate.__decorate([_microsoft_fast_element.observable], Select.prototype, "activeIndex", void 0);
608
+ require_decorate.__decorate([(0, _microsoft_fast_element.attr)({ mode: "boolean" })], Select.prototype, "multiple", void 0);
609
+ require_decorate.__decorate([(0, _microsoft_fast_element.attr)({
610
+ attribute: "open",
611
+ mode: "boolean"
612
+ })], Select.prototype, "open", void 0);
613
+ require_decorate.__decorate([_microsoft_fast_element.volatile], Select.prototype, "collapsible", null);
614
+ require_decorate.__decorate([_microsoft_fast_element.observable], Select.prototype, "control", void 0);
615
+ require_decorate.__decorate([_microsoft_fast_element.observable], Select.prototype, "maxHeight", void 0);
616
+ require_decorate.__decorate([_microsoft_fast_element.observable], Select.prototype, "_anchor", void 0);
617
+ require_decorate.__decorate([(0, _microsoft_fast_element.attr)()], Select.prototype, "scale", void 0);
618
+ require_decorate.__decorate([_microsoft_fast_element.attr], Select.prototype, "appearance", void 0);
619
+ require_decorate.__decorate([_microsoft_fast_element.attr], Select.prototype, "shape", void 0);
620
+ require_decorate.__decorate([(0, _microsoft_fast_element.attr)({
621
+ mode: "boolean",
622
+ attribute: "fixed-dropdown"
623
+ })], Select.prototype, "fixedDropdown", void 0);
624
+ require_decorate.__decorate([_microsoft_fast_element.attr], Select.prototype, "placeholder", void 0);
625
+ require_decorate.__decorate([_microsoft_fast_element.observable], Select.prototype, "_feedbackWrapper", void 0);
626
+ require_decorate.__decorate([_microsoft_fast_element.observable], Select.prototype, "metaSlottedContent", void 0);
627
+ require_decorate.__decorate([(0, _microsoft_fast_element.attr)({ mode: "boolean" })], Select.prototype, "clearable", void 0);
628
+ require_decorate.__decorate([_microsoft_fast_element.observable], Select.prototype, "_isClearButtonFocused", void 0);
114
629
  //#endregion
115
- //#region src/lib/rich-text-view/rich-text-view.template.ts
116
- var RichTextViewTemplate = () => _microsoft_fast_element.html`<div class="content rich-text" ${(0, _microsoft_fast_element.ref)("_contentElement")}></div>`;
630
+ //#region src/lib/select/select.template.ts
631
+ function renderLabel() {
632
+ return _microsoft_fast_element.html` <label
633
+ for="${(x) => x.multiple ? null : "control"}"
634
+ class="label"
635
+ id="label"
636
+ >
637
+ ${(x) => x.label}
638
+ </label>`;
639
+ }
640
+ function renderPlaceholder(context) {
641
+ const optionTag = context.tagFor(require_definition$3.ListboxOption);
642
+ return _microsoft_fast_element.html`
643
+ <${optionTag} text="${(x) => x.placeholder}" hidden disabled>
644
+ </${optionTag}>`;
645
+ }
646
+ function renderClearButton(context) {
647
+ const buttonTag = context.tagFor(require_definition$1.Button);
648
+ return _microsoft_fast_element.html`
649
+ <${buttonTag}
650
+ aria-label="${(x) => x.locale.select.clearButtonLabel}"
651
+ aria-hidden="${(x) => x._isClearButtonFocused ? "false" : "true"}"
652
+ @click="${(x, c) => {
653
+ x._onClearButtonClick();
654
+ c.event.stopPropagation();
655
+ }}"
656
+ @mousedown="${() => false}"
657
+ @keydown="${(x, c) => {
658
+ /* v8 ignore next -- @preserve */
659
+ if (c.event.key === "Tab") x._onClearButtonBlur();
660
+ c.event.stopPropagation();
661
+ return true;
662
+ }}"
663
+ @focusin="${(x, c) => {
664
+ c.event.stopPropagation();
665
+ x._onClearButtonFocus();
666
+ }}"
667
+ @focusout="${(x) => x._onClearButtonBlur()}"
668
+ ?disabled="${(x) => x.disabled}"
669
+ :shape="${(x) => x.shape}"
670
+ size="super-condensed"
671
+ icon="close-line"
672
+ appearance="ghost-light"
673
+ class="clear-button"
674
+ tabindex="0"
675
+ ></${buttonTag}>
676
+ `;
677
+ }
678
+ function selectValue(context) {
679
+ const affixIconTemplate = require_affix.affixIconTemplateFactory(context);
680
+ const chevronTemplate = require_definition$1.chevronTemplateFactory(context);
681
+ return _microsoft_fast_element.html` <div
682
+ class="control ${(x) => (0, _microsoft_fast_web_utilities.classNames)(["has-activedescendant", Boolean(x._activeDescendant) && x.open], ["disabled", x.disabled], [`appearance-${x.appearance}`, Boolean(x.appearance)], [`shape-${x.shape}`, Boolean(x.shape)], ["has-meta", Boolean(x.metaSlottedContent?.length)], ["error", Boolean(x.errorValidationMessage)], ["success", !!x.successText], ["shows-placeholder", Boolean(x.placeholder) && !x.value], [`size-${x.scale}`, Boolean(x.scale)])}"
683
+ ${(0, _microsoft_fast_element.ref)("_anchor")}
684
+ id="control"
685
+ ?disabled="${(x) => x.disabled}"
686
+ >
687
+ <div class="selected-value">
688
+ ${(x) => affixIconTemplate(x.icon, require_affix.IconWrapper.Slot)}
689
+ <span class="text">${(x) => x.displayValue}</span>
690
+ <slot name="meta" ${(0, _microsoft_fast_element.slotted)("metaSlottedContent")}></slot>
691
+ </div>
692
+ ${(0, _microsoft_fast_element.when)((x) => x._shouldShowClearButton, renderClearButton(context))}
693
+ ${chevronTemplate}
694
+ </div>`;
695
+ }
696
+ function setFixedDropdownVarWidth(x) {
697
+ return x.open && x.fixedDropdown ? `--_select-fixed-width: ${Math.round(x.getBoundingClientRect().width)}px` : null;
698
+ }
699
+ /** @param context - element definition context */
700
+ function renderControl(context) {
701
+ const popupTag = context.tagFor(require_definition$2.Popup);
702
+ return _microsoft_fast_element.html`
703
+ <div class="label-wrapper" ?hidden=${(x) => !x._shouldShowLabelWrapper}>
704
+ ${(0, _microsoft_fast_element.when)((x) => x.label, renderLabel())}
705
+ ${(0, _microsoft_fast_element.when)((x) => x.multiple && x._shouldShowClearButton, renderClearButton(context))}
706
+ <slot name="contextual-help" ${(0, _microsoft_fast_element.slotted)("_contextualHelpSlottedContent")}></slot>
707
+ </div>
708
+ <div class="control-wrapper">
709
+ ${(0, _microsoft_fast_element.when)((x) => !x.multiple, selectValue(context))}
710
+ <${popupTag} class="popup"
711
+ style="${setFixedDropdownVarWidth}"
712
+ ?open="${(x) => x.collapsible ? x.open : true}"
713
+ :anchor="${(x) => x._anchor}"
714
+ placement="bottom-start"
715
+ strategy="${(x) => x.fixedDropdown ? null : "absolute"}">
716
+ <div class="listbox"
717
+ id="${(x) => x.listboxId}"
718
+ role="listbox"
719
+ aria-multiselectable="${(x) => x.multiple}"
720
+ aria-label="${(x) => x.multiple && !x.label && x.ariaLabel ? x.ariaLabel : null}"
721
+ aria-labelledby="${(x) => x.multiple && x.label ? "label" : null}"
722
+ ?disabled="${(x) => x.disabled}"
723
+ ?hidden="${(x) => x.collapsible ? !x.open : false}"
724
+ ${(0, _microsoft_fast_element.ref)("listbox")}>
725
+ ${(0, _microsoft_fast_element.when)((x) => x.placeholder, renderPlaceholder(context))}
726
+ <slot
727
+ ${(0, _microsoft_fast_element.slotted)({
728
+ filter: require_listbox.Listbox.slottedOptionFilter,
729
+ flatten: true,
730
+ property: "slottedOptions"
731
+ })}>
732
+ </slot>
733
+ </div>
734
+ </${popupTag}>
735
+ </div>
736
+ `;
737
+ }
738
+ /** Ignore events that originate from feedback, e.g. a click on link */
739
+ function ifNotFromFeedback(handler) {
740
+ return (x, c) => {
741
+ if (!c.event.composedPath().includes(x._feedbackWrapper)) {
742
+ handler(x, c.event);
743
+ return;
744
+ }
745
+ return true;
746
+ };
747
+ }
748
+ var SelectTemplate = (context) => {
749
+ return _microsoft_fast_element.html`
750
+ <template
751
+ ${require_host_semantics.applyHostSemantics({
752
+ role: "combobox",
753
+ ariaLabel: (x) => x.ariaLabel ?? x.label,
754
+ ariaHasPopup: (x) => x.collapsible ? "listbox" : "false",
755
+ ariaExpanded: (x) => x.open,
756
+ ariaDisabled: (x) => x.disabled
757
+ })}
758
+ aria-controls="${(x) => x.listboxId}"
759
+ aria-activedescendant="${(x) => x.open ? x._activeDescendant : null}"
760
+ aria-describedby="${(x) => x._feedbackDescribedBy}"
761
+ tabindex="${(x) => !x.disabled ? "0" : null}"
762
+ @click="${ifNotFromFeedback((x, e) => x.clickHandler(e))}"
763
+ @focusin="${ifNotFromFeedback((x, e) => x.focusinHandler(e))}"
764
+ @focusout="${ifNotFromFeedback((x, e) => x.focusoutHandler(e))}"
765
+ @keydown="${ifNotFromFeedback((x, e) => {
766
+ if (x.open) require_dialog.handleEscapeKeyAndStopPropogation(e);
767
+ return x.keydownHandler(e);
768
+ })}"
769
+ @mousedown="${ifNotFromFeedback((x, e) => x.mousedownHandler(e))}"
770
+ >
771
+ ${renderControl(context)}
772
+ <div class="feedback-wrapper" ${(0, _microsoft_fast_element.ref)("_feedbackWrapper")}>
773
+ ${(x) => x._getFeedbackTemplate(context)}
774
+ </div>
775
+ </template>
776
+ `;
777
+ };
117
778
  //#endregion
118
- //#region src/lib/rich-text-view/definition.ts
119
- var richTextViewDefinition = require_vivid_element.defineVividComponent("rich-text-view", RichTextView, RichTextViewTemplate, [], {
120
- styles: rich_text_view_default,
121
- shadowOptions: { delegatesFocus: true }
122
- });
779
+ //#region src/lib/select/definition.ts
780
+ /** @internal */
781
+ var selectDefinition = require_vivid_element.defineVividComponent("select", Select, SelectTemplate, [
782
+ require_definition$2.popupDefinition,
783
+ require_definition.iconDefinition,
784
+ require_definition$3.listboxOptionDefinition,
785
+ require_definition$4.optgroupDefinition,
786
+ require_definition$1.buttonDefinition,
787
+ require_mixins.feedbackMessageDefinition
788
+ ], { styles: select_default });
123
789
  /**
124
- * Registers the rich-text-view element with the design system.
790
+ * Registers the select elements with the design system.
125
791
  *
126
792
  * @param prefix - the prefix to use for the component name
127
793
  */
128
- var registerRichTextView = require_vivid_element.createRegisterFunction(richTextViewDefinition);
794
+ var registerSelect = require_vivid_element.createRegisterFunction(selectDefinition);
129
795
  //#endregion
130
- Object.defineProperty(exports, "RichTextView", {
796
+ Object.defineProperty(exports, "Select", {
131
797
  enumerable: true,
132
798
  get: function() {
133
- return RichTextView;
799
+ return Select;
134
800
  }
135
801
  });
136
- Object.defineProperty(exports, "registerRichTextView", {
802
+ Object.defineProperty(exports, "registerSelect", {
137
803
  enumerable: true,
138
804
  get: function() {
139
- return registerRichTextView;
805
+ return registerSelect;
140
806
  }
141
807
  });
142
- Object.defineProperty(exports, "richTextViewDefinition", {
808
+ Object.defineProperty(exports, "selectDefinition", {
143
809
  enumerable: true,
144
810
  get: function() {
145
- return richTextViewDefinition;
811
+ return selectDefinition;
146
812
  }
147
813
  });