@vonage/vivid 5.5.0 → 5.7.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 (345) hide show
  1. package/LICENSE.md +201 -0
  2. package/accordion/definition.cjs +5 -0
  3. package/accordion/definition.js +5 -0
  4. package/accordion/index.cjs +1 -1
  5. package/accordion/index.js +14 -3
  6. package/accordion-item/definition.cjs +1 -1
  7. package/accordion-item/definition.js +1 -1
  8. package/alert/definition.cjs +4 -12
  9. package/alert/definition.js +5 -13
  10. package/alert/index.cjs +11 -11
  11. package/alert/index.js +33 -37
  12. package/audio-player/definition.cjs +4 -0
  13. package/audio-player/definition.js +4 -0
  14. package/audio-player/index.cjs +1 -1
  15. package/audio-player/index.js +8 -2
  16. package/avatar/definition.cjs +1 -1
  17. package/avatar/definition.js +1 -1
  18. package/avatar/index.cjs +1 -1
  19. package/avatar/index.js +4 -4
  20. package/banner/definition.cjs +2 -4
  21. package/banner/definition.js +2 -4
  22. package/banner/index.cjs +2 -2
  23. package/banner/index.js +1 -1
  24. package/breadcrumb/definition.cjs +1 -0
  25. package/breadcrumb/definition.js +1 -0
  26. package/breadcrumb/index.cjs +1 -1
  27. package/breadcrumb/index.js +1 -0
  28. package/breadcrumb-item/definition.cjs +1 -1
  29. package/breadcrumb-item/definition.js +1 -1
  30. package/breadcrumb-item/index.cjs +4 -4
  31. package/breadcrumb-item/index.js +4 -4
  32. package/bundled/affix.js +1 -1
  33. package/bundled/anchored.cjs +1 -1
  34. package/bundled/anchored.js +6 -6
  35. package/bundled/attribute-binding-behaviour.cjs +1 -1
  36. package/bundled/attribute-binding-behaviour.js +3 -1
  37. package/bundled/base-color-picker.cjs +1 -1
  38. package/bundled/base-color-picker.js +9 -3
  39. package/bundled/base-progress.cjs +1 -1
  40. package/bundled/base-progress.js +3 -0
  41. package/bundled/button.cjs +1 -1
  42. package/bundled/button.js +14 -10
  43. package/bundled/calendar-picker.template.cjs +1 -1
  44. package/bundled/calendar-picker.template.js +3 -1
  45. package/bundled/definition.cjs +1 -1
  46. package/bundled/definition.js +21 -21
  47. package/bundled/definition10.cjs +7 -7
  48. package/bundled/definition10.js +27 -17
  49. package/bundled/definition11.cjs +2 -2
  50. package/bundled/definition11.js +5 -5
  51. package/bundled/definition12.cjs +3 -3
  52. package/bundled/definition12.js +2 -1
  53. package/bundled/definition13.cjs +1 -1
  54. package/bundled/definition13.js +1 -1
  55. package/bundled/definition17.cjs +1 -1
  56. package/bundled/definition17.js +4 -1
  57. package/bundled/definition18.cjs +1 -1
  58. package/bundled/definition18.js +18 -7
  59. package/bundled/definition19.cjs +6 -6
  60. package/bundled/definition19.js +103 -68
  61. package/bundled/definition2.cjs +8 -9
  62. package/bundled/definition2.js +67 -75
  63. package/bundled/definition20.cjs +1 -1
  64. package/bundled/definition20.js +4 -4
  65. package/bundled/definition22.cjs +1 -1
  66. package/bundled/definition22.js +2 -1
  67. package/bundled/definition3.cjs +2 -2
  68. package/bundled/definition3.js +2 -1
  69. package/bundled/definition5.cjs +1 -1
  70. package/bundled/definition5.js +10 -4
  71. package/bundled/definition6.cjs +2 -2
  72. package/bundled/definition6.js +2 -1
  73. package/bundled/definition7.cjs +1 -1
  74. package/bundled/definition7.js +8 -5
  75. package/bundled/definition8.cjs +1 -1
  76. package/bundled/definition8.js +6 -5
  77. package/bundled/definition9.cjs +6 -6
  78. package/bundled/definition9.js +545 -488
  79. package/bundled/delegates-aria.cjs +1 -1
  80. package/bundled/delegates-aria.js +3 -1
  81. package/bundled/form-associated.cjs +1 -1
  82. package/bundled/form-associated.js +11 -3
  83. package/bundled/host-semantics.js +4 -4
  84. package/bundled/listbox.cjs +1 -1
  85. package/bundled/listbox.js +21 -3
  86. package/bundled/localized.cjs +1 -1
  87. package/bundled/localized.js +137 -67
  88. package/bundled/mixins.cjs +4 -4
  89. package/bundled/mixins.js +10 -7
  90. package/bundled/picker-field.template.cjs +1 -1
  91. package/bundled/picker-field.template.js +1 -0
  92. package/bundled/scrollIntoView.cjs +1 -1
  93. package/bundled/scrollIntoView.js +4 -1
  94. package/bundled/text-field.cjs +1 -1
  95. package/bundled/text-field.js +1 -1
  96. package/bundled/time-selection-picker.template.cjs +11 -11
  97. package/bundled/time-selection-picker.template.js +4 -1
  98. package/bundled/vivid-element.cjs +4 -4
  99. package/bundled/vivid-element.js +529 -492
  100. package/calendar/definition.cjs +2 -0
  101. package/calendar/definition.js +2 -0
  102. package/calendar/index.cjs +1 -1
  103. package/calendar/index.js +2 -0
  104. package/calendar-event/definition.cjs +1 -1
  105. package/calendar-event/definition.js +1 -1
  106. package/calendar-event/index.cjs +2 -2
  107. package/calendar-event/index.js +5 -5
  108. package/card/definition.cjs +1 -1
  109. package/card/definition.js +1 -1
  110. package/card/index.cjs +1 -1
  111. package/card/index.js +1 -1
  112. package/checkbox/definition.cjs +2 -1
  113. package/checkbox/definition.js +2 -1
  114. package/color-picker/definition.cjs +6 -1
  115. package/color-picker/definition.js +6 -1
  116. package/color-picker/index.cjs +1 -1
  117. package/color-picker/index.js +6 -1
  118. package/combobox/definition.cjs +17 -6
  119. package/combobox/definition.js +17 -6
  120. package/combobox/index.cjs +14 -9
  121. package/combobox/index.js +48 -36
  122. package/contextual-help/definition.cjs +1 -1
  123. package/contextual-help/definition.js +1 -1
  124. package/custom-elements.json +6985 -542
  125. package/data-grid/definition.cjs +106 -8
  126. package/data-grid/definition.js +106 -8
  127. package/data-grid/index.cjs +52 -38
  128. package/data-grid/index.js +313 -242
  129. package/date-range-picker/definition.cjs +2 -0
  130. package/date-range-picker/definition.js +2 -0
  131. package/date-range-picker/index.cjs +1 -1
  132. package/date-range-picker/index.js +5 -1
  133. package/dial-pad/definition.cjs +10 -1
  134. package/dial-pad/definition.js +10 -1
  135. package/dial-pad/index.cjs +2 -2
  136. package/dial-pad/index.js +37 -13
  137. package/dialog/definition.cjs +2 -1
  138. package/dialog/definition.js +2 -1
  139. package/dialog/index.cjs +1 -1
  140. package/dialog/index.js +2 -1
  141. package/fab/definition.cjs +2 -1
  142. package/fab/definition.js +2 -1
  143. package/fab/index.cjs +1 -1
  144. package/fab/index.js +6 -5
  145. package/file-picker/definition.cjs +7 -2
  146. package/file-picker/definition.js +7 -2
  147. package/file-picker/index.cjs +6 -6
  148. package/file-picker/index.js +82 -73
  149. package/icon/definition.cjs +12 -21
  150. package/icon/definition.js +13 -22
  151. package/index.cjs +21 -0
  152. package/index.js +1 -1
  153. package/lib/data-grid/locale.d.ts +5 -0
  154. package/lib/date-picker/date-picker.d.ts +38 -38
  155. package/lib/date-range-picker/date-range-picker.d.ts +20 -20
  156. package/lib/date-time-picker/date-time-picker.d.ts +40 -40
  157. package/lib/icon/icon.d.ts +0 -1
  158. package/lib/menu/menu.d.ts +4 -4
  159. package/lib/rich-text-editor/definition.d.ts +3 -2
  160. package/lib/rich-text-editor/locale.d.ts +29 -3
  161. package/lib/rich-text-editor/popover.d.ts +19 -0
  162. package/lib/rich-text-editor/rich-text-editor.d.ts +16 -45
  163. package/lib/rich-text-editor/rich-text-editor.template.d.ts +2 -2
  164. package/lib/rich-text-editor/rte/config.d.ts +18 -0
  165. package/lib/rich-text-editor/rte/document.d.ts +28 -0
  166. package/lib/rich-text-editor/rte/exports.d.ts +23 -0
  167. package/lib/rich-text-editor/rte/feature.d.ts +46 -0
  168. package/lib/rich-text-editor/rte/features/internal/basic-text-blocks.d.ts +33 -0
  169. package/lib/rich-text-editor/rte/features/internal/foreign-html.d.ts +11 -0
  170. package/lib/rich-text-editor/rte/features/internal/history.d.ts +10 -0
  171. package/lib/rich-text-editor/rte/features/internal/text-style.d.ts +18 -0
  172. package/lib/rich-text-editor/rte/html-parser.d.ts +24 -0
  173. package/lib/rich-text-editor/rte/html-serializer.d.ts +30 -0
  174. package/lib/rich-text-editor/rte/instance.d.ts +57 -0
  175. package/lib/rich-text-editor/rte/utils/default-textblock.d.ts +2 -0
  176. package/lib/rich-text-editor/rte/utils/impl.d.ts +1 -0
  177. package/lib/rich-text-editor/rte/utils/textblock-attrs.d.ts +29 -0
  178. package/lib/rich-text-editor/rte/utils/textblock-marks.d.ts +10 -0
  179. package/lib/rich-text-editor/rte/utils/ui.d.ts +109 -0
  180. package/lib/simple-color-picker/simple-color-picker.d.ts +4 -4
  181. package/lib/text-area/text-area.d.ts +1 -1
  182. package/lib/text-field/text-field.d.ts +1 -1
  183. package/lib/time-picker/time-picker.d.ts +20 -20
  184. package/lib/toggletip/toggletip.d.ts +4 -4
  185. package/lib/tooltip/tooltip.d.ts +4 -4
  186. package/locales/de-DE.cjs +42 -4
  187. package/locales/de-DE.js +42 -4
  188. package/locales/en-GB.cjs +43 -5
  189. package/locales/en-GB.js +43 -5
  190. package/locales/en-US.cjs +43 -5
  191. package/locales/en-US.js +43 -5
  192. package/locales/ja-JP.cjs +43 -5
  193. package/locales/ja-JP.js +43 -5
  194. package/locales/zh-CN.cjs +43 -5
  195. package/locales/zh-CN.js +43 -5
  196. package/menu/definition.cjs +2 -1
  197. package/menu/definition.js +2 -1
  198. package/nav-disclosure/definition.cjs +1 -1
  199. package/nav-disclosure/definition.js +1 -1
  200. package/nav-disclosure/index.cjs +1 -1
  201. package/nav-disclosure/index.js +1 -1
  202. package/nav-item/definition.cjs +1 -1
  203. package/nav-item/definition.js +1 -1
  204. package/nav-item/index.cjs +1 -1
  205. package/nav-item/index.js +5 -5
  206. package/number-field/definition.cjs +5 -3
  207. package/number-field/definition.js +5 -3
  208. package/number-field/index.cjs +5 -3
  209. package/number-field/index.js +34 -32
  210. package/package.json +76 -62
  211. package/pagination/definition.cjs +2 -0
  212. package/pagination/definition.js +2 -0
  213. package/pagination/index.cjs +1 -1
  214. package/pagination/index.js +2 -0
  215. package/radio/definition.cjs +5 -1
  216. package/radio/definition.js +5 -1
  217. package/range-slider/definition.cjs +3 -2
  218. package/range-slider/definition.js +3 -2
  219. package/range-slider/index.cjs +1 -1
  220. package/range-slider/index.js +4 -2
  221. package/rich-text-editor/definition.cjs +17942 -1074
  222. package/rich-text-editor/definition.js +17926 -1079
  223. package/rich-text-editor/index.cjs +29 -130
  224. package/rich-text-editor/index.js +5565 -2474
  225. package/searchable-select/definition.cjs +7 -3
  226. package/searchable-select/definition.js +7 -3
  227. package/searchable-select/index.cjs +5 -5
  228. package/searchable-select/index.js +11 -7
  229. package/select/definition.cjs +17 -2
  230. package/select/definition.js +17 -2
  231. package/selectable-box/definition.cjs +1 -1
  232. package/selectable-box/definition.js +1 -1
  233. package/selectable-box/index.cjs +3 -3
  234. package/selectable-box/index.js +1 -1
  235. package/shared/patterns/anchored.d.ts +8 -8
  236. package/shared/patterns/char-count/char-count.d.ts +1 -1
  237. package/shared/patterns/localized.d.ts +386 -0
  238. package/shared/picker-field/mixins/calendar-picker.d.ts +10 -10
  239. package/shared/picker-field/mixins/calendar-picker.template.d.ts +10 -10
  240. package/shared/picker-field/mixins/min-max-calendar-picker.d.ts +20 -20
  241. package/shared/picker-field/mixins/single-date-picker.d.ts +28 -28
  242. package/shared/picker-field/mixins/single-value-picker.d.ts +8 -8
  243. package/shared/picker-field/mixins/time-selection-picker.d.ts +20 -20
  244. package/shared/picker-field/mixins/time-selection-picker.template.d.ts +20 -20
  245. package/shared/utils/promise.d.ts +7 -0
  246. package/simple-color-picker/definition.cjs +4 -1
  247. package/simple-color-picker/definition.js +4 -1
  248. package/simple-color-picker/index.cjs +3 -3
  249. package/simple-color-picker/index.js +4 -1
  250. package/slider/definition.cjs +8 -2
  251. package/slider/definition.js +8 -2
  252. package/split-button/definition.cjs +1 -1
  253. package/split-button/definition.js +1 -1
  254. package/split-button/index.cjs +1 -1
  255. package/split-button/index.js +1 -1
  256. package/styles/core/all.css +5 -1
  257. package/styles/core/theme.css +5 -1
  258. package/styles/core/typography.css +1 -1
  259. package/styles/tokens/theme-dark.css +4 -4
  260. package/styles/tokens/theme-light.css +4 -4
  261. package/styles/tokens/vivid-2-compat.css +1 -1
  262. package/switch/definition.cjs +2 -1
  263. package/switch/definition.js +2 -1
  264. package/switch/index.cjs +2 -2
  265. package/switch/index.js +11 -10
  266. package/tab/definition.cjs +1 -1
  267. package/tab/definition.js +1 -1
  268. package/tabs/definition.cjs +2 -0
  269. package/tabs/definition.js +2 -0
  270. package/tabs/index.cjs +1 -1
  271. package/tabs/index.js +2 -0
  272. package/tag/definition.cjs +1 -1
  273. package/tag/definition.js +1 -1
  274. package/tag/index.cjs +1 -1
  275. package/tag/index.js +1 -1
  276. package/text-area/definition.cjs +13 -7
  277. package/text-area/definition.js +13 -7
  278. package/text-area/index.cjs +6 -6
  279. package/text-area/index.js +20 -14
  280. package/text-field/definition.cjs +16 -6
  281. package/text-field/definition.js +16 -6
  282. package/toggletip/definition.cjs +5 -1
  283. package/toggletip/definition.js +5 -1
  284. package/tooltip/definition.cjs +4 -1
  285. package/tooltip/definition.js +4 -1
  286. package/tree-view/definition.cjs +28 -6
  287. package/tree-view/definition.js +28 -6
  288. package/tree-view/index.cjs +1 -1
  289. package/tree-view/index.js +28 -6
  290. package/unbundled/_commonjsHelpers.cjs +0 -26
  291. package/unbundled/_commonjsHelpers.js +1 -26
  292. package/unbundled/attribute-binding-behaviour.cjs +1 -0
  293. package/unbundled/attribute-binding-behaviour.js +1 -0
  294. package/unbundled/base-color-picker.cjs +9 -3
  295. package/unbundled/base-color-picker.js +9 -3
  296. package/unbundled/base-progress.cjs +3 -0
  297. package/unbundled/base-progress.js +3 -0
  298. package/unbundled/button.cjs +14 -10
  299. package/unbundled/button.js +14 -10
  300. package/unbundled/calendar-picker.template.cjs +3 -1
  301. package/unbundled/calendar-picker.template.js +3 -1
  302. package/unbundled/definition.cjs +2 -1
  303. package/unbundled/definition.js +2 -1
  304. package/unbundled/definition2.cjs +5 -2
  305. package/unbundled/definition2.js +5 -2
  306. package/unbundled/definition3.cjs +2 -1
  307. package/unbundled/definition3.js +2 -1
  308. package/unbundled/definition4.cjs +2 -1
  309. package/unbundled/definition4.js +2 -1
  310. package/unbundled/definition5.cjs +3 -2
  311. package/unbundled/definition5.js +4 -3
  312. package/unbundled/delegates-aria.cjs +1 -0
  313. package/unbundled/delegates-aria.js +1 -0
  314. package/unbundled/form-associated.cjs +4 -0
  315. package/unbundled/form-associated.js +4 -0
  316. package/unbundled/listbox.cjs +16 -1
  317. package/unbundled/listbox.js +16 -1
  318. package/unbundled/localized.cjs +36 -0
  319. package/unbundled/localized.js +37 -2
  320. package/unbundled/mixins.cjs +2 -0
  321. package/unbundled/mixins.js +2 -0
  322. package/unbundled/picker-field.template.cjs +1 -0
  323. package/unbundled/picker-field.template.js +1 -0
  324. package/unbundled/scrollIntoView.cjs +1 -0
  325. package/unbundled/scrollIntoView.js +1 -0
  326. package/unbundled/text-field.cjs +1 -1
  327. package/unbundled/text-field.js +1 -1
  328. package/unbundled/time-selection-picker.template.cjs +4 -1
  329. package/unbundled/time-selection-picker.template.js +4 -1
  330. package/unbundled/vivid-element.cjs +1 -1
  331. package/unbundled/vivid-element.js +1 -1
  332. package/video-player/definition.cjs +54 -44
  333. package/video-player/definition.js +51 -41
  334. package/video-player/index.cjs +28 -28
  335. package/video-player/index.js +1449 -1443
  336. package/vivid.api.json +6463 -6099
  337. package/lib/rich-text-editor/facades/prose-mirror-vivid.schema.d.ts +0 -4
  338. package/lib/rich-text-editor/facades/vivid-prose-mirror.facade.d.ts +0 -18
  339. package/lib/rich-text-editor/image-placeholder/definition.d.ts +0 -2
  340. package/lib/rich-text-editor/image-placeholder/image-placeholder.d.ts +0 -7
  341. package/lib/rich-text-editor/image-placeholder/image-placeholder.template.d.ts +0 -4
  342. package/lib/rich-text-editor/menubar/consts.d.ts +0 -18
  343. package/lib/rich-text-editor/menubar/definition.d.ts +0 -2
  344. package/lib/rich-text-editor/menubar/menubar.d.ts +0 -386
  345. package/lib/rich-text-editor/menubar/menubar.template.d.ts +0 -4
@@ -3,17 +3,17 @@ import { h as r, c, d as l } from "../bundled/vivid-element.js";
3
3
  import { B as d } from "../bundled/breadcrumb-item.js";
4
4
  import { w as e } from "../bundled/when.js";
5
5
  import { c as v } from "../bundled/class-names.js";
6
- const m = '.base{display:flex;align-items:center;color:var(--vvd-color-canvas-text);font:var(--vvd-typography-base)}.base .separator{margin:0 16px;color:var(--vvd-color-neutral-600);font-size:12px}.control{font:inherit}.control:focus-visible{position:relative;outline:none}.control:focus-visible:after{box-shadow:0 0 0 4px color-mix(in srgb,var(--vvd-color-cta-500),transparent 85%),inset 0 0 0 3px var(--focus-stroke-gap-color, currentColor);outline:1px solid var(--focus-stroke-color, var(--vvd-color-cta-500));outline-offset:calc(-1px - var(--focus-inset, 0px));position:absolute;display:block;border-radius:var(--focus-border-radius, inherit);block-size:calc(100% + var(--focus-block-size-addition, 4px));content:"";inline-size:calc(100% + var(--focus-block-size-addition, 4px));inset-block-start:50%;inset-inline-start:50%;transform:translate(-50%,-50%);--focus-stroke-gap-color: transparent;--focus-block-size-addition: 8px;--focus-border-radius: 4px}.control:any-link{color:var(--vvd-color-cta-600);text-decoration:none}@media (hover: hover){.control:any-link:hover{text-decoration:underline}}', p = (t) => v("base"), f = (t) => {
7
- const a = t.tagFor(i);
6
+ const m = '.base{display:flex;align-items:center;color:var(--vvd-color-canvas-text);font:var(--vvd-typography-base)}.base .separator{margin:0 16px;color:var(--vvd-color-neutral-600);font-size:12px}.control{font:inherit}.control:focus-visible{position:relative;outline:none}.control:focus-visible:after{box-shadow:0 0 0 4px color-mix(in srgb,var(--focus-stroke-color, var(--vvd-color-cta-500)),transparent 85%),inset 0 0 0 3px var(--focus-stroke-gap-color, currentColor);outline:1px solid var(--focus-stroke-color, var(--vvd-color-cta-500));outline-offset:calc(-1px - var(--focus-inset, 0px));position:absolute;display:block;border-radius:var(--focus-border-radius, inherit);block-size:calc(100% + var(--focus-block-size-addition, 4px));content:"";inline-size:calc(100% + var(--focus-block-size-addition, 4px));inset-block-start:50%;inset-inline-start:50%;transform:translate(-50%,-50%);--focus-stroke-gap-color: transparent;--focus-block-size-addition: 8px;--focus-border-radius: 4px}.control:any-link{color:var(--vvd-color-cta-600);text-decoration:none}@media (hover: hover){.control:any-link:hover{text-decoration:underline}}', p = (t) => v("base"), f = (t) => {
7
+ const s = t.tagFor(i);
8
8
  return r` <div role="listitem" class="${p}">
9
9
  ${e((o) => o.text && !o.href, r`${(o) => o.text}`)}
10
10
  ${e(
11
11
  (o) => o.text && o.href && o.href.length > 0,
12
- r`${(o) => o._renderLinkElement(r`${(s) => s.text}`, "control")}`
12
+ r`${(o) => o._renderLinkElement(r`${(a) => a.text}`, "control")}`
13
13
  )}
14
14
  ${e(
15
15
  (o) => o.separator,
16
- r`<${a} class="separator" name="chevron-right-solid"></${a}>`
16
+ r`<${s} class="separator" name="chevron-right-solid"></${s}>`
17
17
  )}
18
18
  </div>`;
19
19
  }, u = l(
package/bundled/affix.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { I as f } from "./definition2.js";
2
- import { a as p, h as s, o as d } from "./vivid-element.js";
2
+ import { a as p, o as d, h as s } from "./vivid-element.js";
3
3
  import { s as u } from "./slotted.js";
4
4
  var $ = Object.defineProperty, l = (a, n, e, i) => {
5
5
  for (var o = void 0, r = a.length - 1, t; r >= 0; r--)
@@ -1,4 +1,4 @@
1
- "use strict";const l=require("./slotted.cjs"),n=require("./vivid-element.cjs");var a=Object.defineProperty,c=(s,o,r,t)=>{for(var e=void 0,h=s.length-1,i;h>=0;h--)(i=s[h])&&(e=i(o,r,e)||e);return e&&a(o,r,e),e};const d=s=>{class o extends s{anchorChanged(){this.#e()}_slottedAnchorChanged(){const t=!!(this._slottedAnchor&&this._slottedAnchor.length>0);n.DOM.setBooleanAttribute(this,"slotted-anchor",t),this.#e()}#e=()=>{if(!this.isConnected){this._anchorEl=void 0;return}this.#o();let t;this._slottedAnchor&&this._slottedAnchor.length>0?t=this._slottedAnchor[0]:this.anchor instanceof HTMLElement?t=this.anchor:typeof this.anchor=="string"&&(t=document.getElementById(this.anchor)??void 0,t||this.#n(this.anchor)),this._anchorEl=t};#t;#n=t=>{this.#t=new MutationObserver(()=>{const e=document.getElementById(t);e&&(this._anchorEl=e,this.#o())}),this.#t.observe(document.body,{childList:!0,subtree:!0})};#o=()=>{this.#t?.disconnect(),this.#t=void 0};connectedCallback(){super.connectedCallback(),this.#e()}disconnectedCallback(){super.disconnectedCallback(),this.#o(),this._anchorEl=void 0}}return c([n.attr],o.prototype,"anchor"),c([n.observable],o.prototype,"_slottedAnchor"),c([n.observable],o.prototype,"_anchorEl"),o},u=()=>n.html`<slot
1
+ "use strict";const n=require("./vivid-element.cjs"),l=require("./slotted.cjs");var a=Object.defineProperty,c=(s,o,r,t)=>{for(var e=void 0,h=s.length-1,i;h>=0;h--)(i=s[h])&&(e=i(o,r,e)||e);return e&&a(o,r,e),e};const d=s=>{class o extends s{anchorChanged(){this.#e()}_slottedAnchorChanged(){const t=!!(this._slottedAnchor&&this._slottedAnchor.length>0);n.DOM.setBooleanAttribute(this,"slotted-anchor",t),this.#e()}#e=()=>{if(!this.isConnected){this._anchorEl=void 0;return}this.#o();let t;this._slottedAnchor&&this._slottedAnchor.length>0?t=this._slottedAnchor[0]:this.anchor instanceof HTMLElement?t=this.anchor:typeof this.anchor=="string"&&(t=document.getElementById(this.anchor)??void 0,t||this.#n(this.anchor)),this._anchorEl=t};#t;#n=t=>{this.#t=new MutationObserver(()=>{const e=document.getElementById(t);e&&(this._anchorEl=e,this.#o())}),this.#t.observe(document.body,{childList:!0,subtree:!0})};#o=()=>{this.#t?.disconnect(),this.#t=void 0};connectedCallback(){super.connectedCallback(),this.#e()}disconnectedCallback(){super.disconnectedCallback(),this.#o(),this._anchorEl=void 0}}return c([n.attr],o.prototype,"anchor"),c([n.observable],o.prototype,"_slottedAnchor"),c([n.observable],o.prototype,"_anchorEl"),o},u=()=>n.html`<slot
2
2
  name="anchor"
3
3
  ${l.slotted("_slottedAnchor")}
4
4
  ></slot>`;exports.Anchored=d;exports.anchorSlotTemplateFactory=u;
@@ -1,5 +1,5 @@
1
- import { s as a } from "./slotted.js";
2
- import { h as l, D as d, a as p, o as i } from "./vivid-element.js";
1
+ import { D as a, a as l, o as i, h as d } from "./vivid-element.js";
2
+ import { s as p } from "./slotted.js";
3
3
  var u = Object.defineProperty, h = (s, o, n, t) => {
4
4
  for (var e = void 0, r = s.length - 1, c; r >= 0; r--)
5
5
  (c = s[r]) && (e = c(o, n, e) || e);
@@ -18,7 +18,7 @@ const v = (s) => {
18
18
  */
19
19
  _slottedAnchorChanged() {
20
20
  const t = !!(this._slottedAnchor && this._slottedAnchor.length > 0);
21
- d.setBooleanAttribute(
21
+ a.setBooleanAttribute(
22
22
  this,
23
23
  "slotted-anchor",
24
24
  t
@@ -51,15 +51,15 @@ const v = (s) => {
51
51
  }
52
52
  }
53
53
  return h([
54
- p
54
+ l
55
55
  ], o.prototype, "anchor"), h([
56
56
  i
57
57
  ], o.prototype, "_slottedAnchor"), h([
58
58
  i
59
59
  ], o.prototype, "_anchorEl"), o;
60
- }, b = () => l`<slot
60
+ }, b = () => d`<slot
61
61
  name="anchor"
62
- ${a("_slottedAnchor")}
62
+ ${p("_slottedAnchor")}
63
63
  ></slot>`;
64
64
  export {
65
65
  v as A,
@@ -1 +1 @@
1
- "use strict";const i=require("./vivid-element.cjs");class r{constructor(t,e,s,n){this.target=t,this.binding=e,this.isBindingVolatile=s,this.attributeName=n,this.source=null,this.context=null}bind(t){this.source=t.source,this.context=t.context,this.bindingObserver||(this.bindingObserver=i.Observable.binding(this.binding.evaluate,this,this.isBindingVolatile)),this.bindingObserver.observe(this.source,this.context),this.updateTarget(this.bindingObserver.observe(this.source,this.context))}handleChange(){this.updateTarget(this.bindingObserver.observe(this.source,this.context))}updateTarget(t){i.DOM.setAttribute(this.target,this.attributeName,t)}}exports.AttributeBindingBehavior=r;
1
+ "use strict";const i=require("./vivid-element.cjs");class r{constructor(t,e,s,n){this.target=t,this.binding=e,this.isBindingVolatile=s,this.attributeName=n,this.source=null,this.context=null}bind(t){this.source=t.source,this.context=t.context;/* v8 ignore else -- @preserve */this.bindingObserver||(this.bindingObserver=i.Observable.binding(this.binding.evaluate,this,this.isBindingVolatile)),this.bindingObserver.observe(this.source,this.context),this.updateTarget(this.bindingObserver.observe(this.source,this.context))}handleChange(){this.updateTarget(this.bindingObserver.observe(this.source,this.context))}updateTarget(t){i.DOM.setAttribute(this.target,this.attributeName,t)}}exports.AttributeBindingBehavior=r;
@@ -4,7 +4,9 @@ class b {
4
4
  this.target = t, this.binding = i, this.isBindingVolatile = e, this.attributeName = s, this.source = null, this.context = null;
5
5
  }
6
6
  bind(t) {
7
- this.source = t.source, this.context = t.context, this.bindingObserver || (this.bindingObserver = n.binding(
7
+ this.source = t.source, this.context = t.context;
8
+ /* v8 ignore else -- @preserve */
9
+ this.bindingObserver || (this.bindingObserver = n.binding(
8
10
  this.binding.evaluate,
9
11
  this,
10
12
  this.isBindingVolatile
@@ -1,4 +1,4 @@
1
- "use strict";const m=require("./form-associated.cjs"),u=require("./vivid-element.cjs"),g=require("./when.cjs"),y=require("./localized.cjs"),S=require("./form-element.cjs"),b=require("./class-names.cjs");function C(a){if(!a)return null;const s=a.trim().replace(/^#/,"");return/^[0-9a-fA-F]{3}$/.test(s)?s.split("").map(n=>n+n).join("").toLowerCase():/^[0-9a-fA-F]{6}$/.test(s)?s.toLowerCase():null}function I(a){return C(a)!==null}function w(a){const s=C(a);if(!s)return 0;const n=parseInt(s.slice(0,2),16)/255,t=parseInt(s.slice(2,4),16)/255,o=parseInt(s.slice(4,6),16)/255,e=n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4),r=t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4),l=o<=.03928?o/12.92:Math.pow((o+.055)/1.055,2.4);return .2126*e+.7152*r+.0722*l}function B(a,s){const n=w(a),t=w(s),o=Math.max(n,t),e=Math.min(n,t);return(o+.05)/(e+.05)}function _(a,s){return s||(s=document.querySelector(".vvd-root")||document.documentElement),getComputedStyle(s).getPropertyValue(a).trim()}var $=Object.defineProperty,d=(a,s,n,t)=>{for(var o=void 0,e=a.length-1,r;e>=0;e--)(r=a[e])&&(o=r(s,n,o)||o);return o&&$(s,n,o),o};const A=a=>{class s extends y.Localized(S.FormElement(m.FormAssociated(a))){constructor(){super(...arguments),this.proxy=document.createElement("input"),this.open=!1,this.swatches=[],this._canvasColor=""}connectedCallback(){super.connectedCallback(),requestAnimationFrame(()=>{this._refreshCanvasColor()})}get _computedCanvasColor(){return this._canvasColor||(this._canvasColor=_("--vvd-color-canvas",this)),this._canvasColor}_refreshCanvasColor(){this._canvasColor=_("--vvd-color-canvas",this)}_applyContrastClass(t,o=3){if(!t)return!1;const e=this._computedCanvasColor;return e?B(t,e)<o:!1}_getRowLength(){return 7}_handleSwatchSelection(t){this.value===t?this.value="":this.value=t,this.$emit("change"),this.open=!1}_handleColorSaving(){}_getFocusReturnEl(){return null}_returnFocusToAnchor(){const t=this._getFocusReturnEl();t&&u.Updates.enqueue(()=>t.focus())}_getGridCells(){const t=this.shadowRoot?.querySelector('[role="grid"]');return t?Array.from(t.querySelectorAll('[role="gridcell"], [data-vvd-role="gridcell"]')):[]}_handleCellKeydown(t,o,e,r){const l=this._getRowLength(),c=this._getGridCells().length,h=Math.floor(e/l),f=e%l,p=Math.ceil(c/l);switch(t.key){case"ArrowRight":return f<l-1&&e+1<c&&this._focusSwatchByIndex(e+1),!1;case"ArrowLeft":return f>0&&this._focusSwatchByIndex(e-1),!1;case"ArrowDown":return h<p-1&&e+l<c&&this._focusSwatchByIndex(e+l),!1;case"ArrowUp":return h>0&&this._focusSwatchByIndex(e-l),!1;case"PageDown":{const i=(p-1)*l,v=Math.min(i+f,c-1);return e!==v&&this._focusSwatchByIndex(v),!1}case"PageUp":{const i=Math.min(f,c-1);return e!==i&&this._focusSwatchByIndex(i),!1}case"Home":return t.ctrlKey?this._focusSwatchByIndex(0):this._focusSwatchByIndex(h*l),!1;case"End":if(t.ctrlKey)this._focusSwatchByIndex(c-1);else{const i=Math.min((h+1)*l-1,c-1);this._focusSwatchByIndex(i)}return!1;case"Enter":case" ":return r&&this._handleColorSaving(),o&&!r&&(this._handleSwatchSelection(o),this._returnFocusToAnchor()),!1;case"Escape":return this.open=!1,this._returnFocusToAnchor(),!1;case"Tab":return this.open=!1,!0;default:return!0}}_focusSwatchByIndex(t){const o=this._getGridCells();t<0||t>=o.length||o[t]?.focus()}_renderColorSwatch(t,o){return u.html`
1
+ "use strict";const m=require("./form-associated.cjs"),u=require("./vivid-element.cjs"),g=require("./when.cjs"),y=require("./localized.cjs"),S=require("./form-element.cjs"),b=require("./class-names.cjs");function C(a){if(!a)return null;const s=a.trim().replace(/^#/,"");return/^[0-9a-fA-F]{3}$/.test(s)?s.split("").map(n=>n+n).join("").toLowerCase():/^[0-9a-fA-F]{6}$/.test(s)?s.toLowerCase():null}function I(a){return C(a)!==null}function w(a){const s=C(a);if(!s)return 0;const n=parseInt(s.slice(0,2),16)/255,t=parseInt(s.slice(2,4),16)/255,o=parseInt(s.slice(4,6),16)/255,e=n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4),r=t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4),l=o<=.03928?o/12.92:Math.pow((o+.055)/1.055,2.4);return .2126*e+.7152*r+.0722*l}function B(a,s){const n=w(a),t=w(s),o=Math.max(n,t),e=Math.min(n,t);return(o+.05)/(e+.05)}function _(a,s){return s||(s=document.querySelector(".vvd-root")||document.documentElement),getComputedStyle(s).getPropertyValue(a).trim()}var $=Object.defineProperty,d=(a,s,n,t)=>{for(var o=void 0,e=a.length-1,r;e>=0;e--)(r=a[e])&&(o=r(s,n,o)||o);return o&&$(s,n,o),o};const A=a=>{class s extends y.Localized(S.FormElement(m.FormAssociated(a))){constructor(){super(...arguments),this.proxy=document.createElement("input"),this.open=!1,this.swatches=[],this._canvasColor=""}connectedCallback(){super.connectedCallback(),requestAnimationFrame(()=>{this._refreshCanvasColor()})}get _computedCanvasColor(){return this._canvasColor||(this._canvasColor=_("--vvd-color-canvas",this)),this._canvasColor}_refreshCanvasColor(){this._canvasColor=_("--vvd-color-canvas",this)}_applyContrastClass(t,o=3){if(!t)return!1;const e=this._computedCanvasColor;return e?B(t,e)<o:!1}_getRowLength(){return 7}_handleSwatchSelection(t){this.value===t?this.value="":this.value=t,this.$emit("change"),this.open=!1}_handleColorSaving(){}_getFocusReturnEl(){return null}_returnFocusToAnchor(){const t=this._getFocusReturnEl();t&&u.Updates.enqueue(()=>t.focus())}_getGridCells(){const t=this.shadowRoot?.querySelector('[role="grid"]');return t?Array.from(t.querySelectorAll('[role="gridcell"], [data-vvd-role="gridcell"]')):[]}_handleCellKeydown(t,o,e,r){const l=this._getRowLength(),c=this._getGridCells().length,h=Math.floor(e/l),f=e%l,p=Math.ceil(c/l);switch(t.key){case"ArrowRight":{/* v8 ignore else -- @preserve */return f<l-1&&e+1<c&&this._focusSwatchByIndex(e+1),!1}case"ArrowLeft":return f>0&&this._focusSwatchByIndex(e-1),!1;case"ArrowDown":{/* v8 ignore else -- @preserve */return h<p-1&&e+l<c&&this._focusSwatchByIndex(e+l),!1}case"ArrowUp":return h>0&&this._focusSwatchByIndex(e-l),!1;case"PageDown":{const i=(p-1)*l,v=Math.min(i+f,c-1);/* v8 ignore else -- @preserve */return e!==v&&this._focusSwatchByIndex(v),!1}case"PageUp":{const i=Math.min(f,c-1);return e!==i&&this._focusSwatchByIndex(i),!1}case"Home":return t.ctrlKey?this._focusSwatchByIndex(0):this._focusSwatchByIndex(h*l),!1;case"End":if(t.ctrlKey)this._focusSwatchByIndex(c-1);else{const i=Math.min((h+1)*l-1,c-1);this._focusSwatchByIndex(i)}return!1;case"Enter":case" ":return r&&this._handleColorSaving(),o&&!r&&(this._handleSwatchSelection(o),this._returnFocusToAnchor()),!1;case"Escape":return this.open=!1,this._returnFocusToAnchor(),!1;case"Tab":return this.open=!1,!0;default:return!0}}_focusSwatchByIndex(t){const o=this._getGridCells();t<0||t>=o.length||o[t]?.focus()}_renderColorSwatch(t,o){return u.html`
2
2
  <${o} placement="top"
3
3
  text="${e=>e.label??e.value}"
4
4
  exportparts="vvd-theme-alternate">
@@ -76,7 +76,8 @@ const q = (a) => {
76
76
  }
77
77
  /**
78
78
  * @internal
79
- */
79
+ * /
80
+ /* v8 ignore next -- @preserve */
80
81
  _handleColorSaving() {
81
82
  }
82
83
  /**
@@ -109,12 +110,16 @@ const q = (a) => {
109
110
  _handleCellKeydown(t, o, e, r) {
110
111
  const l = this._getRowLength(), c = this._getGridCells().length, u = Math.floor(e / l), h = e % l, d = Math.ceil(c / l);
111
112
  switch (t.key) {
112
- case "ArrowRight":
113
+ case "ArrowRight": {
114
+ /* v8 ignore else -- @preserve */
113
115
  return h < l - 1 && e + 1 < c && this._focusSwatchByIndex(e + 1), !1;
116
+ }
114
117
  case "ArrowLeft":
115
118
  return h > 0 && this._focusSwatchByIndex(e - 1), !1;
116
- case "ArrowDown":
119
+ case "ArrowDown": {
120
+ /* v8 ignore else -- @preserve */
117
121
  return u < d - 1 && e + l < c && this._focusSwatchByIndex(e + l), !1;
122
+ }
118
123
  case "ArrowUp":
119
124
  return u > 0 && this._focusSwatchByIndex(e - l), !1;
120
125
  case "PageDown": {
@@ -122,6 +127,7 @@ const q = (a) => {
122
127
  i + h,
123
128
  c - 1
124
129
  );
130
+ /* v8 ignore else -- @preserve */
125
131
  return e !== p && this._focusSwatchByIndex(p), !1;
126
132
  }
127
133
  case "PageUp": {
@@ -1 +1 @@
1
- "use strict";const t=require("./vivid-element.cjs");var c=Object.defineProperty,o=(a,n,s,i)=>{for(var e=void 0,l=a.length-1,p;l>=0;l--)(p=a[l])&&(e=p(n,s,e)||e);return e&&c(n,s,e),e};class r extends t.VividElement{constructor(){super(...arguments),this.percentComplete=0}valueChanged(){this.$fastController.isConnected&&this.updatePercentComplete()}minChanged(){this.$fastController.isConnected&&this.updatePercentComplete()}maxChanged(){this.$fastController.isConnected&&this.updatePercentComplete()}connectedCallback(){super.connectedCallback(),this.updatePercentComplete()}updatePercentComplete(){const n=typeof this.min=="number"?this.min:0,s=typeof this.max=="number"?this.max:100,i=typeof this.value=="number"?this.value:0,e=s-n;this.percentComplete=e===0?0:Math.fround((i-n)/e*100)}}o([t.attr({converter:t.nullableNumberConverter})],r.prototype,"value");o([t.attr({converter:t.nullableNumberConverter})],r.prototype,"min");o([t.attr({converter:t.nullableNumberConverter})],r.prototype,"max");o([t.attr({mode:"boolean"})],r.prototype,"paused");o([t.observable],r.prototype,"percentComplete");exports.BaseProgress=r;
1
+ "use strict";const t=require("./vivid-element.cjs");var c=Object.defineProperty,o=(a,n,s,i)=>{for(var e=void 0,l=a.length-1,p;l>=0;l--)(p=a[l])&&(e=p(n,s,e)||e);return e&&c(n,s,e),e};class r extends t.VividElement{constructor(){super(...arguments),this.percentComplete=0}valueChanged(){/* v8 ignore if -- @preserve */this.$fastController.isConnected&&this.updatePercentComplete()}minChanged(){/* v8 ignore if -- @preserve */this.$fastController.isConnected&&this.updatePercentComplete()}maxChanged(){/* v8 ignore if -- @preserve */this.$fastController.isConnected&&this.updatePercentComplete()}connectedCallback(){super.connectedCallback(),this.updatePercentComplete()}updatePercentComplete(){const n=typeof this.min=="number"?this.min:0,s=typeof this.max=="number"?this.max:100,i=typeof this.value=="number"?this.value:0,e=s-n;this.percentComplete=e===0?0:Math.fround((i-n)/e*100)}}o([t.attr({converter:t.nullableNumberConverter})],r.prototype,"value");o([t.attr({converter:t.nullableNumberConverter})],r.prototype,"min");o([t.attr({converter:t.nullableNumberConverter})],r.prototype,"max");o([t.attr({mode:"boolean"})],r.prototype,"paused");o([t.observable],r.prototype,"percentComplete");exports.BaseProgress=r;
@@ -12,18 +12,21 @@ class o extends m {
12
12
  * @internal
13
13
  */
14
14
  valueChanged() {
15
+ /* v8 ignore if -- @preserve */
15
16
  this.$fastController.isConnected && this.updatePercentComplete();
16
17
  }
17
18
  /**
18
19
  * @internal
19
20
  */
20
21
  minChanged() {
22
+ /* v8 ignore if -- @preserve */
21
23
  this.$fastController.isConnected && this.updatePercentComplete();
22
24
  }
23
25
  /**
24
26
  * @private
25
27
  */
26
28
  maxChanged() {
29
+ /* v8 ignore if -- @preserve */
27
30
  this.$fastController.isConnected && this.updatePercentComplete();
28
31
  }
29
32
  /**
@@ -1 +1 @@
1
- "use strict";const c=require("./delegates-aria.cjs"),e=require("./vivid-element.cjs"),d=require("./form-associated.cjs");var l=Object.defineProperty,r=(n,t,o,p)=>{for(var s=void 0,a=n.length-1,h;a>=0;a--)(h=n[a])&&(s=h(t,o,s)||s);return s&&l(t,o,s),s};class i extends c.DelegatesAria(d.FormAssociated(e.VividElement)){constructor(){super(...arguments),this.proxy=document.createElement("input"),this.handleClick=t=>{this.disabled&&t.stopPropagation()},this.handleSubmission=()=>{this.form&&(this.attachProxy(),this.form.requestSubmit(this.proxy),this.detachProxy())},this.handleFormReset=()=>{this.form?.reset()},this.handleUnsupportedDelegatesFocus=()=>{this.$fastController.definition.shadowOptions&&window.ShadowRoot&&!window.ShadowRoot.prototype.hasOwnProperty("delegatesFocus")&&this.$fastController.definition.shadowOptions.delegatesFocus&&Object.defineProperty(this,"focus",{value:()=>{this.control.focus()},configurable:!0})}}formactionChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.formAction=this.formaction)}formenctypeChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.formEnctype=this.formenctype)}formmethodChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.formMethod=this.formmethod)}formnovalidateChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.formNoValidate=this.formnovalidate)}formtargetChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.formTarget=this.formtarget)}typeChanged(t,o){this.proxy instanceof HTMLInputElement&&(this.proxy.type=this.type),o==="submit"&&this.addEventListener("click",this.handleSubmission),t==="submit"&&this.removeEventListener("click",this.handleSubmission),o==="reset"&&this.addEventListener("click",this.handleFormReset),t==="reset"&&this.removeEventListener("click",this.handleFormReset)}validate(){super.validate(this.control)}connectedCallback(){super.connectedCallback(),this.proxy.setAttribute("type",this.type),this.handleUnsupportedDelegatesFocus(),this.autofocus&&e.Updates.enqueue(()=>{this.focus()});const t=Array.from(this.control.children);t&&t.forEach(o=>{o.addEventListener("click",this.handleClick)})}disconnectedCallback(){super.disconnectedCallback();const t=Array.from(this.control.children);t&&t.forEach(o=>{o.removeEventListener("click",this.handleClick)})}}r([e.attr({mode:"boolean"})],i.prototype,"autofocus");r([e.attr({attribute:"form"})],i.prototype,"formId");r([e.attr],i.prototype,"formaction");r([e.attr],i.prototype,"formenctype");r([e.attr],i.prototype,"formmethod");r([e.attr({mode:"boolean"})],i.prototype,"formnovalidate");r([e.attr],i.prototype,"formtarget");r([e.attr],i.prototype,"type");exports.VividFoundationButton=i;
1
+ "use strict";const c=require("./delegates-aria.cjs"),t=require("./vivid-element.cjs"),d=require("./form-associated.cjs");var l=Object.defineProperty,r=(n,e,o,p)=>{for(var s=void 0,a=n.length-1,h;a>=0;a--)(h=n[a])&&(s=h(e,o,s)||s);return s&&l(e,o,s),s};class i extends c.DelegatesAria(d.FormAssociated(t.VividElement)){constructor(){super(...arguments),this.proxy=document.createElement("input"),this.handleClick=e=>{/* v8 ignore else -- @preserve */this.disabled&&e.stopPropagation()},this.handleSubmission=()=>{this.form&&(this.attachProxy(),this.form.requestSubmit(this.proxy),this.detachProxy())},this.handleFormReset=()=>{this.form?.reset()},this.handleUnsupportedDelegatesFocus=()=>{/* v8 ignore else -- @preserve */this.$fastController.definition.shadowOptions&&window.ShadowRoot&&!window.ShadowRoot.prototype.hasOwnProperty("delegatesFocus")&&this.$fastController.definition.shadowOptions.delegatesFocus&&Object.defineProperty(this,"focus",{value:()=>{this.control.focus()},configurable:!0})}}formactionChanged(){/* v8 ignore if -- @preserve */this.proxy instanceof HTMLInputElement&&(this.proxy.formAction=this.formaction)}formenctypeChanged(){/* v8 ignore if -- @preserve */this.proxy instanceof HTMLInputElement&&(this.proxy.formEnctype=this.formenctype)}formmethodChanged(){/* v8 ignore if -- @preserve */this.proxy instanceof HTMLInputElement&&(this.proxy.formMethod=this.formmethod)}formnovalidateChanged(){/* v8 ignore if -- @preserve */this.proxy instanceof HTMLInputElement&&(this.proxy.formNoValidate=this.formnovalidate)}formtargetChanged(){/* v8 ignore if -- @preserve */this.proxy instanceof HTMLInputElement&&(this.proxy.formTarget=this.formtarget)}typeChanged(e,o){/* v8 ignore if -- @preserve */this.proxy instanceof HTMLInputElement&&(this.proxy.type=this.type),o==="submit"&&this.addEventListener("click",this.handleSubmission),e==="submit"&&this.removeEventListener("click",this.handleSubmission),o==="reset"&&this.addEventListener("click",this.handleFormReset),e==="reset"&&this.removeEventListener("click",this.handleFormReset)}validate(){super.validate(this.control)}connectedCallback(){super.connectedCallback(),this.proxy.setAttribute("type",this.type),this.handleUnsupportedDelegatesFocus(),this.autofocus&&t.Updates.enqueue(()=>{this.focus()}),Array.from(this.control.children).forEach(o=>{o.addEventListener("click",this.handleClick)})}disconnectedCallback(){super.disconnectedCallback(),Array.from(this.control.children).forEach(o=>{o.removeEventListener("click",this.handleClick)})}}r([t.attr({mode:"boolean"})],i.prototype,"autofocus");r([t.attr({attribute:"form"})],i.prototype,"formId");r([t.attr],i.prototype,"formaction");r([t.attr],i.prototype,"formenctype");r([t.attr],i.prototype,"formmethod");r([t.attr({mode:"boolean"})],i.prototype,"formnovalidate");r([t.attr],i.prototype,"formtarget");r([t.attr],i.prototype,"type");exports.VividFoundationButton=i;
package/bundled/button.js CHANGED
@@ -1,22 +1,24 @@
1
1
  import { D as c } from "./delegates-aria.js";
2
- import { V as d, U as p, a as o } from "./vivid-element.js";
3
- import { F as l } from "./form-associated.js";
2
+ import { V as d, U as l, a as o } from "./vivid-element.js";
3
+ import { F as p } from "./form-associated.js";
4
4
  var f = Object.defineProperty, i = (n, t, e, m) => {
5
5
  for (var r = void 0, a = n.length - 1, h; a >= 0; a--)
6
6
  (h = n[a]) && (r = h(t, e, r) || r);
7
7
  return r && f(t, e, r), r;
8
8
  };
9
9
  class s extends c(
10
- l(d)
10
+ p(d)
11
11
  ) {
12
12
  constructor() {
13
13
  super(...arguments), this.proxy = document.createElement("input"), this.handleClick = (t) => {
14
+ /* v8 ignore else -- @preserve */
14
15
  this.disabled && t.stopPropagation();
15
16
  }, this.handleSubmission = () => {
16
17
  this.form && (this.attachProxy(), this.form.requestSubmit(this.proxy), this.detachProxy());
17
18
  }, this.handleFormReset = () => {
18
19
  this.form?.reset();
19
20
  }, this.handleUnsupportedDelegatesFocus = () => {
21
+ /* v8 ignore else -- @preserve */
20
22
  this.$fastController.definition.shadowOptions && window.ShadowRoot && /* eslint-disable-next-line */
21
23
  !window.ShadowRoot.prototype.hasOwnProperty("delegatesFocus") && this.$fastController.definition.shadowOptions.delegatesFocus && Object.defineProperty(this, "focus", {
22
24
  value: () => {
@@ -28,26 +30,32 @@ class s extends c(
28
30
  }
29
31
  // @ts-expect-error Function is delcared but not used
30
32
  formactionChanged() {
33
+ /* v8 ignore if -- @preserve */
31
34
  this.proxy instanceof HTMLInputElement && (this.proxy.formAction = this.formaction);
32
35
  }
33
36
  // @ts-expect-error Function is delcared but not used
34
37
  formenctypeChanged() {
38
+ /* v8 ignore if -- @preserve */
35
39
  this.proxy instanceof HTMLInputElement && (this.proxy.formEnctype = this.formenctype);
36
40
  }
37
41
  // @ts-expect-error Function is delcared but not used
38
42
  formmethodChanged() {
43
+ /* v8 ignore if -- @preserve */
39
44
  this.proxy instanceof HTMLInputElement && (this.proxy.formMethod = this.formmethod);
40
45
  }
41
46
  // @ts-expect-error Function is delcared but not used
42
47
  formnovalidateChanged() {
48
+ /* v8 ignore if -- @preserve */
43
49
  this.proxy instanceof HTMLInputElement && (this.proxy.formNoValidate = this.formnovalidate);
44
50
  }
45
51
  // @ts-expect-error Function is delcared but not used
46
52
  formtargetChanged() {
53
+ /* v8 ignore if -- @preserve */
47
54
  this.proxy instanceof HTMLInputElement && (this.proxy.formTarget = this.formtarget);
48
55
  }
49
56
  // @ts-expect-error Function is delcared but not used
50
57
  typeChanged(t, e) {
58
+ /* v8 ignore if -- @preserve */
51
59
  this.proxy instanceof HTMLInputElement && (this.proxy.type = this.type), e === "submit" && this.addEventListener("click", this.handleSubmission), t === "submit" && this.removeEventListener("click", this.handleSubmission), e === "reset" && this.addEventListener("click", this.handleFormReset), t === "reset" && this.removeEventListener("click", this.handleFormReset);
52
60
  }
53
61
  /** {@inheritDoc (FormAssociated:interface).validate} */
@@ -58,11 +66,9 @@ class s extends c(
58
66
  * @internal
59
67
  */
60
68
  connectedCallback() {
61
- super.connectedCallback(), this.proxy.setAttribute("type", this.type), this.handleUnsupportedDelegatesFocus(), this.autofocus && p.enqueue(() => {
69
+ super.connectedCallback(), this.proxy.setAttribute("type", this.type), this.handleUnsupportedDelegatesFocus(), this.autofocus && l.enqueue(() => {
62
70
  this.focus();
63
- });
64
- const t = Array.from(this.control.children);
65
- t && t.forEach((e) => {
71
+ }), Array.from(this.control.children).forEach((e) => {
66
72
  e.addEventListener("click", this.handleClick);
67
73
  });
68
74
  }
@@ -70,9 +76,7 @@ class s extends c(
70
76
  * @internal
71
77
  */
72
78
  disconnectedCallback() {
73
- super.disconnectedCallback();
74
- const t = Array.from(this.control.children);
75
- t && t.forEach((e) => {
79
+ super.disconnectedCallback(), Array.from(this.control.children).forEach((e) => {
76
80
  e.removeEventListener("click", this.handleClick);
77
81
  });
78
82
  }