@epa-wg/custom-element-dist 0.0.27 → 0.0.28

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 (176) hide show
  1. package/.storybook/main.ts +2 -2
  2. package/README.md +4 -4
  3. package/coverage/coverage-final.json +22 -22
  4. package/coverage/index.html +18 -18
  5. package/coverage/src/custom-element/coverage.svg +1 -1
  6. package/coverage/src/custom-element/custom-element.js/coverage.svg +1 -1
  7. package/coverage/src/custom-element/custom-element.js.html +490 -367
  8. package/coverage/src/custom-element/demo/index.html +1 -1
  9. package/coverage/src/custom-element/demo/z.js.html +1 -1
  10. package/coverage/src/custom-element/http-request.js.html +12 -12
  11. package/coverage/src/custom-element/index.html +19 -19
  12. package/coverage/src/custom-element/local-storage.js.html +52 -52
  13. package/coverage/src/custom-element/location-element.js.html +4 -4
  14. package/coverage/src/custom-element/module-url.js.html +1 -1
  15. package/coverage/src/index.html +1 -1
  16. package/coverage/src/mocks/handlers.ts.html +1 -1
  17. package/coverage/src/mocks/index.html +1 -1
  18. package/coverage/src/stories/attributes.test.stories.ts.html +11 -2
  19. package/coverage/src/stories/css.test.stories.ts.html +8 -2
  20. package/coverage/src/stories/dom-merge.test.stories.ts.html +3 -3
  21. package/coverage/src/stories/external-template.test.stories.ts.html +8 -2
  22. package/coverage/src/stories/form.test.stories.ts.html +8 -2
  23. package/coverage/src/stories/http-request.stories.ts.html +1 -1
  24. package/coverage/src/stories/index.html +1 -1
  25. package/coverage/src/stories/local-storage.test.stories.ts.html +24 -18
  26. package/coverage/src/stories/location-element.test.stories.ts.html +8 -2
  27. package/coverage/src/stories/module-url.test.stories.ts.html +8 -2
  28. package/coverage/src/stories/set-url.test.stories.ts.html +8 -2
  29. package/coverage/src/stories/slice-events.test.stories.ts.html +8 -2
  30. package/coverage/src/stories/slots.test.stories.ts.html +8 -2
  31. package/coverage/src/stories/testStoryBook.ts.html +12 -12
  32. package/coverage/src/stories/version-select.test.stories.ts.html +8 -2
  33. package/coverage/src/sum.ts.html +1 -1
  34. package/dist/custom-element-BOIPgtxz.js +565 -0
  35. package/dist/custom-element-CUsSENWc.cjs +97 -0
  36. package/dist/custom-element-bundle.cjs +1 -1
  37. package/dist/custom-element-bundle.js +22 -21
  38. package/dist/demo/a.svg +26 -26
  39. package/dist/demo/s.xml +18 -3
  40. package/dist/demo/s.xslt +37 -54
  41. package/dist/demo/s1.xslt +59 -59
  42. package/dist/demo/ss.html +24 -57
  43. package/dist/demo/z.html +33 -33
  44. package/dist/demo/z.xml +59 -59
  45. package/dist/demo/z1.html +34 -34
  46. package/package.json +13 -13
  47. package/public/demo/a.svg +26 -26
  48. package/public/demo/s.xml +18 -3
  49. package/public/demo/s.xslt +37 -54
  50. package/public/demo/s1.xslt +59 -59
  51. package/public/demo/ss.html +24 -57
  52. package/public/demo/z.html +33 -33
  53. package/public/demo/z.xml +59 -59
  54. package/public/demo/z1.html +34 -34
  55. package/src/custom-element/custom-element.js +61 -20
  56. package/src/custom-element/demo/a.svg +26 -26
  57. package/src/custom-element/demo/s.xml +18 -3
  58. package/src/custom-element/demo/s.xslt +37 -54
  59. package/src/custom-element/demo/s1.xslt +59 -59
  60. package/src/custom-element/demo/ss.html +24 -57
  61. package/src/custom-element/demo/z.html +33 -33
  62. package/src/custom-element/demo/z.xml +59 -59
  63. package/src/custom-element/demo/z1.html +34 -34
  64. package/src/custom-element/ide/web-types-dce.json +1 -1
  65. package/src/custom-element/ide/web-types-xsl.json +1 -1
  66. package/src/dce-social-preview.png +0 -0
  67. package/src/material/angular.css +987 -0
  68. package/src/material/components/autocomplete.html +241 -0
  69. package/src/material/components/dropdown.html +115 -0
  70. package/src/material/components/menu.html +235 -0
  71. package/src/material/components.html +109 -0
  72. package/src/material/demo.css +31 -0
  73. package/src/material/index.html +169 -0
  74. package/src/material/material.css +357 -0
  75. package/src/material/theme/README.md +18 -0
  76. package/src/material/theme/semantic.css +112 -0
  77. package/src/mocks/versions.mock.ts +8 -8
  78. package/src/stories/attributes.test.stories.ts +3 -0
  79. package/src/stories/css.test.stories.ts +2 -0
  80. package/src/stories/dom-merge.test.stories.ts +2 -2
  81. package/src/stories/external-template.test.stories.ts +2 -0
  82. package/src/stories/form.test.stories.ts +2 -0
  83. package/src/stories/local-storage.test.stories.ts +2 -0
  84. package/src/stories/location-element.test.stories.ts +2 -0
  85. package/src/stories/module-url.test.stories.ts +2 -0
  86. package/src/stories/set-url.test.stories.ts +2 -0
  87. package/src/stories/slice-events.test.stories.ts +2 -0
  88. package/src/stories/slots.test.stories.ts +2 -0
  89. package/src/stories/version-select.test.stories.ts +2 -0
  90. package/storybook-static/assets/Color-ERTF36HU-ChyYtq0t.js +1 -0
  91. package/storybook-static/assets/Configure-CJVwFVjC.js +165 -0
  92. package/storybook-static/assets/DocsRenderer-CFRXHY34-Bz6q-OqD.js +2 -0
  93. package/storybook-static/assets/{attributes.test.stories-Bt5V18qO.js → attributes.test.stories-BJBuuXgZ.js} +4 -4
  94. package/storybook-static/assets/{css.test.stories-CGYy2daE.js → css.test.stories-pgbBc17d.js} +1 -1
  95. package/storybook-static/assets/custom-element-BDGsYgbP.js +97 -0
  96. package/storybook-static/assets/{dom-merge.test.stories-XlsZ0UvX.js → dom-merge.test.stories-CXcYP_-J.js} +5 -5
  97. package/storybook-static/assets/entry-preview-C313OLrj.js +26 -0
  98. package/storybook-static/assets/{entry-preview-docs-BMKNVQXA.js → entry-preview-docs-B7ORr9w5.js} +2 -2
  99. package/storybook-static/assets/{external-template.test.stories-Bt_Pflu8.js → external-template.test.stories-CpJ68Ghy.js} +13 -13
  100. package/storybook-static/assets/{form.test.stories-B0NoI8wm.js → form.test.stories-D35lyqd8.js} +2 -2
  101. package/storybook-static/assets/{handlers-B5969HUu.js → handlers-B-OZtf2K.js} +6 -6
  102. package/storybook-static/assets/{http-request.stories-B2skuTFV.js → http-request.stories-DccXgHyF.js} +6 -6
  103. package/storybook-static/assets/iframe-Ddc_axoC.js +2 -0
  104. package/storybook-static/assets/index-BSz1w4Gl.js +234 -0
  105. package/storybook-static/assets/index-BdcJ-iJ7.js +8 -0
  106. package/storybook-static/assets/index-CiCdFubk.js +634 -0
  107. package/storybook-static/assets/{index-C7lvoJNv.js → index-f2MAjm2i.js} +1 -1
  108. package/storybook-static/assets/index-lY6s0fkU.js +1 -0
  109. package/storybook-static/assets/index-tfEkrhWr.js +1 -0
  110. package/storybook-static/assets/{local-storage.test.stories-DfY6feqG.js → local-storage.test.stories-BY-PWhuk.js} +5 -5
  111. package/storybook-static/assets/{location-element.test.stories-944AotIJ.js → location-element.test.stories-3auBYEaU.js} +3 -3
  112. package/storybook-static/assets/{module-url.test.stories-DSKcwApl.js → module-url.test.stories-B7L9cL60.js} +6 -6
  113. package/storybook-static/assets/{preview-0Jj89qip.js → preview-BRPR-UXC.js} +1 -1
  114. package/storybook-static/assets/{preview-AJR7rVPD.js → preview-BUQm51_C.js} +1 -1
  115. package/storybook-static/assets/{preview-DB9FwMii.js → preview-BWzBA1C2.js} +1 -1
  116. package/storybook-static/assets/preview-BhhEZcNS.js +1 -0
  117. package/storybook-static/assets/preview-CcS4DQh8.js +1 -0
  118. package/storybook-static/assets/{preview-CadgX-4y.js → preview-CfH4_OzN.js} +2 -2
  119. package/storybook-static/assets/{preview-FpHGYA1q.js → preview-DHPc-V4N.js} +1 -1
  120. package/storybook-static/assets/preview-DYzi3Z2p.js +1 -0
  121. package/storybook-static/assets/{preview-4Up_z4Em.js → preview-caVMbCIR.js} +2 -2
  122. package/storybook-static/assets/preview-ncvtW_hb.js +34 -0
  123. package/storybook-static/assets/{set-url.test.stories-DjLHKkEh.js → set-url.test.stories-CuSuDLIx.js} +3 -3
  124. package/storybook-static/assets/{slice-events.test.stories-8I_BrHd6.js → slice-events.test.stories-BkRKsKem.js} +4 -4
  125. package/storybook-static/assets/{slots.test.stories-CvZz4jyP.js → slots.test.stories-BJCUWFkE.js} +8 -8
  126. package/storybook-static/assets/{version-select.test.stories-DSxmJylI.js → version-select.test.stories-B3ybJn_Z.js} +2 -2
  127. package/storybook-static/demo/a.svg +26 -26
  128. package/storybook-static/demo/s.xml +18 -3
  129. package/storybook-static/demo/s.xslt +37 -54
  130. package/storybook-static/demo/s1.xslt +59 -59
  131. package/storybook-static/demo/ss.html +24 -57
  132. package/storybook-static/demo/z.html +33 -33
  133. package/storybook-static/demo/z.xml +59 -59
  134. package/storybook-static/demo/z1.html +34 -34
  135. package/storybook-static/iframe.html +1 -1
  136. package/storybook-static/index.html +3 -7
  137. package/storybook-static/project.json +1 -1
  138. package/storybook-static/sb-addons/essentials-actions-3/manager-bundle.js +1 -1
  139. package/storybook-static/sb-addons/essentials-backgrounds-4/manager-bundle.js +9 -9
  140. package/storybook-static/sb-addons/essentials-controls-2/manager-bundle.js +76 -94
  141. package/storybook-static/sb-addons/essentials-measure-7/manager-bundle.js +1 -1
  142. package/storybook-static/sb-addons/essentials-outline-8/manager-bundle.js +1 -1
  143. package/storybook-static/sb-addons/essentials-toolbars-6/manager-bundle.js +1 -1
  144. package/storybook-static/sb-addons/essentials-viewport-5/manager-bundle.js +1 -1
  145. package/storybook-static/sb-addons/interactions-9/manager-bundle.js +211 -0
  146. package/storybook-static/sb-addons/interactions-9/manager-bundle.js.LEGAL.txt +0 -0
  147. package/storybook-static/sb-manager/globals-module-info.js +11 -0
  148. package/storybook-static/sb-manager/globals-runtime.js +27803 -26928
  149. package/storybook-static/sb-manager/runtime.js +10341 -10136
  150. package/storybook-static/sb-preview/runtime.js +3841 -3828
  151. package/.idea/custom-element-dist.iml +0 -9
  152. package/.idea/misc.xml +0 -6
  153. package/.idea/modules.xml +0 -8
  154. package/.idea/vcs.xml +0 -6
  155. package/dist/custom-element-BMMsP1Dy.js +0 -533
  156. package/dist/custom-element-CPSk7s0j.cjs +0 -87
  157. package/storybook-static/assets/Color-KGDBMAHA-CJo5gHY3.js +0 -1
  158. package/storybook-static/assets/Configure-DdXbGKhY.js +0 -173
  159. package/storybook-static/assets/DocsRenderer-PKQXORMH-DLnpL5hE.js +0 -2
  160. package/storybook-static/assets/custom-element-D8hcDZHh.js +0 -265
  161. package/storybook-static/assets/entry-preview-BKQ8UCxI.js +0 -8
  162. package/storybook-static/assets/iframe-Dfrt81rk.js +0 -2
  163. package/storybook-static/assets/index-Ay195x2L.js +0 -605
  164. package/storybook-static/assets/index-C3ChPTMh.js +0 -1
  165. package/storybook-static/assets/index-C8k3Z-3Y.js +0 -28
  166. package/storybook-static/assets/index-DGdNYaqV.js +0 -8
  167. package/storybook-static/assets/index-Gpdhz4ab.js +0 -1
  168. package/storybook-static/assets/lit-element-DzhCn-8W.js +0 -19
  169. package/storybook-static/assets/preview-BJPLiuSt.js +0 -1
  170. package/storybook-static/assets/preview-BMWqy4Bi.js +0 -1
  171. package/storybook-static/assets/preview-BnWGZYux.js +0 -1
  172. package/storybook-static/assets/preview-Djh1_Tal.js +0 -20
  173. package/storybook-static/sb-addons/chromatic-com-storybook-9/manager-bundle.js +0 -336
  174. package/storybook-static/sb-addons/chromatic-com-storybook-9/manager-bundle.js.LEGAL.txt +0 -77
  175. package/storybook-static/sb-addons/interactions-10/manager-bundle.js +0 -234
  176. /package/{storybook-static/sb-addons/interactions-10/manager-bundle.js.LEGAL.txt → src/material/guide/getting-started/index.html} +0 -0
@@ -0,0 +1,241 @@
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{flex:1; width: 100%; }
32
+ }
33
+ </style>
34
+ </head>
35
+
36
+ <body>
37
+ <custom-element hidden src="../index.html#icon-button" tag="icon-button"></custom-element>
38
+
39
+
40
+ <header class="cem-theme-teal">
41
+ <custom-element src="../index.html#nav-head" ></custom-element>
42
+ </header>
43
+ <main>
44
+ <p><code>cem-autocomplete</code> is autocomplete component from &lt;custom-element&gt; Material suite based on the
45
+ <a href="https://material.io/components" >Material Design specification</a>.
46
+ </p>
47
+ <custom-element tag="cem-autocomplete" hidden>
48
+ <template>
49
+ <attribute name="name"></attribute>
50
+ <attribute name="label"></attribute>
51
+ <attribute name="placeholder"></attribute>
52
+ <attribute name="type">search</attribute>
53
+ <attribute name="value"></attribute>
54
+ <style>
55
+ dce-root
56
+ { position: relative;
57
+ display: flex; flex-direction: column; justify-content: center;
58
+ --drop-transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
59
+ --input-padding: 0;
60
+
61
+ --cem-input-outline: inset 0 -1px 0 black;
62
+ --cem-input-outline-focus: inset 0 -3px 0 var(--cem-outline-color-focus);
63
+ --cem-autocomplete-container-shape: 0.25rem;
64
+ --cem-autocomplete-background-color: var(--cem-list-background-color);
65
+ --cem-autocomplete-container-elevation-shadow: 0px 3px 1px -2px rgba(0, 0, 0, .2), 0px 2px 2px 0px rgba(0, 0, 0, .14), 0px 1px 5px 0px rgba(0, 0, 0, .12);
66
+
67
+ background-color: var(--cem-filled-text-field-container-color, var(--cem-app-surface-variant));
68
+
69
+ min-height: 3.5rem;
70
+
71
+ & > fieldset,
72
+ & > fieldset[focus-within="0"]{display: none;}
73
+
74
+ & > fieldset[focus-within="1"],
75
+ & > fieldset[focus-within="2"]{ display: flex; max-height: 10rem; height: auto; overflow: auto; transition: var(--drop-transition) }
76
+
77
+ fieldset
78
+ { position: absolute;
79
+ left: 0; right: 0; top:100%;
80
+ flex-direction: column; border: red; max-height: 0;
81
+ transition: var(--drop-transition);
82
+ overflow: hidden; padding: 0;
83
+
84
+ border-radius: var(--cem-autocomplete-container-shape);
85
+ border-top-left-radius: 0;
86
+ border-top-right-radius: 0;
87
+ box-shadow: var(--cem-autocomplete-container-elevation-shadow);
88
+ background-color: var(--cem-autocomplete-background-color );
89
+
90
+ transition-delay: 40ms;
91
+ transition-duration: 110ms;
92
+
93
+ label{ padding: 0.5rem;
94
+ &:hover{ background-color: var(--cem-list-background-color-hover);}
95
+ &:focus-within{ background-color: var(--cem-list-background-color-focus);}
96
+ input{ width: 0; overflow: hidden; display: inline-block; }
97
+ }
98
+ }
99
+ &>label
100
+ { display: flex; flex-direction: column; justify-content: center;
101
+ flex: 1; padding: 0.5rem 1rem;
102
+ box-shadow: var(--cem-input-outline);
103
+ transition: var(--drop-transition);
104
+ color: var(--cem-filled-text-field-label-text-color);
105
+
106
+ input
107
+ { background: none; padding: var(--input-padding);
108
+ &,&:focus,&:focus-visible{ border: none; outline: none; }
109
+ &:placeholder-shown{ border: none; outline:none; }
110
+ &[value=""]{ height: 0; }
111
+ &:focus,&:focus-visible,&[placeholder*=""]{ height: auto; }
112
+
113
+ color: var(--cem-filled-text-field-input-text-color, var(--cem-app-on-surface));
114
+ caret-color: var(--cem-filled-text-field-caret-color, var(--cem-app-primary));
115
+ font-size: 1rem;
116
+ transition: var(--drop-transition);
117
+ }
118
+ }
119
+ &:focus-within
120
+ {
121
+ &> label
122
+ { box-shadow: var(--cem-input-outline-focus);
123
+ font-size: small; justify-content: space-between;
124
+ }
125
+ }
126
+ label:has( input:not([value=""]) ){ font-size: small; justify-content: space-between;}
127
+ slice{display: none;}
128
+ }
129
+ </style>
130
+ <!-- <pre>-->
131
+ <!-- //focused {//focused}-->
132
+ <!-- //suggest {//suggest}-->
133
+ <!-- //selected {//selected}-->
134
+ <!-- </pre>-->
135
+ <slot name="input"><label>{$label}<xhtml:input
136
+ name="{$name}"
137
+ type="{$type}"
138
+ placeholder="{$placeholder}"
139
+ value="{//selected ?? $value}"
140
+ slice="selected" slice-event="input"
141
+ >
142
+ <slice name="focused" slice-event="blur" slice-value="0"></slice>
143
+ <slice name="focused" slice-event="focus" slice-value="1"></slice>
144
+ <slice name="filter" slice-event="blur input" slice-value="//selected"></slice>
145
+ </xhtml:input></label></slot>
146
+ <fieldset form="cem-autocomplete-form" >
147
+ <attribute name="focus-within">{//focused}</attribute>
148
+ <xsl:for-each select="/datadom/payload/*[normalize-space(text()) != '']">
149
+ <if test="normalize-space(//selected) = '' or contains(@value, //filter)">
150
+ <label value="{@value ?? .}"
151
+ ><xhtml:input type="radio" value="{@value ?? .}" name="cem-autocomplete" slice="selected" slice-event="input">
152
+ <slice name="focused" slice-event="blur" slice-value="0"></slice>
153
+ <slice name="focused" slice-event="focus" slice-value="2"></slice>
154
+ </xhtml:input>
155
+ {.}</label>
156
+ </if>
157
+ </xsl:for-each>
158
+ </fieldset>
159
+ </template>
160
+ </custom-element>
161
+
162
+ <html-demo-element legend="No value" description="Focus to see the cursor in input with label shifted upward ">
163
+ <template>
164
+ <cem-autocomplete label="String field" ></cem-autocomplete>
165
+ </template>
166
+ </html-demo-element>
167
+
168
+ <html-demo-element legend="No value with placeholder" description="focus to see the placeholder text">
169
+ <template>
170
+ <cem-autocomplete label="Number" type="number" placeholder="Enter the numeric value"></cem-autocomplete>
171
+ </template>
172
+ </html-demo-element>
173
+
174
+ <html-demo-element legend="Value defined" description="The value should be visible" >
175
+ <template>
176
+ <cem-autocomplete label="Text" type="text" value="abc"></cem-autocomplete>
177
+ </template>
178
+ </html-demo-element>
179
+
180
+ <html-demo-element legend="No initial value with placeholder" >
181
+ <div slot="description"><code>data value="xxx</code> for selection item uses <code>data</code> attribute for value </div>
182
+ <template>
183
+ <cem-autocomplete label="Fruits and berries" type="text" placeholder="Enter the fruit name">
184
+ <data value="apple" > 🍎 Apple </data>
185
+ <data value="strawberry" > 🍓 Strawberry </data>
186
+ <data value="pineapple" > 🍍 Pineapple </data>
187
+ </cem-autocomplete>
188
+ </template>
189
+ </html-demo-element>
190
+
191
+ <html-demo-element legend="Number, No initial value without placeholder" description="label takes the space till input is focused" >
192
+ <template>
193
+ <cem-autocomplete label="Number" type="number" >
194
+ <data value="1">One </data>
195
+ <data value="2">Two </data>
196
+ <data value="3">Three </data>
197
+ </cem-autocomplete>
198
+ </template>
199
+ </html-demo-element>
200
+
201
+
202
+ <html-demo-element legend="Options text as value" description="The value is same as text" >
203
+ <template>
204
+ <cem-autocomplete label="Dinosaur" type="text" >
205
+ <option>Tyrannosaurus </option>
206
+ <option>Sauropod </option>
207
+ <option>Velociraptor </option>
208
+ </cem-autocomplete>
209
+ </template>
210
+ </html-demo-element>
211
+
212
+ <html-demo-element legend="Options Grouping" description="filter within eac group, empty groups are hidden" >
213
+ <template>
214
+ <cem-autocomplete label="Number" type="text" >
215
+ <optgroup label="🦖 Theropods">
216
+ <option>Tyrannosaurus </option>
217
+ <option>Sauropod </option>
218
+ <option>Velociraptor </option>
219
+ <option>Deinonychus </option>
220
+ </optgroup>
221
+ <optgroup label="🦕 Sauropods">
222
+ <option>Diplodocus </option>
223
+ <option>Saltasaurus </option>
224
+ <option>Apatosaurus </option>
225
+ </optgroup>
226
+ </cem-autocomplete>
227
+ </template>
228
+ </html-demo-element>
229
+
230
+
231
+ </main>
232
+ <footer>
233
+ <hr/>
234
+ Powered by Syngrafact Corp. ©2024.<br/>
235
+ <a href="../../LICENSE"> Code and documentation licensed under an Apache License 2.0 </a>
236
+ </footer>
237
+ <!--<script type="module" src="./html-demo-element.js"></script>-->
238
+ <script type="module" src="https://unpkg.com/html-demo-element@1/html-demo-element.js"></script>
239
+
240
+ </body>
241
+ </html>
@@ -0,0 +1,115 @@
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
+ }
38
+ </style>
39
+ </head>
40
+
41
+ <body>
42
+ <custom-element hidden src="../index.html#icon-button" tag="icon-button"></custom-element>
43
+
44
+ <header class="cem-theme-teal">
45
+ <custom-element src="../index.html#nav-head" ></custom-element>
46
+ </header>
47
+ <main>
48
+ <p><code>cem-dropdown</code> is autocomplete component from &lt;custom-element&gt; Material suite based on the
49
+ <a href="https://material.io/components" >Material Design specification</a>.
50
+ </p>
51
+ <custom-element tag="cem-dropdown" hidden>
52
+ <template>
53
+ <attribute name="open"></attribute>
54
+ <attribute name="label"></attribute>
55
+ <style>
56
+ dce-root
57
+ { position: relative;
58
+
59
+ --cem-dropdown-shadow: 0px 3px 1px -2px rgba(0, 0, 0, .2), 0px 2px 2px 0px rgba(0, 0, 0, .14), 0px 1px 5px 0px rgba(0, 0, 0, .12);
60
+
61
+ &>aside
62
+ { position: absolute;
63
+ left: 0; right: 0; top:100%;
64
+ transition: var(--drop-transition);
65
+
66
+ border-radius: var(--cem-autocomplete-container-shape);
67
+ border-top-left-radius: 0;
68
+ border-top-right-radius: 0;
69
+ box-shadow: var(--cem-dropdown-shadow);
70
+
71
+ transition-delay: 40ms;
72
+ transition-duration: 110ms;
73
+ }
74
+ }
75
+ </style>
76
+ <pre>
77
+ //focused {//focused}
78
+ //suggest {//suggest}
79
+ //selected {//selected}
80
+ </pre>
81
+ <slot name="base"><label>{$label}</label></slot>
82
+ <aside><slot name=""></slot></aside>
83
+ </template>
84
+ </custom-element>
85
+
86
+ <html-demo-element legend="No value" description="Focus to see the cursor in input with label shifted upward ">
87
+ <template>
88
+ <cem-dropdown label="Hi" open="true">
89
+ <template>
90
+ <style>
91
+ label{ min-width: 5rem; }
92
+ menu{ padding: 1rem; display: flex; flex-direction: column; min-width: 12rem;}
93
+ </style>
94
+ <menu>
95
+ <a href="#">link 1</a>
96
+ <a href="#">link 2</a>
97
+ <a href="#">link 3</a>
98
+ </menu>
99
+ </template>
100
+ </cem-dropdown>
101
+ </template>
102
+ </html-demo-element>
103
+
104
+
105
+
106
+ </main>
107
+ <footer>
108
+ <hr/>
109
+ Powered by Syngrafact Corp. ©2024.<br/>
110
+ <a href="../../LICENSE"> Code and documentation licensed under an Apache License 2.0 </a>
111
+ </footer>
112
+ <script type="module" src="https://unpkg.com/html-demo-element@1/html-demo-element.js"></script>
113
+
114
+ </body>
115
+ </html>
@@ -0,0 +1,235 @@
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
+ }
38
+ </style>
39
+ </head>
40
+
41
+ <body>
42
+ <custom-element hidden src="../index.html#icon-button" tag="icon-button"></custom-element>
43
+
44
+ <header class="cem-theme-teal">
45
+ <custom-element src="../index.html#nav-head" ></custom-element>
46
+ </header>
47
+ <main>
48
+ <p><code>cem-menu</code> is responsive menu component from &lt;custom-element&gt; Material suite based on the
49
+ <a href="https://material.io/components" >Material Design specification</a>.
50
+ </p>
51
+ <p>
52
+ <code>direction</code> attribute defines css <code>row</code> or <code>column</code> flex-direction.
53
+ </p>
54
+ <custom-element tag="cem-menu" hidden>
55
+ <template id="cem-menu">
56
+ <attribute name="direction"></attribute>
57
+ <attribute name="justify"></attribute>
58
+ <style>
59
+ dce-root
60
+ {
61
+ display: flex;
62
+ flex-direction: row;
63
+ flex-wrap: wrap;
64
+ &[direction="column"]{ flex-direction: column; }
65
+ &[direction="row" ]{ flex-direction: row; }
66
+ &[justify="end" ]{ justify-content: flex-end; }
67
+ &[justify="start"]{ justify-content: flex-start;}
68
+
69
+ &>*
70
+ { display: flex;
71
+ align-items: center;
72
+ padding: var(--cem-menu-item-padding);
73
+ background-color: var( --cem-menu-item-background );
74
+ color: var( --cem-menu-item-color );
75
+ text-decoration: none;
76
+ font-weight: var(--cem-menu-item-font-weight);
77
+ &:focus{ z-index: 1; }
78
+ &[disabled],&[disabled]:visited{ color:var(--cem-menu-item-color-disabled); pointer-events: none;}
79
+ &:visited{ color:var(--cem-menu-item-color); }
80
+ &:hover
81
+ {
82
+ color: var(--cem-menu-item-hover-color);
83
+ background-color: var(--cem-menu-item-hover-background);
84
+ }
85
+ &:empty{ display: none;}
86
+ }
87
+ }
88
+
89
+ </style>
90
+ <slot name=""></slot>
91
+ </template>
92
+ </custom-element>
93
+
94
+ <html-demo-element legend="Default" description="horizontal menu with padding on elements">
95
+ <template>
96
+ <cem-menu>
97
+ <a href="#">link 1</a>
98
+ <a disabled>link 2</a>
99
+ <a href="#">link 3</a>
100
+ </cem-menu>
101
+ </template>
102
+ </html-demo-element>
103
+
104
+ <html-demo-element legend="Vertical" description="vertical menu">
105
+ <template>
106
+ <cem-menu direction="column">
107
+ <a href="#">link 1</a>
108
+ <a href="#">link 2</a>
109
+ <a href="#">link 3</a>
110
+ </cem-menu>
111
+ </template>
112
+ </html-demo-element>
113
+
114
+ <html-demo-element legend="Horizontal" description="horizontal menu">
115
+ <template>
116
+ <cem-menu direction="row">
117
+ <a href="#">link 1</a>
118
+ <a href="#">link 2</a>
119
+ <a href="#">link 3</a>
120
+ </cem-menu>
121
+ </template>
122
+ </html-demo-element>
123
+
124
+ <html-demo-element legend="custom styling for all menus in scope" description="supported via overriding css properties">
125
+ <template>
126
+ <custom-element>
127
+ <template>
128
+ <style>
129
+ a{
130
+ --cem-menu-item-color: yellow;
131
+ --cem-menu-item-background: lightblue;
132
+ --cem-menu-item-hover-background: blue;
133
+ --cem-menu-item-hover-color: red;
134
+ &:visited{ color:var(--cem-menu-item-color); }
135
+ &:hover{ color:var(--cem-menu-item-hover-color); }
136
+ }
137
+ </style>
138
+ <cem-menu direction="row">
139
+ <a href="#">link 1</a>
140
+ <a href="#">link 2</a>
141
+ <a href="#">link 3</a>
142
+ </cem-menu>
143
+ <cem-menu direction="row">
144
+ <a href="#">link A</a>
145
+ <a href="#">link B</a>
146
+ </cem-menu>
147
+ </template>
148
+ </custom-element>
149
+ </template>
150
+ </html-demo-element>
151
+
152
+ <html-demo-element legend="inline custom styling " description="supported via overriding css properties">
153
+ <template>
154
+ <cem-menu direction="row">
155
+ <template>
156
+ <style>
157
+ a
158
+ { --cem-menu-item-color:blue;
159
+ --cem-menu-item-background: salmon;
160
+ --cem-menu-item-hover-background: blue;
161
+ --cem-menu-item-hover-color: yellow;
162
+ }
163
+ </style>
164
+ <a href="#">link 1</a>
165
+ <a href="#">link 2</a>
166
+ <a href="#">link 3</a>
167
+ </template>
168
+ </cem-menu>
169
+ </template>
170
+ </html-demo-element>
171
+
172
+ <html-demo-element legend="wrap menu" description="second line is left aligned by default">
173
+ <template>
174
+
175
+ <custom-element>
176
+ <template>
177
+ <style>
178
+ cem-menu
179
+ { display: block;
180
+ width: 8rem;
181
+ border: dashed 1px coral;
182
+ }
183
+ </style>
184
+ <cem-menu>
185
+ <template>
186
+ <a href="#">link 1</a>
187
+ <a href="#">link 2</a>
188
+ <a href="#">link 3</a>
189
+ </template>
190
+ </cem-menu>
191
+ </template>
192
+ </custom-element>
193
+
194
+ </template>
195
+ </html-demo-element>
196
+
197
+ <html-demo-element legend="wrap menu right" description="second line right aligned">
198
+ <template>
199
+
200
+ <custom-element>
201
+ <template>
202
+ <style>
203
+ cem-menu
204
+ { display: block;
205
+ width: 8rem;
206
+ border: dashed 1px coral;
207
+ }
208
+ </style>
209
+ <cem-menu justify="end">
210
+ <template>
211
+ <a href="#">link 1</a>
212
+ <a href="#">link 2</a>
213
+ <a href="#">link 3</a>
214
+ </template>
215
+ </cem-menu>
216
+ </template>
217
+ </custom-element>
218
+
219
+ </template>
220
+ </html-demo-element>
221
+
222
+
223
+
224
+
225
+
226
+ </main>
227
+ <footer>
228
+ <hr/>
229
+ Powered by Syngrafact Corp. ©2024.<br/>
230
+ <a href="../../LICENSE"> Code and documentation licensed under an Apache License 2.0 </a>
231
+ </footer>
232
+ <script type="module" src="https://unpkg.com/html-demo-element@1.0.8/html-demo-element.js"></script>
233
+
234
+ </body>
235
+ </html>