@vonage/vivid 5.15.0 → 5.16.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 (730) hide show
  1. package/README.md +1 -1
  2. package/accordion/definition.cjs +7 -212
  3. package/accordion/definition.js +2 -204
  4. package/accordion/index.cjs +4 -4
  5. package/accordion/index.js +93 -138
  6. package/accordion-item/definition.cjs +6 -146
  7. package/accordion-item/definition.js +2 -139
  8. package/accordion-item/index.cjs +1 -1
  9. package/accordion-item/index.js +6 -2
  10. package/action-group/definition.cjs +5 -69
  11. package/action-group/definition.js +1 -62
  12. package/action-group/index.cjs +4 -4
  13. package/action-group/index.js +16 -46
  14. package/alert/definition.cjs +6 -201
  15. package/alert/definition.js +2 -194
  16. package/alert/index.cjs +15 -15
  17. package/alert/index.js +90 -136
  18. package/audio-player/definition.cjs +6 -463
  19. package/audio-player/definition.js +2 -456
  20. package/audio-player/index.cjs +49 -49
  21. package/audio-player/index.js +234 -308
  22. package/avatar/definition.cjs +6 -117
  23. package/avatar/definition.js +2 -110
  24. package/avatar/index.cjs +14 -14
  25. package/avatar/index.js +44 -84
  26. package/badge/definition.cjs +6 -85
  27. package/badge/definition.js +2 -78
  28. package/badge/index.cjs +4 -4
  29. package/badge/index.js +21 -65
  30. package/banner/definition.cjs +6 -160
  31. package/banner/definition.js +2 -153
  32. package/banner/index.cjs +13 -13
  33. package/banner/index.js +76 -109
  34. package/breadcrumb/definition.cjs +5 -98
  35. package/breadcrumb/definition.js +1 -91
  36. package/breadcrumb/index.cjs +4 -4
  37. package/breadcrumb/index.js +33 -60
  38. package/breadcrumb-item/definition.cjs +7 -47
  39. package/breadcrumb-item/definition.js +3 -40
  40. package/breadcrumb-item/index.cjs +5 -5
  41. package/breadcrumb-item/index.js +20 -32
  42. package/bundled/affix.cjs +10 -10
  43. package/bundled/affix.js +44 -57
  44. package/bundled/anchored.cjs +3 -3
  45. package/bundled/anchored.js +47 -65
  46. package/bundled/aria.cjs +1 -1
  47. package/bundled/aria.js +6 -6
  48. package/bundled/attribute-binding-behaviour.cjs +1 -1
  49. package/bundled/attribute-binding-behaviour.js +17 -30
  50. package/bundled/base-color-picker.cjs +10 -10
  51. package/bundled/base-color-picker.js +115 -202
  52. package/bundled/base-progress.cjs +1 -1
  53. package/bundled/base-progress.js +29 -59
  54. package/bundled/breadcrumb-item.cjs +1 -1
  55. package/bundled/breadcrumb-item.js +11 -20
  56. package/bundled/button.cjs +1 -1
  57. package/bundled/button.js +65 -109
  58. package/bundled/calendar-event.cjs +1 -1
  59. package/bundled/calendar-event.js +11 -34
  60. package/bundled/calendar-picker.template.cjs +77 -77
  61. package/bundled/calendar-picker.template.js +2881 -3297
  62. package/bundled/char-count.cjs +7 -7
  63. package/bundled/char-count.js +31 -46
  64. package/bundled/children.cjs +1 -1
  65. package/bundled/children.js +27 -45
  66. package/bundled/class-names.cjs +1 -1
  67. package/bundled/class-names.js +8 -8
  68. package/bundled/data-grid.options.cjs +1 -1
  69. package/bundled/data-grid.options.js +22 -26
  70. package/bundled/decorate.cjs +1 -0
  71. package/bundled/decorate.js +9 -0
  72. package/bundled/definition.cjs +1 -39
  73. package/bundled/definition.js +5 -122
  74. package/bundled/definition10.cjs +27 -69
  75. package/bundled/definition10.js +173 -362
  76. package/bundled/definition11.cjs +19 -12
  77. package/bundled/definition11.js +77 -93
  78. package/bundled/definition12.cjs +11 -11
  79. package/bundled/definition12.js +122 -217
  80. package/bundled/definition13.cjs +18 -9
  81. package/bundled/definition13.js +76 -42
  82. package/bundled/definition14.cjs +10 -1
  83. package/bundled/definition14.js +28 -19
  84. package/bundled/definition15.cjs +73 -5
  85. package/bundled/definition15.js +194 -28
  86. package/bundled/definition16.cjs +5 -30
  87. package/bundled/definition16.js +16 -79
  88. package/bundled/definition17.cjs +13 -19
  89. package/bundled/definition17.js +81 -105
  90. package/bundled/definition18.cjs +12 -13
  91. package/bundled/definition18.js +67 -147
  92. package/bundled/definition19.cjs +48 -48
  93. package/bundled/definition19.js +365 -699
  94. package/bundled/definition2.cjs +8 -8
  95. package/bundled/definition2.js +80 -124
  96. package/bundled/definition20.cjs +5 -20
  97. package/bundled/definition20.js +11 -106
  98. package/bundled/definition21.cjs +20 -5
  99. package/bundled/definition21.js +57 -18
  100. package/bundled/definition22.cjs +16 -16
  101. package/bundled/definition22.js +79 -141
  102. package/bundled/definition3.cjs +1 -29
  103. package/bundled/definition3.js +183 -195
  104. package/bundled/definition4.cjs +39 -6
  105. package/bundled/definition4.js +71 -41
  106. package/bundled/definition5.cjs +30 -1
  107. package/bundled/definition5.js +48 -351
  108. package/bundled/definition6.cjs +28 -30
  109. package/bundled/definition6.js +110 -265
  110. package/bundled/definition7.cjs +6 -30
  111. package/bundled/definition7.js +22 -291
  112. package/bundled/definition8.cjs +13 -18
  113. package/bundled/definition8.js +150 -143
  114. package/bundled/definition9.cjs +29 -13
  115. package/bundled/definition9.js +157 -232
  116. package/bundled/delegates-aria.cjs +1 -1
  117. package/bundled/delegates-aria.js +56 -90
  118. package/bundled/dialog.cjs +1 -0
  119. package/bundled/dialog.js +6 -0
  120. package/bundled/divider.cjs +1 -1
  121. package/bundled/divider.js +16 -33
  122. package/bundled/dom.cjs +1 -1
  123. package/bundled/dom.js +5 -5
  124. package/bundled/enums.cjs +1 -1
  125. package/bundled/enums.js +16 -9
  126. package/bundled/floating-ui.dom.cjs +1 -1
  127. package/bundled/floating-ui.dom.js +953 -1234
  128. package/bundled/form-associated.cjs +1 -1
  129. package/bundled/form-associated.js +165 -327
  130. package/bundled/form-element.cjs +1 -1
  131. package/bundled/form-element.js +33 -55
  132. package/bundled/host-semantics.cjs +1 -1
  133. package/bundled/host-semantics.js +46 -69
  134. package/bundled/key-codes.cjs +1 -1
  135. package/bundled/key-codes.js +4 -16
  136. package/bundled/linkable.cjs +6 -6
  137. package/bundled/linkable.js +25 -45
  138. package/bundled/listbox.cjs +1 -1
  139. package/bundled/listbox.js +176 -368
  140. package/bundled/localized.cjs +1 -1
  141. package/bundled/localized.js +451 -564
  142. package/bundled/mixins.cjs +20 -20
  143. package/bundled/mixins.js +162 -213
  144. package/bundled/normalize.cjs +1 -1
  145. package/bundled/normalize.js +6 -6
  146. package/bundled/numbers.cjs +1 -1
  147. package/bundled/numbers.js +9 -11
  148. package/bundled/picker-field.template.cjs +23 -23
  149. package/bundled/picker-field.template.js +108 -172
  150. package/bundled/playbackRates.cjs +1 -1
  151. package/bundled/playbackRates.js +10 -10
  152. package/bundled/ref.cjs +1 -1
  153. package/bundled/ref.js +10 -14
  154. package/bundled/repeat.cjs +1 -1
  155. package/bundled/repeat.js +421 -552
  156. package/bundled/scrollIntoView.cjs +1 -1
  157. package/bundled/scrollIntoView.js +26 -32
  158. package/bundled/single-date-picker.cjs +1 -1
  159. package/bundled/single-date-picker.js +23 -38
  160. package/bundled/single-value-picker.cjs +1 -1
  161. package/bundled/single-value-picker.js +58 -86
  162. package/bundled/slider.template.cjs +13 -13
  163. package/bundled/slider.template.js +67 -78
  164. package/bundled/slottable-request.cjs +4 -4
  165. package/bundled/slottable-request.js +1937 -2904
  166. package/bundled/slotted.cjs +1 -1
  167. package/bundled/slotted.js +47 -97
  168. package/bundled/strings.cjs +1 -1
  169. package/bundled/strings.js +6 -6
  170. package/bundled/text-field.cjs +1 -1
  171. package/bundled/text-field.js +4 -4
  172. package/bundled/time-selection-picker.template.cjs +26 -26
  173. package/bundled/time-selection-picker.template.js +355 -555
  174. package/bundled/trapped-focus.cjs +1 -1
  175. package/bundled/trapped-focus.js +18 -25
  176. package/bundled/vivid-element.cjs +4 -5
  177. package/bundled/vivid-element.js +1778 -2794
  178. package/bundled/when.cjs +1 -1
  179. package/bundled/when.js +10 -10
  180. package/bundled/with-contextual-help.cjs +1 -1
  181. package/bundled/with-contextual-help.js +15 -31
  182. package/bundled/with-error-text.cjs +1 -1
  183. package/bundled/with-error-text.js +25 -38
  184. package/bundled/with-success-text.cjs +1 -1
  185. package/bundled/with-success-text.js +8 -15
  186. package/button/definition.cjs +6 -14
  187. package/button/definition.js +3 -4
  188. package/button/index.cjs +1 -1
  189. package/button/index.js +6 -2
  190. package/calendar/definition.cjs +5 -360
  191. package/calendar/definition.js +1 -353
  192. package/calendar/index.cjs +20 -20
  193. package/calendar/index.js +346 -403
  194. package/calendar-event/definition.cjs +6 -58
  195. package/calendar-event/definition.js +2 -51
  196. package/calendar-event/index.cjs +7 -7
  197. package/calendar-event/index.js +25 -41
  198. package/card/definition.cjs +6 -194
  199. package/card/definition.js +2 -187
  200. package/card/index.cjs +34 -34
  201. package/card/index.js +80 -133
  202. package/checkbox/definition.cjs +6 -210
  203. package/checkbox/definition.js +2 -203
  204. package/checkbox/index.cjs +1 -1
  205. package/checkbox/index.js +6 -2
  206. package/color-picker/definition.cjs +6 -1180
  207. package/color-picker/definition.js +2 -1173
  208. package/color-picker/index.cjs +94 -94
  209. package/color-picker/index.js +605 -742
  210. package/combobox/definition.cjs +6 -653
  211. package/combobox/definition.js +2 -646
  212. package/combobox/index.cjs +37 -37
  213. package/combobox/index.js +254 -465
  214. package/contextual-help/definition.cjs +6 -63
  215. package/contextual-help/definition.js +2 -56
  216. package/contextual-help/index.cjs +1 -1
  217. package/contextual-help/index.js +6 -2
  218. package/country/definition.cjs +6 -340
  219. package/country/definition.js +2 -333
  220. package/country/index.cjs +6 -6
  221. package/country/index.js +1209 -308
  222. package/custom-elements.json +550 -1571
  223. package/data-grid/definition.cjs +10 -2363
  224. package/data-grid/definition.js +2 -2352
  225. package/data-grid/index.cjs +61 -61
  226. package/data-grid/index.js +642 -1024
  227. package/date-picker/definition.cjs +6 -152
  228. package/date-picker/definition.js +2 -145
  229. package/date-picker/index.cjs +1 -1
  230. package/date-picker/index.js +66 -114
  231. package/date-range-picker/definition.cjs +6 -469
  232. package/date-range-picker/definition.js +2 -462
  233. package/date-range-picker/index.cjs +1 -1
  234. package/date-range-picker/index.js +218 -338
  235. package/date-time-picker/definition.cjs +6 -285
  236. package/date-time-picker/definition.js +2 -278
  237. package/date-time-picker/index.cjs +4 -4
  238. package/date-time-picker/index.js +116 -211
  239. package/dial-pad/definition.cjs +6 -469
  240. package/dial-pad/definition.js +2 -462
  241. package/dial-pad/index.cjs +42 -42
  242. package/dial-pad/index.js +195 -311
  243. package/dialog/definition.cjs +6 -350
  244. package/dialog/definition.js +2 -343
  245. package/dialog/index.cjs +28 -28
  246. package/dialog/index.js +148 -230
  247. package/divider/definition.cjs +6 -42
  248. package/divider/definition.js +2 -35
  249. package/divider/index.cjs +1 -1
  250. package/divider/index.js +5 -2
  251. package/elevation/definition.cjs +4 -11
  252. package/elevation/definition.js +2 -2
  253. package/elevation/index.cjs +1 -1
  254. package/elevation/index.js +5 -2
  255. package/empty-state/definition.cjs +6 -86
  256. package/empty-state/definition.js +2 -79
  257. package/empty-state/index.cjs +9 -9
  258. package/empty-state/index.js +28 -60
  259. package/fab/definition.cjs +6 -106
  260. package/fab/definition.js +2 -99
  261. package/fab/index.cjs +17 -17
  262. package/fab/index.js +46 -82
  263. package/file-picker/definition.cjs +6 -526
  264. package/file-picker/definition.js +2 -519
  265. package/file-picker/index.cjs +25 -25
  266. package/file-picker/index.js +246 -354
  267. package/header/definition.cjs +5 -78
  268. package/header/definition.js +1 -71
  269. package/header/index.cjs +5 -5
  270. package/header/index.js +28 -42
  271. package/icon/definition.cjs +5 -200
  272. package/icon/definition.js +1 -193
  273. package/icon/index.cjs +1 -1
  274. package/icon/index.js +5 -2
  275. package/index.cjs +350 -356
  276. package/index.js +79 -78
  277. package/layout/definition.cjs +5 -72
  278. package/layout/definition.js +1 -65
  279. package/layout/index.cjs +2 -2
  280. package/layout/index.js +10 -51
  281. package/lib/alert/alert.d.ts +0 -1
  282. package/lib/audio-player/audio-player.d.ts +0 -1
  283. package/lib/banner/banner.d.ts +0 -2
  284. package/lib/button/button.d.ts +0 -1
  285. package/lib/calendar/calendar.d.ts +0 -1
  286. package/lib/card/card.d.ts +0 -2
  287. package/lib/combobox/combobox.d.ts +1 -1
  288. package/lib/data-grid/data-grid-cell.d.ts +0 -3
  289. package/lib/data-grid/data-grid-row.d.ts +0 -3
  290. package/lib/data-grid/data-grid.d.ts +0 -1
  291. package/lib/fab/fab.d.ts +0 -1
  292. package/lib/file-picker/file-picker.d.ts +1 -1
  293. package/lib/icon/icon.d.ts +0 -2
  294. package/lib/menu/menu.d.ts +0 -1
  295. package/lib/menu-item/menu-item.d.ts +0 -1
  296. package/lib/option/option.d.ts +4 -0
  297. package/lib/pagination/pagination.d.ts +0 -7
  298. package/lib/popover/popover.d.ts +0 -5
  299. package/lib/select/select.d.ts +2 -2
  300. package/lib/split-button/split-button.d.ts +0 -2
  301. package/lib/tab/tab.d.ts +0 -2
  302. package/lib/table/table-head.d.ts +1 -0
  303. package/lib/tabs/tabs.d.ts +0 -1
  304. package/lib/tag/tag.d.ts +0 -2
  305. package/lib/text-field/text-field.d.ts +0 -1
  306. package/lib/toggletip/toggletip.d.ts +0 -1
  307. package/lib/tree-item/tree-item.d.ts +0 -2
  308. package/lib/tree-view/tree-view.d.ts +0 -1
  309. package/locales/de-DE.cjs +382 -492
  310. package/locales/de-DE.js +383 -490
  311. package/locales/en-GB.cjs +271 -382
  312. package/locales/en-GB.js +272 -380
  313. package/locales/en-US.cjs +2 -552
  314. package/locales/en-US.js +1 -549
  315. package/locales/ja-JP.cjs +376 -492
  316. package/locales/ja-JP.js +377 -490
  317. package/locales/zh-CN.cjs +378 -495
  318. package/locales/zh-CN.js +379 -493
  319. package/menu/definition.cjs +6 -394
  320. package/menu/definition.js +2 -387
  321. package/menu/index.cjs +1 -1
  322. package/menu/index.js +6 -2
  323. package/menu-item/definition.cjs +7 -14
  324. package/menu-item/definition.js +3 -3
  325. package/menu-item/index.cjs +1 -1
  326. package/menu-item/index.js +6 -2
  327. package/nav/definition.cjs +5 -27
  328. package/nav/definition.js +1 -20
  329. package/nav/index.cjs +3 -3
  330. package/nav/index.js +7 -10
  331. package/nav-disclosure/definition.cjs +6 -122
  332. package/nav-disclosure/definition.js +2 -115
  333. package/nav-disclosure/index.cjs +8 -8
  334. package/nav-disclosure/index.js +49 -86
  335. package/nav-item/definition.cjs +6 -79
  336. package/nav-item/definition.js +2 -72
  337. package/nav-item/index.cjs +2 -2
  338. package/nav-item/index.js +33 -58
  339. package/note/definition.cjs +6 -61
  340. package/note/definition.js +2 -54
  341. package/note/index.cjs +5 -5
  342. package/note/index.js +24 -38
  343. package/number-field/definition.cjs +6 -440
  344. package/number-field/definition.js +2 -433
  345. package/number-field/index.cjs +31 -31
  346. package/number-field/index.js +160 -328
  347. package/option/definition.cjs +6 -13
  348. package/option/definition.js +3 -3
  349. package/option/index.cjs +1 -1
  350. package/option/index.js +6 -2
  351. package/package.json +24 -23
  352. package/pagination/definition.cjs +6 -256
  353. package/pagination/definition.js +2 -249
  354. package/pagination/index.cjs +37 -37
  355. package/pagination/index.js +148 -188
  356. package/popover/definition.cjs +6 -363
  357. package/popover/definition.js +2 -356
  358. package/popover/index.cjs +16 -16
  359. package/popover/index.js +161 -250
  360. package/popup/definition.cjs +5 -13
  361. package/popup/definition.js +3 -4
  362. package/popup/index.cjs +1 -1
  363. package/popup/index.js +6 -2
  364. package/progress/definition.cjs +5 -87
  365. package/progress/definition.js +1 -80
  366. package/progress/index.cjs +9 -9
  367. package/progress/index.js +33 -55
  368. package/progress-ring/definition.cjs +5 -95
  369. package/progress-ring/definition.js +1 -88
  370. package/progress-ring/index.cjs +1 -1
  371. package/progress-ring/index.js +5 -2
  372. package/radio/definition.cjs +5 -231
  373. package/radio/definition.js +1 -224
  374. package/radio/index.cjs +1 -1
  375. package/radio/index.js +5 -2
  376. package/radio-group/definition.cjs +6 -361
  377. package/radio-group/definition.js +2 -354
  378. package/radio-group/index.cjs +10 -10
  379. package/radio-group/index.js +160 -242
  380. package/range-slider/definition.cjs +6 -632
  381. package/range-slider/definition.js +2 -625
  382. package/range-slider/index.cjs +41 -41
  383. package/range-slider/index.js +259 -429
  384. package/rich-text-editor/definition.cjs +32 -15609
  385. package/rich-text-editor/definition.js +2 -15576
  386. package/rich-text-editor/index.cjs +17 -17
  387. package/rich-text-editor/index.js +9061 -11419
  388. package/rich-text-view/definition.cjs +5 -171
  389. package/rich-text-view/definition.js +1 -164
  390. package/rich-text-view/index.cjs +1 -1
  391. package/rich-text-view/index.js +68 -102
  392. package/searchable-select/definition.cjs +5 -1404
  393. package/searchable-select/definition.js +2 -1398
  394. package/searchable-select/index.cjs +94 -94
  395. package/searchable-select/index.js +600 -1019
  396. package/select/definition.cjs +6 -1012
  397. package/select/definition.js +2 -1005
  398. package/select/index.cjs +1 -1
  399. package/select/index.js +6 -2
  400. package/selectable-box/definition.cjs +6 -174
  401. package/selectable-box/definition.js +2 -167
  402. package/selectable-box/index.cjs +18 -18
  403. package/selectable-box/index.js +66 -127
  404. package/side-drawer/definition.cjs +5 -130
  405. package/side-drawer/definition.js +1 -123
  406. package/side-drawer/index.cjs +7 -7
  407. package/side-drawer/index.js +47 -92
  408. package/simple-color-picker/definition.cjs +6 -216
  409. package/simple-color-picker/definition.js +2 -209
  410. package/simple-color-picker/index.cjs +15 -15
  411. package/simple-color-picker/index.js +98 -135
  412. package/slider/definition.cjs +6 -504
  413. package/slider/definition.js +2 -497
  414. package/slider/index.cjs +1 -1
  415. package/slider/index.js +6 -2
  416. package/split-button/definition.cjs +6 -176
  417. package/split-button/definition.js +2 -169
  418. package/split-button/index.cjs +15 -15
  419. package/split-button/index.js +74 -135
  420. package/status/definition.cjs +6 -76
  421. package/status/definition.js +2 -69
  422. package/status/index.cjs +10 -7
  423. package/status/index.js +38 -48
  424. package/styles/core/all.css +6 -5
  425. package/styles/core/theme.css +6 -5
  426. package/styles/core/typography.css +1 -2
  427. package/styles/tokens/theme-dark.css +17 -21
  428. package/styles/tokens/theme-light.css +17 -21
  429. package/styles/tokens/vivid-2-compat.css +1 -2
  430. package/switch/definition.cjs +6 -149
  431. package/switch/definition.js +2 -142
  432. package/switch/index.cjs +8 -8
  433. package/switch/index.js +48 -93
  434. package/tab/definition.cjs +6 -127
  435. package/tab/definition.js +2 -120
  436. package/tab/index.cjs +1 -1
  437. package/tab/index.js +6 -2
  438. package/tab-panel/definition.cjs +5 -29
  439. package/tab-panel/definition.js +1 -22
  440. package/tab-panel/index.cjs +1 -1
  441. package/tab-panel/index.js +5 -2
  442. package/table/definition.cjs +15 -168
  443. package/table/definition.js +1 -151
  444. package/table/index.cjs +20 -16
  445. package/table/index.js +36 -85
  446. package/tabs/definition.cjs +7 -469
  447. package/tabs/definition.js +2 -461
  448. package/tabs/index.cjs +11 -11
  449. package/tabs/index.js +169 -298
  450. package/tag/definition.cjs +6 -176
  451. package/tag/definition.js +2 -169
  452. package/tag/index.cjs +26 -26
  453. package/tag/index.js +65 -126
  454. package/tag-group/definition.cjs +5 -40
  455. package/tag-group/definition.js +1 -33
  456. package/tag-group/index.cjs +4 -4
  457. package/tag-group/index.js +10 -21
  458. package/text-area/definition.cjs +6 -361
  459. package/text-area/definition.js +2 -354
  460. package/text-area/index.cjs +11 -11
  461. package/text-area/index.js +153 -266
  462. package/text-field/definition.cjs +6 -433
  463. package/text-field/definition.js +2 -426
  464. package/text-field/index.cjs +1 -1
  465. package/text-field/index.js +6 -2
  466. package/time-picker/definition.cjs +7 -43
  467. package/time-picker/definition.js +3 -36
  468. package/time-picker/index.cjs +1 -1
  469. package/time-picker/index.js +24 -29
  470. package/toggletip/definition.cjs +6 -161
  471. package/toggletip/definition.js +2 -154
  472. package/toggletip/index.cjs +1 -1
  473. package/toggletip/index.js +6 -2
  474. package/tooltip/definition.cjs +6 -140
  475. package/tooltip/definition.js +2 -133
  476. package/tooltip/index.cjs +1 -1
  477. package/tooltip/index.js +6 -2
  478. package/tree-item/definition.cjs +6 -13
  479. package/tree-item/definition.js +3 -3
  480. package/tree-item/index.cjs +1 -1
  481. package/tree-item/index.js +6 -2
  482. package/tree-view/definition.cjs +6 -318
  483. package/tree-view/definition.js +2 -311
  484. package/tree-view/index.cjs +11 -11
  485. package/tree-view/index.js +145 -190
  486. package/unbundled/affix.cjs +89 -62
  487. package/unbundled/affix.js +58 -55
  488. package/unbundled/anchored.cjs +87 -94
  489. package/unbundled/anchored.js +74 -90
  490. package/unbundled/attribute-binding-behaviour.cjs +37 -43
  491. package/unbundled/attribute-binding-behaviour.js +31 -41
  492. package/unbundled/base-color-picker.cjs +226 -278
  493. package/unbundled/base-color-picker.js +214 -275
  494. package/unbundled/base-progress.cjs +63 -81
  495. package/unbundled/base-progress.js +57 -79
  496. package/unbundled/breadcrumb-item.cjs +24 -28
  497. package/unbundled/breadcrumb-item.js +18 -26
  498. package/unbundled/button.cjs +115 -175
  499. package/unbundled/button.js +109 -173
  500. package/unbundled/calendar-event.cjs +28 -41
  501. package/unbundled/calendar-event.js +22 -39
  502. package/unbundled/calendar-picker.template.cjs +620 -785
  503. package/unbundled/calendar-picker.template.js +560 -774
  504. package/unbundled/char-count.cjs +50 -80
  505. package/unbundled/char-count.js +44 -78
  506. package/unbundled/chunk.cjs +50 -0
  507. package/unbundled/chunk.js +33 -0
  508. package/unbundled/data-grid.options.cjs +80 -29
  509. package/unbundled/data-grid.options.js +51 -23
  510. package/unbundled/decorate.cjs +14 -0
  511. package/unbundled/decorate.js +9 -0
  512. package/unbundled/definition.cjs +42 -226
  513. package/unbundled/definition.js +24 -221
  514. package/unbundled/definition10.cjs +253 -0
  515. package/unbundled/definition10.js +229 -0
  516. package/unbundled/definition11.cjs +397 -0
  517. package/unbundled/definition11.js +379 -0
  518. package/unbundled/definition12.cjs +317 -0
  519. package/unbundled/definition12.js +287 -0
  520. package/unbundled/definition13.cjs +328 -0
  521. package/unbundled/definition13.js +310 -0
  522. package/unbundled/definition14.cjs +406 -0
  523. package/unbundled/definition14.js +388 -0
  524. package/unbundled/definition15.cjs +107 -0
  525. package/unbundled/definition15.js +89 -0
  526. package/unbundled/definition16.cjs +63 -0
  527. package/unbundled/definition16.js +45 -0
  528. package/unbundled/definition17.cjs +151 -0
  529. package/unbundled/definition17.js +133 -0
  530. package/unbundled/definition18.cjs +47 -0
  531. package/unbundled/definition18.js +35 -0
  532. package/unbundled/definition19.cjs +98 -0
  533. package/unbundled/definition19.js +80 -0
  534. package/unbundled/definition2.cjs +179 -401
  535. package/unbundled/definition2.js +161 -395
  536. package/unbundled/definition20.cjs +56 -0
  537. package/unbundled/definition20.js +43 -0
  538. package/unbundled/definition21.cjs +305 -0
  539. package/unbundled/definition21.js +286 -0
  540. package/unbundled/definition22.cjs +174 -0
  541. package/unbundled/definition22.js +156 -0
  542. package/unbundled/definition23.cjs +161 -0
  543. package/unbundled/definition23.js +143 -0
  544. package/unbundled/definition24.cjs +1038 -0
  545. package/unbundled/definition24.js +1020 -0
  546. package/unbundled/definition25.cjs +360 -0
  547. package/unbundled/definition25.js +342 -0
  548. package/unbundled/definition26.cjs +137 -0
  549. package/unbundled/definition26.js +119 -0
  550. package/unbundled/definition27.cjs +235 -0
  551. package/unbundled/definition27.js +211 -0
  552. package/unbundled/definition28.cjs +546 -0
  553. package/unbundled/definition28.js +528 -0
  554. package/unbundled/definition29.cjs +157 -0
  555. package/unbundled/definition29.js +139 -0
  556. package/unbundled/definition3.cjs +131 -285
  557. package/unbundled/definition3.js +113 -280
  558. package/unbundled/definition30.cjs +75 -0
  559. package/unbundled/definition30.js +57 -0
  560. package/unbundled/definition31.cjs +1265 -0
  561. package/unbundled/definition31.js +1247 -0
  562. package/unbundled/definition32.cjs +1908 -0
  563. package/unbundled/definition32.js +1866 -0
  564. package/unbundled/definition33.cjs +261 -0
  565. package/unbundled/definition33.js +183 -0
  566. package/unbundled/definition34.cjs +46 -0
  567. package/unbundled/definition34.js +33 -0
  568. package/unbundled/definition35.cjs +152 -0
  569. package/unbundled/definition35.js +134 -0
  570. package/unbundled/definition36.cjs +426 -0
  571. package/unbundled/definition36.js +408 -0
  572. package/unbundled/definition37.cjs +243 -0
  573. package/unbundled/definition37.js +225 -0
  574. package/unbundled/definition38.cjs +409 -0
  575. package/unbundled/definition38.js +391 -0
  576. package/unbundled/definition39.cjs +298 -0
  577. package/unbundled/definition39.js +280 -0
  578. package/unbundled/definition4.cjs +186 -206
  579. package/unbundled/definition4.js +162 -201
  580. package/unbundled/definition40.cjs +81 -0
  581. package/unbundled/definition40.js +63 -0
  582. package/unbundled/definition41.cjs +100 -0
  583. package/unbundled/definition41.js +82 -0
  584. package/unbundled/definition42.cjs +457 -0
  585. package/unbundled/definition42.js +439 -0
  586. package/unbundled/definition43.cjs +86 -0
  587. package/unbundled/definition43.js +68 -0
  588. package/unbundled/definition44.cjs +60 -0
  589. package/unbundled/definition44.js +41 -0
  590. package/unbundled/definition45.cjs +124 -0
  591. package/unbundled/definition45.js +106 -0
  592. package/unbundled/definition46.cjs +85 -0
  593. package/unbundled/definition46.js +67 -0
  594. package/unbundled/definition47.cjs +52 -0
  595. package/unbundled/definition47.js +31 -0
  596. package/unbundled/definition48.cjs +69 -0
  597. package/unbundled/definition48.js +51 -0
  598. package/unbundled/definition49.cjs +377 -0
  599. package/unbundled/definition49.js +359 -0
  600. package/unbundled/definition5.cjs +69 -298
  601. package/unbundled/definition5.js +44 -293
  602. package/unbundled/definition50.cjs +246 -0
  603. package/unbundled/definition50.js +228 -0
  604. package/unbundled/definition51.cjs +337 -0
  605. package/unbundled/definition51.js +319 -0
  606. package/unbundled/definition52.cjs +86 -0
  607. package/unbundled/definition52.js +67 -0
  608. package/unbundled/definition53.cjs +193 -0
  609. package/unbundled/definition53.js +174 -0
  610. package/unbundled/definition54.cjs +297 -0
  611. package/unbundled/definition54.js +279 -0
  612. package/unbundled/definition55.cjs +510 -0
  613. package/unbundled/definition55.js +492 -0
  614. package/unbundled/definition56.cjs +12728 -0
  615. package/unbundled/definition56.js +12553 -0
  616. package/unbundled/definition57.cjs +837 -0
  617. package/unbundled/definition57.js +819 -0
  618. package/unbundled/definition58.cjs +146 -0
  619. package/unbundled/definition58.js +128 -0
  620. package/unbundled/definition59.cjs +1080 -0
  621. package/unbundled/definition59.js +1062 -0
  622. package/unbundled/definition6.cjs +88 -56
  623. package/unbundled/definition6.js +69 -52
  624. package/unbundled/definition60.cjs +149 -0
  625. package/unbundled/definition60.js +131 -0
  626. package/unbundled/definition61.cjs +116 -0
  627. package/unbundled/definition61.js +97 -0
  628. package/unbundled/definition62.cjs +213 -0
  629. package/unbundled/definition62.js +195 -0
  630. package/unbundled/definition63.cjs +159 -0
  631. package/unbundled/definition63.js +141 -0
  632. package/unbundled/definition64.cjs +86 -0
  633. package/unbundled/definition64.js +68 -0
  634. package/unbundled/definition65.cjs +126 -0
  635. package/unbundled/definition65.js +107 -0
  636. package/unbundled/definition66.cjs +49 -0
  637. package/unbundled/definition66.js +28 -0
  638. package/unbundled/definition67.cjs +119 -0
  639. package/unbundled/definition67.js +101 -0
  640. package/unbundled/definition68.cjs +374 -0
  641. package/unbundled/definition68.js +349 -0
  642. package/unbundled/definition69.cjs +57 -0
  643. package/unbundled/definition69.js +38 -0
  644. package/unbundled/definition7.cjs +190 -0
  645. package/unbundled/definition7.js +166 -0
  646. package/unbundled/definition70.cjs +155 -0
  647. package/unbundled/definition70.js +137 -0
  648. package/unbundled/definition71.cjs +302 -0
  649. package/unbundled/definition71.js +284 -0
  650. package/unbundled/definition72.cjs +49 -0
  651. package/unbundled/definition72.js +38 -0
  652. package/unbundled/definition73.cjs +171 -0
  653. package/unbundled/definition73.js +147 -0
  654. package/unbundled/definition74.cjs +232 -0
  655. package/unbundled/definition74.js +213 -0
  656. package/unbundled/definition75.cjs +52241 -0
  657. package/unbundled/definition75.js +52223 -0
  658. package/unbundled/definition8.cjs +63 -0
  659. package/unbundled/definition8.js +44 -0
  660. package/unbundled/definition9.cjs +183 -0
  661. package/unbundled/definition9.js +165 -0
  662. package/unbundled/delegates-aria.cjs +90 -131
  663. package/unbundled/delegates-aria.js +77 -127
  664. package/unbundled/dialog.cjs +15 -0
  665. package/unbundled/dialog.js +10 -0
  666. package/unbundled/divider.cjs +42 -50
  667. package/unbundled/divider.js +30 -47
  668. package/unbundled/en-US.cjs +447 -0
  669. package/unbundled/en-US.js +443 -0
  670. package/unbundled/enums.cjs +166 -107
  671. package/unbundled/enums.js +95 -94
  672. package/unbundled/form-associated.cjs +408 -464
  673. package/unbundled/form-associated.js +396 -461
  674. package/unbundled/form-element.cjs +74 -83
  675. package/unbundled/form-element.js +68 -81
  676. package/unbundled/host-semantics.cjs +70 -88
  677. package/unbundled/host-semantics.js +57 -84
  678. package/unbundled/key-codes.cjs +16 -10
  679. package/unbundled/key-codes.js +5 -7
  680. package/unbundled/linkable.cjs +35 -56
  681. package/unbundled/linkable.js +27 -52
  682. package/unbundled/listbox.cjs +363 -473
  683. package/unbundled/listbox.js +357 -471
  684. package/unbundled/localized.cjs +79 -74
  685. package/unbundled/localized.js +61 -70
  686. package/unbundled/mixins.cjs +222 -225
  687. package/unbundled/mixins.js +186 -213
  688. package/unbundled/picker-field.template.cjs +188 -218
  689. package/unbundled/picker-field.template.js +165 -209
  690. package/unbundled/playbackRates.cjs +18 -11
  691. package/unbundled/playbackRates.js +13 -9
  692. package/unbundled/scrollIntoView.cjs +38 -44
  693. package/unbundled/scrollIntoView.js +33 -42
  694. package/unbundled/single-date-picker.cjs +48 -45
  695. package/unbundled/single-date-picker.js +43 -43
  696. package/unbundled/single-value-picker.cjs +106 -114
  697. package/unbundled/single-value-picker.js +101 -112
  698. package/unbundled/slider.template.cjs +107 -73
  699. package/unbundled/slider.template.js +67 -62
  700. package/unbundled/slottable-request.cjs +3114 -3503
  701. package/unbundled/slottable-request.js +2995 -3484
  702. package/unbundled/text-field.cjs +9 -5
  703. package/unbundled/text-field.js +4 -3
  704. package/unbundled/time-selection-picker.template.cjs +611 -758
  705. package/unbundled/time-selection-picker.template.js +554 -745
  706. package/unbundled/trapped-focus.cjs +45 -35
  707. package/unbundled/trapped-focus.js +34 -32
  708. package/unbundled/vivid-element.cjs +281 -273
  709. package/unbundled/vivid-element.js +239 -265
  710. package/unbundled/with-contextual-help.cjs +35 -39
  711. package/unbundled/with-contextual-help.js +29 -37
  712. package/unbundled/with-error-text.cjs +45 -55
  713. package/unbundled/with-error-text.js +39 -53
  714. package/unbundled/with-success-text.cjs +18 -22
  715. package/unbundled/with-success-text.js +12 -20
  716. package/video-player/definition.cjs +5 -69602
  717. package/video-player/definition.js +1 -69595
  718. package/video-player/index.cjs +44 -55
  719. package/video-player/index.js +23548 -35488
  720. package/visually-hidden/definition.cjs +5 -30
  721. package/visually-hidden/definition.js +1 -23
  722. package/visually-hidden/index.cjs +1 -1
  723. package/visually-hidden/index.js +5 -2
  724. package/vivid.api.json +197 -2003
  725. package/bundled/index.cjs +0 -1
  726. package/bundled/index.js +0 -6
  727. package/unbundled/_commonjsHelpers.cjs +0 -36
  728. package/unbundled/_commonjsHelpers.js +0 -32
  729. package/unbundled/index.cjs +0 -11
  730. package/unbundled/index.js +0 -9
@@ -1,1124 +1,705 @@
1
- import { B as R, c as z, b as E } from "../bundled/definition3.js";
2
- import { P as L, p as P } from "../bundled/definition9.js";
3
- import { I as M, i as I } from "../bundled/definition2.js";
4
- import { i as B, L as W, l as N } from "../bundled/definition12.js";
5
- import { P as H, p as K } from "../bundled/definition16.js";
6
- import { V as F, O, U as q, a as u, n as A, o as p, h as d, c as U, d as D } from "../bundled/vivid-element.js";
7
- import { W as j, f as G } from "../bundled/mixins.js";
8
- import { d as J } from "../bundled/definition15.js";
9
- import { s as Q } from "../bundled/scrollIntoView.js";
10
- import { D as X, d as Y } from "../bundled/delegates-aria.js";
11
- import { F as Z } from "../bundled/form-associated.js";
12
- import { W as ee } from "../bundled/with-contextual-help.js";
13
- import { W as te } from "../bundled/with-error-text.js";
14
- import { W as ae } from "../bundled/with-success-text.js";
15
- import { F as oe } from "../bundled/form-element.js";
16
- import { A as le, a as se, I as ie } from "../bundled/affix.js";
17
- import { L as V } from "../bundled/localized.js";
18
- import { D as ne } from "../bundled/divider.js";
19
- import { w as v } from "../bundled/when.js";
20
- import { s as T } from "../bundled/slotted.js";
21
- import { r as x } from "../bundled/ref.js";
22
- import { r as y } from "../bundled/repeat.js";
23
- import { c as w } from "../bundled/class-names.js";
24
- const re = ".label-wrapper{display:flex;flex-direction:row;align-items:center;gap:var(--label-wrapper-gap, 4px)}.label-wrapper[hidden]{display:none}.label:not(slot),.label::slotted(label){flex:0 1 auto}.chevron{display:flex;flex-shrink:0;font:var(--vvd-typography-base-extended);transform:rotate(0);transition:transform .2s}:host([data-expanded=true]) .chevron,:host([open]) .chevron{transform:rotate(180deg)}:not(.disabled) .chevron{cursor:pointer}.disabled .chevron{color:var(--_low-ink-color);cursor:not-allowed}:host(:focus-visible){outline:none}:host{display:inline-block;inline-size:300px;--_low-ink-color: var(--vvd-color-neutral-600)}:host([disabled]){--_low-ink-color: var(--vvd-color-neutral-400);cursor:not-allowed}.control-wrapper{display:flex;flex-direction:column;gap:4px}.label{color:var(--vvd-color-canvas-text);font:var(--vvd-typography-base)}.selection-count{color:var(--_low-ink-color);font:var(--vvd-typography-base)}.fieldset{--_connotation-color-primary: var(--vvd-searchable-select-accent-primary, var(--vvd-color-canvas-text));--_connotation-color-primary-text: var(--vvd-searchable-select-accent-primary-text, var(--vvd-color-canvas));--_connotation-color-primary-increment: var(--vvd-searchable-select-accent-primary-increment, var(--vvd-color-neutral-800));--_connotation-color-intermediate: var(--vvd-searchable-select-accent-intermediate, var(--vvd-color-neutral-500));--_connotation-color-faint: var(--vvd-searchable-select-accent-faint, var(--vvd-color-neutral-50));--_connotation-color-soft: var(--vvd-searchable-select-accent-soft, var(--vvd-color-neutral-100));--_connotation-color-firm: var(--vvd-searchable-select-accent-firm, var(--vvd-color-canvas-text));--_connotation-color-fierce: var(--vvd-searchable-select-accent-fierce, var(--vvd-color-neutral-700))}.fieldset{--_appearance-color-text: var(--vvd-color-canvas-text);--_appearance-color-fill: var(--vvd-color-canvas);--_appearance-color-outline: var(--vvd-color-neutral-500)}.fieldset.appearance-ghost{--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}@media (hover: hover){.fieldset: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)}.fieldset: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}}.fieldset.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)}.fieldset.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}.fieldset:disabled{--_appearance-color-text: var(--vvd-color-neutral-300);--_appearance-color-fill: var(--vvd-color-neutral-100);--_appearance-color-outline: var(--vvd-color-neutral-300)}.fieldset:disabled.appearance-ghost{--_appearance-color-text: var(--vvd-color-neutral-300);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}.fieldset.disabled{--_appearance-color-text: var(--vvd-color-neutral-300);--_appearance-color-fill: var(--vvd-color-neutral-100);--_appearance-color-outline: var(--vvd-color-neutral-300)}.fieldset.disabled.appearance-ghost{--_appearance-color-text: var(--vvd-color-neutral-300);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}.fieldset.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)}.fieldset.readonly:where(:not(.disabled,:disabled)).appearance-ghost{--_appearance-color-text: var(--vvd-color-neutral-600);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}.fieldset.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)}.fieldset.error:where(:not(.disabled,:disabled)).appearance-ghost{--_appearance-color-text: notSet;--_appearance-color-fill: var(--vvd-color-alert-50);--_appearance-color-outline: transparent}.fieldset.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)}.fieldset.success:where(:not(.disabled,:disabled)).appearance-ghost{--_appearance-color-text: notSet;--_appearance-color-fill: var(--vvd-color-success-50);--_appearance-color-outline: transparent}.fieldset{display:flex;align-items:center;justify-content:space-between;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);gap:8px;padding-block:8px;padding-inline:16px;transition:box-shadow .2s,background-color .2s}@supports selector(:has(*)){.fieldset:not(.has-highlighted-option):has(input:focus){box-shadow:0 0 0 4px color-mix(in srgb,var(--focus-stroke-color, var(--vvd-color-cta-500)),transparent 85%),inset 0 0 0 3px var(--focus-stroke-gap-color, currentColor);outline:1px solid var(--focus-stroke-color, var(--vvd-color-cta-500));outline-offset:calc(-1px - var(--focus-inset, 0px));--focus-stroke-gap-color: transparent}}@supports not selector(:has(*)){.fieldset:not(.has-highlighted-option):focus-within{box-shadow:0 0 0 4px color-mix(in srgb,var(--focus-stroke-color, var(--vvd-color-cta-500)),transparent 85%),inset 0 0 0 3px var(--focus-stroke-gap-color, currentColor);outline:1px solid var(--focus-stroke-color, var(--vvd-color-cta-500));outline-offset:calc(-1px - var(--focus-inset, 0px));--focus-stroke-gap-color: transparent}}:host(:not([shape=pill])) .fieldset{border-radius:8px}:host([shape=pill]) .fieldset{border-radius:24px}.popup-wrapper{position:relative}.content-area{display:flex;overflow:hidden;flex:1;flex-direction:column;gap:8px;min-block-size:24px}.tag-row{display:flex;gap:8px;inline-size:100%}.tag-row.contains-only-input:not(:focus-within){display:contents}.tag-wrapper{overflow:hidden}.tag{max-inline-size:100%}input{box-sizing:border-box;flex:1;border:none;background:none;block-size:24px;font:var(--vvd-typography-base);max-inline-size:100%;min-inline-size:min(100px,40%);outline:none}.contains-only-input input:not(:focus){position:absolute;block-size:0;inline-size:0;min-inline-size:0;opacity:0;pointer-events:none}.listbox{display:flex;flex-direction:column;padding:4px;gap:2px;max-block-size:var(--searchable-select-height, 408px);overflow-y:auto}.empty-message{display:flex;align-items:center;justify-content:center;color:var(--vvd-color-neutral-300);font:var(--vvd-typography-base);min-block-size:40px;text-align:center}::part(popup-base){inline-size:max-content;min-inline-size:var(--_searchable-select-fixed-width, 100%)}slot[name=icon]{font-size:20px}.visually-hidden{position:absolute;overflow:hidden;width:1px;height:1px;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap}::slotted([data-vvd-component=option][data-highlighted]),[data-select-all][data-highlighted]{border-radius:8px;box-shadow:0 0 0 4px color-mix(in srgb,var(--focus-stroke-color, var(--vvd-color-cta-500)),transparent 85%),inset 0 0 0 3px var(--focus-stroke-gap-color, currentColor);outline:1px solid var(--focus-stroke-color, var(--vvd-color-cta-500));outline-offset:calc(-1px - var(--focus-inset, 0px));--focus-stroke-gap-color: transparent}.divider{margin-block:10px;margin-inline:12px}", ce = '.base.connotation-cta{--_connotation-color-contrast: var(--vvd-option-tag-cta-contrast, var(--vvd-color-cta-800))}.base:not(.connotation-cta){--_connotation-color-contrast: var(--vvd-option-tag-accent-contrast, var(--vvd-color-neutral-800))}.base{position:relative;display:inline-flex;box-sizing:border-box;align-items:center;background-color:var(--fill-color);block-size:calc(1px*(24 + 4*clamp(-1,var(--vvd-size-density, 0),2)));box-shadow:inset 0 0 0 1px var(--outline-color);color:var(--text-color);column-gap:8px;font:var(--vvd-typography-base-bold);max-inline-size:100%;padding-inline:8px;user-select:none;vertical-align:middle}.base:not(.disabled){--text-color: var(--_connotation-color-contrast);--fill-color: var(--_connotation-color-soft);--outline-color: transparent}@supports (background-color: color-mix(in srgb,black 50%,white)){.base:not(.disabled){--fill-color: color-mix( in srgb, var(--_connotation-color-contrast), transparent 87.5% )}}.base.disabled{--text-color: var(--vvd-color-neutral-300);--fill-color: var(--vvd-color-neutral-200);--outline-color: transparent}@supports (background-color: color-mix(in srgb,black 50%,white)){.base.disabled{--fill-color: color-mix( in srgb, var(--vvd-color-neutral-800), transparent 87.5% )}}.base:not(.shape-pill){border-radius:4px}.base.shape-pill{border-radius:16px}.label{overflow:hidden;max-inline-size:100%;text-overflow:ellipsis;white-space:nowrap}slot[name=icon]{font-size:calc(calc(1px*(24 + 4*clamp(-1,var(--vvd-size-density, 0),2))) / 1.5);line-height:1}.icon-placeholder{inline-size:calc(calc(1px*(24 + 4*clamp(-1,var(--vvd-size-density, 0),2))) / 1.5)}.remove-button{display:flex;align-items:center;border-radius:inherit;cursor:pointer;outline:none}.disabled .remove-button{pointer-events:none}.remove-button:focus-visible:before{--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));position:absolute;z-index:1;display:block;border-radius:inherit;content:"";inset:0;pointer-events:none}';
25
- var de = Object.defineProperty, r = (s, t, e, o) => {
26
- for (var a = void 0, i = s.length - 1, g; i >= 0; i--)
27
- (g = s[i]) && (a = g(t, e, a) || a);
28
- return a && de(t, e, a), a;
1
+ import { t as e } from "../bundled/localized.js";
2
+ import { O as t, T as n, d as r, l as i, o as a, s as o, t as s, u as c, w as l } from "../bundled/vivid-element.js";
3
+ import { n as u } from "../bundled/repeat.js";
4
+ import { t as d } from "../bundled/ref.js";
5
+ import { t as f } from "../bundled/when.js";
6
+ import { t as p } from "../bundled/slotted.js";
7
+ import { r as m, t as h } from "../bundled/definition2.js";
8
+ import { t as g } from "../bundled/decorate.js";
9
+ import { t as _ } from "../bundled/class-names.js";
10
+ import { a as ee, i as v, n as y } from "../bundled/affix.js";
11
+ import { n as b, t as x } from "../bundled/delegates-aria.js";
12
+ import { r as S, t as C } from "../bundled/definition5.js";
13
+ import { n as w } from "../bundled/form-associated.js";
14
+ import { t as T } from "../bundled/form-element.js";
15
+ import { t as E } from "../bundled/with-success-text.js";
16
+ import { t as D } from "../bundled/with-error-text.js";
17
+ import { t as O } from "../bundled/with-contextual-help.js";
18
+ import { i as k, r as A, t as j } from "../bundled/definition6.js";
19
+ import { i as M, t as N } from "../bundled/definition8.js";
20
+ import { t as P } from "../bundled/divider.js";
21
+ import { a as F, t as I } from "../bundled/mixins.js";
22
+ import { i as L, r as R, t as te } from "../bundled/definition12.js";
23
+ import { t as z } from "../bundled/definition16.js";
24
+ import { t as B } from "../bundled/scrollIntoView.js";
25
+ //#region src/lib/searchable-select/searchable-select.scss?inline
26
+ var V = ".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;transition:transform .2s;display:flex;transform:rotate(0)}:host([data-expanded=true]) .chevron,:host([open]) .chevron{transform:rotate(180deg)}:not(.disabled) .chevron{cursor:pointer}.disabled .chevron{color:var(--_low-ink-color);cursor:not-allowed}:host(:focus-visible){outline:none}:host{--_low-ink-color:var(--vvd-color-neutral-600);inline-size:300px;display:inline-block}:host([disabled]){--_low-ink-color:var(--vvd-color-neutral-400);cursor:not-allowed}.control-wrapper{flex-direction:column;gap:4px;display:flex}.label{color:var(--vvd-color-canvas-text);font:var(--vvd-typography-base)}.selection-count{color:var(--_low-ink-color);font:var(--vvd-typography-base)}.fieldset{--_connotation-color-primary:var(--vvd-searchable-select-accent-primary,var(--vvd-color-canvas-text));--_connotation-color-primary-text:var(--vvd-searchable-select-accent-primary-text,var(--vvd-color-canvas));--_connotation-color-primary-increment:var(--vvd-searchable-select-accent-primary-increment,var(--vvd-color-neutral-800));--_connotation-color-intermediate:var(--vvd-searchable-select-accent-intermediate,var(--vvd-color-neutral-500));--_connotation-color-faint:var(--vvd-searchable-select-accent-faint,var(--vvd-color-neutral-50));--_connotation-color-soft:var(--vvd-searchable-select-accent-soft,var(--vvd-color-neutral-100));--_connotation-color-firm:var(--vvd-searchable-select-accent-firm,var(--vvd-color-canvas-text));--_connotation-color-fierce:var(--vvd-searchable-select-accent-fierce,var(--vvd-color-neutral-700));--_appearance-color-text:var(--vvd-color-canvas-text);--_appearance-color-fill:var(--vvd-color-canvas);--_appearance-color-outline:var(--vvd-color-neutral-500)}.fieldset.appearance-ghost{--_appearance-color-text:var(--_connotation-color-firm);--_appearance-color-fill:transparent;--_appearance-color-outline:transparent}@media (hover:hover){.fieldset: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)}.fieldset: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}}.fieldset.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)}.fieldset.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}.fieldset:disabled{--_appearance-color-text:var(--vvd-color-neutral-300);--_appearance-color-fill:var(--vvd-color-neutral-100);--_appearance-color-outline:var(--vvd-color-neutral-300)}.fieldset:disabled.appearance-ghost{--_appearance-color-text:var(--vvd-color-neutral-300);--_appearance-color-fill:transparent;--_appearance-color-outline:transparent}.fieldset.disabled{--_appearance-color-text:var(--vvd-color-neutral-300);--_appearance-color-fill:var(--vvd-color-neutral-100);--_appearance-color-outline:var(--vvd-color-neutral-300)}.fieldset.disabled.appearance-ghost{--_appearance-color-text:var(--vvd-color-neutral-300);--_appearance-color-fill:transparent;--_appearance-color-outline:transparent}.fieldset.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)}.fieldset.readonly:where(:not(.disabled,:disabled)).appearance-ghost{--_appearance-color-text:var(--vvd-color-neutral-600);--_appearance-color-fill:transparent;--_appearance-color-outline:transparent}.fieldset.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)}.fieldset.error:where(:not(.disabled,:disabled)).appearance-ghost{--_appearance-color-text:notSet;--_appearance-color-fill:var(--vvd-color-alert-50);--_appearance-color-outline:transparent}.fieldset.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)}.fieldset.success:where(:not(.disabled,:disabled)).appearance-ghost{--_appearance-color-text:notSet;--_appearance-color-fill:var(--vvd-color-success-50);--_appearance-color-outline:transparent}.fieldset{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;padding-block:8px;padding-inline:16px;transition:box-shadow .2s,background-color .2s;display:flex}@supports selector(:has(*)){.fieldset:not(.has-highlighted-option):has(input:focus){box-shadow:0 0 0 4px color-mix(in srgb, var(--focus-stroke-color,var(--vvd-color-cta-500)), transparent 85%), inset 0 0 0 3px var(--focus-stroke-gap-color,currentColor);outline:1px solid var(--focus-stroke-color,var(--vvd-color-cta-500));outline-offset:calc(-1px - var(--focus-inset,0px));--focus-stroke-gap-color:transparent}}@supports not selector(:has(*)){.fieldset:not(.has-highlighted-option):focus-within{box-shadow:0 0 0 4px color-mix(in srgb, var(--focus-stroke-color,var(--vvd-color-cta-500)), transparent 85%), inset 0 0 0 3px var(--focus-stroke-gap-color,currentColor);outline:1px solid var(--focus-stroke-color,var(--vvd-color-cta-500));outline-offset:calc(-1px - var(--focus-inset,0px));--focus-stroke-gap-color:transparent}}:host(:not([shape=pill])) .fieldset{border-radius:8px}:host([shape=pill]) .fieldset{border-radius:24px}.popup-wrapper{position:relative}.content-area{flex-direction:column;flex:1;gap:8px;min-block-size:24px;display:flex;overflow:hidden}.tag-row{gap:8px;inline-size:100%;display:flex}.tag-row.contains-only-input:not(:focus-within){display:contents}.tag-wrapper{overflow:hidden}.tag{max-inline-size:100%}input{box-sizing:border-box;block-size:24px;font:var(--vvd-typography-base);background:0 0;border:none;outline:none;flex:1;min-inline-size:min(100px,40%);max-inline-size:100%}.contains-only-input input:not(:focus){opacity:0;pointer-events:none;block-size:0;inline-size:0;min-inline-size:0;position:absolute}.listbox{max-block-size:var(--searchable-select-height,408px);flex-direction:column;gap:2px;padding:4px;display:flex;overflow-y:auto}.empty-message{color:var(--vvd-color-neutral-300);font:var(--vvd-typography-base);text-align:center;justify-content:center;align-items:center;min-block-size:40px;display:flex}::part(popup-base){inline-size:max-content;min-inline-size:var(--_searchable-select-fixed-width,100%)}slot[name=icon]{font-size:20px}.visually-hidden{clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap;width:1px;height:1px;position:absolute;overflow:hidden}::slotted([data-vvd-component=option][data-highlighted]),[data-select-all][data-highlighted]{box-shadow:0 0 0 4px color-mix(in srgb, var(--focus-stroke-color,var(--vvd-color-cta-500)), transparent 85%), inset 0 0 0 3px var(--focus-stroke-gap-color,currentColor);outline:1px solid var(--focus-stroke-color,var(--vvd-color-cta-500));outline-offset:calc(-1px - var(--focus-inset,0px));--focus-stroke-gap-color:transparent;border-radius:8px}.divider{margin-block:10px;margin-inline:12px}", H = ".base.connotation-cta{--_connotation-color-contrast:var(--vvd-option-tag-cta-contrast,var(--vvd-color-cta-800))}.base:not(.connotation-cta){--_connotation-color-contrast:var(--vvd-option-tag-accent-contrast,var(--vvd-color-neutral-800))}.base{box-sizing:border-box;background-color:var(--fill-color);block-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) - 16));box-shadow:inset 0 0 0 1px var(--outline-color);color:var(--text-color);font:var(--vvd-typography-base-bold);user-select:none;vertical-align:middle;align-items:center;column-gap:8px;max-inline-size:100%;padding-inline:8px;display:inline-flex;position:relative}.base:not(.disabled){--text-color:var(--_connotation-color-contrast);--fill-color:var(--_connotation-color-soft);--outline-color:transparent}@supports (background-color:color-mix(in srgb, black 50%, white)){.base:not(.disabled){--fill-color:color-mix(in srgb, var(--_connotation-color-contrast), transparent 87.5%)}}.base.disabled{--text-color:var(--vvd-color-neutral-300);--fill-color:var(--vvd-color-neutral-200);--outline-color:transparent}@supports (background-color:color-mix(in srgb, black 50%, white)){.base.disabled{--fill-color:color-mix(in srgb, var(--vvd-color-neutral-800), transparent 87.5%)}}.base:not(.shape-pill){border-radius:4px}.base.shape-pill{border-radius:16px}.label{text-overflow:ellipsis;white-space:nowrap;max-inline-size:100%;overflow:hidden}slot[name=icon]{font-size:calc(calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) - 16)) / 1.5);line-height:1}.icon-placeholder{inline-size:calc(calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) - 16)) / 1.5)}.remove-button{border-radius:inherit;cursor:pointer;outline:none;align-items:center;display:flex}.disabled .remove-button{pointer-events:none}.remove-button:focus-visible:before{--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));z-index:1;border-radius:inherit;content:\"\";pointer-events:none;display:block;position:absolute;inset:0}", U = 8, W = 100, G = 10, K = (e) => typeof e == "string", q = class extends O(I(D(E(T(x(y(e(w(s))))))))) {
27
+ constructor(...e) {
28
+ super(...e), this.fixedDropdown = !1, this.open = !1, this.multiple = !1, this.externalTags = !1, this.maxLines = null, this.values = [], this.initialValues = [], this._currentSearchText = null, this._areOptionsInitialized = !1, this._filteredOptions = [], this._filteredEnabledOptions = [], this.loading = !1, this._highlightedOptionIndex = null, this._numElidedTags = 0, this._tagRows = [], this._lastTagRow = [], this.clearable = !1, this.maxSelected = null, this._slottedDisabledOptions = [], this.enableSelectAll = !1, this.proxy = document.createElement("input"), this.setFormValue = (e, t) => {
29
+ K(e) || super.setFormValue(e, t);
30
+ }, this._changeDescription = "";
31
+ }
32
+ openChanged() {
33
+ this.open || this.#u(null);
34
+ }
35
+ valuesChanged() {
36
+ if (this._areOptionsInitialized) {
37
+ if (!this.multiple && this.values.length > 1) {
38
+ this.values = [this.values[0]];
39
+ return;
40
+ }
41
+ if (this.values.some((e) => !this.#n(e))) {
42
+ this.values = this.values.filter((e) => this.#n(e));
43
+ return;
44
+ }
45
+ this.value = this.values.length ? this.values[0] : "", this.#T(), this.#i(), this.$fastController.isConnected && this.#b(), this.#D();
46
+ }
47
+ }
48
+ #e(e) {
49
+ this.values = e, this.$emit("change", void 0, { bubbles: !1 }), this.$emit("input", void 0, { bubbles: !1 });
50
+ }
51
+ #t(e) {
52
+ let t = new Set(this.values), n = new Set(e);
53
+ this.values = [...this.values].filter((e) => n.has(e)).concat([...e].filter((e) => !t.has(e)));
54
+ }
55
+ initialValuesChanged() {
56
+ this.dirtyValue ||= (this.values = this.initialValues, !1);
57
+ }
58
+ #n(e) {
59
+ return this._slottedOptions.some((t) => t.value === e);
60
+ }
61
+ valueChanged(e, t) {
62
+ if (super.valueChanged(e, t), !this._areOptionsInitialized) return;
63
+ let n = this._slottedOptions.some((e) => e.value === t);
64
+ this.values[0] !== t && (this.values = n ? [t] : []);
65
+ }
66
+ get selectedIndex() {
67
+ return this.values.length ? this._slottedOptions.findIndex((e) => e.value === this.values[0]) : -1;
68
+ }
69
+ set selectedIndex(e) {
70
+ this.value = this._slottedOptions[e]?.value ?? "";
71
+ }
72
+ get options() {
73
+ return [...this._slottedOptions];
74
+ }
75
+ get selectedOptions() {
76
+ return this._slottedOptions.filter((e) => this.values.includes(e.value));
77
+ }
78
+ _currentSearchTextChanged() {
79
+ this.#l(), this.$emit("search-text-change", void 0, {
80
+ bubbles: !1,
81
+ composed: !1
82
+ });
83
+ }
84
+ get searchText() {
85
+ return this._currentSearchText ?? "";
86
+ }
87
+ get _inputValue() {
88
+ return this._currentSearchText ?? (!this.multiple && this.value !== "" ? this.#v(this.value) ?? "" : "");
89
+ }
90
+ _onInputInput(e) {
91
+ this._currentSearchText = e.target.value;
92
+ }
93
+ _onInputFocus(e) {
94
+ this.#l();
95
+ }
96
+ _onInputBlur(e) {
97
+ this.open = !1, this._currentSearchText = null, this._changeDescription = "";
98
+ }
99
+ _onInputKeydown(e) {
100
+ if (e.ctrlKey || e.shiftKey) return !0;
101
+ switch (e.key) {
102
+ case "Enter": return this.#d(), this._inputValue === "" && (this.open = !this.open), !1;
103
+ case "Escape":
104
+ this.open = !1;
105
+ break;
106
+ case "Home":
107
+ if (!this.open) {
108
+ this.open = !0;
109
+ break;
110
+ }
111
+ return this.#f(), !1;
112
+ case "End":
113
+ if (!this.open) {
114
+ this.open = !0;
115
+ break;
116
+ }
117
+ return this.#p(), !1;
118
+ case "PageUp":
119
+ if (!this.open) {
120
+ this.open = !0;
121
+ break;
122
+ }
123
+ return this.#m(), !1;
124
+ case "PageDown":
125
+ if (!this.open) {
126
+ this.open = !0;
127
+ break;
128
+ }
129
+ return this.#h(), !1;
130
+ case "ArrowUp":
131
+ if (!this.open) {
132
+ this.open = !0;
133
+ break;
134
+ }
135
+ return this.#g(), !1;
136
+ case "ArrowDown":
137
+ if (!this.open) {
138
+ this.open = !0;
139
+ break;
140
+ }
141
+ return this.#_(), !1;
142
+ case "ArrowLeft": return this.multiple && this._inputValue === "" && this.values.length && !this.externalTags ? (this.#x(this.#S(this.values.length)), !1) : !0;
143
+ case "Backspace": return this.multiple && this._inputValue === "" && this.values.length ? (this._onTagRemoved(this.values[this.values.length - 1]), !1) : !0;
144
+ default: return this.open ||= !0, !0;
145
+ }
146
+ return !0;
147
+ }
148
+ _slottedOptionsChanged(e, t) {
149
+ let n = !!this.querySelectorAll(":not([slot])").length;
150
+ if (!t.length && n) return;
151
+ if (this._areOptionsInitialized = !0, e) {
152
+ this._slottedDisabledOptions = [];
153
+ for (let t of e) l.getNotifier(t).unsubscribe(this.#r, "selected");
154
+ }
155
+ /* v8 ignore else -- @preserve */
156
+ if (t) for (let e of t) e._displayCheckmark = !0, l.getNotifier(e).subscribe(this.#r, "selected");
157
+ let r = [];
158
+ for (let e of this._slottedOptions) (e.selected || e.value === this.value || this.values.includes(e.value)) && r.push(e.value), e.disabled && this._slottedDisabledOptions.push(e);
159
+ this.#t(r), this.#l(), this.#T();
160
+ }
161
+ #r = { handleChange: (e, t) => {
162
+ e.selected && !this.values.includes(e.value) ? this.values = [...this.values, e.value] : !e.selected && this.values.includes(e.value) && (this.values = this.values.filter((t) => t !== e.value));
163
+ } };
164
+ #i() {
165
+ for (let e of this._slottedOptions) e.selected = this.values.includes(e.value), this.#c(e);
166
+ }
167
+ #a(e) {
168
+ let t = e.value, n, r = !1, i = !this.values.includes(t);
169
+ this.multiple ? (n = i ? [...this.values, t] : this.values.filter((e) => e !== t), r = !0) : (i ? (n = [t], r = !0) : n = [], this.open = !1), this.#e(n), this._changeDescription = `${i ? this.locale.searchableSelect.optionSelectedMessage(e._getAccessibleName()) : this.locale.searchableSelect.optionDeselectedMessage(e._getAccessibleName())} ${this.multiple && this.maxSelected && this.maxSelected >= 1 ? this.locale.searchableSelect.maxSelectedMessage(this.values.length, this.maxSelected) : ""}`, r && (this._currentSearchText = null);
170
+ }
171
+ #o = /* @__PURE__ */ new Map();
172
+ #s(e) {
173
+ return e.querySelector("[slot=\"tag-icon\"]");
174
+ }
175
+ _tagIconSlotName(e) {
176
+ return `_tag-icon-${this.values.indexOf(e)}`;
177
+ }
178
+ #c(e) {
179
+ if (e.selected && this.#s(e)) {
180
+ let t = this.#o.get(e);
181
+ t || (t = this.#s(e).cloneNode(!0), this.#o.set(e, t)), t.slot = this._tagIconSlotName(e.value), this.appendChild(t);
182
+ } else {
183
+ let t = this.#o.get(e);
184
+ t && (t.remove(), this.#o.delete(e));
185
+ }
186
+ }
187
+ optionFilterChanged() {
188
+ this.#l();
189
+ }
190
+ loadingChanged(e, t) {
191
+ this._changeDescription = this.locale.searchableSelect.loadingOptionsMessage, e && !t && (this._changeDescription = "");
192
+ }
193
+ #l() {
194
+ let e = [], t = this.optionFilter ?? ((e, t) => e.text.toLowerCase().includes(t.toLowerCase()));
195
+ for (let n of this._slottedOptions ?? []) {
196
+ n._vvdSearchText = this.searchText;
197
+ let r = !this.searchText || t(n, this.searchText);
198
+ n._isNotMatching = !r, !n.hidden && r && e.push(n);
199
+ }
200
+ this.#u(null), this._filteredOptions = e;
201
+ let n = e.filter((e) => !e.disabled);
202
+ this._selectAllOption ? this._filteredEnabledOptions = [this._selectAllOption, ...n] : this._filteredEnabledOptions = n;
203
+ }
204
+ #u(e) {
205
+ if (typeof this._highlightedOptionIndex == "number") {
206
+ let e = this._filteredEnabledOptions[this._highlightedOptionIndex];
207
+ e._highlighted = !1, e.removeAttribute("data-highlighted");
208
+ }
209
+ if (typeof e == "number" && (e = this._filteredEnabledOptions.length ? Math.max(0, Math.min(this._filteredEnabledOptions.length - 1, e)) : null), this._highlightedOptionIndex = e, typeof this._highlightedOptionIndex == "number") {
210
+ let e = this._filteredEnabledOptions[this._highlightedOptionIndex];
211
+ e._highlighted = !0, e.setAttribute("data-highlighted", ""), B(e, this._listbox, "nearest"), this._changeDescription = this.locale.searchableSelect.optionFocusedMessage(e._getAccessibleName(), this._highlightedOptionIndex + 1, this._filteredEnabledOptions.length, e.selected);
212
+ }
213
+ }
214
+ #d() {
215
+ if (this._highlightedOptionIndex === null) return;
216
+ let e = this._filteredEnabledOptions[this._highlightedOptionIndex];
217
+ if (e.getAttribute("data-select-all") !== null) {
218
+ this._toggleSelectAll();
219
+ return;
220
+ }
221
+ this.#a(e);
222
+ }
223
+ #f() {
224
+ this.#u(0);
225
+ }
226
+ #p() {
227
+ this.#u(this._filteredEnabledOptions.length - 1);
228
+ }
229
+ #m() {
230
+ this.#u((this._highlightedOptionIndex ?? this._filteredEnabledOptions.length) - G);
231
+ }
232
+ #h() {
233
+ this.#u((this._highlightedOptionIndex ?? -1) + G);
234
+ }
235
+ #g() {
236
+ this.#u((this._highlightedOptionIndex ?? this._filteredEnabledOptions.length) - 1);
237
+ }
238
+ #_() {
239
+ this.#u((this._highlightedOptionIndex ?? -1) + 1);
240
+ }
241
+ _tagLabelForValue(e) {
242
+ return this._slottedOptions.find((t) => t.value === e).label;
243
+ }
244
+ _tagConnotationForValue(e) {
245
+ return this._slottedOptions.find((t) => t.value === e).tagConnotation;
246
+ }
247
+ _isTagDisabled(e) {
248
+ let t = this._slottedOptions.find((t) => t.value === e);
249
+ return this.disabled || t.disabled;
250
+ }
251
+ #v(e) {
252
+ return this._slottedOptions?.find((t) => t.value === e)?.label;
253
+ }
254
+ #y(e, t, n) {
255
+ let r = document.createElement(this._optionTagTagName);
256
+ r.label = e, r.removable = t, r.style.cssText = "position: absolute; visibility: hidden;", r.hasIconPlaceholder = n, this.shadowRoot.appendChild(r);
257
+ let i = r.getBoundingClientRect().width;
258
+ return r.remove(), i;
259
+ }
260
+ #b() {
261
+ if (!this.multiple) {
262
+ this._numElidedTags = 0, this._tagRows = [], this._lastTagRow = [];
263
+ return;
264
+ }
265
+ if (this.externalTags) {
266
+ this._numElidedTags = this.values.length, this._tagRows = [], this._lastTagRow = [];
267
+ return;
268
+ }
269
+ let e = this._contentArea.getBoundingClientRect().width, t = [[]], n = 0, r = W, i;
270
+ for (i = this.values.length - 1; i >= 0; i--) {
271
+ let a = this.maxLines && n === this.maxLines - 1, o = this.#y(this._tagLabelForValue(this.values[i]), !0, this.#s(this.selectedOptions[i]) !== null), s = {
272
+ value: this.values[i],
273
+ width: o
274
+ }, c = 0;
275
+ if (a) {
276
+ let e = i;
277
+ e && (c = U + this.#y(e.toString(), !1, !1));
278
+ }
279
+ if (r + U + o + c > e) {
280
+ if (a) if (i === this.values.length - 1) t[n].unshift(s), r += U + o;
281
+ else break;
282
+ else t.push([]), n++, t[n].unshift(s), r = o;
283
+ continue;
284
+ }
285
+ t[n].unshift(s), r += U + o;
286
+ }
287
+ this._numElidedTags = i + 1, t.reverse();
288
+ for (let n = 0; n < t.length - 1; n++) {
289
+ let r = t[n].map((e) => e.width).reduce((e, t) => e + t, 0) + (t[n].length - 1) * U;
290
+ for (n === 0 && this._numElidedTags && (r += U + this.#y(this._numElidedTags.toString(), !1, !1)); t[n + 1].length && r + U + t[n + 1][0].width <= e;) {
291
+ let e = t[n + 1].shift();
292
+ t[n].push(e), r += U + e.width;
293
+ }
294
+ }
295
+ let a = t.map((e) => e.map((e) => e.value));
296
+ this._tagRows = a.slice(0, -1), this._lastTagRow = a.slice(-1)[0];
297
+ }
298
+ _onTagRemoved(e) {
299
+ this.#e(this.values.filter((t) => t !== e)), this.#l();
300
+ }
301
+ _onTagKeydown(e) {
302
+ let n = parseInt(e.target.dataset.index);
303
+ switch (e.key) {
304
+ case "Backspace":
305
+ case "Delete":
306
+ case "Enter":
307
+ case " ":
308
+ this._onTagRemoved(this.values[n]), t.process(), this.#x(this.#w(n));
309
+ break;
310
+ case "ArrowLeft":
311
+ this.#x(this.#S(n) ?? n);
312
+ break;
313
+ case "ArrowRight":
314
+ this.#x(this.#C(n));
315
+ break;
316
+ }
317
+ return !0;
318
+ }
319
+ #x(e) {
320
+ e === null ? this._input.focus() : this.shadowRoot.querySelector(`[data-index="${e}"]`)?.focus();
321
+ }
322
+ #S(e) {
323
+ if (!this.values.length) return null;
324
+ for (let t = e - 1; t >= 0; t--) if (!this._isTagDisabled(this.values[t])) return t;
325
+ return null;
326
+ }
327
+ #C(e) {
328
+ if (!this.values.length) return null;
329
+ for (let t = e + 1; t < this.values.length; t++) if (!this._isTagDisabled(this.values[t])) return t;
330
+ return null;
331
+ }
332
+ #w(e) {
333
+ return this.#C(e - 1) ?? this.#S(e);
334
+ }
335
+ _onListboxClick(e) {
336
+ if (this.disabled) return;
337
+ let t = e.target.closest("option,[role=option],[data-vvd-component=option]");
338
+ if (t?.getAttribute("data-select-all") !== null) {
339
+ this._toggleSelectAll();
340
+ return;
341
+ }
342
+ t && !t.disabled && this.#a(t);
343
+ }
344
+ get _shouldShowClearButton() {
345
+ return this.clearable && this.values.length > 0;
346
+ }
347
+ _onClearButtonClick() {
348
+ this.#e(this.selectedOptions.filter((e) => e.disabled).map((e) => e.value));
349
+ }
350
+ maxSelectedChanged() {
351
+ this.#T();
352
+ }
353
+ #T() {
354
+ if (!this.multiple || !this._slottedOptions || typeof this.maxSelected != "number" || this.maxSelected <= 0) return;
355
+ let e = this._slottedOptions.filter((e) => !this._slottedDisabledOptions.includes(e));
356
+ if (this.values.length >= this.maxSelected) {
357
+ let t = e.filter((e) => !this.selectedOptions.includes(e));
358
+ for (let e of t) e.disabled = !0;
359
+ } else for (let t of e) t.disabled = !1;
360
+ }
361
+ get _hasSelectionCount() {
362
+ return this.multiple && this.maxSelected && this.maxSelected >= 1;
363
+ }
364
+ get _selectableOptions() {
365
+ return this._slottedOptions?.filter((e) => !this._slottedDisabledOptions.includes(e) && !e.disabled) ?? [];
366
+ }
367
+ get _selectAllLabel() {
368
+ return this._isAllSelected ? this.deselectAllText ?? this.locale.searchableSelect.deselectAllLabel : this.selectAllText ?? this.locale.searchableSelect.selectAllLabel;
369
+ }
370
+ get _isAllSelected() {
371
+ let e = this.values;
372
+ if (!this.multiple || !this._slottedOptions) return !1;
373
+ let t = this._selectableOptions;
374
+ if (t.length === 0) return !1;
375
+ let n = new Set(e);
376
+ return t.every((e) => n.has(e.value));
377
+ }
378
+ _toggleSelectAll() {
379
+ let e = this._selectableOptions.map((e) => e.value);
380
+ if (this._isAllSelected) {
381
+ let t = this.values.filter((t) => !e.includes(t));
382
+ this.#e(t), this._changeDescription = this.locale.searchableSelect.deselectedAllMessage;
383
+ return;
384
+ }
385
+ let t = e.filter((e) => !this.values.includes(e)), n = [...this.values, ...t];
386
+ this.#e(n), this._changeDescription = this.locale.searchableSelect.selectedAllMessage;
387
+ }
388
+ #E() {
389
+ return this.initialValues.length ? this.initialValues : this.initialValue ? [this.initialValue] : [];
390
+ }
391
+ nameChanged(e, t) {
392
+ super.nameChanged(e, t), this.#D();
393
+ }
394
+ #D() {
395
+ if (!this.name) this.setFormValue(null);
396
+ else {
397
+ let e = new FormData();
398
+ for (let t of this.values) e.append(this.name, t);
399
+ this.setFormValue(e);
400
+ }
401
+ }
402
+ formResetCallback() {
403
+ super.formResetCallback(), this.#e(this.#E());
404
+ }
405
+ #O = new ResizeObserver(() => {
406
+ this.#b();
407
+ });
408
+ _onFieldsetClick(e) {
409
+ this.disabled || e.defaultPrevented || (this._input.focus(), this.open = !0);
410
+ }
411
+ _onChevronClick() {
412
+ return this.open ? (this.open = !1, !1) : !0;
413
+ }
414
+ connectedCallback() {
415
+ super.connectedCallback(), this.values.length || (this.values = this.#E()), this.#O.observe(this._contentArea);
416
+ }
417
+ disconnectedCallback() {
418
+ super.disconnectedCallback(), this.#O.disconnect();
419
+ }
420
+ validate() {
421
+ super.validate(this._input ?? void 0);
422
+ }
423
+ focus(e) {
424
+ this._input?.focus(e);
425
+ }
426
+ _onMouseDown(e) {
427
+ let t = e.composedPath()[0];
428
+ return !e.defaultPrevented && t !== this._input && !this._isFromContextualHelp(e) ? (this._input.focus(), !1) : !0;
429
+ }
29
430
  };
30
- const _ = 8, pe = 100, S = 10, he = (s) => typeof s == "string";
31
- class n extends ee(
32
- j(
33
- te(
34
- ae(
35
- oe(
36
- X(
37
- le(V(Z(F)))
38
- )
39
- )
40
- )
41
- )
42
- )
43
- ) {
44
- constructor() {
45
- super(...arguments), this.fixedDropdown = !1, this.open = !1, this.multiple = !1, this.externalTags = !1, this.maxLines = null, this.values = [], this.initialValues = [], this._currentSearchText = null, this._areOptionsInitialized = !1, this.#s = {
46
- handleChange: (t, e) => {
47
- t.selected && !this.values.includes(t.value) ? this.values = [...this.values, t.value] : !t.selected && this.values.includes(t.value) && (this.values = this.values.filter((o) => o !== t.value));
48
- }
49
- }, this.#a = /* @__PURE__ */ new Map(), this._filteredOptions = [], this._filteredEnabledOptions = [], this.loading = !1, this._highlightedOptionIndex = null, this._numElidedTags = 0, this._tagRows = [], this._lastTagRow = [], this.clearable = !1, this.maxSelected = null, this._slottedDisabledOptions = [], this.enableSelectAll = !1, this.proxy = document.createElement("input"), this.setFormValue = (t, e) => {
50
- he(t) || super.setFormValue(t, e);
51
- }, this._changeDescription = "", this.#d = new ResizeObserver(() => {
52
- this.#u();
53
- });
54
- }
55
- /**
56
- * @internal
57
- */
58
- openChanged() {
59
- this.open || this.#e(null);
60
- }
61
- /**
62
- * @internal
63
- */
64
- valuesChanged() {
65
- if (this._areOptionsInitialized) {
66
- if (!this.multiple && this.values.length > 1) {
67
- this.values = [this.values[0]];
68
- return;
69
- }
70
- if (this.values.some((t) => !this.#p(t))) {
71
- this.values = this.values.filter((t) => this.#p(t));
72
- return;
73
- }
74
- this.value = this.values.length ? this.values[0] : "", this.#c(), this.#_(), this.$fastController.isConnected && this.#u(), this.#g();
75
- }
76
- }
77
- #t(t) {
78
- this.values = t, this.$emit("change", void 0, {
79
- bubbles: !1
80
- }), this.$emit("input", void 0, {
81
- bubbles: !1
82
- });
83
- }
84
- #b(t) {
85
- const e = new Set(this.values), o = new Set(t);
86
- this.values = [...this.values].filter((a) => o.has(a)).concat([...t].filter((a) => !e.has(a)));
87
- }
88
- /**
89
- * @internal
90
- */
91
- initialValuesChanged() {
92
- this.dirtyValue || (this.values = this.initialValues, this.dirtyValue = !1);
93
- }
94
- #p(t) {
95
- return this._slottedOptions.some((e) => e.value === t);
96
- }
97
- /**
98
- * @internal
99
- */
100
- valueChanged(t, e) {
101
- if (super.valueChanged(t, e), !this._areOptionsInitialized)
102
- return;
103
- const o = this._slottedOptions.some(
104
- (a) => a.value === e
105
- );
106
- this.values[0] !== e && (this.values = o ? [e] : []);
107
- }
108
- get selectedIndex() {
109
- return this.values.length ? this._slottedOptions.findIndex(
110
- (t) => t.value === this.values[0]
111
- ) : -1;
112
- }
113
- set selectedIndex(t) {
114
- this.value = this._slottedOptions[t]?.value ?? "";
115
- }
116
- get options() {
117
- return [...this._slottedOptions];
118
- }
119
- get selectedOptions() {
120
- return this._slottedOptions.filter(
121
- (t) => this.values.includes(t.value)
122
- );
123
- }
124
- /**
125
- * @internal
126
- */
127
- _currentSearchTextChanged() {
128
- this.#o(), this.$emit("search-text-change", void 0, {
129
- bubbles: !1,
130
- composed: !1
131
- });
132
- }
133
- /**
134
- * The current search text of the component.
135
- */
136
- get searchText() {
137
- return this._currentSearchText ?? "";
138
- }
139
- /**
140
- * @internal
141
- */
142
- get _inputValue() {
143
- return this._currentSearchText ?? (!this.multiple && this.value !== "" ? this.#k(this.value) ?? "" : "");
144
- }
145
- /**
146
- * @internal
147
- */
148
- _onInputInput(t) {
149
- this._currentSearchText = t.target.value;
150
- }
151
- /**
152
- * @internal
153
- */
154
- _onInputFocus(t) {
155
- this.#o();
156
- }
157
- /**
158
- * @internal
159
- */
160
- _onInputBlur(t) {
161
- this.open = !1, this._currentSearchText = null, this._changeDescription = "";
162
- }
163
- /**
164
- * @internal
165
- */
166
- _onInputKeydown(t) {
167
- if (t.ctrlKey || t.shiftKey)
168
- return !0;
169
- switch (t.key) {
170
- case "Enter":
171
- return this.#x(), this._inputValue === "" && (this.open = !this.open), !1;
172
- case "Escape":
173
- this.open = !1;
174
- break;
175
- case "Home":
176
- if (!this.open) {
177
- this.open = !0;
178
- break;
179
- }
180
- return this.#y(), !1;
181
- case "End":
182
- if (!this.open) {
183
- this.open = !0;
184
- break;
185
- }
186
- return this.#w(), !1;
187
- case "PageUp":
188
- if (!this.open) {
189
- this.open = !0;
190
- break;
191
- }
192
- return this.#$(), !1;
193
- case "PageDown":
194
- if (!this.open) {
195
- this.open = !0;
196
- break;
197
- }
198
- return this.#O(), !1;
199
- case "ArrowUp":
200
- if (!this.open) {
201
- this.open = !0;
202
- break;
203
- }
204
- return this.#T(), !1;
205
- case "ArrowDown":
206
- if (!this.open) {
207
- this.open = !0;
208
- break;
209
- }
210
- return this.#S(), !1;
211
- case "ArrowLeft":
212
- return this.multiple && this._inputValue === "" && this.values.length && !this.externalTags ? (this.#l(this.#r(this.values.length)), !1) : !0;
213
- case "Backspace":
214
- return this.multiple && this._inputValue === "" && this.values.length ? (this._onTagRemoved(this.values[this.values.length - 1]), !1) : !0;
215
- default: {
216
- /* v8 ignore next -- @preserve */
217
- return this.open || (this.open = !0), !0;
218
- }
219
- }
220
- return !0;
221
- }
222
- /**
223
- * @internal
224
- */
225
- _slottedOptionsChanged(t, e) {
226
- const o = !!this.querySelectorAll(":not([slot])").length;
227
- if (!e.length && o)
228
- return;
229
- if (this._areOptionsInitialized = !0, t) {
230
- this._slottedDisabledOptions = [];
231
- for (const i of t)
232
- O.getNotifier(i).unsubscribe(this.#s, "selected");
233
- }
234
- /* v8 ignore else -- @preserve */
235
- if (e)
236
- for (const i of e)
237
- i._displayCheckmark = !0, O.getNotifier(i).subscribe(this.#s, "selected");
238
- const a = [];
239
- for (const i of this._slottedOptions)
240
- (i.selected || i.value === this.value || this.values.includes(i.value)) && a.push(i.value), i.disabled && this._slottedDisabledOptions.push(i);
241
- this.#b(a), this.#o(), this.#c();
242
- }
243
- #s;
244
- #_() {
245
- for (const t of this._slottedOptions)
246
- t.selected = this.values.includes(t.value), this.#m(t);
247
- }
248
- #h(t) {
249
- const e = t.value;
250
- let o, a = !1;
251
- const i = !this.values.includes(e);
252
- this.multiple ? (i ? o = [...this.values, e] : o = this.values.filter((f) => f !== e), a = !0) : (i ? (o = [e], a = !0) : o = [], this.open = !1), this.#t(o);
253
- const g = i ? this.locale.searchableSelect.optionSelectedMessage(
254
- t._getAccessibleName()
255
- ) : this.locale.searchableSelect.optionDeselectedMessage(
256
- t._getAccessibleName()
257
- ), h = this.multiple && this.maxSelected && this.maxSelected >= 1 ? this.locale.searchableSelect.maxSelectedMessage(
258
- this.values.length,
259
- this.maxSelected
260
- ) : "";
261
- this._changeDescription = `${g} ${h}`, a && (this._currentSearchText = null);
262
- }
263
- #a;
264
- #i(t) {
265
- return t.querySelector('[slot="tag-icon"]');
266
- }
267
- /**
268
- * @internal
269
- */
270
- _tagIconSlotName(t) {
271
- return `_tag-icon-${this.values.indexOf(t)}`;
272
- }
273
- #m(t) {
274
- if (t.selected && this.#i(t)) {
275
- let e = this.#a.get(t);
276
- /* v8 ignore else -- @preserve */
277
- e || (e = this.#i(t).cloneNode(!0), this.#a.set(t, e)), e.slot = this._tagIconSlotName(t.value), this.appendChild(e);
278
- } else {
279
- const e = this.#a.get(t);
280
- e && (e.remove(), this.#a.delete(t));
281
- }
282
- }
283
- /**
284
- * @internal
285
- */
286
- optionFilterChanged() {
287
- this.#o();
288
- }
289
- /**
290
- * @internal
291
- */
292
- loadingChanged(t, e) {
293
- this._changeDescription = this.locale.searchableSelect.loadingOptionsMessage, t && !e && (this._changeDescription = "");
294
- }
295
- #o() {
296
- const t = [], e = this.optionFilter ?? ((a, i) => a.text.toLowerCase().includes(i.toLowerCase()));
297
- for (const a of this._slottedOptions ?? []) {
298
- a._vvdSearchText = this.searchText;
299
- const i = !this.searchText || e(a, this.searchText);
300
- a._isNotMatching = !i, !a.hidden && i && t.push(a);
301
- }
302
- this.#e(null), this._filteredOptions = t;
303
- const o = t.filter((a) => !a.disabled);
304
- this._selectAllOption ? this._filteredEnabledOptions = [this._selectAllOption, ...o] : this._filteredEnabledOptions = o;
305
- }
306
- #e(t) {
307
- if (typeof this._highlightedOptionIndex == "number") {
308
- const e = this._filteredEnabledOptions[this._highlightedOptionIndex];
309
- e._highlighted = !1, e.removeAttribute("data-highlighted");
310
- }
311
- if (typeof t == "number" && (this._filteredEnabledOptions.length ? t = Math.max(
312
- 0,
313
- Math.min(this._filteredEnabledOptions.length - 1, t)
314
- ) : t = null), this._highlightedOptionIndex = t, typeof this._highlightedOptionIndex == "number") {
315
- const e = this._filteredEnabledOptions[this._highlightedOptionIndex];
316
- e._highlighted = !0, e.setAttribute("data-highlighted", ""), Q(e, this._listbox, "nearest"), this._changeDescription = this.locale.searchableSelect.optionFocusedMessage(
317
- e._getAccessibleName(),
318
- this._highlightedOptionIndex + 1,
319
- this._filteredEnabledOptions.length,
320
- e.selected
321
- );
322
- }
323
- }
324
- #x() {
325
- if (this._highlightedOptionIndex === null)
326
- return;
327
- const t = this._filteredEnabledOptions[this._highlightedOptionIndex];
328
- if (t.getAttribute("data-select-all") !== null) {
329
- this._toggleSelectAll();
330
- return;
331
- }
332
- this.#h(t);
333
- }
334
- #y() {
335
- this.#e(0);
336
- }
337
- #w() {
338
- this.#e(
339
- this._filteredEnabledOptions.length - 1
340
- );
341
- }
342
- #$() {
343
- this.#e(
344
- (this._highlightedOptionIndex ?? this._filteredEnabledOptions.length) - S
345
- );
346
- }
347
- #O() {
348
- this.#e(
349
- (this._highlightedOptionIndex ?? -1) + S
350
- );
351
- }
352
- #T() {
353
- this.#e(
354
- (this._highlightedOptionIndex ?? this._filteredEnabledOptions.length) - 1
355
- );
356
- }
357
- #S() {
358
- this.#e(
359
- (this._highlightedOptionIndex ?? -1) + 1
360
- );
361
- }
362
- // --- Tags ---
363
- /**
364
- * @internal
365
- */
366
- _tagLabelForValue(t) {
367
- return this._slottedOptions.find(
368
- (o) => o.value === t
369
- ).label;
370
- }
371
- /**
372
- * @internal
373
- */
374
- _tagConnotationForValue(t) {
375
- return this._slottedOptions.find(
376
- (o) => o.value === t
377
- ).tagConnotation;
378
- }
379
- /**
380
- * @internal
381
- */
382
- _isTagDisabled(t) {
383
- const e = this._slottedOptions.find(
384
- (o) => o.value === t
385
- );
386
- return this.disabled || e.disabled;
387
- }
388
- #k(t) {
389
- return this._slottedOptions?.find(
390
- (o) => o.value === t
391
- )?.label;
392
- }
393
- /**
394
- * @internal
395
- */
396
- #n(t, e, o) {
397
- const a = document.createElement(this._optionTagTagName);
398
- a.label = t, a.removable = e, a.style.cssText = "position: absolute; visibility: hidden;", a.hasIconPlaceholder = o, this.shadowRoot.appendChild(a);
399
- const i = a.getBoundingClientRect().width;
400
- return a.remove(), i;
401
- }
402
- #u() {
403
- if (!this.multiple) {
404
- this._numElidedTags = 0, this._tagRows = [], this._lastTagRow = [];
405
- return;
406
- }
407
- if (this.externalTags) {
408
- this._numElidedTags = this.values.length, this._tagRows = [], this._lastTagRow = [];
409
- return;
410
- }
411
- const t = this._contentArea.getBoundingClientRect().width, e = [[]];
412
- let o = 0, a = pe, i;
413
- for (i = this.values.length - 1; i >= 0; i--) {
414
- const h = this.maxLines && o === this.maxLines - 1, f = this.#n(
415
- this._tagLabelForValue(this.values[i]),
416
- !0,
417
- this.#i(this.selectedOptions[i]) !== null
418
- ), l = {
419
- value: this.values[i],
420
- width: f
421
- };
422
- let c = 0;
423
- if (h) {
424
- const $ = i;
425
- $ && (c = _ + this.#n($.toString(), !1, !1));
426
- }
427
- if (a + _ + f + c > t) {
428
- if (h)
429
- if (i === this.values.length - 1)
430
- e[o].unshift(l), a += _ + f;
431
- else
432
- break;
433
- else
434
- e.push([]), o++, e[o].unshift(l), a = f;
435
- continue;
436
- }
437
- e[o].unshift(l), a += _ + f;
438
- }
439
- this._numElidedTags = i + 1, e.reverse();
440
- for (let h = 0; h < e.length - 1; h++) {
441
- let f = e[h].map((l) => l.width).reduce((l, c) => l + c, 0) + (e[h].length - 1) * _;
442
- for (h === 0 && this._numElidedTags && (f += _ + this.#n(this._numElidedTags.toString(), !1, !1)); e[h + 1].length && f + _ + e[h + 1][0].width <= t; ) {
443
- const l = e[h + 1].shift();
444
- e[h].push(l), f += _ + l.width;
445
- }
446
- }
447
- const g = e.map((h) => h.map((f) => f.value));
448
- this._tagRows = g.slice(0, -1), this._lastTagRow = g.slice(-1)[0];
449
- }
450
- /**
451
- * @internal
452
- */
453
- _onTagRemoved(t) {
454
- this.#t(
455
- this.values.filter((e) => e !== t)
456
- ), this.#o();
457
- }
458
- /**
459
- * @internal
460
- */
461
- _onTagKeydown(t) {
462
- const e = parseInt(t.target.dataset.index);
463
- switch (t.key) {
464
- case "Backspace":
465
- case "Delete":
466
- case "Enter":
467
- case " ": {
468
- this._onTagRemoved(this.values[e]), q.process(), this.#l(this.#C(e));
469
- break;
470
- }
471
- case "ArrowLeft":
472
- this.#l(this.#r(e) ?? e);
473
- break;
474
- case "ArrowRight":
475
- this.#l(this.#v(e));
476
- break;
477
- }
478
- return !0;
479
- }
480
- #l(t) {
481
- t === null ? this._input.focus() : this.shadowRoot.querySelector(`[data-index="${t}"]`)?.focus();
482
- }
483
- #r(t) {
484
- if (!this.values.length)
485
- return null;
486
- for (let e = t - 1; e >= 0; e--)
487
- if (!this._isTagDisabled(this.values[e]))
488
- return e;
489
- return null;
490
- }
491
- #v(t) {
492
- if (!this.values.length)
493
- return null;
494
- for (let e = t + 1; e < this.values.length; e++)
495
- if (!this._isTagDisabled(this.values[e]))
496
- return e;
497
- return null;
498
- }
499
- #C(t) {
500
- return this.#v(t - 1) ?? this.#r(t);
501
- }
502
- /**
503
- * @internal
504
- */
505
- _onListboxClick(t) {
506
- if (this.disabled)
507
- return;
508
- const e = t.target.closest(
509
- "option,[role=option],[data-vvd-component=option]"
510
- );
511
- if (e?.getAttribute("data-select-all") !== null) {
512
- this._toggleSelectAll();
513
- return;
514
- }
515
- e && !e.disabled && this.#h(e);
516
- }
517
- /**
518
- * @internal
519
- */
520
- get _shouldShowClearButton() {
521
- return this.clearable && this.values.length > 0;
522
- }
523
- /**
524
- * @internal
525
- */
526
- _onClearButtonClick() {
527
- this.#t(
528
- this.selectedOptions.filter((t) => t.disabled).map((t) => t.value)
529
- );
530
- }
531
- /**
532
- * @internal
533
- */
534
- maxSelectedChanged() {
535
- this.#c();
536
- }
537
- #c() {
538
- if (!this.multiple || !this._slottedOptions || typeof this.maxSelected != "number" || this.maxSelected <= 0)
539
- return;
540
- const t = this._slottedOptions.filter(
541
- (e) => !this._slottedDisabledOptions.includes(e)
542
- );
543
- if (this.values.length >= this.maxSelected) {
544
- const e = t.filter(
545
- (o) => !this.selectedOptions.includes(o)
546
- );
547
- for (const o of e)
548
- o.disabled = !0;
549
- } else
550
- for (const e of t)
551
- e.disabled = !1;
552
- }
553
- /**
554
- * @internal
555
- */
556
- get _hasSelectionCount() {
557
- return this.multiple && this.maxSelected && this.maxSelected >= 1;
558
- }
559
- /**
560
- * @internal
561
- */
562
- get _selectableOptions() {
563
- return this._slottedOptions?.filter(
564
- (t) => !this._slottedDisabledOptions.includes(t) && !t.disabled
565
- ) ?? [];
566
- }
567
- /**
568
- * @internal
569
- */
570
- get _selectAllLabel() {
571
- return this._isAllSelected ? this.deselectAllText ?? this.locale.searchableSelect.deselectAllLabel : this.selectAllText ?? this.locale.searchableSelect.selectAllLabel;
572
- }
573
- /**
574
- * @internal
575
- */
576
- get _isAllSelected() {
577
- const t = this.values;
578
- if (!this.multiple || !this._slottedOptions) return !1;
579
- const e = this._selectableOptions;
580
- if (e.length === 0) return !1;
581
- const o = new Set(t);
582
- return e.every((a) => o.has(a.value));
583
- }
584
- /**
585
- * @internal
586
- */
587
- _toggleSelectAll() {
588
- const t = this._selectableOptions.map((a) => a.value);
589
- if (this._isAllSelected) {
590
- const a = this.values.filter(
591
- (i) => !t.includes(i)
592
- );
593
- this.#t(a), this._changeDescription = this.locale.searchableSelect.deselectedAllMessage;
594
- return;
595
- }
596
- const e = t.filter(
597
- (a) => !this.values.includes(a)
598
- ), o = [...this.values, ...e];
599
- this.#t(o), this._changeDescription = this.locale.searchableSelect.selectedAllMessage;
600
- }
601
- #f() {
602
- return this.initialValues.length ? this.initialValues : this.initialValue ? [this.initialValue] : [];
603
- }
604
- /**
605
- * @internal
606
- */
607
- nameChanged(t, e) {
608
- super.nameChanged(t, e), this.#g();
609
- }
610
- #g() {
611
- if (!this.name)
612
- this.setFormValue(null);
613
- else {
614
- const t = new FormData();
615
- for (const e of this.values)
616
- t.append(this.name, e);
617
- this.setFormValue(t);
618
- }
619
- }
620
- /**
621
- * @internal
622
- */
623
- formResetCallback() {
624
- super.formResetCallback(), this.#t(this.#f());
625
- }
626
- #d;
627
- /**
628
- * @internal
629
- */
630
- _onFieldsetClick(t) {
631
- this.disabled || t.defaultPrevented || (this._input.focus(), this.open = !0);
632
- }
633
- /**
634
- * @internal
635
- */
636
- _onChevronClick() {
637
- return this.open ? (this.open = !1, !1) : !0;
638
- }
639
- connectedCallback() {
640
- super.connectedCallback(), this.values.length || (this.values = this.#f()), this.#d.observe(this._contentArea);
641
- }
642
- disconnectedCallback() {
643
- super.disconnectedCallback(), this.#d.disconnect();
644
- }
645
- /**
646
- * @internal
647
- */
648
- validate() {
649
- super.validate(this._input ?? void 0);
650
- }
651
- /**
652
- * @internal
653
- */
654
- focus(t) {
655
- this._input?.focus(t);
656
- }
657
- /**
658
- * @internal
659
- */
660
- _onMouseDown(t) {
661
- const e = t.composedPath()[0];
662
- return !t.defaultPrevented && e !== this._input && !this._isFromContextualHelp(t) ? (this._input.focus(), !1) : !0;
663
- }
664
- }
665
- r([
666
- u
667
- ], n.prototype, "appearance");
668
- r([
669
- u
670
- ], n.prototype, "shape");
671
- r([
672
- u({ mode: "boolean", attribute: "fixed-dropdown" })
673
- ], n.prototype, "fixedDropdown");
674
- r([
675
- u
676
- ], n.prototype, "placeholder");
677
- r([
678
- u({ mode: "boolean" })
679
- ], n.prototype, "open");
680
- r([
681
- u({ mode: "boolean" })
682
- ], n.prototype, "multiple");
683
- r([
684
- u({ attribute: "external-tags", mode: "boolean" })
685
- ], n.prototype, "externalTags");
686
- r([
687
- u({ attribute: "max-lines", converter: A })
688
- ], n.prototype, "maxLines");
689
- r([
690
- p
691
- ], n.prototype, "values");
692
- r([
693
- p
694
- ], n.prototype, "initialValues");
695
- r([
696
- p
697
- ], n.prototype, "_input");
698
- r([
699
- p
700
- ], n.prototype, "_currentSearchText");
701
- r([
702
- p
703
- ], n.prototype, "_slottedOptions");
704
- r([
705
- p
706
- ], n.prototype, "optionFilter");
707
- r([
708
- p
709
- ], n.prototype, "_filteredOptions");
710
- r([
711
- p
712
- ], n.prototype, "_filteredEnabledOptions");
713
- r([
714
- u({
715
- mode: "boolean"
716
- })
717
- ], n.prototype, "loading");
718
- r([
719
- p
720
- ], n.prototype, "_highlightedOptionIndex");
721
- r([
722
- p
723
- ], n.prototype, "_contentArea");
724
- r([
725
- p
726
- ], n.prototype, "_numElidedTags");
727
- r([
728
- p
729
- ], n.prototype, "_tagRows");
730
- r([
731
- p
732
- ], n.prototype, "_lastTagRow");
733
- r([
734
- p
735
- ], n.prototype, "_listbox");
736
- r([
737
- u({ mode: "boolean" })
738
- ], n.prototype, "clearable");
739
- r([
740
- u({ attribute: "max-selected", converter: A })
741
- ], n.prototype, "maxSelected");
742
- r([
743
- p
744
- ], n.prototype, "_slottedDisabledOptions");
745
- r([
746
- u({ attribute: "enable-select-all", mode: "boolean" })
747
- ], n.prototype, "enableSelectAll");
748
- r([
749
- u({ attribute: "select-all-text" })
750
- ], n.prototype, "selectAllText");
751
- r([
752
- u({ attribute: "deselect-all-text" })
753
- ], n.prototype, "deselectAllText");
754
- r([
755
- p
756
- ], n.prototype, "_selectAllOption");
757
- r([
758
- p
759
- ], n.prototype, "_changeDescription");
760
- r([
761
- p
762
- ], n.prototype, "_anchor");
763
- var ue = Object.defineProperty, m = (s, t, e, o) => {
764
- for (var a = void 0, i = s.length - 1, g; i >= 0; i--)
765
- (g = s[i]) && (a = g(t, e, a) || a);
766
- return a && ue(t, e, a), a;
431
+ g([i], q.prototype, "appearance", void 0), g([i], q.prototype, "shape", void 0), g([i({
432
+ mode: "boolean",
433
+ attribute: "fixed-dropdown"
434
+ })], q.prototype, "fixedDropdown", void 0), g([i], q.prototype, "placeholder", void 0), g([i({ mode: "boolean" })], q.prototype, "open", void 0), g([i({ mode: "boolean" })], q.prototype, "multiple", void 0), g([i({
435
+ attribute: "external-tags",
436
+ mode: "boolean"
437
+ })], q.prototype, "externalTags", void 0), g([i({
438
+ attribute: "max-lines",
439
+ converter: c
440
+ })], q.prototype, "maxLines", void 0), g([n], q.prototype, "values", void 0), g([n], q.prototype, "initialValues", void 0), g([n], q.prototype, "_input", void 0), g([n], q.prototype, "_currentSearchText", void 0), g([n], q.prototype, "_slottedOptions", void 0), g([n], q.prototype, "optionFilter", void 0), g([n], q.prototype, "_filteredOptions", void 0), g([n], q.prototype, "_filteredEnabledOptions", void 0), g([i({ mode: "boolean" })], q.prototype, "loading", void 0), g([n], q.prototype, "_highlightedOptionIndex", void 0), g([n], q.prototype, "_contentArea", void 0), g([n], q.prototype, "_numElidedTags", void 0), g([n], q.prototype, "_tagRows", void 0), g([n], q.prototype, "_lastTagRow", void 0), g([n], q.prototype, "_listbox", void 0), g([i({ mode: "boolean" })], q.prototype, "clearable", void 0), g([i({
441
+ attribute: "max-selected",
442
+ converter: c
443
+ })], q.prototype, "maxSelected", void 0), g([n], q.prototype, "_slottedDisabledOptions", void 0), g([i({
444
+ attribute: "enable-select-all",
445
+ mode: "boolean"
446
+ })], q.prototype, "enableSelectAll", void 0), g([i({ attribute: "select-all-text" })], q.prototype, "selectAllText", void 0), g([i({ attribute: "deselect-all-text" })], q.prototype, "deselectAllText", void 0), g([n], q.prototype, "_selectAllOption", void 0), g([n], q.prototype, "_changeDescription", void 0), g([n], q.prototype, "_anchor", void 0);
447
+ //#endregion
448
+ //#region src/lib/searchable-select/option-tag.ts
449
+ var J = class extends e(s) {
450
+ constructor(...e) {
451
+ super(...e), this.removable = !1, this.disabled = !1, this.hasIconPlaceholder = !1;
452
+ }
453
+ _onClickRemove() {
454
+ this.$emit("remove", void 0, { bubbles: !1 });
455
+ }
767
456
  };
768
- class b extends V(F) {
769
- constructor() {
770
- super(...arguments), this.removable = !1, this.disabled = !1, this.hasIconPlaceholder = !1;
771
- }
772
- _onClickRemove() {
773
- this.$emit("remove", void 0, {
774
- bubbles: !1
775
- });
776
- }
777
- }
778
- m([
779
- u
780
- ], b.prototype, "shape");
781
- m([
782
- p
783
- ], b.prototype, "connotation");
784
- m([
785
- u
786
- ], b.prototype, "label");
787
- m([
788
- u({ mode: "boolean" })
789
- ], b.prototype, "removable");
790
- m([
791
- u({ mode: "boolean" })
792
- ], b.prototype, "disabled");
793
- m([
794
- p
795
- ], b.prototype, "hasIconPlaceholder");
796
- const ve = (s) => w(
797
- ["disabled", s.disabled],
798
- [`appearance-${s.appearance}`, !!s.appearance],
799
- [`shape-${s.shape}`, !!s.shape],
800
- ["error", !!s.errorValidationMessage],
801
- ["success", !!s.successText],
802
- ["has-highlighted-option", s._highlightedOptionIndex !== null]
803
- );
804
- function fe() {
805
- return d`
806
- <label for="control" class="label" id="label"> ${(s) => s.label} </label>
457
+ g([i], J.prototype, "shape", void 0), g([n], J.prototype, "connotation", void 0), g([i], J.prototype, "label", void 0), g([i({ mode: "boolean" })], J.prototype, "removable", void 0), g([i({ mode: "boolean" })], J.prototype, "disabled", void 0), g([n], J.prototype, "hasIconPlaceholder", void 0);
458
+ //#endregion
459
+ //#region src/lib/searchable-select/searchable-select.template.ts
460
+ var Y = (e) => _(["disabled", e.disabled], [`appearance-${e.appearance}`, !!e.appearance], [`shape-${e.shape}`, !!e.shape], ["error", !!e.errorValidationMessage], ["success", !!e.successText], ["has-highlighted-option", e._highlightedOptionIndex !== null]);
461
+ function X() {
462
+ return r`
463
+ <label for="control" class="label" id="label"> ${(e) => e.label} </label>
807
464
  `;
808
465
  }
809
- function ge() {
810
- return d`
466
+ function Z() {
467
+ return r`
811
468
  <span
812
469
  id="selection-count"
813
470
  class="selection-count"
814
- aria-label="${(s) => s.locale.searchableSelect.maxSelectedMessage(
815
- s.values.length,
816
- s.maxSelected
817
- )}"
818
- >(${(s) => `${s.values.length}/${s.maxSelected}`})</span
471
+ aria-label="${(e) => e.locale.searchableSelect.maxSelectedMessage(e.values.length, e.maxSelected)}"
472
+ >(${(e) => `${e.values.length}/${e.maxSelected}`})</span
819
473
  >
820
474
  `;
821
475
  }
822
- const k = (s, t) => {
823
- const e = s.tagFor(b);
824
- return d`
476
+ var Q = (e, t) => {
477
+ let n = e.tagFor(J);
478
+ return r`
825
479
  <div class="tag-wrapper">
826
- <${e}
480
+ <${n}
827
481
  class="tag"
828
482
  tabindex="-1"
829
- data-index="${(o, a) => t(a).values.indexOf(o)}"
483
+ data-index="${(e, n) => t(n).values.indexOf(e)}"
830
484
  removable
831
- :label="${(o, a) => t(a)._tagLabelForValue(o)}"
832
- :shape="${(o, a) => t(a).shape}"
833
- :connotation="${(o, a) => t(a)._tagConnotationForValue(o)}"
834
- ?disabled="${(o, a) => t(a)._isTagDisabled(o)}"
835
- @remove="${(o, a) => t(a)._onTagRemoved(o)}"
836
- @keydown="${(o, a) => t(a)._onTagKeydown(a.event)}"
485
+ :label="${(e, n) => t(n)._tagLabelForValue(e)}"
486
+ :shape="${(e, n) => t(n).shape}"
487
+ :connotation="${(e, n) => t(n)._tagConnotationForValue(e)}"
488
+ ?disabled="${(e, n) => t(n)._isTagDisabled(e)}"
489
+ @remove="${(e, n) => t(n)._onTagRemoved(e)}"
490
+ @keydown="${(e, n) => t(n)._onTagKeydown(n.event)}"
837
491
  @mousedown="${() => !1}">
838
- <slot slot="icon" name="${(o, a) => t(a)._tagIconSlotName(o)}"></slot>
839
- </${e}>
492
+ <slot slot="icon" name="${(e, n) => t(n)._tagIconSlotName(e)}"></slot>
493
+ </${n}>
840
494
  </div>
841
495
  `;
842
- }, C = (s, t) => {
843
- const e = s.tagFor(b);
844
- return d`
845
- <${e}
496
+ }, $ = (e, t) => {
497
+ let n = e.tagFor(J);
498
+ return r`
499
+ <${n}
846
500
  class="tag"
847
501
  tabindex="-1"
848
- :label="${(o, a) => t(o, a)._numElidedTags.toString()}"
849
- :shape="${(o, a) => t(o, a).shape}"
850
- ?disabled="${(o, a) => t(o, a).disabled}"
502
+ :label="${(e, n) => t(e, n)._numElidedTags.toString()}"
503
+ :shape="${(e, n) => t(e, n).shape}"
504
+ ?disabled="${(e, n) => t(e, n).disabled}"
851
505
  @mousedown="${() => !1}">
852
- </${e}>
506
+ </${n}>
853
507
  `;
854
508
  };
855
- function be(s) {
856
- const t = s.tagFor(R), e = s.tagFor(H), o = se(s), a = z(s), i = k(s, (l) => l.parent), g = k(
857
- s,
858
- (l) => l.parentContext.parent
859
- ), h = C(s, (l, c) => l), f = C(
860
- s,
861
- (l, c) => c.parent
862
- );
863
- return d`
509
+ function ne(e) {
510
+ let t = e.tagFor(k), n = e.tagFor(S), i = ee(e), a = A(e), o = Q(e, (e) => e.parent), s = Q(e, (e) => e.parentContext.parent), c = $(e, (e, t) => e), l = $(e, (e, t) => t.parent);
511
+ return r`
864
512
  <div
865
- class="fieldset ${ve}"
866
- @click="${(l, c) => l._onFieldsetClick(c.event)}"
867
- ${x("_anchor")}
513
+ class="fieldset ${Y}"
514
+ @click="${(e, t) => e._onFieldsetClick(t.event)}"
515
+ ${d("_anchor")}
868
516
  >
869
- ${(l) => o(l.icon, ie.Slot)}
870
- <div class="content-area" ${x("_contentArea")}>
871
- ${y(
872
- (l) => l._tagRows,
873
- d`
517
+ ${(e) => i(e.icon, v.Slot)}
518
+ <div class="content-area" ${d("_contentArea")}>
519
+ ${u((e) => e._tagRows, r`
874
520
  <div class="tag-row">
875
- ${v(
876
- (l, c) => c.isFirst && c.parent._numElidedTags,
877
- f
878
- )}
879
- ${y((l) => l, g)}
521
+ ${f((e, t) => t.isFirst && t.parent._numElidedTags, l)}
522
+ ${u((e) => e, s)}
880
523
  </div>
881
- `,
882
- { positioning: !0 }
883
- )}
524
+ `, { positioning: !0 })}
884
525
  <div
885
- class="tag-row ${(l) => w([
886
- "contains-only-input",
887
- l._tagRows.length > 0 && l._lastTagRow.length === 0
888
- ])}"
526
+ class="tag-row ${(e) => _(["contains-only-input", e._tagRows.length > 0 && e._lastTagRow.length === 0])}"
889
527
  >
890
- ${v(
891
- (l) => l._tagRows.length === 0 && l._numElidedTags,
892
- h
893
- )}
894
- ${y((l) => l._lastTagRow, i)}
528
+ ${f((e) => e._tagRows.length === 0 && e._numElidedTags, c)}
529
+ ${u((e) => e._lastTagRow, o)}
895
530
  <input
896
531
  id="control"
897
532
  class="control"
898
533
  autocomplete="off"
899
534
  aria-controls="listbox"
900
- aria-describedby="${(l) => l._feedbackDescribedBy} ${(l) => l.multiple && l.maxSelected && l.maxSelected >= 1 ? "selection-count" : null}"
901
- ${Y({
902
- role: "combobox",
903
- ariaAutoComplete: "list",
904
- ariaHasPopup: "listbox",
905
- ariaExpanded: (l) => l.open
906
- })}
907
- placeholder="${(l) => l.multiple && l.values.length ? "" : l.placeholder}"
535
+ aria-describedby="${(e) => e._feedbackDescribedBy} ${(e) => e.multiple && e.maxSelected && e.maxSelected >= 1 ? "selection-count" : null}"
536
+ ${b({
537
+ role: "combobox",
538
+ ariaAutoComplete: "list",
539
+ ariaHasPopup: "listbox",
540
+ ariaExpanded: (e) => e.open
541
+ })}
542
+ placeholder="${(e) => e.multiple && e.values.length ? "" : e.placeholder}"
908
543
  type="text"
909
- ?disabled="${(l) => l.disabled}"
910
- :value="${(l) => l._inputValue}"
911
- @input="${(l, c) => {
912
- l._onInputInput(c.event), c.event.stopPropagation();
913
- }}"
914
- @change="${(l, c) => {
915
- c.event.stopPropagation();
916
- }}"
917
- @focus="${(l, c) => l._onInputFocus(c.event)}"
918
- @blur="${(l, c) => l._onInputBlur(c.event)}"
919
- @keydown="${(l, c) => l._onInputKeydown(c.event)}"
920
- ${x("_input")}
544
+ ?disabled="${(e) => e.disabled}"
545
+ :value="${(e) => e._inputValue}"
546
+ @input="${(e, t) => {
547
+ e._onInputInput(t.event), t.event.stopPropagation();
548
+ }}"
549
+ @change="${(e, t) => {
550
+ t.event.stopPropagation();
551
+ }}"
552
+ @focus="${(e, t) => e._onInputFocus(t.event)}"
553
+ @blur="${(e, t) => e._onInputBlur(t.event)}"
554
+ @keydown="${(e, t) => e._onInputKeydown(t.event)}"
555
+ ${d("_input")}
921
556
  />
922
557
  </div>
923
558
  </div>
924
559
  <slot name="meta"></slot>
925
- ${v(
926
- (l) => l._shouldShowClearButton,
927
- d`<${t}
928
- aria-label="${(l) => l.locale.searchableSelect.clearButtonLabel}"
929
- @click="${(l) => l._onClearButtonClick()}"
560
+ ${f((e) => e._shouldShowClearButton, r`<${t}
561
+ aria-label="${(e) => e.locale.searchableSelect.clearButtonLabel}"
562
+ @click="${(e) => e._onClearButtonClick()}"
930
563
  @mousedown="${() => !1}"
931
- ?disabled="${(l) => l.disabled}"
932
- :shape="${(l) => l.shape}"
564
+ ?disabled="${(e) => e.disabled}"
565
+ :shape="${(e) => e.shape}"
933
566
  size="super-condensed"
934
567
  icon="close-line"
935
568
  appearance="ghost-light"
936
569
  tabindex="0"
937
- ></${t}>`
938
- )}
939
- <div @mousedown="${() => !1}" @click="${(l) => l._onChevronClick()}">
940
- ${v(
941
- (l) => l.loading,
942
- d`<${e} indeterminate size="-6" aria-hidden="true"></${e}>`
943
- )}
944
- ${v((l) => !l.loading, a)}
570
+ ></${t}>`)}
571
+ <div @mousedown="${() => !1}" @click="${(e) => e._onChevronClick()}">
572
+ ${f((e) => e.loading, r`<${n} indeterminate size="-6" aria-hidden="true"></${n}>`)}
573
+ ${f((e) => !e.loading, a)}
945
574
  </div>
946
575
  </div>
947
576
  `;
948
577
  }
949
- function _e(s) {
950
- return s.open && s.fixedDropdown ? `--_searchable-select-fixed-width: ${Math.round(
951
- s.getBoundingClientRect().width
952
- )}px` : null;
578
+ function re(e) {
579
+ return e.open && e.fixedDropdown ? `--_searchable-select-fixed-width: ${Math.round(e.getBoundingClientRect().width)}px` : null;
953
580
  }
954
- function me(s) {
955
- const t = s.tagFor(W), e = s.tagFor(ne);
956
- return d`
581
+ function ie(e) {
582
+ let t = e.tagFor(R), n = e.tagFor(P);
583
+ return r`
957
584
  <${t}
958
585
  data-select-all
959
586
  tabindex="-1"
960
- :text="${(o) => o._selectAllLabel}"
961
- :selected="${(o) => o._isAllSelected}"
587
+ :text="${(e) => e._selectAllLabel}"
588
+ :selected="${(e) => e._isAllSelected}"
962
589
  :_displayCheckmark="${() => !0}"
963
- ?disabled="${(o) => o._selectableOptions.length === 0}"
964
- ${x("_selectAllOption")}>
590
+ ?disabled="${(e) => e._selectableOptions.length === 0}"
591
+ ${d("_selectAllOption")}>
965
592
  </${t}>
966
- <${e} class="divider"></${e}>
593
+ <${n} class="divider"></${n}>
967
594
  `;
968
595
  }
969
- function xe(s) {
970
- const t = s.tagFor(L);
971
- return d`
596
+ function ae(e) {
597
+ let t = e.tagFor(M);
598
+ return r`
972
599
  <div class="label-wrapper" ?hidden=${(e) => !e.label && !e._hasContextualHelp && !e._hasSelectionCount}>
973
- ${v(
974
- (e) => e.label || e._hasSelectionCount,
975
- d`
600
+ ${f((e) => e.label || e._hasSelectionCount, r`
976
601
  <div>
977
- ${v((e) => e.label, fe())}
978
- ${v((e) => e._hasSelectionCount, ge())}
602
+ ${f((e) => e.label, X())}
603
+ ${f((e) => e._hasSelectionCount, Z())}
979
604
  </div>
980
- `
981
- )}
982
- <slot name="contextual-help" ${T("_contextualHelpSlottedContent")}></slot>
605
+ `)}
606
+ <slot name="contextual-help" ${p("_contextualHelpSlottedContent")}></slot>
983
607
  </div>
984
608
  <span aria-live="assertive" aria-relevant="text" class="visually-hidden">
985
609
  ${(e) => e._changeDescription}
986
610
  </span>
987
611
  <div>
988
- ${be(s)}
612
+ ${ne(e)}
989
613
  <div class="popup-wrapper">
990
614
  <${t}
991
615
  :anchor="${(e) => e._anchor}"
992
616
  :open="${(e) => e.open}"
993
617
  class="popup"
994
618
  placement="bottom-start"
995
- style="${_e}"
619
+ style="${re}"
996
620
  strategy="${(e) => e.fixedDropdown ? "fixed" : "absolute"}">
997
621
  <div
998
622
  class="listbox"
999
623
  role="listbox"
1000
624
  aria-multiselectable="${(e) => e.multiple}"
1001
625
  aria-required="${(e) => e.required}"
1002
- ${x("_listbox")}
1003
- @click="${(e, o) => e._onListboxClick(o.event)}"
626
+ ${d("_listbox")}
627
+ @click="${(e, t) => e._onListboxClick(t.event)}"
1004
628
  @mousedown="${() => !1}"
1005
629
  >
1006
- ${v(
1007
- (e) => e.enableSelectAll && e.multiple && !e.maxSelected,
1008
- me(s)
1009
- )}
630
+ ${f((e) => e.enableSelectAll && e.multiple && !e.maxSelected, ie(e))}
1010
631
  <slot
1011
- ${T({
1012
- filter: B,
1013
- flatten: !0,
1014
- property: "_slottedOptions"
1015
- })}>
632
+ ${p({
633
+ filter: L,
634
+ flatten: !0,
635
+ property: "_slottedOptions"
636
+ })}>
1016
637
  </slot>
1017
- ${v(
1018
- (e) => e._filteredOptions.length === 0,
1019
- d`<div class="empty-message">
1020
- ${v(
1021
- (e) => e.loading,
1022
- d`<slot name="loading-options">
638
+ ${f((e) => e._filteredOptions.length === 0, r`<div class="empty-message">
639
+ ${f((e) => e.loading, r`<slot name="loading-options">
1023
640
  ${(e) => e.locale.searchableSelect.loadingOptionsMessage}
1024
- </slot>`
1025
- )}
1026
- ${v(
1027
- (e) => !e.loading && e.searchText === "",
1028
- d`<slot name="no-options">
641
+ </slot>`)}
642
+ ${f((e) => !e.loading && e.searchText === "", r`<slot name="no-options">
1029
643
  ${(e) => e.locale.searchableSelect.noOptionsMessage}
1030
- </slot>`
1031
- )}
1032
- ${v(
1033
- (e) => !e.loading && e.searchText !== "",
1034
- d`<slot name="no-matches">
644
+ </slot>`)}
645
+ ${f((e) => !e.loading && e.searchText !== "", r`<slot name="no-matches">
1035
646
  ${(e) => e.locale.searchableSelect.noMatchesMessage}
1036
- </slot>`
1037
- )}
1038
- </div>`
1039
- )}
647
+ </slot>`)}
648
+ </div>`)}
1040
649
  </div>
1041
650
  </${t}>
1042
651
  </div>
1043
652
  </div>
1044
653
  `;
1045
654
  }
1046
- const ye = (s) => {
1047
- const t = s.tagFor(b, !0);
1048
- return d`
655
+ var oe = (e) => {
656
+ let t = e.tagFor(J, !0);
657
+ return r`
1049
658
  <template
1050
659
  :_optionTagTagName="${() => t}"
1051
- @mousedown="${(e, o) => e._onMouseDown(o.event)}"
660
+ @mousedown="${(e, t) => e._onMouseDown(t.event)}"
1052
661
  >
1053
662
  <div class="control-wrapper">
1054
- ${xe(s)} ${(e) => e._getFeedbackTemplate(s)}
663
+ ${ae(e)} ${(t) => t._getFeedbackTemplate(e)}
1055
664
  </div>
1056
665
  </template>
1057
666
  `;
1058
- }, we = ({ shape: s, connotation: t, disabled: e, removable: o }) => w(
1059
- "base",
1060
- ["disabled", e],
1061
- ["removable", o],
1062
- [`shape-${s}`, !!s],
1063
- [`connotation-${t}`, !!t]
1064
- );
1065
- function $e(s) {
1066
- return d`
667
+ }, se = ({ shape: e, connotation: t, disabled: n, removable: r }) => _("base", ["disabled", n], ["removable", r], [`shape-${e}`, !!e], [`connotation-${t}`, !!t]);
668
+ function ce(e) {
669
+ return r`
1067
670
  <span
1068
671
  class="remove-button"
1069
- aria-label="${(t) => t.locale.searchableSelect.removeTagButtonLabel(t.label)}"
672
+ aria-label="${(e) => e.locale.searchableSelect.removeTagButtonLabel(e.label)}"
1070
673
  role="button"
1071
- tabindex="${(t) => t.disabled ? null : 0}"
1072
- @click="${(t) => t._onClickRemove()}"
674
+ tabindex="${(e) => e.disabled ? null : 0}"
675
+ @click="${(e) => e._onClickRemove()}"
1073
676
  >
1074
- <${s} name="close-line"></${s}>
677
+ <${e} name="close-line"></${e}>
1075
678
  </span>
1076
679
  `;
1077
680
  }
1078
- const Oe = (s) => {
1079
- const t = s.tagFor(M);
1080
- return d`<span class="${we}" aria-disabled="${(e) => e.disabled}">
681
+ //#endregion
682
+ //#region src/lib/searchable-select/index.ts
683
+ o(a("searchable-select", q, oe, [
684
+ j,
685
+ N,
686
+ h,
687
+ a("option-tag", J, (e) => {
688
+ let t = e.tagFor(m);
689
+ return r`<span class="${se}" aria-disabled="${(e) => e.disabled}">
1081
690
  <slot name="icon" aria-hidden="true">
1082
- ${v(
1083
- (e) => e.hasIconPlaceholder,
1084
- d`<div class="icon-placeholder"></div>`
1085
- )}
691
+ ${f((e) => e.hasIconPlaceholder, r`<div class="icon-placeholder"></div>`)}
1086
692
  </slot>
1087
- ${v(
1088
- (e) => e.label,
1089
- (e) => d`<span class="label">${e.label}</span>`
1090
- )}
1091
- ${v((e) => e.removable, $e(t))}
693
+ ${f((e) => e.label, (e) => r`<span class="label">${e.label}</span>`)}
694
+ ${f((e) => e.removable, ce(t))}
1092
695
  </span>`;
1093
- }, Te = D(
1094
- "option-tag",
1095
- b,
1096
- Oe,
1097
- [I],
1098
- {
1099
- styles: [ce],
1100
- shadowOptions: {
1101
- delegatesFocus: !0
1102
- }
1103
- }
1104
- ), Se = D(
1105
- "searchable-select",
1106
- n,
1107
- ye,
1108
- [
1109
- E,
1110
- P,
1111
- I,
1112
- Te,
1113
- K,
1114
- G,
1115
- N,
1116
- J
1117
- ],
1118
- {
1119
- styles: re
1120
- }
1121
- ), ke = U(
1122
- Se
1123
- );
1124
- ke();
696
+ }, [h], {
697
+ styles: [H],
698
+ shadowOptions: { delegatesFocus: !0 }
699
+ }),
700
+ C,
701
+ F,
702
+ te,
703
+ z
704
+ ], { styles: V }))();
705
+ //#endregion