@elmethis/core 1.0.0-alpha.16 → 1.0.0-alpha.160

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 (376) hide show
  1. package/dist/_virtual/_plugin-vue_export-helper.mjs +10 -0
  2. package/dist/components/badge/ElmBadge.css +11 -0
  3. package/dist/components/{inline/ElmInlineCode.stories.d.ts → badge/ElmBadge.stories.d.ts} +2 -2
  4. package/dist/components/badge/ElmBadge.vue.d.ts +21 -0
  5. package/dist/components/badge/ElmBadge.vue.mjs +10 -0
  6. package/dist/components/badge/ElmBadge.vue2.mjs +33 -0
  7. package/dist/components/badge/ElmBadge.vue3.mjs +14 -0
  8. package/dist/components/badge/ElmTag.css +29 -0
  9. package/dist/components/badge/ElmTag.stories.d.ts +7 -0
  10. package/dist/components/badge/ElmTag.vue.d.ts +14 -0
  11. package/dist/components/badge/ElmTag.vue.mjs +10 -0
  12. package/dist/components/badge/ElmTag.vue2.mjs +39 -0
  13. package/dist/components/badge/ElmTag.vue3.mjs +14 -0
  14. package/dist/components/code/ElmCodeBlock.css +58 -0
  15. package/dist/components/code/ElmCodeBlock.vue.d.ts +8 -1
  16. package/dist/components/code/ElmCodeBlock.vue.mjs +10 -0
  17. package/dist/components/code/ElmCodeBlock.vue2.mjs +86 -0
  18. package/dist/components/code/ElmCodeBlock.vue3.mjs +18 -0
  19. package/dist/components/code/ElmKatex.css +28 -0
  20. package/dist/components/code/ElmKatex.vue.d.ts +3 -1
  21. package/dist/components/code/ElmKatex.vue.mjs +10 -0
  22. package/dist/components/code/ElmKatex.vue2.mjs +62 -0
  23. package/dist/components/code/ElmKatex.vue3.mjs +8 -0
  24. package/dist/components/code/ElmShikiHighlighter.css +4 -0
  25. package/dist/components/code/{ElmPrismHighlighter.stories.d.ts → ElmShikiHighlighter.stories.d.ts} +2 -3
  26. package/dist/components/code/{ElmPrismHighlighter.vue.d.ts → ElmShikiHighlighter.vue.d.ts} +3 -3
  27. package/dist/components/code/ElmShikiHighlighter.vue.mjs +11 -0
  28. package/dist/components/code/ElmShikiHighlighter.vue2.mjs +47 -0
  29. package/dist/components/code/ElmShikiHighlighter.vue3.mjs +8 -0
  30. package/dist/components/code/ElmShikiHighlighter2.css +23 -0
  31. package/dist/components/code/shikiInstance.d.ts +2 -0
  32. package/dist/components/code/shikiInstance.mjs +76 -0
  33. package/dist/components/containments/ElmColumn.css +3 -0
  34. package/dist/components/containments/ElmColumn.vue.d.ts +3 -2
  35. package/dist/components/containments/ElmColumn.vue.mjs +10 -0
  36. package/dist/components/containments/ElmColumn.vue2.mjs +16 -0
  37. package/dist/components/containments/ElmColumn.vue3.mjs +8 -0
  38. package/dist/components/containments/ElmColumnList.css +5 -0
  39. package/dist/components/containments/ElmColumnList.vue.d.ts +3 -2
  40. package/dist/components/containments/ElmColumnList.vue.mjs +10 -0
  41. package/dist/components/containments/ElmColumnList.vue2.mjs +16 -0
  42. package/dist/components/containments/ElmColumnList.vue3.mjs +6 -0
  43. package/dist/components/containments/ElmDesktopWindow.css +27 -0
  44. package/dist/components/containments/ElmDesktopWindow.vue.d.ts +3 -2
  45. package/dist/components/containments/ElmDesktopWindow.vue.mjs +10 -0
  46. package/dist/components/containments/ElmDesktopWindow.vue2.mjs +42 -0
  47. package/dist/components/containments/ElmDesktopWindow.vue3.mjs +14 -0
  48. package/dist/components/containments/ElmModal.css +12 -0
  49. package/dist/components/containments/ElmModal.stories.d.ts +6 -0
  50. package/dist/components/containments/ElmModal.vue.d.ts +35 -0
  51. package/dist/components/containments/ElmModal.vue.mjs +10 -0
  52. package/dist/components/containments/ElmModal.vue2.mjs +44 -0
  53. package/dist/components/containments/ElmModal.vue3.mjs +11 -0
  54. package/dist/components/containments/ElmModal2.css +33 -0
  55. package/dist/components/containments/ElmParallax.css +14 -0
  56. package/dist/components/containments/ElmParallax.vue.mjs +10 -0
  57. package/dist/components/containments/ElmParallax.vue2.mjs +35 -0
  58. package/dist/components/containments/ElmParallax.vue3.mjs +8 -0
  59. package/dist/components/containments/ElmSnackbar.css +56 -0
  60. package/dist/components/containments/ElmSnackbar.stories.d.ts +6 -0
  61. package/dist/components/containments/ElmSnackbar.vue.d.ts +11 -0
  62. package/dist/components/containments/ElmSnackbar.vue.mjs +10 -0
  63. package/dist/components/containments/ElmSnackbar.vue2.mjs +39 -0
  64. package/dist/components/containments/ElmSnackbar.vue3.mjs +14 -0
  65. package/dist/components/containments/ElmSnackbarContainer.css +9 -0
  66. package/dist/components/containments/ElmSnackbarContainer.vue.d.ts +10 -0
  67. package/dist/components/containments/ElmSnackbarContainer.vue.mjs +10 -0
  68. package/dist/components/containments/ElmSnackbarContainer.vue2.mjs +33 -0
  69. package/dist/components/containments/ElmSnackbarContainer.vue3.mjs +7 -0
  70. package/dist/components/containments/ElmSnackbarContainer2.css +20 -0
  71. package/dist/components/containments/ElmToggle.css +13 -0
  72. package/dist/components/containments/ElmToggle.stories.d.ts +1 -0
  73. package/dist/components/containments/ElmToggle.vue.d.ts +13 -6
  74. package/dist/components/containments/ElmToggle.vue.mjs +10 -0
  75. package/dist/components/containments/ElmToggle.vue2.mjs +71 -0
  76. package/dist/components/containments/ElmToggle.vue3.mjs +17 -0
  77. package/dist/components/containments/ElmToggle2.css +43 -0
  78. package/dist/components/containments/ElmTooltip.css +14 -0
  79. package/dist/components/containments/ElmTooltip.vue.d.ts +5 -2
  80. package/dist/components/containments/ElmTooltip.vue.mjs +10 -0
  81. package/dist/components/containments/ElmTooltip.vue2.mjs +49 -0
  82. package/dist/components/containments/ElmTooltip.vue3.mjs +8 -0
  83. package/dist/components/containments/ElmTooltip2.css +15 -0
  84. package/dist/components/containments/useSnackbarState.d.ts +28 -0
  85. package/dist/components/data/ElmMultiProgress.css +23 -0
  86. package/dist/components/data/ElmMultiProgress.stories.d.ts +6 -0
  87. package/dist/components/data/ElmMultiProgress.vue.d.ts +30 -0
  88. package/dist/components/data/ElmMultiProgress.vue.mjs +10 -0
  89. package/dist/components/data/ElmMultiProgress.vue2.mjs +45 -0
  90. package/dist/components/data/ElmMultiProgress.vue3.mjs +11 -0
  91. package/dist/components/data/ElmProgress.css +84 -0
  92. package/dist/components/data/ElmProgress.stories.d.ts +1 -0
  93. package/dist/components/data/ElmProgress.vue.d.ts +6 -1
  94. package/dist/components/data/ElmProgress.vue.mjs +10 -0
  95. package/dist/components/data/ElmProgress.vue2.mjs +53 -0
  96. package/dist/components/data/ElmProgress.vue3.mjs +20 -0
  97. package/dist/components/data/ElmStatusMessage.css +12 -0
  98. package/dist/components/data/ElmStatusMessage.stories.d.ts +9 -0
  99. package/dist/components/data/ElmStatusMessage.vue.d.ts +6 -0
  100. package/dist/components/data/ElmStatusMessage.vue.mjs +10 -0
  101. package/dist/components/data/ElmStatusMessage.vue2.mjs +75 -0
  102. package/dist/components/data/ElmStatusMessage.vue3.mjs +11 -0
  103. package/dist/components/data/ElmStatusMessage2.css +9 -0
  104. package/dist/components/fallback/ElmBlockFallback.css +7 -0
  105. package/dist/components/fallback/ElmBlockFallback.stories.d.ts +6 -0
  106. package/dist/components/fallback/ElmBlockFallback.vue.d.ts +4 -0
  107. package/dist/components/fallback/ElmBlockFallback.vue.mjs +10 -0
  108. package/dist/components/fallback/ElmBlockFallback.vue2.mjs +17 -0
  109. package/dist/components/fallback/ElmBlockFallback.vue3.mjs +6 -0
  110. package/dist/components/fallback/ElmRectangleWave.css +33 -0
  111. package/dist/components/fallback/ElmRectangleWave.vue.d.ts +1 -1
  112. package/dist/components/fallback/ElmRectangleWave.vue.mjs +10 -0
  113. package/dist/components/fallback/ElmRectangleWave.vue2.mjs +15 -0
  114. package/dist/components/fallback/ElmRectangleWave.vue3.mjs +9 -0
  115. package/dist/components/fallback/ElmSpinner.css +25 -0
  116. package/dist/components/fallback/ElmSpinner.stories.d.ts +6 -0
  117. package/dist/components/fallback/ElmSpinner.vue.d.ts +9 -0
  118. package/dist/components/fallback/ElmSpinner.vue.mjs +10 -0
  119. package/dist/components/fallback/ElmSpinner.vue2.mjs +30 -0
  120. package/dist/components/fallback/ElmSpinner.vue3.mjs +12 -0
  121. package/dist/components/form/ElmButton.css +12 -0
  122. package/dist/components/form/ElmButton.stories.d.ts +11 -0
  123. package/dist/components/form/ElmButton.vue.d.ts +41 -0
  124. package/dist/components/form/ElmButton.vue.mjs +10 -0
  125. package/dist/components/form/ElmButton.vue2.mjs +57 -0
  126. package/dist/components/form/ElmButton.vue3.mjs +20 -0
  127. package/dist/components/form/ElmButton2.css +65 -0
  128. package/dist/components/form/ElmCheckbox.css +67 -0
  129. package/dist/components/form/ElmCheckbox.vue.d.ts +16 -6
  130. package/dist/components/form/ElmCheckbox.vue.mjs +10 -0
  131. package/dist/components/form/ElmCheckbox.vue2.mjs +177 -0
  132. package/dist/components/form/ElmCheckbox.vue3.mjs +22 -0
  133. package/dist/components/form/ElmSwitch.css +42 -0
  134. package/dist/components/form/ElmSwitch.stories.d.ts +6 -0
  135. package/dist/components/form/ElmSwitch.vue.d.ts +32 -0
  136. package/dist/components/form/ElmSwitch.vue.mjs +10 -0
  137. package/dist/components/form/ElmSwitch.vue2.mjs +61 -0
  138. package/dist/components/form/ElmSwitch.vue3.mjs +16 -0
  139. package/dist/components/form/ElmTextField.css +163 -0
  140. package/dist/components/form/ElmTextField.stories.d.ts +6 -0
  141. package/dist/components/form/ElmTextField.vue.d.ts +30 -0
  142. package/dist/components/form/ElmTextField.vue.mjs +10 -0
  143. package/dist/components/form/ElmTextField.vue2.mjs +124 -0
  144. package/dist/components/form/ElmTextField.vue3.mjs +34 -0
  145. package/dist/components/form/ElmTotp.css +60 -0
  146. package/dist/components/form/ElmTotp.stories.d.ts +6 -0
  147. package/dist/components/form/ElmTotp.vue.d.ts +12 -0
  148. package/dist/components/form/ElmTotp.vue.mjs +10 -0
  149. package/dist/components/form/ElmTotp.vue2.mjs +102 -0
  150. package/dist/components/form/ElmTotp.vue3.mjs +22 -0
  151. package/dist/components/headings/ElmFragmentIdentifier.css +20 -0
  152. package/dist/components/headings/ElmFragmentIdentifier.stories.d.ts +6 -0
  153. package/dist/components/headings/ElmFragmentIdentifier.vue.d.ts +8 -0
  154. package/dist/components/headings/ElmFragmentIdentifier.vue.mjs +10 -0
  155. package/dist/components/headings/ElmFragmentIdentifier.vue2.mjs +54 -0
  156. package/dist/components/headings/ElmFragmentIdentifier.vue3.mjs +11 -0
  157. package/dist/components/headings/ElmHeading1.css +56 -0
  158. package/dist/components/headings/ElmHeading1.vue.d.ts +9 -1
  159. package/dist/components/headings/ElmHeading1.vue.mjs +10 -0
  160. package/dist/components/headings/ElmHeading1.vue2.mjs +43 -0
  161. package/dist/components/headings/ElmHeading1.vue3.mjs +8 -0
  162. package/dist/components/headings/ElmHeading2.css +72 -0
  163. package/dist/components/headings/ElmHeading2.vue.d.ts +9 -1
  164. package/dist/components/headings/ElmHeading2.vue.mjs +10 -0
  165. package/dist/components/headings/ElmHeading2.vue2.mjs +49 -0
  166. package/dist/components/headings/ElmHeading2.vue3.mjs +11 -0
  167. package/dist/components/headings/ElmHeading3.css +42 -0
  168. package/dist/components/headings/ElmHeading3.vue.d.ts +9 -1
  169. package/dist/components/headings/ElmHeading3.vue.mjs +10 -0
  170. package/dist/components/headings/ElmHeading3.vue2.mjs +39 -0
  171. package/dist/components/headings/ElmHeading3.vue3.mjs +8 -0
  172. package/dist/components/headings/ElmHeading4.css +25 -0
  173. package/dist/components/headings/ElmHeading4.vue.d.ts +6 -0
  174. package/dist/components/headings/ElmHeading4.vue.mjs +10 -0
  175. package/dist/components/headings/ElmHeading4.vue2.mjs +31 -0
  176. package/dist/components/headings/ElmHeading4.vue3.mjs +8 -0
  177. package/dist/components/headings/ElmHeading5.css +25 -0
  178. package/dist/components/headings/ElmHeading5.vue.d.ts +6 -0
  179. package/dist/components/headings/ElmHeading5.vue.mjs +10 -0
  180. package/dist/components/headings/ElmHeading5.vue2.mjs +31 -0
  181. package/dist/components/headings/ElmHeading5.vue3.mjs +8 -0
  182. package/dist/components/headings/ElmHeading6.css +25 -0
  183. package/dist/components/headings/ElmHeading6.vue.d.ts +6 -0
  184. package/dist/components/headings/ElmHeading6.vue.mjs +10 -0
  185. package/dist/components/headings/ElmHeading6.vue2.mjs +31 -0
  186. package/dist/components/headings/ElmHeading6.vue3.mjs +8 -0
  187. package/dist/components/icon/ElmArrowIcon.css +44 -0
  188. package/dist/components/icon/ElmArrowIcon.stories.d.ts +6 -0
  189. package/dist/components/icon/ElmArrowIcon.vue.d.ts +26 -0
  190. package/dist/components/icon/ElmArrowIcon.vue.mjs +10 -0
  191. package/dist/components/icon/ElmArrowIcon.vue2.mjs +31 -0
  192. package/dist/components/icon/ElmArrowIcon.vue3.mjs +17 -0
  193. package/dist/components/icon/ElmBookmarkIcon.css +40 -0
  194. package/dist/components/icon/ElmBookmarkIcon.stories.d.ts +8 -0
  195. package/dist/components/icon/ElmBookmarkIcon.vue.d.ts +7 -0
  196. package/dist/components/icon/ElmBookmarkIcon.vue.mjs +10 -0
  197. package/dist/components/icon/ElmBookmarkIcon.vue2.mjs +45 -0
  198. package/dist/components/icon/ElmBookmarkIcon.vue3.mjs +15 -0
  199. package/dist/components/icon/ElmCubeIcon.css +38 -0
  200. package/dist/components/icon/ElmCubeIcon.vue.d.ts +1 -1
  201. package/dist/components/icon/ElmCubeIcon.vue.mjs +10 -0
  202. package/dist/components/icon/ElmCubeIcon.vue2.mjs +41 -0
  203. package/dist/components/icon/ElmCubeIcon.vue3.mjs +12 -0
  204. package/dist/components/icon/ElmDotLoadingIcon.css +41 -0
  205. package/dist/components/icon/ElmDotLoadingIcon.vue.d.ts +2 -2
  206. package/dist/components/icon/ElmDotLoadingIcon.vue.mjs +10 -0
  207. package/dist/components/icon/ElmDotLoadingIcon.vue2.mjs +28 -0
  208. package/dist/components/icon/ElmDotLoadingIcon.vue3.mjs +14 -0
  209. package/dist/components/icon/ElmLanguageIcon.css +12 -0
  210. package/dist/components/icon/ElmLanguageIcon.vue.d.ts +1 -1
  211. package/dist/components/icon/ElmLanguageIcon.vue.mjs +10 -0
  212. package/dist/components/icon/ElmLanguageIcon.vue2.mjs +148 -0
  213. package/dist/components/icon/ElmLanguageIcon.vue3.mjs +11 -0
  214. package/dist/components/icon/ElmLanguageIcon2.css +9 -0
  215. package/dist/components/icon/ElmLoginIcon.css +16 -0
  216. package/dist/components/icon/ElmLoginIcon.stories.d.ts +6 -0
  217. package/dist/components/icon/ElmLoginIcon.vue.d.ts +18 -0
  218. package/dist/components/icon/ElmLoginIcon.vue.mjs +10 -0
  219. package/dist/components/icon/ElmLoginIcon.vue2.mjs +37 -0
  220. package/dist/components/icon/ElmLoginIcon.vue3.mjs +8 -0
  221. package/dist/components/icon/ElmToggleTheme.css +18 -0
  222. package/dist/components/icon/ElmToggleTheme.vue.mjs +10 -0
  223. package/dist/components/icon/ElmToggleTheme.vue2.mjs +30 -0
  224. package/dist/components/icon/ElmToggleTheme.vue3.mjs +8 -0
  225. package/dist/components/icon/languages/Bash.css +6 -0
  226. package/dist/components/icon/languages/Bash.vue.d.ts +1 -1
  227. package/dist/{Bash-KV1blS97.js → components/icon/languages/Bash.vue.mjs} +20 -15
  228. package/dist/components/icon/languages/Bash.vue2.mjs +8 -0
  229. package/dist/components/icon/languages/{JavaScript.vue.d.ts → Css.vue.d.ts} +1 -1
  230. package/dist/components/icon/languages/Css.vue.mjs +19 -0
  231. package/dist/components/icon/languages/Rust.vue.d.ts +1 -1
  232. package/dist/components/icon/languages/Rust.vue.mjs +17 -0
  233. package/dist/components/inline/ElmInlineIcon.stories.d.ts +6 -0
  234. package/dist/components/inline/ElmInlineIcon.vue.d.ts +6 -0
  235. package/dist/components/inline/ElmInlineLink.css +36 -0
  236. package/dist/components/inline/ElmInlineLink.vue.d.ts +1 -1
  237. package/dist/components/inline/ElmInlineLink.vue.mjs +10 -0
  238. package/dist/components/inline/ElmInlineLink.vue2.mjs +53 -0
  239. package/dist/components/inline/ElmInlineLink.vue3.mjs +11 -0
  240. package/dist/components/inline/ElmInlineRuby.vue.d.ts +1 -1
  241. package/dist/components/inline/ElmInlineRuby.vue.mjs +29 -0
  242. package/dist/components/inline/ElmInlineRuby.vue2.mjs +4 -0
  243. package/dist/components/inline/ElmInlineText.css +41 -0
  244. package/dist/components/inline/ElmInlineText.stories.d.ts +1 -0
  245. package/dist/components/inline/ElmInlineText.vue.d.ts +10 -1
  246. package/dist/components/inline/ElmInlineText.vue.mjs +10 -0
  247. package/dist/components/inline/ElmInlineText.vue2.mjs +57 -0
  248. package/dist/components/inline/ElmInlineText.vue3.mjs +11 -0
  249. package/dist/components/inline/ElmTypingAnimation.stories.d.ts +6 -0
  250. package/dist/components/inline/ElmTypingAnimation.vue.d.ts +21 -0
  251. package/dist/components/jsonschema/ElmChildContainer.stories.d.ts +6 -0
  252. package/dist/components/jsonschema/ElmChildContainer.vue.d.ts +21 -0
  253. package/dist/components/jsonschema/ElmFieldAttribute.stories.d.ts +6 -0
  254. package/dist/components/jsonschema/ElmFieldAttribute.vue.d.ts +7 -0
  255. package/dist/components/jsonschema/ElmFieldType.stories.d.ts +7 -0
  256. package/dist/components/jsonschema/ElmFieldType.vue.d.ts +8 -0
  257. package/dist/components/jsonschema/ElmJsonSchema.stories.d.ts +7 -0
  258. package/dist/components/jsonschema/ElmJsonSchema.vue.d.ts +7 -0
  259. package/dist/components/media/ElmFile.css +52 -0
  260. package/dist/components/media/ElmFile.vue.d.ts +6 -1
  261. package/dist/components/media/ElmFile.vue.mjs +10 -0
  262. package/dist/components/media/ElmFile.vue2.mjs +77 -0
  263. package/dist/components/media/ElmFile.vue3.mjs +14 -0
  264. package/dist/components/media/ElmImage.css +12 -0
  265. package/dist/components/media/ElmImage.stories.d.ts +1 -0
  266. package/dist/components/media/ElmImage.vue.d.ts +5 -0
  267. package/dist/components/media/ElmImage.vue.mjs +10 -0
  268. package/dist/components/media/ElmImage.vue2.mjs +91 -0
  269. package/dist/components/media/ElmImage.vue3.mjs +18 -0
  270. package/dist/components/media/ElmImage2.css +51 -0
  271. package/dist/components/navigation/ElmBookmark.css +104 -0
  272. package/dist/components/navigation/ElmBookmark.stories.d.ts +2 -0
  273. package/dist/components/navigation/ElmBookmark.vue.d.ts +13 -9
  274. package/dist/components/navigation/ElmBookmark.vue.mjs +10 -0
  275. package/dist/components/navigation/ElmBookmark.vue2.mjs +115 -0
  276. package/dist/components/navigation/ElmBookmark.vue3.mjs +32 -0
  277. package/dist/components/navigation/ElmBreadcrumb.css +46 -0
  278. package/dist/components/navigation/ElmBreadcrumb.vue.d.ts +3 -1
  279. package/dist/components/navigation/ElmBreadcrumb.vue.mjs +10 -0
  280. package/dist/components/navigation/ElmBreadcrumb.vue2.mjs +63 -0
  281. package/dist/components/navigation/ElmBreadcrumb.vue3.mjs +18 -0
  282. package/dist/components/navigation/ElmPagetop.css +105 -0
  283. package/dist/components/navigation/ElmPagetop.vue.d.ts +1 -1
  284. package/dist/components/navigation/ElmPagetop.vue.mjs +10 -0
  285. package/dist/components/navigation/ElmPagetop.vue2.mjs +51 -0
  286. package/dist/components/navigation/ElmPagetop.vue3.mjs +18 -0
  287. package/dist/components/navigation/ElmTableOfContents.css +33 -0
  288. package/dist/components/navigation/ElmTableOfContents.vue.d.ts +1 -1
  289. package/dist/components/navigation/ElmTableOfContents.vue.mjs +10 -0
  290. package/dist/components/navigation/ElmTableOfContents.vue2.mjs +43 -0
  291. package/dist/components/navigation/ElmTableOfContents.vue3.mjs +14 -0
  292. package/dist/components/others/ElmColorSample.css +12 -0
  293. package/dist/components/others/ElmColorSample.stories.d.ts +6 -0
  294. package/dist/components/others/ElmColorSample.vue.d.ts +8 -0
  295. package/dist/components/others/ElmColorSample.vue.mjs +10 -0
  296. package/dist/components/others/ElmColorSample.vue2.mjs +72 -0
  297. package/dist/components/others/ElmColorSample.vue3.mjs +9 -0
  298. package/dist/components/others/ElmColorSample2.css +34 -0
  299. package/dist/components/others/ElmColorTable.css +26 -0
  300. package/dist/components/others/ElmColorTable.stories.d.ts +6 -0
  301. package/dist/components/others/ElmColorTable.vue.d.ts +11 -0
  302. package/dist/components/others/ElmColorTable.vue.mjs +10 -0
  303. package/dist/components/others/ElmColorTable.vue2.mjs +45 -0
  304. package/dist/components/others/ElmColorTable.vue3.mjs +10 -0
  305. package/dist/components/others/ElmTemplate.stories.d.ts +6 -0
  306. package/dist/components/others/ElmTyping.vue.d.ts +4 -0
  307. package/dist/components/renderer/ElmJsonRenderer.stories.d.ts +1 -0
  308. package/dist/components/renderer/ElmJsonRenderer.vue.d.ts +39 -8
  309. package/dist/components/table/ElmTable.css +6 -0
  310. package/dist/components/table/ElmTable.vue.d.ts +8 -2
  311. package/dist/components/table/ElmTable.vue.mjs +6 -0
  312. package/dist/components/table/ElmTable.vue2.mjs +22 -0
  313. package/dist/components/table/ElmTableBody.css +48 -0
  314. package/dist/components/table/ElmTableBody.vue.d.ts +3 -2
  315. package/dist/components/table/ElmTableBody.vue.mjs +15 -0
  316. package/dist/components/table/ElmTableBody.vue3.mjs +5 -0
  317. package/dist/components/table/ElmTableCell.css +16 -0
  318. package/dist/components/table/ElmTableCell.vue.d.ts +2 -1
  319. package/dist/components/table/ElmTableCell.vue.mjs +6 -0
  320. package/dist/components/table/ElmTableCell.vue2.mjs +22 -0
  321. package/dist/components/table/ElmTableHeader.css +40 -0
  322. package/dist/components/table/ElmTableHeader.vue.d.ts +3 -2
  323. package/dist/components/table/ElmTableHeader.vue.mjs +15 -0
  324. package/dist/components/table/ElmTableHeader.vue3.mjs +5 -0
  325. package/dist/components/table/ElmTableRow.vue.d.ts +3 -2
  326. package/dist/components/table/ElmTableRow.vue.mjs +14 -0
  327. package/dist/components/table/ElmTableRow.vue2.mjs +4 -0
  328. package/dist/components/template/ElmTemplate.vue.d.ts +1 -1
  329. package/dist/components/typography/ElmBlockQuote.css +12 -0
  330. package/dist/components/typography/ElmBlockQuote.vue.d.ts +5 -2
  331. package/dist/components/typography/ElmBlockQuote.vue.mjs +10 -0
  332. package/dist/components/typography/ElmBlockQuote.vue2.mjs +27 -0
  333. package/dist/components/typography/ElmBlockQuote.vue3.mjs +8 -0
  334. package/dist/components/typography/ElmBulletedList.css +21 -0
  335. package/dist/components/typography/ElmBulletedList.vue.d.ts +5 -2
  336. package/dist/components/typography/ElmBulletedList.vue.mjs +27 -0
  337. package/dist/components/typography/ElmBulletedList.vue3.mjs +5 -0
  338. package/dist/components/typography/ElmCallout.css +33 -0
  339. package/dist/components/typography/ElmCallout.vue.d.ts +5 -2
  340. package/dist/components/typography/ElmCallout.vue.mjs +10 -0
  341. package/dist/components/typography/ElmCallout.vue2.mjs +57 -0
  342. package/dist/components/typography/ElmCallout.vue3.mjs +14 -0
  343. package/dist/components/typography/ElmDivider.css +40 -0
  344. package/dist/components/typography/ElmDivider.vue.d.ts +8 -1
  345. package/dist/components/typography/ElmDivider.vue.mjs +10 -0
  346. package/dist/components/typography/ElmDivider.vue2.mjs +29 -0
  347. package/dist/components/typography/ElmDivider.vue3.mjs +8 -0
  348. package/dist/components/typography/ElmListItem.css +3 -0
  349. package/dist/components/typography/ElmListItem.vue.d.ts +3 -2
  350. package/dist/components/typography/ElmListItem.vue.mjs +10 -0
  351. package/dist/components/typography/ElmListItem.vue2.mjs +16 -0
  352. package/dist/components/typography/ElmListItem.vue3.mjs +8 -0
  353. package/dist/components/typography/ElmNumberedList.css +26 -0
  354. package/dist/components/typography/ElmNumberedList.vue.d.ts +5 -2
  355. package/dist/components/typography/ElmNumberedList.vue.mjs +27 -0
  356. package/dist/components/typography/ElmNumberedList.vue3.mjs +5 -0
  357. package/dist/components/typography/ElmParagraph.css +25 -0
  358. package/dist/components/typography/ElmParagraph.vue.d.ts +5 -2
  359. package/dist/components/typography/ElmParagraph.vue.mjs +10 -0
  360. package/dist/components/typography/ElmParagraph.vue2.mjs +27 -0
  361. package/dist/components/typography/ElmParagraph.vue3.mjs +8 -0
  362. package/dist/hooks/useElmethisTheme.d.ts +4 -0
  363. package/dist/hooks/useElmethisTheme.mjs +43 -0
  364. package/dist/hooks/useTyping.d.ts +17 -0
  365. package/dist/index.d.ts +122 -45
  366. package/dist/index.mjs +128 -0
  367. package/dist/node_modules/.pnpm/katex@0.16.21/node_modules/katex/dist/katex.min.css +1 -0
  368. package/package.json +38 -30
  369. package/dist/JavaScript-u46IG0c4.js +0 -22
  370. package/dist/Rust-Dg96oGSm.js +0 -16
  371. package/dist/TypeScript-SVZmAXrW.js +0 -22
  372. package/dist/components/icon/languages/TypeScript.vue.d.ts +0 -2
  373. package/dist/components/inline/ElmInlineCode.vue.d.ts +0 -15
  374. package/dist/elmethis.js +0 -47
  375. package/dist/elmethis.umd.cjs +0 -419
  376. package/dist/index-KH8UFSIm.js +0 -16258
@@ -0,0 +1,29 @@
1
+ import { defineComponent, createElementBlock, openBlock, createVNode, createElementVNode } from "vue";
2
+ import ElmInlineText from "./ElmInlineText.vue.mjs";
3
+ const _sfc_main = /* @__PURE__ */ defineComponent({
4
+ __name: "ElmInlineRuby",
5
+ props: {
6
+ text: {},
7
+ color: {},
8
+ ruby: {}
9
+ },
10
+ setup(__props) {
11
+ return (_ctx, _cache) => {
12
+ return openBlock(), createElementBlock("ruby", null, [
13
+ createVNode(ElmInlineText, {
14
+ text: _ctx.text,
15
+ color: _ctx.color
16
+ }, null, 8, ["text", "color"]),
17
+ createElementVNode("rt", null, [
18
+ createVNode(ElmInlineText, {
19
+ text: _ctx.ruby,
20
+ color: _ctx.color
21
+ }, null, 8, ["text", "color"])
22
+ ])
23
+ ]);
24
+ };
25
+ }
26
+ });
27
+ export {
28
+ _sfc_main as default
29
+ };
@@ -0,0 +1,4 @@
1
+ import _sfc_main from "./ElmInlineRuby.vue.mjs";
2
+ export {
3
+ _sfc_main as default
4
+ };
@@ -0,0 +1,41 @@
1
+ ._text_1jo5z_1 {
2
+ padding: 0;
3
+ margin: 0;
4
+ color: rgba(0, 0, 0, 0.7);
5
+ color: var(--color, rgba(0, 0, 0, 0.7));
6
+ font-size: 1rem;
7
+ font-size: var(--font-size, 1rem);
8
+ line-height: 1rem;
9
+ line-height: var(--font-size, 1rem);
10
+ background-color: var(--background-color);
11
+ }
12
+ ._text_1jo5z_1::-moz-selection {
13
+ color: rgba(255, 255, 255, 0.7);
14
+ background-color: rgba(0, 0, 0, 0.7);
15
+ background-color: var(--color, rgba(0, 0, 0, 0.7));
16
+ }
17
+ ._text_1jo5z_1::selection {
18
+ color: rgba(255, 255, 255, 0.7);
19
+ background-color: rgba(0, 0, 0, 0.7);
20
+ background-color: var(--color, rgba(0, 0, 0, 0.7));
21
+ }
22
+ [data-theme=dark] ._text_1jo5z_1 {
23
+ color: rgba(255, 255, 255, 0.7);
24
+ color: var(--color, rgba(255, 255, 255, 0.7));
25
+ }
26
+ [data-theme=dark] ._text_1jo5z_1::-moz-selection {
27
+ color: rgba(0, 0, 0, 0.7);
28
+ background-color: rgba(255, 255, 255, 0.7);
29
+ background-color: var(--color, rgba(255, 255, 255, 0.7));
30
+ }
31
+ [data-theme=dark] ._text_1jo5z_1::selection {
32
+ color: rgba(0, 0, 0, 0.7);
33
+ background-color: rgba(255, 255, 255, 0.7);
34
+ background-color: var(--color, rgba(255, 255, 255, 0.7));
35
+ }
36
+ ._code_1jo5z_21 {
37
+ margin-inline: 0.25rem;
38
+ padding: 0.25em 0.5em;
39
+ border-radius: 0.125rem;
40
+ background-color: rgba(0, 0, 0, 0.075);
41
+ }
@@ -5,3 +5,4 @@ export default meta;
5
5
  type Story = StoryObj<typeof meta>;
6
6
  export declare const Primary: Story;
7
7
  export declare const Colored: Story;
8
+ export declare const Background: Story;
@@ -9,7 +9,7 @@ export interface ElmInlineTextProps {
9
9
  *
10
10
  * e.g.) `'red'`, `'#ff0000'`, `'rgba(255, 0, 0, 0.5)'`
11
11
  */
12
- color?: Property.BackgroundColor;
12
+ color?: Property.Color;
13
13
  /**
14
14
  * Specifies the font size of the text.
15
15
  */
@@ -30,8 +30,17 @@ export interface ElmInlineTextProps {
30
30
  * Specifies whether the text should be strikethrough.
31
31
  */
32
32
  strikethrough?: boolean;
33
+ /**
34
+ * Specifies whether the text should be displayed as code.
35
+ */
36
+ code?: boolean;
37
+ /**
38
+ * Specifies the background color of the text.
39
+ */
40
+ backgroundColor?: Property.BackgroundColor;
33
41
  }
34
42
  declare const _default: import('vue').DefineComponent<ElmInlineTextProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<ElmInlineTextProps> & Readonly<{}>, {
43
+ code: boolean;
35
44
  bold: boolean;
36
45
  italic: boolean;
37
46
  underline: boolean;
@@ -0,0 +1,10 @@
1
+ import _sfc_main from "./ElmInlineText.vue2.mjs";
2
+ import style0 from "./ElmInlineText.vue3.mjs";
3
+ import _export_sfc from "../../_virtual/_plugin-vue_export-helper.mjs";
4
+ const cssModules = {
5
+ "$style": style0
6
+ };
7
+ const ElmInlineText = /* @__PURE__ */ _export_sfc(_sfc_main, [["__cssModules", cssModules]]);
8
+ export {
9
+ ElmInlineText as default
10
+ };
@@ -0,0 +1,57 @@
1
+ import { defineComponent, useCssModule, createBlock, openBlock, resolveDynamicComponent, h } from "vue";
2
+ import { getLuminance } from "polished";
3
+ const _sfc_main = /* @__PURE__ */ defineComponent({
4
+ __name: "ElmInlineText",
5
+ props: {
6
+ text: {},
7
+ color: {},
8
+ size: {},
9
+ bold: { type: Boolean, default: false },
10
+ italic: { type: Boolean, default: false },
11
+ underline: { type: Boolean, default: false },
12
+ strikethrough: { type: Boolean, default: false },
13
+ code: { type: Boolean, default: false },
14
+ backgroundColor: {}
15
+ },
16
+ setup(__props) {
17
+ const props = __props;
18
+ const style = useCssModule();
19
+ const render = () => {
20
+ const backgroundColor = props.backgroundColor != null ? getLuminance(props.backgroundColor) < 0.5 ? "rgba(255, 255, 255, 0.7)" : "rgba(0, 0, 0, 0.7)" : void 0;
21
+ let vnode = h(
22
+ "span",
23
+ {
24
+ class: style.text,
25
+ style: {
26
+ "--color": props.color ?? backgroundColor,
27
+ "--font-size": props.size,
28
+ "--background-color": props.backgroundColor
29
+ }
30
+ },
31
+ props.text
32
+ );
33
+ if (props.strikethrough) {
34
+ vnode = h("del", {}, vnode);
35
+ }
36
+ if (props.italic) {
37
+ vnode = h("em", {}, vnode);
38
+ }
39
+ if (props.underline) {
40
+ vnode = h("ins", {}, vnode);
41
+ }
42
+ if (props.bold) {
43
+ vnode = h("strong", {}, vnode);
44
+ }
45
+ if (props.code) {
46
+ vnode = h("code", { class: style.code }, vnode);
47
+ }
48
+ return vnode;
49
+ };
50
+ return (_ctx, _cache) => {
51
+ return openBlock(), createBlock(resolveDynamicComponent(render()));
52
+ };
53
+ }
54
+ });
55
+ export {
56
+ _sfc_main as default
57
+ };
@@ -0,0 +1,11 @@
1
+ const text = "_text_1jo5z_1";
2
+ const code = "_code_1jo5z_21";
3
+ const style0 = {
4
+ text,
5
+ code
6
+ };
7
+ export {
8
+ code,
9
+ style0 as default,
10
+ text
11
+ };
@@ -0,0 +1,6 @@
1
+ import { Meta, StoryObj } from '@storybook/vue3';
2
+ import { default as ElmTypingAnimation } from './ElmTypingAnimation.vue';
3
+ declare const meta: Meta<typeof ElmTypingAnimation>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof meta>;
6
+ export declare const Primary: Story;
@@ -0,0 +1,21 @@
1
+ import { Property } from 'csstype';
2
+ export interface ElmTypingAnimationProps {
3
+ /**
4
+ * The texts to display.
5
+ */
6
+ texts: string[];
7
+ /**
8
+ * The interval between each text.
9
+ */
10
+ interval?: number;
11
+ /**
12
+ * The font size of the text.
13
+ */
14
+ fontSize: Property.FontSize<string | number>;
15
+ }
16
+ declare const _default: import('vue').DefineComponent<ElmTypingAnimationProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<ElmTypingAnimationProps> & Readonly<{}>, {
17
+ texts: string[];
18
+ interval: number;
19
+ fontSize: Property.FontSize<string | number>;
20
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLSpanElement>;
21
+ export default _default;
@@ -0,0 +1,6 @@
1
+ import { Meta, StoryObj } from '@storybook/vue3';
2
+ import { default as ElmChildContainer } from './ElmChildContainer.vue';
3
+ declare const meta: Meta<typeof ElmChildContainer>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof meta>;
6
+ export declare const Primary: Story;
@@ -0,0 +1,21 @@
1
+ export interface ElmChildContainerProps {
2
+ icon: string;
3
+ text: string;
4
+ }
5
+ declare function __VLS_template(): {
6
+ attrs: Partial<{}>;
7
+ slots: {
8
+ default?(_: {}): any;
9
+ };
10
+ refs: {};
11
+ rootEl: HTMLDivElement;
12
+ };
13
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
14
+ declare const __VLS_component: import('vue').DefineComponent<ElmChildContainerProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<ElmChildContainerProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
15
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
16
+ export default _default;
17
+ type __VLS_WithTemplateSlots<T, S> = T & {
18
+ new (): {
19
+ $slots: S;
20
+ };
21
+ };
@@ -0,0 +1,6 @@
1
+ import { Meta, StoryObj } from '@storybook/vue3';
2
+ import { default as ElmFieldAttribute } from './ElmFieldAttribute.vue';
3
+ declare const meta: Meta<typeof ElmFieldAttribute>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof meta>;
6
+ export declare const Primary: Story;
@@ -0,0 +1,7 @@
1
+ export interface ElmFieldAttributeProps {
2
+ icon: string;
3
+ name: string;
4
+ content: string;
5
+ }
6
+ declare const _default: import('vue').DefineComponent<ElmFieldAttributeProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<ElmFieldAttributeProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
7
+ export default _default;
@@ -0,0 +1,7 @@
1
+ import { Meta, StoryObj } from '@storybook/vue3';
2
+ import { default as ElmFieldType } from './ElmFieldType.vue';
3
+ declare const meta: Meta<typeof ElmFieldType>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof meta>;
6
+ export declare const Primary: Story;
7
+ export declare const Maybe: Story;
@@ -0,0 +1,8 @@
1
+ import { JSONSchema7TypeName } from 'json-schema';
2
+ export interface ElmFieldTypeProps {
3
+ type: JSONSchema7TypeName;
4
+ name?: string;
5
+ nullable?: boolean;
6
+ }
7
+ declare const _default: import('vue').DefineComponent<ElmFieldTypeProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<ElmFieldTypeProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
8
+ export default _default;
@@ -0,0 +1,7 @@
1
+ import { Meta, StoryObj } from '@storybook/vue3';
2
+ import { default as ElmJsonSchema } from './ElmJsonSchema.vue';
3
+ declare const meta: Meta<typeof ElmJsonSchema>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof meta>;
6
+ export declare const Primary: Story;
7
+ export declare const Union: Story;
@@ -0,0 +1,7 @@
1
+ import { JSONSchema7Definition } from 'json-schema';
2
+ export interface ElmJsonSchemaProps {
3
+ name?: string;
4
+ schema: JSONSchema7Definition;
5
+ }
6
+ declare const _default: import('vue').DefineComponent<ElmJsonSchemaProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<ElmJsonSchemaProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
7
+ export default _default;
@@ -0,0 +1,52 @@
1
+ ._file_ox390_1 {
2
+ margin-block: var(--margin-block);
3
+ box-sizing: border-box;
4
+ width: 100%;
5
+ padding: 1rem;
6
+ box-shadow: 0 0 0.25rem rgba(0, 0, 0, 0.2);
7
+ display: flex;
8
+ justify-content: space-between;
9
+ align-items: center;
10
+ background-color: rgba(255, 255, 255, 0.2);
11
+ }
12
+ [data-theme=dark] ._file_ox390_1 {
13
+ background-color: rgba(0, 0, 0, 0.2);
14
+ }
15
+ ._file_ox390_1 ._left-container_ox390_15 {
16
+ display: flex;
17
+ justify-content: flex-start;
18
+ align-items: center;
19
+ gap: 0.75rem;
20
+ }
21
+ ._file_ox390_1 ._left-container_ox390_15 ._icon_ox390_21 {
22
+ width: 20px;
23
+ height: 20px;
24
+ transition: color 200ms;
25
+ color: rgba(0, 0, 0, 0.8);
26
+ }
27
+ [data-theme=dark] ._file_ox390_1 ._left-container_ox390_15 ._icon_ox390_21 {
28
+ color: rgba(255, 255, 255, 0.8);
29
+ }
30
+ ._file_ox390_1 ._right-container_ox390_30 {
31
+ display: flex;
32
+ justify-content: flex-end;
33
+ align-items: center;
34
+ gap: 0.75rem;
35
+ }
36
+ ._file_ox390_1 ._right-container_ox390_30 ._download-icon_ox390_36 {
37
+ padding: 0.125rem;
38
+ width: 20px;
39
+ height: 20px;
40
+ cursor: pointer;
41
+ transition: color 200ms, background-color 200ms;
42
+ color: rgba(0, 0, 0, 0.8);
43
+ }
44
+ [data-theme=dark] ._file_ox390_1 ._right-container_ox390_30 ._download-icon_ox390_36 {
45
+ color: rgba(255, 255, 255, 0.8);
46
+ }
47
+ ._file_ox390_1 ._right-container_ox390_30 ._download-icon_ox390_36:hover {
48
+ background-color: rgba(0, 0, 0, 0.1);
49
+ }
50
+ [data-theme=dark] ._file_ox390_1 ._right-container_ox390_30 ._download-icon_ox390_36:hover {
51
+ background-color: rgba(255, 255, 255, 0.1);
52
+ }
@@ -1,3 +1,4 @@
1
+ import { Property } from 'csstype';
1
2
  export interface ElmFileProps {
2
3
  /**
3
4
  * The name of the file.
@@ -11,6 +12,10 @@ export interface ElmFileProps {
11
12
  * The size of the file in bytes.
12
13
  */
13
14
  filesize?: string;
15
+ /**
16
+ * The margin of the file.
17
+ */
18
+ margin?: Property.MarginBlock;
14
19
  }
15
- declare const _default: import('vue').DefineComponent<ElmFileProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<ElmFileProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
20
+ declare const _default: import('vue').DefineComponent<ElmFileProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<ElmFileProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
16
21
  export default _default;
@@ -0,0 +1,10 @@
1
+ import _sfc_main from "./ElmFile.vue2.mjs";
2
+ import style0 from "./ElmFile.vue3.mjs";
3
+ import _export_sfc from "../../_virtual/_plugin-vue_export-helper.mjs";
4
+ const cssModules = {
5
+ "$style": style0
6
+ };
7
+ const ElmFile = /* @__PURE__ */ _export_sfc(_sfc_main, [["__cssModules", cssModules]]);
8
+ export {
9
+ ElmFile as default
10
+ };
@@ -0,0 +1,77 @@
1
+ import { defineComponent, createElementBlock, openBlock, normalizeStyle, normalizeClass, createElementVNode, createVNode, unref, createBlock, createCommentVNode } from "vue";
2
+ import { Icon } from "@iconify/vue";
3
+ import ElmInlineText from "../inline/ElmInlineText.vue.mjs";
4
+ const _hoisted_1 = { style: { opacity: 0.6 } };
5
+ const _sfc_main = /* @__PURE__ */ defineComponent({
6
+ __name: "ElmFile",
7
+ props: {
8
+ name: {},
9
+ src: {},
10
+ filesize: {},
11
+ margin: {}
12
+ },
13
+ setup(__props) {
14
+ function getLastPathSegmentWithoutQueryOrHash(urlString) {
15
+ const cleanedUrl = urlString.split(/[?#]/)[0];
16
+ const pathSegments = cleanedUrl.split("/").filter(Boolean);
17
+ return pathSegments.length > 0 ? pathSegments[pathSegments.length - 1] : null;
18
+ }
19
+ async function downloadFile(url, filename) {
20
+ let link;
21
+ try {
22
+ const response = await fetch(url);
23
+ if (!response.ok) throw new Error("Failed to download file");
24
+ const blob = await response.blob();
25
+ link = document.createElement("a");
26
+ link.href = URL.createObjectURL(blob);
27
+ link.download = filename;
28
+ link.click();
29
+ } catch (error) {
30
+ console.error("ERROR:", error);
31
+ } finally {
32
+ if (link) URL.revokeObjectURL(link.href);
33
+ }
34
+ }
35
+ return (_ctx, _cache) => {
36
+ return openBlock(), createElementBlock("div", {
37
+ class: normalizeClass(_ctx.$style.file),
38
+ style: normalizeStyle({ "--margin-block": _ctx.margin })
39
+ }, [
40
+ createElementVNode("div", {
41
+ class: normalizeClass(_ctx.$style["left-container"])
42
+ }, [
43
+ createVNode(unref(Icon), {
44
+ icon: "mdi:file-outline",
45
+ class: normalizeClass(_ctx.$style.icon)
46
+ }, null, 8, ["class"]),
47
+ createVNode(ElmInlineText, {
48
+ text: _ctx.name ?? getLastPathSegmentWithoutQueryOrHash(_ctx.src) ?? "unknown file"
49
+ }, null, 8, ["text"])
50
+ ], 2),
51
+ createElementVNode("div", {
52
+ class: normalizeClass(_ctx.$style["right-container"])
53
+ }, [
54
+ createElementVNode("span", _hoisted_1, [
55
+ _ctx.filesize ? (openBlock(), createBlock(ElmInlineText, {
56
+ key: 0,
57
+ text: _ctx.filesize
58
+ }, null, 8, ["text"])) : createCommentVNode("", true)
59
+ ]),
60
+ createVNode(unref(Icon), {
61
+ icon: "mdi:download",
62
+ class: normalizeClass(_ctx.$style["download-icon"]),
63
+ onClick: _cache[0] || (_cache[0] = () => {
64
+ downloadFile(
65
+ _ctx.src,
66
+ _ctx.name ?? getLastPathSegmentWithoutQueryOrHash(_ctx.src) ?? "unknown file"
67
+ );
68
+ })
69
+ }, null, 8, ["class"])
70
+ ], 2)
71
+ ], 6);
72
+ };
73
+ }
74
+ });
75
+ export {
76
+ _sfc_main as default
77
+ };
@@ -0,0 +1,14 @@
1
+ const file = "_file_ox390_1";
2
+ const icon = "_icon_ox390_21";
3
+ const style0 = {
4
+ file,
5
+ "left-container": "_left-container_ox390_15",
6
+ icon,
7
+ "right-container": "_right-container_ox390_30",
8
+ "download-icon": "_download-icon_ox390_36"
9
+ };
10
+ export {
11
+ style0 as default,
12
+ file,
13
+ icon
14
+ };
@@ -0,0 +1,12 @@
1
+ .v-enter-to[data-v-b0e06ffd],
2
+ .v-leave-from[data-v-b0e06ffd] {
3
+ opacity: 1;
4
+ }
5
+ .v-enter-active[data-v-b0e06ffd],
6
+ .v-leave-active[data-v-b0e06ffd] {
7
+ transition: opacity 300ms;
8
+ }
9
+ .v-enter-from[data-v-b0e06ffd],
10
+ .v-leave-to[data-v-b0e06ffd] {
11
+ opacity: 0;
12
+ }
@@ -5,3 +5,4 @@ export default meta;
5
5
  type Story = StoryObj<typeof meta>;
6
6
  export declare const Primary: Story;
7
7
  export declare const Modal: Story;
8
+ export declare const Invalid: Story;
@@ -1,3 +1,4 @@
1
+ import { Property } from 'csstype';
1
2
  export interface ElmImageProps {
2
3
  /**
3
4
  * Image source URL
@@ -11,6 +12,10 @@ export interface ElmImageProps {
11
12
  * Enable modal on image click. Default: `false`
12
13
  */
13
14
  enableModal?: boolean;
15
+ /**
16
+ * The margin of the image.
17
+ */
18
+ margin?: Property.MarginBlock;
14
19
  }
15
20
  declare const _default: import('vue').DefineComponent<ElmImageProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<ElmImageProps> & Readonly<{}>, {
16
21
  enableModal: boolean;
@@ -0,0 +1,10 @@
1
+ import _sfc_main from "./ElmImage.vue2.mjs";
2
+ import style0 from "./ElmImage.vue3.mjs";
3
+ import _export_sfc from "../../_virtual/_plugin-vue_export-helper.mjs";
4
+ const cssModules = {
5
+ "$style": style0
6
+ };
7
+ const ElmImage = /* @__PURE__ */ _export_sfc(_sfc_main, [["__cssModules", cssModules], ["__scopeId", "data-v-b0e06ffd"]]);
8
+ export {
9
+ ElmImage as default
10
+ };
@@ -0,0 +1,91 @@
1
+ import { defineComponent, ref, createElementBlock, openBlock, Fragment, createVNode, Transition, withCtx, unref, normalizeClass, normalizeStyle, createElementVNode, createCommentVNode } from "vue";
2
+ import ElmRectangleWave from "../fallback/ElmRectangleWave.vue.mjs";
3
+ import ElmDotLoadingIcon from "../icon/ElmDotLoadingIcon.vue.mjs";
4
+ import { useImage, onKeyStroke } from "@vueuse/core";
5
+ import ElmInlineText from "../inline/ElmInlineText.vue.mjs";
6
+ const _hoisted_1 = ["src", "alt"];
7
+ const _hoisted_2 = ["src", "alt"];
8
+ const _sfc_main = /* @__PURE__ */ defineComponent({
9
+ __name: "ElmImage",
10
+ props: {
11
+ src: {},
12
+ alt: {},
13
+ enableModal: { type: Boolean, default: false },
14
+ margin: {}
15
+ },
16
+ setup(__props) {
17
+ const props = __props;
18
+ const { isLoading, error } = useImage({ src: props.src });
19
+ const isModalOpen = ref(false);
20
+ onKeyStroke("Escape", (e) => {
21
+ e.preventDefault();
22
+ isModalOpen.value = false;
23
+ });
24
+ return (_ctx, _cache) => {
25
+ return openBlock(), createElementBlock(Fragment, null, [
26
+ createVNode(Transition, { mode: "out-in" }, {
27
+ default: withCtx(() => [
28
+ unref(error) ? (openBlock(), createElementBlock("div", {
29
+ key: 0,
30
+ class: normalizeClass(_ctx.$style.error)
31
+ }, [
32
+ createVNode(ElmInlineText, {
33
+ text: "Error loading image",
34
+ color: "#c56565",
35
+ size: "1.5rem"
36
+ })
37
+ ], 2)) : unref(isLoading) ? (openBlock(), createElementBlock("div", {
38
+ key: 1,
39
+ class: normalizeClass(_ctx.$style.fallback),
40
+ style: normalizeStyle({ "--margin-block": _ctx.margin })
41
+ }, [
42
+ createVNode(ElmRectangleWave),
43
+ createElementVNode("div", null, [
44
+ createVNode(ElmDotLoadingIcon)
45
+ ])
46
+ ], 6)) : (openBlock(), createElementBlock("img", {
47
+ key: 2,
48
+ class: normalizeClass(_ctx.$style.image),
49
+ src: _ctx.src,
50
+ alt: _ctx.alt,
51
+ onClick: _cache[0] || (_cache[0] = () => {
52
+ if (_ctx.enableModal) {
53
+ isModalOpen.value = true;
54
+ }
55
+ }),
56
+ style: normalizeStyle({
57
+ "--height": unref(isLoading) ? "0" : "auto",
58
+ "--opacity": unref(isLoading) ? 0 : 1,
59
+ "--cursor": _ctx.enableModal ? "zoom-in" : "inherit",
60
+ "--margin-block": _ctx.margin,
61
+ display: unref(isLoading) ? "none" : "block"
62
+ })
63
+ }, null, 14, _hoisted_1))
64
+ ]),
65
+ _: 1
66
+ }),
67
+ createVNode(Transition, null, {
68
+ default: withCtx(() => [
69
+ isModalOpen.value ? (openBlock(), createElementBlock("div", {
70
+ key: 0,
71
+ class: normalizeClass(_ctx.$style.modal)
72
+ }, [
73
+ createElementVNode("img", {
74
+ class: normalizeClass(_ctx.$style["modal-image"]),
75
+ src: _ctx.src,
76
+ alt: _ctx.alt,
77
+ onClick: _cache[1] || (_cache[1] = () => {
78
+ isModalOpen.value = false;
79
+ })
80
+ }, null, 10, _hoisted_2)
81
+ ], 2)) : createCommentVNode("", true)
82
+ ]),
83
+ _: 1
84
+ })
85
+ ], 64);
86
+ };
87
+ }
88
+ });
89
+ export {
90
+ _sfc_main as default
91
+ };
@@ -0,0 +1,18 @@
1
+ const image = "_image_1brnh_1";
2
+ const error = "_error_1brnh_11";
3
+ const fallback = "_fallback_1brnh_23";
4
+ const modal = "_modal_1brnh_36";
5
+ const style0 = {
6
+ image,
7
+ error,
8
+ fallback,
9
+ modal,
10
+ "modal-image": "_modal-image_1brnh_49"
11
+ };
12
+ export {
13
+ style0 as default,
14
+ error,
15
+ fallback,
16
+ image,
17
+ modal
18
+ };