@vonage/vivid 3.0.0-next.7 → 3.0.0-test.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (390) hide show
  1. package/accordion/index.js +61 -0
  2. package/accordion-item/index.js +125 -0
  3. package/badge/index.js +64 -0
  4. package/banner/index.js +212 -0
  5. package/breadcrumb/index.js +100 -0
  6. package/breadcrumb-item/index.js +55 -0
  7. package/button/index.js +761 -0
  8. package/calendar/index.js +1521 -0
  9. package/elevation/index.js +31 -0
  10. package/focus/index.js +3 -0
  11. package/icon/index.js +34 -0
  12. package/{src/index.ts → index.d.ts} +2 -2
  13. package/index.js +32 -0
  14. package/layout/index.js +53 -0
  15. package/lib/accordion/accordion.d.ts +9 -0
  16. package/lib/accordion/accordion.template.d.ts +4 -0
  17. package/lib/accordion/index.d.ts +2 -0
  18. package/lib/accordion-item/accordion-item.d.ts +13 -0
  19. package/lib/accordion-item/accordion-item.template.d.ts +4 -0
  20. package/lib/accordion-item/index.d.ts +3 -0
  21. package/lib/badge/badge.d.ts +17 -0
  22. package/lib/badge/badge.template.d.ts +4 -0
  23. package/lib/badge/index.d.ts +3 -0
  24. package/lib/banner/banner.d.ts +20 -0
  25. package/lib/banner/banner.template.d.ts +6 -0
  26. package/lib/banner/index.d.ts +2 -0
  27. package/lib/breadcrumb/breadcrumb.d.ts +3 -0
  28. package/lib/breadcrumb/index.d.ts +2 -0
  29. package/lib/breadcrumb-item/breadcrumb-item.d.ts +5 -0
  30. package/lib/breadcrumb-item/breadcrumb-item.template.d.ts +4 -0
  31. package/lib/breadcrumb-item/index.d.ts +3 -0
  32. package/lib/button/button.d.ts +17 -0
  33. package/lib/button/button.template.d.ts +4 -0
  34. package/lib/button/index.d.ts +21 -0
  35. package/lib/calendar/calendar.d.ts +11 -0
  36. package/lib/calendar/calendar.template.d.ts +4 -0
  37. package/lib/calendar/helpers/calendar.date-functions.d.ts +2 -0
  38. package/lib/calendar/helpers/calendar.event-context.d.ts +6 -0
  39. package/lib/calendar/helpers/calendar.keyboard-interactions.d.ts +9 -0
  40. package/lib/calendar/index.d.ts +3 -0
  41. package/{src/lib/components.ts → lib/components.d.ts} +16 -16
  42. package/lib/elevation/elevation.d.ts +4 -0
  43. package/lib/elevation/elevation.template.d.ts +4 -0
  44. package/lib/elevation/index.d.ts +2 -0
  45. package/lib/enums.d.ts +45 -0
  46. package/lib/focus/focus.d.ts +3 -0
  47. package/lib/focus/focus.template.d.ts +4 -0
  48. package/lib/focus/index.d.ts +2 -0
  49. package/lib/icon/icon.d.ts +11 -0
  50. package/lib/icon/icon.placeholder.d.ts +1 -0
  51. package/lib/icon/icon.template.d.ts +4 -0
  52. package/lib/icon/index.d.ts +2 -0
  53. package/lib/layout/index.d.ts +2 -0
  54. package/lib/layout/layout.d.ts +16 -0
  55. package/lib/layout/layout.template.d.ts +4 -0
  56. package/lib/popup/index.d.ts +4 -0
  57. package/lib/popup/popup.d.ts +17 -0
  58. package/lib/popup/popup.template.d.ts +4 -0
  59. package/lib/progress/index.d.ts +2 -0
  60. package/lib/progress/progress.d.ts +9 -0
  61. package/lib/progress/progress.template.d.ts +5 -0
  62. package/lib/progress-ring/index.d.ts +2 -0
  63. package/lib/progress-ring/progress-ring.d.ts +6 -0
  64. package/lib/progress-ring/progress-ring.template.d.ts +4 -0
  65. package/lib/side-drawer/index.d.ts +2 -0
  66. package/lib/side-drawer/side-drawer.d.ts +8 -0
  67. package/lib/side-drawer/side-drawer.template.d.ts +4 -0
  68. package/lib/sidenav-item/index.d.ts +3 -0
  69. package/lib/sidenav-item/sidenav-item.d.ts +6 -0
  70. package/lib/sidenav-item/sidenav-item.template.d.ts +4 -0
  71. package/lib/text/index.d.ts +2 -0
  72. package/lib/text/text.d.ts +10 -0
  73. package/lib/text/text.template.d.ts +4 -0
  74. package/lib/text-anchor/index.d.ts +2 -0
  75. package/lib/text-anchor/text-anchor.d.ts +7 -0
  76. package/lib/text-anchor/text-anchor.template.d.ts +4 -0
  77. package/lib/tooltip/index.d.ts +3 -0
  78. package/lib/tooltip/tooltip.d.ts +8 -0
  79. package/lib/tooltip/tooltip.template.d.ts +4 -0
  80. package/package.json +13 -3
  81. package/popup/index.js +2065 -0
  82. package/progress/index.js +98 -0
  83. package/progress-ring/index.js +76 -0
  84. package/shared/_has.js +58 -0
  85. package/shared/affix.js +29 -0
  86. package/shared/anchor.js +78 -0
  87. package/shared/apply-mixins.js +22 -0
  88. package/shared/aria-global.js +156 -0
  89. package/shared/base-progress.js +65 -0
  90. package/shared/breadcrumb-item.js +25 -0
  91. package/shared/class-names.js +15 -0
  92. package/shared/design-system/index.d.ts +3 -0
  93. package/shared/es.object.assign.js +68 -0
  94. package/shared/icon.js +1393 -0
  95. package/shared/index.js +4998 -0
  96. package/shared/index2.js +21 -0
  97. package/shared/patterns/affix.d.ts +9 -0
  98. package/{src/shared/patterns/index.ts → shared/patterns/index.d.ts} +1 -1
  99. package/shared/slotted.js +119 -0
  100. package/shared/style-inject.es.js +28 -0
  101. package/shared/text-anchor.js +21 -0
  102. package/shared/text-anchor.template.js +54 -0
  103. package/shared/web.dom-collections.iterator.js +1479 -0
  104. package/shared/when.js +15 -0
  105. package/side-drawer/index.js +81 -0
  106. package/sidenav-item/index.js +38 -0
  107. package/styles/fonts/spezia.css +23 -0
  108. package/styles/themes/dark.css +205 -0
  109. package/styles/themes/light.css +205 -0
  110. package/text/index.js +45 -0
  111. package/text-anchor/index.js +19 -0
  112. package/tooltip/index.js +65 -0
  113. package/.babelrc +0 -3
  114. package/.eslintrc.json +0 -70
  115. package/.stylelintrc.json +0 -8
  116. package/CHANGELOG.json +0 -343
  117. package/CHANGELOG.md +0 -45
  118. package/jest.config.cjs +0 -20
  119. package/playwright.config.dev.ts +0 -21
  120. package/playwright.config.ts +0 -34
  121. package/project.json +0 -122
  122. package/rollup.config.prod.ts +0 -50
  123. package/setupJestTests.js +0 -17
  124. package/src/lib/accordion/README.md +0 -55
  125. package/src/lib/accordion/accordion.scss +0 -10
  126. package/src/lib/accordion/accordion.spec.ts +0 -91
  127. package/src/lib/accordion/accordion.template.ts +0 -23
  128. package/src/lib/accordion/accordion.ts +0 -49
  129. package/src/lib/accordion/index.ts +0 -14
  130. package/src/lib/accordion/ui.test.ts +0 -37
  131. package/src/lib/accordion/ui.test.ts-snapshots/snapshots-accordion-Chrome-Stable-darwin.png +0 -0
  132. package/src/lib/accordion/ui.test.ts-snapshots/snapshots-accordion-Chrome-Stable-linux.png +0 -0
  133. package/src/lib/accordion/ui.test.ts-snapshots/snapshots-accordion-Desktop-Firefox-darwin.png +0 -0
  134. package/src/lib/accordion/ui.test.ts-snapshots/snapshots-accordion-Desktop-Firefox-linux.png +0 -0
  135. package/src/lib/accordion/ui.test.ts-snapshots/snapshots-accordion-Desktop-Safari-darwin.png +0 -0
  136. package/src/lib/accordion/ui.test.ts-snapshots/snapshots-accordion-Desktop-Safari-linux.png +0 -0
  137. package/src/lib/accordion-item/README.md +0 -113
  138. package/src/lib/accordion-item/accordion-item.scss +0 -91
  139. package/src/lib/accordion-item/accordion-item.spec.ts +0 -103
  140. package/src/lib/accordion-item/accordion-item.template.ts +0 -62
  141. package/src/lib/accordion-item/accordion-item.ts +0 -67
  142. package/src/lib/accordion-item/index.ts +0 -14
  143. package/src/lib/accordion-item/partials/variables.scss +0 -1
  144. package/src/lib/accordion-item/ui.test.ts +0 -37
  145. package/src/lib/accordion-item/ui.test.ts-snapshots/snapshots-accordion-item-Chrome-Stable-darwin.png +0 -0
  146. package/src/lib/accordion-item/ui.test.ts-snapshots/snapshots-accordion-item-Chrome-Stable-linux.png +0 -0
  147. package/src/lib/accordion-item/ui.test.ts-snapshots/snapshots-accordion-item-Desktop-Firefox-darwin.png +0 -0
  148. package/src/lib/accordion-item/ui.test.ts-snapshots/snapshots-accordion-item-Desktop-Firefox-linux.png +0 -0
  149. package/src/lib/accordion-item/ui.test.ts-snapshots/snapshots-accordion-item-Desktop-Safari-darwin.png +0 -0
  150. package/src/lib/accordion-item/ui.test.ts-snapshots/snapshots-accordion-item-Desktop-Safari-linux.png +0 -0
  151. package/src/lib/badge/README.md +0 -112
  152. package/src/lib/badge/badge.scss +0 -64
  153. package/src/lib/badge/badge.spec.ts +0 -114
  154. package/src/lib/badge/badge.template.ts +0 -36
  155. package/src/lib/badge/badge.ts +0 -97
  156. package/src/lib/badge/index.ts +0 -23
  157. package/src/lib/badge/ui.test.ts +0 -28
  158. package/src/lib/badge/ui.test.ts-snapshots/snapshots-badge-Chrome-Stable-darwin.png +0 -0
  159. package/src/lib/badge/ui.test.ts-snapshots/snapshots-badge-Chrome-Stable-linux.png +0 -0
  160. package/src/lib/badge/ui.test.ts-snapshots/snapshots-badge-Desktop-Firefox-darwin.png +0 -0
  161. package/src/lib/badge/ui.test.ts-snapshots/snapshots-badge-Desktop-Firefox-linux.png +0 -0
  162. package/src/lib/badge/ui.test.ts-snapshots/snapshots-badge-Desktop-Safari-darwin.png +0 -0
  163. package/src/lib/badge/ui.test.ts-snapshots/snapshots-badge-Desktop-Safari-linux.png +0 -0
  164. package/src/lib/banner/README.md +0 -117
  165. package/src/lib/banner/banner.scss +0 -71
  166. package/src/lib/banner/banner.spec.ts +0 -355
  167. package/src/lib/banner/banner.template.ts +0 -61
  168. package/src/lib/banner/banner.ts +0 -77
  169. package/src/lib/banner/index.ts +0 -14
  170. package/src/lib/banner/ui.test.ts +0 -64
  171. package/src/lib/banner/ui.test.ts-snapshots/snapshots-banner-Chrome-Stable-darwin.png +0 -0
  172. package/src/lib/banner/ui.test.ts-snapshots/snapshots-banner-Chrome-Stable-linux.png +0 -0
  173. package/src/lib/banner/ui.test.ts-snapshots/snapshots-banner-Desktop-Firefox-darwin.png +0 -0
  174. package/src/lib/banner/ui.test.ts-snapshots/snapshots-banner-Desktop-Firefox-linux.png +0 -0
  175. package/src/lib/banner/ui.test.ts-snapshots/snapshots-banner-Desktop-Safari-darwin.png +0 -0
  176. package/src/lib/banner/ui.test.ts-snapshots/snapshots-banner-Desktop-Safari-linux.png +0 -0
  177. package/src/lib/breadcrumb/README.md +0 -25
  178. package/src/lib/breadcrumb/breadcrumb.scss +0 -3
  179. package/src/lib/breadcrumb/breadcrumb.spec.ts +0 -78
  180. package/src/lib/breadcrumb/breadcrumb.ts +0 -10
  181. package/src/lib/breadcrumb/index.ts +0 -13
  182. package/src/lib/breadcrumb/ui.test.ts +0 -36
  183. package/src/lib/breadcrumb/ui.test.ts-snapshots/snapshots-breadcrumb-Chrome-Stable-darwin.png +0 -0
  184. package/src/lib/breadcrumb/ui.test.ts-snapshots/snapshots-breadcrumb-Chrome-Stable-linux.png +0 -0
  185. package/src/lib/breadcrumb/ui.test.ts-snapshots/snapshots-breadcrumb-Desktop-Firefox-darwin.png +0 -0
  186. package/src/lib/breadcrumb/ui.test.ts-snapshots/snapshots-breadcrumb-Desktop-Firefox-linux.png +0 -0
  187. package/src/lib/breadcrumb/ui.test.ts-snapshots/snapshots-breadcrumb-Desktop-Safari-darwin.png +0 -0
  188. package/src/lib/breadcrumb/ui.test.ts-snapshots/snapshots-breadcrumb-Desktop-Safari-linux.png +0 -0
  189. package/src/lib/breadcrumb-item/README.md +0 -40
  190. package/src/lib/breadcrumb-item/breadcrumb-item.scss +0 -28
  191. package/src/lib/breadcrumb-item/breadcrumb-item.spec.ts +0 -192
  192. package/src/lib/breadcrumb-item/breadcrumb-item.template.ts +0 -37
  193. package/src/lib/breadcrumb-item/breadcrumb-item.ts +0 -15
  194. package/src/lib/breadcrumb-item/index.ts +0 -16
  195. package/src/lib/breadcrumb-item/ui.test.ts +0 -38
  196. package/src/lib/breadcrumb-item/ui.test.ts-snapshots/snapshots-breadcrumb-item-Chrome-Stable-darwin.png +0 -0
  197. package/src/lib/breadcrumb-item/ui.test.ts-snapshots/snapshots-breadcrumb-item-Chrome-Stable-linux.png +0 -0
  198. package/src/lib/breadcrumb-item/ui.test.ts-snapshots/snapshots-breadcrumb-item-Desktop-Firefox-darwin.png +0 -0
  199. package/src/lib/breadcrumb-item/ui.test.ts-snapshots/snapshots-breadcrumb-item-Desktop-Firefox-linux.png +0 -0
  200. package/src/lib/breadcrumb-item/ui.test.ts-snapshots/snapshots-breadcrumb-item-Desktop-Safari-darwin.png +0 -0
  201. package/src/lib/breadcrumb-item/ui.test.ts-snapshots/snapshots-breadcrumb-item-Desktop-Safari-linux.png +0 -0
  202. package/src/lib/button/README.md +0 -120
  203. package/src/lib/button/button.scss +0 -142
  204. package/src/lib/button/button.spec.ts +0 -131
  205. package/src/lib/button/button.template.ts +0 -89
  206. package/src/lib/button/button.ts +0 -95
  207. package/src/lib/button/index.ts +0 -25
  208. package/src/lib/button/partials/variables.scss +0 -2
  209. package/src/lib/button/ui.test.ts +0 -32
  210. package/src/lib/button/ui.test.ts-snapshots/snapshots-button-Chrome-Stable-darwin.png +0 -0
  211. package/src/lib/button/ui.test.ts-snapshots/snapshots-button-Chrome-Stable-linux.png +0 -0
  212. package/src/lib/button/ui.test.ts-snapshots/snapshots-button-Desktop-Firefox-darwin.png +0 -0
  213. package/src/lib/button/ui.test.ts-snapshots/snapshots-button-Desktop-Firefox-linux.png +0 -0
  214. package/src/lib/button/ui.test.ts-snapshots/snapshots-button-Desktop-Safari-darwin.png +0 -0
  215. package/src/lib/button/ui.test.ts-snapshots/snapshots-button-Desktop-Safari-linux.png +0 -0
  216. package/src/lib/calendar/README.md +0 -70
  217. package/src/lib/calendar/calendar.scss +0 -176
  218. package/src/lib/calendar/calendar.spec.ts +0 -341
  219. package/src/lib/calendar/calendar.template.ts +0 -93
  220. package/src/lib/calendar/calendar.ts +0 -139
  221. package/src/lib/calendar/helpers/calendar.date-functions.ts +0 -31
  222. package/src/lib/calendar/helpers/calendar.event-context.ts +0 -72
  223. package/src/lib/calendar/helpers/calendar.keyboard-interactions.ts +0 -65
  224. package/src/lib/calendar/index.ts +0 -16
  225. package/src/lib/calendar/partials/_variables.scss +0 -15
  226. package/src/lib/calendar/ui.test.ts +0 -32
  227. package/src/lib/calendar/ui.test.ts-snapshots/snapshots-calendar-Chrome-Stable-darwin.png +0 -0
  228. package/src/lib/calendar/ui.test.ts-snapshots/snapshots-calendar-Chrome-Stable-linux.png +0 -0
  229. package/src/lib/calendar/ui.test.ts-snapshots/snapshots-calendar-Desktop-Firefox-darwin.png +0 -0
  230. package/src/lib/calendar/ui.test.ts-snapshots/snapshots-calendar-Desktop-Firefox-linux.png +0 -0
  231. package/src/lib/calendar/ui.test.ts-snapshots/snapshots-calendar-Desktop-Safari-darwin.png +0 -0
  232. package/src/lib/calendar/ui.test.ts-snapshots/snapshots-calendar-Desktop-Safari-linux.png +0 -0
  233. package/src/lib/components.spec.ts +0 -7
  234. package/src/lib/elevation/README.md +0 -99
  235. package/src/lib/elevation/elevation.scss +0 -15
  236. package/src/lib/elevation/elevation.spec.ts +0 -55
  237. package/src/lib/elevation/elevation.template.ts +0 -26
  238. package/src/lib/elevation/elevation.ts +0 -17
  239. package/src/lib/elevation/index.ts +0 -17
  240. package/src/lib/elevation/partials/_elevation.mixin.scss +0 -4
  241. package/src/lib/elevation/ui.test.ts +0 -32
  242. package/src/lib/elevation/ui.test.ts-snapshots/snapshots-elevation-Chrome-Stable-darwin.png +0 -0
  243. package/src/lib/elevation/ui.test.ts-snapshots/snapshots-elevation-Chrome-Stable-linux.png +0 -0
  244. package/src/lib/elevation/ui.test.ts-snapshots/snapshots-elevation-Desktop-Firefox-darwin.png +0 -0
  245. package/src/lib/elevation/ui.test.ts-snapshots/snapshots-elevation-Desktop-Firefox-linux.png +0 -0
  246. package/src/lib/elevation/ui.test.ts-snapshots/snapshots-elevation-Desktop-Safari-darwin.png +0 -0
  247. package/src/lib/elevation/ui.test.ts-snapshots/snapshots-elevation-Desktop-Safari-linux.png +0 -0
  248. package/src/lib/enums.ts +0 -55
  249. package/src/lib/focus/README.md +0 -1
  250. package/src/lib/focus/focus.scss +0 -17
  251. package/src/lib/focus/focus.template.ts +0 -16
  252. package/src/lib/focus/focus.ts +0 -10
  253. package/src/lib/focus/index.ts +0 -21
  254. package/src/lib/focus/partials/variables.scss +0 -2
  255. package/src/lib/icon/README.md +0 -70
  256. package/src/lib/icon/__snapshots__/icon.spec.ts.snap +0 -16
  257. package/src/lib/icon/icon.placeholder.ts +0 -12
  258. package/src/lib/icon/icon.scss +0 -52
  259. package/src/lib/icon/icon.spec.ts +0 -106
  260. package/src/lib/icon/icon.template.ts +0 -23
  261. package/src/lib/icon/icon.ts +0 -93
  262. package/src/lib/icon/index.ts +0 -14
  263. package/src/lib/layout/README.md +0 -154
  264. package/src/lib/layout/index.ts +0 -18
  265. package/src/lib/layout/layout.scss +0 -40
  266. package/src/lib/layout/layout.spec.ts +0 -73
  267. package/src/lib/layout/layout.template.ts +0 -29
  268. package/src/lib/layout/layout.ts +0 -46
  269. package/src/lib/layout/partials/_functions.scss +0 -15
  270. package/src/lib/layout/partials/_mixins.scss +0 -5
  271. package/src/lib/layout/partials/_variables.scss +0 -23
  272. package/src/lib/layout/ui.test.ts +0 -32
  273. package/src/lib/layout/ui.test.ts-snapshots/snapshots-layout-Chrome-Stable-darwin.png +0 -0
  274. package/src/lib/layout/ui.test.ts-snapshots/snapshots-layout-Chrome-Stable-linux.png +0 -0
  275. package/src/lib/layout/ui.test.ts-snapshots/snapshots-layout-Desktop-Firefox-darwin.png +0 -0
  276. package/src/lib/layout/ui.test.ts-snapshots/snapshots-layout-Desktop-Firefox-linux.png +0 -0
  277. package/src/lib/layout/ui.test.ts-snapshots/snapshots-layout-Desktop-Safari-darwin.png +0 -0
  278. package/src/lib/layout/ui.test.ts-snapshots/snapshots-layout-Desktop-Safari-linux.png +0 -0
  279. package/src/lib/popup/README.md +0 -261
  280. package/src/lib/popup/index.ts +0 -21
  281. package/src/lib/popup/popup.scss +0 -43
  282. package/src/lib/popup/popup.spec.ts +0 -265
  283. package/src/lib/popup/popup.template.ts +0 -41
  284. package/src/lib/popup/popup.ts +0 -158
  285. package/src/lib/popup/ui.test.ts +0 -111
  286. package/src/lib/popup/ui.test.ts-snapshots/snapshots-popup-Chrome-Stable-darwin.png +0 -0
  287. package/src/lib/popup/ui.test.ts-snapshots/snapshots-popup-Chrome-Stable-linux.png +0 -0
  288. package/src/lib/popup/ui.test.ts-snapshots/snapshots-popup-Desktop-Firefox-darwin.png +0 -0
  289. package/src/lib/popup/ui.test.ts-snapshots/snapshots-popup-Desktop-Firefox-linux.png +0 -0
  290. package/src/lib/popup/ui.test.ts-snapshots/snapshots-popup-Desktop-Safari-darwin.png +0 -0
  291. package/src/lib/popup/ui.test.ts-snapshots/snapshots-popup-Desktop-Safari-linux.png +0 -0
  292. package/src/lib/progress/README.md +0 -107
  293. package/src/lib/progress/index.ts +0 -14
  294. package/src/lib/progress/progress.scss +0 -133
  295. package/src/lib/progress/progress.spec.ts +0 -173
  296. package/src/lib/progress/progress.template.ts +0 -62
  297. package/src/lib/progress/progress.ts +0 -25
  298. package/src/lib/progress/ui.test.ts +0 -70
  299. package/src/lib/progress/ui.test.ts-snapshots/snapshots-progress-Chrome-Stable-darwin.png +0 -0
  300. package/src/lib/progress/ui.test.ts-snapshots/snapshots-progress-Chrome-Stable-linux.png +0 -0
  301. package/src/lib/progress/ui.test.ts-snapshots/snapshots-progress-Desktop-Firefox-darwin.png +0 -0
  302. package/src/lib/progress/ui.test.ts-snapshots/snapshots-progress-Desktop-Firefox-linux.png +0 -0
  303. package/src/lib/progress/ui.test.ts-snapshots/snapshots-progress-Desktop-Safari-darwin.png +0 -0
  304. package/src/lib/progress/ui.test.ts-snapshots/snapshots-progress-Desktop-Safari-linux.png +0 -0
  305. package/src/lib/progress-ring/README.md +0 -90
  306. package/src/lib/progress-ring/index.ts +0 -15
  307. package/src/lib/progress-ring/progress-ring.scss +0 -75
  308. package/src/lib/progress-ring/progress-ring.spec.ts +0 -139
  309. package/src/lib/progress-ring/progress-ring.template.ts +0 -82
  310. package/src/lib/progress-ring/progress-ring.ts +0 -18
  311. package/src/lib/progress-ring/ui.test.ts +0 -35
  312. package/src/lib/progress-ring/ui.test.ts-snapshots/snapshots-progress-ring-Chrome-Stable-darwin.png +0 -0
  313. package/src/lib/progress-ring/ui.test.ts-snapshots/snapshots-progress-ring-Chrome-Stable-linux.png +0 -0
  314. package/src/lib/progress-ring/ui.test.ts-snapshots/snapshots-progress-ring-Desktop-Firefox-darwin.png +0 -0
  315. package/src/lib/progress-ring/ui.test.ts-snapshots/snapshots-progress-ring-Desktop-Firefox-linux.png +0 -0
  316. package/src/lib/progress-ring/ui.test.ts-snapshots/snapshots-progress-ring-Desktop-Safari-darwin.png +0 -0
  317. package/src/lib/progress-ring/ui.test.ts-snapshots/snapshots-progress-ring-Desktop-Safari-linux.png +0 -0
  318. package/src/lib/side-drawer/README.md +0 -304
  319. package/src/lib/side-drawer/index.ts +0 -16
  320. package/src/lib/side-drawer/partials/variables.scss +0 -6
  321. package/src/lib/side-drawer/side-drawer.scss +0 -109
  322. package/src/lib/side-drawer/side-drawer.spec.ts +0 -118
  323. package/src/lib/side-drawer/side-drawer.template.ts +0 -51
  324. package/src/lib/side-drawer/side-drawer.ts +0 -58
  325. package/src/lib/side-drawer/ui.test.ts +0 -102
  326. package/src/lib/side-drawer/ui.test.ts-snapshots/snapshots-side-drawer-Chrome-Stable-darwin.png +0 -0
  327. package/src/lib/side-drawer/ui.test.ts-snapshots/snapshots-side-drawer-Chrome-Stable-linux.png +0 -0
  328. package/src/lib/side-drawer/ui.test.ts-snapshots/snapshots-side-drawer-Desktop-Firefox-darwin.png +0 -0
  329. package/src/lib/side-drawer/ui.test.ts-snapshots/snapshots-side-drawer-Desktop-Firefox-linux.png +0 -0
  330. package/src/lib/side-drawer/ui.test.ts-snapshots/snapshots-side-drawer-Desktop-Safari-darwin.png +0 -0
  331. package/src/lib/side-drawer/ui.test.ts-snapshots/snapshots-side-drawer-Desktop-Safari-linux.png +0 -0
  332. package/src/lib/side-drawer/ui.test.ts-snapshots/snapshots-side-drawer-modal-Chrome-Stable-darwin.png +0 -0
  333. package/src/lib/side-drawer/ui.test.ts-snapshots/snapshots-side-drawer-modal-Chrome-Stable-linux.png +0 -0
  334. package/src/lib/side-drawer/ui.test.ts-snapshots/snapshots-side-drawer-modal-Desktop-Firefox-darwin.png +0 -0
  335. package/src/lib/side-drawer/ui.test.ts-snapshots/snapshots-side-drawer-modal-Desktop-Firefox-linux.png +0 -0
  336. package/src/lib/side-drawer/ui.test.ts-snapshots/snapshots-side-drawer-modal-Desktop-Safari-darwin.png +0 -0
  337. package/src/lib/side-drawer/ui.test.ts-snapshots/snapshots-side-drawer-modal-Desktop-Safari-linux.png +0 -0
  338. package/src/lib/sidenav-item/README.md +0 -41
  339. package/src/lib/sidenav-item/index.ts +0 -20
  340. package/src/lib/sidenav-item/sidenav-item.scss +0 -51
  341. package/src/lib/sidenav-item/sidenav-item.spec.ts +0 -64
  342. package/src/lib/sidenav-item/sidenav-item.template.ts +0 -25
  343. package/src/lib/sidenav-item/sidenav-item.ts +0 -15
  344. package/src/lib/sidenav-item/ui.test.ts +0 -32
  345. package/src/lib/sidenav-item/ui.test.ts-snapshots/snapshots-sidenav-item-Chrome-Stable-darwin.png +0 -0
  346. package/src/lib/sidenav-item/ui.test.ts-snapshots/snapshots-sidenav-item-Chrome-Stable-linux.png +0 -0
  347. package/src/lib/sidenav-item/ui.test.ts-snapshots/snapshots-sidenav-item-Desktop-Firefox-darwin.png +0 -0
  348. package/src/lib/sidenav-item/ui.test.ts-snapshots/snapshots-sidenav-item-Desktop-Firefox-linux.png +0 -0
  349. package/src/lib/sidenav-item/ui.test.ts-snapshots/snapshots-sidenav-item-Desktop-Safari-darwin.png +0 -0
  350. package/src/lib/sidenav-item/ui.test.ts-snapshots/snapshots-sidenav-item-Desktop-Safari-linux.png +0 -0
  351. package/src/lib/text/README.md +0 -119
  352. package/src/lib/text/index.ts +0 -14
  353. package/src/lib/text/text.scss +0 -92
  354. package/src/lib/text/text.spec.ts +0 -54
  355. package/src/lib/text/text.template.ts +0 -28
  356. package/src/lib/text/text.ts +0 -55
  357. package/src/lib/text/ui.test.ts +0 -39
  358. package/src/lib/text/ui.test.ts-snapshots/snapshots-text-Chrome-Stable-darwin.png +0 -0
  359. package/src/lib/text/ui.test.ts-snapshots/snapshots-text-Chrome-Stable-linux.png +0 -0
  360. package/src/lib/text/ui.test.ts-snapshots/snapshots-text-Desktop-Firefox-darwin.png +0 -0
  361. package/src/lib/text/ui.test.ts-snapshots/snapshots-text-Desktop-Firefox-linux.png +0 -0
  362. package/src/lib/text/ui.test.ts-snapshots/snapshots-text-Desktop-Safari-darwin.png +0 -0
  363. package/src/lib/text/ui.test.ts-snapshots/snapshots-text-Desktop-Safari-linux.png +0 -0
  364. package/src/lib/text-anchor/README.md +0 -5
  365. package/src/lib/text-anchor/index.ts +0 -12
  366. package/src/lib/text-anchor/text-anchor.spec.ts +0 -153
  367. package/src/lib/text-anchor/text-anchor.template.ts +0 -66
  368. package/src/lib/text-anchor/text-anchor.ts +0 -22
  369. package/src/lib/tooltip/README.md +0 -132
  370. package/src/lib/tooltip/index.ts +0 -16
  371. package/src/lib/tooltip/partials/variables.scss +0 -1
  372. package/src/lib/tooltip/tooltip.scss +0 -18
  373. package/src/lib/tooltip/tooltip.spec.ts +0 -70
  374. package/src/lib/tooltip/tooltip.template.ts +0 -30
  375. package/src/lib/tooltip/tooltip.ts +0 -44
  376. package/src/lib/tooltip/ui.test.ts +0 -53
  377. package/src/lib/tooltip/ui.test.ts-snapshots/snapshots-tooltip-Chrome-Stable-darwin.png +0 -0
  378. package/src/lib/tooltip/ui.test.ts-snapshots/snapshots-tooltip-Chrome-Stable-linux.png +0 -0
  379. package/src/lib/tooltip/ui.test.ts-snapshots/snapshots-tooltip-Desktop-Firefox-darwin.png +0 -0
  380. package/src/lib/tooltip/ui.test.ts-snapshots/snapshots-tooltip-Desktop-Firefox-linux.png +0 -0
  381. package/src/lib/tooltip/ui.test.ts-snapshots/snapshots-tooltip-Desktop-Safari-darwin.png +0 -0
  382. package/src/lib/tooltip/ui.test.ts-snapshots/snapshots-tooltip-Desktop-Safari-linux.png +0 -0
  383. package/src/shared/design-system/index.ts +0 -12
  384. package/src/shared/patterns/affix.ts +0 -56
  385. package/src/types/extract-gfm.d.ts +0 -5
  386. package/src/types/style.d.ts +0 -4
  387. package/src/visual-tests/visual-tests-utils.ts +0 -76
  388. package/tsconfig.json +0 -36
  389. package/tsconfig.lib.json +0 -11
  390. package/tsconfig.spec.json +0 -16
package/project.json DELETED
@@ -1,122 +0,0 @@
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
- }
@@ -1,50 +0,0 @@
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
- };
package/setupJestTests.js DELETED
@@ -1,17 +0,0 @@
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,55 +0,0 @@
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.
@@ -1,10 +0,0 @@
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
- }
@@ -1,91 +0,0 @@
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
- });
@@ -1,23 +0,0 @@
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>`;
@@ -1,49 +0,0 @@
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
- }
@@ -1,14 +0,0 @@
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());
@@ -1,37 +0,0 @@
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
- });
@@ -1,113 +0,0 @@
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
- ```
@@ -1,91 +0,0 @@
1
- @use 'partials/variables' as variables;
2
- @use '../../../../shared/src/lib/sass/mixins/typography' as typography;
3
- @use '../../../../../node_modules/@vonage/vivid-tokens/dist/sass/themes/consts' as theme-consts;
4
-
5
- .body {
6
- @include typography.typography-cat-shorthand('body-2');
7
-
8
- padding: 8px 32px 24px 16px;
9
- .icon:not(.icon-trailing) &{
10
- padding-left: 48px;
11
- }
12
- }
13
-
14
- .control {
15
- display: flex;
16
- flex-direction: column;
17
-
18
- &:not(.open) {
19
- .toggle-close,
20
- .body {
21
- display: none;
22
- }
23
- }
24
- &.open{
25
- .toggle-open {
26
- display: none;
27
- }
28
- .toggle-close {
29
- display: initial;
30
- }
31
- }
32
- }
33
-
34
- .header {
35
- padding: 0;
36
- margin: 0;
37
- }
38
-
39
- .button {
40
- @include typography.typography-cat-shorthand('subtitle-2');
41
-
42
- position: relative;
43
- display: flex;
44
- width: 100%;
45
- align-items: center;
46
- padding: 16px;
47
- border: 0 none;
48
- background: transparent;
49
- cursor: pointer;
50
-
51
- &:hover {
52
- background: var(#{theme-consts.$vvd-color-neutral-10});
53
- }
54
-
55
- .heading-text {
56
- flex-grow: 1;
57
- margin-inline-end: auto;
58
- text-align: left;
59
- }
60
-
61
- .meta {
62
- @include typography.typography-cat-shorthand('body-2-bold');
63
-
64
- overflow: hidden;
65
- max-width: 20%;
66
- flex-shrink: 0;
67
- color: var(#{theme-consts.$vvd-color-neutral-70});
68
- margin-inline-start: 1rem;
69
- text-align: end;
70
- text-overflow: ellipsis;
71
- white-space: nowrap;
72
- }
73
-
74
- .indicator {
75
- display: flex;
76
- vwc-icon,
77
- slot[name="indicator"i]::slotted(vwc-icon) {
78
- margin-inline-start: 16px;
79
- }
80
- }
81
-
82
- .icon {
83
- margin-inline-end: 16px;
84
- }
85
- }
86
-
87
- /* Icon */
88
-
89
- .icon-trailing .icon {
90
- order: 1;
91
- }