@ebrains/vue 0.9.0-beta → 0.9.2-beta

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 (267) hide show
  1. package/.eslintrc.json +18 -0
  2. package/LICENSE +21 -0
  3. package/README.md +5 -1
  4. package/package.json +1 -1
  5. package/project.json +9 -0
  6. package/src/generated/components.ts +374 -0
  7. package/src/generated/vue-component-lib/utils.ts +236 -0
  8. package/src/index.ts +1 -0
  9. package/src/vue-shims.d.ts +5 -0
  10. package/tsconfig.json +18 -0
  11. package/tsconfig.lib.json +27 -0
  12. package/vite.config.ts +71 -0
  13. package/analytics-44b1416b-3vYuu4Xs.mjs +0 -28
  14. package/analytics-44b1416b-ol77SdQE.js +0 -1
  15. package/arrow-diagonal-black-8f0494c3-CYl9yYTl.mjs +0 -4
  16. package/arrow-diagonal-black-8f0494c3-DqsB6ni-.js +0 -1
  17. package/arrow-right-9322ba8a-DBcxNU_p.js +0 -3
  18. package/arrow-right-9322ba8a-DHq-_PPe.mjs +0 -6
  19. package/bluesky-cc5edd2d-DaFQc-pr.js +0 -12
  20. package/bluesky-cc5edd2d-DfuDDO5h.mjs +0 -15
  21. package/bookmark-c200037c-CIcZ51ZQ.js +0 -14
  22. package/bookmark-c200037c-ClkCtyRY.mjs +0 -17
  23. package/chevron-down-6144c823-DWGlv9eV.mjs +0 -13
  24. package/chevron-down-6144c823-D_8976Ke.js +0 -10
  25. package/chevron-left-ca6c66e1-DANhLw_T.mjs +0 -12
  26. package/chevron-left-ca6c66e1-uCH5SUhm.js +0 -9
  27. package/chevron-right-b88ed2d4-C7dkTMvP.js +0 -3
  28. package/chevron-right-b88ed2d4-CgEZBvy7.mjs +0 -6
  29. package/chevron-up-c66bd477-ByW7R48t.js +0 -10
  30. package/chevron-up-c66bd477-CETJkshq.mjs +0 -13
  31. package/close-87fc0d63-Cbd-ScJr.js +0 -3
  32. package/close-87fc0d63-DtDU2HIU.mjs +0 -6
  33. package/color-2554aad6-CCcV5UJZ.mjs +0 -131
  34. package/color-2554aad6-D1hFGX4H.js +0 -1
  35. package/color-primary-palette_6.entry-B00J5gKq.js +0 -1
  36. package/color-primary-palette_6.entry-DJl4iXuX.mjs +0 -300
  37. package/components-section.entry-Bp5Ot0Sn.js +0 -162
  38. package/components-section.entry-CMHPm3bn.mjs +0 -351
  39. package/copy-03b72cb6-B_WCNQrG.mjs +0 -6
  40. package/copy-03b72cb6-CZAFAegx.js +0 -3
  41. package/correct-use-of-colors.entry-BRM7osKs.js +0 -1
  42. package/correct-use-of-colors.entry-BcZ8MzKb.mjs +0 -59
  43. package/docs-palettes.entry-BoEjXr5K.js +0 -1
  44. package/docs-palettes.entry-CkVHcQbL.mjs +0 -22
  45. package/docs-tokens.entry-C22LSw0P.js +0 -1
  46. package/docs-tokens.entry-D38mtdPC.mjs +0 -30
  47. package/eds-accordion.entry-B25YfdGD.js +0 -4
  48. package/eds-accordion.entry-ivh1zjpt.mjs +0 -48
  49. package/eds-alert.entry-C0p3qeqh.js +0 -739
  50. package/eds-alert.entry-DOCbYqvG.mjs +0 -825
  51. package/eds-app-root.entry-AYVIYcb1.mjs +0 -25
  52. package/eds-app-root.entry-DfPrDdc_.js +0 -1
  53. package/eds-avatar_24.entry-BcY_4aZT.mjs +0 -33279
  54. package/eds-avatar_24.entry-DBYYqNco.js +0 -31821
  55. package/eds-breadcrumb.entry-BTYLNHlm.mjs +0 -104
  56. package/eds-breadcrumb.entry-Drb48V7S.js +0 -1
  57. package/eds-card-desc_3.entry-BlQBUPMR.js +0 -1
  58. package/eds-card-desc_3.entry-DtsrKQS6.mjs +0 -83
  59. package/eds-card-generic.entry-Dtfs4XKl.mjs +0 -56
  60. package/eds-card-generic.entry-w0E2hhjp.js +0 -1
  61. package/eds-card-project.entry-Cek2GMTn.js +0 -1
  62. package/eds-card-project.entry-Cy_NC5av.mjs +0 -44
  63. package/eds-card-section.entry-D1yKOTXz.mjs +0 -30
  64. package/eds-card-section.entry-DLE2WAV_.js +0 -1
  65. package/eds-card-tags.entry-CmRv-oB4.js +0 -1
  66. package/eds-card-tags.entry-Q9xxbeAG.mjs +0 -13
  67. package/eds-card-tool.entry-DF_jWDUL.js +0 -1
  68. package/eds-card-tool.entry-Dgi1G1RH.mjs +0 -56
  69. package/eds-card-wrapper.entry-DZZOVhcJ.js +0 -1
  70. package/eds-card-wrapper.entry-k-aNj4Ms.mjs +0 -24
  71. package/eds-code-block.entry-BjrDmUCm.mjs +0 -1623
  72. package/eds-code-block.entry-DoUacOW1.js +0 -9
  73. package/eds-cookies-preference.entry-B7gp0J-S.js +0 -1
  74. package/eds-cookies-preference.entry-DkA2HKmI.mjs +0 -20
  75. package/eds-feedback.entry-C9Ir38bt.mjs +0 -53
  76. package/eds-feedback.entry-GNZz9ODR.js +0 -1
  77. package/eds-frame.entry-CcmLaVze.mjs +0 -67
  78. package/eds-frame.entry-XyeUo6pB.js +0 -1
  79. package/eds-icon-arrow-diagonal.entry-B0dxbX_o.mjs +0 -13
  80. package/eds-icon-arrow-diagonal.entry-o5Ev_oO7.js +0 -1
  81. package/eds-icon-arrow-right.entry-DUHmdP-V.js +0 -1
  82. package/eds-icon-arrow-right.entry-DpdjX5aS.mjs +0 -13
  83. package/eds-icon-bluesky.entry-Bv0-EDnj.js +0 -1
  84. package/eds-icon-bluesky.entry-DkSAjnck.mjs +0 -13
  85. package/eds-icon-bookmark.entry-Bjzq8uze.js +0 -1
  86. package/eds-icon-bookmark.entry-C_0B6YJU.mjs +0 -13
  87. package/eds-icon-chevron-down.entry-BERHGaTB.js +0 -1
  88. package/eds-icon-chevron-down.entry-DnKTBqKv.mjs +0 -13
  89. package/eds-icon-chevron-left.entry-Bo8LqkIz.js +0 -1
  90. package/eds-icon-chevron-left.entry-DT2At_f6.mjs +0 -13
  91. package/eds-icon-chevron-right.entry-BFoMlLTp.mjs +0 -13
  92. package/eds-icon-chevron-right.entry-DyqeLE1B.js +0 -1
  93. package/eds-icon-chevron-up.entry-Bpy8lbif.js +0 -1
  94. package/eds-icon-chevron-up.entry-JSrFaEET.mjs +0 -13
  95. package/eds-icon-close.entry-CzIoe2p3.mjs +0 -13
  96. package/eds-icon-close.entry-cabdCuVg.js +0 -1
  97. package/eds-icon-copy.entry-C08qTrZl.mjs +0 -13
  98. package/eds-icon-copy.entry-CvpG2Kxo.js +0 -1
  99. package/eds-icon-eu.entry-ChZ09s02.mjs +0 -13
  100. package/eds-icon-eu.entry-H2skG2J6.js +0 -1
  101. package/eds-icon-external.entry-DKbmbXLG.mjs +0 -13
  102. package/eds-icon-external.entry-DVlEoMZl.js +0 -1
  103. package/eds-icon-facebook.entry-4bvKyXXu.mjs +0 -13
  104. package/eds-icon-facebook.entry-COSHMM4W.js +0 -1
  105. package/eds-icon-gitlab.entry-BXLfky5G.mjs +0 -13
  106. package/eds-icon-gitlab.entry-D_zX1Jsy.js +0 -1
  107. package/eds-icon-linkedin.entry-CjXcA0DQ.js +0 -1
  108. package/eds-icon-linkedin.entry-_3H4M1ch.mjs +0 -13
  109. package/eds-icon-loader.entry-BA-W8oxC.js +0 -1
  110. package/eds-icon-loader.entry-Cp3B6C_B.mjs +0 -13
  111. package/eds-icon-mastodon.entry-Bmb_O0hs.mjs +0 -13
  112. package/eds-icon-mastodon.entry-DUFdG1dJ.js +0 -1
  113. package/eds-icon-menu.entry-DOdmibhy.mjs +0 -13
  114. package/eds-icon-menu.entry-Qg4r_OkP.js +0 -1
  115. package/eds-icon-minus.entry-8htg5ASo.mjs +0 -13
  116. package/eds-icon-minus.entry-Diem-PL4.js +0 -1
  117. package/eds-icon-more.entry-BY-mI4ec.js +0 -1
  118. package/eds-icon-more.entry-DyWgD7vJ.mjs +0 -13
  119. package/eds-icon-paper.entry-BI3DMxCS.mjs +0 -13
  120. package/eds-icon-paper.entry-D2mmnsXf.js +0 -1
  121. package/eds-icon-plus.entry-B8KAaEGT.js +0 -1
  122. package/eds-icon-plus.entry-Ccr7jseH.mjs +0 -13
  123. package/eds-icon-portal.entry-BLhT9_Nz.js +0 -1
  124. package/eds-icon-portal.entry-D2iNYdZW.mjs +0 -13
  125. package/eds-icon-private.entry-CK2gzDym.mjs +0 -13
  126. package/eds-icon-private.entry-ToYtRpET.js +0 -1
  127. package/eds-icon-public.entry-BOnTLyd7.js +0 -1
  128. package/eds-icon-public.entry-N8tks7_E.mjs +0 -13
  129. package/eds-icon-search.entry-C9tMq1XC.js +0 -1
  130. package/eds-icon-search.entry-DuG-zesK.mjs +0 -13
  131. package/eds-icon-star.entry-B-PeifnZ.mjs +0 -13
  132. package/eds-icon-star.entry-CHoursjw.js +0 -1
  133. package/eds-icon-success.entry-BJm--l5m.mjs +0 -13
  134. package/eds-icon-success.entry-ED6eDDgi.js +0 -1
  135. package/eds-icon-thumbs-down.entry-BzEfZ1AX.mjs +0 -13
  136. package/eds-icon-thumbs-down.entry-zjkeVdJJ.js +0 -1
  137. package/eds-icon-thumbs-up.entry-CZJlAqFh.js +0 -1
  138. package/eds-icon-thumbs-up.entry-DutZ0Kki.mjs +0 -13
  139. package/eds-icon-tutorial.entry-DRMLIdl4.mjs +0 -13
  140. package/eds-icon-tutorial.entry-D_9AQ-6-.js +0 -1
  141. package/eds-icon-twitter.entry-CJhiAxNu.mjs +0 -13
  142. package/eds-icon-twitter.entry-DDsRqP6N.js +0 -1
  143. package/eds-icon-unknown.entry-57uXdegM.mjs +0 -13
  144. package/eds-icon-unknown.entry-7Mmqc2BG.js +0 -1
  145. package/eds-icon-updown.entry-BwdgdGgR.mjs +0 -13
  146. package/eds-icon-updown.entry-b0BvWM4f.js +0 -1
  147. package/eds-icon-user.entry-BJ7Wi5JO.mjs +0 -13
  148. package/eds-icon-user.entry-czB7LMt8.js +0 -1
  149. package/eds-icon-youtube.entry-BWP1dBVD.mjs +0 -13
  150. package/eds-icon-youtube.entry-v007UjBQ.js +0 -1
  151. package/eds-login_2.entry-BfzeZBGw.mjs +0 -981
  152. package/eds-login_2.entry-DmBDAFIz.js +0 -9
  153. package/eds-matomo-notice.entry-B-MlwGCp.mjs +0 -90
  154. package/eds-matomo-notice.entry-CCiq7z7U.js +0 -1
  155. package/eds-modal.entry-DU5qpx-i.js +0 -1
  156. package/eds-modal.entry-puAN0sn-.mjs +0 -96
  157. package/eds-pagination_2.entry-CuaStxZg.js +0 -1
  158. package/eds-pagination_2.entry-DWzfLRgF.mjs +0 -258
  159. package/eds-progress-bar.entry-BRTtAttw.mjs +0 -21
  160. package/eds-progress-bar.entry-qScp3MQj.js +0 -1
  161. package/eds-rating.entry-CEI0zBir.mjs +0 -61
  162. package/eds-rating.entry-DOTYJZZ6.js +0 -1
  163. package/eds-section-core_2.entry-BZpOdGAA.mjs +0 -39
  164. package/eds-section-core_2.entry-Cmly0OqW.js +0 -1
  165. package/eds-spinner.entry-C_3hil-u.js +0 -1
  166. package/eds-spinner.entry-DLqey9r7.mjs +0 -36
  167. package/eds-switch.entry-BPHya25S.mjs +0 -20
  168. package/eds-switch.entry-IoOUDh10.js +0 -1
  169. package/eds-tabs.entry-DEOntaY1.mjs +0 -7880
  170. package/eds-tabs.entry-lqdai_rD.js +0 -7777
  171. package/eds-timeline.entry-CC0zKwha.js +0 -7777
  172. package/eds-timeline.entry-c1YpsWVJ.mjs +0 -7822
  173. package/eds-toast-manager.entry-BvunvxZX.mjs +0 -36
  174. package/eds-toast-manager.entry-DMZSCFoE.js +0 -1
  175. package/eds-toast.entry-DW3toqwW.mjs +0 -61
  176. package/eds-toast.entry-rudQ7nhp.js +0 -3
  177. package/eds-tooltip.entry-CcGgCRMO.js +0 -1
  178. package/eds-tooltip.entry-CoHV78jm.mjs +0 -77
  179. package/eds-trl.entry-CQOb5dk-.mjs +0 -34
  180. package/eds-trl.entry-L0XqQYCq.js +0 -1
  181. package/eu-9ddde93a-BFtIQw9B.js +0 -28
  182. package/eu-9ddde93a-ft4szvR5.mjs +0 -31
  183. package/facebook-9cb5c17f-BcUhbrj6.mjs +0 -15
  184. package/facebook-9cb5c17f-Y_gvQ682.js +0 -12
  185. package/generated/components.d.ts +0 -41
  186. package/generated/vue-component-lib/utils.d.ts +0 -16
  187. package/incorrect-use-of-colors.entry-C1QG9658.js +0 -1
  188. package/incorrect-use-of-colors.entry-C3Qt3gSE.mjs +0 -42
  189. package/index-39c58238-BwYCDOHZ.mjs +0 -44
  190. package/index-39c58238-SQ-JC-LH.js +0 -1
  191. package/index-cHrGUVDM.js +0 -21
  192. package/index-xVeSZU9j.mjs +0 -3633
  193. package/index.d.ts +0 -1
  194. package/index.js +0 -1
  195. package/index.mjs +0 -43
  196. package/linkedin-e8650abb-BkDrkjzY.js +0 -26
  197. package/linkedin-e8650abb-DYMdsale.mjs +0 -29
  198. package/loader-c9628637-ChpnbJkv.mjs +0 -31
  199. package/loader-c9628637-Vj8Wt1e8.js +0 -28
  200. package/logo-color-7f1fd803-CFgbXdt8.mjs +0 -116
  201. package/logo-color-7f1fd803-DRD3vZVn.js +0 -113
  202. package/logo-color-margins-ff8ce71b-B9nMsY9Q.mjs +0 -119
  203. package/logo-color-margins-ff8ce71b-Dk06zr1Z.js +0 -116
  204. package/logo-space.entry-H3itdzkq.mjs +0 -19
  205. package/logo-space.entry-epl_-703.js +0 -6
  206. package/logo-variations-horizontal_2.entry-CKLOzzOx.mjs +0 -29
  207. package/logo-variations-horizontal_2.entry-k6KqYji6.js +0 -7
  208. package/logo-variations-tabs.entry-BpYl8Gpo.js +0 -1
  209. package/logo-variations-tabs.entry-Df5DuYk-.mjs +0 -22
  210. package/logo-white-no-bg-f382f86f-DXYn3NwV.js +0 -1011
  211. package/logo-white-no-bg-f382f86f-YhfmNmGG.mjs +0 -1022
  212. package/logo-wrong-usage.entry-Bkg9gp3h.mjs +0 -14
  213. package/logo-wrong-usage.entry-DhlWm8es.js +0 -1
  214. package/mastodon-3703ec61-C7iI4Hk0.mjs +0 -15
  215. package/mastodon-3703ec61-C9v6Olc-.js +0 -12
  216. package/menu-340ea948-BpnYX3gY.mjs +0 -12
  217. package/menu-340ea948-ZdelWVw3.js +0 -9
  218. package/minus-b30a7c71-BPAvqHzH.mjs +0 -12
  219. package/minus-b30a7c71-DqCTe6Qh.js +0 -9
  220. package/mono-53f70232-DGi2XDlR.mjs +0 -12
  221. package/mono-53f70232-DgAsWvoQ.js +0 -9
  222. package/more-4449d549-D4HA1cRq.js +0 -11
  223. package/more-4449d549-rI9hOpEp.mjs +0 -14
  224. package/paper-8e74ea31-BvGrc1Vo.mjs +0 -16
  225. package/paper-8e74ea31-C4CV6tlB.js +0 -13
  226. package/plus-89c07be2-BTXnjg5K.js +0 -10
  227. package/plus-89c07be2-DyT9I4-L.mjs +0 -13
  228. package/portal-d6c8ce56-Cj61ldo8.mjs +0 -19
  229. package/portal-d6c8ce56-NpSrdNZ_.js +0 -16
  230. package/private-1c25ff8e-D3Fo36q6.js +0 -23
  231. package/private-1c25ff8e-Dz82_Xf8.mjs +0 -26
  232. package/public-d4d8c585-BJKDD5F6.mjs +0 -17
  233. package/public-d4d8c585-lV6QxdPw.js +0 -14
  234. package/search-fbcd79c2-BMxCaeEk.js +0 -10
  235. package/search-fbcd79c2-rfV0PlHP.mjs +0 -13
  236. package/sharedUtils-a550989c-Ci3Tx3jc.mjs +0 -15
  237. package/sharedUtils-a550989c-m4pF1Vqy.js +0 -1
  238. package/star-0da9b5e9-B3-jr0yE.js +0 -3
  239. package/star-0da9b5e9-DX8_iFmu.mjs +0 -6
  240. package/success-443809da-BD23vltm.mjs +0 -19
  241. package/success-443809da-BUEhLsAD.js +0 -16
  242. package/svg-repository.entry-C1TKYvU7.mjs +0 -301
  243. package/svg-repository.entry-DxVwTMCv.js +0 -173
  244. package/thumbs-down-a18fd049-CzuBAj99.mjs +0 -6
  245. package/thumbs-down-a18fd049-DTNIbYbm.js +0 -3
  246. package/thumbs-up-c19a71bc-CjLv5Wgw.mjs +0 -7
  247. package/thumbs-up-c19a71bc-w8Z8gegt.js +0 -4
  248. package/toastManager-d9eee791-CEYNwx25.mjs +0 -30
  249. package/toastManager-d9eee791-DvR_vUPI.js +0 -1
  250. package/token-list_3.entry-CABw7-9O.mjs +0 -247
  251. package/token-list_3.entry-CawIyAia.js +0 -1
  252. package/token-ratios.entry-BGWJSHfY.mjs +0 -25
  253. package/token-ratios.entry-B_FOHsNq.js +0 -1
  254. package/token-typography.entry-BHvTpH4i.mjs +0 -213
  255. package/token-typography.entry-FXRD_KVv.js +0 -2
  256. package/tutotial-150ee1fd-DFdyoHVA.mjs +0 -28
  257. package/tutotial-150ee1fd-DjN_JBL5.js +0 -25
  258. package/twitter-ac21b505-CGWVGWM9.mjs +0 -15
  259. package/twitter-ac21b505-DDdHS4hB.js +0 -12
  260. package/unknown-ed01a24c-B0AcMuip.js +0 -20
  261. package/unknown-ed01a24c-DonOUpIC.mjs +0 -23
  262. package/up-and-down-d747abee-CWoZjUyq.js +0 -10
  263. package/up-and-down-d747abee-D7g6H0T0.mjs +0 -13
  264. package/user-71ebdc15-BBKQbcQD.js +0 -14
  265. package/user-71ebdc15-CoHlCtJg.mjs +0 -17
  266. package/youtube-efbfbdc4-BLTH1Jl9.js +0 -12
  267. package/youtube-efbfbdc4-BfySbfjR.mjs +0 -15
package/.eslintrc.json ADDED
@@ -0,0 +1,18 @@
1
+ {
2
+ "extends": [
3
+ "plugin:vue/vue3-essential",
4
+ "eslint:recommended",
5
+ "@vue/eslint-config-typescript",
6
+ "@vue/eslint-config-prettier/skip-formatting",
7
+ "../../.eslintrc.json"
8
+ ],
9
+ "ignorePatterns": ["!**/*"],
10
+ "overrides": [
11
+ {
12
+ "files": ["*.ts", "*.tsx", "*.js", "*.jsx", "*.vue"],
13
+ "rules": {
14
+ "vue/multi-word-component-names": "off"
15
+ }
16
+ }
17
+ ]
18
+ }
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2020
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -4,4 +4,8 @@ Vue target wrappers for Stencil output, allowing for seamless integration of Ste
4
4
 
5
5
  ## Usage
6
6
 
7
- More information about importing and using the package can be found currently in the WIP [https://design-dev.ebrains.eu/ui-components/](EBRAINS Design System).
7
+ More information about importing and using the package can be found currently in the [https://design.ebrains.eu/ui-components/](EBRAINS Design System).
8
+
9
+ ## Licensing
10
+
11
+ The contents of this package are licensed under `MIT`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ebrains/vue",
3
- "version": "0.9.0-beta",
3
+ "version": "0.9.2-beta",
4
4
  "main": "./index.js",
5
5
  "types": "./index.d.ts",
6
6
  "exports": {
package/project.json ADDED
@@ -0,0 +1,9 @@
1
+ {
2
+ "name": "vue",
3
+ "$schema": "../../node_modules/nx/schemas/project-schema.json",
4
+ "sourceRoot": "packages/vue/src",
5
+ "projectType": "library",
6
+ "tags": [],
7
+ "// targets": "to see all targets run: nx show project vue --web",
8
+ "targets": {}
9
+ }
@@ -0,0 +1,374 @@
1
+ /* eslint-disable */
2
+ /* tslint:disable */
3
+ /* auto-generated vue proxies */
4
+ import { defineContainer } from './vue-component-lib/utils';
5
+
6
+ import type { JSX } from '@ebrains/components';
7
+
8
+ import { defineCustomElements } from '@ebrains/components/loader';
9
+
10
+ defineCustomElements();
11
+
12
+ export const EdsAccordion = /*@__PURE__*/ defineContainer<JSX.EdsAccordion>('eds-accordion', undefined, [
13
+ 'heading',
14
+ 'description',
15
+ 'switchBg',
16
+ 'expanded',
17
+ 'clampText',
18
+ 'accordion'
19
+ ]);
20
+
21
+
22
+ export const EdsAlert = /*@__PURE__*/ defineContainer<JSX.EdsAlert>('eds-alert', undefined, [
23
+ 'message',
24
+ 'pressableLabel',
25
+ 'pressableUrl',
26
+ 'direction',
27
+ 'intent',
28
+ 'brd'
29
+ ]);
30
+
31
+
32
+ export const EdsAvatar = /*@__PURE__*/ defineContainer<JSX.EdsAvatar>('eds-avatar', undefined, [
33
+ 'firstName',
34
+ 'lastName',
35
+ 'picture',
36
+ 'initials',
37
+ 'color'
38
+ ]);
39
+
40
+
41
+ export const EdsBlockBreak = /*@__PURE__*/ defineContainer<JSX.EdsBlockBreak>('eds-block-break', undefined, [
42
+ 'extraClass'
43
+ ]);
44
+
45
+
46
+ export const EdsBreadcrumb = /*@__PURE__*/ defineContainer<JSX.EdsBreadcrumb>('eds-breadcrumb', undefined, [
47
+ 'items',
48
+ 'intent'
49
+ ]);
50
+
51
+
52
+ export const EdsButton = /*@__PURE__*/ defineContainer<JSX.EdsButton>('eds-button', undefined, [
53
+ 'label',
54
+ 'ariaLabel',
55
+ 'elementType',
56
+ 'intent',
57
+ 'loading',
58
+ 'disabled',
59
+ 'pill',
60
+ 'icon',
61
+ 'size',
62
+ 'iconPos',
63
+ 'iconSmall',
64
+ 'extraClass',
65
+ 'triggerClick'
66
+ ]);
67
+
68
+
69
+ export const EdsCardGeneric = /*@__PURE__*/ defineContainer<JSX.EdsCardGeneric>('eds-card-generic', undefined, [
70
+ 'cardTitle',
71
+ 'url',
72
+ 'description',
73
+ 'image',
74
+ 'avatar',
75
+ 'shortAbbreviation',
76
+ 'headingLevel',
77
+ 'tags',
78
+ 'tiny',
79
+ 'bg',
80
+ 'withHover',
81
+ 'hierarchy'
82
+ ]);
83
+
84
+
85
+ export const EdsCardSection = /*@__PURE__*/ defineContainer<JSX.EdsCardSection>('eds-card-section', undefined, [
86
+ 'cards',
87
+ 'occupyCols'
88
+ ]);
89
+
90
+
91
+ export const EdsCodeBlock = /*@__PURE__*/ defineContainer<JSX.EdsCodeBlock>('eds-code-block', undefined, [
92
+ 'code',
93
+ 'language'
94
+ ]);
95
+
96
+
97
+ export const EdsDropdown = /*@__PURE__*/ defineContainer<JSX.EdsDropdown>('eds-dropdown', undefined, [
98
+ 'icon',
99
+ 'label',
100
+ 'rounded',
101
+ 'ariaLabel',
102
+ 'asNav',
103
+ 'dropdownPos',
104
+ 'dropdownOffset',
105
+ 'intent',
106
+ 'dropdown'
107
+ ]);
108
+
109
+
110
+ export const EdsFeedback = /*@__PURE__*/ defineContainer<JSX.EdsFeedback>('eds-feedback', undefined, [
111
+ 'type',
112
+ 'count',
113
+ 'label',
114
+ 'description',
115
+ 'textMapping',
116
+ 'rating'
117
+ ]);
118
+
119
+
120
+ export const EdsFooter = /*@__PURE__*/ defineContainer<JSX.EdsFooter>('eds-footer', undefined, [
121
+ 'social',
122
+ 'enableScrollTop',
123
+ 'fundedBy',
124
+ 'rightsReserved',
125
+ 'enableCookiesSettings',
126
+ 'cookies'
127
+ ]);
128
+
129
+
130
+ export const EdsForm = /*@__PURE__*/ defineContainer<JSX.EdsForm>('eds-form', undefined, [
131
+ 'name',
132
+ 'setFormUrl',
133
+ 'formBtn',
134
+ 'formBtnLabel',
135
+ 'errorMessage',
136
+ 'fields',
137
+ 'initData',
138
+ 'form'
139
+ ]);
140
+
141
+
142
+ export const EdsFullscreenMenu = /*@__PURE__*/ defineContainer<JSX.EdsFullscreenMenu>('eds-fullscreen-menu', undefined, [
143
+ 'links',
144
+ 'menuLinks',
145
+ 'homeUrl',
146
+ 'inverseHeader',
147
+ 'menuClose'
148
+ ]);
149
+
150
+
151
+ export const EdsHeader = /*@__PURE__*/ defineContainer<JSX.EdsHeader>('eds-header', undefined, [
152
+ 'homeUrl',
153
+ 'links',
154
+ 'inverseHeader',
155
+ 'menuEnabled',
156
+ 'toggleheadermenu'
157
+ ]);
158
+
159
+
160
+ export const EdsIconWrapper = /*@__PURE__*/ defineContainer<JSX.EdsIconWrapper>('eds-icon-wrapper', undefined, [
161
+ 'icon',
162
+ 'class'
163
+ ]);
164
+
165
+
166
+ export const EdsImg = /*@__PURE__*/ defineContainer<JSX.EdsImg>('eds-img', undefined, [
167
+ 'src',
168
+ 'alt',
169
+ 'width',
170
+ 'height',
171
+ 'srcset',
172
+ 'sizes',
173
+ 'formats',
174
+ 'lazyload',
175
+ 'withBg'
176
+ ]);
177
+
178
+
179
+ export const EdsInputField = /*@__PURE__*/ defineContainer<JSX.EdsInputField>('eds-input-field', undefined, [
180
+ 'name',
181
+ 'inputId',
182
+ 'placeholder',
183
+ 'disabled',
184
+ 'onChange',
185
+ 'onInput',
186
+ 'type',
187
+ 'required',
188
+ 'label',
189
+ 'hint',
190
+ 'icon',
191
+ 'link',
192
+ 'message',
193
+ 'error',
194
+ 'checked',
195
+ 'errorMessage',
196
+ 'value',
197
+ 'maxLength',
198
+ 'options'
199
+ ]);
200
+
201
+
202
+ export const EdsLink = /*@__PURE__*/ defineContainer<JSX.EdsLink>('eds-link', undefined, [
203
+ 'label',
204
+ 'intent',
205
+ 'icon',
206
+ 'iconPos',
207
+ 'iconSmall',
208
+ 'size',
209
+ 'external',
210
+ 'current',
211
+ 'download',
212
+ 'url',
213
+ 'ariaLabel',
214
+ 'disabled',
215
+ 'hideLabelOnSmallScreen',
216
+ 'extraClass'
217
+ ]);
218
+
219
+
220
+ export const EdsLogo = /*@__PURE__*/ defineContainer<JSX.EdsLogo>('eds-logo', undefined, [
221
+ 'href',
222
+ 'orientation',
223
+ 'type',
224
+ 'label'
225
+ ]);
226
+
227
+
228
+ export const EdsMatomoNotice = /*@__PURE__*/ defineContainer<JSX.EdsMatomoNotice>('eds-matomo-notice', undefined, [
229
+ 'heading',
230
+ 'description',
231
+ 'optOutMessage',
232
+ 'forceShow',
233
+ 'consent'
234
+ ]);
235
+
236
+
237
+ export const EdsModal = /*@__PURE__*/ defineContainer<JSX.EdsModal>('eds-modal', undefined, [
238
+ 'heading',
239
+ 'truncate',
240
+ 'position',
241
+ 'inverseHeader'
242
+ ]);
243
+
244
+
245
+ export const EdsPagination = /*@__PURE__*/ defineContainer<JSX.EdsPagination>('eds-pagination', undefined, [
246
+ 'currentPage',
247
+ 'lastPage',
248
+ 'perPage',
249
+ 'total',
250
+ 'url',
251
+ 'mode',
252
+ 'prevLabel',
253
+ 'nextLabel',
254
+ 'prevUrl',
255
+ 'nextUrl'
256
+ ]);
257
+
258
+
259
+ export const EdsProgressBar = /*@__PURE__*/ defineContainer<JSX.EdsProgressBar>('eds-progress-bar', undefined, [
260
+ 'value'
261
+ ]);
262
+
263
+
264
+ export const EdsRating = /*@__PURE__*/ defineContainer<JSX.EdsRating>('eds-rating', undefined, [
265
+ 'ratingType',
266
+ 'ratingCount',
267
+ 'rating'
268
+ ]);
269
+
270
+
271
+ export const EdsSectionCore = /*@__PURE__*/ defineContainer<JSX.EdsSectionCore>('eds-section-core', undefined, [
272
+ 'tag',
273
+ 'sectionTitle',
274
+ 'headingLevel'
275
+ ]);
276
+
277
+
278
+ export const EdsSocialNetworks = /*@__PURE__*/ defineContainer<JSX.EdsSocialNetworks>('eds-social-networks', undefined, [
279
+ 'heading'
280
+ ]);
281
+
282
+
283
+ export const EdsSpinner = /*@__PURE__*/ defineContainer<JSX.EdsSpinner>('eds-spinner', undefined, [
284
+ 'size',
285
+ 'thickness',
286
+ 'borderColor',
287
+ 'bottomColor',
288
+ 'background',
289
+ 'fullscreen'
290
+ ]);
291
+
292
+
293
+ export const EdsSplashScreen = /*@__PURE__*/ defineContainer<JSX.EdsSplashScreen>('eds-splash-screen', undefined, [
294
+ 'inverse',
295
+ 'initPromise',
296
+ 'splash'
297
+ ]);
298
+
299
+
300
+ export const EdsSteps = /*@__PURE__*/ defineContainer<JSX.EdsSteps>('eds-steps', undefined, [
301
+ 'steps',
302
+ 'type',
303
+ 'step'
304
+ ]);
305
+
306
+
307
+ export const EdsStepsV2 = /*@__PURE__*/ defineContainer<JSX.EdsStepsV2>('eds-steps-v2', undefined, [
308
+ 'steps',
309
+ 'type',
310
+ 'imageSrc',
311
+ 'bg',
312
+ 'message',
313
+ 'step'
314
+ ]);
315
+
316
+
317
+ export const EdsSwitch = /*@__PURE__*/ defineContainer<JSX.EdsSwitch>('eds-switch', undefined, [
318
+ 'checked',
319
+ 'disabled',
320
+ 'labelOn',
321
+ 'labelOff',
322
+ 'toggle'
323
+ ]);
324
+
325
+
326
+ export const EdsTable = /*@__PURE__*/ defineContainer<JSX.EdsTable>('eds-table', undefined, [
327
+ 'data',
328
+ 'endpoint',
329
+ 'config',
330
+ 'rowsPerPage',
331
+ 'paginationEnabled',
332
+ 'searchEnabled',
333
+ 'hostWidth',
334
+ 'columnSize'
335
+ ]);
336
+
337
+
338
+ export const EdsTabs = /*@__PURE__*/ defineContainer<JSX.EdsTabs>('eds-tabs', undefined, [
339
+ 'identifier',
340
+ 'navAriaLabel',
341
+ 'tabs',
342
+ 'tab'
343
+ ]);
344
+
345
+
346
+ export const EdsTag = /*@__PURE__*/ defineContainer<JSX.EdsTag>('eds-tag', undefined, [
347
+ 'label',
348
+ 'intent',
349
+ 'size'
350
+ ]);
351
+
352
+
353
+ export const EdsTimeline = /*@__PURE__*/ defineContainer<JSX.EdsTimeline>('eds-timeline', undefined, [
354
+ 'events'
355
+ ]);
356
+
357
+
358
+ export const EdsToast = /*@__PURE__*/ defineContainer<JSX.EdsToast>('eds-toast', undefined, [
359
+ 'message',
360
+ 'intent',
361
+ 'duration'
362
+ ]);
363
+
364
+
365
+ export const EdsTooltip = /*@__PURE__*/ defineContainer<JSX.EdsTooltip>('eds-tooltip', undefined, [
366
+ 'content',
367
+ 'position'
368
+ ]);
369
+
370
+
371
+ export const EdsUser = /*@__PURE__*/ defineContainer<JSX.EdsUser>('eds-user', undefined, [
372
+ 'user'
373
+ ]);
374
+
@@ -0,0 +1,236 @@
1
+ // @ts-nocheck
2
+ // It's easier and safer for Volar to disable typechecking and let the return type inference do its job.
3
+ import { defineComponent, getCurrentInstance, h, inject, ref, Ref, withDirectives } from 'vue';
4
+
5
+ export interface InputProps<T> {
6
+ modelValue?: T;
7
+ }
8
+
9
+ const UPDATE_VALUE_EVENT = 'update:modelValue';
10
+ const MODEL_VALUE = 'modelValue';
11
+ const ROUTER_LINK_VALUE = 'routerLink';
12
+ const NAV_MANAGER = 'navManager';
13
+ const ROUTER_PROP_PREFIX = 'router';
14
+ const ARIA_PROP_PREFIX = 'aria';
15
+ /**
16
+ * Starting in Vue 3.1.0, all properties are
17
+ * added as keys to the props object, even if
18
+ * they are not being used. In order to correctly
19
+ * account for both value props and v-model props,
20
+ * we need to check if the key exists for Vue <3.1.0
21
+ * and then check if it is not undefined for Vue >= 3.1.0.
22
+ * See https://github.com/vuejs/vue-next/issues/3889
23
+ */
24
+ const EMPTY_PROP = Symbol();
25
+ const DEFAULT_EMPTY_PROP = { default: EMPTY_PROP };
26
+
27
+ interface NavManager<T = any> {
28
+ navigate: (options: T) => void;
29
+ }
30
+
31
+ const getComponentClasses = (classes: unknown) => {
32
+ return (classes as string)?.split(' ') || [];
33
+ };
34
+
35
+ const getElementClasses = (
36
+ ref: Ref<HTMLElement | undefined>,
37
+ componentClasses: Set<string>,
38
+ defaultClasses: string[] = []
39
+ ) => {
40
+ return [...Array.from(ref.value?.classList || []), ...defaultClasses].filter(
41
+ (c: string, i, self) => !componentClasses.has(c) && self.indexOf(c) === i
42
+ );
43
+ };
44
+
45
+ /**
46
+ * Create a callback to define a Vue component wrapper around a Web Component.
47
+ *
48
+ * @prop name - The component tag name (i.e. `ion-button`)
49
+ * @prop componentProps - An array of properties on the
50
+ * component. These usually match up with the @Prop definitions
51
+ * in each component's TSX file.
52
+ * @prop customElement - An option custom element instance to pass
53
+ * to customElements.define. Only set if `includeImportCustomElements: true` in your config.
54
+ * @prop modelProp - The prop that v-model binds to (i.e. value)
55
+ * @prop modelUpdateEvent - The event that is fired from your Web Component when the value changes (i.e. ionChange)
56
+ */
57
+ export const defineContainer = <Props, VModelType = string | number | boolean>(
58
+ name: string,
59
+ defineCustomElement: any,
60
+ componentProps: string[] = [],
61
+ modelProp?: string,
62
+ modelUpdateEvent?: string
63
+ ) => {
64
+ /**
65
+ * Create a Vue component wrapper around a Web Component.
66
+ * Note: The `props` here are not all properties on a component.
67
+ * They refer to whatever properties are set on an instance of a component.
68
+ */
69
+
70
+ if (defineCustomElement !== undefined) {
71
+ defineCustomElement();
72
+ }
73
+
74
+ const Container = defineComponent<Props & InputProps<VModelType>>((props, { attrs, slots, emit }) => {
75
+ let modelPropValue = props[modelProp];
76
+ const containerRef = ref<HTMLElement>();
77
+ const classes = new Set(getComponentClasses(attrs.class));
78
+
79
+ /**
80
+ * This directive is responsible for updating any reactive
81
+ * reference associated with v-model on the component.
82
+ * This code must be run inside of the "created" callback.
83
+ * Since the following listener callbacks as well as any potential
84
+ * event callback defined in the developer's app are set on
85
+ * the same element, we need to make sure the following callbacks
86
+ * are set first so they fire first. If the developer's callback fires first
87
+ * then the reactive reference will not have been updated yet.
88
+ */
89
+ const vModelDirective = {
90
+ created: (el: HTMLElement) => {
91
+ const eventsNames = Array.isArray(modelUpdateEvent) ? modelUpdateEvent : [modelUpdateEvent];
92
+ eventsNames.forEach((eventName: string) => {
93
+ el.addEventListener(eventName.toLowerCase(), (e: Event) => {
94
+ /**
95
+ * Only update the v-model binding if the event's target is the element we are
96
+ * listening on. For example, Component A could emit ionChange, but it could also
97
+ * have a descendant Component B that also emits ionChange. We only want to update
98
+ * the v-model for Component A when ionChange originates from that element and not
99
+ * when ionChange bubbles up from Component B.
100
+ */
101
+ if (e.target.tagName === el.tagName) {
102
+ modelPropValue = (e?.target as any)[modelProp];
103
+ emit(UPDATE_VALUE_EVENT, modelPropValue);
104
+ }
105
+ });
106
+ });
107
+ },
108
+ };
109
+
110
+ const currentInstance = getCurrentInstance();
111
+ const hasRouter = currentInstance?.appContext?.provides[NAV_MANAGER];
112
+ const navManager: NavManager | undefined = hasRouter ? inject(NAV_MANAGER) : undefined;
113
+ const handleRouterLink = (ev: Event) => {
114
+ const { routerLink } = props;
115
+ if (routerLink === EMPTY_PROP) return;
116
+
117
+ if (navManager !== undefined) {
118
+ /**
119
+ * This prevents the browser from
120
+ * performing a page reload when pressing
121
+ * an Ionic component with routerLink.
122
+ * The page reload interferes with routing
123
+ * and causes ion-back-button to disappear
124
+ * since the local history is wiped on reload.
125
+ */
126
+ ev.preventDefault();
127
+
128
+ let navigationPayload: any = { event: ev };
129
+ for (const key in props) {
130
+ const value = props[key];
131
+ if (props.hasOwnProperty(key) && key.startsWith(ROUTER_PROP_PREFIX) && value !== EMPTY_PROP) {
132
+ navigationPayload[key] = value;
133
+ }
134
+ }
135
+
136
+ navManager.navigate(navigationPayload);
137
+ } else {
138
+ console.warn('Tried to navigate, but no router was found. Make sure you have mounted Vue Router.');
139
+ }
140
+ };
141
+
142
+ return () => {
143
+ modelPropValue = props[modelProp];
144
+
145
+ getComponentClasses(attrs.class).forEach((value) => {
146
+ classes.add(value);
147
+ });
148
+
149
+ const oldClick = props.onClick;
150
+ const handleClick = (ev: Event) => {
151
+ if (oldClick !== undefined) {
152
+ oldClick(ev);
153
+ }
154
+ if (!ev.defaultPrevented) {
155
+ handleRouterLink(ev);
156
+ }
157
+ };
158
+
159
+ let propsToAdd: any = {
160
+ ref: containerRef,
161
+ class: getElementClasses(containerRef, classes),
162
+ onClick: handleClick,
163
+ };
164
+
165
+ /**
166
+ * We can use Object.entries here
167
+ * to avoid the hasOwnProperty check,
168
+ * but that would require 2 iterations
169
+ * where as this only requires 1.
170
+ */
171
+ for (const key in props) {
172
+ const value = props[key];
173
+ if ((props.hasOwnProperty(key) && value !== EMPTY_PROP) || key.startsWith(ARIA_PROP_PREFIX)) {
174
+ propsToAdd[key] = value;
175
+ }
176
+ }
177
+
178
+ if (modelProp) {
179
+ /**
180
+ * If form value property was set using v-model
181
+ * then we should use that value.
182
+ * Otherwise, check to see if form value property
183
+ * was set as a static value (i.e. no v-model).
184
+ */
185
+ if (props[MODEL_VALUE] !== EMPTY_PROP) {
186
+ propsToAdd = {
187
+ ...propsToAdd,
188
+ [modelProp]: props[MODEL_VALUE],
189
+ };
190
+ } else if (modelPropValue !== EMPTY_PROP) {
191
+ propsToAdd = {
192
+ ...propsToAdd,
193
+ [modelProp]: modelPropValue,
194
+ };
195
+ }
196
+ }
197
+
198
+ // If router link is defined, add href to props
199
+ // in order to properly render an anchor tag inside
200
+ // of components that should become activatable and
201
+ // focusable with router link.
202
+ if (props[ROUTER_LINK_VALUE] !== EMPTY_PROP) {
203
+ propsToAdd = {
204
+ ...propsToAdd,
205
+ href: props[ROUTER_LINK_VALUE],
206
+ };
207
+ }
208
+
209
+ /**
210
+ * vModelDirective is only needed on components that support v-model.
211
+ * As a result, we conditionally call withDirectives with v-model components.
212
+ */
213
+ const node = h(name, propsToAdd, slots.default && slots.default());
214
+ return modelProp === undefined ? node : withDirectives(node, [[vModelDirective]]);
215
+ };
216
+ });
217
+
218
+ if (typeof Container !== 'function') {
219
+ Container.name = name;
220
+
221
+ Container.props = {
222
+ [ROUTER_LINK_VALUE]: DEFAULT_EMPTY_PROP,
223
+ };
224
+
225
+ componentProps.forEach((componentProp) => {
226
+ Container.props[componentProp] = DEFAULT_EMPTY_PROP;
227
+ });
228
+
229
+ if (modelProp) {
230
+ Container.props[MODEL_VALUE] = DEFAULT_EMPTY_PROP;
231
+ Container.emits = [UPDATE_VALUE_EVENT];
232
+ }
233
+ }
234
+
235
+ return Container;
236
+ };
package/src/index.ts ADDED
@@ -0,0 +1 @@
1
+ export * from './generated/components';
@@ -0,0 +1,5 @@
1
+ declare module '*.vue' {
2
+ import { defineComponent } from 'vue';
3
+ const component: ReturnType<typeof defineComponent>;
4
+ export default component;
5
+ }