@epa-wg/custom-element-dist 0.0.33 → 0.0.35
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/.claude/settings.local.json +18 -0
- package/.gitattributes +4 -0
- package/.github/workflows/deploy.yml +59 -0
- package/.idea/copilot.data.migration.agent.xml +6 -0
- package/.idea/copilot.data.migration.ask.xml +6 -0
- package/.idea/copilot.data.migration.ask2agent.xml +6 -0
- package/.idea/copilot.data.migration.edit.xml +6 -0
- package/.idea/custom-element-dist.iml +2 -0
- package/.storybook/main.ts +20 -17
- package/.storybook/preview.ts +23 -23
- package/.yarn/install-state.gz +0 -0
- package/.yarnrc.yml +1 -0
- package/README.md +6 -4
- package/coverage/block-navigation.js +1 -1
- package/coverage/coverage-final.json +4 -3
- package/coverage/index.html +34 -19
- package/coverage/sorter.js +21 -7
- 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 +448 -391
- package/coverage/src/custom-element/http-request.js/coverage.svg +1 -1
- package/coverage/src/custom-element/http-request.js.html +38 -17
- package/coverage/src/custom-element/index.html +26 -26
- package/coverage/src/custom-element/local-storage.js.html +1 -1
- package/coverage/src/custom-element/location-element.js.html +1 -1
- package/coverage/src/custom-element/module-url.js.html +1 -1
- package/coverage/src/index.html +1 -1
- package/coverage/src/material/theme/colors.js/coverage.svg +10 -0
- package/coverage/src/material/theme/colors.js.html +217 -0
- package/coverage/src/material/theme/coverage.svg +10 -0
- package/coverage/src/material/theme/index.html +116 -0
- package/coverage/src/mocks/handlers.ts.html +1 -1
- package/coverage/src/mocks/index.html +1 -1
- package/coverage/src/stories/frame.canvas.ts.html +1 -1
- package/coverage/src/stories/http-request.stories.ts.html +1 -1
- package/coverage/src/stories/index.html +1 -1
- package/coverage/src/stories/testStoryBook.ts.html +12 -12
- package/coverage/src/sum.ts.html +1 -1
- package/dist/custom-element-Bssk9jRy.cjs +97 -0
- package/dist/{custom-element-WnOqmEOe.js → custom-element-BzDjIYMe.js} +193 -183
- package/dist/custom-element-bundle.cjs +1 -1
- package/dist/custom-element-bundle.js +3 -3
- package/dist/demo/a.html +10 -3
- package/dist/demo/a.svg +26 -26
- package/dist/demo/html-template.html +4 -3
- package/dist/demo/s.xml +1 -75
- package/dist/demo/s.xslt +351 -72
- package/dist/demo/s1.xml +3706 -0
- package/dist/http-request-DSaowcG1.cjs +1 -0
- package/dist/{http-request-BOvP4KTl.js → http-request-DTCzZ1gc.js} +15 -9
- package/dist/mockServiceWorker.js +105 -63
- package/package.json +5 -4
- package/public/demo/a.html +10 -3
- package/public/demo/a.svg +26 -26
- package/public/demo/html-template.html +4 -3
- package/public/demo/s.xml +1 -75
- package/public/demo/s.xslt +351 -72
- package/public/demo/s1.xml +3706 -0
- package/public/mockServiceWorker.js +105 -63
- package/src/custom-element/custom-element.js +28 -9
- package/src/custom-element/demo/a.html +10 -3
- package/src/custom-element/demo/a.svg +26 -26
- package/src/custom-element/demo/html-template.html +4 -3
- package/src/custom-element/demo/s.xml +1 -75
- package/src/custom-element/demo/s.xslt +351 -72
- package/src/custom-element/demo/s1.xml +3706 -0
- package/src/custom-element/http-request.js +7 -0
- package/src/custom-element/ide/customData-dce.json +123 -0
- package/src/custom-element/ide/web-types-dce.json +128 -1
- package/src/custom-element/ide/web-types-xsl.json +1 -1
- package/src/material/angular.css +987 -987
- package/src/material/components/action.html +262 -0
- package/src/material/components/autocomplete.html +167 -239
- package/src/material/components/badge.html +238 -239
- package/src/material/components/dropdown.html +0 -1
- package/src/material/components/icon-link.html +160 -161
- package/src/material/components/icon.html +251 -252
- package/src/material/components/input.html +569 -570
- package/src/material/components/menu.html +235 -236
- package/src/material/components.html +157 -158
- package/src/material/demo.css +36 -36
- package/src/material/index.html +109 -110
- package/src/material/material.css +356 -356
- package/src/material/theme/Base-Principles.md +339 -0
- package/src/material/theme/README.md +298 -18
- package/src/material/theme/UI Domain Model in web applications.svg +1 -0
- package/src/material/theme/User Semantic Theme tokens.svg +1 -0
- package/src/material/theme/action-pending-poc.html +62 -0
- package/src/material/theme/actions-color.html +141 -0
- package/src/material/theme/colors-light.html +631 -0
- package/src/material/theme/colors-native.html +51 -0
- package/src/material/theme/colors-poc.html +66 -0
- package/src/material/theme/colors.html +297 -0
- package/src/material/theme/colors.js +44 -0
- package/src/material/theme/consumer-theme.css +745 -0
- package/src/material/theme/semantic.css +132 -132
- package/src/material/theme/style-bug.html +123 -0
- package/src/material/theme/theme-data.css +43 -0
- package/src/material/theme/theme-data.xhtml +2926 -0
- package/src/material/theme/todo.md +274 -0
- package/src/material/theme/tokens/action-colors.png +0 -0
- package/src/material/theme/tokens/cem-article-illustration-4x1-letterbox-2000x500.png +0 -0
- package/src/material/theme/tokens/cem-breakpoints.md +519 -0
- package/src/material/theme/tokens/cem-colors.md +715 -0
- package/src/material/theme/tokens/cem-consumerflow-typography-matrix.svg +198 -0
- package/src/material/theme/tokens/cem-coupling.md +372 -0
- package/src/material/theme/tokens/cem-data-vs-reading-numerals.svg +164 -0
- package/src/material/theme/tokens/cem-dimension.md +625 -0
- package/src/material/theme/tokens/cem-layering.md +562 -0
- package/src/material/theme/tokens/cem-m3-parity.md +343 -0
- package/src/material/theme/tokens/cem-responsive.md +238 -0
- package/src/material/theme/tokens/cem-shape.md +691 -0
- package/src/material/theme/tokens/cem-stroke-density-illustration-4to1-v3.svg +102 -0
- package/src/material/theme/tokens/cem-stroke.md +480 -0
- package/src/material/theme/tokens/cem-timing.md +198 -0
- package/src/material/theme/tokens/cem-typography-model-stack.svg +64 -0
- package/src/material/theme/tokens/cem-voice-fonts-typography.md +718 -0
- package/src/material/theme/tokens/cem-voice-ladder.svg +91 -0
- package/src/material/theme/tokens/chips.png +0 -0
- package/src/material/theme/tokens/columns-page.png +0 -0
- package/src/material/theme/tokens/initials.png +0 -0
- package/src/material/theme/tokens/nav-buttons.png +0 -0
- package/src/material/theme/tokens/script.png +0 -0
- package/src/material/theme/tokens/sufler.png +0 -0
- package/src/material/theme/tokens/typography-icons.png +0 -0
- package/src/mocks/versions.mock.ts +1 -1
- package/src/stories/__screenshots__/dom-merge.test.stories.ts/dom-merge-dom-merge-OrderPreservingOn2ndTransform-1.png +0 -0
- package/src/stories/__screenshots__/xslt-conditionals.test.stories.ts/xslt-conditionals-xslt-conditionals-MultipleIfOrderingWorkaround-1.png +0 -0
- package/src/stories/dom-merge.test.stories.ts +25 -1
- package/src/stories/xslt-conditionals.test.stories.ts +492 -0
- package/src/stories/xslt-for-each.test.stories.ts +336 -0
- package/src/stories/xslt-if.test.stories.ts +89 -0
- package/storybook-static/assets/{Color-F6OSRLHC-Cbp293x2.js → Color-F6OSRLHC-DeDlDLjU.js} +1 -1
- package/storybook-static/assets/{Configure-BrFr4SLE.js → Configure-CH_tIP5N.js} +1 -1
- package/storybook-static/assets/{DocsRenderer-CFRXHY34-DhHzJiIO.js → DocsRenderer-CFRXHY34-Bc9EPsUI.js} +2 -2
- package/storybook-static/assets/{attributes.test.stories-Gg9LQTEK.js → attributes.test.stories-BtamFQkF.js} +1 -1
- package/storybook-static/assets/{css.test.stories-B_3ltOrx.js → css.test.stories-BfNxLgwr.js} +1 -1
- package/storybook-static/assets/{custom-element-CPnvJnn8.js → custom-element-CnmjNo0g.js} +6 -6
- package/storybook-static/assets/{dom-merge.test.stories-nQxcgLoM.js → dom-merge.test.stories-DxnitrLK.js} +47 -6
- package/storybook-static/assets/entry-preview-BNCt9WBs.js +26 -0
- package/storybook-static/assets/{entry-preview-docs-Dwczwtsc.js → entry-preview-docs-CbF8-81D.js} +2 -2
- package/storybook-static/assets/{external-template.test.stories-DZ-rjnfd.js → external-template.test.stories-BTsww7B0.js} +1 -1
- package/storybook-static/assets/{form.test.stories-DQhPYtMj.js → form.test.stories-DNJFtPJb.js} +1 -1
- package/storybook-static/assets/{frame.canvas-ClTqYyMN.js → frame.canvas-E5n9h6j1.js} +1 -1
- package/storybook-static/assets/{handlers-CLkps6Nz.js → handlers-Dvg8CAeR.js} +1 -1
- package/storybook-static/assets/http-request-BWeEEBkP.js +1 -0
- package/storybook-static/assets/{http-request.stories-jo0f73nw.js → http-request.stories-DgrBNle8.js} +1 -1
- package/storybook-static/assets/{iframe-CZwRpnn9.js → iframe-DiVWehoI.js} +11 -11
- package/storybook-static/assets/{index-Dr4PwNfd.js → index-CGuyH0k-.js} +87 -87
- package/storybook-static/assets/{index-CJQtnF9V.js → index-CdEbhcV9.js} +1 -1
- package/storybook-static/assets/index-DO1nmyvI.js +11 -0
- package/storybook-static/assets/{index-B68YUdzy.js → index-w6iX3YlR.js} +3 -3
- package/storybook-static/assets/{local-storage.test.stories-uA5EKRPf.js → local-storage.test.stories-Hwq80yUr.js} +1 -1
- package/storybook-static/assets/{location-element.test.stories-Cu-6Elcg.js → location-element.test.stories-mEhZzm7x.js} +1 -1
- package/storybook-static/assets/{module-url.test.stories-CD_wusXQ.js → module-url.test.stories-Bj46iT0V.js} +1 -1
- package/storybook-static/assets/{preview-CuCH40jj.js → preview-BjbXcJci.js} +2 -2
- package/storybook-static/assets/{preview-BFlNN3Wj.js → preview-Bn8igYMp.js} +1 -1
- package/storybook-static/assets/{preview-Cm4PPhHS.js → preview-CfuT8gak.js} +1 -1
- package/storybook-static/assets/{set-url.test.stories-CY7B9BVZ.js → set-url.test.stories-hzxLcqmm.js} +1 -1
- package/storybook-static/assets/{slice-events.test.stories-BVnPXm6e.js → slice-events.test.stories-DVyXFRU1.js} +1 -1
- package/storybook-static/assets/{slots.test.stories-Dxsa9KdA.js → slots.test.stories-CS544nS4.js} +1 -1
- package/storybook-static/assets/{version-select.test.stories-Buga1PAa.js → version-select.test.stories-D36nfYBq.js} +1 -1
- package/storybook-static/assets/xslt-conditionals.test.stories-BS1PTIHe.js +633 -0
- package/storybook-static/assets/xslt-for-each.test.stories-CtPS20RK.js +329 -0
- package/storybook-static/assets/xslt-if.test.stories-DcHrAMSY.js +71 -0
- package/storybook-static/demo/a.html +10 -3
- package/storybook-static/demo/a.svg +26 -26
- package/storybook-static/demo/html-template.html +4 -3
- package/storybook-static/demo/s.xml +1 -75
- package/storybook-static/demo/s.xslt +351 -72
- package/storybook-static/demo/s1.xml +3706 -0
- package/storybook-static/iframe.html +2 -2
- package/storybook-static/index.json +1 -1
- package/storybook-static/mockServiceWorker.js +105 -63
- package/storybook-static/project.json +1 -1
- package/storybook-static/sb-addons/essentials-controls-1/manager-bundle.js +69 -66
- package/storybook-static/sb-addons/essentials-docs-3/manager-bundle.js +62 -59
- package/dist/custom-element-6slVaFEs.cjs +0 -97
- package/dist/http-request-DPrY7mGh.cjs +0 -1
- package/storybook-static/assets/attributes.test.stories-CzWkKw0e.js +0 -1
- package/storybook-static/assets/entry-preview-DHVXbf3x.js +0 -26
- package/storybook-static/assets/external-template.test.stories-BivZqBTp.js +0 -1
- package/storybook-static/assets/http-request-DNq59pnj.js +0 -1
- package/storybook-static/assets/index-BwkS7JH_.js +0 -8
- package/storybook-static/assets/module-url.test.stories-CTjUAk3J.js +0 -1
|
@@ -1,240 +1,168 @@
|
|
|
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="./icon-link.html#cem-icon-link"
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
<
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
<attribute name="value"></attribute>
|
|
54
|
-
<
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
<
|
|
162
|
-
<
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
<template>
|
|
169
|
-
<cem-autocomplete label="Number" type="number" placeholder="Enter the numeric value"></cem-autocomplete>
|
|
170
|
-
</template>
|
|
171
|
-
</html-demo-element>
|
|
172
|
-
|
|
173
|
-
<html-demo-element legend="Value defined" description="The value should be visible" >
|
|
174
|
-
<template>
|
|
175
|
-
<cem-autocomplete label="Text" type="text" value="abc"></cem-autocomplete>
|
|
176
|
-
</template>
|
|
177
|
-
</html-demo-element>
|
|
178
|
-
|
|
179
|
-
<html-demo-element legend="No initial value with placeholder" >
|
|
180
|
-
<div slot="description"><code>data value="xxx</code> for selection item uses <code>data</code> attribute for value </div>
|
|
181
|
-
<template>
|
|
182
|
-
<cem-autocomplete label="Fruits and berries" type="text" placeholder="Enter the fruit name">
|
|
183
|
-
<data value="apple" > 🍎 Apple </data>
|
|
184
|
-
<data value="strawberry" > 🍓 Strawberry </data>
|
|
185
|
-
<data value="pineapple" > 🍍 Pineapple </data>
|
|
186
|
-
</cem-autocomplete>
|
|
187
|
-
</template>
|
|
188
|
-
</html-demo-element>
|
|
189
|
-
|
|
190
|
-
<html-demo-element legend="Number, No initial value without placeholder" description="label takes the space till input is focused" >
|
|
191
|
-
<template>
|
|
192
|
-
<cem-autocomplete label="Number" type="number" >
|
|
193
|
-
<data value="1">One </data>
|
|
194
|
-
<data value="2">Two </data>
|
|
195
|
-
<data value="3">Three </data>
|
|
196
|
-
</cem-autocomplete>
|
|
197
|
-
</template>
|
|
198
|
-
</html-demo-element>
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
<html-demo-element legend="Options text as value" description="The value is same as text" >
|
|
202
|
-
<template>
|
|
203
|
-
<cem-autocomplete label="Dinosaur" type="text" >
|
|
204
|
-
<option>Tyrannosaurus </option>
|
|
205
|
-
<option>Sauropod </option>
|
|
206
|
-
<option>Velociraptor </option>
|
|
207
|
-
</cem-autocomplete>
|
|
208
|
-
</template>
|
|
209
|
-
</html-demo-element>
|
|
210
|
-
|
|
211
|
-
<html-demo-element legend="Options Grouping" description="filter within eac group, empty groups are hidden" >
|
|
212
|
-
<template>
|
|
213
|
-
<cem-autocomplete label="Number" type="text" >
|
|
214
|
-
<optgroup label="🦖 Theropods">
|
|
215
|
-
<option>Tyrannosaurus </option>
|
|
216
|
-
<option>Sauropod </option>
|
|
217
|
-
<option>Velociraptor </option>
|
|
218
|
-
<option>Deinonychus </option>
|
|
219
|
-
</optgroup>
|
|
220
|
-
<optgroup label="🦕 Sauropods">
|
|
221
|
-
<option>Diplodocus </option>
|
|
222
|
-
<option>Saltasaurus </option>
|
|
223
|
-
<option>Apatosaurus </option>
|
|
224
|
-
</optgroup>
|
|
225
|
-
</cem-autocomplete>
|
|
226
|
-
</template>
|
|
227
|
-
</html-demo-element>
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
</main>
|
|
231
|
-
<footer>
|
|
232
|
-
<hr/>
|
|
233
|
-
Powered by Syngrafact Corp. ©2024.<br/>
|
|
234
|
-
<a href="../../LICENSE"> Code and documentation licensed under an Apache License 2.0 </a>
|
|
235
|
-
</footer>
|
|
236
|
-
<!--<script type="module" src="./html-demo-element.js"></script>-->
|
|
237
|
-
<script type="module" src="https://unpkg.com/html-demo-element@1/html-demo-element.js"></script>
|
|
238
|
-
|
|
239
|
-
</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{flex:1; width: 100%; }
|
|
32
|
+
}
|
|
33
|
+
</style>
|
|
34
|
+
</head>
|
|
35
|
+
|
|
36
|
+
<body>
|
|
37
|
+
<custom-element tag="cem-icon-link" hidden src="./icon-link.html#cem-icon-link" ></custom-element>
|
|
38
|
+
<custom-element tag="cem-input" hidden src="./input.html#cem-input" ></custom-element>
|
|
39
|
+
<custom-element tag="cem-menu" hidden src="./menu.html#cem-menu"></custom-element>
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
<header class="cem-theme-teal">
|
|
43
|
+
<custom-element src="../index.html#nav-head" ></custom-element>
|
|
44
|
+
</header>
|
|
45
|
+
<main>
|
|
46
|
+
<p><code>cem-autocomplete</code> is autocomplete component from <custom-element> Material suite based on the
|
|
47
|
+
<a href="https://material.io/components" >Material Design specification</a>.
|
|
48
|
+
</p>
|
|
49
|
+
|
|
50
|
+
<custom-element tag="cem-autocomplete" hidden>
|
|
51
|
+
<template>
|
|
52
|
+
<!-- cem-input attributes -->
|
|
53
|
+
<attribute name="value" select="//selected[//selected/event] ?? //attributes/@value" ></attribute>
|
|
54
|
+
<attribute name="name" ></attribute>
|
|
55
|
+
<attribute name="type" ></attribute>
|
|
56
|
+
<attribute name="autocapitalize" ></attribute>
|
|
57
|
+
<attribute name="disabled" ></attribute>
|
|
58
|
+
<attribute name="multiple" ></attribute>
|
|
59
|
+
<attribute name="readonly" ></attribute>
|
|
60
|
+
<attribute name="required" ></attribute>
|
|
61
|
+
<attribute name="incremental" ></attribute>
|
|
62
|
+
<attribute name="max" ></attribute>
|
|
63
|
+
<attribute name="maxlength" ></attribute>
|
|
64
|
+
<attribute name="min" ></attribute>
|
|
65
|
+
<attribute name="minlength" ></attribute>
|
|
66
|
+
<attribute name="size" ></attribute>
|
|
67
|
+
<attribute name="step" ></attribute>
|
|
68
|
+
<attribute name="tabindex" ></attribute>
|
|
69
|
+
<attribute name="autocomplete" ></attribute>
|
|
70
|
+
<attribute name="form" ></attribute>
|
|
71
|
+
<attribute name="id" ></attribute>
|
|
72
|
+
<attribute name="list" ></attribute>
|
|
73
|
+
<attribute name="pattern" ></attribute>
|
|
74
|
+
<attribute name="placeholder" ></attribute>
|
|
75
|
+
<attribute name="title" ></attribute>
|
|
76
|
+
<attribute name="leading" aria-description="leading icon" ></attribute>
|
|
77
|
+
<attribute name="trailing" aria-description="trailing icon" ></attribute>
|
|
78
|
+
<attribute name="label" aria-description="label text" ></attribute>
|
|
79
|
+
<attribute name="supporting" aria-description="Supporting text" ></attribute>
|
|
80
|
+
<style>
|
|
81
|
+
&
|
|
82
|
+
{
|
|
83
|
+
}
|
|
84
|
+
</style>
|
|
85
|
+
<slot name="input"><cem-input></cem-input></slot>
|
|
86
|
+
<slot name="menu"><cem-menu></cem-menu></slot>
|
|
87
|
+
</template>
|
|
88
|
+
</custom-element>
|
|
89
|
+
|
|
90
|
+
<html-demo-element legend="No value" description="Focus to see the cursor in input with label shifted upward ">
|
|
91
|
+
<template>
|
|
92
|
+
<cem-autocomplete label="String field" ></cem-autocomplete>
|
|
93
|
+
</template>
|
|
94
|
+
</html-demo-element>
|
|
95
|
+
|
|
96
|
+
<html-demo-element legend="No value with placeholder" description="focus to see the placeholder text">
|
|
97
|
+
<template>
|
|
98
|
+
<cem-autocomplete label="Number" type="number" placeholder="Enter the numeric value"></cem-autocomplete>
|
|
99
|
+
</template>
|
|
100
|
+
</html-demo-element>
|
|
101
|
+
|
|
102
|
+
<html-demo-element legend="Value defined" description="The value should be visible" >
|
|
103
|
+
<template>
|
|
104
|
+
<cem-autocomplete label="Text" type="text" value="abc"></cem-autocomplete>
|
|
105
|
+
</template>
|
|
106
|
+
</html-demo-element>
|
|
107
|
+
|
|
108
|
+
<html-demo-element legend="No initial value with placeholder" >
|
|
109
|
+
<div slot="description"><code>data value="xxx</code> for selection item uses <code>data</code> attribute for value </div>
|
|
110
|
+
<template>
|
|
111
|
+
<cem-autocomplete label="Fruits and berries" type="text" placeholder="Enter the fruit name">
|
|
112
|
+
<data value="apple" > 🍎 Apple </data>
|
|
113
|
+
<data value="strawberry" > 🍓 Strawberry </data>
|
|
114
|
+
<data value="pineapple" > 🍍 Pineapple </data>
|
|
115
|
+
</cem-autocomplete>
|
|
116
|
+
</template>
|
|
117
|
+
</html-demo-element>
|
|
118
|
+
|
|
119
|
+
<html-demo-element legend="Number, No initial value without placeholder" description="label takes the space till input is focused" >
|
|
120
|
+
<template>
|
|
121
|
+
<cem-autocomplete label="Number" type="number" >
|
|
122
|
+
<data value="1">One </data>
|
|
123
|
+
<data value="2">Two </data>
|
|
124
|
+
<data value="3">Three </data>
|
|
125
|
+
</cem-autocomplete>
|
|
126
|
+
</template>
|
|
127
|
+
</html-demo-element>
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
<html-demo-element legend="Options text as value" description="The value is same as text" >
|
|
131
|
+
<template>
|
|
132
|
+
<cem-autocomplete label="Dinosaur" type="text" >
|
|
133
|
+
<option>Tyrannosaurus </option>
|
|
134
|
+
<option>Sauropod </option>
|
|
135
|
+
<option>Velociraptor </option>
|
|
136
|
+
</cem-autocomplete>
|
|
137
|
+
</template>
|
|
138
|
+
</html-demo-element>
|
|
139
|
+
|
|
140
|
+
<html-demo-element legend="Options Grouping" description="filter within eac group, empty groups are hidden" >
|
|
141
|
+
<template>
|
|
142
|
+
<cem-autocomplete label="Number" type="text" >
|
|
143
|
+
<optgroup label="🦖 Theropods">
|
|
144
|
+
<option>Tyrannosaurus </option>
|
|
145
|
+
<option>Sauropod </option>
|
|
146
|
+
<option>Velociraptor </option>
|
|
147
|
+
<option>Deinonychus </option>
|
|
148
|
+
</optgroup>
|
|
149
|
+
<optgroup label="🦕 Sauropods">
|
|
150
|
+
<option>Diplodocus </option>
|
|
151
|
+
<option>Saltasaurus </option>
|
|
152
|
+
<option>Apatosaurus </option>
|
|
153
|
+
</optgroup>
|
|
154
|
+
</cem-autocomplete>
|
|
155
|
+
</template>
|
|
156
|
+
</html-demo-element>
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
</main>
|
|
160
|
+
<footer>
|
|
161
|
+
<hr/>
|
|
162
|
+
<a href="../../LICENSE"> Code and documentation licensed under an Apache License 2.0 </a>
|
|
163
|
+
</footer>
|
|
164
|
+
<!--<script type="module" src="./html-demo-element.js"></script>-->
|
|
165
|
+
<script type="module" src="https://unpkg.com/html-demo-element@1/html-demo-element.js"></script>
|
|
166
|
+
|
|
167
|
+
</body>
|
|
240
168
|
</html>
|