@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/src/lib/enums.ts DELETED
@@ -1,55 +0,0 @@
1
- /* eslint-disable no-shadow */
2
- export enum Connotation {
3
- Primary = 'primary',
4
- CTA = 'cta',
5
- Success = 'success',
6
- Alert = 'alert',
7
- Warning = 'warning',
8
- Info = 'info',
9
- Announcement = 'announcement',
10
- }
11
-
12
- export enum ConnotationDecorative {
13
- Pacific = 'pacific',
14
- }
15
-
16
- /* eslint-disable no-shadow */
17
- export enum Shape {
18
- Rounded = 'rounded',
19
- Pill = 'pill',
20
- Circled = 'circled',
21
- Sharp = 'sharp'
22
- }
23
-
24
- /* eslint-disable no-shadow */
25
- export enum Appearance {
26
- Text = 'text',
27
- Filled = 'filled',
28
- Outlined = 'outlined',
29
- Subtle = 'subtle',
30
- Ghost = 'ghost',
31
- }
32
-
33
- export enum Size {
34
- BaseSmall = 'base-small',
35
- Base = 'base',
36
- BaseLarge = 'base-large',
37
- }
38
-
39
- export enum Position {
40
- Top = 'TOP',
41
- Bottom = 'BOTTOM',
42
- Start = 'START',
43
- Center = 'CENTER',
44
- End = 'END',
45
- }
46
-
47
- export enum Role {
48
- Status = 'status',
49
- Alert = 'alert',
50
- }
51
-
52
- export enum AriaLive {
53
- Polite = 'polite',
54
- Assertive = 'assertive',
55
- }
@@ -1 +0,0 @@
1
- # focus
@@ -1,17 +0,0 @@
1
- @use '../../../../../node_modules/@vonage/vivid-tokens/dist/sass/themes/consts' as theme-consts;
2
- @use 'partials/variables' as variables;
3
-
4
-
5
- :host {
6
- display: contents;
7
- border-radius: inherit;
8
- }
9
-
10
- .control {
11
- position: absolute;
12
- box-sizing: border-box;
13
- border-radius: inherit;
14
- box-shadow: inset 0 0 0 2px var(#{variables.$focus-stroke-color}, var(#{theme-consts.$vvd-color-on-canvas})),
15
- inset 0 0 0 3px var(#{variables.$focus-stroke-gap-color}, currentColor);
16
- inset: 0;
17
- }
@@ -1,16 +0,0 @@
1
- import { html } from '@microsoft/fast-element';
2
- import type { ViewTemplate } from '@microsoft/fast-element';
3
- import type { ElementDefinitionContext, FoundationElementDefinition } from '@microsoft/fast-foundation';
4
- import type { Focus } from './focus';
5
-
6
- /**
7
- * The template for the {@link @microsoft/fast-foundation#Focus} component.
8
- *
9
- * @param context
10
- * @public
11
- */
12
- export const focusTemplate: (
13
- context: ElementDefinitionContext,
14
- definition: FoundationElementDefinition
15
- ) => ViewTemplate<Focus> = () => html`
16
- <span class="control"></span>`;
@@ -1,10 +0,0 @@
1
- import { FoundationElement } from '@microsoft/fast-foundation';
2
-
3
- /**
4
- * Base class for badge
5
- *
6
- * @public
7
- */
8
- export class Focus extends FoundationElement {
9
-
10
- }
@@ -1,21 +0,0 @@
1
- import type { FoundationElementDefinition } from '@microsoft/fast-foundation';
2
- import { designSystem } from '../../shared/design-system';
3
- import { Focus } from './focus';
4
- import styles from './focus.scss';
5
- import { focusTemplate as template } from './focus.template';
6
-
7
-
8
- /**
9
- * Represents a focus custom element.
10
- * focus is a label that holds small amounts of information.
11
- * A focus can be used to display unread notifications, or to label a block of text.
12
- * Focuss don’t work for navigation because they can't include a hyperlink.
13
- */
14
-
15
- export const VIVIDFocus = Focus.compose<FoundationElementDefinition>({
16
- baseName: 'focus',
17
- template: template as any,
18
- styles,
19
- });
20
-
21
- designSystem.register(VIVIDFocus());
@@ -1,2 +0,0 @@
1
- $focus-stroke-color: --focus-stroke-color;
2
- $focus-stroke-gap-color: --focus-stroke-gap-color;
@@ -1,70 +0,0 @@
1
- # icon
2
-
3
- Find the icon you want to use on the [vivid icons search platform](https://icons.vivid.vonage.com).
4
-
5
- ```js
6
- <script type='module'>
7
- import '@vonage/vivid/icon';
8
- </script>
9
- ```
10
-
11
- ```html preview
12
- <p>I <vwc-icon type='heart-line' connotation='alert'></vwc-icon> VIVID!</p>
13
- ```
14
-
15
- ## Type
16
-
17
- - Type: `String`
18
- - Default: `''`
19
-
20
- Add a `type` attribute to add type to the icon.
21
-
22
- ```html preview
23
- <vwc-icon type='profile-line'></vwc-icon>
24
- ```
25
-
26
- ## SVG
27
-
28
- While `type` fetches an icon from the Vivid predefined set of icons, `svg` property can be used to set a customized valid SVG string programmatically.
29
-
30
- ```html preview
31
- <vwc-icon id='icon'></vwc-icon>
32
-
33
- <script>
34
- icon.svg = `
35
- <svg viewBox="0 0 24 24">
36
- <path fill="currentColor"
37
- d="M6.11922 10.1706C5.8213 10.0548 5.49473 10.064 5.21134 10.1962 4.92796 10.3283 4.71098 10.5726 4.60814 10.8752 4.50529 11.1778 4.52501 11.514 4.66295 11.8098L7.61024 18.1303C8.43788 19.9052 9.90708 21.2924 11.6946 21.9868 13.4821 22.6812 15.4416 22.6259 17.1419 21.833L18.5366 21.1827C19.4417 20.7603 20.2431 20.1426 20.8882 19.3702 21.5333 18.5979 22.0073 17.6885 22.2792 16.7017L23.6271 11.8184C23.7189 11.5145 23.7087 11.1844 23.5983 10.8802 23.4878 10.5759 23.2832 10.3147 23.0168 10.1377 22.7339 9.96294 22.4024 9.89734 22.0836 9.95301 21.7647 10.0087 21.48 10.1818 21.2822 10.4405L19.4217 12.8724C19.3395 12.9796 19.2313 13.0626 19.1074 13.1135 18.9835 13.1643 18.848 13.1813 18.7137 13.1629 18.5793 13.1444 18.4507 13.0911 18.34 13.0081 18.2292 12.925 18.1401 12.8149 18.0809 12.6882L14.6545 5.34015C14.5165 5.04433 14.2717 4.81313 13.9737 4.69739 13.6758 4.58166 13.3492 4.59088 13.0658 4.72302 12.7825 4.85517 12.5655 5.09941 12.4626 5.40202 12.3598 5.70464 12.3795 6.04083 12.5175 6.33665L15.118 11.9135 14.4057 12.2457 11.4584 5.92523C11.3204 5.62941 11.0756 5.39821 10.7777 5.28247 10.4797 5.16674 10.1532 5.17596 9.86978 5.3081 9.5864 5.44024 9.36942 5.68449 9.26658 5.9871 9.16373 6.28972 9.18345 6.62591 9.32139 6.92173L12.2687 13.2422 11.5563 13.5744 8.9558 7.99748C8.81786 7.70166 8.57299 7.47045 8.27507 7.35472 7.97715 7.23899 7.65058 7.2482 7.36719 7.38035 7.08381 7.51249 6.86683 7.75674 6.76399 8.05935 6.66114 8.36196 6.68086 8.69816 6.8188 8.99397L9.41935 14.5709 8.70701 14.903 6.79995 10.8133C6.66201 10.5175 6.41714 10.2863 6.11922 10.1706zM17.3109 2.18607C17.4526 1.79684 17.883 1.59615 18.2722 1.73782 20.6132 2.58987 21.8202 5.17835 20.9682 7.51935 20.8265 7.90858 20.3961 8.10927 20.0069 7.9676 19.6177 7.82593 19.417 7.39555 19.5586 7.00632 20.1273 5.44379 19.3217 3.71607 17.7592 3.14736 17.3699 3.00569 17.1692 2.57531 17.3109 2.18607zM4.51646 19.5137C4.37479 19.9029 3.9444 20.1036 3.55517 19.9619 1.21417 19.1099.00714505 16.5214.859199 14.1804 1.00087 13.7912 1.43125 13.5905 1.82048 13.7322 2.20972 13.8738 2.41041 14.3042 2.26874 14.6934 1.70002 16.256 2.50567 17.9837 4.0682 18.5524 4.45743 18.6941 4.65812 19.1245 4.51646 19.5137zM17.0317 3.59159C16.6425 3.44992 16.2121 3.65061 16.0704 4.03984 15.9287 4.42908 16.1294 4.85946 16.5187 5.00113 17.2333 5.26124 17.6018 6.05143 17.3417 6.76607 17.2 7.15531 17.4007 7.58569 17.7899 7.72736 18.1792 7.86903 18.6095 7.66834 18.7512 7.2791 19.2947 5.78599 18.5248 4.13504 17.0317 3.59159zM5.75684 17.6599C5.61517 18.0492 5.18479 18.2499 4.79556 18.1082 3.30245 17.5647 2.5326 15.9138 3.07604 14.4207 3.21771 14.0315 3.6481 13.8308 4.03733 13.9724 4.42656 14.1141 4.62725 14.5445 4.48558 14.9337 4.22547 15.6484 4.59395 16.4386 5.30859 16.6987 5.69782 16.8403 5.89851 17.2707 5.75684 17.6599z">
38
- </path>
39
- </svg>
40
- `;
41
- </script>
42
- ```
43
-
44
- ## Connotation
45
-
46
- Set the `connotation` attribute to change the icon's connotation.
47
- It accepts a subset of predefined values.
48
-
49
- - Type: `'primary'` | `'announcement'` | `'cta'` | `'success'` | `'alert'` | `'info'`
50
- - Default: `'primary'`
51
-
52
- ```html preview
53
- <vwc-icon type='heart-solid' connotation='primary'></vwc-icon>
54
- <vwc-icon type='heart-solid' connotation='announcement'></vwc-icon>
55
- <vwc-icon type='heart-solid' connotation='cta'></vwc-icon>
56
- <vwc-icon type='heart-solid' connotation='success'></vwc-icon>
57
- <vwc-icon type='heart-solid' connotation='alert'></vwc-icon>
58
- <vwc-icon type='heart-solid' connotation='info'></vwc-icon>
59
- ```
60
-
61
- Use the `size` attribute to change the icon's size.
62
-
63
- - Type: `'base-small'` | `'base'` | `'base-large'`
64
- - Default: `'base'`
65
-
66
- ```html preview
67
- <vwc-icon type='close-line' size='base-small'></vwc-icon>
68
- <vwc-icon type='close-line' size='base'></vwc-icon>
69
- <vwc-icon type='close-line' size='base-large'></vwc-icon>
70
- ```
@@ -1,16 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`icon should set the icon as loading after 500ms 1`] = `
4
- "<svg width=\\"80%\\" height=\\"80%\\" viewBox=\\"0 0 64 64\\">
5
- <g>
6
- <g stroke-width=\\"6\\" stroke-linecap=\\"round\\" fill=\\"none\\">
7
- <path stroke=\\"currentColor\\" d=\\"M4,32 c0,15,12,28,28,28c8,0,16-4,21-9\\">
8
- </path>
9
- <path d=\\"M60,32 C60,16,47.464,4,32,4S4,16,4,32\\">
10
- </path>
11
- <animateTransform values=\\"0,32,32;360,32,32\\" attributeName=\\"transform\\" type=\\"rotate\\" repeatCount=\\"indefinite\\" dur=\\"750ms\\">
12
- </animateTransform>
13
- </g>
14
- </g>
15
- </svg>"
16
- `;
@@ -1,12 +0,0 @@
1
- export const PLACEHOLDER_ICON = `<svg width="80%" height="80%" viewBox="0 0 64 64">
2
- <g>
3
- <g stroke-width="6" stroke-linecap="round" fill="none">
4
- <path stroke="currentColor" d="M4,32 c0,15,12,28,28,28c8,0,16-4,21-9">
5
- </path>
6
- <path d="M60,32 C60,16,47.464,4,32,4S4,16,4,32">
7
- </path>
8
- <animateTransform values="0,32,32;360,32,32" attributeName="transform" type="rotate" repeatCount="indefinite" dur="750ms">
9
- </animateTransform>
10
- </g>
11
- </g>
12
- </svg>`;
@@ -1,52 +0,0 @@
1
- @use '../../../../shared/src/lib/sass/mixins/connotation/config' with (
2
- $subset: primary announcement cta success alert info
3
- );
4
-
5
- @use '../../../../shared/src/lib/sass/mixins/connotation' as connotation;
6
-
7
- :host {
8
- display: inline-block;
9
- vertical-align: sub;
10
- }
11
-
12
- .control {
13
- @include connotation.connotation;
14
-
15
- display: flex;
16
- margin: unset;
17
- color: currentColor;
18
- contain: strict;
19
- }
20
-
21
- // TODO: add a :where selector to unset any connotation variant from a mixin level
22
- .control[class*="connotation"] {
23
- color: var(#{connotation.$vvd-color-connotation});
24
- }
25
-
26
- svg {
27
- margin: auto;
28
- block-size: inherit;
29
- inline-size: inherit;
30
- }
31
-
32
- /* Size */
33
-
34
- .control:not(.size-base-small):not(.size-base):not(.size-base-large) {
35
- block-size: 1em;
36
- inline-size: 1em;
37
- }
38
-
39
- .control.size-base-small {
40
- block-size: 16px;
41
- inline-size: 16px;
42
- }
43
-
44
- .control.size-base {
45
- block-size: 24px;
46
- inline-size: 24px;
47
- }
48
-
49
- .control.size-base-large {
50
- block-size: 32px;
51
- inline-size: 32px;
52
- }
@@ -1,106 +0,0 @@
1
- import './index.ts';
2
- import {fixture} from '@vivid-nx/shared';
3
- import type {Icon} from './icon';
4
-
5
- const COMPONENT_TAG = 'vwc-icon';
6
-
7
- describe('icon', function () {
8
- let element: Icon;
9
-
10
- beforeEach(async () => {
11
- element = (await fixture(
12
- `<${COMPONENT_TAG}></${COMPONENT_TAG}>`
13
- )) as Icon;
14
- });
15
- /**
16
- * @param requestTime
17
- */
18
- function fakeFetch(requestTime = 4000) {
19
- (global.fetch as any) = jest.fn(() => {
20
- return new Promise(res => {
21
- setTimeout(() => res(response), requestTime);
22
- });
23
- });
24
- }
25
-
26
- const svg = 'svg';
27
- const response = {
28
- ok: true,
29
- headers: {
30
- get: () => {
31
- return 'image/svg+xml';
32
- }
33
- },
34
- text: () => svg
35
- };
36
- const originalFetch = global.fetch;
37
- const originalPromise = global.Promise;
38
-
39
- beforeEach(function () {
40
- global.Promise = require('promise'); // needed in order for promises to work with jest fake timers
41
- jest.useFakeTimers('legacy');
42
- });
43
-
44
- afterEach(function () {
45
- jest.useRealTimers();
46
- global.fetch = originalFetch;
47
- global.Promise = originalPromise;
48
- });
49
-
50
- /**
51
- *
52
- */
53
- function setIconTypeAndTriggerFirstTimer() {
54
- element.type = 'none';
55
- jest.advanceTimersToNextTimer();
56
- }
57
-
58
- /**
59
- * @param timeInMs
60
- */
61
- function setIconTypeAndAdvanceTime(timeInMs: number) {
62
- element.type = 'none';
63
- jest.advanceTimersByTime(timeInMs);
64
- }
65
-
66
- /**
67
- * @param iconType
68
- */
69
- function setIconTypeAndRunAllTimers(iconType: string | undefined) {
70
- element.type = iconType;
71
- jest.runAllTimers();
72
- }
73
-
74
- it('should show nothing when first changing the icon', async function () {
75
- fakeFetch(4000);
76
- setIconTypeAndTriggerFirstTimer();
77
-
78
- expect(element.svg).toEqual('');
79
- });
80
-
81
- it('should set the icon as loading after 500ms', async function () {
82
- fakeFetch(4000);
83
- setIconTypeAndAdvanceTime(500);
84
- expect(element.svg).toMatchSnapshot();
85
- });
86
-
87
- it('should remove loading icon after 2500ms', async function () {
88
- fakeFetch(4000);
89
- setIconTypeAndAdvanceTime(2500);
90
- expect(element.svg).toEqual('');
91
- });
92
-
93
- it('should set icon in svg after icon fetch', async function () {
94
- fakeFetch(100);
95
- setIconTypeAndRunAllTimers('none');
96
- expect(element.svg).toEqual(svg);
97
- });
98
-
99
- it('should show empty string when no icon is available', function () {
100
- fakeFetch(100);
101
- setIconTypeAndRunAllTimers('none');
102
- setIconTypeAndRunAllTimers(undefined);
103
- expect(element.svg).toEqual('');
104
- });
105
-
106
- });
@@ -1,23 +0,0 @@
1
- import { html, when } from '@microsoft/fast-element';
2
- import type { ViewTemplate } from '@microsoft/fast-element';
3
- import type { ElementDefinitionContext, FoundationElementDefinition } from '@microsoft/fast-foundation';
4
-
5
- import { classNames } from '@microsoft/fast-web-utilities';
6
- import type { Icon } from './icon';
7
-
8
- const getClasses = ({
9
- connotation, size,
10
- }: Icon) => classNames(
11
- 'control',
12
- [`connotation-${connotation}`, Boolean(connotation)],
13
- [`size-${size}`, Boolean(size)],
14
- );
15
-
16
- export const iconTemplate: (
17
- context: ElementDefinitionContext,
18
- definition: FoundationElementDefinition
19
- ) => ViewTemplate<Icon> = () => html`
20
- <figure class="${getClasses}">
21
- ${when((x)=> x.svg, (x) => html<Icon>`${x.svg}`)}
22
- </figure>
23
- `;
@@ -1,93 +0,0 @@
1
- import { FoundationElement } from '@microsoft/fast-foundation';
2
- import { attr, observable } from '@microsoft/fast-element';
3
- import { identity, memoizeWith } from 'ramda';
4
- import type { Connotation, Size } from '../enums';
5
- import { PLACEHOLDER_ICON } from './icon.placeholder';
6
-
7
- const BASE_URL = 'https://icon.resources.vonage.com'; // namespaced as 3f7739a0-a898-4f69-a82b-ad9d743170b6 on icons.resources.vonage.com
8
- const ICON_SET_VERSION = '4.0.27';
9
-
10
- // Start displaying placeholder if waiting more than this period of time
11
- const PLACEHOLDER_DELAY = 500;
12
- // Stop displaying placeholder if exceeding this period of time
13
- // (will also stop one an icon is loaded)
14
- const PLACEHOLDER_TIMEOUT = 2000;
15
-
16
- // const delay = (ms: number) => new Promise((res) => setTimeout(res, ms));
17
- const baseUrlTemplate = (resource: string, version: string) => [BASE_URL, `v${version}`, resource].join('/');
18
-
19
- const assertIsValidResponse = ({ ok, headers }: Response) => {
20
- if (!ok || headers.get('content-type') !== 'image/svg+xml') {
21
- throw new Error('Something went wrong');
22
- }
23
- };
24
-
25
- const extractSvg = (response: Response) => {
26
- assertIsValidResponse(response);
27
- return response.text();
28
- };
29
-
30
- const loadSvg = (iconId: string) => fetch(baseUrlTemplate([iconId, 'svg'].join('.'), ICON_SET_VERSION))
31
- .then(extractSvg);
32
-
33
- const resolveIcon = memoizeWith(identity as () => string, (iconId = '') => (iconId.trim()
34
- ? loadSvg(iconId)
35
- : Promise.resolve(''))) as (iconId?: string) => Promise<string>;
36
-
37
- /**
38
- * Types of icon connotation.
39
- *
40
- * @public
41
- */
42
- type IconConnotation = Extract<Connotation,
43
- | Connotation.Primary
44
- | Connotation.CTA
45
- | Connotation.Announcement
46
- | Connotation.Success
47
- | Connotation.Alert
48
- | Connotation.Info>;
49
-
50
- export class Icon extends FoundationElement {
51
- /**
52
- * The connotation the icon should have.
53
- *
54
- * @public
55
- * @remarks
56
- * HTML Attribute: connotation
57
- */
58
- @attr connotation?: IconConnotation;
59
-
60
- @attr size?: Size;
61
-
62
- @observable svg = '';
63
-
64
- /**
65
- * Indicates which icon to resolve.
66
- *
67
- * @public
68
- * @remarks
69
- * HTML Attribute: type
70
- */
71
- @attr type?: string;
72
-
73
- async typeChanged() {
74
- this.svg = '';
75
-
76
- let timeout = setTimeout(() => {
77
- this.svg = PLACEHOLDER_ICON;
78
- timeout = setTimeout(() => {
79
- if (this.svg === PLACEHOLDER_ICON) {
80
- this.svg = '';
81
- }
82
- }, PLACEHOLDER_TIMEOUT);
83
- }, PLACEHOLDER_DELAY);
84
-
85
- await resolveIcon(this.type)
86
- .then((svg) => {
87
- this.svg = svg;
88
- })
89
- .catch(() => {
90
- this.svg = '';
91
- }).finally(() => { clearTimeout(timeout); });
92
- }
93
- }
@@ -1,14 +0,0 @@
1
- import type { FoundationElementDefinition } from '@microsoft/fast-foundation';
2
- import { designSystem } from '../../shared/design-system';
3
- import styles from './icon.scss';
4
- import { Icon } from './icon';
5
- import { iconTemplate as template } from './icon.template';
6
-
7
-
8
- export const vividIcon = Icon.compose<FoundationElementDefinition>({
9
- baseName: 'icon',
10
- template: template as any,
11
- styles,
12
- });
13
-
14
- designSystem.register(vividIcon());
@@ -1,154 +0,0 @@
1
- # layout
2
-
3
- Using layout, elements can be arranged easily in a variety of sizes and spaces that suit vivid design.
4
-
5
- ```js
6
- <script type='module'>
7
- import '@vonage/vivid/layout';
8
- </script>
9
- ```
10
-
11
- ```html preview
12
- <vwc-layout>
13
- <img src="https://picsum.photos/id/1015/300/200">
14
- <img src="https://picsum.photos/id/1016/300/200">
15
- <img src="https://picsum.photos/id/1018/300/200">
16
- <img src="https://picsum.photos/id/1019/300/200">
17
- <img src="https://picsum.photos/id/1055/300/200">
18
- <img src="https://picsum.photos/id/1050/300/200">
19
- </vwc-layout>
20
- ```
21
-
22
- ## Auto-sizing
23
-
24
- Use the `auto-sizing` attribute to set the initial preferred auto-sizing.
25
-
26
- - Type: `'fit'` | `'fill'`
27
- - Default: `'fit'`
28
-
29
- ### fit
30
-
31
- ```html preview
32
- <vwc-layout auto-sizing="fit">
33
- <div style="border: 1px solid">fit</div>
34
- <div style="border: 1px solid">fit</div>
35
- </vwc-layout>
36
- ```
37
-
38
- ### fill
39
-
40
- ```html preview
41
- <vwc-layout auto-sizing="fill">
42
- <div style="border: 1px solid">fill</div>
43
- <div style="border: 1px solid">fill</div>
44
- </vwc-layout>
45
- ```
46
-
47
- ## Gutters
48
-
49
- Use the `gutters` attribute to set the initial preferred margin.
50
-
51
- - Type: `'base-small'` | `'base'` | `'base-large'`
52
- - Default: `''`
53
-
54
- ```html preview
55
- <vwc-layout>
56
- <div style="border: 1px solid">default</div>
57
- <div style="border: 1px solid">default</div>
58
- </vwc-layout>
59
- <vwc-layout gutters="base-small">
60
- <div style="border: 1px solid">base-small</div>
61
- <div style="border: 1px solid">base-small</div>
62
- </vwc-layout>
63
- <vwc-layout gutters="base">
64
- <div style="border: 1px solid">base</div>
65
- <div style="border: 1px solid">base</div>
66
- </vwc-layout>
67
- <vwc-layout gutters="base-large">
68
- <div style="border: 1px solid">base-large</div>
69
- <div style="border: 1px solid">base-large</div>
70
- </vwc-layout>
71
- ```
72
-
73
- ## Column-spacing
74
-
75
- Use the `column-spacing` attribute to set the initial preferred spacing of a column.
76
-
77
- - Type: `'base-small'` | `'base'` | `'base-large'`
78
- - Default: `'base'`
79
-
80
- ```html preview
81
- <vwc-layout column-spacing="base-small">
82
- <div style="border: 1px solid">base-small</div>
83
- <div style="border: 1px solid">base-small</div>
84
- </vwc-layout>
85
- <vwc-layout column-spacing="base">
86
- <div style="border: 1px solid">base</div>
87
- <div style="border: 1px solid">base</div>
88
- </vwc-layout>
89
- <vwc-layout column-spacing="base-large">
90
- <div style="border: 1px solid">base-large</div>
91
- <div style="border: 1px solid">base-large</div>
92
- </vwc-layout>
93
- ```
94
-
95
- ## Column-basis
96
-
97
- Use the `column-basis` attribute to set the initial preferred measure of a column.
98
-
99
- - Type: `'base-small'` | `'base'` | `'base-large'`
100
- - Default: `'base'`
101
-
102
- ### base-small
103
-
104
- ```html preview
105
- <vwc-layout column-basis="base-small">
106
- <div style="border: 1px solid">base-small</div>
107
- <div style="border: 1px solid">base-small</div>
108
- <div style="border: 1px solid">base-small</div>
109
- <div style="border: 1px solid">base-small</div>
110
- <div style="border: 1px solid">base-small</div>
111
- </vwc-layout>
112
- ```
113
-
114
- ### base
115
-
116
- ```html preview
117
- <vwc-layout column-basis="base">
118
- <div style="border: 1px solid">base</div>
119
- <div style="border: 1px solid">base</div>
120
- <div style="border: 1px solid">base</div>
121
- <div style="border: 1px solid">base</div>
122
- <div style="border: 1px solid">base</div>
123
- </vwc-layout>
124
- ```
125
-
126
- ### base-large
127
-
128
- ```html preview
129
- <vwc-layout column-basis="base-large">
130
- <div style="border: 1px solid">base-large</div>
131
- <div style="border: 1px solid">base-large</div>
132
- <div style="border: 1px solid">base-large</div>
133
- <div style="border: 1px solid">base-large</div>
134
- <div style="border: 1px solid">base-large</div>
135
- </vwc-layout>
136
- ```
137
-
138
- ### block
139
-
140
- ```html preview
141
- <vwc-layout column-basis="block">
142
- <div style="border: 1px solid">block</div>
143
- <div style="border: 1px solid">block</div>
144
- <div style="border: 1px solid">block</div>
145
- <div style="border: 1px solid">block</div>
146
- <div style="border: 1px solid">block</div>
147
- </vwc-layout>
148
- ```
149
-
150
- ## CSS Custom Properties
151
-
152
- | Name | Description | Usage |
153
- | ---------------------------- | ------------------------------------------------ | -------------------------------------------------- |
154
- | --layout-grid-template-columns | controls the grid-template-columns of the layout | repeat(`auto-sizing`, minmax(`column-basis`, 1fr)) |