@epa-wg/custom-element-dist 0.0.29 → 0.0.31
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.
- package/.idea/custom-element-dist.iml +11 -0
- package/.idea/inspectionProfiles/Project_Default.xml +24 -0
- package/.idea/misc.xml +6 -0
- package/.idea/modules.xml +8 -0
- package/.idea/vcs.xml +6 -0
- package/.storybook/main.ts +21 -19
- package/.storybook/preview.ts +25 -25
- package/README.md +4 -4
- package/coverage/coverage-final.json +21 -21
- package/coverage/index.html +24 -24
- package/coverage/src/custom-element/coverage.svg +1 -1
- package/coverage/src/custom-element/custom-element.js/coverage.svg +1 -1
- package/coverage/src/custom-element/custom-element.js.html +247 -241
- package/coverage/src/custom-element/http-request.js.html +3 -3
- package/coverage/src/custom-element/index.html +14 -14
- package/coverage/src/custom-element/local-storage.js.html +52 -52
- package/coverage/src/custom-element/location-element.js.html +4 -4
- package/coverage/src/custom-element/module-url.js.html +1 -1
- package/coverage/src/index.html +1 -1
- package/coverage/src/mocks/handlers.ts.html +1 -1
- package/coverage/src/mocks/index.html +1 -1
- package/coverage/src/stories/attributes.test.stories.ts.html +28 -28
- package/coverage/src/stories/coverage.svg +1 -1
- package/coverage/src/stories/css.test.stories.ts.html +1 -1
- package/coverage/src/stories/dom-merge.test.stories.ts.html +1 -1
- package/coverage/src/stories/external-template.test.stories.ts.html +1 -1
- package/coverage/src/stories/form.test.stories.ts.html +1 -1
- package/coverage/src/stories/http-request.stories.ts.html +1 -1
- package/coverage/src/stories/index.html +19 -19
- package/coverage/src/stories/local-storage.test.stories.ts.html +17 -17
- package/coverage/src/stories/location-element.test.stories.ts.html +3 -6
- package/coverage/src/stories/module-url.test.stories.ts.html +1 -1
- package/coverage/src/stories/set-url.test.stories.ts.html +1 -1
- package/coverage/src/stories/slice-events.test.stories.ts/coverage.svg +1 -1
- package/coverage/src/stories/slice-events.test.stories.ts.html +284 -23
- package/coverage/src/stories/slots.test.stories.ts.html +1 -1
- package/coverage/src/stories/testStoryBook.ts.html +7 -7
- package/coverage/src/stories/version-select.test.stories.ts.html +1 -1
- package/coverage/src/sum.ts.html +1 -1
- package/dist/custom-element-BbJMY20-.cjs +97 -0
- package/dist/{custom-element-BOIPgtxz.js → custom-element-CoRNKeEP.js} +122 -120
- package/dist/custom-element-bundle.cjs +1 -1
- package/dist/custom-element-bundle.js +2 -2
- package/dist/demo/a.svg +26 -26
- package/dist/demo/data-slices.html +37 -0
- package/package.json +13 -13
- package/public/demo/a.svg +26 -26
- package/public/demo/data-slices.html +37 -0
- package/src/custom-element/custom-element.js +4 -2
- package/src/custom-element/demo/a.svg +26 -26
- package/src/custom-element/demo/data-slices.html +37 -0
- package/src/custom-element/ide/web-types-dce.json +1 -1
- package/src/custom-element/ide/web-types-xsl.json +1 -1
- package/src/material/angular.css +987 -987
- package/src/material/components/autocomplete.html +239 -240
- package/src/material/components/dropdown.html +92 -45
- package/src/material/components/icon-link.html +160 -160
- package/src/material/components/menu.html +234 -234
- package/src/material/components.html +121 -120
- package/src/material/demo.css +36 -31
- package/src/material/index.html +110 -110
- package/src/material/material.css +356 -356
- package/src/material/theme/README.md +17 -17
- package/src/material/theme/semantic.css +113 -112
- package/src/mocks/versions.mock.ts +8 -8
- package/src/stories/attributes.test.stories.ts +20 -20
- package/src/stories/location-element.test.stories.ts +1 -2
- package/src/stories/slice-events.test.stories.ts +87 -0
- package/storybook-static/assets/Color-F6OSRLHC-CFyd3TND.js +1 -0
- package/storybook-static/assets/{Configure-DOhzHFEs.js → Configure-UGTbPRKK.js} +1 -1
- package/storybook-static/assets/{DocsRenderer-CFRXHY34-BSJkbsd6.js → DocsRenderer-CFRXHY34-Dpr5iB0o.js} +2 -2
- package/storybook-static/assets/{attributes.test.stories-BJBuuXgZ.js → attributes.test.stories-DSOLHHOW.js} +38 -36
- package/storybook-static/assets/{css.test.stories-pgbBc17d.js → css.test.stories-Cgn6ICr0.js} +1 -1
- package/storybook-static/assets/custom-element-D59Fok1f.js +97 -0
- package/storybook-static/assets/{dom-merge.test.stories-CXcYP_-J.js → dom-merge.test.stories-CBObfPWg.js} +1 -1
- package/storybook-static/assets/entry-preview-DHVXbf3x.js +26 -0
- package/storybook-static/assets/entry-preview-docs-BbcIMweR.js +2 -0
- package/storybook-static/assets/{external-template.test.stories-CpJ68Ghy.js → external-template.test.stories-VfKUQ8eu.js} +1 -1
- package/storybook-static/assets/{form.test.stories-D35lyqd8.js → form.test.stories-CnuGN7Zw.js} +1 -1
- package/storybook-static/assets/{handlers-CW9pDZnt.js → handlers-V_T7WjNK.js} +21 -21
- package/storybook-static/assets/{http-request.stories-CBbknCOO.js → http-request.stories-8NN1Coqm.js} +1 -1
- package/storybook-static/assets/iframe-DnhkgdtG.js +2 -0
- package/storybook-static/assets/index-3Sfy-t3H.js +769 -0
- package/storybook-static/assets/index-BcZLpTeD.js +8 -0
- package/storybook-static/assets/index-CIBI7sCB.js +1 -0
- package/storybook-static/assets/{index-BSz1w4Gl.js → index-CxRwF5Or.js} +130 -130
- package/storybook-static/assets/{index-YxUFxnQR.js → index-DN1RoK17.js} +1 -1
- package/storybook-static/assets/{index-B3QjF0Ed.js → index-DjJD7gkO.js} +1 -1
- package/storybook-static/assets/{local-storage.test.stories-BY-PWhuk.js → local-storage.test.stories-Dk5Yqc7m.js} +1 -1
- package/storybook-static/assets/{location-element.test.stories-3auBYEaU.js → location-element.test.stories-56um6s5L.js} +1 -1
- package/storybook-static/assets/{module-url.test.stories-B7L9cL60.js → module-url.test.stories-DEponQ7l.js} +1 -1
- package/storybook-static/assets/{preview-BRPR-UXC.js → preview-CNKoaWES.js} +1 -1
- package/storybook-static/assets/preview-Czc-sw5H.js +2 -0
- package/storybook-static/assets/preview-DAeyCMnM.js +1 -0
- package/storybook-static/assets/{preview-CfWMRsRq.js → preview-vbpHsp94.js} +2 -2
- package/storybook-static/assets/{set-url.test.stories-CuSuDLIx.js → set-url.test.stories-B4E6hIe-.js} +1 -1
- package/storybook-static/assets/{slice-events.test.stories-BkRKsKem.js → slice-events.test.stories-BR0F-B6I.js} +138 -13
- package/storybook-static/assets/{slots.test.stories-BJCUWFkE.js → slots.test.stories-CgfJIyCr.js} +1 -1
- package/storybook-static/assets/tiny-invariant-CopsF_GD.js +1 -0
- package/storybook-static/assets/{version-select.test.stories-B3ybJn_Z.js → version-select.test.stories-nmxATIwv.js} +1 -1
- package/storybook-static/demo/a.svg +26 -26
- package/storybook-static/demo/data-slices.html +37 -0
- package/storybook-static/iframe.html +2 -2
- package/storybook-static/index.html +4 -0
- package/storybook-static/index.json +1 -1
- package/storybook-static/project.json +1 -1
- package/storybook-static/sb-addons/chromatic-com-storybook-10/manager-bundle.js +333 -0
- package/storybook-static/sb-addons/chromatic-com-storybook-10/manager-bundle.js.LEGAL.txt +40 -0
- package/storybook-static/sb-addons/essentials-actions-3/manager-bundle.js +1 -1
- package/storybook-static/sb-addons/essentials-backgrounds-4/manager-bundle.js +8 -8
- package/storybook-static/sb-addons/essentials-controls-2/manager-bundle.js +82 -85
- package/storybook-static/sb-addons/essentials-measure-7/manager-bundle.js +1 -1
- package/storybook-static/sb-addons/essentials-outline-8/manager-bundle.js +1 -1
- package/storybook-static/sb-addons/essentials-viewport-5/manager-bundle.js +1 -1
- package/storybook-static/sb-addons/interactions-9/manager-bundle.js +66 -67
- package/storybook-static/sb-addons/storybook-core-core-server-presets-0/common-manager-bundle.js +1 -1
- package/storybook-static/sb-manager/globals-module-info.js +25 -3
- package/storybook-static/sb-manager/globals-runtime.js +29585 -43124
- package/storybook-static/sb-manager/runtime.js +10647 -9399
- package/storybook-static/sb-preview/runtime.js +3536 -5860
- package/test-runner-jest.config.js +15 -0
- package/dist/custom-element-CUsSENWc.cjs +0 -97
- package/src/stories/__screenshots__/http-request.test.ts/http-request-url-change-1.png +0 -0
- package/storybook-static/assets/Color-ERTF36HU-CQkSD2nd.js +0 -1
- package/storybook-static/assets/custom-element-BDGsYgbP.js +0 -97
- package/storybook-static/assets/entry-preview-C313OLrj.js +0 -26
- package/storybook-static/assets/entry-preview-docs-B7ORr9w5.js +0 -2
- package/storybook-static/assets/iframe-DOi4N7qI.js +0 -2
- package/storybook-static/assets/index-BdcJ-iJ7.js +0 -8
- package/storybook-static/assets/index-CaL3Qp7t.js +0 -634
- package/storybook-static/assets/index-DgFM0Ce3.js +0 -1
- package/storybook-static/assets/preview-C992A1Y-.js +0 -2
- package/storybook-static/assets/preview-CcS4DQh8.js +0 -1
- package/storybook-static/assets/tiny-invariant-BxWVcicq.js +0 -1
|
@@ -1,235 +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="./icon-link.html#cem-icon-link" tag="cem-icon-link"></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 <custom-element> 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>
|
|
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="./icon-link.html#cem-icon-link" tag="cem-icon-link"></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 <custom-element> 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
235
|
</html>
|