@vonage/vivid 3.0.0-next.6 → 3.0.0-next.7

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 (390) hide show
  1. package/.babelrc +3 -0
  2. package/.eslintrc.json +70 -0
  3. package/.stylelintrc.json +8 -0
  4. package/CHANGELOG.json +343 -0
  5. package/CHANGELOG.md +45 -0
  6. package/jest.config.cjs +20 -0
  7. package/package.json +4 -13
  8. package/playwright.config.dev.ts +21 -0
  9. package/playwright.config.ts +34 -0
  10. package/project.json +122 -0
  11. package/rollup.config.prod.ts +50 -0
  12. package/setupJestTests.js +17 -0
  13. package/{index.d.ts → src/index.ts} +2 -2
  14. package/src/lib/accordion/README.md +55 -0
  15. package/src/lib/accordion/accordion.scss +10 -0
  16. package/src/lib/accordion/accordion.spec.ts +91 -0
  17. package/src/lib/accordion/accordion.template.ts +23 -0
  18. package/src/lib/accordion/accordion.ts +49 -0
  19. package/src/lib/accordion/index.ts +14 -0
  20. package/src/lib/accordion/ui.test.ts +37 -0
  21. package/src/lib/accordion/ui.test.ts-snapshots/snapshots-accordion-Chrome-Stable-darwin.png +0 -0
  22. package/src/lib/accordion/ui.test.ts-snapshots/snapshots-accordion-Chrome-Stable-linux.png +0 -0
  23. package/src/lib/accordion/ui.test.ts-snapshots/snapshots-accordion-Desktop-Firefox-darwin.png +0 -0
  24. package/src/lib/accordion/ui.test.ts-snapshots/snapshots-accordion-Desktop-Firefox-linux.png +0 -0
  25. package/src/lib/accordion/ui.test.ts-snapshots/snapshots-accordion-Desktop-Safari-darwin.png +0 -0
  26. package/src/lib/accordion/ui.test.ts-snapshots/snapshots-accordion-Desktop-Safari-linux.png +0 -0
  27. package/src/lib/accordion-item/README.md +113 -0
  28. package/src/lib/accordion-item/accordion-item.scss +91 -0
  29. package/src/lib/accordion-item/accordion-item.spec.ts +103 -0
  30. package/src/lib/accordion-item/accordion-item.template.ts +62 -0
  31. package/src/lib/accordion-item/accordion-item.ts +67 -0
  32. package/src/lib/accordion-item/index.ts +14 -0
  33. package/src/lib/accordion-item/partials/variables.scss +1 -0
  34. package/src/lib/accordion-item/ui.test.ts +37 -0
  35. package/src/lib/accordion-item/ui.test.ts-snapshots/snapshots-accordion-item-Chrome-Stable-darwin.png +0 -0
  36. package/src/lib/accordion-item/ui.test.ts-snapshots/snapshots-accordion-item-Chrome-Stable-linux.png +0 -0
  37. package/src/lib/accordion-item/ui.test.ts-snapshots/snapshots-accordion-item-Desktop-Firefox-darwin.png +0 -0
  38. package/src/lib/accordion-item/ui.test.ts-snapshots/snapshots-accordion-item-Desktop-Firefox-linux.png +0 -0
  39. package/src/lib/accordion-item/ui.test.ts-snapshots/snapshots-accordion-item-Desktop-Safari-darwin.png +0 -0
  40. package/src/lib/accordion-item/ui.test.ts-snapshots/snapshots-accordion-item-Desktop-Safari-linux.png +0 -0
  41. package/src/lib/badge/README.md +112 -0
  42. package/src/lib/badge/badge.scss +64 -0
  43. package/src/lib/badge/badge.spec.ts +114 -0
  44. package/src/lib/badge/badge.template.ts +36 -0
  45. package/src/lib/badge/badge.ts +97 -0
  46. package/src/lib/badge/index.ts +23 -0
  47. package/src/lib/badge/ui.test.ts +28 -0
  48. package/src/lib/badge/ui.test.ts-snapshots/snapshots-badge-Chrome-Stable-darwin.png +0 -0
  49. package/src/lib/badge/ui.test.ts-snapshots/snapshots-badge-Chrome-Stable-linux.png +0 -0
  50. package/src/lib/badge/ui.test.ts-snapshots/snapshots-badge-Desktop-Firefox-darwin.png +0 -0
  51. package/src/lib/badge/ui.test.ts-snapshots/snapshots-badge-Desktop-Firefox-linux.png +0 -0
  52. package/src/lib/badge/ui.test.ts-snapshots/snapshots-badge-Desktop-Safari-darwin.png +0 -0
  53. package/src/lib/badge/ui.test.ts-snapshots/snapshots-badge-Desktop-Safari-linux.png +0 -0
  54. package/src/lib/banner/README.md +117 -0
  55. package/src/lib/banner/banner.scss +71 -0
  56. package/src/lib/banner/banner.spec.ts +355 -0
  57. package/src/lib/banner/banner.template.ts +61 -0
  58. package/src/lib/banner/banner.ts +77 -0
  59. package/src/lib/banner/index.ts +14 -0
  60. package/src/lib/banner/ui.test.ts +64 -0
  61. package/src/lib/banner/ui.test.ts-snapshots/snapshots-banner-Chrome-Stable-darwin.png +0 -0
  62. package/src/lib/banner/ui.test.ts-snapshots/snapshots-banner-Chrome-Stable-linux.png +0 -0
  63. package/src/lib/banner/ui.test.ts-snapshots/snapshots-banner-Desktop-Firefox-darwin.png +0 -0
  64. package/src/lib/banner/ui.test.ts-snapshots/snapshots-banner-Desktop-Firefox-linux.png +0 -0
  65. package/src/lib/banner/ui.test.ts-snapshots/snapshots-banner-Desktop-Safari-darwin.png +0 -0
  66. package/src/lib/banner/ui.test.ts-snapshots/snapshots-banner-Desktop-Safari-linux.png +0 -0
  67. package/src/lib/breadcrumb/README.md +25 -0
  68. package/src/lib/breadcrumb/breadcrumb.scss +3 -0
  69. package/src/lib/breadcrumb/breadcrumb.spec.ts +78 -0
  70. package/src/lib/breadcrumb/breadcrumb.ts +10 -0
  71. package/src/lib/breadcrumb/index.ts +13 -0
  72. package/src/lib/breadcrumb/ui.test.ts +36 -0
  73. package/src/lib/breadcrumb/ui.test.ts-snapshots/snapshots-breadcrumb-Chrome-Stable-darwin.png +0 -0
  74. package/src/lib/breadcrumb/ui.test.ts-snapshots/snapshots-breadcrumb-Chrome-Stable-linux.png +0 -0
  75. package/src/lib/breadcrumb/ui.test.ts-snapshots/snapshots-breadcrumb-Desktop-Firefox-darwin.png +0 -0
  76. package/src/lib/breadcrumb/ui.test.ts-snapshots/snapshots-breadcrumb-Desktop-Firefox-linux.png +0 -0
  77. package/src/lib/breadcrumb/ui.test.ts-snapshots/snapshots-breadcrumb-Desktop-Safari-darwin.png +0 -0
  78. package/src/lib/breadcrumb/ui.test.ts-snapshots/snapshots-breadcrumb-Desktop-Safari-linux.png +0 -0
  79. package/src/lib/breadcrumb-item/README.md +40 -0
  80. package/src/lib/breadcrumb-item/breadcrumb-item.scss +28 -0
  81. package/src/lib/breadcrumb-item/breadcrumb-item.spec.ts +192 -0
  82. package/src/lib/breadcrumb-item/breadcrumb-item.template.ts +37 -0
  83. package/src/lib/breadcrumb-item/breadcrumb-item.ts +15 -0
  84. package/src/lib/breadcrumb-item/index.ts +16 -0
  85. package/src/lib/breadcrumb-item/ui.test.ts +38 -0
  86. package/src/lib/breadcrumb-item/ui.test.ts-snapshots/snapshots-breadcrumb-item-Chrome-Stable-darwin.png +0 -0
  87. package/src/lib/breadcrumb-item/ui.test.ts-snapshots/snapshots-breadcrumb-item-Chrome-Stable-linux.png +0 -0
  88. package/src/lib/breadcrumb-item/ui.test.ts-snapshots/snapshots-breadcrumb-item-Desktop-Firefox-darwin.png +0 -0
  89. package/src/lib/breadcrumb-item/ui.test.ts-snapshots/snapshots-breadcrumb-item-Desktop-Firefox-linux.png +0 -0
  90. package/src/lib/breadcrumb-item/ui.test.ts-snapshots/snapshots-breadcrumb-item-Desktop-Safari-darwin.png +0 -0
  91. package/src/lib/breadcrumb-item/ui.test.ts-snapshots/snapshots-breadcrumb-item-Desktop-Safari-linux.png +0 -0
  92. package/src/lib/button/README.md +120 -0
  93. package/src/lib/button/button.scss +142 -0
  94. package/src/lib/button/button.spec.ts +131 -0
  95. package/src/lib/button/button.template.ts +89 -0
  96. package/src/lib/button/button.ts +95 -0
  97. package/src/lib/button/index.ts +25 -0
  98. package/src/lib/button/partials/variables.scss +2 -0
  99. package/src/lib/button/ui.test.ts +32 -0
  100. package/src/lib/button/ui.test.ts-snapshots/snapshots-button-Chrome-Stable-darwin.png +0 -0
  101. package/src/lib/button/ui.test.ts-snapshots/snapshots-button-Chrome-Stable-linux.png +0 -0
  102. package/src/lib/button/ui.test.ts-snapshots/snapshots-button-Desktop-Firefox-darwin.png +0 -0
  103. package/src/lib/button/ui.test.ts-snapshots/snapshots-button-Desktop-Firefox-linux.png +0 -0
  104. package/src/lib/button/ui.test.ts-snapshots/snapshots-button-Desktop-Safari-darwin.png +0 -0
  105. package/src/lib/button/ui.test.ts-snapshots/snapshots-button-Desktop-Safari-linux.png +0 -0
  106. package/src/lib/calendar/README.md +70 -0
  107. package/src/lib/calendar/calendar.scss +176 -0
  108. package/src/lib/calendar/calendar.spec.ts +341 -0
  109. package/src/lib/calendar/calendar.template.ts +93 -0
  110. package/src/lib/calendar/calendar.ts +139 -0
  111. package/src/lib/calendar/helpers/calendar.date-functions.ts +31 -0
  112. package/src/lib/calendar/helpers/calendar.event-context.ts +72 -0
  113. package/src/lib/calendar/helpers/calendar.keyboard-interactions.ts +65 -0
  114. package/src/lib/calendar/index.ts +16 -0
  115. package/src/lib/calendar/partials/_variables.scss +15 -0
  116. package/src/lib/calendar/ui.test.ts +32 -0
  117. package/src/lib/calendar/ui.test.ts-snapshots/snapshots-calendar-Chrome-Stable-darwin.png +0 -0
  118. package/src/lib/calendar/ui.test.ts-snapshots/snapshots-calendar-Chrome-Stable-linux.png +0 -0
  119. package/src/lib/calendar/ui.test.ts-snapshots/snapshots-calendar-Desktop-Firefox-darwin.png +0 -0
  120. package/src/lib/calendar/ui.test.ts-snapshots/snapshots-calendar-Desktop-Firefox-linux.png +0 -0
  121. package/src/lib/calendar/ui.test.ts-snapshots/snapshots-calendar-Desktop-Safari-darwin.png +0 -0
  122. package/src/lib/calendar/ui.test.ts-snapshots/snapshots-calendar-Desktop-Safari-linux.png +0 -0
  123. package/src/lib/components.spec.ts +7 -0
  124. package/{lib/components.d.ts → src/lib/components.ts} +16 -16
  125. package/src/lib/elevation/README.md +99 -0
  126. package/src/lib/elevation/elevation.scss +15 -0
  127. package/src/lib/elevation/elevation.spec.ts +55 -0
  128. package/src/lib/elevation/elevation.template.ts +26 -0
  129. package/src/lib/elevation/elevation.ts +17 -0
  130. package/src/lib/elevation/index.ts +17 -0
  131. package/src/lib/elevation/partials/_elevation.mixin.scss +4 -0
  132. package/src/lib/elevation/ui.test.ts +32 -0
  133. package/src/lib/elevation/ui.test.ts-snapshots/snapshots-elevation-Chrome-Stable-darwin.png +0 -0
  134. package/src/lib/elevation/ui.test.ts-snapshots/snapshots-elevation-Chrome-Stable-linux.png +0 -0
  135. package/src/lib/elevation/ui.test.ts-snapshots/snapshots-elevation-Desktop-Firefox-darwin.png +0 -0
  136. package/src/lib/elevation/ui.test.ts-snapshots/snapshots-elevation-Desktop-Firefox-linux.png +0 -0
  137. package/src/lib/elevation/ui.test.ts-snapshots/snapshots-elevation-Desktop-Safari-darwin.png +0 -0
  138. package/src/lib/elevation/ui.test.ts-snapshots/snapshots-elevation-Desktop-Safari-linux.png +0 -0
  139. package/src/lib/enums.ts +55 -0
  140. package/src/lib/focus/README.md +1 -0
  141. package/src/lib/focus/focus.scss +17 -0
  142. package/src/lib/focus/focus.template.ts +16 -0
  143. package/src/lib/focus/focus.ts +10 -0
  144. package/src/lib/focus/index.ts +21 -0
  145. package/src/lib/focus/partials/variables.scss +2 -0
  146. package/src/lib/icon/README.md +70 -0
  147. package/src/lib/icon/__snapshots__/icon.spec.ts.snap +16 -0
  148. package/src/lib/icon/icon.placeholder.ts +12 -0
  149. package/src/lib/icon/icon.scss +52 -0
  150. package/src/lib/icon/icon.spec.ts +106 -0
  151. package/src/lib/icon/icon.template.ts +23 -0
  152. package/src/lib/icon/icon.ts +93 -0
  153. package/src/lib/icon/index.ts +14 -0
  154. package/src/lib/layout/README.md +154 -0
  155. package/src/lib/layout/index.ts +18 -0
  156. package/src/lib/layout/layout.scss +40 -0
  157. package/src/lib/layout/layout.spec.ts +73 -0
  158. package/src/lib/layout/layout.template.ts +29 -0
  159. package/src/lib/layout/layout.ts +46 -0
  160. package/src/lib/layout/partials/_functions.scss +15 -0
  161. package/src/lib/layout/partials/_mixins.scss +5 -0
  162. package/src/lib/layout/partials/_variables.scss +23 -0
  163. package/src/lib/layout/ui.test.ts +32 -0
  164. package/src/lib/layout/ui.test.ts-snapshots/snapshots-layout-Chrome-Stable-darwin.png +0 -0
  165. package/src/lib/layout/ui.test.ts-snapshots/snapshots-layout-Chrome-Stable-linux.png +0 -0
  166. package/src/lib/layout/ui.test.ts-snapshots/snapshots-layout-Desktop-Firefox-darwin.png +0 -0
  167. package/src/lib/layout/ui.test.ts-snapshots/snapshots-layout-Desktop-Firefox-linux.png +0 -0
  168. package/src/lib/layout/ui.test.ts-snapshots/snapshots-layout-Desktop-Safari-darwin.png +0 -0
  169. package/src/lib/layout/ui.test.ts-snapshots/snapshots-layout-Desktop-Safari-linux.png +0 -0
  170. package/src/lib/popup/README.md +261 -0
  171. package/src/lib/popup/index.ts +21 -0
  172. package/src/lib/popup/popup.scss +43 -0
  173. package/src/lib/popup/popup.spec.ts +265 -0
  174. package/src/lib/popup/popup.template.ts +41 -0
  175. package/src/lib/popup/popup.ts +158 -0
  176. package/src/lib/popup/ui.test.ts +111 -0
  177. package/src/lib/popup/ui.test.ts-snapshots/snapshots-popup-Chrome-Stable-darwin.png +0 -0
  178. package/src/lib/popup/ui.test.ts-snapshots/snapshots-popup-Chrome-Stable-linux.png +0 -0
  179. package/src/lib/popup/ui.test.ts-snapshots/snapshots-popup-Desktop-Firefox-darwin.png +0 -0
  180. package/src/lib/popup/ui.test.ts-snapshots/snapshots-popup-Desktop-Firefox-linux.png +0 -0
  181. package/src/lib/popup/ui.test.ts-snapshots/snapshots-popup-Desktop-Safari-darwin.png +0 -0
  182. package/src/lib/popup/ui.test.ts-snapshots/snapshots-popup-Desktop-Safari-linux.png +0 -0
  183. package/src/lib/progress/README.md +107 -0
  184. package/src/lib/progress/index.ts +14 -0
  185. package/src/lib/progress/progress.scss +133 -0
  186. package/src/lib/progress/progress.spec.ts +173 -0
  187. package/src/lib/progress/progress.template.ts +62 -0
  188. package/src/lib/progress/progress.ts +25 -0
  189. package/src/lib/progress/ui.test.ts +70 -0
  190. package/src/lib/progress/ui.test.ts-snapshots/snapshots-progress-Chrome-Stable-darwin.png +0 -0
  191. package/src/lib/progress/ui.test.ts-snapshots/snapshots-progress-Chrome-Stable-linux.png +0 -0
  192. package/src/lib/progress/ui.test.ts-snapshots/snapshots-progress-Desktop-Firefox-darwin.png +0 -0
  193. package/src/lib/progress/ui.test.ts-snapshots/snapshots-progress-Desktop-Firefox-linux.png +0 -0
  194. package/src/lib/progress/ui.test.ts-snapshots/snapshots-progress-Desktop-Safari-darwin.png +0 -0
  195. package/src/lib/progress/ui.test.ts-snapshots/snapshots-progress-Desktop-Safari-linux.png +0 -0
  196. package/src/lib/progress-ring/README.md +90 -0
  197. package/src/lib/progress-ring/index.ts +15 -0
  198. package/src/lib/progress-ring/progress-ring.scss +75 -0
  199. package/src/lib/progress-ring/progress-ring.spec.ts +139 -0
  200. package/src/lib/progress-ring/progress-ring.template.ts +82 -0
  201. package/src/lib/progress-ring/progress-ring.ts +18 -0
  202. package/src/lib/progress-ring/ui.test.ts +35 -0
  203. package/src/lib/progress-ring/ui.test.ts-snapshots/snapshots-progress-ring-Chrome-Stable-darwin.png +0 -0
  204. package/src/lib/progress-ring/ui.test.ts-snapshots/snapshots-progress-ring-Chrome-Stable-linux.png +0 -0
  205. package/src/lib/progress-ring/ui.test.ts-snapshots/snapshots-progress-ring-Desktop-Firefox-darwin.png +0 -0
  206. package/src/lib/progress-ring/ui.test.ts-snapshots/snapshots-progress-ring-Desktop-Firefox-linux.png +0 -0
  207. package/src/lib/progress-ring/ui.test.ts-snapshots/snapshots-progress-ring-Desktop-Safari-darwin.png +0 -0
  208. package/src/lib/progress-ring/ui.test.ts-snapshots/snapshots-progress-ring-Desktop-Safari-linux.png +0 -0
  209. package/src/lib/side-drawer/README.md +304 -0
  210. package/src/lib/side-drawer/index.ts +16 -0
  211. package/src/lib/side-drawer/partials/variables.scss +6 -0
  212. package/src/lib/side-drawer/side-drawer.scss +109 -0
  213. package/src/lib/side-drawer/side-drawer.spec.ts +118 -0
  214. package/src/lib/side-drawer/side-drawer.template.ts +51 -0
  215. package/src/lib/side-drawer/side-drawer.ts +58 -0
  216. package/src/lib/side-drawer/ui.test.ts +102 -0
  217. package/src/lib/side-drawer/ui.test.ts-snapshots/snapshots-side-drawer-Chrome-Stable-darwin.png +0 -0
  218. package/src/lib/side-drawer/ui.test.ts-snapshots/snapshots-side-drawer-Chrome-Stable-linux.png +0 -0
  219. package/src/lib/side-drawer/ui.test.ts-snapshots/snapshots-side-drawer-Desktop-Firefox-darwin.png +0 -0
  220. package/src/lib/side-drawer/ui.test.ts-snapshots/snapshots-side-drawer-Desktop-Firefox-linux.png +0 -0
  221. package/src/lib/side-drawer/ui.test.ts-snapshots/snapshots-side-drawer-Desktop-Safari-darwin.png +0 -0
  222. package/src/lib/side-drawer/ui.test.ts-snapshots/snapshots-side-drawer-Desktop-Safari-linux.png +0 -0
  223. package/src/lib/side-drawer/ui.test.ts-snapshots/snapshots-side-drawer-modal-Chrome-Stable-darwin.png +0 -0
  224. package/src/lib/side-drawer/ui.test.ts-snapshots/snapshots-side-drawer-modal-Chrome-Stable-linux.png +0 -0
  225. package/src/lib/side-drawer/ui.test.ts-snapshots/snapshots-side-drawer-modal-Desktop-Firefox-darwin.png +0 -0
  226. package/src/lib/side-drawer/ui.test.ts-snapshots/snapshots-side-drawer-modal-Desktop-Firefox-linux.png +0 -0
  227. package/src/lib/side-drawer/ui.test.ts-snapshots/snapshots-side-drawer-modal-Desktop-Safari-darwin.png +0 -0
  228. package/src/lib/side-drawer/ui.test.ts-snapshots/snapshots-side-drawer-modal-Desktop-Safari-linux.png +0 -0
  229. package/src/lib/sidenav-item/README.md +41 -0
  230. package/src/lib/sidenav-item/index.ts +20 -0
  231. package/src/lib/sidenav-item/sidenav-item.scss +51 -0
  232. package/src/lib/sidenav-item/sidenav-item.spec.ts +64 -0
  233. package/src/lib/sidenav-item/sidenav-item.template.ts +25 -0
  234. package/src/lib/sidenav-item/sidenav-item.ts +15 -0
  235. package/src/lib/sidenav-item/ui.test.ts +32 -0
  236. package/src/lib/sidenav-item/ui.test.ts-snapshots/snapshots-sidenav-item-Chrome-Stable-darwin.png +0 -0
  237. package/src/lib/sidenav-item/ui.test.ts-snapshots/snapshots-sidenav-item-Chrome-Stable-linux.png +0 -0
  238. package/src/lib/sidenav-item/ui.test.ts-snapshots/snapshots-sidenav-item-Desktop-Firefox-darwin.png +0 -0
  239. package/src/lib/sidenav-item/ui.test.ts-snapshots/snapshots-sidenav-item-Desktop-Firefox-linux.png +0 -0
  240. package/src/lib/sidenav-item/ui.test.ts-snapshots/snapshots-sidenav-item-Desktop-Safari-darwin.png +0 -0
  241. package/src/lib/sidenav-item/ui.test.ts-snapshots/snapshots-sidenav-item-Desktop-Safari-linux.png +0 -0
  242. package/src/lib/text/README.md +119 -0
  243. package/src/lib/text/index.ts +14 -0
  244. package/src/lib/text/text.scss +92 -0
  245. package/src/lib/text/text.spec.ts +54 -0
  246. package/src/lib/text/text.template.ts +28 -0
  247. package/src/lib/text/text.ts +55 -0
  248. package/src/lib/text/ui.test.ts +39 -0
  249. package/src/lib/text/ui.test.ts-snapshots/snapshots-text-Chrome-Stable-darwin.png +0 -0
  250. package/src/lib/text/ui.test.ts-snapshots/snapshots-text-Chrome-Stable-linux.png +0 -0
  251. package/src/lib/text/ui.test.ts-snapshots/snapshots-text-Desktop-Firefox-darwin.png +0 -0
  252. package/src/lib/text/ui.test.ts-snapshots/snapshots-text-Desktop-Firefox-linux.png +0 -0
  253. package/src/lib/text/ui.test.ts-snapshots/snapshots-text-Desktop-Safari-darwin.png +0 -0
  254. package/src/lib/text/ui.test.ts-snapshots/snapshots-text-Desktop-Safari-linux.png +0 -0
  255. package/src/lib/text-anchor/README.md +5 -0
  256. package/src/lib/text-anchor/index.ts +12 -0
  257. package/src/lib/text-anchor/text-anchor.spec.ts +153 -0
  258. package/src/lib/text-anchor/text-anchor.template.ts +66 -0
  259. package/src/lib/text-anchor/text-anchor.ts +22 -0
  260. package/src/lib/tooltip/README.md +132 -0
  261. package/src/lib/tooltip/index.ts +16 -0
  262. package/src/lib/tooltip/partials/variables.scss +1 -0
  263. package/src/lib/tooltip/tooltip.scss +18 -0
  264. package/src/lib/tooltip/tooltip.spec.ts +70 -0
  265. package/src/lib/tooltip/tooltip.template.ts +30 -0
  266. package/src/lib/tooltip/tooltip.ts +44 -0
  267. package/src/lib/tooltip/ui.test.ts +53 -0
  268. package/src/lib/tooltip/ui.test.ts-snapshots/snapshots-tooltip-Chrome-Stable-darwin.png +0 -0
  269. package/src/lib/tooltip/ui.test.ts-snapshots/snapshots-tooltip-Chrome-Stable-linux.png +0 -0
  270. package/src/lib/tooltip/ui.test.ts-snapshots/snapshots-tooltip-Desktop-Firefox-darwin.png +0 -0
  271. package/src/lib/tooltip/ui.test.ts-snapshots/snapshots-tooltip-Desktop-Firefox-linux.png +0 -0
  272. package/src/lib/tooltip/ui.test.ts-snapshots/snapshots-tooltip-Desktop-Safari-darwin.png +0 -0
  273. package/src/lib/tooltip/ui.test.ts-snapshots/snapshots-tooltip-Desktop-Safari-linux.png +0 -0
  274. package/src/shared/design-system/index.ts +12 -0
  275. package/src/shared/patterns/affix.ts +56 -0
  276. package/{shared/patterns/index.d.ts → src/shared/patterns/index.ts} +1 -1
  277. package/src/types/extract-gfm.d.ts +5 -0
  278. package/src/types/style.d.ts +4 -0
  279. package/src/visual-tests/visual-tests-utils.ts +76 -0
  280. package/tsconfig.json +36 -0
  281. package/tsconfig.lib.json +11 -0
  282. package/tsconfig.spec.json +16 -0
  283. package/accordion/index.js +0 -61
  284. package/accordion-item/index.js +0 -125
  285. package/badge/index.js +0 -64
  286. package/banner/index.js +0 -212
  287. package/breadcrumb/index.js +0 -100
  288. package/breadcrumb-item/index.js +0 -55
  289. package/button/index.js +0 -761
  290. package/calendar/index.js +0 -1521
  291. package/elevation/index.js +0 -31
  292. package/focus/index.js +0 -3
  293. package/icon/index.js +0 -34
  294. package/index.js +0 -32
  295. package/layout/index.js +0 -53
  296. package/lib/accordion/accordion.d.ts +0 -9
  297. package/lib/accordion/accordion.template.d.ts +0 -4
  298. package/lib/accordion/index.d.ts +0 -2
  299. package/lib/accordion-item/accordion-item.d.ts +0 -13
  300. package/lib/accordion-item/accordion-item.template.d.ts +0 -4
  301. package/lib/accordion-item/index.d.ts +0 -3
  302. package/lib/badge/badge.d.ts +0 -17
  303. package/lib/badge/badge.template.d.ts +0 -4
  304. package/lib/badge/index.d.ts +0 -3
  305. package/lib/banner/banner.d.ts +0 -20
  306. package/lib/banner/banner.template.d.ts +0 -6
  307. package/lib/banner/index.d.ts +0 -2
  308. package/lib/breadcrumb/breadcrumb.d.ts +0 -3
  309. package/lib/breadcrumb/index.d.ts +0 -2
  310. package/lib/breadcrumb-item/breadcrumb-item.d.ts +0 -5
  311. package/lib/breadcrumb-item/breadcrumb-item.template.d.ts +0 -4
  312. package/lib/breadcrumb-item/index.d.ts +0 -3
  313. package/lib/button/button.d.ts +0 -17
  314. package/lib/button/button.template.d.ts +0 -4
  315. package/lib/button/index.d.ts +0 -21
  316. package/lib/calendar/calendar.d.ts +0 -11
  317. package/lib/calendar/calendar.template.d.ts +0 -4
  318. package/lib/calendar/helpers/calendar.date-functions.d.ts +0 -2
  319. package/lib/calendar/helpers/calendar.event-context.d.ts +0 -6
  320. package/lib/calendar/helpers/calendar.keyboard-interactions.d.ts +0 -9
  321. package/lib/calendar/index.d.ts +0 -3
  322. package/lib/elevation/elevation.d.ts +0 -4
  323. package/lib/elevation/elevation.template.d.ts +0 -4
  324. package/lib/elevation/index.d.ts +0 -2
  325. package/lib/enums.d.ts +0 -45
  326. package/lib/focus/focus.d.ts +0 -3
  327. package/lib/focus/focus.template.d.ts +0 -4
  328. package/lib/focus/index.d.ts +0 -2
  329. package/lib/icon/icon.d.ts +0 -11
  330. package/lib/icon/icon.placeholder.d.ts +0 -1
  331. package/lib/icon/icon.template.d.ts +0 -4
  332. package/lib/icon/index.d.ts +0 -2
  333. package/lib/layout/index.d.ts +0 -2
  334. package/lib/layout/layout.d.ts +0 -16
  335. package/lib/layout/layout.template.d.ts +0 -4
  336. package/lib/popup/index.d.ts +0 -4
  337. package/lib/popup/popup.d.ts +0 -29
  338. package/lib/popup/popup.template.d.ts +0 -4
  339. package/lib/progress/index.d.ts +0 -2
  340. package/lib/progress/progress.d.ts +0 -9
  341. package/lib/progress/progress.template.d.ts +0 -5
  342. package/lib/progress-ring/index.d.ts +0 -2
  343. package/lib/progress-ring/progress-ring.d.ts +0 -6
  344. package/lib/progress-ring/progress-ring.template.d.ts +0 -4
  345. package/lib/side-drawer/index.d.ts +0 -2
  346. package/lib/side-drawer/side-drawer.d.ts +0 -12
  347. package/lib/side-drawer/side-drawer.template.d.ts +0 -4
  348. package/lib/sidenav-item/index.d.ts +0 -3
  349. package/lib/sidenav-item/sidenav-item.d.ts +0 -6
  350. package/lib/sidenav-item/sidenav-item.template.d.ts +0 -4
  351. package/lib/text/index.d.ts +0 -2
  352. package/lib/text/text.d.ts +0 -10
  353. package/lib/text/text.template.d.ts +0 -4
  354. package/lib/text-anchor/index.d.ts +0 -2
  355. package/lib/text-anchor/text-anchor.d.ts +0 -7
  356. package/lib/text-anchor/text-anchor.template.d.ts +0 -4
  357. package/lib/tooltip/index.d.ts +0 -3
  358. package/lib/tooltip/tooltip.d.ts +0 -10
  359. package/lib/tooltip/tooltip.template.d.ts +0 -4
  360. package/popup/index.js +0 -2087
  361. package/progress/index.js +0 -98
  362. package/progress-ring/index.js +0 -76
  363. package/shared/_has.js +0 -58
  364. package/shared/affix.js +0 -29
  365. package/shared/anchor.js +0 -78
  366. package/shared/apply-mixins.js +0 -22
  367. package/shared/aria-global.js +0 -156
  368. package/shared/base-progress.js +0 -65
  369. package/shared/breadcrumb-item.js +0 -25
  370. package/shared/class-names.js +0 -15
  371. package/shared/design-system/index.d.ts +0 -3
  372. package/shared/es.object.assign.js +0 -68
  373. package/shared/icon.js +0 -1393
  374. package/shared/index.js +0 -4991
  375. package/shared/index2.js +0 -21
  376. package/shared/patterns/affix.d.ts +0 -9
  377. package/shared/slotted.js +0 -119
  378. package/shared/style-inject.es.js +0 -28
  379. package/shared/text-anchor.js +0 -21
  380. package/shared/text-anchor.template.js +0 -54
  381. package/shared/web.dom-collections.iterator.js +0 -1479
  382. package/shared/when.js +0 -15
  383. package/side-drawer/index.js +0 -103
  384. package/sidenav-item/index.js +0 -38
  385. package/styles/fonts/spezia.css +0 -23
  386. package/styles/themes/dark.css +0 -193
  387. package/styles/themes/light.css +0 -193
  388. package/text/index.js +0 -45
  389. package/text-anchor/index.js +0 -19
  390. package/tooltip/index.js +0 -73
package/project.json ADDED
@@ -0,0 +1,122 @@
1
+ {
2
+ "root": "libs/components",
3
+ "sourceRoot": "libs/components/src",
4
+ "projectType": "library",
5
+ "targets": {
6
+ "e2e": {
7
+ "executor": "@nrwl/workspace:run-commands",
8
+ "options": {
9
+ "commands": ["./scripts/visual-tests/run.tests.in.container.sh {args.task}"],
10
+ "parallel": false
11
+ },
12
+ "configurations": {
13
+ "watch": {
14
+ "commands": [
15
+ {
16
+ "command": "npx nx run components:build --watch"
17
+ },
18
+ {
19
+ "command":"npx nx run styles:serve"
20
+ },
21
+ {
22
+ "command":"npx http-server -s"
23
+ },
24
+ {
25
+ "command":"npx -y nodemon --watch dist/libs/components/ --watch dist/libs/styles/ --watch 'libs/components/**/*.test.ts' -e js,css,ts --signal SIGHUP --exec 'npx playwright test -c ./libs/components/playwright.config.dev.ts'"
26
+ }
27
+ ],
28
+ "parallel": true
29
+ }
30
+ }
31
+ },
32
+ "lint": {
33
+ "executor": "@nrwl/linter:eslint",
34
+ "outputs": ["{options.outputFile}"],
35
+ "options": {
36
+ "lintFilePatterns": ["libs/components/**/*.ts"]
37
+ }
38
+ },
39
+ "test": {
40
+ "executor": "@nrwl/jest:jest",
41
+ "outputs": ["coverage/libs/components"],
42
+ "options": {
43
+ "jestConfig": "libs/components/jest.config.cjs",
44
+ "passWithNoTests": true
45
+ }
46
+ },
47
+ "build": {
48
+ "executor": "@nrwl/web:rollup",
49
+ "outputs": ["{options.outputPath}"],
50
+ "options": {
51
+ "entryFile": "libs/components/src/index.ts",
52
+ "outputPath": "dist/libs/components",
53
+ "tsConfig": "libs/components/tsconfig.lib.json",
54
+ "project": "libs/components/package.json",
55
+ "rollupConfig": "libs/components/rollup.config.prod.ts",
56
+ "assets": [
57
+ {
58
+ "input": "./libs/components",
59
+ "glob": "README.md",
60
+ "output": "."
61
+ },
62
+ {
63
+ "input": "./dist/libs/styles/themes/**",
64
+ "glob": "*.css",
65
+ "output": "./styles/themes"
66
+ },
67
+ {
68
+ "input": "./dist/libs/styles/fonts/**",
69
+ "glob": "*.css",
70
+ "output": "./styles/fonts"
71
+ }
72
+ ],
73
+ "buildableProjectDepsInPackageJsonType": "dependencies",
74
+ "updateBuildableProjectDepsInPackageJson": true,
75
+ "format": ["esm"],
76
+ "extractCss": false
77
+ }
78
+ },
79
+ "serve": {
80
+ "executor": "@nrwl/web:rollup",
81
+ "outputs": ["{options.outputPath}"],
82
+ "options": {
83
+ "entryFile": "libs/components/src/index.ts",
84
+ "outputPath": "dist/libs/components",
85
+ "tsConfig": "libs/components/tsconfig.lib.json",
86
+ "project": "libs/components/package.json",
87
+ "rollupConfig": "libs/components/rollup.config.prod.ts",
88
+ "watch": true,
89
+ "buildableProjectDepsInPackageJsonType": "dependencies",
90
+ "updateBuildableProjectDepsInPackageJson": true,
91
+ "assets": [
92
+ {
93
+ "input": "./libs/components",
94
+ "glob": "README.md",
95
+ "output": "."
96
+ },
97
+ {
98
+ "input": "./dist/libs/styles/themes/**",
99
+ "glob": "*.css",
100
+ "output": "./styles/themes"
101
+ },
102
+ {
103
+ "input": "./dist/libs/styles/fonts/**",
104
+ "glob": "*.css",
105
+ "output": "./styles/fonts"
106
+ }
107
+ ],
108
+ "format": ["esm"],
109
+ "extractCss": false
110
+ }
111
+ },
112
+ "stylelint": {
113
+ "executor": "nx-stylelint:lint",
114
+ "outputs": ["{options.outputFile}"],
115
+ "options": {
116
+ "lintFilePatterns": ["libs/components/**/*.scss"]
117
+ }
118
+ }
119
+ },
120
+ "tags": [],
121
+ "implicitDependencies": ["styles"]
122
+ }
@@ -0,0 +1,50 @@
1
+
2
+ const fs = require('fs');
3
+ const path = require('path');
4
+ const replace = require('@rollup/plugin-replace');
5
+
6
+ /**
7
+ * @param workingFolder
8
+ */
9
+ function getFoldersInAFolder(workingFolder = './src/lib/') {
10
+ const folders = [];
11
+ const testsFolder = path.join(__dirname, workingFolder);
12
+ fs.readdirSync(testsFolder).forEach((testFolder) => {
13
+ if (testFolder === 'common') return;
14
+ const absolutePath = path.join(testsFolder, testFolder);
15
+ if (fs.statSync(absolutePath).isDirectory()) {
16
+ folders.push(testFolder);
17
+ }
18
+ });
19
+ return folders;
20
+ }
21
+
22
+ const components = getFoldersInAFolder();
23
+ const input = components.reduce((inputObject, componentName) => {
24
+ inputObject[`${componentName}/index`] = path.join(
25
+ process.cwd(),
26
+ `libs/components/src/lib/${componentName}/index.ts`
27
+ );
28
+ return inputObject;
29
+ }, {});
30
+
31
+ module.exports = function setVividRollupConfig(config) {
32
+
33
+ input.index = config.input;
34
+
35
+ const output = config.output;
36
+ output.chunkFileNames = 'shared/[name].js';
37
+ delete output.name;
38
+ delete output.entryFileNames;
39
+
40
+
41
+ const plugins = [...config.plugins,
42
+ replace({
43
+ 'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV),
44
+ })];
45
+ return {
46
+ input,
47
+ output,
48
+ plugins
49
+ };
50
+ };
@@ -0,0 +1,17 @@
1
+ import * as jestFetchMock from 'jest-fetch-mock';
2
+
3
+ jestFetchMock.enableFetchMocks();
4
+
5
+ Object.defineProperty(window, 'matchMedia', {
6
+ writable: true,
7
+ value: jest.fn().mockImplementation((query: any) => ({
8
+ matches: false,
9
+ media: query,
10
+ onchange: null,
11
+ addListener: jest.fn(), // deprecated
12
+ removeListener: jest.fn(), // deprecated
13
+ addEventListener: jest.fn(),
14
+ removeEventListener: jest.fn(),
15
+ dispatchEvent: jest.fn(),
16
+ })),
17
+ });
@@ -1,2 +1,2 @@
1
- export * from './lib/components';
2
- export * from './shared/design-system';
1
+ export * from './lib/components';
2
+ export * from './shared/design-system';
@@ -0,0 +1,55 @@
1
+ # accordion
2
+
3
+ ```js
4
+ <script type="module">
5
+ import '@vonage/vivid/accordion';
6
+ </script>
7
+ ```
8
+
9
+ ```html preview
10
+ <vwc-accordion>
11
+ <vwc-accordion-item heading="accordion item with heading">
12
+ <vwc-text>content</vwc-text>
13
+ </vwc-accordion-item>
14
+ <vwc-accordion-item heading="accordion item with heading">
15
+ <vwc-text>content</vwc-text>
16
+ </vwc-accordion-item>
17
+ <vwc-accordion-item heading="accordion item with heading">
18
+ <vwc-text>content</vwc-text>
19
+ </vwc-accordion-item>
20
+ <vwc-accordion-item heading="accordion item with heading">
21
+ <vwc-text>content</vwc-text>
22
+ </vwc-accordion-item>
23
+ </vwc-accordion>
24
+ ```
25
+ ## Multi
26
+ Add the `multi` attribute to the accordion to allow multiple items to be open at once.
27
+
28
+ - Type: `boolean`
29
+ - Default: `false`
30
+
31
+ ```html preview
32
+ <vwc-accordion multi>
33
+ <vwc-accordion-item heading="accordion item with heading">
34
+ <vwc-text>content</vwc-text>
35
+ </vwc-accordion-item>
36
+ <vwc-accordion-item heading="accordion item with heading">
37
+ <vwc-text>content</vwc-text>
38
+ </vwc-accordion-item>
39
+ <vwc-accordion-item heading="accordion item with heading">
40
+ <vwc-text>content</vwc-text>
41
+ </vwc-accordion-item>
42
+ <vwc-accordion-item heading="accordion item with heading">
43
+ <vwc-text>content</vwc-text>
44
+ </vwc-accordion-item>
45
+ </vwc-accordion>
46
+ ```
47
+
48
+ ## Methods
49
+
50
+ ### CloseAll
51
+
52
+ - Type: function
53
+ - Returns: `void`
54
+
55
+ Closes all the accordion items from the open state.
@@ -0,0 +1,10 @@
1
+ @use '../../../../../node_modules/@vonage/vivid-tokens/dist/sass/themes/consts' as theme-consts;
2
+
3
+ .control {
4
+ display: flex;
5
+ flex-direction: column;
6
+ }
7
+
8
+ ::slotted(vwc-accordion-item:not(:only-of-type)) {
9
+ border-bottom: 1px solid var(#{theme-consts.$vvd-color-neutral-30});
10
+ }
@@ -0,0 +1,91 @@
1
+ import { elementUpdated, fixture } from '@vivid-nx/shared';
2
+ import type { AccordionItem } from '../accordion-item/accordion-item';
3
+ import { Accordion } from './accordion';
4
+ import '.';
5
+ import '../accordion-item';
6
+
7
+ const COMPONENT_TAG = 'vwc-accordion';
8
+
9
+ describe('vwc-accordion', () => {
10
+ let element: Accordion;
11
+ let accordionItem1: AccordionItem;
12
+ let accordionItem2: AccordionItem;
13
+
14
+ beforeEach(async () => {
15
+ element = (await fixture(
16
+ `<${COMPONENT_TAG}>
17
+ <vwc-accordion-item heading="accordion item" id="item1"><p>content</p></vwc-accordion-item>
18
+ <vwc-accordion-item heading="accordion item" id="item2"><p>content</p></vwc-accordion-item>
19
+ </${COMPONENT_TAG}>`
20
+ )) as Accordion;
21
+ await elementUpdated(element);
22
+
23
+ accordionItem1 = element.querySelector('#item1') as AccordionItem;
24
+ accordionItem2 = element.querySelector('#item2') as AccordionItem;
25
+ await elementUpdated(accordionItem1);
26
+ await elementUpdated(accordionItem2);
27
+ });
28
+
29
+ describe('basic', () => {
30
+ it('should be initialized as a vwc-accordion', async () => {
31
+ expect(element).toBeInstanceOf(Accordion);
32
+ expect(element.multi).toBeFalsy();
33
+ });
34
+ });
35
+
36
+ describe('non multi', () => {
37
+ it('should only allow one accordion items open at a time', async () => {
38
+ expect(accordionItem1.open).toBeFalsy();
39
+ expect(accordionItem2.open).toBeFalsy();
40
+
41
+ accordionItem1.open = true;
42
+ await elementUpdated(element);
43
+ accordionItem2.open = true;
44
+ await elementUpdated(element);
45
+
46
+ expect(accordionItem1.open).toBeFalsy();
47
+ expect(accordionItem2.open).toBeTruthy();
48
+ });
49
+ });
50
+
51
+ describe('multi', () => {
52
+ it('should allow all accordion items open when multi', async () => {
53
+ element.multi = true;
54
+ await elementUpdated(element);
55
+
56
+ expect(accordionItem1.open).toBeFalsy();
57
+ expect(accordionItem2.open).toBeFalsy();
58
+
59
+ accordionItem1.open = true;
60
+ await elementUpdated(element);
61
+ accordionItem2.open = true;
62
+ await elementUpdated(element);
63
+
64
+ expect(accordionItem1.open).toBeTruthy();
65
+ expect(accordionItem2.open).toBeTruthy();
66
+ });
67
+ });
68
+
69
+
70
+ describe('close all', () => {
71
+ it('should close all accordion items', async () => {
72
+ element.multi = true;
73
+ await elementUpdated(element);
74
+
75
+ accordionItem1.open = true;
76
+ await elementUpdated(element);
77
+ accordionItem2.open = true;
78
+ await elementUpdated(element);
79
+
80
+ expect(accordionItem1.open).toBeTruthy();
81
+ expect(accordionItem2.open).toBeTruthy();
82
+
83
+ element.closeAll();
84
+ await elementUpdated(element);
85
+
86
+ expect(accordionItem1.open).toBeFalsy();
87
+ expect(accordionItem2.open).toBeFalsy();
88
+ });
89
+ });
90
+
91
+ });
@@ -0,0 +1,23 @@
1
+ import { html } from '@microsoft/fast-element';
2
+ import type { ViewTemplate } from '@microsoft/fast-element';
3
+ import type {
4
+ ElementDefinitionContext,
5
+ FoundationElementDefinition,
6
+ } from '@microsoft/fast-foundation';
7
+ import { classNames } from '@microsoft/fast-web-utilities';
8
+ import type { Accordion } from './accordion';
9
+
10
+ const getClasses = (_: Accordion) => classNames('control');
11
+
12
+ /**
13
+ *
14
+ * @param context
15
+ * @public
16
+ */
17
+ export const AccordionTemplate: (
18
+ context: ElementDefinitionContext,
19
+ definition: FoundationElementDefinition
20
+ ) => ViewTemplate<Accordion> = (
21
+ ) => html`<div class="${getClasses}">
22
+ <slot></slot>
23
+ </div>`;
@@ -0,0 +1,49 @@
1
+ import { FoundationElement } from '@microsoft/fast-foundation';
2
+ import { attr } from '@microsoft/fast-element';
3
+ import type { AccordionItem } from '../accordion-item/accordion-item';
4
+
5
+ /**
6
+ * Base class for accordion
7
+ *
8
+ * @public
9
+ */
10
+ export class Accordion extends FoundationElement {
11
+ private accordionItems: HTMLCollectionOf<AccordionItem> | undefined = undefined;
12
+
13
+ /**
14
+ *
15
+ * @public
16
+ * HTML Attribute: multi
17
+ */
18
+ @attr({
19
+ mode: 'boolean',
20
+ }) multi = false;
21
+
22
+ constructor() {
23
+ super();
24
+ this.addEventListener('opened', this.handleOpened);
25
+ }
26
+
27
+ override connectedCallback(): void {
28
+ super.connectedCallback();
29
+ this.accordionItems = this.children as HTMLCollectionOf<AccordionItem>;
30
+ }
31
+
32
+ private handleOpened(e: Event): any {
33
+ if (!this.multi && this.accordionItems) {
34
+ for (let i = 0; i < this.accordionItems.length; i++) {
35
+ if (this.accordionItems[i] !== e.target) {
36
+ this.accordionItems[i].open = false;
37
+ }
38
+ }
39
+ }
40
+ }
41
+
42
+ closeAll(): void {
43
+ if (this.accordionItems) {
44
+ for (let i = 0; i < this.accordionItems.length; i++) {
45
+ this.accordionItems[i].open = false;
46
+ }
47
+ }
48
+ }
49
+ }
@@ -0,0 +1,14 @@
1
+ import type { FoundationElementDefinition } from '@microsoft/fast-foundation';
2
+ import { designSystem } from '../../shared/design-system';
3
+ import styles from './accordion.scss';
4
+
5
+ import { Accordion } from './accordion';
6
+ import { AccordionTemplate as template } from './accordion.template';
7
+
8
+ export const vividAccordion = Accordion.compose<FoundationElementDefinition>({
9
+ baseName: 'accordion',
10
+ template: template as any,
11
+ styles,
12
+ });
13
+
14
+ designSystem.register(vividAccordion());
@@ -0,0 +1,37 @@
1
+ import * as path from 'path';
2
+ import { expect, test } from '@playwright/test';
3
+ import type { Page } from '@playwright/test';
4
+ import {
5
+ extractHTMLBlocksFromReadme,
6
+ loadComponents,
7
+ loadTemplate,
8
+ } from '../../visual-tests/visual-tests-utils.ts';
9
+
10
+ const components = ['accordion','accordion-item'];
11
+
12
+ test('should show the component', async ({ page }: { page: Page }) => {
13
+ const template = extractHTMLBlocksFromReadme(
14
+ path.join(new URL('.', import.meta.url).pathname, 'README.md')
15
+ ).reduce(
16
+ (htmlString: string, block: string) =>
17
+ `${htmlString} <div style="margin: 5px;">${block}</div>`,
18
+ ''
19
+ );
20
+
21
+ await loadComponents({
22
+ page,
23
+ components,
24
+ });
25
+ await loadTemplate({
26
+ page,
27
+ template,
28
+ });
29
+
30
+ const testWrapper = await page.$('#wrapper');
31
+
32
+ await page.waitForLoadState('networkidle');
33
+
34
+ expect(await testWrapper?.screenshot()).toMatchSnapshot(
35
+ './snapshots/accordion.png'
36
+ );
37
+ });
@@ -0,0 +1,113 @@
1
+ # accordion-item
2
+
3
+ ```js
4
+ <script type="module">
5
+ import '@vonage/vivid/accordion-item';
6
+ </script>
7
+ ```
8
+ ## Heading
9
+ Add the `heading` attribute to set the heading text.
10
+
11
+ - Type: `string`
12
+ - Default: `''`
13
+
14
+ ```html preview
15
+ <vwc-accordion-item heading="accordion item with heading">
16
+ <vwc-text font-face="body-1">
17
+ Lorem Ipsum is simply dummy text of the printing and typesetting industry.
18
+ </vwc-text>
19
+ </vwc-accordion-item>
20
+ ```
21
+
22
+ ## Heading-Level
23
+
24
+ Use the `heading-level` attribute (or `headingLevel` property) to set the accordion heading level so it fits correctly within the outline of the page. Read more on [heading elements](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Heading_Elements).
25
+
26
+ - Type: `2` | `3` | `4` | `5` | `6`
27
+ - Default: `3`
28
+
29
+ The following sets the heading of accordion-item to level 2
30
+
31
+ ```
32
+ <vwc-accordion-item heading="my heading" heading-level="2"></vwc-accordion-item>
33
+ ```
34
+
35
+ which will output the shadow tree heading element to be rendered as a `<h2>` tag
36
+
37
+ e.g.
38
+
39
+ ```
40
+ <h2 class="header">
41
+ <button>
42
+ <!-- ... -->
43
+ </button>
44
+ </h2>
45
+ ```
46
+
47
+ ## Open
48
+ Use the `open` attribute to set the accordion-item's open state.
49
+
50
+ - Type: `boolean`
51
+ - Default: `false`
52
+
53
+ ```html preview
54
+ <vwc-accordion-item heading="Click to toggle accordion item" open>
55
+ <vwc-text font-face="body-1">
56
+ Lorem Ipsum is simply dummy text of the printing and typesetting industry.
57
+ </vwc-text>
58
+ </vwc-accordion-item>
59
+ ```
60
+ ## No-Indicator
61
+ Add the `no-indicator` attribute (or `noIndicator` property) to remove the indicator icon from the heading.
62
+
63
+ - Type: `boolean`
64
+ - Default: `false`
65
+
66
+ ```html preview
67
+ <vwc-accordion-item heading="accordion item without indicator" no-indicator>
68
+ <vwc-text font-face="body-1">
69
+ Lorem Ipsum is simply dummy text of the printing and typesetting industry.
70
+ </vwc-text>
71
+ </vwc-accordion-item>
72
+ ```
73
+ ## Meta
74
+ Add the `meta` attribute to add metadata to the heading.
75
+
76
+ - Type: `string`
77
+ - Default: `''`
78
+
79
+ ```html preview
80
+ <vwc-accordion-item heading="accordion item with metadata" meta="meta-data">
81
+ <vwc-text font-face="body-1">
82
+ Lorem Ipsum is simply dummy text of the printing and typesetting industry.
83
+ </vwc-text>
84
+ </vwc-accordion-item>
85
+ ```
86
+
87
+ ## Icon
88
+ Add the `icon` attribute to add an icon to the heading.
89
+
90
+ - Type: `string`
91
+ - Default: `''`
92
+
93
+ ```html preview
94
+ <vwc-accordion-item heading="accordion item with icon" icon="chat-solid">
95
+ <vwc-text font-face="body-1">
96
+ Lorem Ipsum is simply dummy text of the printing and typesetting industry.
97
+ </vwc-text>
98
+ </vwc-accordion-item>
99
+ ```
100
+
101
+ ## Icon-Trailing
102
+ Add the `icon-trailing` attribute (or `iconTrailing` property) to add an icon to the right of the heading text. Mind that `icon-trailing` will override the Indicator.
103
+
104
+ - Type: `boolean`
105
+ - Default: `false`
106
+
107
+ ```html preview
108
+ <vwc-accordion-item heading="accordion item with icon-trailing" icon="chat-solid" icon-trailing>
109
+ <vwc-text font-face="body-1">
110
+ Lorem Ipsum is simply dummy text of the printing and typesetting industry.
111
+ </vwc-text>
112
+ </vwc-accordion-item>
113
+ ```