@vonage/vivid 3.0.0-test.0 → 3.0.1

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