@vonage/vivid 3.0.0 → 3.1.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 (337) hide show
  1. package/README.md +176 -4
  2. package/accordion/index.js +22 -61
  3. package/accordion-item/index.js +16 -118
  4. package/action-group/index.js +5 -0
  5. package/avatar/index.js +11 -0
  6. package/badge/index.js +9 -53
  7. package/banner/index.js +20 -210
  8. package/breadcrumb/index.js +7 -96
  9. package/breadcrumb-item/index.js +15 -46
  10. package/button/index.js +19 -751
  11. package/calendar/index.js +6 -1520
  12. package/calendar-event/index.js +9 -0
  13. package/card/index.js +10 -133
  14. package/checkbox/index.js +16 -0
  15. package/combobox/index.js +35 -0
  16. package/custom-elements.json +6214 -0
  17. package/data-grid/index.js +1104 -0
  18. package/dialog/index.js +24 -0
  19. package/divider/index.js +6 -0
  20. package/elevation/index.js +4 -30
  21. package/fab/index.js +22 -0
  22. package/focus/index.js +4 -2
  23. package/header/index.js +6 -0
  24. package/icon/index.js +8 -36
  25. package/index.js +77 -26
  26. package/layout/index.js +4 -52
  27. package/lib/accordion/accordion.d.ts +3 -7
  28. package/lib/accordion/accordion.template.d.ts +1 -2
  29. package/lib/accordion/definition.d.ts +1 -0
  30. package/lib/accordion/index.d.ts +1 -2
  31. package/lib/accordion-item/accordion-item.d.ts +2 -6
  32. package/lib/accordion-item/accordion-item.template.d.ts +4 -4
  33. package/lib/accordion-item/definition.d.ts +1 -0
  34. package/lib/accordion-item/index.d.ts +1 -3
  35. package/lib/action-group/action-group.d.ts +10 -0
  36. package/lib/{sidenav-item/sidenav-item.template.d.ts → action-group/action-group.template.d.ts} +2 -2
  37. package/lib/action-group/definition.d.ts +1 -0
  38. package/lib/action-group/index.d.ts +1 -0
  39. package/lib/avatar/avatar.d.ts +15 -0
  40. package/lib/avatar/avatar.template.d.ts +4 -0
  41. package/lib/avatar/definition.d.ts +1 -0
  42. package/lib/avatar/index.d.ts +1 -0
  43. package/lib/badge/badge.d.ts +2 -4
  44. package/lib/badge/definition.d.ts +3 -0
  45. package/lib/badge/index.d.ts +1 -3
  46. package/lib/banner/banner.d.ts +1 -1
  47. package/lib/banner/banner.template.d.ts +0 -2
  48. package/lib/banner/definition.d.ts +1 -0
  49. package/lib/banner/index.d.ts +1 -2
  50. package/lib/breadcrumb/breadcrumb.template.d.ts +4 -0
  51. package/lib/breadcrumb/definition.d.ts +1 -0
  52. package/lib/breadcrumb/index.d.ts +1 -2
  53. package/lib/breadcrumb-item/definition.d.ts +1 -0
  54. package/lib/breadcrumb-item/index.d.ts +1 -3
  55. package/lib/button/button.d.ts +3 -2
  56. package/lib/button/definition.d.ts +1 -0
  57. package/lib/button/index.d.ts +1 -21
  58. package/lib/calendar/calendar.d.ts +3 -1
  59. package/lib/calendar/definition.d.ts +1 -0
  60. package/lib/calendar/index.d.ts +1 -3
  61. package/lib/calendar-event/calendar-event.d.ts +14 -0
  62. package/lib/calendar-event/calendar-event.template.d.ts +4 -0
  63. package/lib/calendar-event/definition.d.ts +1 -0
  64. package/lib/calendar-event/index.d.ts +1 -0
  65. package/lib/card/card.d.ts +2 -2
  66. package/lib/card/definition.d.ts +1 -0
  67. package/lib/card/index.d.ts +1 -5
  68. package/lib/checkbox/checkbox.d.ts +5 -0
  69. package/lib/checkbox/checkbox.template.d.ts +4 -0
  70. package/lib/checkbox/definition.d.ts +1 -0
  71. package/lib/checkbox/index.d.ts +1 -0
  72. package/lib/combobox/combobox.d.ts +14 -0
  73. package/lib/combobox/combobox.template.d.ts +4 -0
  74. package/lib/combobox/definition.d.ts +3 -0
  75. package/lib/combobox/index.d.ts +1 -0
  76. package/lib/components.d.ts +44 -16
  77. package/lib/data-grid/data-grid-cell.d.ts +5 -0
  78. package/lib/data-grid/data-grid-cell.template.d.ts +4 -0
  79. package/lib/data-grid/data-grid-row.d.ts +3 -0
  80. package/lib/data-grid/data-grid-row.template.d.ts +3 -0
  81. package/lib/data-grid/data-grid.d.ts +3 -0
  82. package/lib/data-grid/data-grid.options.d.ts +31 -0
  83. package/lib/data-grid/data-grid.template.d.ts +3 -0
  84. package/lib/data-grid/definition.d.ts +6 -0
  85. package/lib/data-grid/index.d.ts +1 -0
  86. package/lib/dialog/definition.d.ts +1 -0
  87. package/lib/dialog/dialog.d.ts +23 -0
  88. package/lib/dialog/dialog.template.d.ts +4 -0
  89. package/lib/dialog/index.d.ts +1 -0
  90. package/lib/divider/definition.d.ts +1 -0
  91. package/lib/divider/divider.d.ts +3 -0
  92. package/lib/divider/divider.template.d.ts +4 -0
  93. package/lib/divider/index.d.ts +1 -0
  94. package/lib/elevation/definition.d.ts +1 -0
  95. package/lib/elevation/elevation.d.ts +1 -0
  96. package/lib/elevation/index.d.ts +1 -2
  97. package/lib/enums.d.ts +19 -6
  98. package/lib/fab/definition.d.ts +3 -0
  99. package/lib/fab/fab.d.ts +13 -0
  100. package/lib/fab/fab.template.d.ts +4 -0
  101. package/lib/fab/index.d.ts +1 -0
  102. package/lib/focus/definition.d.ts +3 -0
  103. package/lib/focus/index.d.ts +1 -2
  104. package/lib/{sidenav-item/index.d.ts → header/definition.d.ts} +2 -2
  105. package/lib/header/header.d.ts +5 -0
  106. package/lib/header/header.template.d.ts +4 -0
  107. package/lib/header/index.d.ts +1 -0
  108. package/lib/icon/definition.d.ts +3 -0
  109. package/lib/icon/icon.d.ts +5 -6
  110. package/lib/icon/index.d.ts +1 -2
  111. package/lib/layout/definition.d.ts +3 -0
  112. package/lib/layout/index.d.ts +1 -2
  113. package/lib/layout/layout.d.ts +4 -4
  114. package/lib/listbox/definition.d.ts +3 -0
  115. package/lib/listbox/index.d.ts +1 -0
  116. package/lib/listbox/listbox.d.ts +6 -0
  117. package/lib/listbox/listbox.template.d.ts +4 -0
  118. package/lib/menu/definition.d.ts +11 -0
  119. package/lib/menu/index.d.ts +1 -0
  120. package/lib/menu/menu.d.ts +10 -0
  121. package/lib/menu/menu.template.d.ts +3 -0
  122. package/lib/menu-item/definition.d.ts +3 -0
  123. package/lib/menu-item/index.d.ts +1 -0
  124. package/lib/menu-item/menu-item.d.ts +8 -0
  125. package/lib/menu-item/menu-item.template.d.ts +5 -0
  126. package/lib/nav/definition.d.ts +3 -0
  127. package/lib/nav/index.d.ts +1 -0
  128. package/lib/nav/nav.d.ts +3 -0
  129. package/lib/nav/nav.template.d.ts +4 -0
  130. package/lib/nav-disclosure/definition.d.ts +3 -0
  131. package/lib/nav-disclosure/index.d.ts +1 -0
  132. package/lib/nav-disclosure/nav-disclosure.d.ts +10 -0
  133. package/lib/nav-disclosure/nav-disclosure.template.d.ts +4 -0
  134. package/lib/nav-item/definition.d.ts +3 -0
  135. package/lib/nav-item/index.d.ts +1 -0
  136. package/lib/{sidenav-item/sidenav-item.d.ts → nav-item/nav-item.d.ts} +2 -2
  137. package/lib/nav-item/nav-item.template.d.ts +4 -0
  138. package/lib/note/definition.d.ts +3 -0
  139. package/lib/note/index.d.ts +1 -0
  140. package/lib/note/note.d.ts +10 -0
  141. package/lib/{text/text.template.d.ts → note/note.template.d.ts} +2 -2
  142. package/lib/number-field/definition.d.ts +4 -0
  143. package/lib/number-field/index.d.ts +1 -0
  144. package/lib/number-field/number-field.d.ts +14 -0
  145. package/lib/number-field/number-field.template.d.ts +4 -0
  146. package/lib/option/definition.d.ts +3 -0
  147. package/lib/option/index.d.ts +1 -0
  148. package/lib/option/option.d.ts +9 -0
  149. package/lib/option/option.template.d.ts +4 -0
  150. package/lib/popup/definition.d.ts +3 -0
  151. package/lib/popup/index.d.ts +1 -4
  152. package/lib/popup/popup.d.ts +8 -4
  153. package/lib/progress/definition.d.ts +3 -0
  154. package/lib/progress/index.d.ts +1 -2
  155. package/lib/progress/progress.d.ts +1 -1
  156. package/lib/progress-ring/definition.d.ts +3 -0
  157. package/lib/progress-ring/index.d.ts +1 -2
  158. package/lib/progress-ring/progress-ring.d.ts +2 -1
  159. package/lib/radio/definition.d.ts +3 -0
  160. package/lib/radio/index.d.ts +1 -0
  161. package/lib/radio/radio.d.ts +4 -0
  162. package/lib/radio/radio.template.d.ts +4 -0
  163. package/lib/radio-group/definition.d.ts +11 -0
  164. package/lib/radio-group/index.d.ts +1 -0
  165. package/lib/radio-group/radio-group.d.ts +4 -0
  166. package/lib/radio-group/radio-group.template.d.ts +4 -0
  167. package/lib/select/definition.d.ts +3 -0
  168. package/lib/select/index.d.ts +1 -0
  169. package/lib/select/select.d.ts +17 -0
  170. package/lib/select/select.template.d.ts +4 -0
  171. package/lib/side-drawer/definition.d.ts +3 -0
  172. package/lib/side-drawer/index.d.ts +1 -2
  173. package/lib/side-drawer/side-drawer.d.ts +3 -2
  174. package/lib/slider/definition.d.ts +3 -0
  175. package/lib/slider/index.d.ts +1 -0
  176. package/lib/slider/slider.d.ts +4 -0
  177. package/lib/slider/slider.template.d.ts +4 -0
  178. package/lib/switch/definition.d.ts +3 -0
  179. package/lib/switch/index.d.ts +1 -0
  180. package/lib/switch/switch.d.ts +7 -0
  181. package/lib/switch/switch.template.d.ts +4 -0
  182. package/lib/tab/definition.d.ts +3 -0
  183. package/lib/tab/index.d.ts +1 -0
  184. package/lib/tab/tab.d.ts +9 -0
  185. package/lib/tab/tab.template.d.ts +3 -0
  186. package/lib/tab-panel/definition.d.ts +3 -0
  187. package/lib/tab-panel/index.d.ts +1 -0
  188. package/lib/tab-panel/tab-panel.d.ts +3 -0
  189. package/lib/tab-panel/tab-panel.template.d.ts +2 -0
  190. package/lib/tabs/definition.d.ts +3 -0
  191. package/lib/tabs/index.d.ts +1 -0
  192. package/lib/tabs/tabs.d.ts +10 -0
  193. package/lib/tabs/tabs.template.d.ts +2 -0
  194. package/lib/text-anchor/definition.d.ts +3 -0
  195. package/lib/text-anchor/index.d.ts +1 -2
  196. package/lib/text-area/definition.d.ts +3 -0
  197. package/lib/text-area/index.d.ts +1 -0
  198. package/lib/text-area/text-area.d.ts +9 -0
  199. package/lib/text-area/text-area.template.d.ts +4 -0
  200. package/lib/text-field/definition.d.ts +3 -0
  201. package/lib/text-field/index.d.ts +1 -0
  202. package/lib/text-field/text-field.d.ts +14 -0
  203. package/lib/text-field/text-field.template.d.ts +4 -0
  204. package/lib/tooltip/definition.d.ts +3 -0
  205. package/lib/tooltip/index.d.ts +1 -3
  206. package/lib/tooltip/tooltip.d.ts +6 -6
  207. package/listbox/index.js +27 -0
  208. package/menu/index.js +30 -0
  209. package/menu-item/index.js +20 -0
  210. package/nav/index.js +4 -0
  211. package/nav-disclosure/index.js +17 -0
  212. package/nav-item/index.js +22 -0
  213. package/note/index.js +15 -0
  214. package/number-field/index.js +459 -0
  215. package/option/index.js +21 -0
  216. package/package.json +21 -11
  217. package/popup/index.js +21 -2062
  218. package/progress/index.js +6 -98
  219. package/progress-ring/index.js +6 -75
  220. package/radio/index.js +12 -0
  221. package/radio-group/index.js +11 -0
  222. package/select/index.js +34 -0
  223. package/shared/affix.js +2 -8
  224. package/shared/anchor.js +10 -2
  225. package/shared/apply-mixins.js +5 -4
  226. package/shared/aria-global.js +2 -86
  227. package/shared/aria.js +9 -0
  228. package/shared/base-progress.js +5 -0
  229. package/shared/breadcrumb-item.js +1 -1
  230. package/shared/button.js +200 -0
  231. package/shared/calendar-event.js +19 -0
  232. package/shared/definition.js +225 -0
  233. package/shared/definition10.js +99 -0
  234. package/shared/definition11.js +48 -0
  235. package/shared/definition12.js +763 -0
  236. package/shared/definition13.js +111 -0
  237. package/shared/definition14.js +114 -0
  238. package/shared/definition15.js +32 -0
  239. package/shared/definition16.js +172 -0
  240. package/shared/definition17.js +727 -0
  241. package/shared/definition18.js +1531 -0
  242. package/shared/definition19.js +261 -0
  243. package/shared/definition2.js +150 -0
  244. package/shared/definition20.js +221 -0
  245. package/shared/definition21.js +78 -0
  246. package/shared/definition22.js +87 -0
  247. package/shared/definition23.js +58 -0
  248. package/shared/definition24.js +44 -0
  249. package/shared/definition25.js +58 -0
  250. package/shared/definition26.js +348 -0
  251. package/shared/definition27.js +363 -0
  252. package/shared/definition28.js +21 -0
  253. package/shared/definition29.js +75 -0
  254. package/shared/definition3.js +29 -0
  255. package/shared/definition30.js +31 -0
  256. package/shared/definition31.js +49 -0
  257. package/shared/definition32.js +94 -0
  258. package/shared/definition33.js +77 -0
  259. package/shared/definition34.js +45 -0
  260. package/shared/definition35.js +435 -0
  261. package/shared/definition36.js +634 -0
  262. package/shared/definition37.js +86 -0
  263. package/shared/definition38.js +592 -0
  264. package/shared/definition39.js +147 -0
  265. package/shared/definition4.js +19 -0
  266. package/shared/definition40.js +67 -0
  267. package/shared/definition41.js +32 -0
  268. package/shared/definition42.js +440 -0
  269. package/shared/definition43.js +282 -0
  270. package/shared/definition44.js +119 -0
  271. package/shared/definition45.js +77 -0
  272. package/shared/definition5.js +38 -0
  273. package/shared/definition6.js +60 -0
  274. package/shared/definition7.js +45 -0
  275. package/shared/definition8.js +113 -0
  276. package/shared/definition9.js +107 -0
  277. package/shared/design-system/index.d.ts +1 -1
  278. package/shared/dialog-polyfill.esm.js +858 -0
  279. package/shared/direction.js +20 -0
  280. package/shared/dom.js +8 -0
  281. package/shared/enums.js +70 -0
  282. package/shared/es.object.assign.js +2 -3
  283. package/shared/es.regexp.to-string.js +59 -0
  284. package/shared/focus.js +5 -0
  285. package/shared/focus2.js +11 -0
  286. package/shared/form-associated.js +466 -0
  287. package/shared/form-elements.js +127 -0
  288. package/shared/icon.js +538 -567
  289. package/shared/index.js +1664 -83
  290. package/shared/key-codes.js +100 -0
  291. package/shared/listbox.js +995 -0
  292. package/shared/numbers.js +34 -0
  293. package/shared/patterns/affix.d.ts +1 -1
  294. package/shared/patterns/focus.d.ts +3 -0
  295. package/shared/patterns/form-elements/form-elements.d.ts +43 -0
  296. package/shared/patterns/form-elements/index.d.ts +1 -0
  297. package/shared/patterns/index.d.ts +2 -0
  298. package/shared/radio.js +127 -0
  299. package/shared/ref.js +41 -0
  300. package/shared/repeat.js +764 -0
  301. package/shared/select.options.js +10 -0
  302. package/shared/slotted.js +1 -1
  303. package/shared/start-end.js +50 -0
  304. package/shared/string-trim.js +40 -0
  305. package/shared/strings.js +9 -0
  306. package/shared/text-anchor.js +0 -2
  307. package/shared/text-anchor.template.js +6 -5
  308. package/shared/text-field.js +3 -0
  309. package/shared/text-field2.js +225 -0
  310. package/shared/to-string.js +51 -0
  311. package/side-drawer/index.js +5 -81
  312. package/slider/index.js +17 -0
  313. package/styles/core/all.css +83 -0
  314. package/styles/core/theme.css +11 -0
  315. package/styles/core/typography.css +77 -0
  316. package/styles/tokens/theme-dark.css +228 -0
  317. package/styles/tokens/theme-light.css +228 -0
  318. package/switch/index.js +18 -0
  319. package/tab/index.js +16 -0
  320. package/tab-panel/index.js +4 -0
  321. package/tabs/index.js +24 -0
  322. package/text-anchor/index.js +11 -6
  323. package/text-area/index.js +23 -0
  324. package/text-field/index.js +24 -0
  325. package/tooltip/index.js +18 -55
  326. package/vivid.api.json +3695 -0
  327. package/lib/text/index.d.ts +0 -2
  328. package/lib/text/text.d.ts +0 -10
  329. package/shared/index2.js +0 -21
  330. package/shared/object-set-prototype-of.js +0 -1009
  331. package/shared/style-inject.es.js +0 -28
  332. package/shared/web.dom-collections.iterator.js +0 -473
  333. package/sidenav-item/index.js +0 -39
  334. package/styles/fonts/spezia.css +0 -23
  335. package/styles/themes/dark.css +0 -205
  336. package/styles/themes/light.css +0 -205
  337. package/text/index.js +0 -46
package/button/index.js CHANGED
@@ -1,754 +1,22 @@
1
- import '../icon/index.js';
2
- import { F as Focus } from '../shared/index2.js';
3
- import { e as emptyArray, D as DOM, a as attr, o as observable, F as FoundationElement, _ as __decorate, b as __metadata, h as html, d as designSystem } from '../shared/index.js';
4
- import { A as AffixIconWithTrailing, a as affixIconTemplateFactory } from '../shared/affix.js';
5
- import { a as applyMixins } from '../shared/apply-mixins.js';
6
- import { A as ARIAGlobalStatesAndProperties, S as StartEnd, r as ref } from '../shared/aria-global.js';
7
- import { s as styleInject } from '../shared/style-inject.es.js';
8
- import { c as classNames } from '../shared/class-names.js';
1
+ import { r as registerButton } from '../shared/definition9.js';
2
+ import '../shared/index.js';
3
+ import '../shared/definition3.js';
9
4
  import '../shared/icon.js';
10
- import '../shared/object-set-prototype-of.js';
5
+ import '../shared/to-string.js';
6
+ import '../shared/string-trim.js';
11
7
  import '../shared/_has.js';
8
+ import '../shared/class-names.js';
12
9
  import '../shared/when.js';
13
- import '../shared/web.dom-collections.iterator.js';
14
-
15
- /**
16
- * Key Code values
17
- * @deprecated - KeyCodes are deprecated, use individual string key exports
18
- */
19
- var KeyCodes;
20
- (function (KeyCodes) {
21
- KeyCodes[KeyCodes["alt"] = 18] = "alt";
22
- KeyCodes[KeyCodes["arrowDown"] = 40] = "arrowDown";
23
- KeyCodes[KeyCodes["arrowLeft"] = 37] = "arrowLeft";
24
- KeyCodes[KeyCodes["arrowRight"] = 39] = "arrowRight";
25
- KeyCodes[KeyCodes["arrowUp"] = 38] = "arrowUp";
26
- KeyCodes[KeyCodes["back"] = 8] = "back";
27
- KeyCodes[KeyCodes["backSlash"] = 220] = "backSlash";
28
- KeyCodes[KeyCodes["break"] = 19] = "break";
29
- KeyCodes[KeyCodes["capsLock"] = 20] = "capsLock";
30
- KeyCodes[KeyCodes["closeBracket"] = 221] = "closeBracket";
31
- KeyCodes[KeyCodes["colon"] = 186] = "colon";
32
- KeyCodes[KeyCodes["colon2"] = 59] = "colon2";
33
- KeyCodes[KeyCodes["comma"] = 188] = "comma";
34
- KeyCodes[KeyCodes["ctrl"] = 17] = "ctrl";
35
- KeyCodes[KeyCodes["delete"] = 46] = "delete";
36
- KeyCodes[KeyCodes["end"] = 35] = "end";
37
- KeyCodes[KeyCodes["enter"] = 13] = "enter";
38
- KeyCodes[KeyCodes["equals"] = 187] = "equals";
39
- KeyCodes[KeyCodes["equals2"] = 61] = "equals2";
40
- KeyCodes[KeyCodes["equals3"] = 107] = "equals3";
41
- KeyCodes[KeyCodes["escape"] = 27] = "escape";
42
- KeyCodes[KeyCodes["forwardSlash"] = 191] = "forwardSlash";
43
- KeyCodes[KeyCodes["function1"] = 112] = "function1";
44
- KeyCodes[KeyCodes["function10"] = 121] = "function10";
45
- KeyCodes[KeyCodes["function11"] = 122] = "function11";
46
- KeyCodes[KeyCodes["function12"] = 123] = "function12";
47
- KeyCodes[KeyCodes["function2"] = 113] = "function2";
48
- KeyCodes[KeyCodes["function3"] = 114] = "function3";
49
- KeyCodes[KeyCodes["function4"] = 115] = "function4";
50
- KeyCodes[KeyCodes["function5"] = 116] = "function5";
51
- KeyCodes[KeyCodes["function6"] = 117] = "function6";
52
- KeyCodes[KeyCodes["function7"] = 118] = "function7";
53
- KeyCodes[KeyCodes["function8"] = 119] = "function8";
54
- KeyCodes[KeyCodes["function9"] = 120] = "function9";
55
- KeyCodes[KeyCodes["home"] = 36] = "home";
56
- KeyCodes[KeyCodes["insert"] = 45] = "insert";
57
- KeyCodes[KeyCodes["menu"] = 93] = "menu";
58
- KeyCodes[KeyCodes["minus"] = 189] = "minus";
59
- KeyCodes[KeyCodes["minus2"] = 109] = "minus2";
60
- KeyCodes[KeyCodes["numLock"] = 144] = "numLock";
61
- KeyCodes[KeyCodes["numPad0"] = 96] = "numPad0";
62
- KeyCodes[KeyCodes["numPad1"] = 97] = "numPad1";
63
- KeyCodes[KeyCodes["numPad2"] = 98] = "numPad2";
64
- KeyCodes[KeyCodes["numPad3"] = 99] = "numPad3";
65
- KeyCodes[KeyCodes["numPad4"] = 100] = "numPad4";
66
- KeyCodes[KeyCodes["numPad5"] = 101] = "numPad5";
67
- KeyCodes[KeyCodes["numPad6"] = 102] = "numPad6";
68
- KeyCodes[KeyCodes["numPad7"] = 103] = "numPad7";
69
- KeyCodes[KeyCodes["numPad8"] = 104] = "numPad8";
70
- KeyCodes[KeyCodes["numPad9"] = 105] = "numPad9";
71
- KeyCodes[KeyCodes["numPadDivide"] = 111] = "numPadDivide";
72
- KeyCodes[KeyCodes["numPadDot"] = 110] = "numPadDot";
73
- KeyCodes[KeyCodes["numPadMinus"] = 109] = "numPadMinus";
74
- KeyCodes[KeyCodes["numPadMultiply"] = 106] = "numPadMultiply";
75
- KeyCodes[KeyCodes["numPadPlus"] = 107] = "numPadPlus";
76
- KeyCodes[KeyCodes["openBracket"] = 219] = "openBracket";
77
- KeyCodes[KeyCodes["pageDown"] = 34] = "pageDown";
78
- KeyCodes[KeyCodes["pageUp"] = 33] = "pageUp";
79
- KeyCodes[KeyCodes["period"] = 190] = "period";
80
- KeyCodes[KeyCodes["print"] = 44] = "print";
81
- KeyCodes[KeyCodes["quote"] = 222] = "quote";
82
- KeyCodes[KeyCodes["scrollLock"] = 145] = "scrollLock";
83
- KeyCodes[KeyCodes["shift"] = 16] = "shift";
84
- KeyCodes[KeyCodes["space"] = 32] = "space";
85
- KeyCodes[KeyCodes["tab"] = 9] = "tab";
86
- KeyCodes[KeyCodes["tilde"] = 192] = "tilde";
87
- KeyCodes[KeyCodes["windowsLeft"] = 91] = "windowsLeft";
88
- KeyCodes[KeyCodes["windowsOpera"] = 219] = "windowsOpera";
89
- KeyCodes[KeyCodes["windowsRight"] = 92] = "windowsRight";
90
- })(KeyCodes || (KeyCodes = {}));
91
- const keyEnter = "Enter";
92
-
93
- const proxySlotName = "form-associated-proxy";
94
- const ElementInternalsKey = "ElementInternals";
95
- /**
96
- * @alpha
97
- */
98
- const supportsElementInternals = ElementInternalsKey in window &&
99
- "setFormValue" in window[ElementInternalsKey].prototype;
100
- const InternalsMap = new WeakMap();
101
- /**
102
- * Base function for providing Custom Element Form Association.
103
- *
104
- * @alpha
105
- */
106
- function FormAssociated(BaseCtor) {
107
- const C = class extends BaseCtor {
108
- constructor(...args) {
109
- super(...args);
110
- /**
111
- * Track whether the value has been changed from the initial value
112
- */
113
- this.dirtyValue = false;
114
- /**
115
- * Sets the element's disabled state. A disabled element will not be included during form submission.
116
- *
117
- * @remarks
118
- * HTML Attribute: disabled
119
- */
120
- this.disabled = false;
121
- /**
122
- * These are events that are still fired by the proxy
123
- * element based on user / programmatic interaction.
124
- *
125
- * The proxy implementation should be transparent to
126
- * the app author, so block these events from emitting.
127
- */
128
- this.proxyEventsToBlock = ["change", "click"];
129
- this.proxyInitialized = false;
130
- this.required = false;
131
- this.initialValue = this.initialValue || "";
132
- if (!this.elementInternals) {
133
- // When elementInternals is not supported, formResetCallback is
134
- // bound to an event listener, so ensure the handler's `this`
135
- // context is correct.
136
- this.formResetCallback = this.formResetCallback.bind(this);
137
- }
138
- }
139
- /**
140
- * Must evaluate to true to enable elementInternals.
141
- * Feature detects API support and resolve respectively
142
- *
143
- * @internal
144
- */
145
- static get formAssociated() {
146
- return supportsElementInternals;
147
- }
148
- /**
149
- * Returns the validity state of the element
150
- *
151
- * @alpha
152
- */
153
- get validity() {
154
- return this.elementInternals
155
- ? this.elementInternals.validity
156
- : this.proxy.validity;
157
- }
158
- /**
159
- * Retrieve a reference to the associated form.
160
- * Returns null if not associated to any form.
161
- *
162
- * @alpha
163
- */
164
- get form() {
165
- return this.elementInternals ? this.elementInternals.form : this.proxy.form;
166
- }
167
- /**
168
- * Retrieve the localized validation message,
169
- * or custom validation message if set.
170
- *
171
- * @alpha
172
- */
173
- get validationMessage() {
174
- return this.elementInternals
175
- ? this.elementInternals.validationMessage
176
- : this.proxy.validationMessage;
177
- }
178
- /**
179
- * Whether the element will be validated when the
180
- * form is submitted
181
- */
182
- get willValidate() {
183
- return this.elementInternals
184
- ? this.elementInternals.willValidate
185
- : this.proxy.willValidate;
186
- }
187
- /**
188
- * A reference to all associated label elements
189
- */
190
- get labels() {
191
- if (this.elementInternals) {
192
- return Object.freeze(Array.from(this.elementInternals.labels));
193
- }
194
- else if (this.proxy instanceof HTMLElement &&
195
- this.proxy.ownerDocument &&
196
- this.id) {
197
- // Labels associated by wrapping the element: <label><custom-element></custom-element></label>
198
- const parentLabels = this.proxy.labels;
199
- // Labels associated using the `for` attribute
200
- const forLabels = Array.from(this.proxy.getRootNode().querySelectorAll(`[for='${this.id}']`));
201
- const labels = parentLabels
202
- ? forLabels.concat(Array.from(parentLabels))
203
- : forLabels;
204
- return Object.freeze(labels);
205
- }
206
- else {
207
- return emptyArray;
208
- }
209
- }
210
- /**
211
- * Invoked when the `value` property changes
212
- * @param previous - the previous value
213
- * @param next - the new value
214
- *
215
- * @remarks
216
- * If elements extending `FormAssociated` implement a `valueChanged` method
217
- * They must be sure to invoke `super.valueChanged(previous, next)` to ensure
218
- * proper functioning of `FormAssociated`
219
- */
220
- valueChanged(previous, next) {
221
- this.dirtyValue = true;
222
- if (this.proxy instanceof HTMLElement) {
223
- this.proxy.value = this.value;
224
- }
225
- this.currentValue = this.value;
226
- this.setFormValue(this.value);
227
- this.validate();
228
- }
229
- currentValueChanged() {
230
- this.value = this.currentValue;
231
- }
232
- /**
233
- * Invoked when the `initialValue` property changes
234
- *
235
- * @param previous - the previous value
236
- * @param next - the new value
237
- *
238
- * @remarks
239
- * If elements extending `FormAssociated` implement a `initialValueChanged` method
240
- * They must be sure to invoke `super.initialValueChanged(previous, next)` to ensure
241
- * proper functioning of `FormAssociated`
242
- */
243
- initialValueChanged(previous, next) {
244
- // If the value is clean and the component is connected to the DOM
245
- // then set value equal to the attribute value.
246
- if (!this.dirtyValue) {
247
- this.value = this.initialValue;
248
- this.dirtyValue = false;
249
- }
250
- }
251
- /**
252
- * Invoked when the `disabled` property changes
253
- *
254
- * @param previous - the previous value
255
- * @param next - the new value
256
- *
257
- * @remarks
258
- * If elements extending `FormAssociated` implement a `disabledChanged` method
259
- * They must be sure to invoke `super.disabledChanged(previous, next)` to ensure
260
- * proper functioning of `FormAssociated`
261
- */
262
- disabledChanged(previous, next) {
263
- if (this.proxy instanceof HTMLElement) {
264
- this.proxy.disabled = this.disabled;
265
- }
266
- DOM.queueUpdate(() => this.classList.toggle("disabled", this.disabled));
267
- }
268
- /**
269
- * Invoked when the `name` property changes
270
- *
271
- * @param previous - the previous value
272
- * @param next - the new value
273
- *
274
- * @remarks
275
- * If elements extending `FormAssociated` implement a `nameChanged` method
276
- * They must be sure to invoke `super.nameChanged(previous, next)` to ensure
277
- * proper functioning of `FormAssociated`
278
- */
279
- nameChanged(previous, next) {
280
- if (this.proxy instanceof HTMLElement) {
281
- this.proxy.name = this.name;
282
- }
283
- }
284
- /**
285
- * Invoked when the `required` property changes
286
- *
287
- * @param previous - the previous value
288
- * @param next - the new value
289
- *
290
- * @remarks
291
- * If elements extending `FormAssociated` implement a `requiredChanged` method
292
- * They must be sure to invoke `super.requiredChanged(previous, next)` to ensure
293
- * proper functioning of `FormAssociated`
294
- */
295
- requiredChanged(prev, next) {
296
- if (this.proxy instanceof HTMLElement) {
297
- this.proxy.required = this.required;
298
- }
299
- DOM.queueUpdate(() => this.classList.toggle("required", this.required));
300
- this.validate();
301
- }
302
- /**
303
- * The element internals object. Will only exist
304
- * in browsers supporting the attachInternals API
305
- */
306
- get elementInternals() {
307
- if (!supportsElementInternals) {
308
- return null;
309
- }
310
- let internals = InternalsMap.get(this);
311
- if (!internals) {
312
- internals = this.attachInternals();
313
- InternalsMap.set(this, internals);
314
- }
315
- return internals;
316
- }
317
- /**
318
- * @internal
319
- */
320
- connectedCallback() {
321
- super.connectedCallback();
322
- this.addEventListener("keypress", this._keypressHandler);
323
- if (!this.value) {
324
- this.value = this.initialValue;
325
- this.dirtyValue = false;
326
- }
327
- if (!this.elementInternals) {
328
- this.attachProxy();
329
- if (this.form) {
330
- this.form.addEventListener("reset", this.formResetCallback);
331
- }
332
- }
333
- }
334
- /**
335
- * @internal
336
- */
337
- disconnectedCallback() {
338
- this.proxyEventsToBlock.forEach(name => this.proxy.removeEventListener(name, this.stopPropagation));
339
- if (!this.elementInternals && this.form) {
340
- this.form.removeEventListener("reset", this.formResetCallback);
341
- }
342
- }
343
- /**
344
- * Return the current validity of the element.
345
- */
346
- checkValidity() {
347
- return this.elementInternals
348
- ? this.elementInternals.checkValidity()
349
- : this.proxy.checkValidity();
350
- }
351
- /**
352
- * Return the current validity of the element.
353
- * If false, fires an invalid event at the element.
354
- */
355
- reportValidity() {
356
- return this.elementInternals
357
- ? this.elementInternals.reportValidity()
358
- : this.proxy.reportValidity();
359
- }
360
- /**
361
- * Set the validity of the control. In cases when the elementInternals object is not
362
- * available (and the proxy element is used to report validity), this function will
363
- * do nothing unless a message is provided, at which point the setCustomValidity method
364
- * of the proxy element will be invoked with the provided message.
365
- * @param flags - Validity flags
366
- * @param message - Optional message to supply
367
- * @param anchor - Optional element used by UA to display an interactive validation UI
368
- */
369
- setValidity(flags, message, anchor) {
370
- if (this.elementInternals) {
371
- this.elementInternals.setValidity(flags, message, anchor);
372
- }
373
- else if (typeof message === "string") {
374
- this.proxy.setCustomValidity(message);
375
- }
376
- }
377
- /**
378
- * Invoked when a connected component's form or fieldset has its disabled
379
- * state changed.
380
- * @param disabled - the disabled value of the form / fieldset
381
- */
382
- formDisabledCallback(disabled) {
383
- this.disabled = disabled;
384
- }
385
- formResetCallback() {
386
- this.value = this.initialValue;
387
- this.dirtyValue = false;
388
- }
389
- /**
390
- * Attach the proxy element to the DOM
391
- */
392
- attachProxy() {
393
- var _a;
394
- if (!this.proxyInitialized) {
395
- this.proxyInitialized = true;
396
- this.proxy.style.display = "none";
397
- this.proxyEventsToBlock.forEach(name => this.proxy.addEventListener(name, this.stopPropagation));
398
- // These are typically mapped to the proxy during
399
- // property change callbacks, but during initialization
400
- // on the initial call of the callback, the proxy is
401
- // still undefined. We should find a better way to address this.
402
- this.proxy.disabled = this.disabled;
403
- this.proxy.required = this.required;
404
- if (typeof this.name === "string") {
405
- this.proxy.name = this.name;
406
- }
407
- if (typeof this.value === "string") {
408
- this.proxy.value = this.value;
409
- }
410
- this.proxy.setAttribute("slot", proxySlotName);
411
- this.proxySlot = document.createElement("slot");
412
- this.proxySlot.setAttribute("name", proxySlotName);
413
- }
414
- (_a = this.shadowRoot) === null || _a === void 0 ? void 0 : _a.appendChild(this.proxySlot);
415
- this.appendChild(this.proxy);
416
- }
417
- /**
418
- * Detach the proxy element from the DOM
419
- */
420
- detachProxy() {
421
- var _a;
422
- this.removeChild(this.proxy);
423
- (_a = this.shadowRoot) === null || _a === void 0 ? void 0 : _a.removeChild(this.proxySlot);
424
- }
425
- /**
426
- * Sets the validity of the custom element. By default this uses the proxy element to determine
427
- * validity, but this can be extended or replaced in implementation.
428
- */
429
- validate() {
430
- if (this.proxy instanceof HTMLElement) {
431
- this.setValidity(this.proxy.validity, this.proxy.validationMessage);
432
- }
433
- }
434
- /**
435
- * Associates the provided value (and optional state) with the parent form.
436
- * @param value - The value to set
437
- * @param state - The state object provided to during session restores and when autofilling.
438
- */
439
- setFormValue(value, state) {
440
- if (this.elementInternals) {
441
- this.elementInternals.setFormValue(value, state || value);
442
- }
443
- }
444
- _keypressHandler(e) {
445
- switch (e.key) {
446
- case keyEnter:
447
- if (this.form instanceof HTMLFormElement) {
448
- // Implicit submission
449
- const defaultButton = this.form.querySelector("[type=submit]");
450
- defaultButton === null || defaultButton === void 0 ? void 0 : defaultButton.click();
451
- }
452
- break;
453
- }
454
- }
455
- /**
456
- * Used to stop propagation of proxy element events
457
- * @param e - Event object
458
- */
459
- stopPropagation(e) {
460
- e.stopPropagation();
461
- }
462
- };
463
- attr({ mode: "boolean" })(C.prototype, "disabled");
464
- attr({ mode: "fromView", attribute: "value" })(C.prototype, "initialValue");
465
- attr({ attribute: "current-value" })(C.prototype, "currentValue");
466
- attr(C.prototype, "name");
467
- attr({ mode: "boolean" })(C.prototype, "required");
468
- observable(C.prototype, "value");
469
- return C;
470
- }
471
-
472
- class _Button extends FoundationElement {
473
- }
474
- /**
475
- * A form-associated base class for the {@link @microsoft/fast-foundation#(Button:class)} component.
476
- *
477
- * @internal
478
- */
479
- class FormAssociatedButton extends FormAssociated(_Button) {
480
- constructor() {
481
- super(...arguments);
482
- this.proxy = document.createElement("input");
483
- }
484
- }
485
-
486
- /**
487
- * A Button Custom HTML Element.
488
- * Based largely on the {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button | <button> element }.
489
- *
490
- * @public
491
- */
492
- class Button$1 extends FormAssociatedButton {
493
- constructor() {
494
- super(...arguments);
495
- /**
496
- * Prevent events to propagate if disabled and has no slotted content wrapped in HTML elements
497
- * @internal
498
- */
499
- this.handleClick = (e) => {
500
- var _a;
501
- if (this.disabled && ((_a = this.defaultSlottedContent) === null || _a === void 0 ? void 0 : _a.length) <= 1) {
502
- e.stopPropagation();
503
- }
504
- };
505
- /**
506
- * Submits the parent form
507
- */
508
- this.handleSubmission = () => {
509
- if (!this.form) {
510
- return;
511
- }
512
- const attached = this.proxy.isConnected;
513
- if (!attached) {
514
- this.attachProxy();
515
- }
516
- // Browser support for requestSubmit is not comprehensive
517
- // so click the proxy if it isn't supported
518
- typeof this.form.requestSubmit === "function"
519
- ? this.form.requestSubmit(this.proxy)
520
- : this.proxy.click();
521
- if (!attached) {
522
- this.detachProxy();
523
- }
524
- };
525
- /**
526
- * Resets the parent form
527
- */
528
- this.handleFormReset = () => {
529
- var _a;
530
- (_a = this.form) === null || _a === void 0 ? void 0 : _a.reset();
531
- };
532
- /**
533
- * Overrides the focus call for where delegatesFocus is unsupported.
534
- * This check works for Chrome, Edge Chromium, FireFox, and Safari
535
- * Relevant PR on the Firefox browser: https://phabricator.services.mozilla.com/D123858
536
- */
537
- this.handleUnsupportedDelegatesFocus = () => {
538
- var _a;
539
- // Check to see if delegatesFocus is supported
540
- if (window.ShadowRoot &&
541
- !window.ShadowRoot.prototype.hasOwnProperty("delegatesFocus") && ((_a = this.$fastController.definition.shadowOptions) === null || _a === void 0 ? void 0 : _a.delegatesFocus)) {
542
- this.focus = () => {
543
- this.control.focus();
544
- };
545
- }
546
- };
547
- }
548
- formactionChanged() {
549
- if (this.proxy instanceof HTMLInputElement) {
550
- this.proxy.formAction = this.formaction;
551
- }
552
- }
553
- formenctypeChanged() {
554
- if (this.proxy instanceof HTMLInputElement) {
555
- this.proxy.formEnctype = this.formenctype;
556
- }
557
- }
558
- formmethodChanged() {
559
- if (this.proxy instanceof HTMLInputElement) {
560
- this.proxy.formMethod = this.formmethod;
561
- }
562
- }
563
- formnovalidateChanged() {
564
- if (this.proxy instanceof HTMLInputElement) {
565
- this.proxy.formNoValidate = this.formnovalidate;
566
- }
567
- }
568
- formtargetChanged() {
569
- if (this.proxy instanceof HTMLInputElement) {
570
- this.proxy.formTarget = this.formtarget;
571
- }
572
- }
573
- typeChanged(previous, next) {
574
- if (this.proxy instanceof HTMLInputElement) {
575
- this.proxy.type = this.type;
576
- }
577
- next === "submit" && this.addEventListener("click", this.handleSubmission);
578
- previous === "submit" && this.removeEventListener("click", this.handleSubmission);
579
- next === "reset" && this.addEventListener("click", this.handleFormReset);
580
- previous === "reset" && this.removeEventListener("click", this.handleFormReset);
581
- }
582
- /**
583
- * @internal
584
- */
585
- connectedCallback() {
586
- var _a;
587
- super.connectedCallback();
588
- this.proxy.setAttribute("type", this.type);
589
- this.handleUnsupportedDelegatesFocus();
590
- const elements = Array.from((_a = this.control) === null || _a === void 0 ? void 0 : _a.children);
591
- if (elements) {
592
- elements.forEach((span) => {
593
- span.addEventListener("click", this.handleClick);
594
- });
595
- }
596
- }
597
- /**
598
- * @internal
599
- */
600
- disconnectedCallback() {
601
- var _a;
602
- super.disconnectedCallback();
603
- const elements = Array.from((_a = this.control) === null || _a === void 0 ? void 0 : _a.children);
604
- if (elements) {
605
- elements.forEach((span) => {
606
- span.removeEventListener("click", this.handleClick);
607
- });
608
- }
609
- }
610
- }
611
- __decorate([
612
- attr({ mode: "boolean" })
613
- ], Button$1.prototype, "autofocus", void 0);
614
- __decorate([
615
- attr({ attribute: "form" })
616
- ], Button$1.prototype, "formId", void 0);
617
- __decorate([
618
- attr
619
- ], Button$1.prototype, "formaction", void 0);
620
- __decorate([
621
- attr
622
- ], Button$1.prototype, "formenctype", void 0);
623
- __decorate([
624
- attr
625
- ], Button$1.prototype, "formmethod", void 0);
626
- __decorate([
627
- attr({ mode: "boolean" })
628
- ], Button$1.prototype, "formnovalidate", void 0);
629
- __decorate([
630
- attr
631
- ], Button$1.prototype, "formtarget", void 0);
632
- __decorate([
633
- attr
634
- ], Button$1.prototype, "type", void 0);
635
- __decorate([
636
- observable
637
- ], Button$1.prototype, "defaultSlottedContent", void 0);
638
- /**
639
- * Includes ARIA states and properties relating to the ARIA button role
640
- *
641
- * @public
642
- */
643
- class DelegatesARIAButton {
644
- }
645
- __decorate([
646
- attr({ attribute: "aria-expanded" })
647
- ], DelegatesARIAButton.prototype, "ariaExpanded", void 0);
648
- __decorate([
649
- attr({ attribute: "aria-pressed" })
650
- ], DelegatesARIAButton.prototype, "ariaPressed", void 0);
651
- applyMixins(DelegatesARIAButton, ARIAGlobalStatesAndProperties);
652
- applyMixins(Button$1, StartEnd, DelegatesARIAButton);
653
-
654
- class Button extends Button$1 {}
655
-
656
- __decorate([attr, __metadata("design:type", String)], Button.prototype, "connotation", void 0);
657
-
658
- __decorate([attr, __metadata("design:type", String)], Button.prototype, "shape", void 0);
659
-
660
- __decorate([attr, __metadata("design:type", String)], Button.prototype, "appearance", void 0);
661
-
662
- __decorate([attr, __metadata("design:type", String)], Button.prototype, "size", void 0);
663
-
664
- __decorate([attr, __metadata("design:type", String)], Button.prototype, "label", void 0);
665
-
666
- applyMixins(Button, AffixIconWithTrailing);
667
-
668
- var css_248z = "/*\n Do not edit directly\n Generated on Wed, 27 Apr 2022 11:58:36 GMT\n*/\n:host {\n outline: 0 none;\n}\n\n.control {\n position: relative;\n display: inline-flex;\n box-sizing: border-box;\n align-items: center;\n border: 0 none;\n background-color: var(--_appearance-color-fill);\n block-size: var(--button-block-size);\n box-shadow: inset 0 0 0 1px var(--_appearance-color-outline);\n color: var(--_appearance-color-text);\n outline: 0 none;\n vertical-align: middle;\n}\n.control:not(.connotation-cta):not(.connotation-success):not(.connotation-alert) {\n --connotation: var(--vvd-color-primary);\n --on-connotation: var(--vvd-color-on-primary);\n --connotation-basis: var(--vvd-color-neutral);\n --connotation-basis-increment: var(--vvd-color-neutral-90);\n --connotation-contrast: var(--vvd-color-neutral-90);\n --connotation-fierce: var(--vvd-color-neutral-80);\n --connotation-firm: var(--vvd-color-primary);\n --connotation-soft: var(--vvd-color-neutral-20);\n --connotation-pale: var(--vvd-color-neutral-10);\n}\n\n.control.connotation-cta {\n --connotation: var(--vvd-color-cta);\n --on-connotation: var(--vvd-color-on-cta);\n --connotation-basis: var(--vvd-color-cta);\n --connotation-basis-increment: var(--vvd-color-cta-70);\n --connotation-contrast: var(--vvd-color-cta-90);\n --connotation-fierce: var(--vvd-color-cta-80);\n --connotation-firm: var(--vvd-color-cta-70);\n --connotation-soft: var(--vvd-color-cta-20);\n --connotation-pale: var(--vvd-color-cta-10);\n}\n\n.control.connotation-success {\n --connotation: var(--vvd-color-success);\n --on-connotation: var(--vvd-color-on-success);\n --connotation-basis: var(--vvd-color-success);\n --connotation-basis-increment: var(--vvd-color-success-70);\n --connotation-contrast: var(--vvd-color-success-90);\n --connotation-fierce: var(--vvd-color-success-80);\n --connotation-firm: var(--vvd-color-success-70);\n --connotation-soft: var(--vvd-color-success-20);\n --connotation-pale: var(--vvd-color-success-10);\n}\n\n.control.connotation-alert {\n --connotation: var(--vvd-color-alert);\n --on-connotation: var(--vvd-color-on-alert);\n --connotation-basis: var(--vvd-color-alert);\n --connotation-basis-increment: var(--vvd-color-alert-70);\n --connotation-contrast: var(--vvd-color-alert-90);\n --connotation-fierce: var(--vvd-color-alert-80);\n --connotation-firm: var(--vvd-color-alert-70);\n --connotation-soft: var(--vvd-color-alert-20);\n --connotation-pale: var(--vvd-color-alert-10);\n}\n\n.control.appearance-filled {\n --_appearance-color-text: var(--on-connotation);\n --_appearance-color-fill: var(--connotation);\n --_appearance-color-outline: transaprent;\n}\n.control.appearance-outlined {\n --_appearance-color-text: var(--connotation-firm);\n --_appearance-color-fill: transaprent;\n --_appearance-color-outline: var(--connotation-firm);\n}\n.control {\n --_appearance-color-text: var(--connotation);\n --_appearance-color-fill: transaprent;\n --_appearance-color-outline: transaprent;\n}\n.control:hover:not(:disabled, .disabled).appearance-filled, .control.hovered:not(:disabled, .disabled).appearance-filled {\n --_appearance-color-text: var(--on-connotation);\n --_appearance-color-fill: var(--connotation-basis-increment);\n --_appearance-color-outline: transaprent;\n}\n.control:hover:not(:disabled, .disabled).appearance-outlined, .control.hovered:not(:disabled, .disabled).appearance-outlined {\n --_appearance-color-text: var(--connotation-firm);\n --_appearance-color-fill: var(--connotation-pale);\n --_appearance-color-outline: var(--connotation-firm);\n}\n.control:hover:not(:disabled, .disabled), .control.hovered:not(:disabled, .disabled) {\n --_appearance-color-text: var(--connotation);\n --_appearance-color-fill: var(--connotation-pale);\n --_appearance-color-outline: transaprent;\n}\n.control:disabled.appearance-filled, .control.disabled.appearance-filled {\n --_appearance-color-text: var(--vvd-color-neutral-50);\n --_appearance-color-fill: var(--vvd-color-neutral-30);\n --_appearance-color-outline: transaprent;\n}\n.control:disabled.appearance-outlined, .control.disabled.appearance-outlined {\n --_appearance-color-text: var(--vvd-color-neutral-50);\n --_appearance-color-fill: transaprent;\n --_appearance-color-outline: var(--vvd-color-neutral-50);\n}\n.control:disabled, .control.disabled {\n --_appearance-color-text: var(--vvd-color-neutral-50);\n --_appearance-color-fill: transaprent;\n --_appearance-color-outline: transaprent;\n}\n.control:active:not(:disabled, .disabled).appearance-filled, .control.active:not(:disabled, .disabled).appearance-filled {\n --_appearance-color-text: var(--on-connotation);\n --_appearance-color-fill: var(--connotation-fierce);\n --_appearance-color-outline: transaprent;\n}\n.control:active:not(:disabled, .disabled).appearance-outlined, .control.active:not(:disabled, .disabled).appearance-outlined {\n --_appearance-color-text: var(--connotation-firm);\n --_appearance-color-fill: var(--connotation-soft);\n --_appearance-color-outline: var(--connotation-firm);\n}\n.control:active:not(:disabled, .disabled), .control.active:not(:disabled, .disabled) {\n --_appearance-color-text: var(--connotation);\n --_appearance-color-fill: var(--connotation-soft);\n --_appearance-color-outline: transaprent;\n}\n.control:not(:disabled) {\n cursor: pointer;\n}\n.control:disabled {\n cursor: not-allowed;\n}\n.control.icon-only {\n padding-inline: 0;\n place-content: center;\n}\n@supports (aspect-ratio: 1) {\n .control.icon-only {\n aspect-ratio: 1;\n }\n}\n@supports not (aspect-ratio: 1) {\n .control.icon-only {\n inline-size: var(--button-block-size);\n }\n}\n\n/* Size */\n.control.size-base-small {\n --button-block-size: 32px;\n font: 600 ultra-condensed 12px / 16px SpeziaWebVariable;\n letter-spacing: 0px;\n text-decoration: none;\n text-transform: none;\n}\n.control.size-base-small:not(.icon-only) {\n --button-icon-gap: 8px;\n padding-inline: 12px;\n}\n.control.size-base-small .icon {\n font-size: 16px;\n}\n\n.control.size-base-large {\n --button-block-size: 48px;\n font: 600 ultra-condensed 16px / 24px SpeziaWebVariable;\n letter-spacing: 0px;\n text-decoration: none;\n text-transform: none;\n}\n.control.size-base-large:not(.icon-only) {\n --button-icon-gap: 10px;\n padding-inline: 20px;\n}\n.control.size-base-large .icon {\n font-size: 24px;\n}\n\n.control:not(.size-base-small):not(.size-base-large) {\n --button-block-size: 40px;\n font: 600 ultra-condensed 14px / 100% SpeziaWebVariable;\n letter-spacing: 0px;\n text-decoration: none;\n text-transform: none;\n}\n.control:not(.size-base-small):not(.size-base-large):not(.icon-only) {\n --button-icon-gap: 8px;\n padding-inline: 16px;\n}\n.control:not(.size-base-small):not(.size-base-large) .icon {\n font-size: 20px;\n}\n\n/* Shape */\n.control:not(.shape-pill) {\n border-radius: 6px;\n}\n\n.control.shape-pill:not(.icon-only) {\n border-radius: 24px;\n}\n.control.shape-pill.icon-only {\n border-radius: 50%;\n}\n\n/* Icon */\n:not(.icon-trailing) .icon {\n margin-inline-end: var(--button-icon-gap);\n}\n.icon-trailing .icon {\n order: 1;\n margin-inline-start: var(--button-icon-gap);\n}\n\n:not(:focus) .focus-indicator {\n display: none;\n}\n.appearance-outlined .focus-indicator, .appearance-ghost .focus-indicator {\n --focus-stroke-gap-color: transparent;\n}";
669
- styleInject(css_248z);
670
-
671
- let _ = t => t,
672
- _t,
673
- _t2;
674
-
675
- const getAppearanceClassName = (appearance, disabled) => {
676
- let className = `appearance-${appearance}`;
677
- disabled && (className += ' disabled');
678
- return className;
679
- };
680
-
681
- const getClasses = ({
682
- connotation,
683
- appearance,
684
- shape,
685
- size,
686
- icon,
687
- label,
688
- disabled,
689
- iconTrailing
690
- }) => classNames('control', [`connotation-${connotation}`, Boolean(connotation)], [getAppearanceClassName(appearance, disabled), Boolean(appearance)], [`shape-${shape}`, Boolean(shape)], [`size-${size}`, Boolean(size)], ['icon-only', !label && !!icon], ['icon-trailing', iconTrailing]);
691
-
692
- const focusTemplate = context => {
693
- const focusTag = context.tagFor(Focus);
694
- return html(_t || (_t = _`<${0} class="focus-indicator"></${0}>`), focusTag, focusTag);
695
- };
696
-
697
- const buttonTemplate = context => {
698
- const affixIconTemplate = affixIconTemplateFactory(context);
699
- return html(_t2 || (_t2 = _`
700
- <button
701
- class="${0}"
702
- ?autofocus="${0}"
703
- ?disabled="${0}"
704
- form="${0}"
705
- formaction="${0}"
706
- formenctype="${0}"
707
- formmethod="${0}"
708
- formnovalidate="${0}"
709
- formtarget="${0}"
710
- name="${0}"
711
- type="${0}"
712
- value="${0}"
713
- aria-atomic="${0}"
714
- aria-busy="${0}"
715
- aria-controls="${0}"
716
- aria-current="${0}"
717
- aria-describedby="${0}"
718
- aria-details="${0}"
719
- aria-disabled="${0}"
720
- aria-errormessage="${0}"
721
- aria-expanded="${0}"
722
- aria-flowto="${0}"
723
- aria-haspopup="${0}"
724
- aria-hidden="${0}"
725
- aria-invalid="${0}"
726
- aria-keyshortcuts="${0}"
727
- aria-label="${0}"
728
- aria-labelledby="${0}"
729
- aria-live="${0}"
730
- aria-owns="${0}"
731
- aria-pressed="${0}"
732
- aria-relevant="${0}"
733
- aria-roledescription="${0}"
734
- ${0}
735
- >
736
- ${0}
737
- ${0}
738
- ${0}
739
- </button>
740
- `), getClasses, x => x.autofocus, x => x.disabled, x => x.formId, x => x.formaction, x => x.formenctype, x => x.formmethod, x => x.formnovalidate, x => x.formtarget, x => x.name, x => x.type, x => x.value, x => x.ariaAtomic, x => x.ariaBusy, x => x.ariaControls, x => x.ariaCurrent, x => x.ariaDescribedby, x => x.ariaDetails, x => x.ariaDisabled, x => x.ariaErrormessage, x => x.ariaExpanded, x => x.ariaFlowto, x => x.ariaHaspopup, x => x.ariaHidden, x => x.ariaInvalid, x => x.ariaKeyshortcuts, x => x.ariaLabel, x => x.ariaLabelledby, x => x.ariaLive, x => x.ariaOwns, x => x.ariaPressed, x => x.ariaRelevant, x => x.ariaRoledescription, ref('control'), () => focusTemplate(context), x => affixIconTemplate(x.icon), x => x.label);
741
- };
742
-
743
- const vividButton = Button.compose({
744
- baseName: 'button',
745
- baseClass: Button$1,
746
- template: buttonTemplate,
747
- styles: css_248z,
748
- shadowOptions: {
749
- delegatesFocus: true
750
- }
751
- });
752
- designSystem.register(vividButton());
753
-
754
- export { vividButton };
10
+ import '../shared/definition4.js';
11
+ import '../shared/focus.js';
12
+ import '../shared/affix.js';
13
+ import '../shared/button.js';
14
+ import '../shared/apply-mixins.js';
15
+ import '../shared/form-associated.js';
16
+ import '../shared/key-codes.js';
17
+ import '../shared/aria-global.js';
18
+ import '../shared/start-end.js';
19
+ import '../shared/ref.js';
20
+ import '../shared/focus2.js';
21
+
22
+ registerButton();