@vonage/vivid 5.16.0 → 5.17.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 (317) hide show
  1. package/accordion/index.cjs +1 -1
  2. package/accordion/index.js +1 -1
  3. package/accordion-item/index.cjs +1 -1
  4. package/accordion-item/index.js +1 -1
  5. package/action-group/index.cjs +3 -3
  6. package/action-group/index.js +5 -5
  7. package/alert/index.cjs +3 -3
  8. package/alert/index.js +17 -17
  9. package/audio-player/index.cjs +16 -16
  10. package/audio-player/index.js +27 -27
  11. package/avatar/index.cjs +2 -2
  12. package/avatar/index.js +6 -6
  13. package/badge/index.cjs +2 -2
  14. package/badge/index.js +6 -6
  15. package/banner/index.cjs +3 -3
  16. package/banner/index.js +15 -15
  17. package/bundled/base-color-picker.cjs +2 -2
  18. package/bundled/base-color-picker.js +5 -5
  19. package/bundled/button.cjs +1 -1
  20. package/bundled/button.js +2 -2
  21. package/bundled/calendar-picker.template.cjs +2 -2
  22. package/bundled/calendar-picker.template.js +498 -498
  23. package/bundled/definition10.cjs +18 -30
  24. package/bundled/definition10.js +53 -155
  25. package/bundled/definition11.cjs +10 -19
  26. package/bundled/definition11.js +25 -74
  27. package/bundled/definition12.cjs +72 -18
  28. package/bundled/definition12.js +171 -107
  29. package/bundled/definition13.cjs +18 -17
  30. package/bundled/definition13.js +45 -65
  31. package/bundled/definition14.cjs +5 -10
  32. package/bundled/definition14.js +9 -27
  33. package/bundled/definition15.cjs +17 -71
  34. package/bundled/definition15.js +64 -181
  35. package/bundled/definition16.cjs +12 -4
  36. package/bundled/definition16.js +79 -14
  37. package/bundled/definition17.cjs +19 -13
  38. package/bundled/definition17.js +119 -70
  39. package/bundled/definition18.cjs +87 -12
  40. package/bundled/definition18.js +409 -52
  41. package/bundled/definition19.cjs +5 -87
  42. package/bundled/definition19.js +14 -422
  43. package/bundled/definition2.cjs +3 -3
  44. package/bundled/definition2.js +27 -27
  45. package/bundled/definition20.cjs +30 -5
  46. package/bundled/definition20.js +159 -9
  47. package/bundled/definition21.cjs +28 -19
  48. package/bundled/definition21.js +164 -47
  49. package/bundled/definition22.cjs +38 -23
  50. package/bundled/definition22.js +64 -82
  51. package/bundled/definition3.cjs +1 -1
  52. package/bundled/definition3.js +15 -15
  53. package/bundled/definition4.cjs +23 -38
  54. package/bundled/definition4.js +82 -64
  55. package/bundled/definition5.cjs +2 -2
  56. package/bundled/definition5.js +5 -5
  57. package/bundled/definition6.cjs +2 -2
  58. package/bundled/definition6.js +24 -24
  59. package/bundled/definition9.cjs +12 -30
  60. package/bundled/definition9.js +55 -148
  61. package/bundled/divider.cjs +1 -1
  62. package/bundled/divider.js +5 -5
  63. package/bundled/listbox.cjs +1 -1
  64. package/bundled/listbox.js +1 -1
  65. package/bundled/mixins.cjs +4 -4
  66. package/bundled/mixins.js +43 -43
  67. package/bundled/picker-field.template.cjs +7 -7
  68. package/bundled/picker-field.template.js +14 -14
  69. package/bundled/slider.template.cjs +7 -7
  70. package/bundled/slider.template.js +12 -12
  71. package/bundled/slottable-request.cjs +1 -1
  72. package/bundled/slottable-request.js +8 -38
  73. package/bundled/time-selection-picker.template.cjs +4 -4
  74. package/bundled/time-selection-picker.template.js +35 -35
  75. package/bundled/vivid-element.cjs +1 -1
  76. package/bundled/vivid-element.js +1 -1
  77. package/calendar/index.cjs +11 -11
  78. package/calendar/index.js +30 -237
  79. package/calendar-event/index.cjs +3 -3
  80. package/calendar-event/index.js +4 -4
  81. package/card/index.cjs +14 -11
  82. package/card/index.js +16 -13
  83. package/checkbox/index.cjs +1 -1
  84. package/checkbox/index.js +1 -1
  85. package/color-picker/definition.cjs +1 -1
  86. package/color-picker/definition.js +1 -1
  87. package/color-picker/index.cjs +6 -6
  88. package/color-picker/index.js +24 -24
  89. package/combobox/definition.cjs +1 -1
  90. package/combobox/definition.js +1 -1
  91. package/combobox/index.cjs +9 -8
  92. package/combobox/index.js +32 -28
  93. package/contextual-help/definition.cjs +1 -1
  94. package/contextual-help/definition.js +1 -1
  95. package/contextual-help/index.cjs +1 -1
  96. package/contextual-help/index.js +1 -1
  97. package/custom-elements.json +1027 -615
  98. package/data-grid/definition.js +1 -1
  99. package/data-grid/index.cjs +17 -17
  100. package/data-grid/index.js +261 -264
  101. package/date-picker/index.cjs +1 -1
  102. package/date-picker/index.js +12 -12
  103. package/date-range-picker/index.cjs +1 -1
  104. package/date-range-picker/index.js +7 -7
  105. package/date-time-picker/index.cjs +4 -4
  106. package/date-time-picker/index.js +24 -24
  107. package/dial-pad/index.cjs +3 -2
  108. package/dial-pad/index.js +6 -5
  109. package/dialog/index.cjs +4 -4
  110. package/dialog/index.js +5 -5
  111. package/divider/index.cjs +1 -1
  112. package/divider/index.js +1 -1
  113. package/fab/index.cjs +3 -3
  114. package/fab/index.js +8 -8
  115. package/file-picker/index.cjs +16 -13
  116. package/file-picker/index.js +31 -28
  117. package/header/index.cjs +4 -4
  118. package/header/index.js +5 -5
  119. package/index.cjs +24 -21
  120. package/index.js +11 -11
  121. package/lib/combobox/combobox.d.ts +0 -3
  122. package/lib/date-time-picker/date-time-picker.d.ts +0 -4
  123. package/lib/dial-pad/dial-pad.d.ts +6 -2
  124. package/lib/dialog/dialog.d.ts +0 -1
  125. package/lib/menu/menu.d.ts +0 -1
  126. package/lib/option/option.d.ts +0 -1
  127. package/lib/rich-text-editor/rte/exports.d.ts +1 -0
  128. package/lib/rich-text-editor/rte/features/alignment.d.ts +1 -1
  129. package/lib/rich-text-editor/rte/features/character-count.d.ts +21 -0
  130. package/lib/rich-text-editor/rte/features/font-size-picker.d.ts +1 -1
  131. package/lib/rich-text-editor/rte/features/internal/basic-text-blocks.d.ts +1 -1
  132. package/lib/rich-text-editor/rte/features/keyboard-shortcuts.d.ts +1 -1
  133. package/lib/rich-text-editor/rte/features/text-color-picker.d.ts +1 -1
  134. package/lib/rich-text-editor/rte/public-interface.d.ts +6 -0
  135. package/lib/searchable-select/option-tag.d.ts +0 -1
  136. package/lib/table/definition.d.ts +2 -1
  137. package/lib/table/table-header-cell.d.ts +3 -0
  138. package/lib/table/table-sorting-button.d.ts +415 -0
  139. package/lib/table/table-sorting-button.template.d.ts +3 -0
  140. package/locales/de-DE.cjs +4 -178
  141. package/locales/de-DE.js +2 -179
  142. package/locales/en-GB.cjs +4 -9
  143. package/locales/en-GB.js +2 -10
  144. package/locales/en-US.cjs +268 -2
  145. package/locales/en-US.js +265 -1
  146. package/locales/ja-JP.cjs +4 -171
  147. package/locales/ja-JP.js +2 -172
  148. package/locales/zh-CN.cjs +4 -172
  149. package/locales/zh-CN.js +2 -173
  150. package/menu/index.cjs +1 -1
  151. package/menu/index.js +1 -1
  152. package/menu-item/index.cjs +1 -1
  153. package/menu-item/index.js +1 -1
  154. package/nav-disclosure/index.cjs +3 -3
  155. package/nav-disclosure/index.js +8 -8
  156. package/nav-item/index.cjs +1 -1
  157. package/nav-item/index.js +7 -7
  158. package/note/index.cjs +2 -2
  159. package/note/index.js +6 -6
  160. package/number-field/index.cjs +4 -4
  161. package/number-field/index.js +31 -31
  162. package/option/definition.cjs +1 -1
  163. package/option/definition.js +1 -1
  164. package/option/index.cjs +1 -1
  165. package/option/index.js +1 -1
  166. package/package.json +7 -8
  167. package/pagination/index.cjs +3 -3
  168. package/pagination/index.js +15 -15
  169. package/popover/index.cjs +4 -4
  170. package/popover/index.js +5 -5
  171. package/progress/index.cjs +2 -2
  172. package/progress/index.js +5 -5
  173. package/radio/index.cjs +1 -1
  174. package/radio/index.js +1 -1
  175. package/radio-group/index.cjs +4 -4
  176. package/radio-group/index.js +10 -10
  177. package/range-slider/index.cjs +4 -4
  178. package/range-slider/index.js +17 -17
  179. package/rich-text-editor/definition.cjs +1 -0
  180. package/rich-text-editor/definition.js +2 -2
  181. package/rich-text-editor/index.cjs +13 -13
  182. package/rich-text-editor/index.js +1886 -1829
  183. package/rich-text-view/index.cjs +1 -1
  184. package/rich-text-view/index.js +8 -8
  185. package/searchable-select/index.cjs +12 -12
  186. package/searchable-select/index.js +25 -25
  187. package/select/index.cjs +1 -1
  188. package/select/index.js +1 -1
  189. package/selectable-box/index.cjs +7 -7
  190. package/selectable-box/index.js +11 -11
  191. package/shared/foundation/test-utilities/fixture.d.ts +1 -1
  192. package/shared/patterns/linkable.d.ts +1 -1
  193. package/simple-color-picker/index.cjs +3 -3
  194. package/simple-color-picker/index.js +10 -10
  195. package/split-button/index.cjs +5 -5
  196. package/split-button/index.js +10 -10
  197. package/status/index.cjs +2 -2
  198. package/status/index.js +12 -12
  199. package/switch/index.cjs +3 -3
  200. package/switch/index.js +5 -5
  201. package/tab/index.cjs +1 -1
  202. package/tab/index.js +1 -1
  203. package/tab-panel/index.cjs +1 -1
  204. package/tab-panel/index.js +1 -1
  205. package/table/definition.cjs +17 -14
  206. package/table/definition.js +3 -2
  207. package/table/index.cjs +19 -10
  208. package/table/index.js +69 -21
  209. package/tabs/index.cjs +2 -2
  210. package/tabs/index.js +4 -4
  211. package/tag/index.cjs +7 -7
  212. package/tag/index.js +9 -9
  213. package/tag-group/index.cjs +3 -3
  214. package/tag-group/index.js +5 -5
  215. package/text-area/index.cjs +2 -2
  216. package/text-area/index.js +12 -12
  217. package/text-field/definition.cjs +1 -1
  218. package/text-field/definition.js +1 -1
  219. package/text-field/index.cjs +1 -1
  220. package/text-field/index.js +1 -1
  221. package/time-picker/index.cjs +1 -1
  222. package/time-picker/index.js +1 -1
  223. package/toggletip/definition.cjs +1 -1
  224. package/toggletip/definition.js +1 -1
  225. package/toggletip/index.cjs +1 -1
  226. package/toggletip/index.js +1 -1
  227. package/tooltip/definition.cjs +1 -1
  228. package/tooltip/definition.js +1 -1
  229. package/tooltip/index.cjs +1 -1
  230. package/tooltip/index.js +1 -1
  231. package/tree-item/index.cjs +1 -1
  232. package/tree-item/index.js +1 -1
  233. package/tree-view/index.cjs +3 -3
  234. package/tree-view/index.js +17 -17
  235. package/unbundled/button.cjs +2 -2
  236. package/unbundled/button.js +2 -2
  237. package/unbundled/calendar-picker.template.cjs +4347 -9
  238. package/unbundled/calendar-picker.template.js +4345 -7
  239. package/unbundled/chunk.cjs +0 -22
  240. package/unbundled/definition13.cjs +1 -8
  241. package/unbundled/definition13.js +1 -8
  242. package/unbundled/definition14.cjs +2 -2
  243. package/unbundled/definition14.js +2 -2
  244. package/unbundled/definition2.cjs +1 -1
  245. package/unbundled/definition2.js +1 -1
  246. package/unbundled/definition21.cjs +1 -2
  247. package/unbundled/definition21.js +1 -2
  248. package/unbundled/definition22.cjs +7 -2
  249. package/unbundled/definition22.js +7 -2
  250. package/unbundled/definition24.cjs +98 -979
  251. package/unbundled/definition24.js +93 -974
  252. package/unbundled/definition25.cjs +37 -322
  253. package/unbundled/definition25.js +33 -318
  254. package/unbundled/definition26.cjs +317 -91
  255. package/unbundled/definition26.js +313 -87
  256. package/unbundled/definition27.cjs +94 -192
  257. package/unbundled/definition27.js +91 -183
  258. package/unbundled/definition28.cjs +387 -395
  259. package/unbundled/definition28.js +387 -395
  260. package/unbundled/definition29.cjs +189 -110
  261. package/unbundled/definition29.js +180 -107
  262. package/unbundled/definition30.cjs +520 -36
  263. package/unbundled/definition30.js +519 -35
  264. package/unbundled/definition32.cjs +477 -477
  265. package/unbundled/definition32.js +475 -475
  266. package/unbundled/definition33.cjs +87 -2
  267. package/unbundled/definition33.js +77 -4
  268. package/unbundled/definition35.cjs +2 -2
  269. package/unbundled/definition35.js +2 -2
  270. package/unbundled/definition36.cjs +1 -1
  271. package/unbundled/definition36.js +1 -1
  272. package/unbundled/definition37.cjs +6 -2
  273. package/unbundled/definition37.js +6 -2
  274. package/unbundled/definition38.cjs +7 -5
  275. package/unbundled/definition38.js +7 -5
  276. package/unbundled/definition39.cjs +1 -0
  277. package/unbundled/definition39.js +1 -0
  278. package/unbundled/definition42.cjs +22 -11
  279. package/unbundled/definition42.js +22 -11
  280. package/unbundled/definition49.cjs +3 -3
  281. package/unbundled/definition49.js +3 -3
  282. package/unbundled/definition56.cjs +437 -9506
  283. package/unbundled/definition56.js +340 -9415
  284. package/unbundled/definition57.cjs +5 -5
  285. package/unbundled/definition57.js +5 -5
  286. package/unbundled/definition58.cjs +4 -3
  287. package/unbundled/definition58.js +2 -1
  288. package/unbundled/definition59.cjs +4 -3
  289. package/unbundled/definition59.js +4 -3
  290. package/unbundled/definition62.cjs +2 -2
  291. package/unbundled/definition62.js +2 -2
  292. package/unbundled/definition64.cjs +1 -1
  293. package/unbundled/definition64.js +1 -1
  294. package/unbundled/definition71.cjs +2 -2
  295. package/unbundled/definition71.js +2 -2
  296. package/unbundled/definition72.cjs +1 -2
  297. package/unbundled/definition72.js +1 -2
  298. package/unbundled/definition75.cjs +3 -51711
  299. package/unbundled/definition75.js +1 -51711
  300. package/unbundled/listbox.cjs +1 -1
  301. package/unbundled/listbox.js +1 -1
  302. package/unbundled/localized.cjs +2 -2
  303. package/unbundled/localized.js +1 -1
  304. package/unbundled/picker-field.template.cjs +1 -1
  305. package/unbundled/picker-field.template.js +1 -1
  306. package/unbundled/slottable-request.cjs +2 -3168
  307. package/unbundled/slottable-request.js +3 -3097
  308. package/unbundled/time-selection-picker.template.cjs +1 -1
  309. package/unbundled/time-selection-picker.template.js +1 -1
  310. package/unbundled/vivid-element.cjs +1 -1
  311. package/unbundled/vivid-element.js +1 -1
  312. package/video-player/index.cjs +3 -3
  313. package/video-player/index.js +9 -9
  314. package/vivid.api.json +220 -282
  315. package/unbundled/chunk.js +0 -33
  316. package/unbundled/en-US.cjs +0 -447
  317. package/unbundled/en-US.js +0 -443
@@ -1,161 +1,68 @@
1
- import { O as e, T as t, d as n, l as r, n as i, o as a, s as o, t as s } from "./vivid-element.js";
2
- import { t as c } from "./when.js";
3
- import { r as l, t as u } from "./slotted.js";
4
- import { r as d, t as f } from "./definition2.js";
5
- import { t as p } from "./decorate.js";
6
- import { t as m } from "./class-names.js";
7
- import { a as h, n as g, r as _ } from "./key-codes.js";
8
- import { a as v, t as y } from "./affix.js";
9
- import { n as b, t as x } from "./host-semantics.js";
10
- //#region src/lib/menu-item/menu-item.scss?inline
11
- var S = ":host(:focus-visible){outline:none}:host([disabled]){pointer-events:none}.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,.base.disabled{--_appearance-color-text:var(--vvd-color-neutral-300);--_appearance-color-fill:transparent;--_appearance-color-outline:transparent}.base:active:where(:not(.disabled,:disabled)),.base.active:where(:not(.disabled,:disabled)),.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.connotation-cta{--_connotation-color-primary:var(--vvd-menu-item-cta-primary,var(--vvd-color-cta-500));--_connotation-color-primary-text:var(--vvd-menu-item-cta-primary-text,var(--vvd-color-canvas));--_connotation-color-primary-increment:var(--vvd-menu-item-cta-primary-increment,var(--vvd-color-cta-600));--_connotation-color-firm:var(--vvd-menu-item-cta-firm,var(--vvd-color-cta-600));--_connotation-color-faint:var(--vvd-menu-item-cta-faint,var(--vvd-color-cta-50));--_connotation-color-soft:var(--vvd-menu-item-cta-soft,var(--vvd-color-cta-100));--_connotation-color-pale:var(--vvd-menu-item-cta-pale,var(--vvd-color-cta-300));--_connotation-color-dim:var(--vvd-menu-item-cta-dim,var(--vvd-color-cta-200))}.base:not(.connotation-cta){--_connotation-color-primary:var(--vvd-menu-item-accent-primary,var(--vvd-color-canvas-text));--_connotation-color-primary-text:var(--vvd-menu-item-accent-primary-text,var(--vvd-color-canvas));--_connotation-color-primary-increment:var(--vvd-menu-item-accent-primary-increment,var(--vvd-color-neutral-800));--_connotation-color-firm:var(--vvd-menu-item-accent-firm,var(--vvd-color-canvas-text));--_connotation-color-faint:var(--vvd-menu-item-accent-faint,var(--vvd-color-neutral-50));--_connotation-color-soft:var(--vvd-menu-item-accent-soft,var(--vvd-color-neutral-100));--_connotation-color-pale:var(--vvd-menu-item-accent-pale,var(--vvd-color-neutral-300));--_connotation-color-dim:var(--vvd-menu-item-accent-dim,var(--vvd-color-neutral-200))}.base{--_menu-item-padding-inline:calc(calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2))) / 2.5);box-sizing:border-box;background-color:var(--_appearance-color-fill);box-shadow:inset 0 0 0 1px var(--_appearance-color-outline);border-radius:8px;align-items:center;inline-size:100%;display:flex}.base:not(.two-lines){min-block-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2)));padding-block:8px;padding-inline:var(--_menu-item-padding-inline);gap:12px}.base.two-lines{min-block-size:calc(calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2))) + calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) - 16)));padding-block:12px;padding-inline:var(--_menu-item-padding-inline);gap:16px}@supports (user-select:none){.base{user-select:none}}.base:not(.disabled){cursor:pointer}:host(:not([role=presentation]):focus-visible) .base{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}.icon{font-size:calc(calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2))) / 2);flex-shrink:0;line-height:1}.action,.decorative{place-content:center;display:flex}.action{color:var(--_appearance-color-text)}.base.trailing .action,.base.has-meta .action{order:2}:host(:not([check-appearance],[checked],[disabled])) .action{color:var(--vvd-color-neutral-500)}.base:not(.disabled) .decorative{color:var(--vvd-color-neutral-600)}.base.disabled .decorative{color:var(--vvd-color-neutral-200)}.base.has-meta .decorative{order:1}.chevron{order:3}.text{flex-direction:column;gap:4px;margin-inline-end:auto;display:flex;overflow:hidden}.text-primary,.text-secondary{font:var(--vvd-typography-base);-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.text-primary{font:var(--vvd-typography-base);-webkit-line-clamp:var(--text-primary-line-clamp,1)}.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);-webkit-line-clamp:var(--text-secondary-line-clamp,1)}.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)}:host([internal-part]) .text-primary{font:var(--_text-primary-custom-size,var--vvd-typography-base)}", C = {
12
- menuitem: "menuitem",
13
- menuitemcheckbox: "menuitemcheckbox",
14
- menuitemradio: "menuitemradio",
15
- presentation: "presentation"
16
- }, w = class extends x(y(s)) {
17
- expandedChanged() {
18
- /* v8 ignore if -- @preserve */
19
- this.$fastController.isConnected && (this.submenu && !this.expanded && this.submenu.collapseExpandedItem(), this.$emit("expanded-change", this, { bubbles: !1 }));
20
- }
21
- #e() {
22
- this._isPresentational ? this.role === "menuitem" && (this.role = "presentation") : this.role === "presentation" && (this.role = C.menuitem);
23
- }
24
- _isPresentationalChanged() {
25
- this.$fastController.isConnected && this.#e();
26
- }
27
- checkedChanged() {
28
- this.$fastController.isConnected && this.$emit("change");
1
+ import { d as e, l as t, o as n, s as r, t as i } from "./vivid-element.js";
2
+ import { t as a } from "./decorate.js";
3
+ import { t as o } from "./class-names.js";
4
+ import { i as s, t as c } from "./definition8.js";
5
+ import { n as l, t as u } from "./anchored.js";
6
+ import { t as d } from "./dialog.js";
7
+ //#region src/lib/tooltip/tooltip.scss?inline
8
+ var 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;color:var(--vvd-color-canvas-text);font:var(--vvd-typography-base-bold);max-inline-size:var(--tooltip-max-inline-size,30ch);padding:8px 12px}", p = class extends u(i) {
9
+ constructor(...e) {
10
+ super(...e), this.open = !1;
29
11
  }
30
12
  connectedCallback() {
31
- super.connectedCallback(), e.enqueue(() => {
32
- this._isPresentational = this._isPresentational ?? !0, this.#e();
33
- });
34
- }
35
- slottedSubmenuChanged() {
36
- this.submenu && (this.submenu.anchor = this, this.submenu.placement = "right-start", this.submenu.collapseExpandedItem = () => this.#t(), this.submenu._popupOffset = 5);
13
+ super.connectedCallback(), this.#a();
37
14
  }
38
- get submenu() {
39
- return this.slottedSubmenu?.length ? this.slottedSubmenu[0] : null;
15
+ disconnectedCallback() {
16
+ super.disconnectedCallback(), this.#a();
40
17
  }
41
- get hasSubmenu() {
42
- return this.submenu !== null;
18
+ _anchorElChanged(e, t) {
19
+ e && this.#t(e), t && this.#e(t);
43
20
  }
44
- constructor() {
45
- super(), this.role = C.menuitem, this.checked = !1, this.handleMenuItemClick = (e) => this._isSyntheticClickEvent(e) ? !0 : (this.invoke(), !!this._isPresentational), this.handleMouseOver = (e) => (this.disabled || !this.submenu || this.expanded || (this.expanded = !0), !1), this.handleMouseOut = (e) => (!this.expanded || this.contains(document.activeElement) || (this.expanded = !1), !1), this.invoke = () => {
46
- if (!(this.disabled || this._isPresentational)) switch (this.controlType) {
47
- case "checkbox":
48
- this.checked = !this.checked;
49
- break;
50
- case "radio":
51
- this.checked ||= !0;
52
- break;
53
- default:
54
- this.submenu ? this.expanded = !0 : this.$emit("change");
55
- break;
56
- }
57
- }, this.checkTrailing = !1, this.handleMenuItemKeyDown = (e) => {
58
- if (e.defaultPrevented) return !1;
59
- switch (e.key) {
60
- case h:
61
- case " ": return this.invoke(), this.disabled || this.#i(), !1;
62
- case _: return this.submenu && (this.expanded = !0, this.#i()), !1;
63
- case g: if (this.expanded) return this.#i(), this.expanded = !1, this.focus(), !1;
64
- }
65
- return !0;
66
- }, this.addEventListener("expanded-change", this.#n);
21
+ #e(e) {
22
+ e.addEventListener("mouseover", this.#n), e.addEventListener("mouseout", this.#r), e.addEventListener("focusin", this.#n), e.addEventListener("focusout", this.#r), e.setAttribute("aria-haspopup", "true"), e.setAttribute("aria-expanded", String(this.open));
67
23
  }
68
- #t() {
69
- this.expanded = !1;
24
+ #t(e) {
25
+ e.removeEventListener("mouseover", this.#n), e.removeEventListener("mouseout", this.#r), e.removeEventListener("focusin", this.#n), e.removeEventListener("focusout", this.#r), e.removeAttribute("aria-haspopup"), e.removeAttribute("aria-expanded");
70
26
  }
71
- #n() {
72
- this.submenu && (this.submenu.open = this.expanded);
27
+ #n = () => {
28
+ this.open = !0, this.#i();
29
+ };
30
+ #r = () => {
31
+ this.open = !1, this.#i();
32
+ };
33
+ #i() {
34
+ this._anchorEl && this._anchorEl.setAttribute("aria-expanded", String(this.open));
73
35
  }
74
- #r = /* @__PURE__ */ new WeakSet();
75
- _isSyntheticClickEvent(e) {
76
- return this.#r.has(e);
36
+ #a() {
37
+ document.removeEventListener("keydown", this.#o), this.open && this.isConnected && document.addEventListener("keydown", this.#o);
77
38
  }
78
- #i() {
79
- let e = new MouseEvent("click", {
80
- bubbles: !0,
81
- composed: !0
82
- });
83
- this.#r.add(e), this.dispatchEvent(e);
39
+ #o = (e) => {
40
+ /* v8 ignore else -- @preserve */
41
+ e.key === "Escape" && this.#r();
42
+ };
43
+ openChanged(e) {
44
+ e !== void 0 && this.#a();
84
45
  }
85
46
  };
86
- p([r({ mode: "boolean" })], w.prototype, "disabled", void 0), p([r({ mode: "boolean" })], w.prototype, "expanded", void 0), p([t], w.prototype, "_isPresentational", void 0), p([i({
87
- deprecatedPropertyName: "role",
88
- fromDeprecated: (e) => {
89
- switch (e) {
90
- case "menuitemcheckbox": return "checkbox";
91
- case "menuitemradio": return "radio";
92
- default: return;
93
- }
94
- },
95
- toDeprecated: (e) => {
96
- switch (e) {
97
- case "checkbox": return "menuitemcheckbox";
98
- case "radio": return "menuitemradio";
99
- default: return "menuitem";
100
- }
101
- }
102
- }), r({ attribute: "control-type" })], w.prototype, "controlType", void 0), p([r({ mode: "boolean" })], w.prototype, "checked", void 0), p([r], w.prototype, "text", void 0), p([r({ attribute: "text-secondary" })], w.prototype, "textSecondary", void 0), p([r], w.prototype, "connotation", void 0), p([r({
103
- mode: "boolean",
104
- attribute: "check-trailing"
105
- })], w.prototype, "checkTrailing", void 0), p([r({ attribute: "check-appearance" })], w.prototype, "checkedAppearance", void 0), p([t], w.prototype, "metaSlottedContent", void 0), p([t], w.prototype, "trailingMetaSlottedContent", void 0), p([t], w.prototype, "slottedSubmenu", void 0);
106
- //#endregion
107
- //#region src/lib/menu/name.ts
108
- var T = "menu", E = (e) => e.checkedAppearance === "tick-only" ? e.checked ? "check-line" : "" : `${e.controlType === "checkbox" ? "checkbox" : "radio"}-${e.checked ? "checked" : "unchecked"}-2-line`, D = ({ connotation: e, disabled: t, checked: n, controlType: r, text: i, textSecondary: a, icon: o, metaSlottedContent: s, checkTrailing: c }) => m("base", [`connotation-${e}`, !!e], ["disabled", !!t], ["selected", !!(r && n)], ["trailing", !!(r && (c || o))], ["item-checkbox", r === "checkbox"], ["item-radio", r === "radio"], ["two-lines", !!i?.length && !!a?.length], ["has-meta", !!s?.length]);
109
- function O(e) {
110
- let t = e.tagFor(d);
111
- return n`${c((e) => !!e.controlType, n`<span class="action"><${t} class="icon" name="${(e) => E(e)}"></${t}></span>`)}`;
112
- }
113
- function k() {
114
- return n`${c((e) => e.text || e.textSecondary, n`<span class="text">
115
- ${c((e) => e.text, n`<span class="text-primary">${(e) => e.text}</span>`)}
116
- ${c((e) => e.textSecondary, n`<span class="text-secondary">${(e) => e.textSecondary}</span>`)}
117
- </span>`)}`;
118
- }
47
+ a([t], p.prototype, "text", void 0), a([t({ mode: "fromView" })], p.prototype, "placement", void 0), a([t({ mode: "boolean" })], p.prototype, "open", void 0);
119
48
  //#endregion
120
- //#region src/lib/menu-item/definition.ts
121
- var A = a("menu-item", w, (e) => {
122
- let t = v(e), r = e.tagFor(d);
123
- return n`
124
- <template
125
- ${b({
126
- role: C.menuitem,
127
- ariaHasPopup: (e) => e.hasSubmenu ? "menu" : void 0,
128
- ariaChecked: (e) => e.controlType ? e.checked : void 0,
129
- ariaDisabled: (e) => e.disabled,
130
- ariaExpanded: (e) => e.expanded
131
- })}
132
- @keydown="${(e, t) => e.handleMenuItemKeyDown(t.event)}"
133
- @click="${(e, t) => e.handleMenuItemClick(t.event)}"
134
- @mouseover="${(e, t) => e.handleMouseOver(t.event)}"
135
- @mouseout="${(e, t) => e.handleMouseOut(t.event)}"
136
- >
137
- <div class="${D}">
138
- <slot name="meta" ${u("metaSlottedContent")}></slot>
139
- ${O(e)}
140
- ${c((e) => e.icon, n`<span class="decorative"
141
- >${(e) => t(e.icon)}</span
142
- >`)}
143
- ${k()}
144
- <slot
145
- name="trailing-meta"
146
- ${u("trailingMetaSlottedContent")}
147
- ></slot>
148
- ${c((e) => e.hasSubmenu, n`<${r} class="chevron" name="chevron-right-line"></${r}>`)}
149
- </div>
150
- <slot
151
- name="submenu"
152
- ${u({
153
- property: "slottedSubmenu",
154
- filter: l(e.tagForNonDependency(T))
155
- })}
156
- ></slot>
157
- </template>
158
- `;
159
- }, [f], { styles: S }), j = o(A);
49
+ //#region src/lib/tooltip/tooltip.template.ts
50
+ var m = ({ open: e }) => o("control", ["open", !!e]), h = n("tooltip", p, (t) => {
51
+ let n = t.tagFor(s);
52
+ return e`
53
+ ${l()}
54
+ <${n} class="${m}" arrow alternate
55
+ :placement=${(e) => e.placement}
56
+ :anchor="${(e) => e._anchorEl}"
57
+ :open="${(e) => e.open}"
58
+ @keydown="${(e, t) => {
59
+ e.open && d(t.event) && (e.open = !1);
60
+ }}"
61
+ exportparts="vvd-theme-alternate">
62
+ <div part="vvd-theme-alternate" class="tooltip" role="tooltip">
63
+ ${(e) => e.text}
64
+ </div>
65
+ </${n}>`;
66
+ }, [c], { styles: f }), g = r(h);
160
67
  //#endregion
161
- export { C as a, w as i, j as n, T as r, A as t };
68
+ export { h as n, p as r, g as t };
@@ -1 +1 @@
1
- const e=require(`./vivid-element.cjs`),t=require(`./decorate.cjs`),n=require(`./aria.cjs`),r=require(`./enums.cjs`),i=require(`./host-semantics.cjs`);var a={separator:`separator`,presentation:`presentation`},o=class extends i.t(e.t){constructor(...e){super(...e),this.role=a.separator,this.orientation=n.t.horizontal,this.appearance=r.t.Ghost}};t.t([e.l],o.prototype,`orientation`,void 0),t.t([e.l],o.prototype,`appearance`,void 0),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return o}});
1
+ const e=require(`./vivid-element.cjs`),t=require(`./enums.cjs`),n=require(`./decorate.cjs`),r=require(`./aria.cjs`),i=require(`./host-semantics.cjs`);var a={separator:`separator`,presentation:`presentation`},o=class extends i.t(e.t){constructor(...e){super(...e),this.role=a.separator,this.orientation=r.t.horizontal,this.appearance=t.t.Ghost}};n.t([e.l],o.prototype,`orientation`,void 0),n.t([e.l],o.prototype,`appearance`,void 0),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return o}});
@@ -1,7 +1,7 @@
1
1
  import { l as e, t } from "./vivid-element.js";
2
- import { t as n } from "./decorate.js";
3
- import { t as r } from "./aria.js";
4
- import { t as i } from "./enums.js";
2
+ import { t as n } from "./enums.js";
3
+ import { t as r } from "./decorate.js";
4
+ import { t as i } from "./aria.js";
5
5
  import { t as a } from "./host-semantics.js";
6
6
  //#region src/lib/divider/divider.ts
7
7
  var o = {
@@ -9,9 +9,9 @@ var o = {
9
9
  presentation: "presentation"
10
10
  }, s = class extends a(t) {
11
11
  constructor(...e) {
12
- super(...e), this.role = o.separator, this.orientation = r.horizontal, this.appearance = i.Ghost;
12
+ super(...e), this.role = o.separator, this.orientation = i.horizontal, this.appearance = n.Ghost;
13
13
  }
14
14
  };
15
- n([e], s.prototype, "orientation", void 0), n([e], s.prototype, "appearance", void 0);
15
+ r([e], s.prototype, "orientation", void 0), r([e], s.prototype, "appearance", void 0);
16
16
  //#endregion
17
17
  export { o as n, s as t };
@@ -1 +1 @@
1
- const e=require(`./vivid-element.cjs`),t=require(`./decorate.cjs`),n=require(`./key-codes.cjs`),r=require(`./strings.cjs`),i=require(`./definition12.cjs`);function a(e,t){let n=e.length;for(;n--;)if(t(e[n],n,e))return n;return-1}var o=class t extends e.t{constructor(...e){super(...e),this._options=[],this.selectedIndex=-1,this.selectedOptions=[],this.shouldSkipFocus=!1,this.typeaheadBuffer=``,this.typeaheadExpired=!0,this.typeaheadTimeout=-1,this._activeDescendant=null}get firstSelectedOption(){return this.selectedOptions[0]??null}get length(){return this.options.length}get options(){return e.w.track(this,`options`),this._options}set options(t){let n=this._options;if(this._options=t,e.w.notify(this,`options`),this.$fastController.isConnected){let e=this._newDefaultSelectedIndex(n,t,this.selectedIndex);e!==null&&(this.selectedIndex=e)}}static{this.slottedOptionFilter=e=>i.i(e)&&!e.hidden}static{this.TYPE_AHEAD_TIMEOUT_MS=1e3}clickHandler(e){let t=e.target.closest(`option,[role=option],[data-vvd-component=option]`);if(t&&!t.disabled)return this.selectedIndex=this.options.indexOf(t),!0}focusAndScrollOptionIntoView(e=this.firstSelectedOption){this.contains(document.activeElement)&&e!==null&&(e.focus(),requestAnimationFrame(()=>{e.scrollIntoView({block:`nearest`})}))}focusinHandler(e){!this.shouldSkipFocus&&e.target===e.currentTarget&&(this.setSelectedOptions(),this.focusAndScrollOptionIntoView()),this.shouldSkipFocus=!1}getTypeaheadMatches(){let e=this.typeaheadBuffer.replace(/[.*+\-?^${}()|[\]\\]/g,`\\$&`),t=RegExp(`^${e}`,`gi`);return this.options.filter(e=>e.text.trim().match(t))}getNextSelectableIndex(e){let t=this.options.reduce((t,n,r)=>!t&&!n.disabled&&r>=e?n:t,null);return this.options.indexOf(t)}getPreviousSelectableIndex(e){let t=this.options.reduceRight((t,n,r)=>!t&&!n.disabled&&r<=e?n:t,null);return this.options.indexOf(t)}handleChange(e,n){switch(n){case`selected`:t.slottedOptionFilter(e)&&(this.selectedIndex=this.options.indexOf(e)),this.setSelectedOptions();break}}handleTypeAhead(e){this.typeaheadTimeout&&window.clearTimeout(this.typeaheadTimeout),this.typeaheadTimeout=window.setTimeout(()=>this.typeaheadExpired=!0,t.TYPE_AHEAD_TIMEOUT_MS),this.typeaheadBuffer=`${this.typeaheadExpired?``:this.typeaheadBuffer}${e}`}keydownHandler(e){if(this.disabled)return!0;this.shouldSkipFocus=!1;let t=e.key;switch(t){case n.s:e.shiftKey||(e.preventDefault(),this.selectFirstOption());break;case n.t:e.shiftKey||(e.preventDefault(),this.selectNextOption());break;case n.i:e.shiftKey||(e.preventDefault(),this.selectPreviousOption());break;case`End`:e.preventDefault(),this.selectLastOption();break;case`Tab`:return this.focusAndScrollOptionIntoView(),!0;case n.a:case n.o:return!0;case` `:if(this.typeaheadExpired)return!0;default:return t.length===1&&this.handleTypeAhead(`${t}`),!0}}mousedownHandler(e){return this.shouldSkipFocus=!this.contains(document.activeElement),!0}selectedIndexChanged(e,t){let n=this._validSelectedIndex(t);if(t!==n){this.selectedIndex=n;return}this.setSelectedOptions()}_validSelectedIndex(e){return e>this.options.length-1||e<-1?-1:e}selectedOptionsChanged(n,r){let i=r.filter(t.slottedOptionFilter);this.options.forEach(t=>{let n=e.w.getNotifier(t);n.unsubscribe(this,`selected`),t.selected=i.includes(t),n.subscribe(this,`selected`)})}selectFirstOption(){this.disabled||(this.selectedIndex=this.options.findIndex(e=>!e.disabled))}selectLastOption(){this.disabled||(this.selectedIndex=a(this.options,e=>!e.disabled))}selectNextOption(){if(!this.disabled&&this.selectedIndex<this.options.length-1){let e=this.getNextSelectableIndex(this.selectedIndex+1);e!==-1&&(this.selectedIndex=e)}}selectPreviousOption(){if(!this.disabled&&this.selectedIndex>0){let e=this.getPreviousSelectableIndex(this.selectedIndex-1);e!==-1&&(this.selectedIndex=e)}}_newDefaultSelectedIndex(e,t,n){for(let[n,r]of t.entries())if(this._isDefaultSelected(r)&&!e.includes(r))return n;return null}_isDefaultSelected(e){return e.defaultSelected}setSelectedOptions(){this.selectedOptions=this.selectedIndex===-1?[]:[this.options[this.selectedIndex]],this._activeDescendant=this.firstSelectedOption?.id??``,this.focusAndScrollOptionIntoView()}slottedOptionsChanged(e,t){this.options=t.reduce((e,t)=>(i.i(t)&&e.push(t),e),[]);let n=`${this.options.length}`;this.options.forEach((e,t)=>{e.id||=r.t(`option-`),e.ariaPosInSet=`${t+1}`,e.ariaSetSize=n})}typeaheadBufferChanged(e,t){if(this.$fastController.isConnected){let e=this.getTypeaheadMatches();if(e.length){let t=this.options.indexOf(e[0]);t>-1&&(this.selectedIndex=t)}this.typeaheadExpired=!1}}};t.t([e.l({mode:`boolean`})],o.prototype,`disabled`,void 0),t.t([e.T],o.prototype,`selectedIndex`,void 0),t.t([e.T],o.prototype,`selectedOptions`,void 0),t.t([e.T],o.prototype,`slottedOptions`,void 0),t.t([e.T],o.prototype,`typeaheadBuffer`,void 0),t.t([e.T],o.prototype,`_activeDescendant`,void 0),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return o}});
1
+ const e=require(`./vivid-element.cjs`),t=require(`./decorate.cjs`),n=require(`./key-codes.cjs`),r=require(`./strings.cjs`),i=require(`./definition17.cjs`);function a(e,t){let n=e.length;for(;n--;)if(t(e[n],n,e))return n;return-1}var o=class t extends e.t{constructor(...e){super(...e),this._options=[],this.selectedIndex=-1,this.selectedOptions=[],this.shouldSkipFocus=!1,this.typeaheadBuffer=``,this.typeaheadExpired=!0,this.typeaheadTimeout=-1,this._activeDescendant=null}get firstSelectedOption(){return this.selectedOptions[0]??null}get length(){return this.options.length}get options(){return e.w.track(this,`options`),this._options}set options(t){let n=this._options;if(this._options=t,e.w.notify(this,`options`),this.$fastController.isConnected){let e=this._newDefaultSelectedIndex(n,t,this.selectedIndex);e!==null&&(this.selectedIndex=e)}}static{this.slottedOptionFilter=e=>i.i(e)&&!e.hidden}static{this.TYPE_AHEAD_TIMEOUT_MS=1e3}clickHandler(e){let t=e.target.closest(`option,[role=option],[data-vvd-component=option]`);if(t&&!t.disabled)return this.selectedIndex=this.options.indexOf(t),!0}focusAndScrollOptionIntoView(e=this.firstSelectedOption){this.contains(document.activeElement)&&e!==null&&(e.focus(),requestAnimationFrame(()=>{e.scrollIntoView({block:`nearest`})}))}focusinHandler(e){!this.shouldSkipFocus&&e.target===e.currentTarget&&(this.setSelectedOptions(),this.focusAndScrollOptionIntoView()),this.shouldSkipFocus=!1}getTypeaheadMatches(){let e=this.typeaheadBuffer.replace(/[.*+\-?^${}()|[\]\\]/g,`\\$&`),t=RegExp(`^${e}`,`gi`);return this.options.filter(e=>e.text.trim().match(t))}getNextSelectableIndex(e){let t=this.options.reduce((t,n,r)=>!t&&!n.disabled&&r>=e?n:t,null);return this.options.indexOf(t)}getPreviousSelectableIndex(e){let t=this.options.reduceRight((t,n,r)=>!t&&!n.disabled&&r<=e?n:t,null);return this.options.indexOf(t)}handleChange(e,n){switch(n){case`selected`:t.slottedOptionFilter(e)&&(this.selectedIndex=this.options.indexOf(e)),this.setSelectedOptions();break}}handleTypeAhead(e){this.typeaheadTimeout&&window.clearTimeout(this.typeaheadTimeout),this.typeaheadTimeout=window.setTimeout(()=>this.typeaheadExpired=!0,t.TYPE_AHEAD_TIMEOUT_MS),this.typeaheadBuffer=`${this.typeaheadExpired?``:this.typeaheadBuffer}${e}`}keydownHandler(e){if(this.disabled)return!0;this.shouldSkipFocus=!1;let t=e.key;switch(t){case n.s:e.shiftKey||(e.preventDefault(),this.selectFirstOption());break;case n.t:e.shiftKey||(e.preventDefault(),this.selectNextOption());break;case n.i:e.shiftKey||(e.preventDefault(),this.selectPreviousOption());break;case`End`:e.preventDefault(),this.selectLastOption();break;case`Tab`:return this.focusAndScrollOptionIntoView(),!0;case n.a:case n.o:return!0;case` `:if(this.typeaheadExpired)return!0;default:return t.length===1&&this.handleTypeAhead(`${t}`),!0}}mousedownHandler(e){return this.shouldSkipFocus=!this.contains(document.activeElement),!0}selectedIndexChanged(e,t){let n=this._validSelectedIndex(t);if(t!==n){this.selectedIndex=n;return}this.setSelectedOptions()}_validSelectedIndex(e){return e>this.options.length-1||e<-1?-1:e}selectedOptionsChanged(n,r){let i=r.filter(t.slottedOptionFilter);this.options.forEach(t=>{let n=e.w.getNotifier(t);n.unsubscribe(this,`selected`),t.selected=i.includes(t),n.subscribe(this,`selected`)})}selectFirstOption(){this.disabled||(this.selectedIndex=this.options.findIndex(e=>!e.disabled))}selectLastOption(){this.disabled||(this.selectedIndex=a(this.options,e=>!e.disabled))}selectNextOption(){if(!this.disabled&&this.selectedIndex<this.options.length-1){let e=this.getNextSelectableIndex(this.selectedIndex+1);e!==-1&&(this.selectedIndex=e)}}selectPreviousOption(){if(!this.disabled&&this.selectedIndex>0){let e=this.getPreviousSelectableIndex(this.selectedIndex-1);e!==-1&&(this.selectedIndex=e)}}_newDefaultSelectedIndex(e,t,n){for(let[n,r]of t.entries())if(this._isDefaultSelected(r)&&!e.includes(r))return n;return null}_isDefaultSelected(e){return e.defaultSelected}setSelectedOptions(){this.selectedOptions=this.selectedIndex===-1?[]:[this.options[this.selectedIndex]],this._activeDescendant=this.firstSelectedOption?.id??``,this.focusAndScrollOptionIntoView()}slottedOptionsChanged(e,t){this.options=t.reduce((e,t)=>(i.i(t)&&e.push(t),e),[]);let n=`${this.options.length}`;this.options.forEach((e,t)=>{e.id||=r.t(`option-`),e.ariaPosInSet=`${t+1}`,e.ariaSetSize=n})}typeaheadBufferChanged(e,t){if(this.$fastController.isConnected){let e=this.getTypeaheadMatches();if(e.length){let t=this.options.indexOf(e[0]);t>-1&&(this.selectedIndex=t)}this.typeaheadExpired=!1}}};t.t([e.l({mode:`boolean`})],o.prototype,`disabled`,void 0),t.t([e.T],o.prototype,`selectedIndex`,void 0),t.t([e.T],o.prototype,`selectedOptions`,void 0),t.t([e.T],o.prototype,`slottedOptions`,void 0),t.t([e.T],o.prototype,`typeaheadBuffer`,void 0),t.t([e.T],o.prototype,`_activeDescendant`,void 0),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return o}});
@@ -2,7 +2,7 @@ import { T as e, l as t, t as n, w as r } from "./vivid-element.js";
2
2
  import { t as i } from "./decorate.js";
3
3
  import { a, i as o, o as s, s as c, t as l } from "./key-codes.js";
4
4
  import { t as u } from "./strings.js";
5
- import { i as d } from "./definition12.js";
5
+ import { i as d } from "./definition17.js";
6
6
  //#region ../../node_modules/.pnpm/@microsoft+fast-web-utilities@6.0.0/node_modules/@microsoft/fast-web-utilities/dist/array.js
7
7
  function f(e, t) {
8
8
  let n = e.length;
@@ -5,7 +5,7 @@ const e=require(`./localized.cjs`),t=require(`./vivid-element.cjs`),n=require(`.
5
5
  </div>`;return t.d`${r.t(e=>!p(e.type),n)}
6
6
  <span class="announcement" role="status" aria-live="polite">
7
7
  ${r.t(e=>p(e.type),n)}
8
- </span>`},[o.t,a.n],{styles:l}),h=class{constructor(e){this.source=null,this.templateBindingObserver=e.templateBinding.createObserver(this,e)}bind(e){this.source=e.source,this.context=e.context,this.controller=e,this.insertionPoint||(this.insertionPoint=document.createComment(``),this.source.appendChild(this.insertionPoint)),this.templateBindingObserver.bind(e),this.handleChange(this.source,this.templateBindingObserver)}handleChange(e,t){if(t===this.templateBindingObserver){let e=this.templateBindingObserver.bind(this.controller);this.instantiateTemplate(e)}}instantiateTemplate(e){this.view&&this.view.dispose(),this.view=e.create(),this.view.bind(this.source,this.context),this.view.insertBefore(this.insertionPoint)}},g=class{constructor(e){this.targetNodeId=``,this.templateBinding=e,this.dataBinding=e}createHTML(e){return t.g.comment(e(this))}createBehavior(){return new h(this)}};t.m.define(g);function _(e){return new g(n.t(e))}var v=[];for(let e=0;e<256;++e)v.push((e+256).toString(16).slice(1));function y(e,t=0){return(v[e[t+0]]+v[e[t+1]]+v[e[t+2]]+v[e[t+3]]+`-`+v[e[t+4]]+v[e[t+5]]+`-`+v[e[t+6]]+v[e[t+7]]+`-`+v[e[t+8]]+v[e[t+9]]+`-`+v[e[t+10]]+v[e[t+11]]+v[e[t+12]]+v[e[t+13]]+v[e[t+14]]+v[e[t+15]]).toLowerCase()}var b,x=new Uint8Array(16);function S(){if(!b){if(typeof crypto>`u`||!crypto.getRandomValues)throw Error(`crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported`);b=crypto.getRandomValues.bind(crypto)}return b(x)}var C={randomUUID:typeof crypto<`u`&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function w(e,t,n){if(C.randomUUID&&!t&&!e)return C.randomUUID();e||={};let r=e.random??e.rng?.()??S();if(r.length<16)throw Error(`Random bytes length must be >= 16`);if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){if(n||=0,n<0||n+16>t.length)throw RangeError(`UUID byte range ${n}:${n+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[n+e]=r[e];return t}return y(r)}var T=()=>w(),E=e=>{class n extends e{get _feedbackDescribedBy(){return`feedback slotted-helper-text-feedback`}_internalFeedback(){let e=this._helperTextSlottedContent?.length?``:this.helperText,t=this.errorValidationMessage,n=this.successText;return n?{type:`success`,message:n}:t?{type:`error`,message:t}:e?{type:`helper`,message:e}:{type:`none`,message:``}}_slottedHelperTextFeedbackType(){return this._internalFeedback().type===`none`&&this._helperTextSlottedContent?.length?`helper`:`none`}_getFeedbackTemplate(e){let n=e.tagFor(u);return t.d`
8
+ </span>`},[o.t,a.n],{styles:l}),h=[];for(let e=0;e<256;++e)h.push((e+256).toString(16).slice(1));function g(e,t=0){return(h[e[t+0]]+h[e[t+1]]+h[e[t+2]]+h[e[t+3]]+`-`+h[e[t+4]]+h[e[t+5]]+`-`+h[e[t+6]]+h[e[t+7]]+`-`+h[e[t+8]]+h[e[t+9]]+`-`+h[e[t+10]]+h[e[t+11]]+h[e[t+12]]+h[e[t+13]]+h[e[t+14]]+h[e[t+15]]).toLowerCase()}var _,v=new Uint8Array(16);function y(){if(!_){if(typeof crypto>`u`||!crypto.getRandomValues)throw Error(`crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported`);_=crypto.getRandomValues.bind(crypto)}return _(v)}var b={randomUUID:typeof crypto<`u`&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function x(e,t,n){if(b.randomUUID&&!t&&!e)return b.randomUUID();e||={};let r=e.random??e.rng?.()??y();if(r.length<16)throw Error(`Random bytes length must be >= 16`);if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){if(n||=0,n<0||n+16>t.length)throw RangeError(`UUID byte range ${n}:${n+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[n+e]=r[e];return t}return g(r)}var S=()=>x(),C=class{constructor(e){this.source=null,this.templateBindingObserver=e.templateBinding.createObserver(this,e)}bind(e){this.source=e.source,this.context=e.context,this.controller=e,this.insertionPoint||(this.insertionPoint=document.createComment(``),this.source.appendChild(this.insertionPoint)),this.templateBindingObserver.bind(e),this.handleChange(this.source,this.templateBindingObserver)}handleChange(e,t){if(t===this.templateBindingObserver){let e=this.templateBindingObserver.bind(this.controller);this.instantiateTemplate(e)}}instantiateTemplate(e){this.view&&this.view.dispose(),this.view=e.create(),this.view.bind(this.source,this.context),this.view.insertBefore(this.insertionPoint)}},w=class{constructor(e){this.targetNodeId=``,this.templateBinding=e,this.dataBinding=e}createHTML(e){return t.g.comment(e(this))}createBehavior(){return new C(this)}};t.m.define(w);function T(e){return new w(n.t(e))}var E=e=>{class n extends e{get _feedbackDescribedBy(){return`feedback slotted-helper-text-feedback`}_internalFeedback(){let e=this._helperTextSlottedContent?.length?``:this.helperText,t=this.errorValidationMessage,n=this.successText;return n?{type:`success`,message:n}:t?{type:`error`,message:t}:e?{type:`helper`,message:e}:{type:`none`,message:``}}_slottedHelperTextFeedbackType(){return this._internalFeedback().type===`none`&&this._helperTextSlottedContent?.length?`helper`:`none`}_getFeedbackTemplate(e){let n=e.tagFor(u);return t.d`
9
9
  <${n} id="feedback" :type="${e=>e._internalFeedback().type}">
10
10
  ${e=>e._internalFeedback().message}
11
11
  </${n}>
@@ -15,9 +15,9 @@ const e=require(`./localized.cjs`),t=require(`./vivid-element.cjs`),n=require(`.
15
15
  >
16
16
  <slot name="helper-text" ${i.t(`_helperTextSlottedContent`)}></slot>
17
17
  </${n}>
18
- `}}return s.t([t.l({attribute:`helper-text`})],n.prototype,`helperText`,void 0),s.t([t.T],n.prototype,`_helperTextSlottedContent`,void 0),n},D=e=>{let n=()=>`vvd-feedback-${T()}`,r=()=>`vvd-slotted-feedback-${T()}`;class a extends E(e){constructor(...e){super(...e),this._slottedHelperTextIds=[],this._feedbackId=n()}_helperTextSlottedContentChanged(e,t){for(let e of t)e.id||=r();this._slottedHelperTextIds=t.map(e=>e.id)}get _feedbackDescribedBy(){return[this._feedbackId,...this._slottedHelperTextIds].join(` `)}_getFeedbackTemplate(e){let n=e.tagFor(u);return t.d`
18
+ `}}return s.t([t.l({attribute:`helper-text`})],n.prototype,`helperText`,void 0),s.t([t.T],n.prototype,`_helperTextSlottedContent`,void 0),n},D=e=>{let n=()=>`vvd-feedback-${S()}`,r=()=>`vvd-slotted-feedback-${S()}`;class a extends E(e){constructor(...e){super(...e),this._slottedHelperTextIds=[],this._feedbackId=n()}_helperTextSlottedContentChanged(e,t){for(let e of t)e.id||=r();this._slottedHelperTextIds=t.map(e=>e.id)}get _feedbackDescribedBy(){return[this._feedbackId,...this._slottedHelperTextIds].join(` `)}_getFeedbackTemplate(e){let n=e.tagFor(u);return t.d`
19
19
  <slot name="_feedback"></slot>
20
- ${_(t.d`<${n}
20
+ ${T(t.d`<${n}
21
21
  slot="_feedback"
22
22
  id="${e=>e._feedbackId}"
23
23
  :type="${e=>e._internalFeedback().type}"
@@ -30,4 +30,4 @@ const e=require(`./localized.cjs`),t=require(`./vivid-element.cjs`),n=require(`.
30
30
  ${i.t(`_helperTextSlottedContent`)}
31
31
  ></slot>
32
32
  </${n}>
33
- `}}return s.t([t.T],a.prototype,`_slottedHelperTextIds`,void 0),a};Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return m}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return _}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return D}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return T}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return E}});
33
+ `}}return s.t([t.T],a.prototype,`_slottedHelperTextIds`,void 0),a};Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return m}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return S}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return D}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return T}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return E}});
package/bundled/mixins.js CHANGED
@@ -37,7 +37,39 @@ var b = (e) => e === "error", x = o("feedback-message", _, (e) => {
37
37
  <span class="announcement" role="status" aria-live="polite">
38
38
  ${l((e) => b(e.type), t)}
39
39
  </span>`;
40
- }, [p, d], { styles: g }), S = class {
40
+ }, [p, d], { styles: g }), S = [];
41
+ for (let e = 0; e < 256; ++e) S.push((e + 256).toString(16).slice(1));
42
+ function C(e, t = 0) {
43
+ return (S[e[t + 0]] + S[e[t + 1]] + S[e[t + 2]] + S[e[t + 3]] + "-" + S[e[t + 4]] + S[e[t + 5]] + "-" + S[e[t + 6]] + S[e[t + 7]] + "-" + S[e[t + 8]] + S[e[t + 9]] + "-" + S[e[t + 10]] + S[e[t + 11]] + S[e[t + 12]] + S[e[t + 13]] + S[e[t + 14]] + S[e[t + 15]]).toLowerCase();
44
+ }
45
+ //#endregion
46
+ //#region ../../node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/rng.js
47
+ var w, T = new Uint8Array(16);
48
+ function E() {
49
+ if (!w) {
50
+ if (typeof crypto > "u" || !crypto.getRandomValues) throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
51
+ w = crypto.getRandomValues.bind(crypto);
52
+ }
53
+ return w(T);
54
+ }
55
+ var D = { randomUUID: typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto) };
56
+ //#endregion
57
+ //#region ../../node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/v4.js
58
+ function O(e, t, n) {
59
+ if (D.randomUUID && !t && !e) return D.randomUUID();
60
+ e ||= {};
61
+ let r = e.random ?? e.rng?.() ?? E();
62
+ if (r.length < 16) throw Error("Random bytes length must be >= 16");
63
+ if (r[6] = r[6] & 15 | 64, r[8] = r[8] & 63 | 128, t) {
64
+ if (n ||= 0, n < 0 || n + 16 > t.length) throw RangeError(`UUID byte range ${n}:${n + 15} is out of buffer bounds`);
65
+ for (let e = 0; e < 16; ++e) t[n + e] = r[e];
66
+ return t;
67
+ }
68
+ return C(r);
69
+ }
70
+ //#endregion
71
+ //#region src/shared/utils/randomId.ts
72
+ var k = () => O(), A = class {
41
73
  constructor(e) {
42
74
  this.source = null, this.templateBindingObserver = e.templateBinding.createObserver(this, e);
43
75
  }
@@ -54,7 +86,7 @@ var b = (e) => e === "error", x = o("feedback-message", _, (e) => {
54
86
  instantiateTemplate(e) {
55
87
  this.view && this.view.dispose(), this.view = e.create(), this.view.bind(this.source, this.context), this.view.insertBefore(this.insertionPoint);
56
88
  }
57
- }, C = class {
89
+ }, j = class {
58
90
  constructor(e) {
59
91
  this.targetNodeId = "", this.templateBinding = e, this.dataBinding = e;
60
92
  }
@@ -62,48 +94,16 @@ var b = (e) => e === "error", x = o("feedback-message", _, (e) => {
62
94
  return r.comment(e(this));
63
95
  }
64
96
  createBehavior() {
65
- return new S(this);
97
+ return new A(this);
66
98
  }
67
99
  };
68
- a.define(C);
69
- function w(e) {
70
- return new C(c(e));
100
+ a.define(j);
101
+ function M(e) {
102
+ return new j(c(e));
71
103
  }
72
104
  //#endregion
73
- //#region ../../node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/stringify.js
74
- var T = [];
75
- for (let e = 0; e < 256; ++e) T.push((e + 256).toString(16).slice(1));
76
- function E(e, t = 0) {
77
- return (T[e[t + 0]] + T[e[t + 1]] + T[e[t + 2]] + T[e[t + 3]] + "-" + T[e[t + 4]] + T[e[t + 5]] + "-" + T[e[t + 6]] + T[e[t + 7]] + "-" + T[e[t + 8]] + T[e[t + 9]] + "-" + T[e[t + 10]] + T[e[t + 11]] + T[e[t + 12]] + T[e[t + 13]] + T[e[t + 14]] + T[e[t + 15]]).toLowerCase();
78
- }
79
- //#endregion
80
- //#region ../../node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/rng.js
81
- var D, O = new Uint8Array(16);
82
- function k() {
83
- if (!D) {
84
- if (typeof crypto > "u" || !crypto.getRandomValues) throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
85
- D = crypto.getRandomValues.bind(crypto);
86
- }
87
- return D(O);
88
- }
89
- var A = { randomUUID: typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto) };
90
- //#endregion
91
- //#region ../../node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/v4.js
92
- function j(e, t, n) {
93
- if (A.randomUUID && !t && !e) return A.randomUUID();
94
- e ||= {};
95
- let r = e.random ?? e.rng?.() ?? k();
96
- if (r.length < 16) throw Error("Random bytes length must be >= 16");
97
- if (r[6] = r[6] & 15 | 64, r[8] = r[8] & 63 | 128, t) {
98
- if (n ||= 0, n < 0 || n + 16 > t.length) throw RangeError(`UUID byte range ${n}:${n + 15} is out of buffer bounds`);
99
- for (let e = 0; e < 16; ++e) t[n + e] = r[e];
100
- return t;
101
- }
102
- return E(r);
103
- }
104
- //#endregion
105
- //#region src/shared/utils/randomId.ts
106
- var M = () => j(), N = (e) => {
105
+ //#region src/shared/feedback/mixins.ts
106
+ var N = (e) => {
107
107
  class r extends e {
108
108
  get _feedbackDescribedBy() {
109
109
  return "feedback slotted-helper-text-feedback";
@@ -144,7 +144,7 @@ var M = () => j(), N = (e) => {
144
144
  }
145
145
  return m([i({ attribute: "helper-text" })], r.prototype, "helperText", void 0), m([t], r.prototype, "_helperTextSlottedContent", void 0), r;
146
146
  }, P = (e) => {
147
- let r = () => `vvd-feedback-${M()}`, i = () => `vvd-slotted-feedback-${M()}`;
147
+ let r = () => `vvd-feedback-${k()}`, i = () => `vvd-slotted-feedback-${k()}`;
148
148
  class a extends N(e) {
149
149
  constructor(...e) {
150
150
  super(...e), this._slottedHelperTextIds = [], this._feedbackId = r();
@@ -162,7 +162,7 @@ var M = () => j(), N = (e) => {
162
162
  let t = e.tagFor(_);
163
163
  return n`
164
164
  <slot name="_feedback"></slot>
165
- ${w(n`<${t}
165
+ ${M(n`<${t}
166
166
  slot="_feedback"
167
167
  id="${(e) => e._feedbackId}"
168
168
  :type="${(e) => e._internalFeedback().type}"
@@ -181,4 +181,4 @@ var M = () => j(), N = (e) => {
181
181
  return m([t], a.prototype, "_slottedHelperTextIds", void 0), a;
182
182
  };
183
183
  //#endregion
184
- export { x as a, w as i, P as n, M as r, N as t };
184
+ export { x as a, k as i, P as n, M as r, N as t };
@@ -1,6 +1,6 @@
1
- const e=require(`./localized.cjs`),t=require(`./vivid-element.cjs`),n=require(`./ref.cjs`),r=require(`./slotted.cjs`),i=require(`./decorate.cjs`),a=require(`./class-names.cjs`),o=require(`./form-associated.cjs`),s=require(`./form-element.cjs`),c=require(`./with-error-text.cjs`),l=require(`./with-contextual-help.cjs`),u=require(`./trapped-focus.cjs`),d=require(`./definition6.cjs`),f=require(`./dialog.cjs`),p=require(`./definition8.cjs`),m=require(`./mixins.cjs`),h=require(`./definition15.cjs`);var g=`:host{display:inline-block}.base{inline-size:100%;display:inline-block}.control{inline-size:100%}.dialog{flex-direction:column;display:inline-flex}.dialog--padded{gap:12px;padding:12px}.dialog .footer{justify-content:flex-end;align-items:center;gap:8px;padding:8px;display:flex}.dialog .footer--with-separator{border-top:1px solid var(--vvd-color-neutral-200)}`,_=class extends l.t(m.t(c.t(s.t(u.t(e.t(o.n(t.t))))))){readOnlyChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.readOnly=this.readOnly,this.validate())}constructor(){super(),this.readOnly=!1,this.proxy=document.createElement(`input`),this._popupOpen=!1,this._presentationValue=``,this.value=``}connectedCallback(){super.connectedCallback(),document.addEventListener(`click`,this.#o),this.addEventListener(`focusin`,this.#e),this.addEventListener(`focusout`,this.#t),this.#i()}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener(`click`,this.#o),this.removeEventListener(`focusin`,this.#e),this.removeEventListener(`focusout`,this.#t),this.#a()}#e=()=>{this.$emit(`focus`,void 0,{bubbles:!1})};#t=()=>{this.$emit(`blur`,void 0,{bubbles:!1})};validate(){this.proxy&&this.proxy.setCustomValidity(this._getCustomValidationError()??``),super.validate(this._textFieldEl?.querySelector(`input`)??void 0)}#n={handleChange:()=>{this._updatePresentationValue()}};#r;#i(){this.#r=t.w.binding(()=>this.locale,this.#n),this.#r.observe(this,t.C.default)}#a(){this.#r.dispose()}#o=e=>{if(!this._popupOpen)return;let t=e.composedPath();[this._dialogEl,this._pickerButtonEl].some(e=>t.includes(e))||this._closePopup(!1)};#s(){this.readOnly||(this._popupOpen=!0)}_closePopup(e=!0){this._popupOpen=!1,e&&this._textFieldEl.focus()}_onBaseKeyDown(e){return this._popupOpen&&f.t(e)?(this._closePopup(),!1):!this._trappedFocus(e,()=>this._focusableElsWithinDialog())}_presentationValueChanged(){this.dirtyValue=!0,this.validate()}_onTextFieldInput(e){this._presentationValue=e.currentTarget.value}_onPickerButtonClick(){this._popupOpen?this._closePopup():this.#s()}_onOkClick(){this._closePopup()}_onClearClick(){this.$emit(`clear-click`)}};i.t([t.l({attribute:`readonly`,mode:`boolean`})],_.prototype,`readOnly`,void 0),i.t([t.T],_.prototype,`_popupOpen`,void 0),i.t([t.T],_.prototype,`_presentationValue`,void 0);var v=(e,i,{withSeparator:o,padded:s})=>{let c=e.tagFor(p.i),l=e.tagFor(h.r),u=e.tagFor(d.i);return t.d`
1
+ const e=require(`./localized.cjs`),t=require(`./vivid-element.cjs`),n=require(`./ref.cjs`),r=require(`./slotted.cjs`),i=require(`./decorate.cjs`),a=require(`./form-element.cjs`),o=require(`./with-error-text.cjs`),s=require(`./with-contextual-help.cjs`),c=require(`./trapped-focus.cjs`),l=require(`./class-names.cjs`),u=require(`./form-associated.cjs`),d=require(`./definition6.cjs`),f=require(`./definition8.cjs`),p=require(`./dialog.cjs`),m=require(`./mixins.cjs`),h=require(`./definition12.cjs`);var g=`:host{display:inline-block}.base{inline-size:100%;display:inline-block}.control{inline-size:100%}.dialog{flex-direction:column;display:inline-flex}.dialog--padded{gap:12px;padding:12px}.dialog .footer{justify-content:flex-end;align-items:center;gap:8px;padding:8px;display:flex}.dialog .footer--with-separator{border-top:1px solid var(--vvd-color-neutral-200)}`,_=class extends s.t(m.t(o.t(a.t(c.t(e.t(u.n(t.t))))))){readOnlyChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.readOnly=this.readOnly,this.validate())}constructor(){super(),this.readOnly=!1,this.proxy=document.createElement(`input`),this._popupOpen=!1,this._presentationValue=``,this.value=``}connectedCallback(){super.connectedCallback(),document.addEventListener(`click`,this.#o),this.addEventListener(`focusin`,this.#e),this.addEventListener(`focusout`,this.#t),this.#i()}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener(`click`,this.#o),this.removeEventListener(`focusin`,this.#e),this.removeEventListener(`focusout`,this.#t),this.#a()}#e=()=>{this.$emit(`focus`,void 0,{bubbles:!1})};#t=()=>{this.$emit(`blur`,void 0,{bubbles:!1})};validate(){this.proxy&&this.proxy.setCustomValidity(this._getCustomValidationError()??``),super.validate(this._textFieldEl?.querySelector(`input`)??void 0)}#n={handleChange:()=>{this._updatePresentationValue()}};#r;#i(){this.#r=t.w.binding(()=>this.locale,this.#n),this.#r.observe(this,t.C.default)}#a(){this.#r.dispose()}#o=e=>{if(!this._popupOpen)return;let t=e.composedPath();[this._dialogEl,this._pickerButtonEl].some(e=>t.includes(e))||this._closePopup(!1)};#s(){this.readOnly||(this._popupOpen=!0)}_closePopup(e=!0){this._popupOpen=!1,e&&this._textFieldEl.focus()}_onBaseKeyDown(e){return this._popupOpen&&p.t(e)?(this._closePopup(),!1):!this._trappedFocus(e,()=>this._focusableElsWithinDialog())}_presentationValueChanged(){this.dirtyValue=!0,this.validate()}_onTextFieldInput(e){this._presentationValue=e.currentTarget.value}_onPickerButtonClick(){this._popupOpen?this._closePopup():this.#s()}_onOkClick(){this._closePopup()}_onClearClick(){this.$emit(`clear-click`)}};i.t([t.l({attribute:`readonly`,mode:`boolean`})],_.prototype,`readOnly`,void 0),i.t([t.T],_.prototype,`_popupOpen`,void 0),i.t([t.T],_.prototype,`_presentationValue`,void 0);var v=(e,i,{withSeparator:a,padded:o})=>{let s=e.tagFor(f.i),c=e.tagFor(h.r),u=e.tagFor(d.i);return t.d`
2
2
  <div class='base' @keydown='${(e,{event:t})=>e._onBaseKeyDown(t)}'>
3
- <${l} id='text-field'
3
+ <${c} id='text-field'
4
4
  ${n.t(`_textFieldEl`)}
5
5
  class='control'
6
6
  label='${e=>e.label}'
@@ -35,16 +35,16 @@ const e=require(`./localized.cjs`),t=require(`./vivid-element.cjs`),n=require(`.
35
35
  aria-label='${e=>e._pickerButtonLabel}'
36
36
  @click='${e=>e._onPickerButtonClick()}'
37
37
  ></${u}>
38
- </${l}>
39
- <${c}
38
+ </${c}>
39
+ <${s}
40
40
  ?open='${e=>e._popupOpen}'
41
41
  :anchor='${e=>e._textFieldEl}'
42
42
  offset='${e=>e._helperTextSlottedContent?.length||e.helperText||e.errorValidationMessage?8:null}'
43
43
  placement='bottom-start'
44
44
  class='popup'>
45
- <div class="${()=>a.t(`dialog`,[`dialog--padded`,s])}" role='dialog' ${n.t(`_dialogEl`)} aria-modal='true' aria-label='${e=>e._dialogLabel}'>
45
+ <div class="${()=>l.t(`dialog`,[`dialog--padded`,o])}" role='dialog' ${n.t(`_dialogEl`)} aria-modal='true' aria-label='${e=>e._dialogLabel}'>
46
46
  ${()=>i}
47
- <div class="${()=>a.t(`footer`,[`footer--with-separator`,o])}">
47
+ <div class="${()=>l.t(`footer`,[`footer--with-separator`,a])}">
48
48
  <${u}
49
49
  id='clear-button'
50
50
  tabindex='3'
@@ -63,5 +63,5 @@ const e=require(`./localized.cjs`),t=require(`./vivid-element.cjs`),n=require(`.
63
63
  ></${u}>
64
64
  </div>
65
65
  </div>
66
- </${c}>
66
+ </${s}>
67
67
  </div>`};Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return _}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return g}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return v}});
@@ -3,19 +3,19 @@ import { C as t, T as n, d as r, l as i, t as a, w as o } from "./vivid-element.
3
3
  import { t as s } from "./ref.js";
4
4
  import { t as c } from "./slotted.js";
5
5
  import { t as l } from "./decorate.js";
6
- import { t as u } from "./class-names.js";
7
- import { n as d } from "./form-associated.js";
8
- import { t as f } from "./form-element.js";
9
- import { t as p } from "./with-error-text.js";
10
- import { t as m } from "./with-contextual-help.js";
11
- import { t as h } from "./trapped-focus.js";
6
+ import { t as u } from "./form-element.js";
7
+ import { t as d } from "./with-error-text.js";
8
+ import { t as f } from "./with-contextual-help.js";
9
+ import { t as p } from "./trapped-focus.js";
10
+ import { t as m } from "./class-names.js";
11
+ import { n as h } from "./form-associated.js";
12
12
  import { i as g } from "./definition6.js";
13
- import { t as _ } from "./dialog.js";
14
- import { i as v } from "./definition8.js";
13
+ import { i as _ } from "./definition8.js";
14
+ import { t as v } from "./dialog.js";
15
15
  import { t as y } from "./mixins.js";
16
- import { r as b } from "./definition15.js";
16
+ import { r as b } from "./definition12.js";
17
17
  //#region src/shared/picker-field/picker-field.scss?inline
18
- var x = ":host{display:inline-block}.base{inline-size:100%;display:inline-block}.control{inline-size:100%}.dialog{flex-direction:column;display:inline-flex}.dialog--padded{gap:12px;padding:12px}.dialog .footer{justify-content:flex-end;align-items:center;gap:8px;padding:8px;display:flex}.dialog .footer--with-separator{border-top:1px solid var(--vvd-color-neutral-200)}", S = class extends m(y(p(f(h(e(d(a))))))) {
18
+ var x = ":host{display:inline-block}.base{inline-size:100%;display:inline-block}.control{inline-size:100%}.dialog{flex-direction:column;display:inline-flex}.dialog--padded{gap:12px;padding:12px}.dialog .footer{justify-content:flex-end;align-items:center;gap:8px;padding:8px;display:flex}.dialog .footer--with-separator{border-top:1px solid var(--vvd-color-neutral-200)}", S = class extends f(y(d(u(p(e(h(a))))))) {
19
19
  readOnlyChanged() {
20
20
  this.proxy instanceof HTMLInputElement && (this.proxy.readOnly = this.readOnly, this.validate());
21
21
  }
@@ -60,7 +60,7 @@ var x = ":host{display:inline-block}.base{inline-size:100%;display:inline-block}
60
60
  this._popupOpen = !1, e && this._textFieldEl.focus();
61
61
  }
62
62
  _onBaseKeyDown(e) {
63
- return this._popupOpen && _(e) ? (this._closePopup(), !1) : !this._trappedFocus(e, () => this._focusableElsWithinDialog());
63
+ return this._popupOpen && v(e) ? (this._closePopup(), !1) : !this._trappedFocus(e, () => this._focusableElsWithinDialog());
64
64
  }
65
65
  _presentationValueChanged() {
66
66
  this.dirtyValue = !0, this.validate();
@@ -85,7 +85,7 @@ l([i({
85
85
  //#endregion
86
86
  //#region src/shared/picker-field/picker-field.template.ts
87
87
  var C = (e, t, { withSeparator: n, padded: i }) => {
88
- let a = e.tagFor(v), o = e.tagFor(b), l = e.tagFor(g);
88
+ let a = e.tagFor(_), o = e.tagFor(b), l = e.tagFor(g);
89
89
  return r`
90
90
  <div class='base' @keydown='${(e, { event: t }) => e._onBaseKeyDown(t)}'>
91
91
  <${o} id='text-field'
@@ -130,9 +130,9 @@ var C = (e, t, { withSeparator: n, padded: i }) => {
130
130
  offset='${(e) => e._helperTextSlottedContent?.length || e.helperText || e.errorValidationMessage ? 8 : null}'
131
131
  placement='bottom-start'
132
132
  class='popup'>
133
- <div class="${() => u("dialog", ["dialog--padded", i])}" role='dialog' ${s("_dialogEl")} aria-modal='true' aria-label='${(e) => e._dialogLabel}'>
133
+ <div class="${() => m("dialog", ["dialog--padded", i])}" role='dialog' ${s("_dialogEl")} aria-modal='true' aria-label='${(e) => e._dialogLabel}'>
134
134
  ${() => t}
135
- <div class="${() => u("footer", ["footer--with-separator", n])}">
135
+ <div class="${() => m("footer", ["footer--with-separator", n])}">
136
136
  <${l}
137
137
  id='clear-button'
138
138
  tabindex='3'