@vonage/vivid 4.31.0 → 5.1.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 (676) hide show
  1. package/{shared/definition2.cjs → accordion/definition.cjs} +20 -20
  2. package/{shared/definition2.js → accordion/definition.js} +5 -7
  3. package/accordion/index.cjs +5 -5
  4. package/accordion/index.js +129 -3
  5. package/accordion-item/definition.cjs +145 -0
  6. package/accordion-item/definition.js +139 -0
  7. package/accordion-item/index.cjs +1 -5
  8. package/accordion-item/index.js +2 -3
  9. package/{shared/definition3.cjs → action-group/definition.cjs} +12 -9
  10. package/{shared/definition3.js → action-group/definition.js} +5 -4
  11. package/action-group/index.cjs +6 -5
  12. package/action-group/index.js +49 -3
  13. package/{shared/definition4.cjs → alert/definition.cjs} +33 -31
  14. package/{shared/definition4.js → alert/definition.js} +11 -11
  15. package/alert/index.cjs +30 -5
  16. package/alert/index.js +158 -3
  17. package/{shared/definition5.cjs → audio-player/definition.cjs} +58 -57
  18. package/{shared/definition5.js → audio-player/definition.js} +11 -12
  19. package/audio-player/index.cjs +68 -4
  20. package/audio-player/index.js +309 -2
  21. package/{shared/definition6.cjs → avatar/definition.cjs} +28 -26
  22. package/{shared/definition6.js → avatar/definition.js} +7 -7
  23. package/avatar/index.cjs +18 -5
  24. package/avatar/index.js +93 -3
  25. package/{shared/definition7.cjs → badge/definition.cjs} +18 -16
  26. package/{shared/definition7.js → badge/definition.js} +6 -6
  27. package/badge/index.cjs +4 -5
  28. package/badge/index.js +66 -3
  29. package/{shared/definition8.cjs → banner/definition.cjs} +26 -25
  30. package/{shared/definition8.js → banner/definition.js} +10 -11
  31. package/banner/index.cjs +29 -4
  32. package/banner/index.js +128 -2
  33. package/{shared/definition10.cjs → breadcrumb/definition.cjs} +11 -9
  34. package/{shared/definition10.js → breadcrumb/definition.js} +5 -5
  35. package/breadcrumb/index.cjs +12 -5
  36. package/breadcrumb/index.js +69 -3
  37. package/{shared/definition9.cjs → breadcrumb-item/definition.cjs} +18 -15
  38. package/{shared/definition9.js → breadcrumb-item/definition.js} +7 -7
  39. package/breadcrumb-item/index.cjs +5 -5
  40. package/breadcrumb-item/index.js +33 -3
  41. package/bundled/_has.cjs +1 -0
  42. package/bundled/_has.js +34 -0
  43. package/bundled/affix.cjs +13 -0
  44. package/bundled/affix.js +63 -0
  45. package/bundled/anchored.cjs +4 -0
  46. package/bundled/anchored.js +67 -0
  47. package/bundled/aria.cjs +1 -0
  48. package/bundled/aria.js +7 -0
  49. package/bundled/attribute-binding-behaviour.cjs +1 -0
  50. package/bundled/attribute-binding-behaviour.js +27 -0
  51. package/bundled/base-progress.cjs +1 -0
  52. package/bundled/base-progress.js +57 -0
  53. package/bundled/breadcrumb-item.cjs +1 -0
  54. package/bundled/breadcrumb-item.js +21 -0
  55. package/bundled/button.cjs +1 -0
  56. package/bundled/button.js +106 -0
  57. package/bundled/calendar-event.cjs +1 -0
  58. package/bundled/calendar-event.js +34 -0
  59. package/bundled/calendar-picker.template.cjs +148 -0
  60. package/bundled/calendar-picker.template.js +3371 -0
  61. package/bundled/char-count.cjs +13 -0
  62. package/bundled/char-count.js +54 -0
  63. package/bundled/children.cjs +1 -0
  64. package/bundled/children.js +38 -0
  65. package/bundled/class-names.cjs +1 -0
  66. package/bundled/class-names.js +9 -0
  67. package/bundled/definition.cjs +39 -0
  68. package/bundled/definition.js +122 -0
  69. package/bundled/definition10.cjs +19 -0
  70. package/bundled/definition10.js +73 -0
  71. package/bundled/definition11.cjs +10 -0
  72. package/bundled/definition11.js +44 -0
  73. package/bundled/definition12.cjs +1 -0
  74. package/bundled/definition12.js +20 -0
  75. package/bundled/definition13.cjs +73 -0
  76. package/bundled/definition13.js +359 -0
  77. package/bundled/definition14.cjs +5 -0
  78. package/bundled/definition14.js +29 -0
  79. package/bundled/definition15.cjs +30 -0
  80. package/bundled/definition15.js +80 -0
  81. package/bundled/definition16.cjs +19 -0
  82. package/bundled/definition16.js +103 -0
  83. package/bundled/definition17.cjs +13 -0
  84. package/bundled/definition17.js +137 -0
  85. package/bundled/definition18.cjs +12 -0
  86. package/bundled/definition18.js +94 -0
  87. package/bundled/definition19.cjs +67 -0
  88. package/bundled/definition19.js +666 -0
  89. package/bundled/definition2.cjs +20 -0
  90. package/bundled/definition2.js +180 -0
  91. package/bundled/definition20.cjs +20 -0
  92. package/bundled/definition20.js +106 -0
  93. package/bundled/definition21.cjs +5 -0
  94. package/bundled/definition21.js +19 -0
  95. package/bundled/definition22.cjs +24 -0
  96. package/bundled/definition22.js +151 -0
  97. package/bundled/definition3.cjs +29 -0
  98. package/bundled/definition3.js +195 -0
  99. package/bundled/definition4.cjs +6 -0
  100. package/bundled/definition4.js +42 -0
  101. package/bundled/definition5.cjs +1 -0
  102. package/bundled/definition5.js +345 -0
  103. package/bundled/definition6.cjs +31 -0
  104. package/bundled/definition6.js +265 -0
  105. package/bundled/definition7.cjs +30 -0
  106. package/bundled/definition7.js +288 -0
  107. package/bundled/definition8.cjs +19 -0
  108. package/bundled/definition8.js +145 -0
  109. package/bundled/definition9.cjs +14 -0
  110. package/bundled/definition9.js +1406 -0
  111. package/bundled/delegates-aria.cjs +1 -0
  112. package/bundled/delegates-aria.js +77 -0
  113. package/bundled/divider.cjs +1 -0
  114. package/bundled/divider.js +34 -0
  115. package/bundled/dom.cjs +1 -0
  116. package/bundled/dom.js +6 -0
  117. package/bundled/enums.cjs +1 -0
  118. package/bundled/enums.js +9 -0
  119. package/bundled/form-associated.cjs +1 -0
  120. package/bundled/form-associated.js +320 -0
  121. package/bundled/form-element.cjs +1 -0
  122. package/bundled/form-element.js +56 -0
  123. package/bundled/host-semantics.cjs +1 -0
  124. package/bundled/host-semantics.js +57 -0
  125. package/bundled/index.cjs +1 -0
  126. package/bundled/index.js +6 -0
  127. package/bundled/key-codes.cjs +1 -0
  128. package/bundled/key-codes.js +16 -0
  129. package/bundled/linkable.cjs +15 -0
  130. package/bundled/linkable.js +49 -0
  131. package/bundled/listbox.cjs +1 -0
  132. package/bundled/listbox.js +345 -0
  133. package/bundled/localized.cjs +1 -0
  134. package/bundled/localized.js +459 -0
  135. package/bundled/mixins.cjs +33 -0
  136. package/bundled/mixins.js +226 -0
  137. package/bundled/numbers.cjs +1 -0
  138. package/bundled/numbers.js +14 -0
  139. package/bundled/option.cjs +1 -0
  140. package/bundled/option.js +158 -0
  141. package/bundled/picker-field.template.cjs +62 -0
  142. package/bundled/picker-field.template.js +234 -0
  143. package/bundled/playbackRates.cjs +1 -0
  144. package/bundled/playbackRates.js +11 -0
  145. package/bundled/ref.cjs +1 -0
  146. package/bundled/ref.js +32 -0
  147. package/bundled/repeat.cjs +1 -0
  148. package/bundled/repeat.js +341 -0
  149. package/bundled/scrollIntoView.cjs +1 -0
  150. package/bundled/scrollIntoView.js +33 -0
  151. package/bundled/single-date-picker.cjs +1 -0
  152. package/bundled/single-date-picker.js +39 -0
  153. package/bundled/single-value-picker.cjs +1 -0
  154. package/bundled/single-value-picker.js +87 -0
  155. package/bundled/slider.template.cjs +41 -0
  156. package/bundled/slider.template.js +100 -0
  157. package/bundled/slotted.cjs +1 -0
  158. package/bundled/slotted.js +81 -0
  159. package/bundled/strings.cjs +1 -0
  160. package/bundled/strings.js +7 -0
  161. package/bundled/text-field.cjs +1 -0
  162. package/bundled/text-field.js +4 -0
  163. package/bundled/time-selection-picker.template.cjs +46 -0
  164. package/bundled/time-selection-picker.template.js +575 -0
  165. package/bundled/vivid-element.cjs +1 -0
  166. package/bundled/vivid-element.js +1761 -0
  167. package/bundled/when.cjs +1 -0
  168. package/bundled/when.js +11 -0
  169. package/bundled/with-contextual-help.cjs +1 -0
  170. package/bundled/with-contextual-help.js +22 -0
  171. package/bundled/with-error-text.cjs +1 -0
  172. package/bundled/with-error-text.js +39 -0
  173. package/bundled/with-success-text.cjs +1 -0
  174. package/bundled/with-success-text.js +16 -0
  175. package/button/definition.cjs +14 -0
  176. package/button/definition.js +4 -0
  177. package/button/index.cjs +1 -5
  178. package/button/index.js +2 -3
  179. package/{shared/definition13.cjs → calendar/definition.cjs} +27 -449
  180. package/{shared/definition13.js → calendar/definition.js} +7 -431
  181. package/calendar/index.cjs +53 -5
  182. package/calendar/index.js +431 -3
  183. package/{shared/definition12.cjs → calendar-event/definition.cjs} +12 -9
  184. package/{shared/definition12.js → calendar-event/definition.js} +6 -6
  185. package/calendar-event/index.cjs +9 -5
  186. package/calendar-event/index.js +43 -3
  187. package/card/definition.cjs +186 -0
  188. package/{shared/definition14.js → card/definition.js} +10 -11
  189. package/card/index.cjs +47 -5
  190. package/card/index.js +163 -3
  191. package/{shared/definition15.cjs → checkbox/definition.cjs} +35 -30
  192. package/{shared/definition15.js → checkbox/definition.js} +17 -14
  193. package/checkbox/index.cjs +1 -5
  194. package/checkbox/index.js +2 -3
  195. package/{shared/definition16.cjs → combobox/definition.cjs} +50 -52
  196. package/{shared/definition16.js → combobox/definition.js} +19 -23
  197. package/combobox/index.cjs +65 -5
  198. package/combobox/index.js +512 -3
  199. package/contextual-help/definition.cjs +62 -0
  200. package/contextual-help/definition.js +57 -0
  201. package/contextual-help/index.cjs +1 -0
  202. package/contextual-help/index.js +2 -0
  203. package/custom-elements.json +2735 -711
  204. package/{shared/definition17.cjs → data-grid/definition.cjs} +169 -196
  205. package/{shared/definition17.js → data-grid/definition.js} +71 -100
  206. package/data-grid/index.cjs +81 -5
  207. package/data-grid/index.js +1011 -3
  208. package/{shared/definition18.cjs → date-picker/definition.cjs} +20 -17
  209. package/{shared/definition18.js → date-picker/definition.js} +12 -11
  210. package/date-picker/index.cjs +1 -5
  211. package/date-picker/index.js +115 -3
  212. package/{shared/definition19.cjs → date-range-picker/definition.cjs} +26 -23
  213. package/{shared/definition19.js → date-range-picker/definition.js} +10 -9
  214. package/date-range-picker/index.cjs +1 -5
  215. package/date-range-picker/index.js +335 -3
  216. package/{shared/definition20.cjs → date-time-picker/definition.cjs} +27 -24
  217. package/{shared/definition20.js → date-time-picker/definition.js} +13 -12
  218. package/date-time-picker/index.cjs +8 -5
  219. package/date-time-picker/index.js +216 -3
  220. package/{shared/definition21.cjs → dial-pad/definition.cjs} +39 -40
  221. package/{shared/definition21.js → dial-pad/definition.js} +9 -12
  222. package/dial-pad/index.cjs +54 -5
  223. package/dial-pad/index.js +214 -3
  224. package/{shared/definition22.cjs → dialog/definition.cjs} +48 -47
  225. package/{shared/definition22.js → dialog/definition.js} +10 -11
  226. package/dialog/index.cjs +44 -5
  227. package/dialog/index.js +257 -3
  228. package/{shared/definition23.cjs → divider/definition.cjs} +10 -6
  229. package/{shared/definition23.js → divider/definition.js} +6 -5
  230. package/divider/index.cjs +1 -5
  231. package/divider/index.js +2 -3
  232. package/elevation/definition.cjs +11 -0
  233. package/elevation/definition.js +2 -0
  234. package/elevation/index.cjs +1 -5
  235. package/elevation/index.js +2 -3
  236. package/empty-state/definition.cjs +81 -0
  237. package/empty-state/definition.js +75 -0
  238. package/empty-state/index.cjs +14 -5
  239. package/empty-state/index.js +64 -3
  240. package/fab/definition.cjs +105 -0
  241. package/fab/definition.js +99 -0
  242. package/fab/index.cjs +20 -5
  243. package/fab/index.js +86 -3
  244. package/file-picker/definition.cjs +510 -0
  245. package/file-picker/definition.js +504 -0
  246. package/file-picker/index.cjs +58 -5
  247. package/file-picker/index.js +381 -3
  248. package/{shared/definition27.cjs → header/definition.cjs} +14 -11
  249. package/{shared/definition27.js → header/definition.js} +6 -5
  250. package/header/index.cjs +19 -5
  251. package/header/index.js +57 -3
  252. package/{shared/definition28.cjs → icon/definition.cjs} +25 -149
  253. package/{shared/definition28.js → icon/definition.js} +6 -132
  254. package/icon/index.cjs +1 -5
  255. package/icon/index.js +2 -3
  256. package/index.cjs +268 -264
  257. package/index.js +72 -71
  258. package/{shared/definition29.cjs → layout/definition.cjs} +13 -10
  259. package/{shared/definition29.js → layout/definition.js} +4 -3
  260. package/layout/index.cjs +3 -5
  261. package/layout/index.js +52 -3
  262. package/lib/accordion-item/accordion-item.d.ts +42 -2
  263. package/lib/action-group/action-group.d.ts +42 -2
  264. package/lib/alert/alert.d.ts +84 -4
  265. package/lib/audio-player/audio-player.d.ts +42 -2
  266. package/lib/avatar/avatar.d.ts +42 -2
  267. package/lib/badge/badge.d.ts +42 -2
  268. package/lib/banner/banner.d.ts +126 -6
  269. package/lib/breadcrumb/breadcrumb.d.ts +42 -2
  270. package/lib/breadcrumb-item/breadcrumb-item.d.ts +42 -2
  271. package/lib/button/button.d.ts +127 -6
  272. package/lib/calendar-event/calendar-event.d.ts +42 -2
  273. package/lib/card/card.d.ts +42 -2
  274. package/lib/checkbox/checkbox.d.ts +252 -13
  275. package/lib/combobox/combobox.d.ts +252 -12
  276. package/lib/components.d.ts +1 -0
  277. package/lib/contextual-help/contextual-help.d.ts +5 -0
  278. package/lib/contextual-help/contextual-help.template.d.ts +3 -0
  279. package/lib/contextual-help/definition.d.ts +1 -0
  280. package/lib/data-grid/data-grid-cell.d.ts +418 -3
  281. package/lib/data-grid/data-grid-row.d.ts +379 -1
  282. package/lib/date-picker/date-picker.d.ts +374 -54
  283. package/lib/date-range-picker/date-range-picker.d.ts +188 -28
  284. package/lib/date-time-picker/date-time-picker.d.ts +376 -56
  285. package/lib/dial-pad/dial-pad.d.ts +42 -2
  286. package/lib/dialog/dialog.d.ts +84 -4
  287. package/lib/divider/divider.d.ts +42 -2
  288. package/lib/fab/fab.d.ts +43 -2
  289. package/lib/file-picker/accept.d.ts +1 -0
  290. package/lib/file-picker/data-transfer.d.ts +1 -0
  291. package/lib/file-picker/file-picker.d.ts +259 -31
  292. package/lib/file-picker/locale.d.ts +1 -0
  293. package/lib/header/header.d.ts +42 -2
  294. package/lib/menu/menu.d.ts +84 -4
  295. package/lib/menu-item/menu-item.d.ts +84 -4
  296. package/lib/nav/nav.d.ts +42 -2
  297. package/lib/nav-disclosure/nav-disclosure.d.ts +84 -4
  298. package/lib/nav-item/nav-item.d.ts +84 -4
  299. package/lib/note/note.d.ts +42 -2
  300. package/lib/number-field/number-field.d.ts +840 -104
  301. package/lib/option/option.d.ts +85 -4
  302. package/lib/pagination/pagination.d.ts +42 -2
  303. package/lib/progress/progress.d.ts +42 -2
  304. package/lib/progress-ring/progress-ring.d.ts +42 -2
  305. package/lib/radio/radio.d.ts +126 -7
  306. package/lib/radio-group/radio-group.d.ts +42 -2
  307. package/lib/range-slider/range-slider.d.ts +126 -6
  308. package/lib/rich-text-editor/menubar/menubar.d.ts +42 -2
  309. package/lib/rich-text-editor/rich-text-editor.d.ts +42 -2
  310. package/lib/searchable-select/option-tag.d.ts +42 -2
  311. package/lib/searchable-select/searchable-select.d.ts +336 -16
  312. package/lib/select/select.d.ts +294 -14
  313. package/lib/selectable-box/selectable-box.d.ts +42 -3
  314. package/lib/simple-color-picker/definition.d.ts +4 -0
  315. package/lib/simple-color-picker/locale.d.ts +4 -0
  316. package/lib/simple-color-picker/simple-color-picker.d.ts +1600 -0
  317. package/lib/simple-color-picker/simple-color-picker.template.d.ts +3 -0
  318. package/lib/slider/slider.d.ts +126 -6
  319. package/lib/split-button/split-button.d.ts +128 -6
  320. package/lib/switch/switch.d.ts +84 -4
  321. package/lib/tab/tab.d.ts +126 -6
  322. package/lib/tab-panel/tab-panel.d.ts +42 -2
  323. package/lib/tag/tag.d.ts +126 -6
  324. package/lib/tag-group/tag-group.d.ts +42 -2
  325. package/lib/tag-name-map.d.ts +2 -1
  326. package/lib/text-area/text-area.d.ts +787 -91
  327. package/lib/text-field/text-field.d.ts +840 -104
  328. package/lib/time-picker/time-picker.d.ts +188 -28
  329. package/lib/toggletip/toggletip.d.ts +84 -4
  330. package/lib/tooltip/tooltip.d.ts +42 -2
  331. package/lib/tree-item/tree-item.d.ts +84 -4
  332. package/lib/tree-view/tree-view.d.ts +42 -2
  333. package/lib/video-player/video-player.d.ts +42 -2
  334. package/locales/de-DE.cjs +13 -1
  335. package/locales/de-DE.js +13 -1
  336. package/locales/en-GB.cjs +13 -1
  337. package/locales/en-GB.js +13 -1
  338. package/locales/en-US.cjs +13 -1
  339. package/locales/en-US.js +13 -1
  340. package/locales/ja-JP.cjs +13 -1
  341. package/locales/ja-JP.js +13 -1
  342. package/locales/zh-CN.cjs +13 -1
  343. package/locales/zh-CN.js +13 -1
  344. package/{shared/definition31.cjs → menu/definition.cjs} +46 -46
  345. package/{shared/definition31.js → menu/definition.js} +16 -18
  346. package/menu/index.cjs +1 -5
  347. package/menu/index.js +2 -3
  348. package/menu-item/definition.cjs +14 -0
  349. package/menu-item/definition.js +3 -0
  350. package/menu-item/index.cjs +1 -5
  351. package/menu-item/index.js +2 -3
  352. package/{shared/definition34.cjs → nav/definition.cjs} +7 -4
  353. package/{shared/definition34.js → nav/definition.js} +4 -3
  354. package/nav/index.cjs +5 -5
  355. package/nav/index.js +13 -3
  356. package/nav-disclosure/definition.cjs +122 -0
  357. package/nav-disclosure/definition.js +116 -0
  358. package/nav-disclosure/index.cjs +16 -5
  359. package/nav-disclosure/index.js +96 -3
  360. package/{shared/definition33.cjs → nav-item/definition.cjs} +19 -16
  361. package/{shared/definition33.js → nav-item/definition.js} +9 -8
  362. package/nav-item/index.cjs +2 -5
  363. package/nav-item/index.js +59 -3
  364. package/{shared/definition35.cjs → note/definition.cjs} +15 -13
  365. package/{shared/definition35.js → note/definition.js} +6 -6
  366. package/note/index.cjs +9 -5
  367. package/note/index.js +44 -3
  368. package/number-field/definition.cjs +438 -0
  369. package/{shared/definition36.js → number-field/definition.js} +31 -27
  370. package/number-field/index.cjs +60 -5
  371. package/number-field/index.js +369 -3
  372. package/option/definition.cjs +84 -0
  373. package/option/definition.js +78 -0
  374. package/option/index.cjs +1 -5
  375. package/option/index.js +2 -3
  376. package/package.json +15 -4
  377. package/{shared/definition38.cjs → pagination/definition.cjs} +31 -33
  378. package/{shared/definition38.js → pagination/definition.js} +7 -11
  379. package/pagination/index.cjs +43 -5
  380. package/pagination/index.js +194 -3
  381. package/popup/definition.cjs +13 -0
  382. package/popup/definition.js +4 -0
  383. package/popup/index.cjs +1 -5
  384. package/popup/index.js +2 -3
  385. package/{shared/definition40.cjs → progress/definition.cjs} +17 -15
  386. package/{shared/definition40.js → progress/definition.js} +6 -6
  387. package/progress/index.cjs +17 -5
  388. package/progress/index.js +69 -3
  389. package/{shared/definition39.cjs → progress-ring/definition.cjs} +17 -15
  390. package/{shared/definition39.js → progress-ring/definition.js} +7 -7
  391. package/progress-ring/index.cjs +1 -5
  392. package/progress-ring/index.js +2 -3
  393. package/{shared/definition42.cjs → radio/definition.cjs} +20 -23
  394. package/{shared/definition42.js → radio/definition.js} +8 -13
  395. package/radio/index.cjs +1 -5
  396. package/radio/index.js +2 -3
  397. package/{shared/definition41.cjs → radio-group/definition.cjs} +31 -30
  398. package/{shared/definition41.js → radio-group/definition.js} +8 -9
  399. package/radio-group/index.cjs +23 -5
  400. package/radio-group/index.js +255 -3
  401. package/{shared/definition43.cjs → range-slider/definition.cjs} +62 -61
  402. package/{shared/definition43.js → range-slider/definition.js} +13 -14
  403. package/range-slider/index.cjs +68 -5
  404. package/range-slider/index.js +456 -3
  405. package/rich-text-editor/definition.cjs +1206 -0
  406. package/rich-text-editor/definition.js +1200 -0
  407. package/rich-text-editor/index.cjs +133 -4
  408. package/rich-text-editor/index.js +10386 -2
  409. package/{shared/definition45.cjs → searchable-select/definition.cjs} +119 -116
  410. package/{shared/definition45.js → searchable-select/definition.js} +25 -24
  411. package/searchable-select/index.cjs +164 -5
  412. package/searchable-select/index.js +1025 -3
  413. package/{shared/definition46.cjs → select/definition.cjs} +80 -83
  414. package/{shared/definition46.js → select/definition.js} +19 -24
  415. package/select/index.cjs +1 -5
  416. package/select/index.js +2 -3
  417. package/{shared/definition47.cjs → selectable-box/definition.cjs} +26 -32
  418. package/{shared/definition47.js → selectable-box/definition.js} +9 -17
  419. package/selectable-box/index.cjs +28 -5
  420. package/selectable-box/index.js +136 -3
  421. package/shared/aria/aria-mixin.d.ts +43 -3
  422. package/shared/aria/attribute-removal.d.ts +3 -0
  423. package/shared/aria/delegate-aria-behavior.d.ts +0 -3
  424. package/shared/aria/delegates-aria.d.ts +42 -2
  425. package/shared/aria/host-semantics.d.ts +42 -2
  426. package/shared/color-picker/index.d.ts +2 -0
  427. package/shared/color-picker/types.d.ts +4 -0
  428. package/shared/color-picker/utils.d.ts +3 -0
  429. package/shared/feedback/feedback-message.d.ts +42 -2
  430. package/shared/feedback/mixins.d.ts +84 -4
  431. package/shared/foundation/button/button.d.ts +84 -4
  432. package/shared/foundation/form-associated/form-associated.d.ts +84 -4
  433. package/shared/foundation/vivid-element/vivid-element.d.ts +43 -3
  434. package/shared/localization/Locale.d.ts +2 -0
  435. package/shared/patterns/affix.d.ts +84 -4
  436. package/shared/patterns/anchored.d.ts +84 -4
  437. package/shared/patterns/char-count/char-count.d.ts +42 -2
  438. package/shared/patterns/form-elements/form-element.d.ts +84 -4
  439. package/shared/patterns/form-elements/with-contextual-help.d.ts +1238 -0
  440. package/shared/patterns/form-elements/with-error-text.d.ts +126 -6
  441. package/shared/patterns/form-elements/with-success-text.d.ts +42 -2
  442. package/shared/patterns/linkable.d.ts +42 -2
  443. package/shared/patterns/localized.d.ts +42 -2
  444. package/shared/patterns/trapped-focus.d.ts +42 -2
  445. package/shared/picker-field/mixins/calendar-picker.d.ts +94 -14
  446. package/shared/picker-field/mixins/calendar-picker.template.d.ts +94 -14
  447. package/shared/picker-field/mixins/inline-time-picker/inline-time-picker.d.ts +42 -2
  448. package/shared/picker-field/mixins/min-max-calendar-picker.d.ts +188 -28
  449. package/shared/picker-field/mixins/single-date-picker.d.ts +280 -40
  450. package/shared/picker-field/mixins/single-value-picker.d.ts +92 -12
  451. package/shared/picker-field/mixins/time-selection-picker.d.ts +188 -28
  452. package/shared/picker-field/mixins/time-selection-picker.template.d.ts +188 -28
  453. package/shared/picker-field/picker-field.d.ts +252 -12
  454. package/{shared/definition48.cjs → side-drawer/definition.cjs} +16 -14
  455. package/{shared/definition48.js → side-drawer/definition.js} +5 -5
  456. package/side-drawer/index.cjs +17 -3
  457. package/side-drawer/index.js +100 -2
  458. package/simple-color-picker/definition.cjs +398 -0
  459. package/simple-color-picker/definition.js +392 -0
  460. package/simple-color-picker/index.cjs +31 -0
  461. package/simple-color-picker/index.js +250 -0
  462. package/{shared/definition49.cjs → slider/definition.cjs} +46 -53
  463. package/{shared/definition49.js → slider/definition.js} +11 -20
  464. package/slider/index.cjs +1 -5
  465. package/slider/index.js +2 -3
  466. package/split-button/definition.cjs +176 -0
  467. package/split-button/definition.js +170 -0
  468. package/split-button/index.cjs +26 -5
  469. package/split-button/index.js +149 -3
  470. package/styles/core/all.css +1 -1
  471. package/styles/core/theme.css +1 -1
  472. package/styles/core/typography.css +1 -1
  473. package/styles/tokens/theme-dark.css +4 -4
  474. package/styles/tokens/theme-light.css +4 -4
  475. package/styles/tokens/vivid-2-compat.css +1 -1
  476. package/{shared/definition51.cjs → switch/definition.cjs} +20 -19
  477. package/{shared/definition51.js → switch/definition.js} +8 -9
  478. package/switch/index.cjs +16 -5
  479. package/switch/index.js +102 -3
  480. package/tab/definition.cjs +127 -0
  481. package/tab/definition.js +121 -0
  482. package/tab/index.cjs +1 -5
  483. package/tab/index.js +2 -3
  484. package/{shared/definition52.cjs → tab-panel/definition.cjs} +7 -4
  485. package/{shared/definition52.js → tab-panel/definition.js} +4 -3
  486. package/tab-panel/index.cjs +1 -5
  487. package/tab-panel/index.js +2 -3
  488. package/{shared/definition54.cjs → tabs/definition.cjs} +47 -40
  489. package/{shared/definition54.js → tabs/definition.js} +19 -14
  490. package/tabs/index.cjs +31 -5
  491. package/tabs/index.js +321 -3
  492. package/tag/definition.cjs +156 -0
  493. package/tag/definition.js +150 -0
  494. package/tag/index.cjs +19 -5
  495. package/tag/index.js +118 -3
  496. package/{shared/definition55.cjs → tag-group/definition.cjs} +9 -6
  497. package/{shared/definition55.js → tag-group/definition.js} +5 -4
  498. package/tag-group/index.cjs +8 -5
  499. package/tag-group/index.js +26 -3
  500. package/text-area/definition.cjs +355 -0
  501. package/text-area/definition.js +349 -0
  502. package/text-area/index.cjs +41 -5
  503. package/text-area/index.js +293 -3
  504. package/{shared/definition58.cjs → text-field/definition.cjs} +70 -52
  505. package/{shared/definition58.js → text-field/definition.js} +40 -24
  506. package/text-field/index.cjs +1 -5
  507. package/text-field/index.js +2 -3
  508. package/time-picker/definition.cjs +43 -0
  509. package/{shared/definition59.js → time-picker/definition.js} +9 -8
  510. package/time-picker/index.cjs +1 -5
  511. package/time-picker/index.js +29 -3
  512. package/{shared/definition60.cjs → toggletip/definition.cjs} +20 -18
  513. package/{shared/definition60.js → toggletip/definition.js} +8 -8
  514. package/toggletip/index.cjs +1 -5
  515. package/toggletip/index.js +2 -3
  516. package/{shared/definition61.cjs → tooltip/definition.cjs} +16 -13
  517. package/{shared/definition61.js → tooltip/definition.js} +7 -6
  518. package/tooltip/index.cjs +1 -5
  519. package/tooltip/index.js +2 -3
  520. package/tree-item/definition.cjs +13 -0
  521. package/tree-item/definition.js +3 -0
  522. package/tree-item/index.cjs +1 -5
  523. package/tree-item/index.js +2 -3
  524. package/{shared/definition63.cjs → tree-view/definition.cjs} +42 -44
  525. package/{shared/definition63.js → tree-view/definition.js} +7 -11
  526. package/tree-view/index.cjs +13 -5
  527. package/tree-view/index.js +171 -3
  528. package/{shared → unbundled}/affix.cjs +10 -11
  529. package/{shared → unbundled}/affix.js +2 -3
  530. package/{shared → unbundled}/anchored.cjs +7 -8
  531. package/{shared → unbundled}/anchored.js +1 -2
  532. package/{shared → unbundled}/attribute-binding-behaviour.cjs +3 -3
  533. package/{shared → unbundled}/attribute-binding-behaviour.js +1 -1
  534. package/{shared → unbundled}/base-progress.cjs +6 -5
  535. package/{shared → unbundled}/base-progress.js +2 -1
  536. package/{shared → unbundled}/breadcrumb-item.cjs +3 -2
  537. package/{shared → unbundled}/breadcrumb-item.js +2 -1
  538. package/{shared → unbundled}/button.cjs +10 -9
  539. package/{shared → unbundled}/button.js +2 -1
  540. package/{shared → unbundled}/calendar-event.cjs +8 -7
  541. package/{shared → unbundled}/calendar-event.js +2 -1
  542. package/unbundled/calendar-picker.template.cjs +917 -0
  543. package/unbundled/calendar-picker.template.js +906 -0
  544. package/{shared → unbundled}/char-count.cjs +6 -7
  545. package/{shared → unbundled}/char-count.js +2 -3
  546. package/unbundled/definition.cjs +225 -0
  547. package/unbundled/definition.js +220 -0
  548. package/{shared/definition30.cjs → unbundled/definition2.cjs} +49 -46
  549. package/{shared/definition30.js → unbundled/definition2.js} +14 -11
  550. package/unbundled/definition3.cjs +207 -0
  551. package/{shared/definition62.js → unbundled/definition3.js} +6 -10
  552. package/unbundled/definition4.cjs +298 -0
  553. package/unbundled/definition4.js +293 -0
  554. package/{shared/definition65.cjs → unbundled/definition5.cjs} +7 -6
  555. package/{shared/definition65.js → unbundled/definition5.js} +3 -2
  556. package/{shared → unbundled}/delegates-aria.cjs +8 -28
  557. package/{shared → unbundled}/delegates-aria.js +6 -26
  558. package/{shared → unbundled}/divider.cjs +13 -7
  559. package/{shared → unbundled}/divider.js +11 -5
  560. package/{shared → unbundled}/form-associated.cjs +13 -13
  561. package/{shared → unbundled}/form-associated.js +2 -2
  562. package/{shared → unbundled}/form-element.cjs +3 -3
  563. package/{shared → unbundled}/form-element.js +1 -1
  564. package/{shared → unbundled}/host-semantics.cjs +2 -1
  565. package/{shared → unbundled}/host-semantics.js +2 -1
  566. package/unbundled/key-codes.cjs +10 -0
  567. package/unbundled/key-codes.js +7 -0
  568. package/{shared → unbundled}/linkable.cjs +11 -12
  569. package/{shared → unbundled}/linkable.js +1 -2
  570. package/{shared → unbundled}/listbox.cjs +22 -38
  571. package/{shared → unbundled}/listbox.js +4 -20
  572. package/{shared → unbundled}/localized.cjs +2 -2
  573. package/{shared → unbundled}/localized.js +1 -1
  574. package/{shared → unbundled}/mixins.cjs +27 -83
  575. package/{shared → unbundled}/mixins.js +6 -62
  576. package/{shared → unbundled}/option.cjs +42 -17
  577. package/{shared → unbundled}/option.js +29 -4
  578. package/{shared → unbundled}/picker-field.template.cjs +21 -21
  579. package/{shared → unbundled}/picker-field.template.js +7 -7
  580. package/{shared → unbundled}/slider.template.cjs +15 -19
  581. package/{shared → unbundled}/slider.template.js +3 -7
  582. package/unbundled/text-field.cjs +5 -0
  583. package/unbundled/text-field.js +3 -0
  584. package/{shared → unbundled}/time-selection-picker.template.cjs +28 -30
  585. package/{shared → unbundled}/time-selection-picker.template.js +4 -6
  586. package/unbundled/vivid-element.cjs +283 -0
  587. package/unbundled/vivid-element.js +274 -0
  588. package/unbundled/with-contextual-help.cjs +29 -0
  589. package/unbundled/with-contextual-help.js +27 -0
  590. package/{shared → unbundled}/with-error-text.cjs +2 -2
  591. package/{shared → unbundled}/with-error-text.js +1 -1
  592. package/{shared → unbundled}/with-success-text.cjs +2 -2
  593. package/{shared → unbundled}/with-success-text.js +1 -1
  594. package/video-player/definition.cjs +536 -0
  595. package/video-player/definition.js +530 -0
  596. package/video-player/index.cjs +536 -3
  597. package/video-player/index.js +35912 -2
  598. package/{shared/definition66.cjs → visually-hidden/definition.cjs} +6 -3
  599. package/{shared/definition66.js → visually-hidden/definition.js} +3 -2
  600. package/visually-hidden/index.cjs +1 -5
  601. package/visually-hidden/index.js +2 -3
  602. package/vivid.api.json +716 -914
  603. package/shared/_has.cjs +0 -58
  604. package/shared/_has.js +0 -54
  605. package/shared/aria.cjs +0 -11
  606. package/shared/aria.js +0 -9
  607. package/shared/calendar-picker.template.cjs +0 -6377
  608. package/shared/calendar-picker.template.js +0 -6366
  609. package/shared/children.cjs +0 -61
  610. package/shared/children.js +0 -59
  611. package/shared/class-names.cjs +0 -17
  612. package/shared/class-names.js +0 -15
  613. package/shared/definition.cjs +0 -145
  614. package/shared/definition.js +0 -141
  615. package/shared/definition11.cjs +0 -220
  616. package/shared/definition11.js +0 -215
  617. package/shared/definition14.cjs +0 -185
  618. package/shared/definition24.cjs +0 -80
  619. package/shared/definition24.js +0 -76
  620. package/shared/definition25.cjs +0 -90
  621. package/shared/definition25.js +0 -86
  622. package/shared/definition26.cjs +0 -2514
  623. package/shared/definition26.js +0 -2510
  624. package/shared/definition32.cjs +0 -120
  625. package/shared/definition32.js +0 -116
  626. package/shared/definition36.cjs +0 -432
  627. package/shared/definition37.cjs +0 -71
  628. package/shared/definition37.js +0 -68
  629. package/shared/definition44.cjs +0 -14666
  630. package/shared/definition44.js +0 -14662
  631. package/shared/definition50.cjs +0 -148
  632. package/shared/definition50.js +0 -144
  633. package/shared/definition53.cjs +0 -124
  634. package/shared/definition53.js +0 -120
  635. package/shared/definition56.cjs +0 -154
  636. package/shared/definition56.js +0 -150
  637. package/shared/definition57.cjs +0 -335
  638. package/shared/definition57.js +0 -331
  639. package/shared/definition59.cjs +0 -39
  640. package/shared/definition62.cjs +0 -211
  641. package/shared/definition64.cjs +0 -69579
  642. package/shared/definition64.js +0 -69575
  643. package/shared/definition67.cjs +0 -2227
  644. package/shared/definition67.js +0 -2222
  645. package/shared/dom.cjs +0 -10
  646. package/shared/dom.js +0 -8
  647. package/shared/key-codes.cjs +0 -32
  648. package/shared/key-codes.js +0 -18
  649. package/shared/numbers.cjs +0 -38
  650. package/shared/numbers.js +0 -34
  651. package/shared/ref.cjs +0 -43
  652. package/shared/ref.js +0 -41
  653. package/shared/repeat.cjs +0 -767
  654. package/shared/repeat.js +0 -764
  655. package/shared/slotted.cjs +0 -123
  656. package/shared/slotted.js +0 -119
  657. package/shared/strings.cjs +0 -11
  658. package/shared/strings.js +0 -9
  659. package/shared/text-field.cjs +0 -5
  660. package/shared/text-field.js +0 -3
  661. package/shared/vivid-element.cjs +0 -2771
  662. package/shared/vivid-element.js +0 -2748
  663. package/shared/when.cjs +0 -31
  664. package/shared/when.js +0 -29
  665. /package/{shared → unbundled}/enums.cjs +0 -0
  666. /package/{shared → unbundled}/enums.js +0 -0
  667. /package/{shared → unbundled}/index.cjs +0 -0
  668. /package/{shared → unbundled}/index.js +0 -0
  669. /package/{shared → unbundled}/playbackRates.cjs +0 -0
  670. /package/{shared → unbundled}/playbackRates.js +0 -0
  671. /package/{shared → unbundled}/scrollIntoView.cjs +0 -0
  672. /package/{shared → unbundled}/scrollIntoView.js +0 -0
  673. /package/{shared → unbundled}/single-date-picker.cjs +0 -0
  674. /package/{shared → unbundled}/single-date-picker.js +0 -0
  675. /package/{shared → unbundled}/single-value-picker.cjs +0 -0
  676. /package/{shared → unbundled}/single-value-picker.js +0 -0
@@ -0,0 +1,1406 @@
1
+ import { B as Kt, b as Gt } from "./definition3.js";
2
+ import { E as Jt, e as Qt } from "./definition4.js";
3
+ import { V as Zt, a as G, n as te, o as ee, h as mt, c as ne, d as oe } from "./vivid-element.js";
4
+ import { r as ht } from "./ref.js";
5
+ import { c as ie } from "./class-names.js";
6
+ import { w as At } from "./when.js";
7
+ const Ht = ["top", "right", "bottom", "left"], Et = ["start", "end"], Ct = /* @__PURE__ */ Ht.reduce((t, e) => t.concat(e, e + "-" + Et[0], e + "-" + Et[1]), []), M = Math.min, C = Math.max, ct = Math.round, st = Math.floor, z = (t) => ({
8
+ x: t,
9
+ y: t
10
+ }), re = {
11
+ left: "right",
12
+ right: "left",
13
+ bottom: "top",
14
+ top: "bottom"
15
+ }, se = {
16
+ start: "end",
17
+ end: "start"
18
+ };
19
+ function le(t, e, n) {
20
+ return C(t, M(e, n));
21
+ }
22
+ function J(t, e) {
23
+ return typeof t == "function" ? t(e) : t;
24
+ }
25
+ function _(t) {
26
+ return t.split("-")[0];
27
+ }
28
+ function H(t) {
29
+ return t.split("-")[1];
30
+ }
31
+ function ce(t) {
32
+ return t === "x" ? "y" : "x";
33
+ }
34
+ function vt(t) {
35
+ return t === "y" ? "height" : "width";
36
+ }
37
+ const ae = /* @__PURE__ */ new Set(["top", "bottom"]);
38
+ function X(t) {
39
+ return ae.has(_(t)) ? "y" : "x";
40
+ }
41
+ function xt(t) {
42
+ return ce(X(t));
43
+ }
44
+ function Mt(t, e, n) {
45
+ n === void 0 && (n = !1);
46
+ const o = H(t), i = xt(t), r = vt(i);
47
+ let s = i === "x" ? o === (n ? "end" : "start") ? "right" : "left" : o === "start" ? "bottom" : "top";
48
+ return e.reference[r] > e.floating[r] && (s = ft(s)), [s, ft(s)];
49
+ }
50
+ function fe(t) {
51
+ const e = ft(t);
52
+ return [at(t), e, at(e)];
53
+ }
54
+ function at(t) {
55
+ return t.replace(/start|end/g, (e) => se[e]);
56
+ }
57
+ const St = ["left", "right"], Tt = ["right", "left"], ue = ["top", "bottom"], pe = ["bottom", "top"];
58
+ function de(t, e, n) {
59
+ switch (t) {
60
+ case "top":
61
+ case "bottom":
62
+ return n ? e ? Tt : St : e ? St : Tt;
63
+ case "left":
64
+ case "right":
65
+ return e ? ue : pe;
66
+ default:
67
+ return [];
68
+ }
69
+ }
70
+ function me(t, e, n, o) {
71
+ const i = H(t);
72
+ let r = de(_(t), n === "start", o);
73
+ return i && (r = r.map((s) => s + "-" + i), e && (r = r.concat(r.map(at)))), r;
74
+ }
75
+ function ft(t) {
76
+ return t.replace(/left|right|bottom|top/g, (e) => re[e]);
77
+ }
78
+ function he(t) {
79
+ return {
80
+ top: 0,
81
+ right: 0,
82
+ bottom: 0,
83
+ left: 0,
84
+ ...t
85
+ };
86
+ }
87
+ function yt(t) {
88
+ return typeof t != "number" ? he(t) : {
89
+ top: t,
90
+ right: t,
91
+ bottom: t,
92
+ left: t
93
+ };
94
+ }
95
+ function tt(t) {
96
+ const {
97
+ x: e,
98
+ y: n,
99
+ width: o,
100
+ height: i
101
+ } = t;
102
+ return {
103
+ width: o,
104
+ height: i,
105
+ top: n,
106
+ left: e,
107
+ right: e + o,
108
+ bottom: n + i,
109
+ x: e,
110
+ y: n
111
+ };
112
+ }
113
+ function Lt(t, e, n) {
114
+ let {
115
+ reference: o,
116
+ floating: i
117
+ } = t;
118
+ const r = X(e), s = xt(e), l = vt(s), c = _(e), a = r === "y", p = o.x + o.width / 2 - i.width / 2, f = o.y + o.height / 2 - i.height / 2, d = o[l] / 2 - i[l] / 2;
119
+ let u;
120
+ switch (c) {
121
+ case "top":
122
+ u = {
123
+ x: p,
124
+ y: o.y - i.height
125
+ };
126
+ break;
127
+ case "bottom":
128
+ u = {
129
+ x: p,
130
+ y: o.y + o.height
131
+ };
132
+ break;
133
+ case "right":
134
+ u = {
135
+ x: o.x + o.width,
136
+ y: f
137
+ };
138
+ break;
139
+ case "left":
140
+ u = {
141
+ x: o.x - i.width,
142
+ y: f
143
+ };
144
+ break;
145
+ default:
146
+ u = {
147
+ x: o.x,
148
+ y: o.y
149
+ };
150
+ }
151
+ switch (H(e)) {
152
+ case "start":
153
+ u[s] -= d * (n && a ? -1 : 1);
154
+ break;
155
+ case "end":
156
+ u[s] += d * (n && a ? -1 : 1);
157
+ break;
158
+ }
159
+ return u;
160
+ }
161
+ const ge = async (t, e, n) => {
162
+ const {
163
+ placement: o = "bottom",
164
+ strategy: i = "absolute",
165
+ middleware: r = [],
166
+ platform: s
167
+ } = n, l = r.filter(Boolean), c = await (s.isRTL == null ? void 0 : s.isRTL(e));
168
+ let a = await s.getElementRects({
169
+ reference: t,
170
+ floating: e,
171
+ strategy: i
172
+ }), {
173
+ x: p,
174
+ y: f
175
+ } = Lt(a, o, c), d = o, u = {}, h = 0;
176
+ for (let m = 0; m < l.length; m++) {
177
+ const {
178
+ name: g,
179
+ fn: w
180
+ } = l[m], {
181
+ x,
182
+ y,
183
+ data: R,
184
+ reset: b
185
+ } = await w({
186
+ x: p,
187
+ y: f,
188
+ initialPlacement: o,
189
+ placement: d,
190
+ strategy: i,
191
+ middlewareData: u,
192
+ rects: a,
193
+ platform: s,
194
+ elements: {
195
+ reference: t,
196
+ floating: e
197
+ }
198
+ });
199
+ p = x ?? p, f = y ?? f, u = {
200
+ ...u,
201
+ [g]: {
202
+ ...u[g],
203
+ ...R
204
+ }
205
+ }, b && h <= 50 && (h++, typeof b == "object" && (b.placement && (d = b.placement), b.rects && (a = b.rects === !0 ? await s.getElementRects({
206
+ reference: t,
207
+ floating: e,
208
+ strategy: i
209
+ }) : b.rects), {
210
+ x: p,
211
+ y: f
212
+ } = Lt(a, d, c)), m = -1);
213
+ }
214
+ return {
215
+ x: p,
216
+ y: f,
217
+ placement: d,
218
+ strategy: i,
219
+ middlewareData: u
220
+ };
221
+ };
222
+ async function ot(t, e) {
223
+ var n;
224
+ e === void 0 && (e = {});
225
+ const {
226
+ x: o,
227
+ y: i,
228
+ platform: r,
229
+ rects: s,
230
+ elements: l,
231
+ strategy: c
232
+ } = t, {
233
+ boundary: a = "clippingAncestors",
234
+ rootBoundary: p = "viewport",
235
+ elementContext: f = "floating",
236
+ altBoundary: d = !1,
237
+ padding: u = 0
238
+ } = J(e, t), h = yt(u), g = l[d ? f === "floating" ? "reference" : "floating" : f], w = tt(await r.getClippingRect({
239
+ element: (n = await (r.isElement == null ? void 0 : r.isElement(g))) == null || n ? g : g.contextElement || await (r.getDocumentElement == null ? void 0 : r.getDocumentElement(l.floating)),
240
+ boundary: a,
241
+ rootBoundary: p,
242
+ strategy: c
243
+ })), x = f === "floating" ? {
244
+ x: o,
245
+ y: i,
246
+ width: s.floating.width,
247
+ height: s.floating.height
248
+ } : s.reference, y = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(l.floating)), R = await (r.isElement == null ? void 0 : r.isElement(y)) ? await (r.getScale == null ? void 0 : r.getScale(y)) || {
249
+ x: 1,
250
+ y: 1
251
+ } : {
252
+ x: 1,
253
+ y: 1
254
+ }, b = tt(r.convertOffsetParentRelativeRectToViewportRelativeRect ? await r.convertOffsetParentRelativeRectToViewportRelativeRect({
255
+ elements: l,
256
+ rect: x,
257
+ offsetParent: y,
258
+ strategy: c
259
+ }) : x);
260
+ return {
261
+ top: (w.top - b.top + h.top) / R.y,
262
+ bottom: (b.bottom - w.bottom + h.bottom) / R.y,
263
+ left: (w.left - b.left + h.left) / R.x,
264
+ right: (b.right - w.right + h.right) / R.x
265
+ };
266
+ }
267
+ const we = (t) => ({
268
+ name: "arrow",
269
+ options: t,
270
+ async fn(e) {
271
+ const {
272
+ x: n,
273
+ y: o,
274
+ placement: i,
275
+ rects: r,
276
+ platform: s,
277
+ elements: l,
278
+ middlewareData: c
279
+ } = e, {
280
+ element: a,
281
+ padding: p = 0
282
+ } = J(t, e) || {};
283
+ if (a == null)
284
+ return {};
285
+ const f = yt(p), d = {
286
+ x: n,
287
+ y: o
288
+ }, u = xt(i), h = vt(u), m = await s.getDimensions(a), g = u === "y", w = g ? "top" : "left", x = g ? "bottom" : "right", y = g ? "clientHeight" : "clientWidth", R = r.reference[h] + r.reference[u] - d[u] - r.floating[h], b = d[u] - r.reference[u], P = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(a));
289
+ let O = P ? P[y] : 0;
290
+ (!O || !await (s.isElement == null ? void 0 : s.isElement(P))) && (O = l.floating[y] || r.floating[h]);
291
+ const F = R / 2 - b / 2, S = O / 2 - m[h] / 2 - 1, v = M(f[w], S), A = M(f[x], S), T = v, L = O - m[h] - A, E = O / 2 - m[h] / 2 + F, V = le(T, E, L), B = !c.arrow && H(i) != null && E !== V && r.reference[h] / 2 - (E < T ? v : A) - m[h] / 2 < 0, D = B ? E < T ? E - T : E - L : 0;
292
+ return {
293
+ [u]: d[u] + D,
294
+ data: {
295
+ [u]: V,
296
+ centerOffset: E - V - D,
297
+ ...B && {
298
+ alignmentOffset: D
299
+ }
300
+ },
301
+ reset: B
302
+ };
303
+ }
304
+ });
305
+ function ve(t, e, n) {
306
+ return (t ? [...n.filter((i) => H(i) === t), ...n.filter((i) => H(i) !== t)] : n.filter((i) => _(i) === i)).filter((i) => t ? H(i) === t || (e ? at(i) !== i : !1) : !0);
307
+ }
308
+ const xe = function(t) {
309
+ return t === void 0 && (t = {}), {
310
+ name: "autoPlacement",
311
+ options: t,
312
+ async fn(e) {
313
+ var n, o, i;
314
+ const {
315
+ rects: r,
316
+ middlewareData: s,
317
+ placement: l,
318
+ platform: c,
319
+ elements: a
320
+ } = e, {
321
+ crossAxis: p = !1,
322
+ alignment: f,
323
+ allowedPlacements: d = Ct,
324
+ autoAlignment: u = !0,
325
+ ...h
326
+ } = J(t, e), m = f !== void 0 || d === Ct ? ve(f || null, u, d) : d, g = await ot(e, h), w = ((n = s.autoPlacement) == null ? void 0 : n.index) || 0, x = m[w];
327
+ if (x == null)
328
+ return {};
329
+ const y = Mt(x, r, await (c.isRTL == null ? void 0 : c.isRTL(a.floating)));
330
+ if (l !== x)
331
+ return {
332
+ reset: {
333
+ placement: m[0]
334
+ }
335
+ };
336
+ const R = [g[_(x)], g[y[0]], g[y[1]]], b = [...((o = s.autoPlacement) == null ? void 0 : o.overflows) || [], {
337
+ placement: x,
338
+ overflows: R
339
+ }], P = m[w + 1];
340
+ if (P)
341
+ return {
342
+ data: {
343
+ index: w + 1,
344
+ overflows: b
345
+ },
346
+ reset: {
347
+ placement: P
348
+ }
349
+ };
350
+ const O = b.map((v) => {
351
+ const A = H(v.placement);
352
+ return [v.placement, A && p ? (
353
+ // Check along the mainAxis and main crossAxis side.
354
+ v.overflows.slice(0, 2).reduce((T, L) => T + L, 0)
355
+ ) : (
356
+ // Check only the mainAxis.
357
+ v.overflows[0]
358
+ ), v.overflows];
359
+ }).sort((v, A) => v[1] - A[1]), S = ((i = O.filter((v) => v[2].slice(
360
+ 0,
361
+ // Aligned placements should not check their opposite crossAxis
362
+ // side.
363
+ H(v[0]) ? 2 : 3
364
+ ).every((A) => A <= 0))[0]) == null ? void 0 : i[0]) || O[0][0];
365
+ return S !== l ? {
366
+ data: {
367
+ index: w + 1,
368
+ overflows: b
369
+ },
370
+ reset: {
371
+ placement: S
372
+ }
373
+ } : {};
374
+ }
375
+ };
376
+ }, ye = function(t) {
377
+ return t === void 0 && (t = {}), {
378
+ name: "flip",
379
+ options: t,
380
+ async fn(e) {
381
+ var n, o;
382
+ const {
383
+ placement: i,
384
+ middlewareData: r,
385
+ rects: s,
386
+ initialPlacement: l,
387
+ platform: c,
388
+ elements: a
389
+ } = e, {
390
+ mainAxis: p = !0,
391
+ crossAxis: f = !0,
392
+ fallbackPlacements: d,
393
+ fallbackStrategy: u = "bestFit",
394
+ fallbackAxisSideDirection: h = "none",
395
+ flipAlignment: m = !0,
396
+ ...g
397
+ } = J(t, e);
398
+ if ((n = r.arrow) != null && n.alignmentOffset)
399
+ return {};
400
+ const w = _(i), x = X(l), y = _(l) === l, R = await (c.isRTL == null ? void 0 : c.isRTL(a.floating)), b = d || (y || !m ? [ft(l)] : fe(l)), P = h !== "none";
401
+ !d && P && b.push(...me(l, m, h, R));
402
+ const O = [l, ...b], F = await ot(e, g), S = [];
403
+ let v = ((o = r.flip) == null ? void 0 : o.overflows) || [];
404
+ if (p && S.push(F[w]), f) {
405
+ const E = Mt(i, s, R);
406
+ S.push(F[E[0]], F[E[1]]);
407
+ }
408
+ if (v = [...v, {
409
+ placement: i,
410
+ overflows: S
411
+ }], !S.every((E) => E <= 0)) {
412
+ var A, T;
413
+ const E = (((A = r.flip) == null ? void 0 : A.index) || 0) + 1, V = O[E];
414
+ if (V && (!(f === "alignment" ? x !== X(V) : !1) || // We leave the current main axis only if every placement on that axis
415
+ // overflows the main axis.
416
+ v.every((k) => X(k.placement) === x ? k.overflows[0] > 0 : !0)))
417
+ return {
418
+ data: {
419
+ index: E,
420
+ overflows: v
421
+ },
422
+ reset: {
423
+ placement: V
424
+ }
425
+ };
426
+ let B = (T = v.filter((D) => D.overflows[0] <= 0).sort((D, k) => D.overflows[1] - k.overflows[1])[0]) == null ? void 0 : T.placement;
427
+ if (!B)
428
+ switch (u) {
429
+ case "bestFit": {
430
+ var L;
431
+ const D = (L = v.filter((k) => {
432
+ if (P) {
433
+ const q = X(k.placement);
434
+ return q === x || // Create a bias to the `y` side axis due to horizontal
435
+ // reading directions favoring greater width.
436
+ q === "y";
437
+ }
438
+ return !0;
439
+ }).map((k) => [k.placement, k.overflows.filter((q) => q > 0).reduce((q, qt) => q + qt, 0)]).sort((k, q) => k[1] - q[1])[0]) == null ? void 0 : L[0];
440
+ D && (B = D);
441
+ break;
442
+ }
443
+ case "initialPlacement":
444
+ B = l;
445
+ break;
446
+ }
447
+ if (i !== B)
448
+ return {
449
+ reset: {
450
+ placement: B
451
+ }
452
+ };
453
+ }
454
+ return {};
455
+ }
456
+ };
457
+ };
458
+ function Dt(t, e) {
459
+ return {
460
+ top: t.top - e.height,
461
+ right: t.right - e.width,
462
+ bottom: t.bottom - e.height,
463
+ left: t.left - e.width
464
+ };
465
+ }
466
+ function kt(t) {
467
+ return Ht.some((e) => t[e] >= 0);
468
+ }
469
+ const be = function(t) {
470
+ return t === void 0 && (t = {}), {
471
+ name: "hide",
472
+ options: t,
473
+ async fn(e) {
474
+ const {
475
+ rects: n
476
+ } = e, {
477
+ strategy: o = "referenceHidden",
478
+ ...i
479
+ } = J(t, e);
480
+ switch (o) {
481
+ case "referenceHidden": {
482
+ const r = await ot(e, {
483
+ ...i,
484
+ elementContext: "reference"
485
+ }), s = Dt(r, n.reference);
486
+ return {
487
+ data: {
488
+ referenceHiddenOffsets: s,
489
+ referenceHidden: kt(s)
490
+ }
491
+ };
492
+ }
493
+ case "escaped": {
494
+ const r = await ot(e, {
495
+ ...i,
496
+ altBoundary: !0
497
+ }), s = Dt(r, n.floating);
498
+ return {
499
+ data: {
500
+ escapedOffsets: s,
501
+ escaped: kt(s)
502
+ }
503
+ };
504
+ }
505
+ default:
506
+ return {};
507
+ }
508
+ }
509
+ };
510
+ };
511
+ function _t(t) {
512
+ const e = M(...t.map((r) => r.left)), n = M(...t.map((r) => r.top)), o = C(...t.map((r) => r.right)), i = C(...t.map((r) => r.bottom));
513
+ return {
514
+ x: e,
515
+ y: n,
516
+ width: o - e,
517
+ height: i - n
518
+ };
519
+ }
520
+ function Re(t) {
521
+ const e = t.slice().sort((i, r) => i.y - r.y), n = [];
522
+ let o = null;
523
+ for (let i = 0; i < e.length; i++) {
524
+ const r = e[i];
525
+ !o || r.y - o.y > o.height / 2 ? n.push([r]) : n[n.length - 1].push(r), o = r;
526
+ }
527
+ return n.map((i) => tt(_t(i)));
528
+ }
529
+ const Oe = function(t) {
530
+ return t === void 0 && (t = {}), {
531
+ name: "inline",
532
+ options: t,
533
+ async fn(e) {
534
+ const {
535
+ placement: n,
536
+ elements: o,
537
+ rects: i,
538
+ platform: r,
539
+ strategy: s
540
+ } = e, {
541
+ padding: l = 2,
542
+ x: c,
543
+ y: a
544
+ } = J(t, e), p = Array.from(await (r.getClientRects == null ? void 0 : r.getClientRects(o.reference)) || []), f = Re(p), d = tt(_t(p)), u = yt(l);
545
+ function h() {
546
+ if (f.length === 2 && f[0].left > f[1].right && c != null && a != null)
547
+ return f.find((g) => c > g.left - u.left && c < g.right + u.right && a > g.top - u.top && a < g.bottom + u.bottom) || d;
548
+ if (f.length >= 2) {
549
+ if (X(n) === "y") {
550
+ const v = f[0], A = f[f.length - 1], T = _(n) === "top", L = v.top, E = A.bottom, V = T ? v.left : A.left, B = T ? v.right : A.right, D = B - V, k = E - L;
551
+ return {
552
+ top: L,
553
+ bottom: E,
554
+ left: V,
555
+ right: B,
556
+ width: D,
557
+ height: k,
558
+ x: V,
559
+ y: L
560
+ };
561
+ }
562
+ const g = _(n) === "left", w = C(...f.map((v) => v.right)), x = M(...f.map((v) => v.left)), y = f.filter((v) => g ? v.left === x : v.right === w), R = y[0].top, b = y[y.length - 1].bottom, P = x, O = w, F = O - P, S = b - R;
563
+ return {
564
+ top: R,
565
+ bottom: b,
566
+ left: P,
567
+ right: O,
568
+ width: F,
569
+ height: S,
570
+ x: P,
571
+ y: R
572
+ };
573
+ }
574
+ return d;
575
+ }
576
+ const m = await r.getElementRects({
577
+ reference: {
578
+ getBoundingClientRect: h
579
+ },
580
+ floating: o.floating,
581
+ strategy: s
582
+ });
583
+ return i.reference.x !== m.reference.x || i.reference.y !== m.reference.y || i.reference.width !== m.reference.width || i.reference.height !== m.reference.height ? {
584
+ reset: {
585
+ rects: m
586
+ }
587
+ } : {};
588
+ }
589
+ };
590
+ }, Pe = /* @__PURE__ */ new Set(["left", "top"]);
591
+ async function Ae(t, e) {
592
+ const {
593
+ placement: n,
594
+ platform: o,
595
+ elements: i
596
+ } = t, r = await (o.isRTL == null ? void 0 : o.isRTL(i.floating)), s = _(n), l = H(n), c = X(n) === "y", a = Pe.has(s) ? -1 : 1, p = r && c ? -1 : 1, f = J(e, t);
597
+ let {
598
+ mainAxis: d,
599
+ crossAxis: u,
600
+ alignmentAxis: h
601
+ } = typeof f == "number" ? {
602
+ mainAxis: f,
603
+ crossAxis: 0,
604
+ alignmentAxis: null
605
+ } : {
606
+ mainAxis: f.mainAxis || 0,
607
+ crossAxis: f.crossAxis || 0,
608
+ alignmentAxis: f.alignmentAxis
609
+ };
610
+ return l && typeof h == "number" && (u = l === "end" ? h * -1 : h), c ? {
611
+ x: u * p,
612
+ y: d * a
613
+ } : {
614
+ x: d * a,
615
+ y: u * p
616
+ };
617
+ }
618
+ const Ee = function(t) {
619
+ return t === void 0 && (t = 0), {
620
+ name: "offset",
621
+ options: t,
622
+ async fn(e) {
623
+ var n, o;
624
+ const {
625
+ x: i,
626
+ y: r,
627
+ placement: s,
628
+ middlewareData: l
629
+ } = e, c = await Ae(e, t);
630
+ return s === ((n = l.offset) == null ? void 0 : n.placement) && (o = l.arrow) != null && o.alignmentOffset ? {} : {
631
+ x: i + c.x,
632
+ y: r + c.y,
633
+ data: {
634
+ ...c,
635
+ placement: s
636
+ }
637
+ };
638
+ }
639
+ };
640
+ }, Ce = function(t) {
641
+ return t === void 0 && (t = {}), {
642
+ name: "size",
643
+ options: t,
644
+ async fn(e) {
645
+ var n, o;
646
+ const {
647
+ placement: i,
648
+ rects: r,
649
+ platform: s,
650
+ elements: l
651
+ } = e, {
652
+ apply: c = () => {
653
+ },
654
+ ...a
655
+ } = J(t, e), p = await ot(e, a), f = _(i), d = H(i), u = X(i) === "y", {
656
+ width: h,
657
+ height: m
658
+ } = r.floating;
659
+ let g, w;
660
+ f === "top" || f === "bottom" ? (g = f, w = d === (await (s.isRTL == null ? void 0 : s.isRTL(l.floating)) ? "start" : "end") ? "left" : "right") : (w = f, g = d === "end" ? "top" : "bottom");
661
+ const x = m - p.top - p.bottom, y = h - p.left - p.right, R = M(m - p[g], x), b = M(h - p[w], y), P = !e.middlewareData.shift;
662
+ let O = R, F = b;
663
+ if ((n = e.middlewareData.shift) != null && n.enabled.x && (F = y), (o = e.middlewareData.shift) != null && o.enabled.y && (O = x), P && !d) {
664
+ const v = C(p.left, 0), A = C(p.right, 0), T = C(p.top, 0), L = C(p.bottom, 0);
665
+ u ? F = h - 2 * (v !== 0 || A !== 0 ? v + A : C(p.left, p.right)) : O = m - 2 * (T !== 0 || L !== 0 ? T + L : C(p.top, p.bottom));
666
+ }
667
+ await c({
668
+ ...e,
669
+ availableWidth: F,
670
+ availableHeight: O
671
+ });
672
+ const S = await s.getDimensions(l.floating);
673
+ return h !== S.width || m !== S.height ? {
674
+ reset: {
675
+ rects: !0
676
+ }
677
+ } : {};
678
+ }
679
+ };
680
+ };
681
+ function ut() {
682
+ return typeof window < "u";
683
+ }
684
+ function nt(t) {
685
+ return Nt(t) ? (t.nodeName || "").toLowerCase() : "#document";
686
+ }
687
+ function $(t) {
688
+ var e;
689
+ return (t == null || (e = t.ownerDocument) == null ? void 0 : e.defaultView) || window;
690
+ }
691
+ function Y(t) {
692
+ var e;
693
+ return (e = (Nt(t) ? t.ownerDocument : t.document) || window.document) == null ? void 0 : e.documentElement;
694
+ }
695
+ function Nt(t) {
696
+ return ut() ? t instanceof Node || t instanceof $(t).Node : !1;
697
+ }
698
+ function N(t) {
699
+ return ut() ? t instanceof Element || t instanceof $(t).Element : !1;
700
+ }
701
+ function j(t) {
702
+ return ut() ? t instanceof HTMLElement || t instanceof $(t).HTMLElement : !1;
703
+ }
704
+ function $t(t) {
705
+ return !ut() || typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof $(t).ShadowRoot;
706
+ }
707
+ const Se = /* @__PURE__ */ new Set(["inline", "contents"]);
708
+ function rt(t) {
709
+ const {
710
+ overflow: e,
711
+ overflowX: n,
712
+ overflowY: o,
713
+ display: i
714
+ } = W(t);
715
+ return /auto|scroll|overlay|hidden|clip/.test(e + o + n) && !Se.has(i);
716
+ }
717
+ const Te = /* @__PURE__ */ new Set(["table", "td", "th"]);
718
+ function Le(t) {
719
+ return Te.has(nt(t));
720
+ }
721
+ const De = [":popover-open", ":modal"];
722
+ function pt(t) {
723
+ return De.some((e) => {
724
+ try {
725
+ return t.matches(e);
726
+ } catch {
727
+ return !1;
728
+ }
729
+ });
730
+ }
731
+ const ke = ["transform", "translate", "scale", "rotate", "perspective"], $e = ["transform", "translate", "scale", "rotate", "perspective", "filter"], Fe = ["paint", "layout", "strict", "content"];
732
+ function bt(t) {
733
+ const e = Rt(), n = N(t) ? W(t) : t;
734
+ return ke.some((o) => n[o] ? n[o] !== "none" : !1) || (n.containerType ? n.containerType !== "normal" : !1) || !e && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !e && (n.filter ? n.filter !== "none" : !1) || $e.some((o) => (n.willChange || "").includes(o)) || Fe.some((o) => (n.contain || "").includes(o));
735
+ }
736
+ function Be(t) {
737
+ let e = K(t);
738
+ for (; j(e) && !et(e); ) {
739
+ if (bt(e))
740
+ return e;
741
+ if (pt(e))
742
+ return null;
743
+ e = K(e);
744
+ }
745
+ return null;
746
+ }
747
+ function Rt() {
748
+ return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
749
+ }
750
+ const Ve = /* @__PURE__ */ new Set(["html", "body", "#document"]);
751
+ function et(t) {
752
+ return Ve.has(nt(t));
753
+ }
754
+ function W(t) {
755
+ return $(t).getComputedStyle(t);
756
+ }
757
+ function dt(t) {
758
+ return N(t) ? {
759
+ scrollLeft: t.scrollLeft,
760
+ scrollTop: t.scrollTop
761
+ } : {
762
+ scrollLeft: t.scrollX,
763
+ scrollTop: t.scrollY
764
+ };
765
+ }
766
+ function K(t) {
767
+ if (nt(t) === "html")
768
+ return t;
769
+ const e = (
770
+ // Step into the shadow DOM of the parent of a slotted node.
771
+ t.assignedSlot || // DOM Element detected.
772
+ t.parentNode || // ShadowRoot detected.
773
+ $t(t) && t.host || // Fallback.
774
+ Y(t)
775
+ );
776
+ return $t(e) ? e.host : e;
777
+ }
778
+ function Wt(t) {
779
+ const e = K(t);
780
+ return et(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : j(e) && rt(e) ? e : Wt(e);
781
+ }
782
+ function it(t, e, n) {
783
+ var o;
784
+ e === void 0 && (e = []), n === void 0 && (n = !0);
785
+ const i = Wt(t), r = i === ((o = t.ownerDocument) == null ? void 0 : o.body), s = $(i);
786
+ if (r) {
787
+ const l = wt(s);
788
+ return e.concat(s, s.visualViewport || [], rt(i) ? i : [], l && n ? it(l) : []);
789
+ }
790
+ return e.concat(i, it(i, [], n));
791
+ }
792
+ function wt(t) {
793
+ return t.parent && Object.getPrototypeOf(t.parent) ? t.frameElement : null;
794
+ }
795
+ function zt(t) {
796
+ const e = W(t);
797
+ let n = parseFloat(e.width) || 0, o = parseFloat(e.height) || 0;
798
+ const i = j(t), r = i ? t.offsetWidth : n, s = i ? t.offsetHeight : o, l = ct(n) !== r || ct(o) !== s;
799
+ return l && (n = r, o = s), {
800
+ width: n,
801
+ height: o,
802
+ $: l
803
+ };
804
+ }
805
+ function Ot(t) {
806
+ return N(t) ? t : t.contextElement;
807
+ }
808
+ function Z(t) {
809
+ const e = Ot(t);
810
+ if (!j(e))
811
+ return z(1);
812
+ const n = e.getBoundingClientRect(), {
813
+ width: o,
814
+ height: i,
815
+ $: r
816
+ } = zt(e);
817
+ let s = (r ? ct(n.width) : n.width) / o, l = (r ? ct(n.height) : n.height) / i;
818
+ return (!s || !Number.isFinite(s)) && (s = 1), (!l || !Number.isFinite(l)) && (l = 1), {
819
+ x: s,
820
+ y: l
821
+ };
822
+ }
823
+ const He = /* @__PURE__ */ z(0);
824
+ function jt(t) {
825
+ const e = $(t);
826
+ return !Rt() || !e.visualViewport ? He : {
827
+ x: e.visualViewport.offsetLeft,
828
+ y: e.visualViewport.offsetTop
829
+ };
830
+ }
831
+ function Me(t, e, n) {
832
+ return e === void 0 && (e = !1), !n || e && n !== $(t) ? !1 : e;
833
+ }
834
+ function Q(t, e, n, o) {
835
+ e === void 0 && (e = !1), n === void 0 && (n = !1);
836
+ const i = t.getBoundingClientRect(), r = Ot(t);
837
+ let s = z(1);
838
+ e && (o ? N(o) && (s = Z(o)) : s = Z(t));
839
+ const l = Me(r, n, o) ? jt(r) : z(0);
840
+ let c = (i.left + l.x) / s.x, a = (i.top + l.y) / s.y, p = i.width / s.x, f = i.height / s.y;
841
+ if (r) {
842
+ const d = $(r), u = o && N(o) ? $(o) : o;
843
+ let h = d, m = wt(h);
844
+ for (; m && o && u !== h; ) {
845
+ const g = Z(m), w = m.getBoundingClientRect(), x = W(m), y = w.left + (m.clientLeft + parseFloat(x.paddingLeft)) * g.x, R = w.top + (m.clientTop + parseFloat(x.paddingTop)) * g.y;
846
+ c *= g.x, a *= g.y, p *= g.x, f *= g.y, c += y, a += R, h = $(m), m = wt(h);
847
+ }
848
+ }
849
+ return tt({
850
+ width: p,
851
+ height: f,
852
+ x: c,
853
+ y: a
854
+ });
855
+ }
856
+ function Pt(t, e) {
857
+ const n = dt(t).scrollLeft;
858
+ return e ? e.left + n : Q(Y(t)).left + n;
859
+ }
860
+ function Yt(t, e, n) {
861
+ n === void 0 && (n = !1);
862
+ const o = t.getBoundingClientRect(), i = o.left + e.scrollLeft - (n ? 0 : (
863
+ // RTL <body> scrollbar.
864
+ Pt(t, o)
865
+ )), r = o.top + e.scrollTop;
866
+ return {
867
+ x: i,
868
+ y: r
869
+ };
870
+ }
871
+ function _e(t) {
872
+ let {
873
+ elements: e,
874
+ rect: n,
875
+ offsetParent: o,
876
+ strategy: i
877
+ } = t;
878
+ const r = i === "fixed", s = Y(o), l = e ? pt(e.floating) : !1;
879
+ if (o === s || l && r)
880
+ return n;
881
+ let c = {
882
+ scrollLeft: 0,
883
+ scrollTop: 0
884
+ }, a = z(1);
885
+ const p = z(0), f = j(o);
886
+ if ((f || !f && !r) && ((nt(o) !== "body" || rt(s)) && (c = dt(o)), j(o))) {
887
+ const u = Q(o);
888
+ a = Z(o), p.x = u.x + o.clientLeft, p.y = u.y + o.clientTop;
889
+ }
890
+ const d = s && !f && !r ? Yt(s, c, !0) : z(0);
891
+ return {
892
+ width: n.width * a.x,
893
+ height: n.height * a.y,
894
+ x: n.x * a.x - c.scrollLeft * a.x + p.x + d.x,
895
+ y: n.y * a.y - c.scrollTop * a.y + p.y + d.y
896
+ };
897
+ }
898
+ function Ne(t) {
899
+ return Array.from(t.getClientRects());
900
+ }
901
+ function We(t) {
902
+ const e = Y(t), n = dt(t), o = t.ownerDocument.body, i = C(e.scrollWidth, e.clientWidth, o.scrollWidth, o.clientWidth), r = C(e.scrollHeight, e.clientHeight, o.scrollHeight, o.clientHeight);
903
+ let s = -n.scrollLeft + Pt(t);
904
+ const l = -n.scrollTop;
905
+ return W(o).direction === "rtl" && (s += C(e.clientWidth, o.clientWidth) - i), {
906
+ width: i,
907
+ height: r,
908
+ x: s,
909
+ y: l
910
+ };
911
+ }
912
+ function ze(t, e) {
913
+ const n = $(t), o = Y(t), i = n.visualViewport;
914
+ let r = o.clientWidth, s = o.clientHeight, l = 0, c = 0;
915
+ if (i) {
916
+ r = i.width, s = i.height;
917
+ const a = Rt();
918
+ (!a || a && e === "fixed") && (l = i.offsetLeft, c = i.offsetTop);
919
+ }
920
+ return {
921
+ width: r,
922
+ height: s,
923
+ x: l,
924
+ y: c
925
+ };
926
+ }
927
+ const je = /* @__PURE__ */ new Set(["absolute", "fixed"]);
928
+ function Ye(t, e) {
929
+ const n = Q(t, !0, e === "fixed"), o = n.top + t.clientTop, i = n.left + t.clientLeft, r = j(t) ? Z(t) : z(1), s = t.clientWidth * r.x, l = t.clientHeight * r.y, c = i * r.x, a = o * r.y;
930
+ return {
931
+ width: s,
932
+ height: l,
933
+ x: c,
934
+ y: a
935
+ };
936
+ }
937
+ function Ft(t, e, n) {
938
+ let o;
939
+ if (e === "viewport")
940
+ o = ze(t, n);
941
+ else if (e === "document")
942
+ o = We(Y(t));
943
+ else if (N(e))
944
+ o = Ye(e, n);
945
+ else {
946
+ const i = jt(t);
947
+ o = {
948
+ x: e.x - i.x,
949
+ y: e.y - i.y,
950
+ width: e.width,
951
+ height: e.height
952
+ };
953
+ }
954
+ return tt(o);
955
+ }
956
+ function It(t, e) {
957
+ const n = K(t);
958
+ return n === e || !N(n) || et(n) ? !1 : W(n).position === "fixed" || It(n, e);
959
+ }
960
+ function Ie(t, e) {
961
+ const n = e.get(t);
962
+ if (n)
963
+ return n;
964
+ let o = it(t, [], !1).filter((l) => N(l) && nt(l) !== "body"), i = null;
965
+ const r = W(t).position === "fixed";
966
+ let s = r ? K(t) : t;
967
+ for (; N(s) && !et(s); ) {
968
+ const l = W(s), c = bt(s);
969
+ !c && l.position === "fixed" && (i = null), (r ? !c && !i : !c && l.position === "static" && !!i && je.has(i.position) || rt(s) && !c && It(t, s)) ? o = o.filter((p) => p !== s) : i = l, s = K(s);
970
+ }
971
+ return e.set(t, o), o;
972
+ }
973
+ function Xe(t) {
974
+ let {
975
+ element: e,
976
+ boundary: n,
977
+ rootBoundary: o,
978
+ strategy: i
979
+ } = t;
980
+ const s = [...n === "clippingAncestors" ? pt(e) ? [] : Ie(e, this._c) : [].concat(n), o], l = s[0], c = s.reduce((a, p) => {
981
+ const f = Ft(e, p, i);
982
+ return a.top = C(f.top, a.top), a.right = M(f.right, a.right), a.bottom = M(f.bottom, a.bottom), a.left = C(f.left, a.left), a;
983
+ }, Ft(e, l, i));
984
+ return {
985
+ width: c.right - c.left,
986
+ height: c.bottom - c.top,
987
+ x: c.left,
988
+ y: c.top
989
+ };
990
+ }
991
+ function Ue(t) {
992
+ const {
993
+ width: e,
994
+ height: n
995
+ } = zt(t);
996
+ return {
997
+ width: e,
998
+ height: n
999
+ };
1000
+ }
1001
+ function qe(t, e, n) {
1002
+ const o = j(e), i = Y(e), r = n === "fixed", s = Q(t, !0, r, e);
1003
+ let l = {
1004
+ scrollLeft: 0,
1005
+ scrollTop: 0
1006
+ };
1007
+ const c = z(0);
1008
+ function a() {
1009
+ c.x = Pt(i);
1010
+ }
1011
+ if (o || !o && !r)
1012
+ if ((nt(e) !== "body" || rt(i)) && (l = dt(e)), o) {
1013
+ const u = Q(e, !0, r, e);
1014
+ c.x = u.x + e.clientLeft, c.y = u.y + e.clientTop;
1015
+ } else i && a();
1016
+ r && !o && i && a();
1017
+ const p = i && !o && !r ? Yt(i, l) : z(0), f = s.left + l.scrollLeft - c.x - p.x, d = s.top + l.scrollTop - c.y - p.y;
1018
+ return {
1019
+ x: f,
1020
+ y: d,
1021
+ width: s.width,
1022
+ height: s.height
1023
+ };
1024
+ }
1025
+ function gt(t) {
1026
+ return W(t).position === "static";
1027
+ }
1028
+ function Bt(t, e) {
1029
+ if (!j(t) || W(t).position === "fixed")
1030
+ return null;
1031
+ if (e)
1032
+ return e(t);
1033
+ let n = t.offsetParent;
1034
+ return Y(t) === n && (n = n.ownerDocument.body), n;
1035
+ }
1036
+ function Xt(t, e) {
1037
+ const n = $(t);
1038
+ if (pt(t))
1039
+ return n;
1040
+ if (!j(t)) {
1041
+ let i = K(t);
1042
+ for (; i && !et(i); ) {
1043
+ if (N(i) && !gt(i))
1044
+ return i;
1045
+ i = K(i);
1046
+ }
1047
+ return n;
1048
+ }
1049
+ let o = Bt(t, e);
1050
+ for (; o && Le(o) && gt(o); )
1051
+ o = Bt(o, e);
1052
+ return o && et(o) && gt(o) && !bt(o) ? n : o || Be(t) || n;
1053
+ }
1054
+ const Ke = async function(t) {
1055
+ const e = this.getOffsetParent || Xt, n = this.getDimensions, o = await n(t.floating);
1056
+ return {
1057
+ reference: qe(t.reference, await e(t.floating), t.strategy),
1058
+ floating: {
1059
+ x: 0,
1060
+ y: 0,
1061
+ width: o.width,
1062
+ height: o.height
1063
+ }
1064
+ };
1065
+ };
1066
+ function Ge(t) {
1067
+ return W(t).direction === "rtl";
1068
+ }
1069
+ const Je = {
1070
+ convertOffsetParentRelativeRectToViewportRelativeRect: _e,
1071
+ getDocumentElement: Y,
1072
+ getClippingRect: Xe,
1073
+ getOffsetParent: Xt,
1074
+ getElementRects: Ke,
1075
+ getClientRects: Ne,
1076
+ getDimensions: Ue,
1077
+ getScale: Z,
1078
+ isElement: N,
1079
+ isRTL: Ge
1080
+ };
1081
+ function Ut(t, e) {
1082
+ return t.x === e.x && t.y === e.y && t.width === e.width && t.height === e.height;
1083
+ }
1084
+ function Qe(t, e) {
1085
+ let n = null, o;
1086
+ const i = Y(t);
1087
+ function r() {
1088
+ var l;
1089
+ clearTimeout(o), (l = n) == null || l.disconnect(), n = null;
1090
+ }
1091
+ function s(l, c) {
1092
+ l === void 0 && (l = !1), c === void 0 && (c = 1), r();
1093
+ const a = t.getBoundingClientRect(), {
1094
+ left: p,
1095
+ top: f,
1096
+ width: d,
1097
+ height: u
1098
+ } = a;
1099
+ if (l || e(), !d || !u)
1100
+ return;
1101
+ const h = st(f), m = st(i.clientWidth - (p + d)), g = st(i.clientHeight - (f + u)), w = st(p), y = {
1102
+ rootMargin: -h + "px " + -m + "px " + -g + "px " + -w + "px",
1103
+ threshold: C(0, M(1, c)) || 1
1104
+ };
1105
+ let R = !0;
1106
+ function b(P) {
1107
+ const O = P[0].intersectionRatio;
1108
+ if (O !== c) {
1109
+ if (!R)
1110
+ return s();
1111
+ O ? s(!1, O) : o = setTimeout(() => {
1112
+ s(!1, 1e-7);
1113
+ }, 1e3);
1114
+ }
1115
+ O === 1 && !Ut(a, t.getBoundingClientRect()) && s(), R = !1;
1116
+ }
1117
+ try {
1118
+ n = new IntersectionObserver(b, {
1119
+ ...y,
1120
+ // Handle <iframe>s
1121
+ root: i.ownerDocument
1122
+ });
1123
+ } catch {
1124
+ n = new IntersectionObserver(b, y);
1125
+ }
1126
+ n.observe(t);
1127
+ }
1128
+ return s(!0), r;
1129
+ }
1130
+ function Ze(t, e, n, o) {
1131
+ o === void 0 && (o = {});
1132
+ const {
1133
+ ancestorScroll: i = !0,
1134
+ ancestorResize: r = !0,
1135
+ elementResize: s = typeof ResizeObserver == "function",
1136
+ layoutShift: l = typeof IntersectionObserver == "function",
1137
+ animationFrame: c = !1
1138
+ } = o, a = Ot(t), p = i || r ? [...a ? it(a) : [], ...it(e)] : [];
1139
+ p.forEach((w) => {
1140
+ i && w.addEventListener("scroll", n, {
1141
+ passive: !0
1142
+ }), r && w.addEventListener("resize", n);
1143
+ });
1144
+ const f = a && l ? Qe(a, n) : null;
1145
+ let d = -1, u = null;
1146
+ s && (u = new ResizeObserver((w) => {
1147
+ let [x] = w;
1148
+ x && x.target === a && u && (u.unobserve(e), cancelAnimationFrame(d), d = requestAnimationFrame(() => {
1149
+ var y;
1150
+ (y = u) == null || y.observe(e);
1151
+ })), n();
1152
+ }), a && !c && u.observe(a), u.observe(e));
1153
+ let h, m = c ? Q(t) : null;
1154
+ c && g();
1155
+ function g() {
1156
+ const w = Q(t);
1157
+ m && !Ut(m, w) && n(), m = w, h = requestAnimationFrame(g);
1158
+ }
1159
+ return n(), () => {
1160
+ var w;
1161
+ p.forEach((x) => {
1162
+ i && x.removeEventListener("scroll", n), r && x.removeEventListener("resize", n);
1163
+ }), f?.(), (w = u) == null || w.disconnect(), u = null, c && cancelAnimationFrame(h);
1164
+ };
1165
+ }
1166
+ const tn = Ee, Vt = xe, en = ye, nn = Ce, on = be, rn = we, sn = Oe, ln = (t, e, n) => {
1167
+ const o = /* @__PURE__ */ new Map(), i = {
1168
+ platform: Je,
1169
+ ...n
1170
+ }, r = {
1171
+ ...i.platform,
1172
+ _c: o
1173
+ };
1174
+ return ge(t, e, {
1175
+ ...i,
1176
+ platform: r
1177
+ });
1178
+ };
1179
+ var cn = Object.defineProperty, U = (t, e, n, o) => {
1180
+ for (var i = void 0, r = t.length - 1, s; r >= 0; r--)
1181
+ (s = t[r]) && (i = s(e, n, i) || i);
1182
+ return i && cn(e, n, i), i;
1183
+ };
1184
+ const lt = {
1185
+ Flip: "flip",
1186
+ AutoPlacementHorizontal: "auto-placement-horizontal",
1187
+ AutoPlacementVertical: "auto-placement-vertical"
1188
+ }, an = {
1189
+ [lt.Flip]: en(),
1190
+ [lt.AutoPlacementHorizontal]: Vt({
1191
+ allowedPlacements: [
1192
+ "bottom",
1193
+ "top",
1194
+ "bottom-start",
1195
+ "bottom-end",
1196
+ "top-start",
1197
+ "top-end"
1198
+ ]
1199
+ }),
1200
+ [lt.AutoPlacementVertical]: Vt({
1201
+ allowedPlacements: [
1202
+ "left",
1203
+ "right",
1204
+ "left-start",
1205
+ "left-end",
1206
+ "right-start",
1207
+ "right-end"
1208
+ ]
1209
+ })
1210
+ };
1211
+ class I extends Zt {
1212
+ constructor() {
1213
+ super(...arguments), this.open = !1, this.dismissible = !1, this.arrow = !1, this.alternate = !1, this.placementStrategy = lt.Flip, this.animationFrame = !1, this.strategy = "fixed", this.offset = null, this.#i = () => (this.#n = this.updatePosition(), this.#n);
1214
+ }
1215
+ get #r() {
1216
+ let e = [
1217
+ sn(),
1218
+ an[this.placementStrategy],
1219
+ on(),
1220
+ nn({
1221
+ apply({ availableWidth: o, availableHeight: i, elements: r }) {
1222
+ Object.assign(r.floating.style, {
1223
+ maxWidth: `${o}px`,
1224
+ maxHeight: `${i}px`
1225
+ });
1226
+ }
1227
+ })
1228
+ ], n = this.offset ?? 0;
1229
+ return this.arrow && (n += 12, e = [
1230
+ ...e,
1231
+ rn({ element: this.arrowEl, padding: 10 })
1232
+ ]), n > 0 && e.unshift(tn(n)), e;
1233
+ }
1234
+ #o;
1235
+ openChanged(e, n) {
1236
+ this.#e(), this.#t(), this.$emit(n ? "vwc-popup:open" : "vwc-popup:close");
1237
+ }
1238
+ /**
1239
+ * @internal
1240
+ */
1241
+ animationFrameChanged() {
1242
+ this.#t();
1243
+ }
1244
+ /**
1245
+ * @internal
1246
+ */
1247
+ anchorChanged() {
1248
+ this.#t();
1249
+ }
1250
+ /**
1251
+ * @internal
1252
+ */
1253
+ strategyChanged() {
1254
+ this.#e();
1255
+ }
1256
+ connectedCallback() {
1257
+ super.connectedCallback(), this.#e(), this.#t();
1258
+ }
1259
+ disconnectedCallback() {
1260
+ super.disconnectedCallback(), this.#t();
1261
+ }
1262
+ #t() {
1263
+ this.#o?.(), this.open && this.controlEl && this.controlEl.classList.add("open"), this.anchorEl && this.open && this.popupEl && (this.#o = Ze(
1264
+ this.anchorEl,
1265
+ this.popupEl,
1266
+ this.#i,
1267
+ {
1268
+ animationFrame: this.animationFrame
1269
+ }
1270
+ ));
1271
+ }
1272
+ #e() {
1273
+ this.popupEl && this.strategy === "fixed" && (this.open ? this.popupEl.showPopover() : this.popupEl.hidePopover());
1274
+ }
1275
+ #n;
1276
+ #i;
1277
+ /**
1278
+ * Updates popup's position
1279
+ *
1280
+ * @public
1281
+ */
1282
+ async updatePosition() {
1283
+ if (!this.open || !this.anchorEl)
1284
+ return;
1285
+ const e = await ln(this.anchorEl, this.popupEl, {
1286
+ placement: this.placement,
1287
+ strategy: this.strategy,
1288
+ middleware: this.#r
1289
+ });
1290
+ this.#s(e), this.arrow && this.#l(e);
1291
+ }
1292
+ #s(e) {
1293
+ const { x: n, y: o } = e, { referenceHidden: i } = e.middlewareData.hide;
1294
+ Object.assign(this.popupEl.style, {
1295
+ left: `${n}px`,
1296
+ top: `${o}px`,
1297
+ visibility: i ? "hidden" : "visible"
1298
+ });
1299
+ }
1300
+ #l(e) {
1301
+ const { x: n, y: o } = e.middlewareData.arrow, i = {
1302
+ left: "calc(100% - 4px)",
1303
+ right: "-4px",
1304
+ top: "calc(100% - 4px)",
1305
+ bottom: "-4px"
1306
+ }, r = e.placement.split("-")[0];
1307
+ Object.assign(this.arrowEl.style, {
1308
+ left: n ? `${n}px` : i[r],
1309
+ top: o ? `${o}px` : i[r]
1310
+ });
1311
+ }
1312
+ get anchorEl() {
1313
+ return this.anchor ?? null;
1314
+ }
1315
+ /**
1316
+ * Shows the popup.
1317
+ * Unlike toggling the `open` attribute, show() will wait for the popup to become visible and positioned correctly.
1318
+ */
1319
+ show() {
1320
+ return this.open = !0, this.#n ?? Promise.resolve();
1321
+ }
1322
+ hide() {
1323
+ this.open = !1;
1324
+ }
1325
+ }
1326
+ U([
1327
+ G({
1328
+ mode: "boolean"
1329
+ })
1330
+ ], I.prototype, "open");
1331
+ U([
1332
+ G({
1333
+ mode: "boolean"
1334
+ })
1335
+ ], I.prototype, "dismissible");
1336
+ U([
1337
+ G({
1338
+ mode: "boolean"
1339
+ })
1340
+ ], I.prototype, "arrow");
1341
+ U([
1342
+ G({
1343
+ mode: "boolean"
1344
+ })
1345
+ ], I.prototype, "alternate");
1346
+ U([
1347
+ G({ mode: "fromView" })
1348
+ ], I.prototype, "placement");
1349
+ U([
1350
+ G({ mode: "boolean", attribute: "animation-frame" })
1351
+ ], I.prototype, "animationFrame");
1352
+ U([
1353
+ G({ mode: "fromView" })
1354
+ ], I.prototype, "strategy");
1355
+ U([
1356
+ G({ attribute: "offset", converter: te })
1357
+ ], I.prototype, "offset");
1358
+ U([
1359
+ ee
1360
+ ], I.prototype, "anchor");
1361
+ const fn = ":host{display:var(--_popup-display, inline)}.control{border-radius:inherit;background:var(--vvd-color-surface-4dp);contain:layout}.control:not(.open){display:none}.popup-wrapper{white-space:initial;--scrollbar-track-color: transparent;--scrollbar-thumb-color: color-mix(in srgb, var(--vvd-color-neutral-950), transparent 70%)}.popup-wrapper{scrollbar-color:var(--scrollbar-thumb-color) var(--scrollbar-track-color);scrollbar-width:thin}.popup-wrapper ::-webkit-scrollbar{width:4px}.popup-wrapper ::-webkit-scrollbar-track{background:var(--scrollbar-track-color)}.popup-wrapper ::-webkit-scrollbar-thumb{border:0;border-radius:4px;background-color:var(--scrollbar-fallback-track-color, var(--scrollbar-thumb-color))}.popup-wrapper{z-index:var(--_popup-z-index, 10);overflow:visible;padding:0;border:none;border-radius:8px;margin:0;inline-size:max-content}.popup-wrapper:not(.absolute){position:fixed}.popup-wrapper.absolute{position:absolute;top:0;left:0}.popup-content{display:grid;color:var(--vvd-color-canvas-text)}.dismissible .popup-content{align-content:start;grid-template-columns:1fr auto}.arrow{position:absolute;z-index:-1;width:8px;height:8px;background:var(--vvd-color-surface-4dp);transform:rotate(45deg)}.dismissible-button{align-self:flex-start;margin-block-start:4px;margin-inline-end:4px}", un = ({ open: t, dismissible: e, alternate: n }) => ie(
1362
+ "control",
1363
+ ["open", !!t],
1364
+ ["dismissible", !!e],
1365
+ ["alternate", !!n]
1366
+ );
1367
+ function pn(t) {
1368
+ return t.strategy && t.strategy === "fixed" ? "manual" : null;
1369
+ }
1370
+ const dn = (t) => {
1371
+ const e = t.tagFor(Jt), n = t.tagFor(Kt);
1372
+ return mt`
1373
+ <${e}>
1374
+ <div popover="${pn}" class="popup-wrapper ${(o) => o.strategy}" ${ht("popupEl")} part="popup-base">
1375
+ <div ${ht("controlEl")} class="${un}" aria-hidden="${(o) => o.open ? "false" : "true"}"
1376
+ part="${(o) => o.alternate ? "vvd-theme-alternate" : ""}">
1377
+ <div class="popup-content">
1378
+ <slot></slot>
1379
+ ${At(
1380
+ (o) => o.dismissible,
1381
+ mt`<${n} size="condensed" @click="${(o) => o.open = !1}"
1382
+ class="dismissible-button" icon="close-small-solid" shape="pill"></${n}>`
1383
+ )}
1384
+ </div>
1385
+ ${At(
1386
+ (o) => o.arrow,
1387
+ mt`<div class="arrow" ${ht("arrowEl")}></div>`
1388
+ )}
1389
+ </div>
1390
+ </div>
1391
+ </${e}>`;
1392
+ }, mn = oe(
1393
+ "popup",
1394
+ I,
1395
+ dn,
1396
+ [Qt, Gt],
1397
+ {
1398
+ styles: fn
1399
+ }
1400
+ ), bn = ne(mn);
1401
+ export {
1402
+ I as P,
1403
+ lt as a,
1404
+ mn as p,
1405
+ bn as r
1406
+ };