@epa-wg/custom-element-dist 0.0.31 → 0.0.33

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 (249) hide show
  1. package/.idea/inspectionProfiles/Project_Default.xml +2 -1
  2. package/.storybook/main.ts +3 -7
  3. package/.storybook/preview.ts +4 -6
  4. package/README.md +4 -4
  5. package/coverage/coverage-final.json +7 -18
  6. package/coverage/index.html +30 -30
  7. package/coverage/src/custom-element/coverage.svg +1 -1
  8. package/coverage/src/custom-element/custom-element.js/coverage.svg +1 -1
  9. package/coverage/src/custom-element/custom-element.js.html +719 -473
  10. package/coverage/src/custom-element/http-request.js/coverage.svg +1 -1
  11. package/coverage/src/custom-element/http-request.js.html +6 -6
  12. package/coverage/src/custom-element/index.html +29 -29
  13. package/coverage/src/custom-element/local-storage.js.html +1 -1
  14. package/coverage/src/custom-element/location-element.js.html +31 -31
  15. package/coverage/src/custom-element/module-url.js/coverage.svg +1 -1
  16. package/coverage/src/custom-element/module-url.js.html +20 -20
  17. package/coverage/src/index.html +1 -1
  18. package/coverage/src/mocks/handlers.ts.html +1 -1
  19. package/coverage/src/mocks/index.html +1 -1
  20. package/coverage/src/stories/coverage.svg +1 -1
  21. package/coverage/src/stories/{attributes.test.stories.ts → frame.canvas.ts}/coverage.svg +1 -1
  22. package/coverage/src/stories/frame.canvas.ts.html +175 -0
  23. package/coverage/src/stories/http-request.stories.ts.html +1 -1
  24. package/coverage/src/stories/index.html +14 -179
  25. package/coverage/src/stories/testStoryBook.ts.html +8 -8
  26. package/coverage/src/sum.ts.html +1 -1
  27. package/dist/custom-element-6slVaFEs.cjs +97 -0
  28. package/dist/custom-element-WnOqmEOe.js +609 -0
  29. package/dist/custom-element-bundle.cjs +1 -1
  30. package/dist/custom-element-bundle.js +30 -28
  31. package/dist/demo/a.html +51 -38
  32. package/dist/demo/attributes.html +153 -0
  33. package/dist/demo/data-slices.html +2 -2
  34. package/dist/demo/external-template.html +1 -0
  35. package/dist/demo/external-templates-sb-6.html +42 -0
  36. package/dist/demo/external-templates-sb-7.html +42 -0
  37. package/dist/demo/form.html +42 -0
  38. package/dist/demo/hex-grid-dce.html +1 -1
  39. package/dist/demo/hex-grid.html +1 -1
  40. package/dist/demo/html-template.html +1 -1
  41. package/dist/demo/module-url-sb-2.html +46 -0
  42. package/dist/demo/module-url-sb-4.html +48 -0
  43. package/dist/demo/module-url-sb-5.html +53 -0
  44. package/dist/demo/parameters.html +20 -1
  45. package/dist/demo/s.xml +66 -9
  46. package/dist/demo/s.xslt +89 -16
  47. package/dist/demo/ss.html +12 -22
  48. package/dist/mockServiceWorker.js +31 -8
  49. package/package.json +25 -26
  50. package/public/demo/a.html +51 -38
  51. package/public/demo/attributes.html +153 -0
  52. package/public/demo/data-slices.html +2 -2
  53. package/public/demo/external-template.html +1 -0
  54. package/public/demo/external-templates-sb-6.html +42 -0
  55. package/public/demo/external-templates-sb-7.html +42 -0
  56. package/public/demo/form.html +42 -0
  57. package/public/demo/hex-grid-dce.html +1 -1
  58. package/public/demo/hex-grid.html +1 -1
  59. package/public/demo/html-template.html +1 -1
  60. package/public/demo/module-url-sb-2.html +46 -0
  61. package/public/demo/module-url-sb-4.html +48 -0
  62. package/public/demo/module-url-sb-5.html +53 -0
  63. package/public/demo/parameters.html +20 -1
  64. package/public/demo/s.xml +66 -9
  65. package/public/demo/s.xslt +89 -16
  66. package/public/demo/ss.html +12 -22
  67. package/public/mockServiceWorker.js +31 -8
  68. package/src/custom-element/custom-element.d.ts +4 -0
  69. package/src/custom-element/custom-element.js +148 -66
  70. package/src/custom-element/demo/a.html +51 -38
  71. package/src/custom-element/demo/attributes.html +153 -0
  72. package/src/custom-element/demo/data-slices.html +2 -2
  73. package/src/custom-element/demo/external-template.html +1 -0
  74. package/src/custom-element/demo/form.html +42 -0
  75. package/src/custom-element/demo/hex-grid-dce.html +1 -1
  76. package/src/custom-element/demo/hex-grid.html +1 -1
  77. package/src/custom-element/demo/html-template.html +1 -1
  78. package/src/custom-element/demo/parameters.html +20 -1
  79. package/src/custom-element/demo/s.xml +66 -9
  80. package/src/custom-element/demo/s.xslt +89 -16
  81. package/src/custom-element/demo/ss.html +12 -22
  82. package/src/custom-element/ide/web-types-dce.json +1 -1
  83. package/src/custom-element/ide/web-types-xsl.json +1 -1
  84. package/src/custom-element/index.html +1 -1
  85. package/src/material/components/badge.html +240 -0
  86. package/src/material/components/dropdown.html +26 -14
  87. package/src/material/components/icon-link.html +1 -0
  88. package/src/material/components/icon.html +253 -0
  89. package/src/material/components/input.html +571 -0
  90. package/src/material/components/menu.html +7 -5
  91. package/src/material/components.html +48 -11
  92. package/src/material/theme/semantic.css +20 -1
  93. package/src/mocks/versions.mock.ts +1 -1
  94. package/src/stories/__screenshots__/attributes.test.stories.ts +1 -0
  95. package/src/stories/__screenshots__/external-template.test.stories.ts +1 -0
  96. package/src/stories/__screenshots__/module-url.test.stories.ts +1 -0
  97. package/src/stories/__screenshots__/stories.test.ts/attributes-Attributes-definition-1.png +0 -0
  98. package/src/stories/__screenshots__/stories.test.ts/attributes-Attributes-runtime-change-1.png +0 -0
  99. package/src/stories/__screenshots__/stories.test.ts/attributes-Instance-Attributes-1.png +0 -0
  100. package/src/stories/__screenshots__/stories.test.ts/attributes-Instance-Attributes-2.png +0 -0
  101. package/src/stories/__screenshots__/stories.test.ts/attributes-cloneAs-el-newTag--1.png +0 -0
  102. package/src/stories/__screenshots__/stories.test.ts/attributes-mergeAttr--from--to---1.png +0 -0
  103. package/src/stories/__screenshots__/stories.test.ts/attributes-mergeAttr--from--to---2.png +0 -0
  104. package/src/stories/__screenshots__/stories.test.ts/attributes-mergeAttr--from--to---3.png +0 -0
  105. package/src/stories/__screenshots__/stories.test.ts/attributes-mix-to-from--1.png +0 -0
  106. package/src/stories/__screenshots__/stories.test.ts/http-request-Attributes-definition-1.png +0 -0
  107. package/src/stories/__screenshots__/stories.test.ts/http-request-Attributes-runtime-change-1.png +0 -0
  108. package/src/stories/__screenshots__/stories.test.ts/http-request-Instance-Attributes-1.png +0 -0
  109. package/src/stories/__screenshots__/stories.test.ts/http-request-Instance-Attributes-2.png +0 -0
  110. package/src/stories/__screenshots__/stories.test.ts/http-request-cloneAs-el-newTag--1.png +0 -0
  111. package/src/stories/__screenshots__/stories.test.ts/http-request-http-request-headers-and-response-status-and-headers-1.png +0 -0
  112. package/src/stories/__screenshots__/stories.test.ts/http-request-http-request-with-delayed--5-seconds-response-1.png +0 -0
  113. package/src/stories/__screenshots__/stories.test.ts/http-request-http-request-with-error-1.png +0 -0
  114. package/src/stories/__screenshots__/stories.test.ts/http-request-mergeAttr--from--to---1.png +0 -0
  115. package/src/stories/__screenshots__/stories.test.ts/http-request-mergeAttr--from--to---2.png +0 -0
  116. package/src/stories/__screenshots__/stories.test.ts/http-request-mergeAttr--from--to---3.png +0 -0
  117. package/src/stories/__screenshots__/stories.test.ts/http-request-mix-to-from--1.png +0 -0
  118. package/src/stories/__screenshots__/stories.test.ts/http-request-url-and-slice-1.png +0 -0
  119. package/src/stories/__screenshots__/stories.test.ts/http-request-url-change-1.png +0 -0
  120. package/src/stories/attributes.test.stories.ts +177 -11
  121. package/src/stories/external-template.test.stories.ts +17 -15
  122. package/src/stories/frame.canvas.ts +31 -0
  123. package/src/stories/module-url.test.stories.ts +29 -61
  124. package/storybook-static/assets/Color-F6OSRLHC-Cbp293x2.js +1 -0
  125. package/storybook-static/assets/Configure-BrFr4SLE.js +165 -0
  126. package/storybook-static/assets/DocsRenderer-CFRXHY34-DhHzJiIO.js +2 -0
  127. package/storybook-static/assets/attributes.test.stories-CzWkKw0e.js +1 -0
  128. package/storybook-static/assets/attributes.test.stories-Gg9LQTEK.js +349 -0
  129. package/storybook-static/assets/{css.test.stories-Cgn6ICr0.js → css.test.stories-B_3ltOrx.js} +1 -1
  130. package/storybook-static/assets/custom-element-CPnvJnn8.js +97 -0
  131. package/storybook-static/assets/{dom-merge.test.stories-CBObfPWg.js → dom-merge.test.stories-nQxcgLoM.js} +1 -1
  132. package/storybook-static/assets/entry-preview-docs-Dwczwtsc.js +2 -0
  133. package/storybook-static/assets/external-template.test.stories-BivZqBTp.js +1 -0
  134. package/storybook-static/assets/{external-template.test.stories-VfKUQ8eu.js → external-template.test.stories-DZ-rjnfd.js} +39 -41
  135. package/storybook-static/assets/{form.test.stories-CnuGN7Zw.js → form.test.stories-DQhPYtMj.js} +1 -1
  136. package/storybook-static/assets/frame.canvas-ClTqYyMN.js +1 -0
  137. package/storybook-static/assets/{handlers-V_T7WjNK.js → handlers-CLkps6Nz.js} +17 -14
  138. package/storybook-static/assets/{http-request.stories-8NN1Coqm.js → http-request.stories-jo0f73nw.js} +1 -1
  139. package/storybook-static/assets/iframe-CZwRpnn9.js +199 -0
  140. package/storybook-static/assets/index-B68YUdzy.js +621 -0
  141. package/storybook-static/assets/index-BwkS7JH_.js +8 -0
  142. package/storybook-static/assets/index-CJQtnF9V.js +1 -0
  143. package/storybook-static/assets/index-Dr4PwNfd.js +240 -0
  144. package/storybook-static/assets/{local-storage.test.stories-Dk5Yqc7m.js → local-storage.test.stories-uA5EKRPf.js} +1 -1
  145. package/storybook-static/assets/{location-element.test.stories-56um6s5L.js → location-element.test.stories-Cu-6Elcg.js} +1 -1
  146. package/storybook-static/assets/module-url.test.stories-CD_wusXQ.js +142 -0
  147. package/storybook-static/assets/module-url.test.stories-CTjUAk3J.js +1 -0
  148. package/storybook-static/assets/preview-1xJJ3sKE.js +1 -0
  149. package/storybook-static/assets/preview-BFlNN3Wj.js +1 -0
  150. package/storybook-static/assets/preview-CTOeX_lO.js +1 -0
  151. package/storybook-static/assets/preview-Cm4PPhHS.js +50 -0
  152. package/storybook-static/assets/preview-CuCH40jj.js +2 -0
  153. package/storybook-static/assets/preview-DfTudP20.js +1 -0
  154. package/storybook-static/assets/{set-url.test.stories-B4E6hIe-.js → set-url.test.stories-CY7B9BVZ.js} +1 -1
  155. package/storybook-static/assets/{slice-events.test.stories-BR0F-B6I.js → slice-events.test.stories-BVnPXm6e.js} +1 -1
  156. package/storybook-static/assets/{slots.test.stories-CgfJIyCr.js → slots.test.stories-Dxsa9KdA.js} +1 -1
  157. package/storybook-static/assets/{version-select.test.stories-nmxATIwv.js → version-select.test.stories-Buga1PAa.js} +1 -1
  158. package/storybook-static/demo/a.html +51 -38
  159. package/storybook-static/demo/attributes.html +153 -0
  160. package/storybook-static/demo/data-slices.html +2 -2
  161. package/storybook-static/demo/external-template.html +1 -0
  162. package/storybook-static/demo/external-templates-sb-6.html +42 -0
  163. package/storybook-static/demo/external-templates-sb-7.html +42 -0
  164. package/storybook-static/demo/form.html +42 -0
  165. package/storybook-static/demo/hex-grid-dce.html +1 -1
  166. package/storybook-static/demo/hex-grid.html +1 -1
  167. package/storybook-static/demo/html-template.html +1 -1
  168. package/storybook-static/demo/module-url-sb-2.html +46 -0
  169. package/storybook-static/demo/module-url-sb-4.html +48 -0
  170. package/storybook-static/demo/module-url-sb-5.html +53 -0
  171. package/storybook-static/demo/parameters.html +20 -1
  172. package/storybook-static/demo/s.xml +66 -9
  173. package/storybook-static/demo/s.xslt +89 -16
  174. package/storybook-static/demo/ss.html +12 -22
  175. package/storybook-static/iframe.html +1 -1
  176. package/storybook-static/index.html +6 -10
  177. package/storybook-static/index.json +1 -1
  178. package/storybook-static/mockServiceWorker.js +31 -8
  179. package/storybook-static/project.json +1 -1
  180. package/storybook-static/sb-addons/essentials-actions-2/manager-bundle.js +3 -0
  181. package/storybook-static/sb-addons/essentials-backgrounds-4/manager-bundle.js +8 -8
  182. package/storybook-static/sb-addons/essentials-controls-1/manager-bundle.js +391 -0
  183. package/storybook-static/sb-addons/essentials-docs-3/manager-bundle.js +230 -0
  184. package/storybook-static/sb-addons/essentials-measure-7/manager-bundle.js +1 -1
  185. package/storybook-static/sb-addons/essentials-outline-8/manager-bundle.js +1 -1
  186. package/storybook-static/sb-addons/essentials-toolbars-6/manager-bundle.js +1 -1
  187. package/storybook-static/sb-addons/essentials-viewport-5/manager-bundle.js +1 -1
  188. package/storybook-static/sb-addons/interactions-9/manager-bundle.js +58 -58
  189. package/storybook-static/sb-manager/globals-module-info.js +9 -0
  190. package/storybook-static/sb-manager/globals-runtime.js +10719 -10473
  191. package/storybook-static/sb-manager/runtime.js +4944 -6321
  192. package/coverage/src/stories/attributes.test.stories.ts.html +0 -514
  193. package/coverage/src/stories/css.test.stories.ts/coverage.svg +0 -10
  194. package/coverage/src/stories/css.test.stories.ts.html +0 -460
  195. package/coverage/src/stories/dom-merge.test.stories.ts/coverage.svg +0 -10
  196. package/coverage/src/stories/dom-merge.test.stories.ts.html +0 -706
  197. package/coverage/src/stories/external-template.test.stories.ts/coverage.svg +0 -10
  198. package/coverage/src/stories/external-template.test.stories.ts.html +0 -865
  199. package/coverage/src/stories/form.test.stories.ts/coverage.svg +0 -10
  200. package/coverage/src/stories/form.test.stories.ts.html +0 -661
  201. package/coverage/src/stories/local-storage.test.stories.ts/coverage.svg +0 -10
  202. package/coverage/src/stories/local-storage.test.stories.ts.html +0 -1315
  203. package/coverage/src/stories/location-element.test.stories.ts/coverage.svg +0 -10
  204. package/coverage/src/stories/location-element.test.stories.ts.html +0 -523
  205. package/coverage/src/stories/module-url.test.stories.ts/coverage.svg +0 -10
  206. package/coverage/src/stories/module-url.test.stories.ts.html +0 -640
  207. package/coverage/src/stories/set-url.test.stories.ts/coverage.svg +0 -10
  208. package/coverage/src/stories/set-url.test.stories.ts.html +0 -433
  209. package/coverage/src/stories/slice-events.test.stories.ts/coverage.svg +0 -10
  210. package/coverage/src/stories/slice-events.test.stories.ts.html +0 -952
  211. package/coverage/src/stories/slots.test.stories.ts/coverage.svg +0 -10
  212. package/coverage/src/stories/slots.test.stories.ts.html +0 -742
  213. package/coverage/src/stories/version-select.test.stories.ts/coverage.svg +0 -10
  214. package/coverage/src/stories/version-select.test.stories.ts.html +0 -397
  215. package/dist/custom-element-BbJMY20-.cjs +0 -97
  216. package/dist/custom-element-CoRNKeEP.js +0 -567
  217. package/storybook-static/assets/Color-F6OSRLHC-CFyd3TND.js +0 -1
  218. package/storybook-static/assets/Configure-UGTbPRKK.js +0 -165
  219. package/storybook-static/assets/DocsRenderer-CFRXHY34-Dpr5iB0o.js +0 -2
  220. package/storybook-static/assets/attributes.test.stories-DSOLHHOW.js +0 -152
  221. package/storybook-static/assets/custom-element-D59Fok1f.js +0 -97
  222. package/storybook-static/assets/entry-preview-docs-BbcIMweR.js +0 -2
  223. package/storybook-static/assets/iframe-DnhkgdtG.js +0 -2
  224. package/storybook-static/assets/index-3Sfy-t3H.js +0 -769
  225. package/storybook-static/assets/index-BcZLpTeD.js +0 -8
  226. package/storybook-static/assets/index-CIBI7sCB.js +0 -1
  227. package/storybook-static/assets/index-CxRwF5Or.js +0 -234
  228. package/storybook-static/assets/index-D-8MO0q_.js +0 -1
  229. package/storybook-static/assets/index-DN1RoK17.js +0 -1
  230. package/storybook-static/assets/index-DjJD7gkO.js +0 -1
  231. package/storybook-static/assets/module-url.test.stories-DEponQ7l.js +0 -208
  232. package/storybook-static/assets/preview-BhhEZcNS.js +0 -1
  233. package/storybook-static/assets/preview-CNKoaWES.js +0 -1
  234. package/storybook-static/assets/preview-Czc-sw5H.js +0 -2
  235. package/storybook-static/assets/preview-DAeyCMnM.js +0 -1
  236. package/storybook-static/assets/preview-DHPc-V4N.js +0 -1
  237. package/storybook-static/assets/preview-DYzi3Z2p.js +0 -1
  238. package/storybook-static/assets/preview-vbpHsp94.js +0 -52
  239. package/storybook-static/sb-addons/chromatic-com-storybook-10/manager-bundle.js +0 -333
  240. package/storybook-static/sb-addons/chromatic-com-storybook-10/manager-bundle.js.LEGAL.txt +0 -40
  241. package/storybook-static/sb-addons/essentials-actions-3/manager-bundle.js +0 -3
  242. package/storybook-static/sb-addons/essentials-controls-2/manager-bundle.js +0 -391
  243. package/storybook-static/sb-addons/links-1/manager-bundle.js +0 -3
  244. package/storybook-static/sb-preview/globals.js +0 -33
  245. package/storybook-static/sb-preview/runtime.js +0 -7174
  246. package/test-runner-jest.config.js +0 -15
  247. /package/storybook-static/sb-addons/{essentials-actions-3 → essentials-actions-2}/manager-bundle.js.LEGAL.txt +0 -0
  248. /package/storybook-static/sb-addons/{essentials-controls-2 → essentials-controls-1}/manager-bundle.js.LEGAL.txt +0 -0
  249. /package/storybook-static/sb-addons/{links-1 → essentials-docs-3}/manager-bundle.js.LEGAL.txt +0 -0
@@ -0,0 +1,253 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xhtml="http://www.w3.org/1999/xhtml">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta content="text/html; charset=utf-8" http-equiv="Content-Type"/>
6
+ <title>Components - custom-element - Material Design</title>
7
+ <link href="../../custom-element/demo/wc-square.svg" rel="icon"/>
8
+ <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"/>
9
+ <link crossorigin="anonymous" href="https://use.fontawesome.com/releases/v5.15.4/css/all.css"
10
+ integrity="sha384-DyZ88mC6Up2uqS4h/KRgHuoeGwBcD4Ng9SiP4dIRy0EXTlnuz47vAwmeGwVChigm" rel="stylesheet"/>
11
+
12
+ <script type="importmap">
13
+ {
14
+ "imports": {
15
+ "@epa-wg/": "../../"
16
+ }
17
+ }
18
+ </script>
19
+ <script src="../../custom-element/module-url.js" type="module"></script>
20
+ <script src="../../custom-element/custom-element.js" type="module"></script>
21
+ <style>
22
+ @import "../angular.css";
23
+ @import "../material.css";
24
+ @import "../theme/semantic.css";
25
+ @import "../demo.css";
26
+ main{
27
+ display: flex; flex-wrap: wrap;
28
+ gap: 3rem;
29
+ padding: 5rem;
30
+ &>p{ min-width: 90%; }
31
+ html-demo-element
32
+ { overflow: visible;
33
+ [slot="legend"]{ border-radius: 1rem 1rem 0 0; }
34
+ [slot="description"]{ padding: 0 1rem 1rem 1rem; dd{ padding: 0 !important;margin: 0; }}
35
+ [slot="description"] dd{ padding: 0; }
36
+ }
37
+ var{ color: darkgreen; font-weight: bold; }
38
+ }
39
+ cem-icon{ margin: 1rem; }
40
+ </style>
41
+ </head>
42
+ <!--
43
+ ToDO
44
+ * docs w/ how to use
45
+ -->
46
+ <body>
47
+ <template id="cem-icon">
48
+ <attribute name="image"
49
+ aria-description="defines the icon in one of the libraries or URL. The selection algorithm
50
+ if value is single symbol, it is treated as unicode or emoji image
51
+ if value has a slash symbol (/), it is treated as URL for img< element
52
+ otherwise if value has a <code>fa-</code> substring, it is treated as favicon
53
+ otherwise if value is not empty, it is treated as material icon"
54
+ ></attribute>
55
+ <attribute name="size"
56
+ aria-description="Icon size. Default value is 'normal'. Values: normal|small|large"
57
+ ></attribute>
58
+ <attribute name="direction"
59
+ aria-description="defines css flex-direction. Default value is 'row'. Values: row|column"
60
+ ></attribute>
61
+ <style>
62
+ &[direction="column"]>*{ flex-direction: column; gap:0; }
63
+ &[direction="row" ]>*{ flex-direction: row; }
64
+ &[size="normal" ]>*>.icon{ height: var(--cem-icon-size); font-size: var(--cem-icon-size); }
65
+ &[size="small" ]>*>.icon{ height: var(--cem-icon-size-small); font-size: var(--cem-icon-size-small); }
66
+ &[size="large" ]>*>.icon{ height: var(--cem-icon-size-large); font-size: var(--cem-icon-size-large); }
67
+ &{ display: inline-flex; }
68
+ &>* {
69
+ display: inline-flex; align-items: center; gap: calc( var(--cem-icon-size) / 4 );
70
+
71
+ .icon {
72
+ font-size: var(--cem-icon-size);
73
+ height: var(--cem-icon-size);
74
+ }
75
+ .unicode{position: relative; top:-25%; }
76
+ }
77
+ </style>
78
+
79
+ <choose>
80
+ <when test="string-length($image) &lt; 3"><b class="icon unicode">{$image}</b></when>
81
+ <when test="contains($image,'/')"><img alt="icon" class="icon" src="{$image}"/></when>
82
+ <when test="contains($image,'fa-')"><i class="icon {$image}"></i></when>
83
+ <when test="$image"><span class="icon material-icons">{$image}</span></when>
84
+ </choose>
85
+ <slot></slot>
86
+
87
+ </template>
88
+
89
+ <custom-element hidden src="#cem-icon" tag="cem-icon"></custom-element>
90
+ <custom-element hidden src="./icon-link.html#cem-icon-link" tag="cem-icon-link"></custom-element>
91
+
92
+ <header class="cem-theme-teal">
93
+ <custom-element src="../index.html#nav-head"></custom-element>
94
+ </header>
95
+ <main>
96
+ <aside>
97
+ <p><code>cem-icon</code> is an icon component from &lt;custom-element&gt; Material suite icons based on the
98
+ <a href="https://m3.material.io/styles/icons/designing-icons">Material Design specification for Icons</a>.<br/>
99
+ Icons are small symbols to easily identify actions and categories
100
+ </p>
101
+ <h1>Attributes</h1>
102
+ <div> <code>image</code> attribute defines the icon in one of the libraries or URL. The selection algorithm
103
+ <ol>
104
+ <li>if value is single symbol, it is treated as <var>unicode</var> or <var>emoji</var> image </li>
105
+ <li>if value has a slash symbol (<code>/</code>), it is treated as <var>URL</var> for <code>img</code> element </li>
106
+ <li>if value has a <code>fa-</code> substring, it is treated as <var>favicon</var> </li>
107
+ <li>if value is not empty, it is treated as <var>material icon</var> </li>
108
+
109
+ </ol>
110
+ </div>
111
+ <div> <code>direction</code> attribute defines css <code>row</code> or <code>column</code> flex-direction. </div>
112
+ </aside>
113
+ <section>
114
+ <html-demo-element legend="Direction attribute">
115
+ <p slot="description">
116
+ Defines the text position next to icon. Uses CSS <code>flex-direction</code> values.
117
+ </p>
118
+ <template>
119
+ <cem-icon image="»"> default is row </cem-icon>
120
+ <cem-icon image="home" direction="column"> column </cem-icon>
121
+ <cem-icon image="fas fa-bone" direction="row"> row </cem-icon>
122
+ </template>
123
+ </html-demo-element>
124
+
125
+
126
+ <html-demo-element legend="Size attribute">
127
+ <p slot="description">
128
+ Defines the icon size.
129
+ </p>
130
+ <template>
131
+ <cem-icon image="fas fa-heart" size="small"> small </cem-icon>
132
+ <cem-icon image="fas fa-heart" size="normal"> normal </cem-icon>
133
+ <cem-icon image="fas fa-heart" size="large"> large </cem-icon>
134
+ </template>
135
+ </html-demo-element>
136
+
137
+ </section>
138
+
139
+ <html-demo-element legend="Unicode or Emoji">
140
+ <p slot="description">
141
+ <cem-icon image="https://unicodeplus.com/favicon.ico"
142
+ ><a href="https://unicodeplus.com/search">Search Unicode</a> </cem-icon>
143
+ <cem-icon image="https://emojipedia.org/images/favicon-32x32.png"
144
+ ><a href="https://emojipedia.org/search?q=heart">Search Emoji</a></cem-icon>
145
+ </p>
146
+ <template>
147
+ <cem-icon image="🚀" > Rocket emoji </cem-icon>
148
+ <cem-icon image="👁" > Eye unicode </cem-icon>
149
+ <hr/>
150
+ <cem-icon image="🎄" ></cem-icon>
151
+ <cem-icon image="😭" ></cem-icon>
152
+ <cem-icon image="🔥" ></cem-icon>
153
+ <cem-icon image="💀" ></cem-icon><br/>
154
+ <cem-icon image="🛒" ></cem-icon>
155
+ <cem-icon image="✨" ></cem-icon>
156
+ <cem-icon image="😊" ></cem-icon>
157
+ <cem-icon image="😂" ></cem-icon><br/>
158
+ <cem-icon image="⭐" ></cem-icon>
159
+ <cem-icon image="🫶" ></cem-icon>
160
+ <cem-icon image="🎁" ></cem-icon>
161
+ <cem-icon image="✅" ></cem-icon>
162
+ </template>
163
+ </html-demo-element>
164
+
165
+ <html-demo-element legend="Google Material icon font">
166
+ <p slot="description">
167
+ <cem-icon image="https://www.gstatic.com/images/icons/material/apps/fonts/1x/catalog/v5/favicon.svg"
168
+ >Material Icon &bull; <a href="https://fonts.google.com/icons">Search all</a></cem-icon>
169
+ </p>
170
+ <template>
171
+ <cem-icon image="recycling" > recycling</cem-icon>
172
+ <cem-icon image="shopping_cart" > shopping_cart</cem-icon>
173
+ <hr/>
174
+ <cem-icon image="search" ></cem-icon>
175
+ <cem-icon image="home" ></cem-icon>
176
+ <cem-icon image="menu" ></cem-icon>
177
+ <cem-icon image="close" ></cem-icon><br/>
178
+ <cem-icon image="check_circle" ></cem-icon>
179
+ <cem-icon image="favorite" ></cem-icon>
180
+ <cem-icon image="add" ></cem-icon>
181
+ <cem-icon image="star" ></cem-icon><br/>
182
+ <cem-icon image="chevron_right" ></cem-icon>
183
+ <cem-icon image="logout" ></cem-icon>
184
+ <cem-icon image="add_circle" ></cem-icon>
185
+ <cem-icon image="cancel" ></cem-icon>
186
+ </template>
187
+ </html-demo-element>
188
+
189
+ <html-demo-element legend="Fontawesome">
190
+ <p slot="description">
191
+ <cem-icon image="https://fontawesome.com/images/favicon/icon.svg"
192
+ >Fontawesome Icon &bull; <a href="https://fontawesome.com/icons/">Search all</a></cem-icon>
193
+ </a>
194
+ </p>
195
+ <template>
196
+ <cem-icon image="fab fa-github"> GitHub</cem-icon>
197
+ <cem-icon image="fas fa-bookmark"> Bookmark</cem-icon>
198
+ <cem-icon image="fab fa-discord"></cem-icon><hr/>
199
+ <cem-icon image="fab fa-android"></cem-icon>
200
+ <cem-icon image="fab fa-apple"></cem-icon>
201
+ <cem-icon image="far fa-user"></cem-icon>
202
+ <cem-icon image="far fa-envelope"></cem-icon><br/>
203
+ <cem-icon image="fas fa-thumbs-up"></cem-icon>
204
+ <cem-icon image="far fa-thumbs-down"></cem-icon>
205
+ <cem-icon image="far fa-star"></cem-icon>
206
+ <cem-icon image="fas fa-star"></cem-icon><br/>
207
+ <cem-icon image="fas fa-location-arrow"></cem-icon>
208
+ <cem-icon image="fas fa-map-marker"></cem-icon>
209
+ <cem-icon image="fas fa-map-marked-alt"></cem-icon>
210
+ <cem-icon image="fas fa-globe"></cem-icon>
211
+
212
+ </template>
213
+ </html-demo-element>
214
+
215
+
216
+ <html-demo-element description="logo SVG with link to file in module"
217
+ legend="Image from importmap module">
218
+ <template>
219
+ <custom-element>
220
+ <template>
221
+ <module-url slice="logo-url" src="@epa-wg/custom-element/demo/wc-square.svg"></module-url>
222
+ <cem-icon image="{//logo-url}"> custom-element</cem-icon>
223
+ <cem-icon image="https://unpkg.com/pokeapi-sprites@2.0.2/sprites/pokemon/other/dream-world/1.svg">
224
+ bulbasaur
225
+ </cem-icon>
226
+ </template>
227
+ </custom-element>
228
+ </template>
229
+ </html-demo-element>
230
+
231
+
232
+ <html-demo-element legend="Color">
233
+ <p slot="description">
234
+ For font based icons the color is inherited from CSS text <code>color</code>.
235
+ </p>
236
+ <template>
237
+ <cem-icon image="fas fa-heart" style="color:red" > red </cem-icon>
238
+ <cem-icon image="fas fa-heart" style="color:green" > green </cem-icon>
239
+ <cem-icon image="fas fa-heart" style="color:blue" > blue </cem-icon>
240
+ </template>
241
+ </html-demo-element>
242
+
243
+
244
+ </main>
245
+ <footer>
246
+ <hr/>
247
+ Powered by Syngrafact Corp. ©2024.<br/>
248
+ <a href="../../LICENSE"> Code and documentation licensed under an Apache License 2.0 </a>
249
+ </footer>
250
+ <script src="https://unpkg.com/html-demo-element@1.0.8/html-demo-element.js" type="module"></script>
251
+
252
+ </body>
253
+ </html>