@vonage/vivid 5.2.0 → 5.3.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 (373) hide show
  1. package/accordion-item/definition.cjs +2 -1
  2. package/accordion-item/definition.js +2 -1
  3. package/alert/index.cjs +1 -1
  4. package/alert/index.js +1 -1
  5. package/audio-player/definition.cjs +4 -2
  6. package/audio-player/definition.js +4 -2
  7. package/audio-player/index.cjs +5 -3
  8. package/audio-player/index.js +5 -3
  9. package/badge/index.cjs +2 -2
  10. package/badge/index.js +4 -4
  11. package/banner/index.cjs +3 -3
  12. package/banner/index.js +6 -6
  13. package/breadcrumb-item/index.cjs +1 -1
  14. package/breadcrumb-item/index.js +1 -1
  15. package/bundled/affix.cjs +7 -7
  16. package/bundled/affix.js +5 -5
  17. package/bundled/anchored.cjs +1 -1
  18. package/bundled/anchored.js +6 -6
  19. package/bundled/attribute-binding-behaviour.cjs +1 -1
  20. package/bundled/attribute-binding-behaviour.js +15 -13
  21. package/bundled/base-color-picker.cjs +13 -0
  22. package/bundled/base-color-picker.js +194 -0
  23. package/bundled/button.cjs +1 -1
  24. package/bundled/button.js +2 -2
  25. package/bundled/calendar-picker.template.cjs +1 -1
  26. package/bundled/calendar-picker.template.js +21 -21
  27. package/bundled/char-count.cjs +1 -1
  28. package/bundled/char-count.js +1 -1
  29. package/bundled/children.cjs +1 -1
  30. package/bundled/children.js +28 -20
  31. package/bundled/definition.cjs +3 -3
  32. package/bundled/definition.js +38 -38
  33. package/bundled/definition10.cjs +72 -18
  34. package/bundled/definition10.js +351 -65
  35. package/bundled/definition11.cjs +19 -10
  36. package/bundled/definition11.js +66 -37
  37. package/bundled/definition12.cjs +10 -1
  38. package/bundled/definition12.js +38 -14
  39. package/bundled/definition13.cjs +1 -73
  40. package/bundled/definition13.js +15 -354
  41. package/bundled/definition15.cjs +1 -1
  42. package/bundled/definition15.js +1 -1
  43. package/bundled/definition16.cjs +2 -2
  44. package/bundled/definition16.js +8 -8
  45. package/bundled/definition17.cjs +7 -7
  46. package/bundled/definition17.js +17 -17
  47. package/bundled/definition19.cjs +5 -5
  48. package/bundled/definition19.js +8 -8
  49. package/bundled/definition2.cjs +9 -5
  50. package/bundled/definition2.js +21 -17
  51. package/bundled/definition22.cjs +9 -9
  52. package/bundled/definition22.js +31 -31
  53. package/bundled/definition3.cjs +1 -1
  54. package/bundled/definition3.js +1 -1
  55. package/bundled/definition6.cjs +1 -1
  56. package/bundled/definition6.js +10 -10
  57. package/bundled/definition7.cjs +1 -1
  58. package/bundled/definition7.js +6 -6
  59. package/bundled/definition8.cjs +2 -2
  60. package/bundled/definition8.js +4 -4
  61. package/bundled/definition9.cjs +1 -1
  62. package/bundled/definition9.js +1 -1
  63. package/bundled/delegates-aria.cjs +1 -1
  64. package/bundled/delegates-aria.js +59 -46
  65. package/bundled/form-associated.cjs +1 -1
  66. package/bundled/form-associated.js +3 -3
  67. package/bundled/host-semantics.cjs +1 -1
  68. package/bundled/host-semantics.js +48 -34
  69. package/bundled/localized.cjs +1 -1
  70. package/bundled/localized.js +41 -30
  71. package/bundled/mixins.cjs +18 -18
  72. package/bundled/mixins.js +99 -93
  73. package/bundled/normalize.cjs +1 -0
  74. package/bundled/normalize.js +7 -0
  75. package/bundled/picker-field.template.cjs +1 -1
  76. package/bundled/picker-field.template.js +4 -4
  77. package/bundled/ref.cjs +1 -1
  78. package/bundled/ref.js +8 -25
  79. package/bundled/repeat.cjs +1 -1
  80. package/bundled/repeat.js +459 -233
  81. package/bundled/slider.template.cjs +1 -1
  82. package/bundled/slider.template.js +2 -2
  83. package/bundled/slotted.cjs +1 -1
  84. package/bundled/slotted.js +62 -45
  85. package/bundled/time-selection-picker.template.cjs +1 -1
  86. package/bundled/time-selection-picker.template.js +5 -5
  87. package/bundled/vivid-element.cjs +1 -1
  88. package/bundled/vivid-element.js +2126 -1172
  89. package/bundled/when.cjs +1 -1
  90. package/bundled/when.js +8 -7
  91. package/calendar/definition.cjs +1 -1
  92. package/calendar/definition.js +2 -2
  93. package/calendar/index.cjs +1 -1
  94. package/calendar/index.js +6 -6
  95. package/calendar-event/index.cjs +1 -1
  96. package/calendar-event/index.js +1 -1
  97. package/card/definition.cjs +10 -2
  98. package/card/definition.js +10 -2
  99. package/card/index.cjs +19 -11
  100. package/card/index.js +35 -27
  101. package/color-picker/definition.cjs +1079 -0
  102. package/color-picker/definition.js +1073 -0
  103. package/color-picker/index.cjs +127 -0
  104. package/color-picker/index.js +726 -0
  105. package/combobox/definition.cjs +1 -1
  106. package/combobox/definition.js +2 -2
  107. package/combobox/index.cjs +4 -4
  108. package/combobox/index.js +15 -15
  109. package/contextual-help/index.cjs +1 -1
  110. package/contextual-help/index.js +1 -1
  111. package/custom-elements.json +1365 -161
  112. package/data-grid/definition.cjs +862 -27
  113. package/data-grid/definition.js +863 -28
  114. package/data-grid/index.cjs +25 -25
  115. package/data-grid/index.js +175 -168
  116. package/date-picker/index.cjs +1 -1
  117. package/date-picker/index.js +2 -2
  118. package/date-range-picker/index.cjs +1 -1
  119. package/date-range-picker/index.js +2 -2
  120. package/date-time-picker/index.cjs +1 -1
  121. package/date-time-picker/index.js +2 -2
  122. package/dial-pad/definition.cjs +4 -0
  123. package/dial-pad/definition.js +4 -0
  124. package/dial-pad/index.cjs +3 -3
  125. package/dial-pad/index.js +42 -39
  126. package/dialog/definition.cjs +4 -1
  127. package/dialog/definition.js +4 -1
  128. package/dialog/index.cjs +21 -18
  129. package/dialog/index.js +43 -40
  130. package/empty-state/definition.cjs +7 -2
  131. package/empty-state/definition.js +7 -2
  132. package/empty-state/index.cjs +10 -5
  133. package/empty-state/index.js +18 -13
  134. package/fab/index.cjs +2 -2
  135. package/fab/index.js +4 -4
  136. package/file-picker/definition.cjs +2 -2
  137. package/file-picker/definition.js +3 -3
  138. package/file-picker/index.cjs +1 -1
  139. package/file-picker/index.js +4 -4
  140. package/icon/definition.cjs +10 -6
  141. package/icon/definition.js +10 -6
  142. package/index.cjs +4 -0
  143. package/index.js +1 -0
  144. package/lib/accordion-item/accordion-item.d.ts +2 -2
  145. package/lib/action-group/action-group.d.ts +2 -2
  146. package/lib/alert/alert.d.ts +4 -4
  147. package/lib/audio-player/audio-player.d.ts +2 -2
  148. package/lib/avatar/avatar.d.ts +2 -2
  149. package/lib/badge/badge.d.ts +2 -2
  150. package/lib/banner/banner.d.ts +6 -6
  151. package/lib/breadcrumb/breadcrumb.d.ts +2 -2
  152. package/lib/breadcrumb-item/breadcrumb-item.d.ts +2 -2
  153. package/lib/button/button.d.ts +6 -6
  154. package/lib/button/button.template.d.ts +2 -1
  155. package/lib/calendar/calendar.d.ts +1 -1
  156. package/lib/calendar-event/calendar-event.d.ts +2 -2
  157. package/lib/card/card.d.ts +2 -2
  158. package/lib/checkbox/checkbox.d.ts +12 -12
  159. package/lib/color-picker/color-picker.d.ts +2420 -0
  160. package/lib/color-picker/color-picker.template.d.ts +3 -0
  161. package/lib/color-picker/definition.d.ts +4 -0
  162. package/lib/color-picker/locale.d.ts +9 -0
  163. package/lib/combobox/combobox.d.ts +14 -14
  164. package/lib/components.d.ts +1 -0
  165. package/lib/data-grid/data-grid-cell.d.ts +4 -4
  166. package/lib/data-grid/data-grid-row.d.ts +3 -4
  167. package/lib/data-grid/data-grid.d.ts +1 -2
  168. package/lib/date-picker/date-picker.d.ts +54 -54
  169. package/lib/date-range-picker/date-range-picker.d.ts +28 -28
  170. package/lib/date-time-picker/date-time-picker.d.ts +56 -56
  171. package/lib/dial-pad/dial-pad.d.ts +3 -2
  172. package/lib/dialog/dialog.d.ts +4 -4
  173. package/lib/divider/divider.d.ts +2 -2
  174. package/lib/fab/fab.d.ts +2 -2
  175. package/lib/file-picker/file-picker.d.ts +14 -14
  176. package/lib/header/header.d.ts +2 -2
  177. package/lib/menu/menu.d.ts +4 -4
  178. package/lib/menu-item/menu-item.d.ts +4 -4
  179. package/lib/nav/nav.d.ts +2 -2
  180. package/lib/nav-disclosure/nav-disclosure.d.ts +4 -4
  181. package/lib/nav-item/nav-item.d.ts +4 -4
  182. package/lib/note/note.d.ts +2 -2
  183. package/lib/number-field/number-field.d.ts +18 -18
  184. package/lib/option/option.d.ts +4 -4
  185. package/lib/pagination/pagination.d.ts +2 -2
  186. package/lib/progress/progress.d.ts +2 -2
  187. package/lib/progress-ring/progress-ring.d.ts +2 -2
  188. package/lib/radio/radio.d.ts +6 -6
  189. package/lib/radio-group/radio-group.d.ts +2 -2
  190. package/lib/range-slider/range-slider.d.ts +6 -6
  191. package/lib/rich-text-editor/menubar/menubar.d.ts +2 -2
  192. package/lib/rich-text-editor/rich-text-editor.d.ts +2 -2
  193. package/lib/searchable-select/option-tag.d.ts +2 -2
  194. package/lib/searchable-select/searchable-select.d.ts +18 -18
  195. package/lib/select/select.d.ts +16 -16
  196. package/lib/selectable-box/selectable-box.d.ts +2 -2
  197. package/lib/simple-color-picker/locale.d.ts +0 -1
  198. package/lib/simple-color-picker/simple-color-picker.d.ts +47 -821
  199. package/lib/slider/slider.d.ts +6 -6
  200. package/lib/split-button/split-button.d.ts +6 -6
  201. package/lib/switch/switch.d.ts +4 -4
  202. package/lib/tab/tab.d.ts +6 -6
  203. package/lib/tab-panel/tab-panel.d.ts +2 -2
  204. package/lib/tag/tag.d.ts +6 -6
  205. package/lib/tag-group/tag-group.d.ts +2 -2
  206. package/lib/tag-name-map.d.ts +2 -1
  207. package/lib/text-area/text-area.d.ts +16 -16
  208. package/lib/text-field/text-field.d.ts +18 -18
  209. package/lib/time-picker/time-picker.d.ts +28 -28
  210. package/lib/toggletip/toggletip.d.ts +4 -4
  211. package/lib/tooltip/tooltip.d.ts +2 -2
  212. package/lib/tree-item/tree-item.d.ts +4 -4
  213. package/lib/tree-view/tree-view.d.ts +2 -2
  214. package/lib/video-player/video-player.d.ts +2 -2
  215. package/locales/de-DE.cjs +13 -2
  216. package/locales/de-DE.js +13 -2
  217. package/locales/en-GB.cjs +13 -2
  218. package/locales/en-GB.js +13 -2
  219. package/locales/en-US.cjs +13 -2
  220. package/locales/en-US.js +13 -2
  221. package/locales/ja-JP.cjs +13 -2
  222. package/locales/ja-JP.js +13 -2
  223. package/locales/zh-CN.cjs +13 -2
  224. package/locales/zh-CN.js +13 -2
  225. package/menu/definition.cjs +2 -2
  226. package/menu/definition.js +3 -3
  227. package/note/index.cjs +2 -2
  228. package/note/index.js +4 -4
  229. package/number-field/definition.cjs +1 -1
  230. package/number-field/definition.js +2 -2
  231. package/number-field/index.cjs +5 -5
  232. package/number-field/index.js +21 -21
  233. package/option/index.cjs +1 -1
  234. package/option/index.js +1 -1
  235. package/package.json +5 -5
  236. package/pagination/definition.cjs +2 -1
  237. package/pagination/definition.js +2 -1
  238. package/pagination/index.cjs +12 -12
  239. package/pagination/index.js +59 -59
  240. package/progress/index.cjs +1 -1
  241. package/progress/index.js +1 -1
  242. package/radio/definition.cjs +9 -9
  243. package/radio/definition.js +10 -10
  244. package/radio-group/definition.cjs +2 -1
  245. package/radio-group/definition.js +2 -1
  246. package/radio-group/index.cjs +5 -5
  247. package/radio-group/index.js +80 -77
  248. package/range-slider/index.cjs +1 -1
  249. package/range-slider/index.js +1 -1
  250. package/rich-text-editor/definition.cjs +1 -1
  251. package/rich-text-editor/definition.js +2 -2
  252. package/rich-text-editor/index.cjs +2 -2
  253. package/rich-text-editor/index.js +3 -3
  254. package/searchable-select/definition.cjs +3 -3
  255. package/searchable-select/definition.js +4 -4
  256. package/searchable-select/index.cjs +4 -4
  257. package/searchable-select/index.js +8 -8
  258. package/select/definition.cjs +1 -1
  259. package/select/definition.js +2 -2
  260. package/selectable-box/definition.cjs +1 -1
  261. package/selectable-box/definition.js +1 -1
  262. package/selectable-box/index.cjs +3 -3
  263. package/selectable-box/index.js +20 -20
  264. package/shared/aria/aria-change-subscription.d.ts +0 -1
  265. package/shared/aria/aria-mixin.d.ts +2 -2
  266. package/shared/aria/delegate-aria-behavior.d.ts +5 -10
  267. package/shared/aria/delegates-aria.d.ts +3 -3
  268. package/shared/aria/host-semantics-behavior.d.ts +5 -8
  269. package/shared/aria/host-semantics.d.ts +3 -3
  270. package/shared/color-picker/base-color-picker.d.ts +436 -0
  271. package/shared/color-picker/index.d.ts +1 -0
  272. package/shared/color-picker/locale.d.ts +3 -0
  273. package/shared/color-picker/utils.d.ts +1 -0
  274. package/shared/deprecation/replaced-props.d.ts +317 -2
  275. package/shared/design-system/defineVividComponent.d.ts +2 -2
  276. package/shared/feedback/feedback-message.d.ts +2 -2
  277. package/shared/feedback/mixins.d.ts +4 -4
  278. package/shared/foundation/button/button.d.ts +4 -4
  279. package/shared/foundation/form-associated/form-associated.d.ts +4 -4
  280. package/shared/foundation/vivid-element/vivid-element.d.ts +335 -8
  281. package/shared/localization/Locale.d.ts +4 -0
  282. package/shared/patterns/affix.d.ts +4 -4
  283. package/shared/patterns/anchored.d.ts +4 -4
  284. package/shared/patterns/char-count/char-count.d.ts +2 -2
  285. package/shared/patterns/form-elements/form-element.d.ts +4 -4
  286. package/shared/patterns/form-elements/with-contextual-help.d.ts +6 -6
  287. package/shared/patterns/form-elements/with-error-text.d.ts +6 -6
  288. package/shared/patterns/form-elements/with-success-text.d.ts +2 -2
  289. package/shared/patterns/linkable.d.ts +2 -2
  290. package/shared/patterns/localized.d.ts +2 -2
  291. package/shared/patterns/trapped-focus.d.ts +2 -2
  292. package/shared/picker-field/mixins/calendar-picker.d.ts +14 -14
  293. package/shared/picker-field/mixins/calendar-picker.template.d.ts +14 -14
  294. package/shared/picker-field/mixins/inline-time-picker/inline-time-picker.d.ts +2 -2
  295. package/shared/picker-field/mixins/min-max-calendar-picker.d.ts +28 -28
  296. package/shared/picker-field/mixins/single-date-picker.d.ts +40 -40
  297. package/shared/picker-field/mixins/single-value-picker.d.ts +12 -12
  298. package/shared/picker-field/mixins/time-selection-picker.d.ts +29 -29
  299. package/shared/picker-field/mixins/time-selection-picker.template.d.ts +28 -28
  300. package/shared/picker-field/picker-field.d.ts +14 -14
  301. package/shared/templating/attribute-binding-behaviour.d.ts +3 -4
  302. package/shared/templating/render-in-light-dom.d.ts +13 -12
  303. package/side-drawer/index.cjs +1 -1
  304. package/side-drawer/index.js +1 -1
  305. package/simple-color-picker/definition.cjs +28 -215
  306. package/simple-color-picker/definition.js +29 -216
  307. package/simple-color-picker/index.cjs +9 -21
  308. package/simple-color-picker/index.js +71 -185
  309. package/styles/core/all.css +1 -1
  310. package/styles/core/theme.css +1 -1
  311. package/styles/core/typography.css +1 -1
  312. package/styles/tokens/theme-dark.css +4 -4
  313. package/styles/tokens/theme-light.css +4 -4
  314. package/styles/tokens/vivid-2-compat.css +1 -1
  315. package/switch/index.cjs +2 -2
  316. package/switch/index.js +4 -4
  317. package/tabs/definition.cjs +1 -1
  318. package/tabs/definition.js +2 -2
  319. package/tabs/index.cjs +2 -2
  320. package/tabs/index.js +16 -16
  321. package/tag/index.cjs +1 -1
  322. package/tag/index.js +1 -1
  323. package/text-area/index.cjs +3 -3
  324. package/text-area/index.js +8 -8
  325. package/text-field/definition.cjs +2 -2
  326. package/text-field/definition.js +3 -3
  327. package/text-field/index.cjs +1 -1
  328. package/text-field/index.js +1 -1
  329. package/time-picker/index.cjs +1 -1
  330. package/time-picker/index.js +2 -2
  331. package/toggletip/definition.cjs +1 -1
  332. package/toggletip/definition.js +2 -2
  333. package/tree-view/definition.cjs +1 -1
  334. package/tree-view/definition.js +2 -2
  335. package/tree-view/index.cjs +2 -2
  336. package/tree-view/index.js +6 -6
  337. package/unbundled/_commonjsHelpers.cjs +36 -0
  338. package/unbundled/_commonjsHelpers.js +32 -0
  339. package/unbundled/affix.cjs +1 -1
  340. package/unbundled/affix.js +1 -1
  341. package/unbundled/attribute-binding-behaviour.cjs +11 -10
  342. package/unbundled/attribute-binding-behaviour.js +11 -10
  343. package/unbundled/base-color-picker.cjs +278 -0
  344. package/unbundled/base-color-picker.js +275 -0
  345. package/unbundled/button.cjs +1 -1
  346. package/unbundled/button.js +2 -2
  347. package/unbundled/calendar-picker.template.cjs +3 -3
  348. package/unbundled/calendar-picker.template.js +4 -4
  349. package/unbundled/definition2.cjs +1 -1
  350. package/unbundled/definition2.js +2 -2
  351. package/unbundled/definition3.cjs +2 -1
  352. package/unbundled/definition3.js +2 -1
  353. package/unbundled/delegates-aria.cjs +67 -33
  354. package/unbundled/delegates-aria.js +69 -35
  355. package/unbundled/form-associated.cjs +2 -2
  356. package/unbundled/form-associated.js +3 -3
  357. package/unbundled/host-semantics.cjs +47 -22
  358. package/unbundled/host-semantics.js +48 -23
  359. package/unbundled/mixins.cjs +34 -27
  360. package/unbundled/mixins.js +35 -28
  361. package/unbundled/picker-field.template.cjs +2 -2
  362. package/unbundled/picker-field.template.js +3 -3
  363. package/unbundled/time-selection-picker.template.cjs +4 -4
  364. package/unbundled/time-selection-picker.template.js +5 -5
  365. package/unbundled/vivid-element.cjs +22 -15
  366. package/unbundled/vivid-element.js +23 -15
  367. package/video-player/definition.cjs +69007 -1
  368. package/video-player/definition.js +69007 -1
  369. package/video-player/index.cjs +35 -35
  370. package/video-player/index.js +1358 -1384
  371. package/visually-hidden/index.cjs +1 -1
  372. package/visually-hidden/index.js +1 -1
  373. package/vivid.api.json +317 -69
@@ -1,5 +1,5 @@
1
1
  import { o as J } from "./vivid-element.js";
2
- const s = "Play", l = "Pause", c = "Replay", d = "Duration", u = "LIVE", p = "Loaded", b = "Progress", g = "Fullscreen", m = "Mute", h = "Unmute", y = "Subtitles", f = "Captions", L = "Chapters", S = "Descriptions", P = "Close", T = "Text", w = "White", v = "Black", k = "Red", C = "Green", M = "Blue", D = "Yellow", B = "Magenta", E = "Cyan", x = "Background", F = "Window", $ = "Transparent", A = "Opaque", R = "None", O = "Raised", I = "Depressed", Y = "Uniform", N = "Casual", W = "Script", U = "Reset", z = "Done", V = "Color", G = "Opacity", H = {
2
+ const s = "Play", l = "Pause", c = "Replay", d = "Duration", u = "LIVE", p = "Loaded", b = "Progress", g = "Fullscreen", m = "Mute", h = "Unmute", y = "Subtitles", L = "Captions", f = "Chapters", S = "Descriptions", P = "Close", T = "Text", k = "White", w = "Black", C = "Red", v = "Green", M = "Blue", D = "Yellow", B = "Magenta", E = "Cyan", x = "Background", F = "Window", $ = "Transparent", A = "Opaque", O = "None", R = "Raised", I = "Depressed", Y = "Uniform", N = "Casual", W = "Script", U = "Reset", z = "Done", V = "Color", G = "Opacity", H = {
3
3
  "Audio Player": "Audio Player",
4
4
  "Video Player": "Video Player",
5
5
  Play: s,
@@ -23,9 +23,9 @@ const s = "Play", l = "Pause", c = "Replay", d = "Duration", u = "LIVE", p = "Lo
23
23
  "Playback Rate": "Playback Rate",
24
24
  Subtitles: y,
25
25
  "subtitles off": "subtitles off",
26
- Captions: f,
26
+ Captions: L,
27
27
  "captions off": "captions off",
28
- Chapters: L,
28
+ Chapters: f,
29
29
  Descriptions: S,
30
30
  "descriptions off": "descriptions off",
31
31
  "Audio Track": "Audio Track",
@@ -50,10 +50,10 @@ const s = "Play", l = "Pause", c = "Replay", d = "Duration", u = "LIVE", p = "Lo
50
50
  "subtitles settings": "subtitles settings",
51
51
  "descriptions settings": "descriptions settings",
52
52
  Text: T,
53
- White: w,
54
- Black: v,
55
- Red: k,
56
- Green: C,
53
+ White: k,
54
+ Black: w,
55
+ Red: C,
56
+ Green: v,
57
57
  Blue: M,
58
58
  Yellow: D,
59
59
  Magenta: B,
@@ -65,8 +65,8 @@ const s = "Play", l = "Pause", c = "Replay", d = "Duration", u = "LIVE", p = "Lo
65
65
  Opaque: A,
66
66
  "Font Size": "Font Size",
67
67
  "Text Edge Style": "Text Edge Style",
68
- None: R,
69
- Raised: O,
68
+ None: O,
69
+ Raised: R,
70
70
  Depressed: I,
71
71
  Uniform: Y,
72
72
  "Drop shadow": "Drop shadow",
@@ -98,11 +98,11 @@ const s = "Play", l = "Pause", c = "Replay", d = "Duration", u = "LIVE", p = "Lo
98
98
  }, j = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
99
99
  __proto__: null,
100
100
  Background: x,
101
- Black: v,
101
+ Black: w,
102
102
  Blue: M,
103
- Captions: f,
103
+ Captions: L,
104
104
  Casual: N,
105
- Chapters: L,
105
+ Chapters: f,
106
106
  Close: P,
107
107
  Color: V,
108
108
  Cyan: E,
@@ -111,19 +111,19 @@ const s = "Play", l = "Pause", c = "Replay", d = "Duration", u = "LIVE", p = "Lo
111
111
  Done: z,
112
112
  Duration: d,
113
113
  Fullscreen: g,
114
- Green: C,
114
+ Green: v,
115
115
  LIVE: u,
116
116
  Loaded: p,
117
117
  Magenta: B,
118
118
  Mute: m,
119
- None: R,
119
+ None: O,
120
120
  Opacity: G,
121
121
  Opaque: A,
122
122
  Pause: l,
123
123
  Play: s,
124
124
  Progress: b,
125
- Raised: O,
126
- Red: k,
125
+ Raised: R,
126
+ Red: C,
127
127
  Replay: c,
128
128
  Reset: U,
129
129
  Script: W,
@@ -132,7 +132,7 @@ const s = "Play", l = "Pause", c = "Replay", d = "Duration", u = "LIVE", p = "Lo
132
132
  Transparent: $,
133
133
  Uniform: Y,
134
134
  Unmute: h,
135
- White: w,
135
+ White: k,
136
136
  Window: F,
137
137
  Yellow: D,
138
138
  default: H
@@ -351,11 +351,11 @@ const s = "Play", l = "Pause", c = "Replay", d = "Duration", u = "LIVE", p = "Lo
351
351
  ),
352
352
  optionFocusedMessage: (
353
353
  /* istanbul ignore next */
354
- (e, t, a, n) => `Option ${e} focused, ${n ? "selected, " : ""}${t} of ${a}.`
354
+ (e, o, a, r) => `Option ${e} focused, ${r ? "selected, " : ""}${o} of ${a}.`
355
355
  ),
356
356
  maxSelectedMessage: (
357
357
  /* istanbul ignore next */
358
- (e, t) => `${e} of ${t} selected.`
358
+ (e, o) => `${e} of ${o} selected.`
359
359
  )
360
360
  },
361
361
  richTextEditor: {
@@ -420,21 +420,32 @@ const s = "Play", l = "Pause", c = "Replay", d = "Duration", u = "LIVE", p = "Lo
420
420
  (e) => e ? `Show more information about ${e}` : "Show more information"
421
421
  )
422
422
  },
423
- simpleColorPicker: {
424
- colorPaletteLabel: "Color palette",
423
+ baseColorPicker: {
425
424
  colorSwatchLabel: (
426
425
  /* istanbul ignore next */
427
- (e, t, a) => {
428
- let n = t ? `Select ${t}, hex: ${e}` : `Select ${e}`;
429
- return a && (n += ", selected."), n;
426
+ (e, o, a) => {
427
+ let r = o ? `Select ${o}, hex: ${e}` : `Select ${e}`;
428
+ return a && (r += ", selected."), r;
430
429
  }
431
430
  )
431
+ },
432
+ simpleColorPicker: {
433
+ colorPaletteLabel: "Color palette"
434
+ },
435
+ colorPicker: {
436
+ popupLabel: "Color Picker",
437
+ swatchesLabel: "Saved colors:",
438
+ pickerButtonLabel: "Open Color Picker",
439
+ saveButtonLabel: "Save current color",
440
+ closeButtonLabel: "Close Color Picker",
441
+ copyButtonLabel: "Copy Color to Clipboard",
442
+ copyErrorText: "Copy failed. Clipboard access was blocked. Try again."
432
443
  }
433
444
  };
434
- var K = Object.defineProperty, Z = (e, t, a, n) => {
435
- for (var o = void 0, i = e.length - 1, r; i >= 0; i--)
436
- (r = e[i]) && (o = r(t, a, o) || o);
437
- return o && K(t, a, o), o;
445
+ var K = Object.defineProperty, Z = (e, o, a, r) => {
446
+ for (var t = void 0, i = e.length - 1, n; i >= 0; i--)
447
+ (n = e[i]) && (t = n(o, a, t) || t);
448
+ return t && K(o, a, t), t;
438
449
  };
439
450
  class _ {
440
451
  constructor() {
@@ -445,7 +456,7 @@ Z([
445
456
  J
446
457
  ], _.prototype, "locale");
447
458
  const Q = new _(), ee = (e) => {
448
- class t extends e {
459
+ class o extends e {
449
460
  /**
450
461
  * @internal
451
462
  */
@@ -453,7 +464,7 @@ const Q = new _(), ee = (e) => {
453
464
  return Q.locale;
454
465
  }
455
466
  }
456
- return t;
467
+ return o;
457
468
  };
458
469
  export {
459
470
  ee as L
@@ -1,33 +1,33 @@
1
- "use strict";const a=require("./vivid-element.cjs"),y=require("./definition2.cjs"),T=require("./definition12.cjs"),_=require("./class-names.cjs"),m=require("./when.cjs"),$=require("./localized.cjs"),x=require("./slotted.cjs"),F=":host{display:contents}.message{display:flex;contain:inline-size;font:var(--vvd-typography-base-condensed);gap:4px;grid-column:1/-1}.message.none-message{display:none}.message.helper-message{color:var(--_low-ink-color)}.message.error-message,.message.success-message{color:var(--vvd-color-canvas-text)}slot{display:inline}.icon{font-size:16px}.error-message .icon{color:var(--vvd-color-alert-500)}.success-message .icon{color:var(--vvd-color-success-500)}.announcement{display:contents}";var I=Object.defineProperty,D=(e,t,s,o)=>{for(var n=void 0,i=e.length-1,c;i>=0;i--)(c=e[i])&&(n=c(t,s,n)||n);return n&&I(t,s,n),n};class d extends $.Localized(a.VividElement){constructor(){super(...arguments),this.type="none"}}D([a.attr],d.prototype,"type");function g(e,t,s){const o=e.tagFor(y.Icon);return a.html`<${o} class="icon" name="${t}" label="${n=>n.locale.feedbackMessage[s]}"></${o}>`}function w(e){const t={none:"",helper:"",error:g(e,"info-line","errorIconText"),success:g(e,"check-circle-line","successIconText")};return a.html`${s=>t[s.type]}`}const b=e=>e==="error",C=e=>{const t=a.html`<div
2
- class="${s=>_.classNames("message",`${s.type}-message`)}"
1
+ "use strict";const _=require("./normalize.cjs"),a=require("./vivid-element.cjs"),y=require("./definition2.cjs"),$=require("./definition13.cjs"),m=require("./when.cjs"),F=require("./class-names.cjs"),I=require("./localized.cjs"),f=require("./slotted.cjs"),D=":host{display:contents}.message{display:flex;contain:inline-size;font:var(--vvd-typography-base-condensed);gap:4px;grid-column:1/-1}.message.none-message{display:none}.message.helper-message{color:var(--_low-ink-color)}.message.error-message,.message.success-message{color:var(--vvd-color-canvas-text)}slot{display:inline}.icon{font-size:16px}.error-message .icon{color:var(--vvd-color-alert-500)}.success-message .icon{color:var(--vvd-color-success-500)}.announcement{display:contents}";var w=Object.defineProperty,C=(t,e,i,s)=>{for(var n=void 0,r=t.length-1,c;r>=0;r--)(c=t[r])&&(n=c(e,i,n)||n);return n&&w(e,i,n),n};class l extends I.Localized(a.VividElement){constructor(){super(...arguments),this.type="none"}}C([a.attr],l.prototype,"type");function g(t,e,i){const s=t.tagFor(y.Icon);return a.html`<${s} class="icon" name="${e}" label="${n=>n.locale.feedbackMessage[i]}"></${s}>`}function B(t){const e={none:"",helper:"",error:g(t,"info-line","errorIconText"),success:g(t,"check-circle-line","successIconText")};return a.html`${i=>e[i.type]}`}const b=t=>t==="error",M=t=>{const e=a.html`<div
2
+ class="${i=>F.classNames("message",`${i.type}-message`)}"
3
3
  >
4
- ${w(e)}<slot></slot>
5
- </div>`;return a.html`${m.when(s=>!b(s.type),t)}
4
+ ${B(t)}<slot></slot>
5
+ </div>`;return a.html`${m.when(i=>!b(i.type),e)}
6
6
  <span class="announcement" role="status" aria-live="polite">
7
- ${m.when(s=>b(s.type),t)}
8
- </span>`},S=a.defineVividComponent("feedback-message",d,C,[y.iconDefinition,T.visuallyHiddenDefinition],{styles:F});class M{constructor(t,s){this.source=null,this.templateBindingObserver=a.Observable.binding(t,this,s)}bind(t,s){this.source=t,this.context=s,this.insertionPoint||(this.insertionPoint=document.createComment(""),t.appendChild(this.insertionPoint)),this.handleChange()}unbind(){this.source=null,this.view.unbind(),this.templateBindingObserver.disconnect()}handleChange(){this.instantiateTemplate(this.templateBindingObserver.observe(this.source,this.context))}instantiateTemplate(t){this.view&&this.view.dispose(),this.view=t.create(),this.view.bind(this.source,this.context),this.view.insertBefore(this.insertionPoint)}}class B extends a.HTMLDirective{constructor(t){super(),this.templateBinding=t,this.createPlaceholder=a.DOM.createBlockPlaceholder,this.isTemplateBindingVolatile=a.Observable.isVolatileBinding(t)}createBehavior(){return new M(this.templateBinding,this.isTemplateBindingVolatile)}}function f(e){const t=typeof e=="function"?e:()=>e;return new B(t)}const r=[];for(let e=0;e<256;++e)r.push((e+256).toString(16).slice(1));function H(e,t=0){return(r[e[t+0]]+r[e[t+1]]+r[e[t+2]]+r[e[t+3]]+"-"+r[e[t+4]]+r[e[t+5]]+"-"+r[e[t+6]]+r[e[t+7]]+"-"+r[e[t+8]]+r[e[t+9]]+"-"+r[e[t+10]]+r[e[t+11]]+r[e[t+12]]+r[e[t+13]]+r[e[t+14]]+r[e[t+15]]).toLowerCase()}let h;const O=new Uint8Array(16);function U(){if(!h){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");h=crypto.getRandomValues.bind(crypto)}return h(O)}const L=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),v={randomUUID:L};function P(e,t,s){if(v.randomUUID&&!e)return v.randomUUID();e=e||{};const o=e.random??e.rng?.()??U();if(o.length<16)throw new Error("Random bytes length must be >= 16");return o[6]=o[6]&15|64,o[8]=o[8]&63|128,H(o)}const p=()=>P();var V=Object.defineProperty,u=(e,t,s,o)=>{for(var n=void 0,i=e.length-1,c;i>=0;i--)(c=e[i])&&(n=c(t,s,n)||n);return n&&V(t,s,n),n};const k=e=>{class t extends e{get _feedbackDescribedBy(){return"feedback slotted-helper-text-feedback"}_internalFeedback(){const o=this._helperTextSlottedContent?.length?"":this.helperText,n=this.errorValidationMessage,i=this.successText;return i?{type:"success",message:i}:n?{type:"error",message:n}:o?{type:"helper",message:o}:{type:"none",message:""}}_slottedHelperTextFeedbackType(){return this._internalFeedback().type==="none"&&this._helperTextSlottedContent?.length?"helper":"none"}_getFeedbackTemplate(o){const n=o.tagFor(d);return a.html`
9
- <${n} id="feedback" :type="${i=>i._internalFeedback().type}">
10
- ${i=>i._internalFeedback().message}
7
+ ${m.when(i=>b(i.type),e)}
8
+ </span>`},S=a.defineVividComponent("feedback-message",l,M,[y.iconDefinition,$.visuallyHiddenDefinition],{styles:D});class H{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,i){if(i===this.templateBindingObserver){const s=this.templateBindingObserver.bind(this.controller);this.instantiateTemplate(s)}}instantiateTemplate(e){this.view&&this.view.dispose(),this.view=e.create(),this.view.bind(this.source,this.context),this.view.insertBefore(this.insertionPoint)}}class x{constructor(e){this.targetNodeId="",this.templateBinding=e,this.dataBinding=e}createHTML(e){return a.Markup.comment(e(this))}createBehavior(){return new H(this)}}a.HTMLDirective.define(x);function k(t){const e=_.normalizeBinding(t);return new x(e)}const o=[];for(let t=0;t<256;++t)o.push((t+256).toString(16).slice(1));function O(t,e=0){return(o[t[e+0]]+o[t[e+1]]+o[t[e+2]]+o[t[e+3]]+"-"+o[t[e+4]]+o[t[e+5]]+"-"+o[t[e+6]]+o[t[e+7]]+"-"+o[t[e+8]]+o[t[e+9]]+"-"+o[t[e+10]]+o[t[e+11]]+o[t[e+12]]+o[t[e+13]]+o[t[e+14]]+o[t[e+15]]).toLowerCase()}let h;const L=new Uint8Array(16);function U(){if(!h){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");h=crypto.getRandomValues.bind(crypto)}return h(L)}const R=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),v={randomUUID:R};function q(t,e,i){if(v.randomUUID&&!t)return v.randomUUID();t=t||{};const s=t.random??t.rng?.()??U();if(s.length<16)throw new Error("Random bytes length must be >= 16");return s[6]=s[6]&15|64,s[8]=s[8]&63|128,O(s)}const p=()=>q();var P=Object.defineProperty,u=(t,e,i,s)=>{for(var n=void 0,r=t.length-1,c;r>=0;r--)(c=t[r])&&(n=c(e,i,n)||n);return n&&P(e,i,n),n};const T=t=>{class e extends t{get _feedbackDescribedBy(){return"feedback slotted-helper-text-feedback"}_internalFeedback(){const s=this._helperTextSlottedContent?.length?"":this.helperText,n=this.errorValidationMessage,r=this.successText;return r?{type:"success",message:r}:n?{type:"error",message:n}:s?{type:"helper",message:s}:{type:"none",message:""}}_slottedHelperTextFeedbackType(){return this._internalFeedback().type==="none"&&this._helperTextSlottedContent?.length?"helper":"none"}_getFeedbackTemplate(s){const n=s.tagFor(l);return a.html`
9
+ <${n} id="feedback" :type="${r=>r._internalFeedback().type}">
10
+ ${r=>r._internalFeedback().message}
11
11
  </${n}>
12
12
  <${n}
13
13
  id="slotted-helper-text-feedback"
14
- :type="${i=>i._slottedHelperTextFeedbackType()}"
14
+ :type="${r=>r._slottedHelperTextFeedbackType()}"
15
15
  >
16
- <slot name="helper-text" ${x.slotted("_helperTextSlottedContent")}></slot>
16
+ <slot name="helper-text" ${f.slotted("_helperTextSlottedContent")}></slot>
17
17
  </${n}>
18
- `}}return u([a.attr({attribute:"helper-text"})],t.prototype,"helperText"),u([a.observable],t.prototype,"_helperTextSlottedContent"),t},R=e=>{const t=()=>`vvd-feedback-${p()}`,s=()=>`vvd-slotted-feedback-${p()}`;class o extends k(e){constructor(){super(...arguments),this._slottedHelperTextIds=[],this._feedbackId=t()}_helperTextSlottedContentChanged(i,c){for(const l of c)l.id||(l.id=s());this._slottedHelperTextIds=c.map(l=>l.id)}get _feedbackDescribedBy(){return[this._feedbackId,...this._slottedHelperTextIds].join(" ")}_getFeedbackTemplate(i){const c=i.tagFor(d);return a.html`
18
+ `}}return u([a.attr({attribute:"helper-text"})],e.prototype,"helperText"),u([a.observable],e.prototype,"_helperTextSlottedContent"),e},V=t=>{const e=()=>`vvd-feedback-${p()}`,i=()=>`vvd-slotted-feedback-${p()}`;class s extends T(t){constructor(){super(...arguments),this._slottedHelperTextIds=[],this._feedbackId=e()}_helperTextSlottedContentChanged(r,c){for(const d of c)d.id||(d.id=i());this._slottedHelperTextIds=c.map(d=>d.id)}get _feedbackDescribedBy(){return[this._feedbackId,...this._slottedHelperTextIds].join(" ")}_getFeedbackTemplate(r){const c=r.tagFor(l);return a.html`
19
19
  <slot name="_feedback"></slot>
20
- ${f(a.html`<${c}
20
+ ${k(a.html`<${c}
21
21
  slot="_feedback"
22
- id="${l=>l._feedbackId}"
23
- :type="${l=>l._internalFeedback().type}"
22
+ id="${d=>d._feedbackId}"
23
+ :type="${d=>d._internalFeedback().type}"
24
24
  >
25
- ${l=>l._internalFeedback().message}
25
+ ${d=>d._internalFeedback().message}
26
26
  </${c}>`)}
27
- <${c} :type="${l=>l._slottedHelperTextFeedbackType()}">
27
+ <${c} :type="${d=>d._slottedHelperTextFeedbackType()}">
28
28
  <slot
29
29
  name="helper-text"
30
- ${x.slotted("_helperTextSlottedContent")}
30
+ ${f.slotted("_helperTextSlottedContent")}
31
31
  ></slot>
32
32
  </${c}>
33
- `}}return u([a.observable],o.prototype,"_slottedHelperTextIds"),o};exports.WithFeedback=k;exports.WithLightDOMFeedback=R;exports.feedbackMessageDefinition=S;exports.generateRandomId=p;exports.renderInLightDOM=f;
33
+ `}}return u([a.observable],s.prototype,"_slottedHelperTextIds"),s};exports.WithFeedback=T;exports.WithLightDOMFeedback=V;exports.feedbackMessageDefinition=S;exports.generateRandomId=p;exports.renderInLightDOM=k;
package/bundled/mixins.js CHANGED
@@ -1,102 +1,108 @@
1
- import { d as k, h as d, V as _, a as y, H as $, D as F, O as f, o as x } from "./vivid-element.js";
2
- import { i as I, I as D } from "./definition2.js";
3
- import { v as w } from "./definition12.js";
4
- import { c as C } from "./class-names.js";
5
- import { w as u } from "./when.js";
6
- import { L as S } from "./localized.js";
7
- import { s as T } from "./slotted.js";
8
- const H = ":host{display:contents}.message{display:flex;contain:inline-size;font:var(--vvd-typography-base-condensed);gap:4px;grid-column:1/-1}.message.none-message{display:none}.message.helper-message{color:var(--_low-ink-color)}.message.error-message,.message.success-message{color:var(--vvd-color-canvas-text)}slot{display:inline}.icon{font-size:16px}.error-message .icon{color:var(--vvd-color-alert-500)}.success-message .icon{color:var(--vvd-color-success-500)}.announcement{display:contents}";
9
- var B = Object.defineProperty, U = (e, t, s, o) => {
10
- for (var n = void 0, r = e.length - 1, a; r >= 0; r--)
11
- (a = e[r]) && (n = a(t, s, n) || n);
12
- return n && B(t, s, n), n;
1
+ import { n as k } from "./normalize.js";
2
+ import { d as _, h as d, V as $, a as y, M as F, H as I, o as f } from "./vivid-element.js";
3
+ import { i as w, I as D } from "./definition2.js";
4
+ import { v as C } from "./definition13.js";
5
+ import { w as m } from "./when.js";
6
+ import { c as B } from "./class-names.js";
7
+ import { L as H } from "./localized.js";
8
+ import { s as x } from "./slotted.js";
9
+ const S = ":host{display:contents}.message{display:flex;contain:inline-size;font:var(--vvd-typography-base-condensed);gap:4px;grid-column:1/-1}.message.none-message{display:none}.message.helper-message{color:var(--_low-ink-color)}.message.error-message,.message.success-message{color:var(--vvd-color-canvas-text)}slot{display:inline}.icon{font-size:16px}.error-message .icon{color:var(--vvd-color-alert-500)}.success-message .icon{color:var(--vvd-color-success-500)}.announcement{display:contents}";
10
+ var M = Object.defineProperty, O = (t, e, o, s) => {
11
+ for (var n = void 0, r = t.length - 1, a; r >= 0; r--)
12
+ (a = t[r]) && (n = a(e, o, n) || n);
13
+ return n && M(e, o, n), n;
13
14
  };
14
- class l extends S(_) {
15
+ class l extends H($) {
15
16
  constructor() {
16
17
  super(...arguments), this.type = "none";
17
18
  }
18
19
  }
19
- U([
20
+ O([
20
21
  y
21
22
  ], l.prototype, "type");
22
- function m(e, t, s) {
23
- const o = e.tagFor(D);
24
- return d`<${o} class="icon" name="${t}" label="${(n) => n.locale.feedbackMessage[s]}"></${o}>`;
23
+ function u(t, e, o) {
24
+ const s = t.tagFor(D);
25
+ return d`<${s} class="icon" name="${e}" label="${(n) => n.locale.feedbackMessage[o]}"></${s}>`;
25
26
  }
26
- function V(e) {
27
- const t = {
27
+ function U(t) {
28
+ const e = {
28
29
  none: "",
29
30
  helper: "",
30
- error: m(e, "info-line", "errorIconText"),
31
- success: m(e, "check-circle-line", "successIconText")
31
+ error: u(t, "info-line", "errorIconText"),
32
+ success: u(t, "check-circle-line", "successIconText")
32
33
  };
33
- return d`${(s) => t[s.type]}`;
34
+ return d`${(o) => e[o.type]}`;
34
35
  }
35
- const g = (e) => e === "error", M = (e) => {
36
- const t = d`<div
37
- class="${(s) => C("message", `${s.type}-message`)}"
36
+ const g = (t) => t === "error", L = (t) => {
37
+ const e = d`<div
38
+ class="${(o) => B("message", `${o.type}-message`)}"
38
39
  >
39
- ${V(e)}<slot></slot>
40
+ ${U(t)}<slot></slot>
40
41
  </div>`;
41
- return d`${u((s) => !g(s.type), t)}
42
+ return d`${m((o) => !g(o.type), e)}
42
43
  <span class="announcement" role="status" aria-live="polite">
43
- ${u((s) => g(s.type), t)}
44
+ ${m((o) => g(o.type), e)}
44
45
  </span>`;
45
- }, Z = k(
46
+ }, ee = _(
46
47
  "feedback-message",
47
48
  l,
48
- M,
49
- [I, w],
49
+ L,
50
+ [w, C],
50
51
  {
51
- styles: H
52
+ styles: S
52
53
  }
53
54
  );
54
55
  class P {
55
- constructor(t, s) {
56
- this.source = null, this.templateBindingObserver = f.binding(
57
- t,
56
+ constructor(e) {
57
+ this.source = null, this.templateBindingObserver = e.templateBinding.createObserver(
58
58
  this,
59
- s
59
+ e
60
60
  );
61
61
  }
62
- bind(t, s) {
63
- this.source = t, this.context = s, this.insertionPoint || (this.insertionPoint = document.createComment(""), t.appendChild(this.insertionPoint)), this.handleChange();
64
- }
65
- unbind() {
66
- this.source = null, this.view.unbind(), this.templateBindingObserver.disconnect();
62
+ bind(e) {
63
+ 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);
67
64
  }
65
+ // unbind(): void {
66
+ // this.source = null;
67
+ // if (this.view) {
68
+ // this.view.unbind();
69
+ // }
70
+ // // The observer will be automatically cleaned up when the behavior is destroyed
71
+ // }
68
72
  /**
69
73
  * Handles change of the template itself.
70
74
  */
71
- handleChange() {
72
- this.instantiateTemplate(
73
- this.templateBindingObserver.observe(this.source, this.context)
74
- );
75
+ handleChange(e, o) {
76
+ if (o === this.templateBindingObserver) {
77
+ const s = this.templateBindingObserver.bind(this.controller);
78
+ this.instantiateTemplate(s);
79
+ }
75
80
  }
76
- instantiateTemplate(t) {
77
- this.view && this.view.dispose(), this.view = t.create(), this.view.bind(this.source, this.context), this.view.insertBefore(this.insertionPoint);
81
+ instantiateTemplate(e) {
82
+ this.view && this.view.dispose(), this.view = e.create(), this.view.bind(this.source, this.context), this.view.insertBefore(this.insertionPoint);
78
83
  }
79
84
  }
80
- class L extends $ {
81
- constructor(t) {
82
- super(), this.templateBinding = t, this.createPlaceholder = F.createBlockPlaceholder, this.isTemplateBindingVolatile = f.isVolatileBinding(t);
85
+ class T {
86
+ constructor(e) {
87
+ this.targetNodeId = "", this.templateBinding = e, this.dataBinding = e;
88
+ }
89
+ createHTML(e) {
90
+ return F.comment(e(this));
83
91
  }
84
92
  createBehavior() {
85
- return new P(
86
- this.templateBinding,
87
- this.isTemplateBindingVolatile
88
- );
93
+ return new P(this);
89
94
  }
90
95
  }
91
- function O(e) {
92
- const t = typeof e == "function" ? e : () => e;
93
- return new L(t);
96
+ I.define(T);
97
+ function R(t) {
98
+ const e = k(t);
99
+ return new T(e);
94
100
  }
95
101
  const i = [];
96
- for (let e = 0; e < 256; ++e)
97
- i.push((e + 256).toString(16).slice(1));
98
- function R(e, t = 0) {
99
- return (i[e[t + 0]] + i[e[t + 1]] + i[e[t + 2]] + i[e[t + 3]] + "-" + i[e[t + 4]] + i[e[t + 5]] + "-" + i[e[t + 6]] + i[e[t + 7]] + "-" + i[e[t + 8]] + i[e[t + 9]] + "-" + i[e[t + 10]] + i[e[t + 11]] + i[e[t + 12]] + i[e[t + 13]] + i[e[t + 14]] + i[e[t + 15]]).toLowerCase();
102
+ for (let t = 0; t < 256; ++t)
103
+ i.push((t + 256).toString(16).slice(1));
104
+ function V(t, e = 0) {
105
+ return (i[t[e + 0]] + i[t[e + 1]] + i[t[e + 2]] + i[t[e + 3]] + "-" + i[t[e + 4]] + i[t[e + 5]] + "-" + i[t[e + 6]] + i[t[e + 7]] + "-" + i[t[e + 8]] + i[t[e + 9]] + "-" + i[t[e + 10]] + i[t[e + 11]] + i[t[e + 12]] + i[t[e + 13]] + i[t[e + 14]] + i[t[e + 15]]).toLowerCase();
100
106
  }
101
107
  let p;
102
108
  const E = new Uint8Array(16);
@@ -109,23 +115,23 @@ function W() {
109
115
  return p(E);
110
116
  }
111
117
  const j = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), b = { randomUUID: j };
112
- function z(e, t, s) {
113
- if (b.randomUUID && !e)
118
+ function z(t, e, o) {
119
+ if (b.randomUUID && !t)
114
120
  return b.randomUUID();
115
- e = e || {};
116
- const o = e.random ?? e.rng?.() ?? W();
117
- if (o.length < 16)
121
+ t = t || {};
122
+ const s = t.random ?? t.rng?.() ?? W();
123
+ if (s.length < 16)
118
124
  throw new Error("Random bytes length must be >= 16");
119
- return o[6] = o[6] & 15 | 64, o[8] = o[8] & 63 | 128, R(o);
125
+ return s[6] = s[6] & 15 | 64, s[8] = s[8] & 63 | 128, V(s);
120
126
  }
121
127
  const v = () => z();
122
- var A = Object.defineProperty, h = (e, t, s, o) => {
123
- for (var n = void 0, r = e.length - 1, a; r >= 0; r--)
124
- (a = e[r]) && (n = a(t, s, n) || n);
125
- return n && A(t, s, n), n;
128
+ var A = Object.defineProperty, h = (t, e, o, s) => {
129
+ for (var n = void 0, r = t.length - 1, a; r >= 0; r--)
130
+ (a = t[r]) && (n = a(e, o, n) || n);
131
+ return n && A(e, o, n), n;
126
132
  };
127
- const N = (e) => {
128
- class t extends e {
133
+ const N = (t) => {
134
+ class e extends t {
129
135
  /**
130
136
  * Ids of the feedback content that the control should use for aria-describedby.
131
137
  *
@@ -138,8 +144,8 @@ const N = (e) => {
138
144
  * @internal
139
145
  */
140
146
  _internalFeedback() {
141
- const o = this._helperTextSlottedContent?.length ? "" : this.helperText, n = this.errorValidationMessage, r = this.successText;
142
- return r ? { type: "success", message: r } : n ? { type: "error", message: n } : o ? { type: "helper", message: o } : { type: "none", message: "" };
147
+ const s = this._helperTextSlottedContent?.length ? "" : this.helperText, n = this.errorValidationMessage, r = this.successText;
148
+ return r ? { type: "success", message: r } : n ? { type: "error", message: n } : s ? { type: "helper", message: s } : { type: "none", message: "" };
143
149
  }
144
150
  /**
145
151
  * @internal
@@ -150,8 +156,8 @@ const N = (e) => {
150
156
  /**
151
157
  * @internal
152
158
  */
153
- _getFeedbackTemplate(o) {
154
- const n = o.tagFor(l);
159
+ _getFeedbackTemplate(s) {
160
+ const n = s.tagFor(l);
155
161
  return d`
156
162
  <${n} id="feedback" :type="${(r) => r._internalFeedback().type}">
157
163
  ${(r) => r._internalFeedback().message}
@@ -160,28 +166,28 @@ const N = (e) => {
160
166
  id="slotted-helper-text-feedback"
161
167
  :type="${(r) => r._slottedHelperTextFeedbackType()}"
162
168
  >
163
- <slot name="helper-text" ${T("_helperTextSlottedContent")}></slot>
169
+ <slot name="helper-text" ${x("_helperTextSlottedContent")}></slot>
164
170
  </${n}>
165
171
  `;
166
172
  }
167
173
  }
168
174
  return h([
169
175
  y({ attribute: "helper-text" })
170
- ], t.prototype, "helperText"), h([
171
- x
172
- ], t.prototype, "_helperTextSlottedContent"), t;
173
- }, ee = (e) => {
174
- const t = () => `vvd-feedback-${v()}`, s = () => `vvd-slotted-feedback-${v()}`;
175
- class o extends N(e) {
176
+ ], e.prototype, "helperText"), h([
177
+ f
178
+ ], e.prototype, "_helperTextSlottedContent"), e;
179
+ }, te = (t) => {
180
+ const e = () => `vvd-feedback-${v()}`, o = () => `vvd-slotted-feedback-${v()}`;
181
+ class s extends N(t) {
176
182
  constructor() {
177
- super(...arguments), this._slottedHelperTextIds = [], this._feedbackId = t();
183
+ super(...arguments), this._slottedHelperTextIds = [], this._feedbackId = e();
178
184
  }
179
185
  /**
180
186
  * @internal
181
187
  */
182
188
  _helperTextSlottedContentChanged(r, a) {
183
189
  for (const c of a)
184
- c.id || (c.id = s());
190
+ c.id || (c.id = o());
185
191
  this._slottedHelperTextIds = a.map((c) => c.id);
186
192
  }
187
193
  /**
@@ -197,7 +203,7 @@ const N = (e) => {
197
203
  const a = r.tagFor(l);
198
204
  return d`
199
205
  <slot name="_feedback"></slot>
200
- ${O(d`<${a}
206
+ ${R(d`<${a}
201
207
  slot="_feedback"
202
208
  id="${(c) => c._feedbackId}"
203
209
  :type="${(c) => c._internalFeedback().type}"
@@ -207,20 +213,20 @@ const N = (e) => {
207
213
  <${a} :type="${(c) => c._slottedHelperTextFeedbackType()}">
208
214
  <slot
209
215
  name="helper-text"
210
- ${T("_helperTextSlottedContent")}
216
+ ${x("_helperTextSlottedContent")}
211
217
  ></slot>
212
218
  </${a}>
213
219
  `;
214
220
  }
215
221
  }
216
222
  return h([
217
- x
218
- ], o.prototype, "_slottedHelperTextIds"), o;
223
+ f
224
+ ], s.prototype, "_slottedHelperTextIds"), s;
219
225
  };
220
226
  export {
221
227
  N as W,
222
- ee as a,
223
- Z as f,
228
+ te as a,
229
+ ee as f,
224
230
  v as g,
225
- O as r
231
+ R as r
226
232
  };
@@ -0,0 +1 @@
1
+ "use strict";const i=require("./vivid-element.cjs");function e(n){return i.isFunction(n)?i.oneWay(n):n instanceof i.Binding?n:i.oneTime(()=>n)}exports.normalizeBinding=e;
@@ -0,0 +1,7 @@
1
+ import { g as i, u as o, f as s, B as r } from "./vivid-element.js";
2
+ function a(n) {
3
+ return s(n) ? i(n) : n instanceof r ? n : o(() => n);
4
+ }
5
+ export {
6
+ a as n
7
+ };
@@ -1,4 +1,4 @@
1
- "use strict";const _=require("./index.cjs"),v=require("./mixins.cjs"),g=require("./form-associated.cjs"),r=require("./vivid-element.cjs"),$=require("./with-contextual-help.cjs"),x=require("./with-error-text.cjs"),m=require("./form-element.cjs"),k=require("./localized.cjs"),F=require("./definition9.cjs"),E=require("./definition13.cjs"),y=require("./definition3.cjs"),p=require("./ref.cjs"),h=require("./slotted.cjs"),f=require("./class-names.cjs"),b=new WeakSet,C=l=>{b.add(l)},O=l=>{class t extends l{_trappedFocus(a,i){if(!b.has(a)&&a.key==="Tab"){const s=i(),o=s[0],e=s[s.length-1];if(a.shiftKey){if(this.shadowRoot.activeElement===o)return e.focus(),!0}else if(this.shadowRoot.activeElement===e)return o.focus(),!0}return!1}}return t},T=":host{display:inline-block}.base{display:inline-block;inline-size:100%}.control{inline-size:100%}.dialog{display:inline-flex;flex-direction:column}.dialog--padded{padding:12px;gap:12px}.dialog .footer{display:flex;align-items:center;justify-content:flex-end;padding:8px;gap:8px}.dialog .footer--with-separator{border-top:1px solid var(--vvd-color-neutral-200)}";var P=Object.defineProperty,u=(l,t,n,a)=>{for(var i=void 0,s=l.length-1,o;s>=0;s--)(o=l[s])&&(i=o(t,n,i)||i);return i&&P(t,n,i),i};class c extends $.WithContextualHelp(v.WithFeedback(x.WithErrorText(m.FormElement(O(k.Localized(g.FormAssociated(r.VividElement))))))){constructor(){super(),this.readOnly=!1,this.#e=()=>{this.$emit("focus",void 0,{bubbles:!1})},this.#t=()=>{this.$emit("blur",void 0,{bubbles:!1})},this.proxy=document.createElement("input"),this.#l={handleChange:()=>{this._updatePresentationValue()}},this._popupOpen=!1,this.#o=t=>{if(!this._popupOpen)return;const n=t.composedPath();[this._dialogEl,this._pickerButtonEl].some(i=>n.includes(i))||this._closePopup(!1)},this._presentationValue="",this.value=""}readOnlyChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.readOnly=this.readOnly,this.validate())}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.#o),this.addEventListener("focusin",this.#e),this.addEventListener("focusout",this.#t),this.#s()}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.#o),this.removeEventListener("focusin",this.#e),this.removeEventListener("focusout",this.#t),this.#n()}#e;#t;validate(){this.proxy&&this.proxy.setCustomValidity(this._getCustomValidationError()??""),super.validate(this._textFieldEl?.querySelector("input")??void 0)}#l;#i;#s(){this.#i=r.Observable.binding(()=>this.locale,this.#l),this.#i.observe(this,r.defaultExecutionContext)}#n(){this.#i.disconnect()}#o;#a(){this.readOnly||(this._popupOpen=!0)}_closePopup(t=!0){this._popupOpen=!1,t&&this._textFieldEl.focus()}_onBaseKeyDown(t){return this._popupOpen&&_.handleEscapeKeyAndStopPropogation(t)?(this._closePopup(),!1):!this._trappedFocus(t,()=>this._focusableElsWithinDialog())}_presentationValueChanged(){this.dirtyValue=!0,this.validate()}_onTextFieldInput(t){const n=t.currentTarget;this._presentationValue=n.value}_onPickerButtonClick(){this._popupOpen?this._closePopup():this.#a()}_onOkClick(){this._closePopup()}_onClearClick(){this.$emit("clear-click")}}u([r.attr({attribute:"readonly",mode:"boolean"})],c.prototype,"readOnly");u([r.observable],c.prototype,"_popupOpen");u([r.observable],c.prototype,"_presentationValue");const q=(l,t,{withSeparator:n,padded:a})=>{const i=l.tagFor(F.Popup),s=l.tagFor(E.TextField),o=l.tagFor(y.Button);return r.html`
1
+ "use strict";const _=require("./index.cjs"),v=require("./mixins.cjs"),g=require("./form-associated.cjs"),r=require("./vivid-element.cjs"),$=require("./with-contextual-help.cjs"),x=require("./with-error-text.cjs"),m=require("./form-element.cjs"),k=require("./localized.cjs"),F=require("./definition9.cjs"),E=require("./definition10.cjs"),y=require("./definition3.cjs"),p=require("./ref.cjs"),h=require("./slotted.cjs"),f=require("./class-names.cjs"),b=new WeakSet,C=l=>{b.add(l)},O=l=>{class t extends l{_trappedFocus(a,i){if(!b.has(a)&&a.key==="Tab"){const s=i(),o=s[0],e=s[s.length-1];if(a.shiftKey){if(this.shadowRoot.activeElement===o)return e.focus(),!0}else if(this.shadowRoot.activeElement===e)return o.focus(),!0}return!1}}return t},T=":host{display:inline-block}.base{display:inline-block;inline-size:100%}.control{inline-size:100%}.dialog{display:inline-flex;flex-direction:column}.dialog--padded{padding:12px;gap:12px}.dialog .footer{display:flex;align-items:center;justify-content:flex-end;padding:8px;gap:8px}.dialog .footer--with-separator{border-top:1px solid var(--vvd-color-neutral-200)}";var P=Object.defineProperty,u=(l,t,n,a)=>{for(var i=void 0,s=l.length-1,o;s>=0;s--)(o=l[s])&&(i=o(t,n,i)||i);return i&&P(t,n,i),i};class c extends $.WithContextualHelp(v.WithFeedback(x.WithErrorText(m.FormElement(O(k.Localized(g.FormAssociated(r.VividElement))))))){constructor(){super(),this.readOnly=!1,this.#e=()=>{this.$emit("focus",void 0,{bubbles:!1})},this.#t=()=>{this.$emit("blur",void 0,{bubbles:!1})},this.proxy=document.createElement("input"),this.#l={handleChange:()=>{this._updatePresentationValue()}},this._popupOpen=!1,this.#o=t=>{if(!this._popupOpen)return;const n=t.composedPath();[this._dialogEl,this._pickerButtonEl].some(i=>n.includes(i))||this._closePopup(!1)},this._presentationValue="",this.value=""}readOnlyChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.readOnly=this.readOnly,this.validate())}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.#o),this.addEventListener("focusin",this.#e),this.addEventListener("focusout",this.#t),this.#s()}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.#o),this.removeEventListener("focusin",this.#e),this.removeEventListener("focusout",this.#t),this.#n()}#e;#t;validate(){this.proxy&&this.proxy.setCustomValidity(this._getCustomValidationError()??""),super.validate(this._textFieldEl?.querySelector("input")??void 0)}#l;#i;#s(){this.#i=r.Observable.binding(()=>this.locale,this.#l),this.#i.observe(this,r.ExecutionContext.default)}#n(){this.#i.dispose()}#o;#a(){this.readOnly||(this._popupOpen=!0)}_closePopup(t=!0){this._popupOpen=!1,t&&this._textFieldEl.focus()}_onBaseKeyDown(t){return this._popupOpen&&_.handleEscapeKeyAndStopPropogation(t)?(this._closePopup(),!1):!this._trappedFocus(t,()=>this._focusableElsWithinDialog())}_presentationValueChanged(){this.dirtyValue=!0,this.validate()}_onTextFieldInput(t){const n=t.currentTarget;this._presentationValue=n.value}_onPickerButtonClick(){this._popupOpen?this._closePopup():this.#a()}_onOkClick(){this._closePopup()}_onClearClick(){this.$emit("clear-click")}}u([r.attr({attribute:"readonly",mode:"boolean"})],c.prototype,"readOnly");u([r.observable],c.prototype,"_popupOpen");u([r.observable],c.prototype,"_presentationValue");const q=(l,t,{withSeparator:n,padded:a})=>{const i=l.tagFor(F.Popup),s=l.tagFor(E.TextField),o=l.tagFor(y.Button);return r.html`
2
2
  <div class='base' @keydown='${(e,{event:d})=>e._onBaseKeyDown(d)}'>
3
3
  <${s} id='text-field'
4
4
  ${p.ref("_textFieldEl")}
@@ -1,13 +1,13 @@
1
1
  import { h as b } from "./index.js";
2
2
  import { W as _ } from "./mixins.js";
3
3
  import { F as g } from "./form-associated.js";
4
- import { V as v, O as $, b as x, a as k, o as f, h as F } from "./vivid-element.js";
4
+ import { V as v, O as $, E as x, a as k, o as f, h as F } from "./vivid-element.js";
5
5
  import { W as y } from "./with-contextual-help.js";
6
6
  import { W as C } from "./with-error-text.js";
7
7
  import { F as E } from "./form-element.js";
8
8
  import { L as O } from "./localized.js";
9
9
  import { P as T } from "./definition9.js";
10
- import { T as P } from "./definition13.js";
10
+ import { T as P } from "./definition10.js";
11
11
  import { B as L } from "./definition3.js";
12
12
  import { r as p } from "./ref.js";
13
13
  import { s as u } from "./slotted.js";
@@ -95,10 +95,10 @@ class c extends y(
95
95
  this.#o = $.binding(
96
96
  () => this.locale,
97
97
  this.#s
98
- ), this.#o.observe(this, x);
98
+ ), this.#o.observe(this, x.default);
99
99
  }
100
100
  #a() {
101
- this.#o.disconnect();
101
+ this.#o.dispose();
102
102
  }
103
103
  #i;
104
104
  #n() {
package/bundled/ref.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";const i=require("./vivid-element.cjs");class s{constructor(e,r){this.target=e,this.propertyName=r}bind(e){e[this.propertyName]=this.target}unbind(){}}function n(t){return new i.AttachedBehaviorHTMLDirective("fast-ref",s,t)}exports.ref=n;
1
+ "use strict";const i=require("./vivid-element.cjs");class s extends i.StatelessAttachedAttributeDirective{bind(t){t.source[this.options]=t.targets[this.targetNodeId]}}i.HTMLDirective.define(s);const r=e=>new s(e);exports.ref=r;