@vonage/vivid 5.4.0 → 5.6.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 (351) hide show
  1. package/LICENSE.md +201 -0
  2. package/accordion/definition.cjs +5 -0
  3. package/accordion/definition.js +5 -0
  4. package/accordion/index.cjs +1 -1
  5. package/accordion/index.js +14 -3
  6. package/alert/definition.cjs +4 -12
  7. package/alert/definition.js +5 -13
  8. package/alert/index.cjs +11 -11
  9. package/alert/index.js +33 -37
  10. package/audio-player/definition.cjs +4 -0
  11. package/audio-player/definition.js +4 -0
  12. package/audio-player/index.cjs +1 -1
  13. package/audio-player/index.js +8 -2
  14. package/banner/definition.cjs +2 -4
  15. package/banner/definition.js +2 -4
  16. package/banner/index.cjs +2 -2
  17. package/banner/index.js +1 -1
  18. package/breadcrumb/definition.cjs +1 -0
  19. package/breadcrumb/definition.js +1 -0
  20. package/breadcrumb/index.cjs +1 -1
  21. package/breadcrumb/index.js +1 -0
  22. package/bundled/affix.js +1 -1
  23. package/bundled/anchored.cjs +1 -1
  24. package/bundled/anchored.js +6 -6
  25. package/bundled/attribute-binding-behaviour.cjs +1 -1
  26. package/bundled/attribute-binding-behaviour.js +3 -1
  27. package/bundled/base-color-picker.cjs +18 -13
  28. package/bundled/base-color-picker.js +107 -84
  29. package/bundled/base-progress.cjs +1 -1
  30. package/bundled/base-progress.js +3 -0
  31. package/bundled/button.cjs +1 -1
  32. package/bundled/button.js +14 -10
  33. package/bundled/calendar-picker.template.cjs +1 -1
  34. package/bundled/calendar-picker.template.js +4 -2
  35. package/bundled/char-count.cjs +1 -1
  36. package/bundled/char-count.js +1 -1
  37. package/bundled/definition10.cjs +7 -7
  38. package/bundled/definition10.js +29 -19
  39. package/bundled/definition11.cjs +12 -19
  40. package/bundled/definition11.js +73 -204
  41. package/bundled/definition12.cjs +19 -10
  42. package/bundled/definition12.js +218 -36
  43. package/bundled/definition13.cjs +10 -1
  44. package/bundled/definition13.js +38 -14
  45. package/bundled/definition14.cjs +1 -5
  46. package/bundled/definition14.js +15 -24
  47. package/bundled/definition15.cjs +5 -30
  48. package/bundled/definition15.js +22 -73
  49. package/bundled/definition16.cjs +30 -19
  50. package/bundled/definition16.js +74 -97
  51. package/bundled/definition17.cjs +19 -13
  52. package/bundled/definition17.js +86 -117
  53. package/bundled/definition18.cjs +13 -12
  54. package/bundled/definition18.js +125 -71
  55. package/bundled/definition19.cjs +16 -16
  56. package/bundled/definition19.js +132 -94
  57. package/bundled/definition2.cjs +8 -9
  58. package/bundled/definition2.js +89 -142
  59. package/bundled/definition22.cjs +1 -1
  60. package/bundled/definition22.js +1 -0
  61. package/bundled/definition3.cjs +1 -1
  62. package/bundled/definition3.js +2 -1
  63. package/bundled/definition5.cjs +1 -1
  64. package/bundled/definition5.js +9 -3
  65. package/bundled/definition6.cjs +1 -1
  66. package/bundled/definition6.js +1 -0
  67. package/bundled/definition7.cjs +1 -1
  68. package/bundled/definition7.js +7 -4
  69. package/bundled/definition8.cjs +1 -1
  70. package/bundled/definition8.js +1 -0
  71. package/bundled/definition9.cjs +6 -6
  72. package/bundled/definition9.js +545 -488
  73. package/bundled/delegates-aria.cjs +1 -1
  74. package/bundled/delegates-aria.js +3 -1
  75. package/bundled/form-associated.cjs +1 -1
  76. package/bundled/form-associated.js +11 -3
  77. package/bundled/host-semantics.js +4 -4
  78. package/bundled/listbox.cjs +1 -1
  79. package/bundled/listbox.js +22 -4
  80. package/bundled/localized.cjs +1 -1
  81. package/bundled/localized.js +149 -66
  82. package/bundled/mixins.cjs +4 -4
  83. package/bundled/mixins.js +11 -8
  84. package/bundled/picker-field.template.cjs +14 -14
  85. package/bundled/picker-field.template.js +36 -56
  86. package/bundled/scrollIntoView.cjs +1 -1
  87. package/bundled/scrollIntoView.js +4 -1
  88. package/bundled/text-field.cjs +1 -1
  89. package/bundled/text-field.js +1 -1
  90. package/bundled/time-selection-picker.template.cjs +12 -12
  91. package/bundled/time-selection-picker.template.js +16 -12
  92. package/bundled/trapped-focus.cjs +1 -0
  93. package/bundled/trapped-focus.js +26 -0
  94. package/bundled/vivid-element.cjs +4 -4
  95. package/bundled/vivid-element.js +529 -492
  96. package/calendar/definition.cjs +2 -0
  97. package/calendar/definition.js +2 -0
  98. package/calendar/index.cjs +13 -13
  99. package/calendar/index.js +174 -144
  100. package/checkbox/definition.cjs +1 -0
  101. package/checkbox/definition.js +1 -0
  102. package/color-picker/definition.cjs +213 -112
  103. package/color-picker/definition.js +213 -112
  104. package/color-picker/index.cjs +104 -75
  105. package/color-picker/index.js +417 -326
  106. package/combobox/definition.cjs +17 -6
  107. package/combobox/definition.js +17 -6
  108. package/combobox/index.cjs +14 -9
  109. package/combobox/index.js +54 -42
  110. package/contextual-help/index.cjs +1 -1
  111. package/contextual-help/index.js +1 -1
  112. package/custom-elements.json +6976 -484
  113. package/data-grid/definition.cjs +105 -7
  114. package/data-grid/definition.js +105 -7
  115. package/data-grid/index.cjs +52 -38
  116. package/data-grid/index.js +313 -242
  117. package/date-picker/index.cjs +1 -1
  118. package/date-picker/index.js +2 -2
  119. package/date-range-picker/definition.cjs +2 -0
  120. package/date-range-picker/definition.js +2 -0
  121. package/date-range-picker/index.cjs +1 -1
  122. package/date-range-picker/index.js +7 -3
  123. package/date-time-picker/index.cjs +1 -1
  124. package/date-time-picker/index.js +2 -2
  125. package/dial-pad/definition.cjs +148 -0
  126. package/dial-pad/definition.js +148 -0
  127. package/dial-pad/index.cjs +27 -20
  128. package/dial-pad/index.js +202 -101
  129. package/dialog/definition.cjs +1 -0
  130. package/dialog/definition.js +1 -0
  131. package/dialog/index.cjs +1 -1
  132. package/dialog/index.js +1 -0
  133. package/divider/index.cjs +1 -1
  134. package/divider/index.js +1 -1
  135. package/fab/definition.cjs +1 -0
  136. package/fab/definition.js +1 -0
  137. package/fab/index.cjs +1 -1
  138. package/fab/index.js +1 -0
  139. package/file-picker/definition.cjs +7 -2
  140. package/file-picker/definition.js +7 -2
  141. package/file-picker/index.cjs +6 -6
  142. package/file-picker/index.js +82 -73
  143. package/icon/definition.cjs +66 -41
  144. package/icon/definition.js +67 -42
  145. package/index.cjs +21 -0
  146. package/index.js +1 -1
  147. package/lib/color-picker/color-picker.d.ts +390 -12
  148. package/lib/color-picker/locale.d.ts +4 -0
  149. package/lib/data-grid/locale.d.ts +5 -0
  150. package/lib/date-picker/date-picker.d.ts +38 -38
  151. package/lib/date-range-picker/date-range-picker.d.ts +20 -20
  152. package/lib/date-time-picker/date-time-picker.d.ts +40 -40
  153. package/lib/dial-pad/dial-pad.d.ts +1 -0
  154. package/lib/icon/icon.d.ts +1 -1
  155. package/lib/menu/menu.d.ts +4 -4
  156. package/lib/rich-text-editor/definition.d.ts +3 -2
  157. package/lib/rich-text-editor/locale.d.ts +29 -3
  158. package/lib/rich-text-editor/popover.d.ts +19 -0
  159. package/lib/rich-text-editor/rich-text-editor.d.ts +16 -45
  160. package/lib/rich-text-editor/rich-text-editor.template.d.ts +2 -2
  161. package/lib/rich-text-editor/rte/config.d.ts +18 -0
  162. package/lib/rich-text-editor/rte/document.d.ts +28 -0
  163. package/lib/rich-text-editor/rte/exports.d.ts +23 -0
  164. package/lib/rich-text-editor/rte/feature.d.ts +46 -0
  165. package/lib/rich-text-editor/rte/features/internal/basic-text-blocks.d.ts +33 -0
  166. package/lib/rich-text-editor/rte/features/internal/foreign-html.d.ts +11 -0
  167. package/lib/rich-text-editor/rte/features/internal/history.d.ts +10 -0
  168. package/lib/rich-text-editor/rte/features/internal/text-style.d.ts +18 -0
  169. package/lib/rich-text-editor/rte/html-parser.d.ts +24 -0
  170. package/lib/rich-text-editor/rte/html-serializer.d.ts +30 -0
  171. package/lib/rich-text-editor/rte/instance.d.ts +57 -0
  172. package/lib/rich-text-editor/rte/utils/default-textblock.d.ts +2 -0
  173. package/lib/rich-text-editor/rte/utils/impl.d.ts +1 -0
  174. package/lib/rich-text-editor/rte/utils/textblock-attrs.d.ts +29 -0
  175. package/lib/rich-text-editor/rte/utils/textblock-marks.d.ts +10 -0
  176. package/lib/rich-text-editor/rte/utils/ui.d.ts +109 -0
  177. package/lib/simple-color-picker/simple-color-picker.d.ts +6 -5
  178. package/lib/text-area/text-area.d.ts +1 -1
  179. package/lib/text-field/text-field.d.ts +1 -1
  180. package/lib/time-picker/time-picker.d.ts +20 -20
  181. package/lib/toggletip/toggletip.d.ts +4 -4
  182. package/lib/tooltip/tooltip.d.ts +4 -4
  183. package/locales/de-DE.cjs +58 -7
  184. package/locales/de-DE.js +58 -7
  185. package/locales/en-GB.cjs +60 -9
  186. package/locales/en-GB.js +60 -9
  187. package/locales/en-US.cjs +60 -9
  188. package/locales/en-US.js +60 -9
  189. package/locales/ja-JP.cjs +59 -8
  190. package/locales/ja-JP.js +59 -8
  191. package/locales/zh-CN.cjs +58 -7
  192. package/locales/zh-CN.js +58 -7
  193. package/menu/definition.cjs +1 -0
  194. package/menu/definition.js +1 -0
  195. package/number-field/definition.cjs +5 -3
  196. package/number-field/definition.js +5 -3
  197. package/number-field/index.cjs +5 -3
  198. package/number-field/index.js +34 -32
  199. package/option/index.cjs +1 -1
  200. package/option/index.js +1 -1
  201. package/package.json +76 -62
  202. package/pagination/definition.cjs +2 -0
  203. package/pagination/definition.js +2 -0
  204. package/pagination/index.cjs +1 -1
  205. package/pagination/index.js +2 -0
  206. package/progress-ring/index.cjs +1 -1
  207. package/progress-ring/index.js +1 -1
  208. package/radio/definition.cjs +4 -0
  209. package/radio/definition.js +4 -0
  210. package/radio/index.cjs +1 -1
  211. package/radio/index.js +1 -1
  212. package/radio-group/index.cjs +1 -1
  213. package/radio-group/index.js +1 -1
  214. package/range-slider/definition.cjs +2 -1
  215. package/range-slider/definition.js +2 -1
  216. package/range-slider/index.cjs +1 -1
  217. package/range-slider/index.js +3 -1
  218. package/rich-text-editor/definition.cjs +17942 -1074
  219. package/rich-text-editor/definition.js +17926 -1079
  220. package/rich-text-editor/index.cjs +29 -130
  221. package/rich-text-editor/index.js +5565 -2474
  222. package/searchable-select/definition.cjs +6 -2
  223. package/searchable-select/definition.js +6 -2
  224. package/searchable-select/index.cjs +1 -1
  225. package/searchable-select/index.js +14 -10
  226. package/select/definition.cjs +22 -4
  227. package/select/definition.js +22 -4
  228. package/selectable-box/index.cjs +1 -1
  229. package/selectable-box/index.js +1 -1
  230. package/shared/color-picker/base-color-picker.d.ts +2 -1
  231. package/shared/patterns/anchored.d.ts +8 -8
  232. package/shared/patterns/char-count/char-count.d.ts +1 -1
  233. package/shared/patterns/localized.d.ts +386 -0
  234. package/shared/picker-field/mixins/calendar-picker.d.ts +10 -10
  235. package/shared/picker-field/mixins/calendar-picker.template.d.ts +10 -10
  236. package/shared/picker-field/mixins/min-max-calendar-picker.d.ts +20 -20
  237. package/shared/picker-field/mixins/single-date-picker.d.ts +28 -28
  238. package/shared/picker-field/mixins/single-value-picker.d.ts +8 -8
  239. package/shared/picker-field/mixins/time-selection-picker.d.ts +20 -20
  240. package/shared/picker-field/mixins/time-selection-picker.template.d.ts +20 -20
  241. package/shared/utils/promise.d.ts +7 -0
  242. package/simple-color-picker/definition.cjs +11 -6
  243. package/simple-color-picker/definition.js +11 -6
  244. package/simple-color-picker/index.cjs +6 -6
  245. package/simple-color-picker/index.js +44 -39
  246. package/slider/definition.cjs +7 -1
  247. package/slider/definition.js +7 -1
  248. package/styles/core/all.css +5 -1
  249. package/styles/core/theme.css +5 -1
  250. package/styles/core/typography.css +1 -1
  251. package/styles/tokens/theme-dark.css +4 -4
  252. package/styles/tokens/theme-light.css +4 -4
  253. package/styles/tokens/vivid-2-compat.css +1 -1
  254. package/switch/definition.cjs +1 -0
  255. package/switch/definition.js +1 -0
  256. package/switch/index.cjs +1 -1
  257. package/switch/index.js +1 -0
  258. package/tabs/definition.cjs +2 -0
  259. package/tabs/definition.js +2 -0
  260. package/tabs/index.cjs +1 -1
  261. package/tabs/index.js +2 -0
  262. package/tag/definition.cjs +34 -14
  263. package/tag/definition.js +34 -14
  264. package/tag/index.cjs +25 -12
  265. package/tag/index.js +64 -47
  266. package/tag-group/definition.cjs +1 -2
  267. package/tag-group/definition.js +1 -2
  268. package/tag-group/index.cjs +1 -1
  269. package/tag-group/index.js +11 -12
  270. package/text-area/definition.cjs +13 -7
  271. package/text-area/definition.js +13 -7
  272. package/text-area/index.cjs +6 -6
  273. package/text-area/index.js +20 -14
  274. package/text-field/definition.cjs +16 -6
  275. package/text-field/definition.js +16 -6
  276. package/time-picker/index.cjs +1 -1
  277. package/time-picker/index.js +1 -1
  278. package/toggletip/definition.cjs +5 -1
  279. package/toggletip/definition.js +5 -1
  280. package/toggletip/index.cjs +1 -1
  281. package/toggletip/index.js +1 -1
  282. package/tooltip/definition.cjs +6 -3
  283. package/tooltip/definition.js +6 -3
  284. package/tooltip/index.cjs +1 -1
  285. package/tooltip/index.js +1 -1
  286. package/tree-view/definition.cjs +28 -6
  287. package/tree-view/definition.js +28 -6
  288. package/tree-view/index.cjs +1 -1
  289. package/tree-view/index.js +28 -6
  290. package/unbundled/_commonjsHelpers.cjs +0 -26
  291. package/unbundled/_commonjsHelpers.js +1 -26
  292. package/unbundled/attribute-binding-behaviour.cjs +1 -0
  293. package/unbundled/attribute-binding-behaviour.js +1 -0
  294. package/unbundled/base-color-picker.cjs +45 -21
  295. package/unbundled/base-color-picker.js +45 -21
  296. package/unbundled/base-progress.cjs +3 -0
  297. package/unbundled/base-progress.js +3 -0
  298. package/unbundled/button.cjs +14 -10
  299. package/unbundled/button.js +14 -10
  300. package/unbundled/calendar-picker.template.cjs +3 -1
  301. package/unbundled/calendar-picker.template.js +3 -1
  302. package/unbundled/definition.cjs +1 -0
  303. package/unbundled/definition.js +1 -0
  304. package/unbundled/definition2.cjs +4 -1
  305. package/unbundled/definition2.js +4 -1
  306. package/unbundled/definition3.cjs +1 -0
  307. package/unbundled/definition3.js +1 -0
  308. package/unbundled/definition4.cjs +1 -0
  309. package/unbundled/definition4.js +1 -0
  310. package/unbundled/definition5.cjs +3 -2
  311. package/unbundled/definition5.js +4 -3
  312. package/unbundled/delegates-aria.cjs +1 -0
  313. package/unbundled/delegates-aria.js +1 -0
  314. package/unbundled/form-associated.cjs +4 -0
  315. package/unbundled/form-associated.js +4 -0
  316. package/unbundled/listbox.cjs +16 -1
  317. package/unbundled/listbox.js +16 -1
  318. package/unbundled/localized.cjs +36 -0
  319. package/unbundled/localized.js +37 -2
  320. package/unbundled/mixins.cjs +2 -0
  321. package/unbundled/mixins.js +2 -0
  322. package/unbundled/picker-field.template.cjs +3 -35
  323. package/unbundled/picker-field.template.js +3 -34
  324. package/unbundled/scrollIntoView.cjs +1 -0
  325. package/unbundled/scrollIntoView.js +1 -0
  326. package/unbundled/text-field.cjs +1 -1
  327. package/unbundled/text-field.js +1 -1
  328. package/unbundled/time-selection-picker.template.cjs +5 -1
  329. package/unbundled/time-selection-picker.template.js +5 -1
  330. package/unbundled/trapped-focus.cjs +37 -0
  331. package/unbundled/trapped-focus.js +34 -0
  332. package/unbundled/vivid-element.cjs +1 -1
  333. package/unbundled/vivid-element.js +1 -1
  334. package/video-player/definition.cjs +54 -44
  335. package/video-player/definition.js +50 -40
  336. package/video-player/index.cjs +28 -28
  337. package/video-player/index.js +1448 -1442
  338. package/visually-hidden/index.cjs +1 -1
  339. package/visually-hidden/index.js +1 -1
  340. package/vivid.api.json +6463 -6099
  341. package/bundled/_has.cjs +0 -1
  342. package/bundled/_has.js +0 -34
  343. package/lib/rich-text-editor/facades/prose-mirror-vivid.schema.d.ts +0 -4
  344. package/lib/rich-text-editor/facades/vivid-prose-mirror.facade.d.ts +0 -18
  345. package/lib/rich-text-editor/image-placeholder/definition.d.ts +0 -2
  346. package/lib/rich-text-editor/image-placeholder/image-placeholder.d.ts +0 -7
  347. package/lib/rich-text-editor/image-placeholder/image-placeholder.template.d.ts +0 -4
  348. package/lib/rich-text-editor/menubar/consts.d.ts +0 -18
  349. package/lib/rich-text-editor/menubar/definition.d.ts +0 -2
  350. package/lib/rich-text-editor/menubar/menubar.d.ts +0 -386
  351. package/lib/rich-text-editor/menubar/menubar.template.d.ts +0 -4
@@ -1,8 +1,8 @@
1
1
  import { i as T } from "./definition2.js";
2
- import { V as _, U as k, w as E, a, n as h, o as C, h as p, c as H, d as M } from "./vivid-element.js";
3
- import { a as L, g as F, r as y, f as w } from "./mixins.js";
4
- import { v as W } from "./definition13.js";
5
- import { c as D } from "./definition12.js";
2
+ import { U as _, w as k, V as E, a, n as h, o as b, h as p, c as H, d as M } from "./vivid-element.js";
3
+ import { a as L, g as w, r as y, f as F } from "./mixins.js";
4
+ import { v as W } from "./definition14.js";
5
+ import { c as D } from "./definition13.js";
6
6
  import { D as S, d as B } from "./delegates-aria.js";
7
7
  import { F as O } from "./form-associated.js";
8
8
  import { W as A } from "./char-count.js";
@@ -26,7 +26,7 @@ const K = {
26
26
  * A text TextField
27
27
  */
28
28
  text: "text"
29
- }, Q = "_vvd-3-text-field-safari-workaround", v = new E([
29
+ }, Q = "_vvd-3-text-field-safari-workaround", v = new k([
30
30
  `
31
31
  .${Q}::placeholder {
32
32
  opacity: 1 !important;
@@ -42,73 +42,83 @@ class t extends N(
42
42
  A(
43
43
  z(
44
44
  V(
45
- q(R(S(O(_))))
45
+ q(R(S(O(E))))
46
46
  )
47
47
  )
48
48
  )
49
49
  )
50
50
  ) {
51
51
  constructor() {
52
- super(...arguments), this.proxy = document.createElement("input"), this.type = K.text, this.#e = F();
52
+ super(...arguments), this.proxy = document.createElement("input"), this.type = K.text, this.#e = w();
53
53
  }
54
54
  /**
55
55
  * @internal
56
56
  */
57
57
  readOnlyChanged() {
58
+ /* v8 ignore if -- @preserve */
58
59
  this.proxy instanceof HTMLInputElement && (this.proxy.readOnly = this.readOnly, this.validate());
59
60
  }
60
61
  /**
61
62
  * @internal
62
63
  */
63
64
  autofocusChanged() {
65
+ /* v8 ignore if -- @preserve */
64
66
  this.proxy instanceof HTMLInputElement && (this.proxy.autofocus = this.autofocus, this.validate());
65
67
  }
66
68
  /**
67
69
  * @internal
68
70
  */
69
71
  placeholderChanged() {
72
+ /* v8 ignore if -- @preserve */
70
73
  this.proxy instanceof HTMLInputElement && (this.proxy.placeholder = this.placeholder);
71
74
  }
72
75
  /**
73
76
  * @internal
74
77
  */
75
78
  typeChanged() {
79
+ /* v8 ignore if -- @preserve */
76
80
  this.proxy instanceof HTMLInputElement && (this.proxy.type = this.type, this.validate());
77
81
  }
78
82
  /**
79
83
  * @internal
80
84
  */
81
85
  listChanged() {
86
+ /* v8 ignore if -- @preserve */
82
87
  this.proxy instanceof HTMLInputElement && (this.proxy.setAttribute("list", this.list), this.validate());
83
88
  }
84
89
  /**
85
90
  * @internal
86
91
  */
87
92
  maxlengthChanged() {
93
+ /* v8 ignore if -- @preserve */
88
94
  this.proxy instanceof HTMLInputElement && (this.proxy.maxLength = this.maxlength, this.validate());
89
95
  }
90
96
  /**
91
97
  * @internal
92
98
  */
93
99
  minlengthChanged() {
100
+ /* v8 ignore if -- @preserve */
94
101
  this.proxy instanceof HTMLInputElement && (this.proxy.minLength = this.minlength, this.validate());
95
102
  }
96
103
  /**
97
104
  * @internal
98
105
  */
99
106
  patternChanged() {
107
+ /* v8 ignore if -- @preserve */
100
108
  this.proxy instanceof HTMLInputElement && (this.proxy.pattern = this.pattern, this.validate());
101
109
  }
102
110
  /**
103
111
  * @internal
104
112
  */
105
113
  sizeChanged() {
114
+ /* v8 ignore if -- @preserve */
106
115
  this.proxy instanceof HTMLInputElement && (this.proxy.size = this.size);
107
116
  }
108
117
  /**
109
118
  * @internal
110
119
  */
111
120
  spellcheckChanged() {
121
+ /* v8 ignore if -- @preserve */
112
122
  this.proxy instanceof HTMLInputElement && (this.proxy.spellcheck = this.spellcheck);
113
123
  }
114
124
  /**
@@ -158,7 +168,7 @@ class t extends N(
158
168
  super.validate(this.control);
159
169
  }
160
170
  connectedCallback() {
161
- super.connectedCallback(), this.proxy.setAttribute("type", this.type), this.validate(), this.autofocus && k.enqueue(() => {
171
+ super.connectedCallback(), this.proxy.setAttribute("type", this.type), this.validate(), this.autofocus && _.enqueue(() => {
162
172
  this.focus();
163
173
  }), this._updateControlValueIfNeeded(), X(this), this._renderCharCountRemaining();
164
174
  }
@@ -219,10 +229,10 @@ o([
219
229
  a({ attribute: "inputmode" })
220
230
  ], t.prototype, "inputMode");
221
231
  o([
222
- C
232
+ b
223
233
  ], t.prototype, "actionItemsSlottedContent");
224
234
  o([
225
- C
235
+ b
226
236
  ], t.prototype, "leadingActionItemsSlottedContent");
227
237
  const x = (i) => `vvd-text-field-control-${i}`, Y = ({
228
238
  errorValidationMessage: i,
@@ -232,7 +242,7 @@ const x = (i) => `vvd-text-field-control-${i}`, Y = ({
232
242
  placeholder: n,
233
243
  appearance: l,
234
244
  shape: r,
235
- label: b,
245
+ label: C,
236
246
  successText: $,
237
247
  actionItemsSlottedContent: I,
238
248
  leadingActionItemsSlottedContent: u,
@@ -246,7 +256,7 @@ const x = (i) => `vvd-text-field-control-${i}`, Y = ({
246
256
  ["placeholder", !!n],
247
257
  [`appearance-${l}`, !!l],
248
258
  [`shape-${r}`, !!r],
249
- ["no-label", !b],
259
+ ["no-label", !C],
250
260
  ["has-icon", !!m],
251
261
  ["success", !!$],
252
262
  ["action-items", !!I?.length],
@@ -257,20 +267,20 @@ const x = (i) => `vvd-text-field-control-${i}`, Y = ({
257
267
  const s = P(i);
258
268
  return p`
259
269
  <div class="base ${Y}">
260
- <div
261
- class="label-suffix"
262
- ?hidden=${(e) => !(e.charCount && e.maxlength) && !e._hasContextualHelp}
263
- >
264
- ${g(
270
+ ${g(
265
271
  (e) => e.charCount && e.maxlength,
266
272
  (e) => e._getCharCountTemplate(i)
267
273
  )}
274
+ <div
275
+ class="label-wrapper"
276
+ ?hidden=${(e) => !e.label && !e._hasContextualHelp}
277
+ >
278
+ <slot class="label" name="_label"></slot>
268
279
  <slot
269
280
  name="contextual-help"
270
281
  ${d("_contextualHelpSlottedContent")}
271
282
  ></slot>
272
283
  </div>
273
- <slot class="label" name="_label"></slot>
274
284
  ${y(p`
275
285
  ${g(
276
286
  (e) => e.label,
@@ -341,7 +351,7 @@ const x = (i) => `vvd-text-field-control-${i}`, Y = ({
341
351
  Z,
342
352
  [
343
353
  T,
344
- w,
354
+ F,
345
355
  W,
346
356
  D
347
357
  ],
@@ -1,19 +1,12 @@
1
- "use strict";const v=require("./definition2.cjs"),t=require("./vivid-element.cjs"),p=require("./affix.cjs"),h=require("./host-semantics.cjs"),f=require("./dom.cjs"),l=require("./when.cjs"),m=require("./class-names.cjs");var x=Object.defineProperty,_=Object.getOwnPropertyDescriptor,n=(e,o,i,a)=>{for(var c=a>1?void 0:a?_(o,i):o,s=e.length-1,d;s>=0;s--)(d=e[s])&&(c=(a?d(o,i,c):d(c))||c);return a&&c&&x(o,i,c),c};function y(e){return f.isHTMLElement(e)&&(e.getAttribute("role")==="option"||e instanceof HTMLOptionElement||e instanceof r)}class r extends h.HostSemantics(p.AffixIconWithTrailing(t.VividElement)){constructor(o,i,a,c){super(),this.defaultSelected=!1,this.dirtySelected=!1,this.value="",this._highlighted=!1,this._displayCheckmark=!1,this._vvdSearchText="",this._isNotMatching=!1,o&&(this.text=o),i&&(this.value=i),a&&(this.defaultSelected=a),c&&(this.selected=c),this.proxy=new Option(this.text,this.value,this.defaultSelected,this.selected),this.proxy.disabled=this.disabled}defaultSelectedChanged(){this.dirtySelected||(this.selected=this.defaultSelected,this.proxy instanceof HTMLOptionElement&&(this.proxy.selected=this.defaultSelected)),this.proxy instanceof HTMLOptionElement&&(this.proxy.defaultSelected=this.defaultSelected)}disabledChanged(){this.proxy instanceof HTMLOptionElement&&(this.proxy.disabled=this.disabled)}get selectedAttribute(){return this.defaultSelected}set selectedAttribute(o){this.defaultSelected=o}selectedChanged(){this.dirtySelected||(this.dirtySelected=!0),this.proxy instanceof HTMLOptionElement&&(this.proxy.selected=this.selected)}valueChanged(){if(typeof this.value!="string"){this.value="";return}this.proxy instanceof HTMLOptionElement&&(this.proxy.value=this.value)}get label(){return this._label??this.text}set label(o){this._label=o}set text(o){this._text=o}get text(){return this._text??""}_getAccessibleName(){return this.ariaLabel||`${this.text}${this.textSecondary?` ${this.textSecondary}`:""}`}get form(){return null}get _hasMatchedText(){return!!(this.matchedText??this._vvdSearchText)}get _matchedRange(){const o=this.matchedText??this._vvdSearchText;if(o){const i=this.text.toLowerCase().indexOf(o.toLowerCase());return i===-1?{from:0,to:0}:{from:i,to:i+o.length}}return{from:0,to:0}}connectedCallback(){super.connectedCallback(),this.dirtySelected||(this.selected=this.defaultSelected,this.dirtySelected=!1)}}n([t.attr({converter:{fromView:e=>{if(e===!0||e==="true")return!0;if(e===!1||e==="false")return!1},toView:e=>e}})],r.prototype,"checked",2);n([t.attr({attribute:"selected",mode:"boolean"})],r.prototype,"defaultSelected",2);n([t.attr({mode:"boolean"})],r.prototype,"disabled",2);n([t.attr({attribute:"current-selected",mode:"boolean"})],r.prototype,"selected",2);n([t.attr({attribute:"value"})],r.prototype,"value",2);n([t.attr({attribute:"label"})],r.prototype,"_label",2);n([t.attr({attribute:"text"})],r.prototype,"_text",2);n([t.attr({attribute:"text-secondary"})],r.prototype,"textSecondary",2);n([t.observable],r.prototype,"_highlighted",2);n([t.observable],r.prototype,"_displayCheckmark",2);n([t.attr({attribute:"matched-text"})],r.prototype,"matchedText",2);n([t.observable],r.prototype,"_vvdSearchText",2);n([t.volatile],r.prototype,"_hasMatchedText",1);n([t.observable],r.prototype,"_isNotMatching",2);n([t.volatile],r.prototype,"_matchedRange",1);n([t.attr({attribute:"tag-connotation"})],r.prototype,"tagConnotation",2);const u=e=>m.classNames("base",["disabled",e.disabled],["selected",!!e.selected],["hover",!!e._highlighted],["active",!!e.checked],["icon",!!e.icon],["two-lines",!!e.text?.length&&!!e.textSecondary?.length]);function g(){return t.html`${l.when(e=>e.text||e.textSecondary,t.html`<span class="text">
2
- ${l.when(e=>e.text,t.html`<span class="text-primary">
3
- ${l.when(e=>e._hasMatchedText,t.html`${e=>e.text.slice(0,e._matchedRange.from)}<span class="match"
4
- >${e=>e.text.slice(e._matchedRange.from,e._matchedRange.to)}</span
5
- >`)}${e=>e.text.slice(e._matchedRange.to)}
6
- </span>`)}
7
- ${l.when(e=>e.textSecondary,t.html`<span class="text-secondary">${e=>e.textSecondary}</span>`)}
8
- </span>`)}`}const S=e=>{const o=p.affixIconTemplateFactory(e),i=e.tagFor(v.Icon);return t.html`
9
- <template
10
- ${h.applyHostSemantics({role:"option",ariaChecked:a=>a.checked,ariaSelected:a=>a.selected,ariaDisabled:a=>a.disabled})}
11
- style="${a=>a._isNotMatching?"display: none":""}"
12
- >
13
- <div class="${u}">
14
- ${a=>o(a.icon,p.IconWrapper.Slot)} ${g()}
15
- <slot name="trailing-meta"></slot>
16
- ${l.when(a=>a._displayCheckmark&&a.selected,t.html`<${i} class="checkmark" name="check-line"></${i}>`)}
17
- </div>
18
- </template>
19
- `},w=":host([disabled]){cursor:not-allowed}.base{--_connotation-color-primary: var(--vvd-option-accent-primary, var(--vvd-color-canvas-text));--_connotation-color-primary-text: var(--vvd-option-accent-primary-text, var(--vvd-color-canvas));--_connotation-color-primary-increment: var(--vvd-option-accent-primary-increment, var(--vvd-color-neutral-800));--_connotation-color-firm: var(--vvd-option-accent-firm, var(--vvd-color-canvas-text));--_connotation-color-faint: var(--vvd-option-accent-faint, var(--vvd-color-neutral-50));--_connotation-color-soft: var(--vvd-option-accent-soft, var(--vvd-color-neutral-100));--_connotation-color-pale: var(--vvd-option-accent-pale, var(--vvd-color-neutral-300));--_connotation-color-dim: var(--vvd-option-accent-dim, var(--vvd-color-neutral-200))}.base{--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}@media (hover: hover){.base:hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-faint);--_appearance-color-outline: transparent}}.base.hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-faint);--_appearance-color-outline: transparent}.base:disabled{--_appearance-color-text: var(--vvd-color-neutral-300);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}.base.disabled{--_appearance-color-text: var(--vvd-color-neutral-300);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}.base:active:where(:not(.disabled,:disabled)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-soft);--_appearance-color-outline: transparent}.base.active:where(:not(.disabled,:disabled)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-soft);--_appearance-color-outline: transparent}.base.selected:where(:not(.disabled,:disabled)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-soft);--_appearance-color-outline: transparent}@media (hover: hover){.base.selected:hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-dim);--_appearance-color-outline: transparent}}.base.selected.hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-dim);--_appearance-color-outline: transparent}.base{display:flex;box-sizing:border-box;align-items:center;border-radius:8px;background-color:var(--_appearance-color-fill);box-shadow:inset 0 0 0 1px var(--_appearance-color-outline);color:var(--_option-appearance-color-text, var(--_appearance-color-text));font:var(--vvd-typography-base);gap:var(--_option-gap);hyphens:auto;inline-size:100%;min-block-size:var(--_option-min-block-size);padding-inline:var(--_option-padding-inline);vertical-align:middle;word-break:break-word}.base{--_option-min-block-size: calc(1px*(40 + 4*clamp(-1, var(--vvd-size-density, 0), 2))) ;--_option-padding-inline: calc(1px*(40 + 4*clamp(-1, var(--vvd-size-density, 0), 2))*.4) ;--_option-icon-size: calc(1px*(40 + 4*clamp(-1, var(--vvd-size-density, 0), 2))/2) }.base:not(.two-lines){--_option-gap: calc( calc(1px*(36 + 4*clamp(-1, var(--vvd-size-density, 0), 2))) / 3);padding-block:calc(1px*(40 + 4*clamp(-1,var(--vvd-size-density, 0),2))/4)}.base.two-lines{gap:calc(1px*(40 + 4*clamp(-1,var(--vvd-size-density, 0),2))*.4);padding-block:calc(1px*(24 + 4*clamp(-1,var(--vvd-size-density, 0),2))/2)}@supports (user-select: none){.base{user-select:none}}.base:not(.disabled){cursor:pointer}.base.disabled{pointer-events:none}:host([scale=condensed]) .base{--_option-min-block-size: calc(1px*(32 + 4*clamp(-1, var(--vvd-size-density, 0), 2))) ;--_option-padding-inline: calc(1px*(24 + 4*clamp(-1, var(--vvd-size-density, 0), 2))/2) ;--_option-icon-size: calc(1px*(40 + 4*clamp(-1, var(--vvd-size-density, 0), 2))*.4) }:host([scale=condensed]) .base:not(.two-lines){--_option-gap: calc(1px*(40 + 4*clamp(-1, var(--vvd-size-density, 0), 2))/5) ;padding-block:calc(calc(1px*(36 + 4*clamp(-1,var(--vvd-size-density, 0),2))) / 6)}:host([scale=condensed]) .base.two-lines{gap:calc(calc(1px*(36 + 4*clamp(-1,var(--vvd-size-density, 0),2))) / 3);padding-block:calc(1px*(32 + 4*clamp(-1,var(--vvd-size-density, 0),2))/4)}.base.active{--focus-stroke-color: var(--vvd-color-cta-500);--focus-stroke-gap-color: transparent;box-shadow:0 0 0 4px color-mix(in srgb,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))}.base.hidden{display:none}.text{display:flex;flex-direction:column;font:var(--vvd-typography-base);gap:4px;margin-inline-end:auto}.text-primary,.text-secondary{display:block;font:var(--vvd-typography-base)}.text-primary{font:var(--vvd-typography-base)}.base:not(.disabled) .text-primary{color:var(--vvd-color-canvas-text)}.base.disabled .text-primary{color:var(--_appearance-color-text)}.base.two-lines .text-primary{font:var(--vvd-typography-base-bold)}.text-secondary{color:var(--vvd-color-neutral-800);font:var(--vvd-typography-base-condensed)}.base.two-lines .text-secondary{color:var(--vvd-color-neutral-600)}.base.disabled .text-secondary{color:var(--_appearance-color-text)}.base.selected:not(.disabled) .text-secondary{color:var(--vvd-color-neutral-800)}.match{color:var(--vvd-color-cta-600);font:var(--vvd-typography-base-bold)}slot[name=icon]{font-size:var(--_option-icon-size);line-height:1}.base:not(.disabled,.selected) slot[name=icon]{color:var(--vvd-color-neutral-600)}.checkmark{font-size:var(--_option-icon-size)}",b=t.defineVividComponent("option",r,S,[v.iconDefinition],{styles:w}),k=t.createRegisterFunction(b);exports.ListboxOption=r;exports.isListboxOption=y;exports.listboxOptionDefinition=b;exports.registerOption=k;
1
+ "use strict";const l=require("./definition9.cjs"),s=require("./vivid-element.cjs"),d=require("./anchored.cjs"),u=require("./index.cjs"),v=require("./class-names.cjs");var m=Object.defineProperty,p=(n,e,i,t)=>{for(var o=void 0,a=n.length-1,c;a>=0;a--)(c=n[a])&&(o=c(e,i,o)||o);return o&&m(e,i,o),o};class r extends d.Anchored(s.VividElement){constructor(){super(...arguments),this.open=!1,this.#t=()=>{this.open=!0,this.#i()},this.#e=()=>{this.open=!1,this.#i()},this.#n=e=>{/* v8 ignore else -- @preserve */e.key==="Escape"&&this.#e()}}connectedCallback(){super.connectedCallback(),this.#o()}disconnectedCallback(){super.disconnectedCallback(),this.#o()}_anchorElChanged(e,i){e&&this.#r(e),i&&this.#s(i)}#s(e){e.addEventListener("mouseover",this.#t),e.addEventListener("mouseout",this.#e),e.addEventListener("focusin",this.#t),e.addEventListener("focusout",this.#e),e.setAttribute("aria-haspopup","true"),e.setAttribute("aria-expanded",String(this.open))}#r(e){e.removeEventListener("mouseover",this.#t),e.removeEventListener("mouseout",this.#e),e.removeEventListener("focusin",this.#t),e.removeEventListener("focusout",this.#e),e.removeAttribute("aria-haspopup"),e.removeAttribute("aria-expanded")}#t;#e;#i(){this._anchorEl&&this._anchorEl.setAttribute("aria-expanded",String(this.open))}#o(){document.removeEventListener("keydown",this.#n),this.open&&this.isConnected&&document.addEventListener("keydown",this.#n)}#n;openChanged(e){e!==void 0&&this.#o()}}p([s.attr],r.prototype,"text");p([s.attr({mode:"fromView"})],r.prototype,"placement");p([s.attr({mode:"boolean"})],r.prototype,"open");const f=":host :host{display:var(--_popup-display, inline)}:host :host([slotted-anchor]){--_popup-display: contents}.control{pointer-events:none}.tooltip{width:var(--tooltip-inline-size, auto);box-sizing:border-box;padding:8px 12px;color:var(--vvd-color-canvas-text);font:var(--vvd-typography-base-bold);max-inline-size:var(--tooltip-max-inline-size, 30ch)}",E=({open:n})=>v.classNames("control",["open",!!n]),b=n=>{const e=n.tagFor(l.Popup),i=d.anchorSlotTemplateFactory();return s.html`
2
+ ${i}
3
+ <${e} class="${E}" arrow alternate
4
+ :placement=${t=>t.placement}
5
+ :anchor="${t=>t._anchorEl}"
6
+ :open="${t=>t.open}"
7
+ @keydown="${(t,o)=>{t.open&&u.handleEscapeKeyAndStopPropogation(o.event)&&(t.open=!1)}}"
8
+ exportparts="vvd-theme-alternate">
9
+ <div part="vvd-theme-alternate" class="tooltip" role="tooltip">
10
+ ${t=>t.text}
11
+ </div>
12
+ </${e}>`},h=s.defineVividComponent("tooltip",r,b,[l.popupDefinition],{styles:f}),g=s.createRegisterFunction(h);exports.Tooltip=r;exports.registerTooltip=g;exports.tooltipDefinition=h;
@@ -1,225 +1,94 @@
1
- import { I as b, i as f } from "./definition2.js";
2
- import { V as m, a as c, o as d, v as h, h as l, c as x, d as _ } from "./vivid-element.js";
3
- import { A as y, a as u, I as g } from "./affix.js";
4
- import { H as S, a as k } from "./host-semantics.js";
5
- import { i as w } from "./dom.js";
6
- import { w as s } from "./when.js";
7
- import { c as z } from "./class-names.js";
8
- var T = Object.defineProperty, $ = Object.getOwnPropertyDescriptor, r = (e, a, n, t) => {
9
- for (var i = t > 1 ? void 0 : t ? $(a, n) : a, p = e.length - 1, v; p >= 0; p--)
10
- (v = e[p]) && (i = (t ? v(a, n, i) : v(i)) || i);
11
- return t && i && T(a, n, i), i;
1
+ import { P as d, p as l } from "./definition9.js";
2
+ import { V as h, a, h as v, c as m, d as u } from "./vivid-element.js";
3
+ import { A as f, a as E } from "./anchored.js";
4
+ import { h as b } from "./index.js";
5
+ import { c as x } from "./class-names.js";
6
+ var y = Object.defineProperty, p = (n, e, s, t) => {
7
+ for (var o = void 0, r = n.length - 1, c; r >= 0; r--)
8
+ (c = n[r]) && (o = c(e, s, o) || o);
9
+ return o && y(e, s, o), o;
12
10
  };
13
- function V(e) {
14
- return w(e) && (e.getAttribute("role") === "option" || e instanceof HTMLOptionElement || e instanceof o);
15
- }
16
- class o extends S(
17
- y(m)
18
- ) {
19
- constructor(a, n, t, i) {
20
- super(), this.defaultSelected = !1, this.dirtySelected = !1, this.value = "", this._highlighted = !1, this._displayCheckmark = !1, this._vvdSearchText = "", this._isNotMatching = !1, a && (this.text = a), n && (this.value = n), t && (this.defaultSelected = t), i && (this.selected = i), this.proxy = new Option(
21
- this.text,
22
- this.value,
23
- this.defaultSelected,
24
- this.selected
25
- ), this.proxy.disabled = this.disabled;
26
- }
27
- defaultSelectedChanged() {
28
- this.dirtySelected || (this.selected = this.defaultSelected, this.proxy instanceof HTMLOptionElement && (this.proxy.selected = this.defaultSelected)), this.proxy instanceof HTMLOptionElement && (this.proxy.defaultSelected = this.defaultSelected);
29
- }
30
- disabledChanged() {
31
- this.proxy instanceof HTMLOptionElement && (this.proxy.disabled = this.disabled);
32
- }
33
- /**
34
- * @deprecated Use `defaultSelected` instead.
35
- */
36
- get selectedAttribute() {
37
- return this.defaultSelected;
38
- }
39
- set selectedAttribute(a) {
40
- this.defaultSelected = a;
41
- }
42
- selectedChanged() {
43
- this.dirtySelected || (this.dirtySelected = !0), this.proxy instanceof HTMLOptionElement && (this.proxy.selected = this.selected);
11
+ class i extends f(h) {
12
+ constructor() {
13
+ super(...arguments), this.open = !1, this.#t = () => {
14
+ this.open = !0, this.#s();
15
+ }, this.#e = () => {
16
+ this.open = !1, this.#s();
17
+ }, this.#n = (e) => {
18
+ /* v8 ignore else -- @preserve */
19
+ e.key === "Escape" && this.#e();
20
+ };
44
21
  }
45
- valueChanged() {
46
- if (typeof this.value != "string") {
47
- this.value = "";
48
- return;
49
- }
50
- this.proxy instanceof HTMLOptionElement && (this.proxy.value = this.value);
51
- }
52
- get label() {
53
- return this._label ?? this.text;
54
- }
55
- set label(a) {
56
- this._label = a;
57
- }
58
- set text(a) {
59
- this._text = a;
22
+ connectedCallback() {
23
+ super.connectedCallback(), this.#o();
60
24
  }
61
- get text() {
62
- return this._text ?? "";
25
+ disconnectedCallback() {
26
+ super.disconnectedCallback(), this.#o();
63
27
  }
64
28
  /**
65
- * Provides an accessible name for use by parent components.
66
- * Note: Does not implement full accessible name computation, e.g. slotted content is missed.
67
29
  * @internal
68
30
  */
69
- _getAccessibleName() {
70
- return this.ariaLabel || `${this.text}${this.textSecondary ? ` ${this.textSecondary}` : ""}`;
31
+ _anchorElChanged(e, s) {
32
+ e && this.#r(e), s && this.#i(s);
71
33
  }
72
- get form() {
73
- return null;
34
+ #i(e) {
35
+ e.addEventListener("mouseover", this.#t), e.addEventListener("mouseout", this.#e), e.addEventListener("focusin", this.#t), e.addEventListener("focusout", this.#e), e.setAttribute("aria-haspopup", "true"), e.setAttribute("aria-expanded", String(this.open));
74
36
  }
75
- get _hasMatchedText() {
76
- return !!(this.matchedText ?? this._vvdSearchText);
37
+ #r(e) {
38
+ e.removeEventListener("mouseover", this.#t), e.removeEventListener("mouseout", this.#e), e.removeEventListener("focusin", this.#t), e.removeEventListener("focusout", this.#e), e.removeAttribute("aria-haspopup"), e.removeAttribute("aria-expanded");
77
39
  }
78
- get _matchedRange() {
79
- const a = this.matchedText ?? this._vvdSearchText;
80
- if (a) {
81
- const n = this.text.toLowerCase().indexOf(a.toLowerCase());
82
- return n === -1 ? { from: 0, to: 0 } : {
83
- from: n,
84
- to: n + a.length
85
- };
86
- }
87
- return { from: 0, to: 0 };
40
+ #t;
41
+ #e;
42
+ #s() {
43
+ this._anchorEl && this._anchorEl.setAttribute("aria-expanded", String(this.open));
88
44
  }
45
+ #o() {
46
+ document.removeEventListener("keydown", this.#n), this.open && this.isConnected && document.addEventListener("keydown", this.#n);
47
+ }
48
+ #n;
89
49
  /**
90
50
  * @internal
91
51
  */
92
- connectedCallback() {
93
- super.connectedCallback(), this.dirtySelected || (this.selected = this.defaultSelected, this.dirtySelected = !1);
52
+ openChanged(e) {
53
+ e !== void 0 && this.#o();
94
54
  }
95
55
  }
96
- r([
97
- c({
98
- converter: {
99
- fromView: (e) => {
100
- if (e === !0 || e === "true")
101
- return !0;
102
- if (e === !1 || e === "false")
103
- return !1;
104
- },
105
- toView: (e) => e
106
- }
107
- })
108
- ], o.prototype, "checked", 2);
109
- r([
110
- c({ attribute: "selected", mode: "boolean" })
111
- ], o.prototype, "defaultSelected", 2);
112
- r([
113
- c({ mode: "boolean" })
114
- ], o.prototype, "disabled", 2);
115
- r([
116
- c({ attribute: "current-selected", mode: "boolean" })
117
- ], o.prototype, "selected", 2);
118
- r([
119
- c({ attribute: "value" })
120
- ], o.prototype, "value", 2);
121
- r([
122
- c({
123
- attribute: "label"
124
- })
125
- ], o.prototype, "_label", 2);
126
- r([
127
- c({
128
- attribute: "text"
129
- })
130
- ], o.prototype, "_text", 2);
131
- r([
132
- c({ attribute: "text-secondary" })
133
- ], o.prototype, "textSecondary", 2);
134
- r([
135
- d
136
- ], o.prototype, "_highlighted", 2);
137
- r([
138
- d
139
- ], o.prototype, "_displayCheckmark", 2);
140
- r([
141
- c({ attribute: "matched-text" })
142
- ], o.prototype, "matchedText", 2);
143
- r([
144
- d
145
- ], o.prototype, "_vvdSearchText", 2);
146
- r([
147
- h
148
- ], o.prototype, "_hasMatchedText", 1);
149
- r([
150
- d
151
- ], o.prototype, "_isNotMatching", 2);
152
- r([
153
- h
154
- ], o.prototype, "_matchedRange", 1);
155
- r([
156
- c({ attribute: "tag-connotation" })
157
- ], o.prototype, "tagConnotation", 2);
158
- const C = (e) => z(
159
- "base",
160
- ["disabled", e.disabled],
161
- ["selected", !!e.selected],
162
- ["hover", !!e._highlighted],
163
- ["active", !!e.checked],
164
- ["icon", !!e.icon],
165
- ["two-lines", !!e.text?.length && !!e.textSecondary?.length]
166
- );
167
- function O() {
168
- return l`${s(
169
- (e) => e.text || e.textSecondary,
170
- l`<span class="text">
171
- ${s(
172
- (e) => e.text,
173
- l`<span class="text-primary">
174
- ${s(
175
- (e) => e._hasMatchedText,
176
- l`${(e) => e.text.slice(0, e._matchedRange.from)}<span class="match"
177
- >${(e) => e.text.slice(e._matchedRange.from, e._matchedRange.to)}</span
178
- >`
179
- )}${(e) => e.text.slice(e._matchedRange.to)}
180
- </span>`
181
- )}
182
- ${s(
183
- (e) => e.textSecondary,
184
- l`<span class="text-secondary">${(e) => e.textSecondary}</span>`
185
- )}
186
- </span>`
187
- )}`;
188
- }
189
- const L = (e) => {
190
- const a = u(e), n = e.tagFor(b);
191
- return l`
192
- <template
193
- ${k({
194
- role: "option",
195
- ariaChecked: (t) => t.checked,
196
- ariaSelected: (t) => t.selected,
197
- ariaDisabled: (t) => t.disabled
198
- })}
199
- style="${(t) => t._isNotMatching ? "display: none" : ""}"
200
- >
201
- <div class="${C}">
202
- ${(t) => a(t.icon, g.Slot)} ${O()}
203
- <slot name="trailing-meta"></slot>
204
- ${s(
205
- (t) => t._displayCheckmark && t.selected,
206
- l`<${n} class="checkmark" name="check-line"></${n}>`
207
- )}
208
- </div>
209
- </template>
210
- `;
211
- }, M = ":host([disabled]){cursor:not-allowed}.base{--_connotation-color-primary: var(--vvd-option-accent-primary, var(--vvd-color-canvas-text));--_connotation-color-primary-text: var(--vvd-option-accent-primary-text, var(--vvd-color-canvas));--_connotation-color-primary-increment: var(--vvd-option-accent-primary-increment, var(--vvd-color-neutral-800));--_connotation-color-firm: var(--vvd-option-accent-firm, var(--vvd-color-canvas-text));--_connotation-color-faint: var(--vvd-option-accent-faint, var(--vvd-color-neutral-50));--_connotation-color-soft: var(--vvd-option-accent-soft, var(--vvd-color-neutral-100));--_connotation-color-pale: var(--vvd-option-accent-pale, var(--vvd-color-neutral-300));--_connotation-color-dim: var(--vvd-option-accent-dim, var(--vvd-color-neutral-200))}.base{--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}@media (hover: hover){.base:hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-faint);--_appearance-color-outline: transparent}}.base.hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-faint);--_appearance-color-outline: transparent}.base:disabled{--_appearance-color-text: var(--vvd-color-neutral-300);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}.base.disabled{--_appearance-color-text: var(--vvd-color-neutral-300);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}.base:active:where(:not(.disabled,:disabled)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-soft);--_appearance-color-outline: transparent}.base.active:where(:not(.disabled,:disabled)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-soft);--_appearance-color-outline: transparent}.base.selected:where(:not(.disabled,:disabled)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-soft);--_appearance-color-outline: transparent}@media (hover: hover){.base.selected:hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-dim);--_appearance-color-outline: transparent}}.base.selected.hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-dim);--_appearance-color-outline: transparent}.base{display:flex;box-sizing:border-box;align-items:center;border-radius:8px;background-color:var(--_appearance-color-fill);box-shadow:inset 0 0 0 1px var(--_appearance-color-outline);color:var(--_option-appearance-color-text, var(--_appearance-color-text));font:var(--vvd-typography-base);gap:var(--_option-gap);hyphens:auto;inline-size:100%;min-block-size:var(--_option-min-block-size);padding-inline:var(--_option-padding-inline);vertical-align:middle;word-break:break-word}.base{--_option-min-block-size: calc(1px*(40 + 4*clamp(-1, var(--vvd-size-density, 0), 2))) ;--_option-padding-inline: calc(1px*(40 + 4*clamp(-1, var(--vvd-size-density, 0), 2))*.4) ;--_option-icon-size: calc(1px*(40 + 4*clamp(-1, var(--vvd-size-density, 0), 2))/2) }.base:not(.two-lines){--_option-gap: calc( calc(1px*(36 + 4*clamp(-1, var(--vvd-size-density, 0), 2))) / 3);padding-block:calc(1px*(40 + 4*clamp(-1,var(--vvd-size-density, 0),2))/4)}.base.two-lines{gap:calc(1px*(40 + 4*clamp(-1,var(--vvd-size-density, 0),2))*.4);padding-block:calc(1px*(24 + 4*clamp(-1,var(--vvd-size-density, 0),2))/2)}@supports (user-select: none){.base{user-select:none}}.base:not(.disabled){cursor:pointer}.base.disabled{pointer-events:none}:host([scale=condensed]) .base{--_option-min-block-size: calc(1px*(32 + 4*clamp(-1, var(--vvd-size-density, 0), 2))) ;--_option-padding-inline: calc(1px*(24 + 4*clamp(-1, var(--vvd-size-density, 0), 2))/2) ;--_option-icon-size: calc(1px*(40 + 4*clamp(-1, var(--vvd-size-density, 0), 2))*.4) }:host([scale=condensed]) .base:not(.two-lines){--_option-gap: calc(1px*(40 + 4*clamp(-1, var(--vvd-size-density, 0), 2))/5) ;padding-block:calc(calc(1px*(36 + 4*clamp(-1,var(--vvd-size-density, 0),2))) / 6)}:host([scale=condensed]) .base.two-lines{gap:calc(calc(1px*(36 + 4*clamp(-1,var(--vvd-size-density, 0),2))) / 3);padding-block:calc(1px*(32 + 4*clamp(-1,var(--vvd-size-density, 0),2))/4)}.base.active{--focus-stroke-color: var(--vvd-color-cta-500);--focus-stroke-gap-color: transparent;box-shadow:0 0 0 4px color-mix(in srgb,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))}.base.hidden{display:none}.text{display:flex;flex-direction:column;font:var(--vvd-typography-base);gap:4px;margin-inline-end:auto}.text-primary,.text-secondary{display:block;font:var(--vvd-typography-base)}.text-primary{font:var(--vvd-typography-base)}.base:not(.disabled) .text-primary{color:var(--vvd-color-canvas-text)}.base.disabled .text-primary{color:var(--_appearance-color-text)}.base.two-lines .text-primary{font:var(--vvd-typography-base-bold)}.text-secondary{color:var(--vvd-color-neutral-800);font:var(--vvd-typography-base-condensed)}.base.two-lines .text-secondary{color:var(--vvd-color-neutral-600)}.base.disabled .text-secondary{color:var(--_appearance-color-text)}.base.selected:not(.disabled) .text-secondary{color:var(--vvd-color-neutral-800)}.match{color:var(--vvd-color-cta-600);font:var(--vvd-typography-base-bold)}slot[name=icon]{font-size:var(--_option-icon-size);line-height:1}.base:not(.disabled,.selected) slot[name=icon]{color:var(--vvd-color-neutral-600)}.checkmark{font-size:var(--_option-icon-size)}", H = _(
212
- "option",
213
- o,
56
+ p([
57
+ a
58
+ ], i.prototype, "text");
59
+ p([
60
+ a({ mode: "fromView" })
61
+ ], i.prototype, "placement");
62
+ p([
63
+ a({ mode: "boolean" })
64
+ ], i.prototype, "open");
65
+ const g = ":host :host{display:var(--_popup-display, inline)}:host :host([slotted-anchor]){--_popup-display: contents}.control{pointer-events:none}.tooltip{width:var(--tooltip-inline-size, auto);box-sizing:border-box;padding:8px 12px;color:var(--vvd-color-canvas-text);font:var(--vvd-typography-base-bold);max-inline-size:var(--tooltip-max-inline-size, 30ch)}", A = ({ open: n }) => x("control", ["open", !!n]), L = (n) => {
66
+ const e = n.tagFor(d), s = E();
67
+ return v`
68
+ ${s}
69
+ <${e} class="${A}" arrow alternate
70
+ :placement=${(t) => t.placement}
71
+ :anchor="${(t) => t._anchorEl}"
72
+ :open="${(t) => t.open}"
73
+ @keydown="${(t, o) => {
74
+ t.open && b(o.event) && (t.open = !1);
75
+ }}"
76
+ exportparts="vvd-theme-alternate">
77
+ <div part="vvd-theme-alternate" class="tooltip" role="tooltip">
78
+ ${(t) => t.text}
79
+ </div>
80
+ </${e}>`;
81
+ }, C = u(
82
+ "tooltip",
83
+ i,
214
84
  L,
215
- [f],
85
+ [l],
216
86
  {
217
- styles: M
87
+ styles: g
218
88
  }
219
- ), P = x(H);
89
+ ), P = m(C);
220
90
  export {
221
- o as L,
222
- V as i,
223
- H as l,
224
- P as r
91
+ i as T,
92
+ P as r,
93
+ C as t
225
94
  };
@@ -1,10 +1,19 @@
1
- "use strict";const l=require("./definition2.cjs"),i=require("./definition16.cjs"),n=require("./vivid-element.cjs"),v=require("./class-names.cjs");var d=Object.defineProperty,u=(o,r,a,x)=>{for(var t=void 0,e=o.length-1,c;e>=0;e--)(c=o[e])&&(t=c(r,a,t)||t);return t&&d(r,a,t),t};class s extends n.VividElement{constructor(){super(...arguments),this.placement="right"}}u([n.attr({mode:"fromView"})],s.prototype,"placement");const f=o=>v.classNames("control"),_=o=>{const r=o.tagFor(i.Toggletip),a=o.tagFor(l.Icon);return n.html`
2
- <${r} class="base" exportparts="vvd-theme-alternate">
3
- <button class="${f}" slot="anchor">
4
- <slot name="icon" slot="icon">
5
- <${a} name="help-solid"></${a}>
6
- </slot>
7
- </button>
8
- <slot></slot>
9
- </${r}>
10
- `},b=".control{--_connotation-color-primary: var(--vvd-button-accent-primary, var(--vvd-color-canvas-text));--_connotation-color-primary-text: var(--vvd-button-accent-primary-text, var(--vvd-color-canvas));--_connotation-color-primary-increment: var(--vvd-button-accent-primary-increment, var(--vvd-color-neutral-800));--_connotation-color-contrast: var(--vvd-button-accent-contrast, var(--vvd-color-neutral-800));--_connotation-color-fierce: var(--vvd-button-accent-fierce, var(--vvd-color-neutral-700));--_connotation-color-firm: var(--vvd-button-accent-firm, var(--vvd-color-canvas-text));--_connotation-color-soft: var(--vvd-button-accent-soft, var(--vvd-color-neutral-100));--_connotation-color-faint: var(--vvd-button-accent-faint, var(--vvd-color-neutral-50));--_connotation-color-fierce-primary: var(--vvd-button-accent-fierce-primary, var(--vvd-color-canvas-text))}.control{--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}@media (hover: hover){.control:hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-faint);--_appearance-color-outline: transparent}}.control.hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-faint);--_appearance-color-outline: transparent}.control:disabled{--_appearance-color-text: var(--vvd-color-neutral-300);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}.control.disabled{--_appearance-color-text: var(--vvd-color-neutral-300);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}.control:active:where(:not(.disabled,:disabled)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-soft);--_appearance-color-outline: transparent}.control.active:where(:not(.disabled,:disabled)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-soft);--_appearance-color-outline: transparent}.control{--focus-stroke-gap-color: transparent;display:inline-flex;box-sizing:border-box;align-items:center;justify-content:center;border:0 none;border-radius:50%;margin:0;background-color:var(--_appearance-color-fill);block-size:var(--_button-block-size, 24px);box-shadow:inset 0 0 0 1px var(--_appearance-color-outline);color:var(--_appearance-color-text);cursor:pointer;padding-inline:calc(var(--_button-block-size, 24px) / 6);vertical-align:middle}@supports (aspect-ratio: auto){.control{padding:0;aspect-ratio:1/1}}.control:focus-visible{box-shadow:0 0 0 4px color-mix(in srgb,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))}slot[name=icon]{font-size:var(--_button-icon-size, 16px);line-height:1}",p=n.defineVividComponent("contextual-help",s,_,[l.iconDefinition,i.toggletipDefinition],{styles:b}),m=n.createRegisterFunction(p);exports.contextualHelpDefinition=p;exports.registerContextualHelp=m;
1
+ "use strict";const v=require("./definition2.cjs"),t=require("./vivid-element.cjs"),p=require("./affix.cjs"),h=require("./host-semantics.cjs"),f=require("./dom.cjs"),l=require("./when.cjs"),m=require("./class-names.cjs");var x=Object.defineProperty,_=Object.getOwnPropertyDescriptor,n=(e,o,i,a)=>{for(var c=a>1?void 0:a?_(o,i):o,s=e.length-1,d;s>=0;s--)(d=e[s])&&(c=(a?d(o,i,c):d(c))||c);return a&&c&&x(o,i,c),c};function y(e){return f.isHTMLElement(e)&&(e.getAttribute("role")==="option"||e instanceof HTMLOptionElement||e instanceof r)}class r extends h.HostSemantics(p.AffixIconWithTrailing(t.VividElement)){constructor(o,i,a,c){super(),this.defaultSelected=!1,this.dirtySelected=!1,this.value="",this._highlighted=!1,this._displayCheckmark=!1,this._vvdSearchText="",this._isNotMatching=!1,o&&(this.text=o),i&&(this.value=i),a&&(this.defaultSelected=a),c&&(this.selected=c),this.proxy=new Option(this.text,this.value,this.defaultSelected,this.selected),this.proxy.disabled=this.disabled}defaultSelectedChanged(){this.dirtySelected||(this.selected=this.defaultSelected,this.proxy instanceof HTMLOptionElement&&(this.proxy.selected=this.defaultSelected)),this.proxy instanceof HTMLOptionElement&&(this.proxy.defaultSelected=this.defaultSelected)}disabledChanged(){/* v8 ignore if -- @preserve */this.proxy instanceof HTMLOptionElement&&(this.proxy.disabled=this.disabled)}get selectedAttribute(){return this.defaultSelected}set selectedAttribute(o){this.defaultSelected=o}selectedChanged(){this.dirtySelected||(this.dirtySelected=!0),this.proxy instanceof HTMLOptionElement&&(this.proxy.selected=this.selected)}valueChanged(){if(typeof this.value!="string"){this.value="";return}this.proxy instanceof HTMLOptionElement&&(this.proxy.value=this.value)}get label(){return this._label??this.text}set label(o){this._label=o}set text(o){this._text=o}get text(){return this._text??""}_getAccessibleName(){return this.ariaLabel||`${this.text}${this.textSecondary?` ${this.textSecondary}`:""}`}get form(){return null}get _hasMatchedText(){return!!(this.matchedText??this._vvdSearchText)}get _matchedRange(){const o=this.matchedText??this._vvdSearchText;if(o){const i=this.text.toLowerCase().indexOf(o.toLowerCase());return i===-1?{from:0,to:0}:{from:i,to:i+o.length}}return{from:0,to:0}}connectedCallback(){super.connectedCallback(),this.dirtySelected||(this.selected=this.defaultSelected,this.dirtySelected=!1)}}n([t.attr({converter:{fromView:e=>{if(e===!0||e==="true")return!0;if(e===!1||e==="false")return!1},toView:e=>e}})],r.prototype,"checked",2);n([t.attr({attribute:"selected",mode:"boolean"})],r.prototype,"defaultSelected",2);n([t.attr({mode:"boolean"})],r.prototype,"disabled",2);n([t.attr({attribute:"current-selected",mode:"boolean"})],r.prototype,"selected",2);n([t.attr({attribute:"value"})],r.prototype,"value",2);n([t.attr({attribute:"label"})],r.prototype,"_label",2);n([t.attr({attribute:"text"})],r.prototype,"_text",2);n([t.attr({attribute:"text-secondary"})],r.prototype,"textSecondary",2);n([t.observable],r.prototype,"_highlighted",2);n([t.observable],r.prototype,"_displayCheckmark",2);n([t.attr({attribute:"matched-text"})],r.prototype,"matchedText",2);n([t.observable],r.prototype,"_vvdSearchText",2);n([t.volatile],r.prototype,"_hasMatchedText",1);n([t.observable],r.prototype,"_isNotMatching",2);n([t.volatile],r.prototype,"_matchedRange",1);n([t.attr({attribute:"tag-connotation"})],r.prototype,"tagConnotation",2);const u=e=>m.classNames("base",["disabled",e.disabled],["selected",!!e.selected],["hover",!!e._highlighted],["active",!!e.checked],["icon",!!e.icon],["two-lines",!!e.text?.length&&!!e.textSecondary?.length]);function g(){return t.html`${l.when(e=>e.text||e.textSecondary,t.html`<span class="text">
2
+ ${l.when(e=>e.text,t.html`<span class="text-primary">
3
+ ${l.when(e=>e._hasMatchedText,t.html`${e=>e.text.slice(0,e._matchedRange.from)}<span class="match"
4
+ >${e=>e.text.slice(e._matchedRange.from,e._matchedRange.to)}</span
5
+ >`)}${e=>e.text.slice(e._matchedRange.to)}
6
+ </span>`)}
7
+ ${l.when(e=>e.textSecondary,t.html`<span class="text-secondary">${e=>e.textSecondary}</span>`)}
8
+ </span>`)}`}const S=e=>{const o=p.affixIconTemplateFactory(e),i=e.tagFor(v.Icon);return t.html`
9
+ <template
10
+ ${h.applyHostSemantics({role:"option",ariaChecked:a=>a.checked,ariaSelected:a=>a.selected,ariaDisabled:a=>a.disabled})}
11
+ style="${a=>a._isNotMatching?"display: none":""}"
12
+ >
13
+ <div class="${u}">
14
+ ${a=>o(a.icon,p.IconWrapper.Slot)} ${g()}
15
+ <slot name="trailing-meta"></slot>
16
+ ${l.when(a=>a._displayCheckmark&&a.selected,t.html`<${i} class="checkmark" name="check-line"></${i}>`)}
17
+ </div>
18
+ </template>
19
+ `},w=":host([disabled]){cursor:not-allowed}.base{--_connotation-color-primary: var(--vvd-option-accent-primary, var(--vvd-color-canvas-text));--_connotation-color-primary-text: var(--vvd-option-accent-primary-text, var(--vvd-color-canvas));--_connotation-color-primary-increment: var(--vvd-option-accent-primary-increment, var(--vvd-color-neutral-800));--_connotation-color-firm: var(--vvd-option-accent-firm, var(--vvd-color-canvas-text));--_connotation-color-faint: var(--vvd-option-accent-faint, var(--vvd-color-neutral-50));--_connotation-color-soft: var(--vvd-option-accent-soft, var(--vvd-color-neutral-100));--_connotation-color-pale: var(--vvd-option-accent-pale, var(--vvd-color-neutral-300));--_connotation-color-dim: var(--vvd-option-accent-dim, var(--vvd-color-neutral-200))}.base{--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}@media (hover: hover){.base:hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-faint);--_appearance-color-outline: transparent}}.base.hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-faint);--_appearance-color-outline: transparent}.base:disabled{--_appearance-color-text: var(--vvd-color-neutral-300);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}.base.disabled{--_appearance-color-text: var(--vvd-color-neutral-300);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}.base:active:where(:not(.disabled,:disabled)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-soft);--_appearance-color-outline: transparent}.base.active:where(:not(.disabled,:disabled)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-soft);--_appearance-color-outline: transparent}.base.selected:where(:not(.disabled,:disabled)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-soft);--_appearance-color-outline: transparent}@media (hover: hover){.base.selected:hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-dim);--_appearance-color-outline: transparent}}.base.selected.hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-dim);--_appearance-color-outline: transparent}.base{display:flex;box-sizing:border-box;align-items:center;border-radius:8px;background-color:var(--_appearance-color-fill);box-shadow:inset 0 0 0 1px var(--_appearance-color-outline);color:var(--_option-appearance-color-text, var(--_appearance-color-text));font:var(--vvd-typography-base);gap:var(--_option-gap);hyphens:auto;inline-size:100%;min-block-size:var(--_option-min-block-size);padding-inline:var(--_option-padding-inline);vertical-align:middle;word-break:break-word}.base{--_option-min-block-size: calc(1px*(40 + 4*clamp(-1, var(--vvd-size-density, 0), 2))) ;--_option-padding-inline: calc(1px*(40 + 4*clamp(-1, var(--vvd-size-density, 0), 2))*.4) ;--_option-icon-size: calc(1px*(40 + 4*clamp(-1, var(--vvd-size-density, 0), 2))/2) }.base:not(.two-lines){--_option-gap: calc( calc(1px*(36 + 4*clamp(-1, var(--vvd-size-density, 0), 2))) / 3);padding-block:calc(1px*(40 + 4*clamp(-1,var(--vvd-size-density, 0),2))/4)}.base.two-lines{gap:calc(1px*(40 + 4*clamp(-1,var(--vvd-size-density, 0),2))*.4);padding-block:calc(1px*(24 + 4*clamp(-1,var(--vvd-size-density, 0),2))/2)}@supports (user-select: none){.base{user-select:none}}.base:not(.disabled){cursor:pointer}.base.disabled{pointer-events:none}:host([scale=condensed]) .base{--_option-min-block-size: calc(1px*(32 + 4*clamp(-1, var(--vvd-size-density, 0), 2))) ;--_option-padding-inline: calc(1px*(24 + 4*clamp(-1, var(--vvd-size-density, 0), 2))/2) ;--_option-icon-size: calc(1px*(40 + 4*clamp(-1, var(--vvd-size-density, 0), 2))*.4) }:host([scale=condensed]) .base:not(.two-lines){--_option-gap: calc(1px*(40 + 4*clamp(-1, var(--vvd-size-density, 0), 2))/5) ;padding-block:calc(calc(1px*(36 + 4*clamp(-1,var(--vvd-size-density, 0),2))) / 6)}:host([scale=condensed]) .base.two-lines{gap:calc(calc(1px*(36 + 4*clamp(-1,var(--vvd-size-density, 0),2))) / 3);padding-block:calc(1px*(32 + 4*clamp(-1,var(--vvd-size-density, 0),2))/4)}.base.active{--focus-stroke-color: var(--vvd-color-cta-500);--focus-stroke-gap-color: transparent;box-shadow:0 0 0 4px color-mix(in srgb,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))}.base.hidden{display:none}.text{display:flex;flex-direction:column;font:var(--vvd-typography-base);gap:4px;margin-inline-end:auto}.text-primary,.text-secondary{display:block;font:var(--vvd-typography-base)}.text-primary{font:var(--vvd-typography-base)}.base:not(.disabled) .text-primary{color:var(--vvd-color-canvas-text)}.base.disabled .text-primary{color:var(--_appearance-color-text)}.base.two-lines .text-primary{font:var(--vvd-typography-base-bold)}.text-secondary{color:var(--vvd-color-neutral-800);font:var(--vvd-typography-base-condensed)}.base.two-lines .text-secondary{color:var(--vvd-color-neutral-600)}.base.disabled .text-secondary{color:var(--_appearance-color-text)}.base.selected:not(.disabled) .text-secondary{color:var(--vvd-color-neutral-800)}.match{color:var(--vvd-color-cta-600);font:var(--vvd-typography-base-bold)}slot[name=icon]{font-size:var(--_option-icon-size);line-height:1}.base:not(.disabled,.selected) slot[name=icon]{color:var(--vvd-color-neutral-600)}.checkmark{font-size:var(--_option-icon-size)}",b=t.defineVividComponent("option",r,S,[v.iconDefinition],{styles:w}),k=t.createRegisterFunction(b);exports.ListboxOption=r;exports.isListboxOption=y;exports.listboxOptionDefinition=b;exports.registerOption=k;